diff --git a/.appveyor.yml b/.appveyor.yml index 1d3fff23..aea1a568 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,28 +2,100 @@ version: '{build}' image: - Visual Studio 2015 + - Visual Studio 2017 - Ubuntu1604 - Ubuntu1804 -skip_branch_with_pr: true +configuration: Release +skip_branch_with_pr: true clone_depth: 1 +skip_commits: + files: + - .travis.yml + - .gitlab-ci.yml + - .azure-pipelines.yml + - .cirrus.yml + init: - ps: Update-AppveyorBuild -Version "build-$env:APPVEYOR_BUILD_NUMBER-$($env:APPVEYOR_REPO_COMMIT.substring(0,7))" install: git submodule update --init --recursive -build_script: - - cmd: >- - src\BuildAll.cmd - exit %errorlevel% - - sh: >- - ./configure && make package -C tmp +for: +- + matrix: + only: + - image: Visual Studio 2015 + build_script: + - src\BuildAll.cmd + - exit %errorlevel% + after_build: + - 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs-vs2015.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\Win32_Release\*.pdb" + - 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2015.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\x64_Release\*.pdb" + artifacts: + - path: output\pkg\*\* + name: Release + - path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs-vs2015.zip" + name: PDBs (x86) + - path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2015.zip" + name: PDBs (x64) +- + matrix: + only: + - image: Visual Studio 2017 + init: + - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" + before_build: + - configure + build_script: + - nmake + test_script: + - ps: cd $env:APPVEYOR_BUILD_FOLDER + - ps: .\.ci\appveyor-vpntest.ps1 + after_build: + - 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.exe" + - 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\hamcore.se2" + - 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.pdb" + artifacts: + - path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" + name: Release + - path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2017.zip" + name: PDBs +- + matrix: + only: + - image: Ubuntu1604 + before_build: + - ./configure + build_script: + - make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4) + test_script: + - .ci/appveyor-deb-install-test.sh + - sudo apt-get update && sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps + - sudo .ci/start-se-openvpn.sh + - sudo .ci/run-openvpn-tests.sh -artifacts: - - path: output\pkg\*\* - name: Windows +- + matrix: + only: + - image: Ubuntu1804 + before_build: + - sh: "if [ ${APPVEYOR_REPO_TAG} == \"true\" ]; then .ci/appveyor-create-release-tarball.sh\nfi" + - ./configure + build_script: + - make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4) + - .ci/memory-leak-test.sh + test_script: + - .ci/appveyor-deb-install-test.sh + - sudo apt-get update && sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps + - sudo .ci/start-se-openvpn.sh + - sudo .ci/run-openvpn-tests.sh - - path: build/*.deb - name: Ubuntu +deploy: + description: 'automatic release' + provider: GitHub + auth_token: $(github_token) + on: + APPVEYOR_REPO_TAG: true diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 00000000..27fa459e --- /dev/null +++ b/.azure-pipelines.yml @@ -0,0 +1,6 @@ +jobs: + - template: .ci/azure-pipelines-linux.yml + +# - template: .ci/azure-pipelines-osx.yml + + - template: .ci/azure-pipelines-win.yml diff --git a/.ci/appveyor-create-release-tarball.sh b/.ci/appveyor-create-release-tarball.sh new file mode 100755 index 00000000..e335f120 --- /dev/null +++ b/.ci/appveyor-create-release-tarball.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eux + +tar --exclude=.git --transform "s//SoftEtherVPN-${APPVEYOR_REPO_TAG_NAME}\//" -czf /tmp/softether-vpn-src-${APPVEYOR_REPO_TAG_NAME}.tar.gz . +appveyor PushArtifact /tmp/softether-vpn-src-${APPVEYOR_REPO_TAG_NAME}.tar.gz + diff --git a/.ci/appveyor-deb-install-test.sh b/.ci/appveyor-deb-install-test.sh new file mode 100755 index 00000000..1e912a4e --- /dev/null +++ b/.ci/appveyor-deb-install-test.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eux + +sudo dpkg -i build/softether-common*.deb +sudo dpkg -i build/softether-vpnbridge*.deb +sudo dpkg -i build/softether-vpnclient*.deb +sudo dpkg -i build/softether-vpncmd*.deb +sudo dpkg -i build/softether-vpnserver*.deb + +sudo systemctl restart softether-vpnserver || (sudo journalctl -xe --no-pager >> systemctl.log && appveyor PushArtifact systemctl.log && exit 1) + diff --git a/.ci/appveyor-vpntest.ps1 b/.ci/appveyor-vpntest.ps1 new file mode 100644 index 00000000..60177c2b --- /dev/null +++ b/.ci/appveyor-vpntest.ps1 @@ -0,0 +1,20 @@ +$ErrorActionPreference = 'Stop' + +# ('s', 'c', 'b', 'sm', 'cm') ?? +('s', 'c', 'b') | % { + + [String] $mode = $_ + Write-Host "testing: $mode" + + $full = (Write-Output "q\n" | & .\build\vpntest.exe $mode) + $t = ($full | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive) + + if( ($t).Count -ne 1){ + $full + Write-Error 'failed' + return $false + }else{ + Write-Host 'ok' + } + +} diff --git a/.ci/azure-pipelines-linux.yml b/.ci/azure-pipelines-linux.yml new file mode 100644 index 00000000..85f9c807 --- /dev/null +++ b/.ci/azure-pipelines-linux.yml @@ -0,0 +1,19 @@ +jobs: +- job: linux_64 + displayName: 'Ubuntu 16.04' + pool: + vmImage: ubuntu-16.04 + variables: + CPACK_GENERATOR: DEB + steps: + - checkout: self + submodules: recursive + - script: | + sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev + ./configure + make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4) + .ci/appveyor-deb-install-test.sh + sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps + sudo .ci/start-se-openvpn.sh + sudo .ci/run-openvpn-tests.sh + displayName: 'Ubuntu 16.04' diff --git a/.ci/azure-pipelines-win.yml b/.ci/azure-pipelines-win.yml new file mode 100644 index 00000000..b08db741 --- /dev/null +++ b/.ci/azure-pipelines-win.yml @@ -0,0 +1,28 @@ +jobs: +- job: win_64 + displayName: 'Visual Studio 2017' + pool: + vmImage: vs2017-win2016 + steps: + - checkout: self + submodules: recursive + - script: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + configure + - script: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + cd tmp + nmake + - powershell: | + . .ci\appveyor-vpntest.ps1 + - powershell: | + New-Item -Path '$(build.artifactstagingdirectory)/publish' -ItemType Directory + - task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.SourcesDirectory)' + contents: 'build/?(*.exe|*.se2|*.pdb)' + TargetFolder: '$(build.artifactstagingdirectory)/publish' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(build.artifactstagingdirectory)/publish' + artifactName: vs2017 diff --git a/.ci/build-libressl.sh b/.ci/build-libressl.sh new file mode 100755 index 00000000..dc151b2e --- /dev/null +++ b/.ci/build-libressl.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -eux + +download_libressl () { + if [[ ! -f "download-cache/librenssl-${LIBRESSL_VERSION}.tar.gz" ]]; then + wget -P download-cache/ \ + "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz" + fi +} + +build_libressl () { + if [[ "$(cat ${OPENSSL_INSTALL_DIR}/.openssl-version)" != "${LIBRESSL_VERSION}" ]]; then + tar zxf "download-cache/libressl-${LIBRESSL_VERSION}.tar.gz" + cd "libressl-${LIBRESSL_VERSION}/" + ./configure --prefix="${OPENSSL_INSTALL_DIR}" + make -j $(nproc || sysctl -n hw.ncpu || echo 4) all + make install + echo "${LIBRESSL_VERSION}" > "${OPENSSL_INSTALL_DIR}/.openssl-version" + fi +} + +download_libressl +build_libressl diff --git a/.ci/build-openssl.sh b/.ci/build-openssl.sh index f9a42e30..e483f778 100755 --- a/.ci/build-openssl.sh +++ b/.ci/build-openssl.sh @@ -12,8 +12,9 @@ build_openssl () { if [[ "$(cat ${OPENSSL_INSTALL_DIR}/.openssl-version)" != "${OPENSSL_VERSION}" ]]; then tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" cd "openssl-${OPENSSL_VERSION}/" - ./config shared --prefix="${OPENSSL_INSTALL_DIR}" --openssldir="${OPENSSL_INSTALL_DIR}" -DPURIFY - make all install_sw + ./config shared no-deprecated --prefix="${OPENSSL_INSTALL_DIR}" --openssldir="${OPENSSL_INSTALL_DIR}" -DPURIFY + make -j $(nproc || sysctl -n hw.ncpu || echo 4) all + make install_sw echo "${OPENSSL_VERSION}" > "${OPENSSL_INSTALL_DIR}/.openssl-version" fi } diff --git a/.ci/memory-leak-test.sh b/.ci/memory-leak-test.sh new file mode 100755 index 00000000..dd1bce14 --- /dev/null +++ b/.ci/memory-leak-test.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +set -eux + +echo -n | ./build/vpntest s | grep -Fq 'NO MEMORY LEAKS' +echo -n | ./build/vpntest c | grep -Fq 'NO MEMORY LEAKS' +echo -n | ./build/vpntest b | grep -Fq 'NO MEMORY LEAKS' diff --git a/.ci/run-openvpn-tests.sh b/.ci/run-openvpn-tests.sh new file mode 100755 index 00000000..334841cf --- /dev/null +++ b/.ci/run-openvpn-tests.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -eux + +cd +git clone https://github.com/openvpn/openvpn +cd openvpn +autoreconf -iv +./configure > build.log 2>&1 || (cat build.log && exit 1) +make > build.log 2>&1 || (cat build.log && exit 1) + +echo test > /tmp/auth.txt +echo test >> /tmp/auth.txt + +CONFIG=`ls /tmp/*l3*ovpn` + +cat << EOF > tests/t_client.rc +CA_CERT=fake +TEST_RUN_LIST="1 2" + +OPENVPN_BASE="--remote 127.0.0.1 --config $CONFIG --auth-user-pass /tmp/auth.txt" + +RUN_TITLE_1="testing udp/ipv4" +OPENVPN_CONF_1="--dev null --proto udp --port 1194 \$OPENVPN_BASE" + +RUN_TITLE_2="testing tcp/ipv4" +OPENVPN_CONF_2="--dev null --proto tcp --port 1194 \$OPENVPN_BASE" +EOF + +make test_scripts=t_client.sh check diff --git a/.ci/sonarcloud.sh b/.ci/sonarcloud.sh new file mode 100755 index 00000000..fe4c673b --- /dev/null +++ b/.ci/sonarcloud.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -eu + +RUN_SONARCLOUD="${RUN_SONARCLOUD:-0}" + +if [ "${RUN_SONARCLOUD}" = "1" ] && [ ! -z ${SONAR_TOKEN+x} ]; then + ./configure + build-wrapper-linux-x86-64 --out-dir bw-output make -C tmp + sonar-scanner -Dsonar.projectKey=SoftEtherVPN_SoftEtherVPN -Dsonar.organization=softethervpn -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bw-output -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN} +else + echo "Skipping sonar-scan because \$RUN_SONARCLOUD != \"1\" or \$SONAR_TOKEN is not set" +fi diff --git a/.ci/start-se-openvpn.sh b/.ci/start-se-openvpn.sh new file mode 100755 index 00000000..afd32939 --- /dev/null +++ b/.ci/start-se-openvpn.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -eux + +build/vpnserver start + +build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:SecureNatEnable +build/vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnEnable yes /PORTS:1194" +build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserCreate test /GROUP:none /REALNAME:none /NOTE:none" +build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserPasswordSet test /PASSWORD:test" +build/vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnMakeConfig ~/my_openvpn_config.zip" + +unzip -d /tmp ~/my_openvpn_config.zip diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 00000000..d5ee3c17 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,12 @@ +FreeBSD_task: + freebsd_instance: + image: freebsd-12-0-release-amd64 + env: + ASSUME_ALWAYS_YES: TRUE # required for unattanded "pkg" invocation + install_script: + - pkg install cmake gmake openssl111 git + - git submodule update --init --recursive + script: + - ./configure + - gmake -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp + - ldd build/vpnserver diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8343bc06..5711538a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,17 +3,3 @@ Changes proposed in this pull request: - - -Your great patch is much appreciated. We are considering to apply your patch into the SoftEther VPN main tree. - -SoftEther VPN Patch Acceptance Policy: -http://www.softether.org/5-download/src/9.patch - -You have two options which are described on the above policy. -Could you please choose either option 1 or 2, and specify it clearly on the reply? - -- - -PRELIMINARY DECLARATION FOR FUTURE SWITCH TO A NON-GPL LICENSE - -I hereby agree in advance that my work will be licensed automatically under the Apache License or a similar BSD/MIT-like open-source license in case the SoftEther VPN Project adopts such a license in future. - diff --git a/.gitignore b/.gitignore index 0ebcf69b..5f95d32f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,13 @@ .project .settings/ Makefile -bin/ +/src/bin/* +!/src/bin/hamcore/ +/src/bin/hamcore/* +!/src/bin/hamcore/wwwroot/ build/ cmake-build-debug/ +src/bin/hamcore/authors.txt src/bin/BuiltHamcoreFiles/ tmp/ .gitconfig @@ -14,8 +18,18 @@ CMakeFiles/ output/ Win32_Release x64_Release +Win32_Debug +x64_Debug /src/DebugFiles /src/BuildUtil/obj/ +/src/vpnweb/vpnweb.h +/src/vpnweb/vpnweb_i.c +/src/vpnweb/vpnweb_p.c +*.user +*.ncb +*.opt +*.suo +!/src/BuildFiles/**/* # Applied for 'developer_tools/stbchecker/' # Copied from by https://www.gitignore.io/api/visualstudio @@ -193,4 +207,5 @@ developer_tools/stbchecker/**/OpenCover/ developer_tools/stbchecker/**/ASALocalRun/ developer_tools/stbchecker/**/*.binlog developer_tools/stbchecker/**/*.nvuser -developer_tools/stbchecker/**/.mfractor/ \ No newline at end of file +developer_tools/stbchecker/**/.mfractor/ + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a41cf4f7..38df00fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,12 @@ .ubuntu: &ubuntu_def variables: - CMAKE_VERSION: 3.12.1 + CMAKE_VERSION: 3.9.6 + except: + changes: + - .appveyor.yml + - .travis.yml + - .azure-pipelines.yml + - .cirrus.yml before_script: - REPOSITORY="$PWD" && cd .. - apt-get update && apt-get install -y dpkg-dev wget g++ gcc libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev git file @@ -10,24 +16,45 @@ script: - ./configure - make package -C tmp - -bionic: - <<: *ubuntu_def - image: ubuntu:bionic - -xenial: - <<: *ubuntu_def - image: ubuntu:xenial + - dpkg -i build/softether-vpn*.deb + - .ci/memory-leak-test.sh trusty: <<: *ubuntu_def image: ubuntu:trusty -# -# there's no cmake3 for 12.04 -# maybe, there's ppa ? -# -#precise: -# <<: *ubuntu_def -# image: ubuntu:precise +precise: + <<: *ubuntu_def + image: ubuntu:precise +# illumos gitlab-runner maintained by @hww3 +build_illumos: + only: + - master@SoftEther/SoftEtherVPN + tags: + - illumos + script: + - git submodule init && git submodule update + - CMAKE_FLAGS="-DCMAKE_PREFIX_PATH=/opt/local -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_C_FLAGS=-m64" ./configure + - gmake -C tmp + +# +# flawfinder +# see https://docs.gitlab.com/ee/user/project/merge_requests/sast.html +# +sast: + image: docker:stable + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') + - docker run + --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" + --volume "$PWD:/code" + --volume /var/run/docker.sock:/var/run/docker.sock + "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code + artifacts: + paths: [gl-sast-report.json] diff --git a/.gitmodules b/.gitmodules index f5a46fc3..a1d1ce78 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ -[submodule "src/Mayaqua/cpu_features"] - path = src/Mayaqua/cpu_features +[submodule "src/Mayaqua/3rdparty/cpu_features"] + path = src/Mayaqua/3rdparty/cpu_features url = https://github.com/google/cpu_features.git +[submodule "src/Mayaqua/3rdparty/zlib"] + path = src/Mayaqua/3rdparty/zlib + url = https://github.com/madler/zlib.git diff --git a/.travis.yml b/.travis.yml index 5cc786c8..5f72094c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ sudo: required +dist: xenial language: c @@ -6,64 +7,57 @@ env: global: - OPENSSL_INSTALL_DIR="${HOME}/opt" +addons: + sonarcloud: + organization: "softethervpn" + matrix: include: - - env: OPENSSL_VERSION="1.0.2o" BUILD_DEB="1" + - env: OPENSSL_VERSION="1.0.2s" BUILD_DEB="1" os: linux compiler: gcc - - env: OPENSSL_VERSION="1.1.0f" + - env: RUN_SONARCLOUD=1 OPENSSL_VERSION="1.1.1c" os: linux compiler: gcc - - env: OPENSSL_VERSION="1.0.2o" RUN_COVERITY="1" + - env: OPENSSL_VERSION="1.1.1c" LABEL="linux-ppc64le" CMAKE_VERSION="3.9.6" + os: linux-ppc64le + compiler: gcc + install: + - wget https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz && tar -xzf cmake-${CMAKE_VERSION}.tar.gz + - cd cmake-${CMAKE_VERSION} + - ./bootstrap > build-deps.log 2>&1 || (cat build-deps.log && exit 1) + - sudo make install > build-deps.log 2>&1 || (cat build-deps.log && exit 1) + - cd .. + - env: OPENSSL_VERSION="1.0.2s" RUN_COVERITY="1" os: linux compiler: clang - - env: OPENSSL_VERSION="1.1.0f" + - env: OPENSSL_VERSION="1.1.1c" os: linux compiler: clang + - env: LIBRESSL_VERSION="2.9.2" + os: linux + compiler: gcc + before_install: + - bash .ci/build-libressl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1) - env: LABEL="check stb files" os: linux language: csharp mono: none - dotnet: 2.1.300 + dotnet: 2.2.203 before_install: - true - before_script: - - true script: - cd developer_tools/stbchecker - dotnet run ../../src/bin/hamcore - - env: LABEL="create release from tag" - os: linux - deploy: - provider: releases - api_key: ${GITHUB_OAUTH_TOKEN} - file: se.tar.gz - skip_cleanup: true - on: - tags: true - repo: SoftEtherVPN/SoftEtherVPN - before_install: - - true - before_script: - - if [ -z "$TRAVIS_TAG" ]; then exit 0; fi - script: - - true - os: osx compiler: clang - cache: - directories: - - ${HOME}/Library/Caches/Homebrew before_install: - - brew update && brew upgrade + - true script: - ./configure - make -C tmp - - otool -L build/vpnserver/vpnserver - - sudo make -C tmp install - -addons: - apt: - packages: [ debhelper, devscripts, fakeroot, cmake3, dh-exec ] + - otool -L build/vpnserver + - .ci/memory-leak-test.sh cache: directories: @@ -73,16 +67,16 @@ cache: before_install: - bash .ci/build-openssl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1) -before_script: - - .ci/coverity.sh - script: - export OPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR} - export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}" - export CFLAGS="-I${HOME}/opt/include" - export LDFLAGS="-L${HOME}/opt/lib" + - echo "check_certificate = off" > ~/.wgetrc + - .ci/coverity.sh + - .ci/sonarcloud.sh - ./configure - - make -C tmp - - ldd build/vpnserver/vpnserver - - sudo LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}" make -C tmp install + - make -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp + - ldd build/vpnserver - if [ "${BUILD_DEB}" = "1" ]; then make package -C tmp; fi + - .ci/memory-leak-test.sh diff --git a/AUTHORS.TXT b/AUTHORS.TXT index be57c96a..ca4088ad 100644 --- a/AUTHORS.TXT +++ b/AUTHORS.TXT @@ -35,97 +35,7 @@ WEB-SITE DESIGNER: College of Information Science, University of Tsukuba -CONTRIBUTORS on GitHub: - - - Melvyn - https://github.com/yaurthek - - - nattoheaven - https://github.com/nattoheaven - - - ELIN - https://github.com/el1n - - - Dmitry Orlov - https://github.com/mosquito - - - Renaud Allard - https://github.com/renaudallard - - - Hideki Saito - https://github.com/hsaito - - - Dexter Ang - https://github.com/thepoch - - - YF - https://github.com/yfdyh000 - - - Sahal Ansari - https://github.com/sahal - - - ygrek - https://github.com/ygrek - - - ajee cai - https://github.com/ajeecai - - - NOKUBI Takatsugu - https://github.com/knok - - - Den Lesnov - https://github.com/Leden - - - Ilya Shipitsin - https://github.com/chipitsine - - - Matt Lewandowsky - https://github.com/lewellyn - - - Raymond Tau - https://github.com/rtau - - - Luiz Eduardo Gava - https://github.com/LegDog - - - Charles Surett - https://github.com/scj643 - - - Jeff Tang - https://github.com/mrjefftang - - - Victor Salgado - https://github.com/mcsalgado - - - micsell - https://github.com/micsell - - - yehorov - https://github.com/yehorov - - - dglushenok - https://github.com/dglushenok - - - NoNameA 774 - https://github.com/nna774 - - - Alexandre De Oliveira - https://github.com/yodresh - - - Bernhard Rosenkraenzer - https://github.com/berolinux - - - Sacha Bernstein - https://github.com/sacha - - - cm0x4D - https://github.com/cm0x4D - - - DDGo - https://github.com/DDGo - - - Noah O'Donoghue - https://github.com/NoahO +DEVELOPMENT BOARD MEMBERS: - Moataz Elmasry https://github.com/moatazelmasry2 @@ -133,64 +43,91 @@ CONTRIBUTORS on GitHub: - Zulyandri Zardi https://github.com/zulzardi - - rel22 - https://github.com/rel22 - - - Guanzhong Chen - https://github.com/quantum5 - - - Nguyễn Hồng Quân - https://github.com/hongquan - - - macvk - https://github.com/macvk - - - Guido Vranken - https://github.com/guidovranken - - - Maks Naumov - https://github.com/maksqwe - - - nvsofts - https://github.com/nvsofts - - - Quintin Beukes - https://github.com/qbeukes - - - Diego Schulz - https://github.com/dschulz - - - Holoreimu - https://github.com/holoreimu - - - Ryoga - https://github.com/proelbtn - - - parly - https://github.com/parly - - - Alexey Kryuchkov - https://github.com/a-kr + - Alex Maslakov + https://github.com/GildedHonour - Davide Beatrici https://github.com/davidebeatrici - - tidatida - https://github.com/tidatida + - Ilya Shipitsin + https://github.com/chipitsine - - Tim Schneider - https://github.com/timschneider - - Max Miroshnikov - https://github.com/mogikanin +SPECIAL CONTRIBUTORS: - - Josh Soref - https://github.com/jsoref + - Guido Vranken + https://github.com/guidovranken + + +CONTRIBUTORS: + + - ajeecai + - Alexandre De Oliveira + - Alexey Kryuchkov + - Allen Cui + - Andy Walsh + - Bernhard Rosenkränzer + - Bill Welliver + - Charles Surett + - cm0x4d + - DDGo + - Denis Lesnov + - Den Lesnov + - Dexter Ang + - Dmitry Glushenok + - Dmitry Orlov + - ELIN + - Guanzhong Chen + - Hideki Saito + - holoreimu + - Holoreimu + - hoppler + - Igor Pikovets + - James Brink + - Jeff Tang + - Jioh L. Jung + - Johan de Vries + - Josh Soref + - Joshua Perry + - Luiz Eduardo Gava + - macvk + - Maks Naumov + - Matt Lewandowsky + - Max Miroshnikov + - Melvyn + - Michael B + - Michael Clausen + - Michael Clausen + - Mike Selivanov + - Mikhail Pridushchenko + - mogikanin + - Mykhaylo Yehorov + - nattoheaven + - Nguyễn Hồng Quân + - Noah O'Donoghue + - NOKUBI Takatsugu + - NoNameA 774 + - Norbert Preining + - NV + - Olimjon + - parly + - Quantum + - Quintin + - Raymond Tau + - rel22 + - Renaud Allard + - root + - Sacha J Bernstein + - Sahal Ansari + - Shadus Black + - thepyper + - Tim Schneider + - tonychung00 + - Victor Salgado + - William Welliver + - YF - - Norbert Preining - https://github.com/norbusan - JOIN THE SOFTETHER VPN DEVELOPMENT ---------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index ad91029f..2ce66a3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,41 +1,91 @@ cmake_minimum_required(VERSION 3.7) -project(SoftEtherVPN - VERSION 5.01.9657 +project("SoftEther VPN" + VERSION 5.01.9671 LANGUAGES C ) -set(default_build_type "Release") +set(TOP_DIRECTORY ${CMAKE_SOURCE_DIR}) +set(BUILD_DIRECTORY ${TOP_DIRECTORY}/build) + +# We define a dedicated variable because CMAKE_BUILD_TYPE can have different +# configurations than "Debug" and "Release", such as "RelWithDebInfo". +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(BUILD_TYPE "Debug") +else() + set(BUILD_TYPE "Release") +endif() # Check that submodules are present only if source was downloaded with git -if(EXISTS "${SoftEtherVPN_SOURCE_DIR}/.git" AND NOT EXISTS "${SoftEtherVPN_SOURCE_DIR}/src/Mayaqua/cpu_features/CMakeLists.txt") +if(EXISTS "${TOP_DIRECTORY}/.git" AND NOT EXISTS "${TOP_DIRECTORY}/src/Mayaqua/3rdparty/cpu_features/CMakeLists.txt") message (FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive") endif() -set(BUILD_DIRECTORY ${SoftEtherVPN_SOURCE_DIR}/build) +# Compare ${PROJECT_VERSION} and src/CurrentBuild.txt +file(READ ${TOP_DIRECTORY}/src/CurrentBuild.txt CurrentBuild) + +string(REGEX MATCH "VERSION_MAJOR ([0-9]+)" temp ${CurrentBuild}) +string(REGEX REPLACE "VERSION_MAJOR ([0-9]+)" "\\1" CurrentBuild_MAJOR ${temp}) +string(REGEX MATCH "VERSION_MINOR ([0-9]+)" temp ${CurrentBuild}) +string(REGEX REPLACE "VERSION_MINOR ([0-9]+)" "\\1" CurrentBuild_MINOR ${temp}) +string(REGEX MATCH "VERSION_BUILD ([0-9]+)" temp ${CurrentBuild}) +string(REGEX REPLACE "VERSION_BUILD ([0-9]+)" "\\1" CurrentBuild_BUILD ${temp}) + +if(NOT ${PROJECT_VERSION} VERSION_EQUAL "${CurrentBuild_MAJOR}.${CurrentBuild_MINOR}.${CurrentBuild_BUILD}") + message (FATAL_ERROR "PROJECT_VERSION does not match to src/CurrentBuild.txt") +endif() + +if(UNIX) + include(GNUInstallDirs) + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + + include(CheckIncludeFile) + Check_Include_File(sys/auxv.h HAVE_SYS_AUXV) +endif() + +configure_file("${TOP_DIRECTORY}/AUTHORS.TXT" "${TOP_DIRECTORY}/src/bin/hamcore/authors.txt" COPYONLY) + +# Date and time +string(TIMESTAMP DATE_DAY "%d" UTC) +string(TIMESTAMP DATE_MONTH "%m" UTC) +string(TIMESTAMP DATE_YEAR "%Y" UTC) +string(TIMESTAMP TIME_HOUR "%H" UTC) +string(TIMESTAMP TIME_MINUTE "%M" UTC) +string(TIMESTAMP TIME_SECOND "%S" UTC) + +message(STATUS "Build date: ${DATE_DAY}/${DATE_MONTH}/${DATE_YEAR}") +message(STATUS "Build time: ${TIME_HOUR}:${TIME_MINUTE}:${TIME_SECOND}") + +set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) add_subdirectory(src) -# Packaging -set(CPACK_COMPONENTS_ALL vpnserver vpnclient vpnbridge vpncmd) -set(CPACK_PACKAGE_DIRECTORY ${BUILD_DIRECTORY}) -set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) -set(CPACK_PACKAGE_VENDOR "SoftEther") -set(CPACK_PACKAGE_NAME "softether") -set(CPACK_PACKAGE_DESCRIPTION_FILE "${SoftEtherVPN_SOURCE_DIR}/description") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SoftEther VPN is an open-source cross-platform multi-protocol VPN program, created as an academic project in the University of Tsukuba.") +if(UNIX) + # Packaging + set(CPACK_COMPONENTS_ALL common vpnserver vpnclient vpnbridge vpncmd) + set(CPACK_PACKAGE_DIRECTORY ${BUILD_DIRECTORY}) + set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) + set(CPACK_PACKAGE_VENDOR "SoftEther") + set(CPACK_PACKAGE_NAME "softether") + set(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_DIRECTORY}/description") + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SoftEther VPN is an open-source cross-platform multi-protocol VPN program, created as an academic project in the University of Tsukuba.") -# DEB -set(CPACK_DEB_COMPONENT_INSTALL ON) -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -set(CPACK_DEBIAN_PACKAGE_SECTION "net") -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Unknown") + # DEB + if(BUILD_TYPE STREQUAL "Debug") + set(CPACK_DEBIAN_PACKAGE_DEBUG ON) + endif() -# RPM -set(CPACK_RPM_COMPONENT_INSTALL ON) -set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet") -set(CPACK_RPM_PACKAGE_LICENSE "GPLv2") + set(CPACK_DEB_COMPONENT_INSTALL ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") + set(CPACK_DEBIAN_PACKAGE_SECTION "net") + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Unknown") -include(CPack) + # RPM + set(CPACK_RPM_COMPONENT_INSTALL ON) + set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") + set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet") + set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") + + include(CPack) +endif() diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 17610a2d..00000000 --- a/ChangeLog +++ /dev/null @@ -1,372 +0,0 @@ -SoftEther VPN 5.1 (February 14, 2018) -Use the new agreed versioning pattern, where we use 5.x for the unstable version and slowely drop the incremental number -Add the Alternative subject name field on the new X.509 certificate creation. PR #421 -Fix a bug in the Win32EnumDirExW() function. PR #420 -remove unused functions (identified by cppcheck). PR #440 -Allow specifying cipher suites instead of single ciphers. PR #343 -Add parameter "ListenIP" to server configuration (vpn_server.config). PR #202 -cppcheck findings. PR #275 -Add DhParamBits configuration to set Diffie-Hellman parameters. PR #129 -Fix log msg for IKE with aggressive exchange mode. PR #425 -Fixes 11 vulnerabilities found by Max Planck Institute for Molecular Genetics and Mr. Guido Vranken. PR #419 -Fixed the bug which occurs the L2TP/IPsec connection error with Android Oreo, etc. PR #405 -build documentation refactoring. PR #395 -initial travis-ci support feature. PR #348 -Reformat README. Add compile requirements. PR #379 -Fix: vpncmd thinks that "hamcore.se2" is missing or broken. PR #339 -fix aarch64 build. PR #281 -Initial Commit of gitignore. PR #380 - -SoftEther VPN 4.23 Build 9647 Beta (October 18, 2017) -Upgraded OpenSSL to 1.0.2l. -Source code is now compatible with OpenSSL 1.1.x. Supports DHE-RSA-CHACHA 20-POLY 1305 and ECDHE-RSA-CHACHA 20-POLY 1305, which are new encryption methods of TLS 1.2. (In order to use this new function, you need to recompile yourself using OpenSSL 1.1.x.) -TrafficServer / TrafficClient function (The traffic throughput measurement function) is now multithreaded and compatible with about 10 Gbps using NIC with the RSS feature. -Changed the default algorithm for SSL from RC4-MD5 to AES128-SHA. -Fixed a bug that occur wrong checksum recalculation in special case of the TCP-MSS clamp processing. -Fixed the calculation interval of update interval of DHCP client packet issued by kernel mode virtual NAT function of SecureNAT function. -Driver upgrade and DLL name change with Crypto ID support of USB security token. -Fixed a problem that CPU sleep processing was not performed when the wait time of the Select () function was INFINITE on Mac OS X. -Added the StrictSyslogDatetimeFormat flag onto the ServerConfiguration section on the VPN Server configuration file, which sets Syslog date format to RFC3164. -Fixed wrong English in the UI. -Using client parameter in function CtConnect -Remove blank line at the start from init file (Debian) -Stop Radius Delay from counting to next_resend -Add DH groups 2048,3072,4096 to IPSec_IKE -Add HMAC SHA2-256, HMAC SHA2-384, HMAC SHA2-512 support -Openvpn extend ciphers -Fixed RSA key bits wrong calculation for certain x509 certificate -Added support for RuToken USB key PKCS#11 -OpenSSL 1.1 Port - -SoftEther VPN 4.22 Build 9634 Beta (November 27, 2016) -Added the support for TLS 1.2. Added TLS 1.2-based cipher sets: AES128-GCM-SHA256, AES128-SHA256, AES256-GCM-SHA384, AES256-SHA256, DHE-RSA-AES128-GCM-SHA256, DHE-RSA-AES128-SHA256, DHE-RSA-AES256-GCM-SHA384, DHE-RSA-AES256-SHA256, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-GCM-SHA384 and ECDHE-RSA-AES256-SHA384. -Added the function to allow to configure specific TLS versions to accept / deny. In the VPN Server configuration file you can set Tls_Disable1_0, Tls_Disable1_1 and Tls_Disable1_2 flags to true to disable these TLS versions individually. -Added the support for TLS 1.2 on the OpenVPN protocol. -Updated the version of OpenSSL to 1.0.2j. -Added the support for Windows Server 2016. -Fixed the 2038-year problem. -Added the support for recording HTTPS destination hostnames, using SNI attributes, on the packet logging function. -Added the function to append the name of Virtual Hub into the "Called-Station-ID (30)" attribute value in the RADIUS authentication request packet. -Improved the behavior of Virtual Layer-3 switches. The interval of ARP request is set to 1 second. -Fixed the problem of the slow startup of VPN Server in Windows 10. -Added the support for 4096 bits RSA authentication with smart cards. -Added the support for the CryptoID USB token. -Fixed the UI string resource in English. -Fix that ParseTcpOption doesn't work correctly -Add LSB header -Support Debian package build on aarch64 architecture -Support Debian package build on ARMv7l architecture -cppcheck issues -Default to TLS connections only -Allow specific SSL/TLS versions to be disabled -Adding Radius AVP Called-Station-Id -Fixed typo -Update CentOS makefiles and spec file -Systemd service configuration files for SoftEther -Fix set initialization, set.OnlyCapsuleModeIsInvalid could be garbage -Fixed OSX CPU utilization by replacing broken kevent () with select () -Add the possibility to send the Virtual Hub Name to an external DHCP server -Added armv5tel for debian/rules and made pushed routes work correct with OpenVPN -fix LogFileGet won't save to SAVEPATH -Fix for Debian Package -Try to autodetect OS and CPU instead of requiring user input -Support For Radius Realm - -SoftEther VPN 4.21 Build 9613 Beta (April 24, 2016) -Added SoftEther VPN Server Manager for Mac OS X. -Now you can manage your SoftEther VPN Server, running remotely, from your Mac in local. - -SoftEther VPN 4.20 Build 9608 RTM (April 18, 2016) -All cumulative updates below are included. -Fixed a minor English typo. - -SoftEther VPN 4.19 Build 9605 Beta (March 3, 2016) -The version of OpenSSL is updated to 1.0.2g to fix the vulnerability which was published in March 2016. SSLv2 is now disabled completely. -Fixed a multi-byte character problem in the certificate generating tool. -Enable the cache of the destination IP address of the additional TCP connection for a VPN session. - -SoftEther VPN 4.19 Build 9599 Beta (October 19, 2015) -Fixed the problem that an unnecessary "Insert disk" dialog box appears when installing VPN Server or VPN Bridge on Windows 10. -Added the "/NOHUP" parameter in the "TrafficServer" command of vpncmd. -Added the "/REDIRECTURL" parameter in some access list commands of vpncmd. -Added the virtual address check routines in kernel-mode drivers to prevent blue screen or invalid memory access. Previous versions of kernel-mode drivers did not check the virtual addresses from the user-mode. (NOTE: All kernel-mode drivers are protected by ACL to avoid privilege escalation in all previous versions. Only users with Administrator privileges were able to cause blue screen or invalid memory access by passing invalid addresses from the user-mode. Therefore this was not a security flaw.) Appreciate Meysam Firozi's contribution to report the similar problem in the Win10Pcap driver. - -SoftEther VPN 4.19 Build 9582 Beta (October 6, 2015) -Dramatically improvement of the performance of the Virtual NAT function of SecureNAT in Linux. In the previous versions of SoftEther VPN, the SecureNAT performance was very slow in the specific situation that the Linux Virtual Machine (VM) is running with virtual Ethernet interfaces which are prohibited to enable the promiscuous mode (this problem has been frequently appeared on cloud servers such like Amazon EC2/AWS or Windows Azure). In such a situation, SecureNAT must use the user-mode TCP/IP stack simulation and it was very slow and had high latency. This version of SoftEther VPN Server adds the new "RAW IP Mode" in the SecureNAT function. The RAW IP Mode is enabled by default, and is effective only if the VPN Server process is running in the root privileges. In the RAW IP Mode, the SecureNAT function realizes to transmit and receive TCP, UDP and ICMP packets which headers are modified. This behavior realizes drastically improved performance than legacy user-mode SecureNAT in the previous versions. In order to avoid the misunderstanding of receiving packets which are towards to the Virtual NAT function, some packet filter rules are automatically added to the iptables chain list. You can disable the RAW IP Mode by setting the "DisableIpRawModeSecureNAT" value to "1" on the Virtual Hub Extending Options. - -Improved the performance of the Kernel-mode SecureNAT. - -Improved the stability of the L2TP VPN sessions on the network with heavy packet-losses. - -Added the compatibility with Cisco 800 series routers (e.g. Cisco 841M) on the L2TPv3 over IPsec protocol. These new Cisco routers have modified L2TPv3 header interpreter. Therefore SoftEther VPN Server needed to add new codes to support these new Cisco routers. - -Added the support the compatibility to YAMAHA RTX series routers on the L2TPv3 over IPsec protocol. - -Added the support for EAP and PEAP. SoftEther VPN Server can now speak RFC3579 (EAP) or Protected EAP (PEAP) to request user authentications to the RADIUS server with the MS-CHAPv2 mechanism. If this function is enabled, all requests from L2TP VPN clients which contain MS-CHAPv2 authentication data will be converted automatically to EAP or PEAP when it is transferred to the RADIUS server. You must enable this function manually for each of Virtual Hubs. To enable the function converting from MS-CHAPv2 to EAP, set the "RadiusConvertAllMsChapv2AuthRequestToEap" value to "true" in the vpn_server.config. To enable the function converting from MS-CHAPv2 to PEAP, set both "RadiusConvertAllMsChapv2AuthRequestToEap" and "RadiusUsePeapInsteadOfEap" options to "true". - -SoftEther VPN 4.19 Build 9578 Beta (September 15, 2015) -Solved the problem that kernel mode drivers do not pass the general tests of "Driver Verifier Manager" in Windows 10. - -SoftEther VPN 4.18 Build 9570 RTM (July 26, 2015) -Compatible with Windows 10. -Solved the problem that the customized language setting on the "lang.config" file. -config sometimes corrupts in the rare condition. - -SoftEther VPN 4.17 Build 9566 Beta (July 16, 2015) -Improved stability with Windows 10 Beta. -Updated the OpenSSL library to 1.0.2d. - -SoftEther VPN 4.17 Build 9562 Beta (May 30, 2015) -Added supports for Windows 10 Technical Preview Build 10130. -Increased the maximum Ethernet frame size from 1560 bytes to 1600 bytes. -Fixed the compiler error while building the source code of SoftEther VPN on Windows. -Added memory tags on the memory allocation function calls in kernel-mode device drivers. -Fixed the freeze problem of the VPN Client that the computer enters to suspend or hibernation state while the VPN Client is connected to the VPN Server. -Windows-version executable and driver files are now signed by the SHA-256 digital code-sign certificate. - -SoftEther VPN 4.15 Build 9546 Beta (April 5, 2015) -Fixed the problem that the Local Bridge function does not work correctly on Windows 10 Technical Preview Build 10049. - -SoftEther VPN 4.15 Build 9539 Beta (April 4, 2015) -Add the code to instruct the VPN Client to disconnect the VPN session automatically when Windows is being suspending or hibernating. - -SoftEther VPN 4.15 Build 9538 Beta (March 27, 2015) -Fixed the dialog-box size problem on Windows 10 Technical Preview Build 10041. - -SoftEther VPN 4.15 Build 9537 Beta (March 26, 2015) -Upgraded built-in OpenSSL from 0.9.8za to 1.0.2a. Please note that this change has not been well-tested. This upgrading of OpenSSL might cause problems. In that case, please post the bug report. - -SoftEther VPN 4.14 Build 9529 Beta (February 2, 2015) -We are very sorry. The previous version 4.13 (beta) has a problem to accept L2TP connections due to the session-state quota-limitation code by the minor change between Build 9514 and 9524. The problem is fixed on this build. Please update to this build if you are facing to the L2TP problem on version 4.13. -Added the function to record underlying source IP addresses of VPN clients on every packet log lines. This function can be disabled by set the "NoPhysicalIPOnPacketLog" flag in the Virtual Hub Extended Option to "1". - -SoftEther VPN 4.13 Build 9524 Beta (January 31, 2015) -Modified the behavior of the Local Bridge function in the VPN Server on Linux. In the previous versions, if several Local Bridge creation operations will be made, then the operations to disable the offloading function on the target Ethernet devices will be conducted as many as same. After this version, the operation to disable the offloading function will be called only once for each device if several Local Bridge creation operations will be made on the same Ethernet device. -Added the "SecureNAT_RandomizeAssignIp" Virtual Hub Extended Option. If you set this option to non-zero value, then the Virtual DHCP Server of the SecureNAT function will choose an unused IP address randomly from the DHCP pool while the default behavior is to choose the first unused IP address. -Added the "DetectDormantSessionInterval" Virtual Hub Extended Option. If you set this option to non-zero value, then the Virtual Hub will treat the VPN sessions, which have transmitted no packets for the last specified intervals (in seconds), as Dormant Sessions. The Virtual Hub will not flood packets, which should be flood, to any Dormant Sessions. -Added the implementation of the SHA () function in the source code. This made the building process easier on the low-memory embedded hardware which has its OpenSSL implementation without the SHA () function. -Improved the behavior on Windows 10 Technical Preview to show the OS version information correctly. - -SoftEther VPN 4.12 Build 9514 Beta (November 17, 2014) -Added the VLAN ID dynamic assignment function by RADIUS. It is very useful when the layer-2 Ethernet segment with aggregated IEEE802.1Q tagged VLANs is bridged to your Virtual Hub. Each VPN session will be assigned its own VLAN ID by the RADIUS attribute value when the user is authenticated by the external RADIUS server unless the user object has a VLAN ID security policy. The RADIUS attribute with the name "Tunnel-Pvt-Group-ID" (ID = 81) will be used as the VLAN ID. The data type must be STRING. This function is disabled by default. You have to set the "AssignVLanIdByRadiusAttribute" value to "1" in the Virtual Hub Extended Options in advance. -Added the OpenVPNDefaultClientOption option in the vpn_server.config. The specified option string will be used alternatively when the connecting OpenVPN Client does not provide the connection string. Some incomplete OpenVPN Clients with the --enable-small compiling option always forget to specify this connection string. This option can make VPN Server allow such OpenVPN Clients. -Improved the DHCP option parser to allow the external DHCP server pushes the classless routing table which exceeds 255 bytes. -Added the support for "hair-pin connection" on the NAT Traversal function. -Fixed the performance problem when the server computer has the wrong resolv.conf setting file on Linux. -Fixed the VPN Client configuration backup folder name which the setup wizard automatically creates. -Fixed the UDP checksum value of the beacon packets which are sent by the Virtual Layer 3 Switch function. - -SoftEther VPN 4.11 Build 9506 Beta (October 22, 2014) -As a response to the SSLv3 POODLE problem we added the "AcceptOnlyTls" configuration flag on the vpn_server.config for SoftEther VPN Server. Please set this flag is you want to completely disable the SSLv3 function in SoftEther VPN Server. -Added the perfect forward security (PFS) support on SSL/TLS. SoftEther VPN Server can now accept connections with DHE-RSA-AES128-SHA or DHE-RSA-AES256-SHA ciphers. - -SoftEther VPN 4.10 Build 9505 Beta (October 3, 2014) -Implemented the hash table algorithm for the MAC address database of Virtual Hubs. It improves the performance when there are a large number of MAC addresses registered on the database. -Improved the performance on slow-CPU hardware (e.g. embedded Linux boxes). -Added the DoNotDisableOffloading flag on Local Bridge settings. This flag will disable the automated disabling operation for hardware offloading on the specified Ethernet interface on Linux. -Supports the kernel-supported IEEE802.1Q tagged VLAN on Windows and Linux. It will enable tagged-VLAN support on the Local Bridge function with some specific network interface drivers. -Added the FloodingSendQueueBufferQuota option. -Sets the lower priority value on the oom_adj process parameter for Linux. -Randomized the reconnection interval in Cascade Connection. -Increased the memory usage limit on 64-bit systems. -Modified the behavior of the ConfigGet command and the /CSV option in vpncmd for Windows to work around for the Windows console API bug. -Added the DisableSessionReconnect option on VPN Server and VPN Bridge. It makes Cascade Connection client sessions to disconnect immediately from the destination VPN Server when the based TCP connection is disconnected. -Makes it enable to use the PrivacyFilterMode security policy on Cascade server VPN sessions. -Added the GlobalParams configuration option on VPN Server and VPN Bridge. It allows administrators to modify and optimize the performance parameters of VPN Server and VPN Bridge. -Reduced the processor time of looking up the ACL entries when storing and forwarding packets across a Virtual Hub. -Reduced the usage of the memory on embedded Linux environments. -Fixed a minor bug on the GUI setting screen of the SecureNAT routing table pushing option. -Added the ServerLogSwitchType and the LoggerMaxLogSize option on VPN Server and VPN Bridge. They can change the logging behavior of VPN Server and VPN Bridge. -Implemented the config template file. The template filename is "vpn_server_template.config" for VPN Server, and "vpn_server_template.config" for VPN Bridge. The VPN Server and VPN Bridge loads the template file as the initial configuration state when the configuration file does not exists. - -SoftEther VPN 4.10 Build 9473 Beta (July 12, 2014) -Added the "SuppressClientUpdateNotification" option in the Virtual Hub Extended Option list. This option will push the flag to the VPN Client to suppress the update notification screen on the VPN Client manager. To push this flag, set "1" to the "SuppressClientUpdateNotification" option in your Virtual Hub. -Added the warning message when the background service process is run by a non-root user (only in UNIX). -Fixed the deadlock bug when UNIX versions of SoftEther VPN Server process is shutting down. -Added supports for third-party PKCS#11 DLLs: ePass 1000 ND / ePass 2000 / ePass 2003 / ePass 3000. -Fixed typo. -The expression of the disclaimer statement for exporting / importing has been modified. -Fixed the VPN Azure connection problem on Version 4.09 Build 9451 Beta. -Fixed the problem that VPN Server Manager and VPN Client Manager sometimes become slow when the update check server is unreachable from the computer. -Removed space characters in every URLs of all download files on the SoftEther VPN Download Center web site to avoid the downloading problem in some HTTP clients. -A github patch which was posted by a contributor has been applied: "update debian packaging, install init script". - -SoftEther VPN 4.09 Build 9451 Beta (June 9, 2014) -Improves User-mode SecureNAT performance by modifying the processing of TCP_FIN packets. It should improve the performance of the FTP protocol. - -SoftEther VPN 4.08 Build 9449 (June 8, 2014) -Add a new command to generate a RSA 2048 bit certificate. -The vpncmd command-line utility has MakeCert command to generate a 1024 bit self-signed RSA certificate. However, in recent years it is recommended to use 2048 bit RSA certificates. Therefore, on this version a new command MakeCert2048 has been added. Use this command to generate a 2048 bit self-signed RSA certificate. - -Workaround for the NAT traversal problem. -Adjusted the priority between TCP/IP Direct Connection and UDP-based NAT-Traversal. On this version (Ver 4.08), NAT-Traversal will always be used if the client program detects that the specified TCP destination port on the destination server is occupied by non-SoftEther VPN Server. Anyone who faces to the connection problem on the VPN Server which is behind the NAT-box should install this update. - -In the previous version (Ver 4.07), when the VPN Client attempts to connect to the VPN Server, the client firstly establish the connection via the TCP/IP direct protocol. If the TCP connection establishes successfully (in the layer-3) but the TCP port returns non-VPN protocol data (in the layer-7), the protocol error occurs immediately even if the NAT-Traversal connection attempt is still pending. This phenomenon often occurs when the VPN Server is behind the NAT-box, and the NAT-box has a listening TCP-443 port by itself. In that condition, the VPN Client attempts to connect to that TCP-443 port firstly, and the protocol error occurs immediately NAT-box returns non-VPN protocol (e.g. HTML-based administration page). - -In order to work around that, this version (Ver 4.08) of VPN Client changed the behavior. On this version, if the VPN Client detects that the destination TCP Port is occupied by a non-VPN program, then the client will always use NAT-Traversal socket. This minor change will fix the connection problem to VPN servers behind the NATs. - -Note: The built-in NAT-Traversal function on SoftEther VPN is for temporary use only. It is not recommended to keep using UDP-based NAT-Traversal connection to beyond the NAT-box when the VPN Server is behind the NAT-box, for long-term use. It is reported that some cheap NAT-boxes disconnect UDP session in regular period (a few minutes) after NAT-Traversal connection has been made. The strongly recommended method to run VPN Server behind the NAT is to make a TCP port mapping on the NAT-box to transfer incoming VPN connection packets (e.g. TCP port 443) to the private IP address of the VPN Server. - -SoftEther VPN 4.07 Build 9448 (June 6, 2014) -We updated the internal OpenSSL to 0.9.8za. -This fixes the latest OpenSSL vulnerability which has unfold on June 05. -This vulnerability does not affect on SoftEther VPN. However, we updated the SoftEther VPN build with OpenSSL 0.9.8za. The new build also includes additional improvements. -More details about this OpenVPN vulnerability is described at http://www.openssl.org/news/secadv_20140605.txt. - -Other updates on this build are as followings: -The problem with OpenVPN Connect for Android 1.1.14 has been fixed. In the previous versions, OpenVPN Connect for Android 1.1.14 reports "PolarSSL Error" when it connects to the SoftEther VPN Server, if the server SSL certificate is self-signed root certificate. This X.509 certificate parsing problem is OpenVPN Connect's bug, however we performed work around for this OpenVPN Connect's bug. Please mind that you need to regenerate your self-signed root certificate in order to comply with OpenVPN Connect at once after upgrading the VPN Server to this version. To regenerate the certificate, use the GUI tool on VPN Server Manager, or execute the "ServerCertRegenerate" command on vpncmd. - -The automated root certificate and intermediate certificates downloading function has been implemented. It is very helpful when you use a commercial certificate which has been issued by a commercial CA (Certificate Authority), including VeriSign, GlobalSign or RapidSSL. In previous versions, you had to install the root certificate and intermediate certificates manually into the "chain_certs" directory. On this version, you do not need any longer to do such a manual installation of chained certs. - -The OpenVPN configuration file generating function identifies the root certificate correctly, in order to embed it as the "" inline directive in the auto-generated OpenVPN configuration file. It is very helpful if you are using a commercial certificate which has been issued by a commercial CA (Certificate Authority), including VeriSign, GlobalSign or RapidSSL. (In previous versions, you had to perform the editing task for the OpenVPN configuration file manually.) - -UI typos have been fixed, and some minor bugs have been fixed. - -SoftEther VPN 4.06 Build 9435 (Beta) (March 26, 2014) -Previous versions of VPN Client have a port-confliction problem of the TCP port (TCP 9930) for RPC (Remote Procedure Call) on the VPN Client service for Windows, if the same port is occupied by another service. This version has solved the confliction problem. - -SoftEther VPN 4.06 Build 9433 (Beta) (March 21, 2014) -Fixed a crashing bug on NAT-Traversal connections. -We sincerely apologize that the SoftEther VPN Server of the last build (Build 9432) has a serious crashing bug if a VPN client connects to the VPN Server in the NAT Traversal mode, in UNIX system. This serious bug was caused by the problem of the processing of Unicode string (which is used by a warning message for NAT Traversal connections). We fixed the serious bug by this Build 9433. If you are using SoftEther VPN Server Build 9430 or 9432 in UNIX, please update it to Build 9433 as soon as possible. - -SoftEther VPN 4.06 Build 9432 (Beta) (March 20, 2014) -We apologize that the previous build (Build 9430) has a problem that the RSA certificate authentication doesn't work. -This build has been fixed the problem. Please use Build 9432 if you are intending to use the RSA certificate authentication function. - -SoftEther VPN 4.06 Build 9430 (Beta) (March 20, 2014) -Thank you for waiting! -Added the following five advanced functions into SoftEther VPN Server (experimental) : -- RADIUS / NT Domain user authentication function -- RSA certificate user authentication function -- Deep-inspect packet logging function -- Source IP address control list function -- syslog transfer function - -Added the split-tunneling function (experimental) : -- Split tunneling is the function for enterprises to allow users communicate only to the specified IPv4 subnets through a VPN tunnel. -- You can set up either SecureNAT Virtual DHCP Server or any external DHCP server to push static routing tables to all VPN clients. -- The Virtual DHCP Server function in SecureNAT now supports classless static routing table pushing option (RFC 3442). -- All types of VPN clients (SoftEther VPN Client, OpenVPN Client, L2TP/IPsec client and MS-SSTP client) can receive the static routing table pushed. - -Added the function which allows the VPN server administrator to obtain the DDNS private key on the DDNS setup dialog-box. -Improved the behavior of the Privacy Filter Mode security policy. In the previous versions, a VPN session which is enabled the Privacy Filter Mode option cannot transmit any packets toward other Privacy Filter Mode enabled VPN sessions, except broadcast packets and ARP packets. On or after this version, both broadcast packets and ARP packets will also be blocked by the Privacy Filter Mode policy to eliminate the broadcast traffics. For the backward compatibility, this behavior can be changed by the "DropBroadcastsInPrivacyFilterMode" and "DropArpInPrivacyFilterMode" bool options on the Virtual Hub Extended Options. -Added the generating function of X.509 v3 certificates with the SHA-2 (SHA-256) hashing algorithm to improve the security. -According to the users reports, on very minor Linux environment, the "vpnserver stop" shutdown operation sometimes hangs up. The SoftEther VPN Project hasn't reproduce the issue yet. However, we added the fail-safe code to run "killall -KILL vpnserver" after the process shutdown operation times out (90 seconds). -Added the option to disable the NAT Traversal tunneling function on the connection settings screen in VPN Client and Cascade Connection. -Added Several Fixes for OS X. -Added Improved Simplified Chinese UI resources. -Added Workaround for when vpnserver hangs on stop on minor Linux environments. -On VPN Servers in People's Republic of China, the above five functions are currently disabled by default, under the orders from Beijing. Although Chinese users can enable these functions manually, Enterprise users in People's Republic of China are recommended to use these enterprise functions with PacketiX VPN Server 4.0 Chinese Edition. - -SoftEther VPN 4.05 Build 9423 (Beta) (February 18, 2014) -Added Files for building CentOS/RHEL RPM. -Set the "VPN over DNS" and "VPN over ICMP" functions disabled by default on VPN Server / VPN Bridge. - -SoftEther VPN 4.05 Build 9422 (Beta) (February 17, 2014) -Added the supporting of /hostname and /password command-line arguments on VPN Client. -Added the NSDI 6.x Lightweight Helper Kernel-mode Module for the local-bridge function. This kernel-mode driver runs only on Windows 8.1 / Windows Server 2012 R2 or later. - -SoftEther VPN 4.05 Build 9416 (Beta) (February 6, 2014) -Added the support for OpenBSD on the source code. -Added the debian packaging on the source code. -Added the adminip.txt CIDR support. -Added the supporting VLAN for Mac OS X using TunTapOSX. -Added the .zip package with vpnsmgr.exe and vpncmd.exe for system administrators. - -SoftEther VPN 4.04 Build 9412 (January 15, 2014) -Whole English UI texts are checked and corrected by a native speaker of English. Fixed typos. - -SoftEther VPN 4.03 Build 9411 (January 7, 2014) -Modified the source-code tree. In the build 9408, some C# build-utility source codes were missing. In this build, full set of all source codes including the BuildUtil program are appended. No functional differences between this build and the last build. - -SoftEther VPN 4.03 Build 9408 (January 4, 2014) -SoftEther VPN became open source software from this build. More details on this page. Note that the major version 3.xx was skipped for internal reason of our project. So this open-sourced new version starts with major version 4.xx. - -SoftEther VPN 2.00 Build 9387 (September 16, 2013) -This build realizes the compatibility with Microsoft Windows 8.1 and Windows Server 2012 R2 (RTM). This build supports Windows 8.1 and Windows Server 2012 R2 officially. This build fixes the former problem when the user upgrades from Windows 8 to Windows 8.1 by upgrade installation. -The major version number of SoftEther VPN was incremented on this build. - -SoftEther VPN 1.01 Build 9379 RTM (August 18, 2013) -This security update is to strengthen the security of SoftEther VPN 1.0 (Server and Bridge). -There is a remote administration function on SoftEther VPN 1.0. The function is to allow administrators to connect to the VPN server remotely to manage the server. In older versions, a third person can login to the VPN Server in the Virtual Hub Administration Mode if the administrator has forgot to set the administrator's password on a Virtual Hub. Older versions are also safe if any strong password is set on the Virtual Hub. However we suppose that there are some administrators who have forgot to set passwords for Virtual Hubs. In order to protect such potential vulnerable servers, this security update strengthens the VPN server program to deny all empty (not set) passwords on the Virtual Hub Administration Mode. Your VPN server has been safe also in older versions if you set any passwords for Virtual Hubs. However, we strongly recommend to apply this update program to all VPN server administrators who might have potential empty passwords on Virtual Hubs. - -SoftEther VPN 1.00 Build 9376, 9377 RTM (August 3, 2013) -This is a minor fix. -Improvement Stability of NAT Traversal. -Add HTTP User-Agent Indication Behavior when using VPN Gate Client. - -SoftEther VPN 1.00 Build 9371 RTM (July 25, 2013) -This is the RTM version of SoftEther VPN 1.0. It is not a BETA version. -We have fixed a lot of bugs in former builds. This RTM build is a stable build for everyone. -We will continue to improve features and performances on SoftEther VPN hereafter. - -SoftEther VPN 1.00 Build 9367 RC4 (July 21, 2013) -This should be the final beta release before the RTM version of SoftEther VPN 1.0. - -SoftEther VPN 1.00 Build 9091 RC3 (May 19, 2013) -We released RC3 with the following improvements. RC3 should be the final release candidate before the GA (Generally Available) build. -- Fixed a crush bug which might occurred during the shutdown of vpnserver process with using L2TPv3 or EtherIP over IPsec. -- The statistics of cumulative transferred-bytes and packets-counter are appended on the list of Visual Hubs and on the list of User Objects on each Virtual Hub, on VPN Server Manager and vpncmd. -- On the list of User Objects enumeration in both VPN Server Manager and vpncmd, the expire-date of each User Object are appended on the displayed list. -- Improvements of stability of Dynamic DNS Function and NAT-Traversal Function. - -SoftEther VPN 1.00 Build 9079 RC2 Fix17 (May 5, 2013) -Fixed a typo. Fixed a wrong bitmap image on the installer. - -SoftEther VPN 1.00 Build 9078 RC2 Fix16 (April 28, 2013) -A security fix. The previous versions have ignored the "deny_empty_password" option in the Virtual Hub Administration Options List. This build fixed this security bug. -Fixed some minor bugs. -Improvement of the respond-time on IPv6 DNS name resolver. - -SoftEther VPN 1.00 Build 9074 RC2 Fix15 (April 24, 2013) -Minor improvement around the Dynamic DNS Client function. - -SoftEther VPN 1.00 Build 9071 RC2 Fix14 (April 20, 2013) -Fixed a minor timeout bug. - -SoftEther VPN 1.00 Build 9070 RC2 Fix13 (April 18, 2013) -Enabled advanced security check routines for butter overflow (Win32 binaries only.) -File sizes have been increased a little, but the performance wasn't affected. - -SoftEther VPN 1.00 Build 9069 RC2 Fix12 (April 17, 2013) -Fixed a minor bug on SSL packet processing. -Fixed a miror bug on TCP listener. (very rare crash) - -SoftEther VPN 1.00 Build 9053 RC2 Fix11 (April 8, 2013) -Fixed a minor bug on UDP packet processing. -Added a new feature: IKE and OpenVPN (in UDP packets) Packet Logging Function. - -SoftEther VPN 1.00 Build 9045 RC2 Fix10 (April 2, 2013) -Fixed a minor bug, and improved the stability. - -SoftEther VPN 1.00 Build 9043 RC2 Fix9 (April 1, 2013) -Fixed a critical bug was in the HTTP packet parser. -Improvement of the stability of UDP-based communication. -Fixed a problem: SecureNAT's connectivity polling packet interval was too short. - -SoftEther VPN 1.00 Build 9035 RC2 Fix8 (March 26, 2013) -Fixed a crash bug: While you are changing the X.509 server certificate, if a new SSL-VPN connection is being made, the new connection attempt will cause the crash because lack of critical section locking. However this bug was very rare. We found it in the heavy stress test. - -SoftEther VPN 1.00 Build 9033 RC2 Fix7 (March 22, 2013) -Fixed a minor bug. - -SoftEther VPN 1.00 Build 9030 RC2 Fix6 (March 21, 2013) -Fixed a bug: A logged error message around the L2TP/SSTP/OpenVPN user-authentication was incorrect. - -SoftEther VPN 1.00 Build 9029 RC2 Fix5 (March 17, 2013) -Fixed a minor bug and typo. - -SoftEther VPN 1.00 Build 9027 RC2 Fix4 (March 12, 2013) -Fixed a minor bug. - -SoftEther VPN 1.00 Build 9026 RC2 Fix3 (March 10, 2013) -Fixed a bug: the timeout to the DDNS server was too small. - -SoftEther VPN 1.00 Build 9024 RC2 Fix2 (March 09, 2013) -Fixed a bug: On Windows, VPN over DNS could not be enabled. - -SoftEther VPN 1.00 Build 9023 RC2 Fix1 (March 08, 2013) -Fixed a minor bug. - -SoftEther VPN 1.00 Build 9022 RC2 (March 08, 2013) -The initial release. diff --git a/Declaration_Switch_License_from_GPL_to_Apache.pdf b/Declaration_Switch_License_from_GPL_to_Apache.pdf new file mode 100644 index 00000000..d8d07509 Binary files /dev/null and b/Declaration_Switch_License_from_GPL_to_Apache.pdf differ diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 00000000..0d3a1192 --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1 @@ +custom: https://salt.bountysource.com/teams/softether-vpn diff --git a/LICENSE b/LICENSE index bf65f661..c81d1ad8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,31 +1,200 @@ -SoftEther VPN Server, Client and Bridge are free software, and released as -open-source. You can redistribute them and/or modify them under the terms of -the GNU General Public License version 2 as published by the Free Software -Foundation. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) Daiyuu Nobori. -Copyright (c) SoftEther Project at University of Tsukuba, Japan. -Copyright (c) SoftEther Corporation. -All Rights Reserved. -http://www.softether.org/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License version 2 as published by the Free -Software Foundation. + 1. Definitions. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -You should have received a copy of the GNU General Public License version 2 -along with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -Neither the name of SoftEther nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + + Copyright (c) all contributors on SoftEther VPN project in GitHub. + Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +DISCLAIMER +========== THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -67,278 +236,6 @@ LIABLE TO RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT JUST A STATEMENT FOR WARNING AND DISCLAIMER. -THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE -DEVELOPED BY SOFTETHER VPN PROJECT. - -READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE. -SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH -LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE. - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your freedom to -share and change it. By contrast, the GNU General Public License is intended -to guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software is -covered by the GNU Lesser General Public License instead.) You can apply it -to your programs, too. - - When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for this service if you wish), -that you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs; and that you know you -can do these things. - - To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These -restrictions translate to certain responsibilities for you if you distribute -copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether gratis or -for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must show them these terms so they know their rights. - - We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - - Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients to -know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. - - Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will -individually obtain patent licenses, in effect making the program proprietary. -To prevent this, we have made it clear that any patent must be licensed for -everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and modification -follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms of -this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included -without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program -is not restricted, and the output from the Program is covered only if its -contents constitute a work based on the Program (independent of having been -made by running the Program). Whether that is true depends on what the Program -does. - - 1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may -at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such -modifications or work under the terms of Section 1 above, provided that you -also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices stating -that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in whole -or in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. - - c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print -such an announcement, your work based on the Program is not required to print -an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Program, the distribution of the whole must be on -the terms of this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise the -right to control the distribution of derivative or collective works based on -the Program. - -In addition, mere aggregation of another work not based on the Program with -the Program (or with a work based on the Program) on a volume of a storage or -distribution medium does not bring the other work under the scope of this -License. - - 3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 and -2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source -code, which must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three years, to -give any third party, for a charge no more than your cost of physically -performing source distribution, a complete machine-readable copy of the -corresponding source code, to be distributed under the terms of Sections 1 and -2 above on a medium customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to -distribute corresponding source code. (This alternative is allowed only for -noncommercial distribution and only if you received the program in object code -or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and -installation of the executable. However, as a special exception, the source -code distributed need not include anything that is normally distributed (in -either source or binary form) with the major components (compiler, kernel, and -so on) of the operating system on which the executable runs, unless that -component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with the -object code. - - 4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, or -rights, from you under this License will not have their licenses terminated so -long as such parties remain in full compliance. - - 5. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the -Program (or any work based on the Program), you indicate your acceptance of -this License to do so, and all its terms and conditions for copying, -distributing or modifying the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the original -licensor to copy, distribute or modify the Program subject to these terms and -conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose that -choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In -such case, this License incorporates the limitation as if written in the body -of this License. - - 9. The Free Software Foundation may publish revised and/or new versions of -the General Public License from time to time. Such new versions will be -similar in spirit to the present version, but may differ in detail to address -new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any later -version", you have the option of following the terms and conditions either of -that version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of this License, -you may choose any version ever published by the Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make -exceptions for this. Our decision will be guided by the two goals of -preserving the free status of all derivatives of our free software and of -promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE -PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, -YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO -LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR -THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE. SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE. diff --git a/README.md b/README.md index 3107ec4c..9bd339eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SoftEther VPN -[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/softethervpn/softethervpn?branch=master&svg=true)](https://ci.appveyor.com/project/softethervpn/softethervpn) [![Travis CI build status](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN.svg?branch=master)](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN) [![Coverity Scan Build Status](https://scan.coverity.com/projects/16304/badge.svg)](https://scan.coverity.com/projects/softethervpn-softethervpn) +[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/softethervpn/softethervpn?branch=master&svg=true)](https://ci.appveyor.com/project/softethervpn/softethervpn) [![Travis CI build status](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN.svg?branch=master)](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN) [![gitlab-ci build status](https://gitlab.com/SoftEther/SoftEtherVPN/badges/master/build.svg)](https://gitlab.com/SoftEther/SoftEtherVPN/pipelines) [![Coverity Scan Build Status](https://scan.coverity.com/projects/16304/badge.svg)](https://scan.coverity.com/projects/softethervpn-softethervpn) - [SoftEther VPN](#softether-vpn) - [BOARD MEMBERS OF THIS REPOSITORY](#board-members-of-this-repository) @@ -9,6 +9,9 @@ * [For Ubuntu](#for-ubuntu) * [From binary installers:](#from-binary-installers) * [Build from Source code](#build-from-source-code) +- [About HTML5-based Modern Admin Console and JSON-RPC API Suite](#about-html5-based-modern-admin-console-and-json-rpc-api-suite) + * [Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console](#built-in-softether-vpn-server-html5-ajax-based-web-administration-console) + * [Built-in SoftEther Server VPN JSON-RPC API Suite](#built-in-softether-server-vpn-json-rpc-api-suite) - [TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION](#to-circumvent-your-governments-firewall-restriction) - [SOURCE CODE CONTRIBUTION](#source-code-contribution) - [DEAR SECURITY EXPERTS](#dear-security-experts) @@ -27,10 +30,10 @@ which the non-developer user can stable use. Source code packages (.zip and .tar.gz) and binary files of Stable Edition are also available: http://www.softether-download.com/ -We accept your patches by the acceptance policy: -http://www.softether.org/5-download/src/9.patch +Copyright (c) all contributors on SoftEther VPN project in GitHub. +Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. -Copyright (c) SoftEther Project at University of Tsukuba, Japan. +--- The development of SoftEther VPN was supported by the MITOH Project, a research and development project by Japanese Government, @@ -38,10 +41,23 @@ subsidized by Ministry of Economy, Trade and Industry of Japan, administrated by Information Promotion Agency. https://www.ipa.go.jp/english/humandev/ +--- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. +![https://icons8.com](resources/icons8.png "Icons8") + +[Icons8](https://icons8.com) kindly supported the project by gifting a license which allows to edit and redistribute their icons. + +Please note that you are not allowed to redistribute those icons outside of this repository. + +The developers of SoftEther VPN love Icons8's work and kindly ask the users to support them as much as possible. + +--- + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most powerful and easy-to-use multi-protocol VPN software. @@ -121,7 +137,11 @@ https://github.com/chipitsine ## For Ubuntu -[Launchpad PPA](https://launchpad.net/~paskal-07/+archive/ubuntu/softethervpn/+packages) maintained by [Dmitry Verkhoturov](https://github.com/paskal) +Launchpad PPA maintained by [Dmitry Verkhoturov](https://github.com/paskal): + +[Daily builds](https://code.launchpad.net/~paskal-07/+archive/ubuntu/softethervpn) (latest released tag) + +[Nightly builds](https://code.launchpad.net/~paskal-07/+archive/ubuntu/softethervpn-nightly) ## From binary installers: @@ -137,6 +157,39 @@ There are two flavours of SoftEtherVPN source code: 1. Unstable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN 2. Stable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN_Stable + +# About HTML5-based Modern Admin Console and JSON-RPC API Suite + +## Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console +We are developing the HTML5 Ajax-based Web Administration Console (currently very limited, under construction) in the embedded HTTPS server on the SoftEther VPN Server. + +Access to the following URL from your favorite web browser. + +``` +https://:/admin/ +``` + +For example if your VPN Server is running as the port 5555 on the host at 192.168.0.1, you can access to the web console by: + +``` +https://192.168.0.1:5555/admin/ +``` + +Note: Your HTML5 development contribution is very appreciated. The current HTML5 pages are written by Daiyuu Nobori (the core developer of SoftEther VPN). He is obviously lack of HTML5 development ability. Please kindly consider to contribute for SoftEther VPN's development on GitHub. Your code will help every people running SoftEther VPN Server. + + +## Built-in SoftEther Server VPN JSON-RPC API Suite +The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions). + +You can access to the [latest SoftEther VPN Server JSON-RPC Document on GitHub.](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/) + +- Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API. +You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.) +- If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server. +- No need to use any specific API client library since all APIs are provided on the JSON-RPC 2.0 Specification. You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment. +- Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. The Node.js Client Library for VPN Server RPC (vpnrpc) package is also available. + + # TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION Because SoftEther VPN is overly strong tool to build a VPN tunnel, @@ -168,8 +221,6 @@ We hope that you can reach one of the above URLs at least! Your contribution to SoftEther VPN Project is much appreciated. Please send patches to us through GitHub. -Read the SoftEther VPN Patch Acceptance Policy in advance: -http://www.softether.org/5-download/src/9.patch # DEAR SECURITY EXPERTS diff --git a/configure b/configure index d43691a0..0dc66511 100755 --- a/configure +++ b/configure @@ -5,14 +5,12 @@ set -e echo '---------------------------------------------------------------------' echo 'SoftEther VPN for Unix' echo -echo 'Copyright (c) SoftEther VPN Project at University of Tsukuba, Japan.' -echo 'Copyright (c) Daiyuu Nobori. All Rights Reserved.' +echo 'Copyright (c) all contributors on SoftEther VPN project in GitHub.' +echo 'Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.' echo -echo 'This program is free software; you can redistribute it and/or' -echo 'modify it under the terms of the GNU General Public License' -echo 'version 2 as published by the Free Software Foundation.' +echo 'Licensed under the Apache License, Version 2.0 (the License).' echo -echo 'Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.' +echo 'Read and understand README, LICENSE and WARNING before use.' echo '---------------------------------------------------------------------' echo @@ -35,7 +33,10 @@ if [ -z ${OPENSSL_ROOT_DIR} ]; then fi fi -if [ -x "$(command -v rpm)" ]; then +if [ ! -z ${CPACK_GENERATOR+x} ]; then + echo "CPACK_GENERATOR is set, CPack will generate ${CPACK_GENERATOR} packages." + CMAKE_FLAGS="-DCPACK_GENERATOR=${CPACK_GENERATOR} ${CMAKE_FLAGS}" +elif [ -x "$(command -v rpm)" ]; then echo "'rpm' executable found, CPack will generate RPM packages." CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}" else @@ -45,7 +46,7 @@ fi echo "" -(cd tmp && cmake ${CMAKE_FLAGS} .. || exit 1) +(cd tmp && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_FLAGS} .. || exit 1) echo "" diff --git a/configure.cmd b/configure.cmd new file mode 100644 index 00000000..815a5f9b --- /dev/null +++ b/configure.cmd @@ -0,0 +1,30 @@ +@echo off + +echo --------------------------------------------------------------------- +echo SoftEther VPN for Windows +echo. +echo Copyright (c) all contributors on SoftEther VPN project in GitHub. +echo Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +echo. +echo Read and understand README, LICENSE and WARNING before use. +echo --------------------------------------------------------------------- +echo. + +echo Welcome to the corner-cutting configure script ! +echo. + +if not exist "tmp" ( + mkdir tmp +) + +cd tmp + +cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles" .. + +if %errorlevel% == 0 ( + echo. + echo The Makefile is generated. Run 'nmake' to build SoftEther VPN. +) else ( + cd .. + exit /b 1 +) diff --git a/developer_tools/vpnserver-jsonrpc-clients/.gitignore b/developer_tools/vpnserver-jsonrpc-clients/.gitignore new file mode 100644 index 00000000..ab0f72cb --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/.gitignore @@ -0,0 +1,350 @@ +# Created by https://www.gitignore.io/api/visualstudio +# Edit at https://www.gitignore.io/?templates=visualstudio + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- Backup*.rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# End of https://www.gitignore.io/api/visualstudio diff --git a/developer_tools/vpnserver-jsonrpc-clients/README.html b/developer_tools/vpnserver-jsonrpc-clients/README.html new file mode 100644 index 00000000..1735667e --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/README.html @@ -0,0 +1,14648 @@ + + + + + SoftEther VPN Server JSON-RPC Suite Document + + + + + + +
+

SoftEther VPN Server JSON-RPC API Suite Document

+

This reference describes all JSON-RPC functions available on SoftEther VPN Server.

+

You can access to the latest SoftEther VPN Server JSON-RPC Document on GitHub.

+

What is SoftEther VPN Server JSON-RPC API Suite?

+

The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions).

+
    +
  • Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API.
  • +
  • You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.)
  • +
  • If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server.
  • +
  • No need to use any specific API client library since all APIs are provided on the JSON-RPC 2.0 Specification. You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment.
  • +
  • Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. The Node.js Client Library for VPN Server RPC (vpnrpc) package is also available.
  • +
+

Principle

+

Entry point

+

The entry point URL of JSON-RPC is:

+
https://<vpn_server_hostname>:<port>/api/
+
+
    +
  • Older versions of SoftEther VPN before June 2019 don't support JSON-RPC APIs.
  • +
  • If you want to completely disable the JSON-RPC on your VPN Server, set the DisableJsonRpcWebApi variable to true on the vpn_server.config.
  • +
+

JSON-RPC specification

+

You must use HTTPS 1.1 POST method to call each of JSON-RPC APIs.
+All APIs are based on the JSON-RPC 2.0 Specification.

+
    +
  • JSON-RPC Notification is not supported.
  • +
  • JSON-RPC Batch is not supported.
  • +
+

"vpnrpc": Node.js Client Library package for VPN Server JSON-RPC

+

If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the JavaScript Client Library for VPN Server RPC (vpnrpc).

+
    +
  • You can use the vpnrpc library in JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js.
  • +
  • As a sample code there is the sample.ts program in TypeScript. This sample calls all of available JSON-RPC APIs against the specified SoftEther VPN Server. (Note: This sample code is written in TypeScript.)
  • +
+

You can use the following command to download the vpnrpc library package with Node.js.

+
$ npm install --save-dev vpnrpc
+
+

"vpnrpc.ts": TypeScript Client Library for VPN Server JSON-RPC

+

If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the TypeScript Client Library for VPN Server RPC (vpnrpc.ts).

+
    +
  • You can use the vpnrpc.ts library in TypeScript / JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js.
  • +
  • As a sample code there is the sample.ts program in TypeScript. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server.
  • +
+

"vpnserver-jsonrpc-client-csharp": C# Client Library for VPN Server JSON-RPC

+

If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the vpnserver-jsonrpc-client-csharp C# library.

+
    +
  • The client library codes for C# is written in pure C# 7.3. It works on .NET Core 2.1 or later on Windows, Linux and macOS. Very comfort with Visual Studio for both Windows or macOS.
  • +
  • As a sample code there is the VpnServerRpcTest.cs program in C#. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server.
  • +
+

HTTPS Authentication

+

You must specify the following HTTPS custom headers for authentication on each of requests.

+ + + + + + + + + + + + + + + + + +
ValueDescription
X-VPNADMIN-HUBNAMEThe name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify empty string if you want to connect to the VPN Server as the Entire VPN Server Admin Mode.
X-VPNADMIN-PASSWORDSpecify the administration password.
+
    +
  • You can omit the above HTTPS custom authentication headers if you are calling JSON-RPC APIs from the web browser which is already logged in to the VPN Server with HTTPS Basic Authentication. In such usage the credential of HTTPS Basic Authtication will be used.
  • +
+
+

Table of contents

+ +
+

+

"Test" RPC API - Test RPC function

+

Description

+

Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "Test",
+  "params": {
+    "IntValue_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"GetServerInfo" RPC API - Get server information

+

Description

+

Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerInfo",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerProductName_str": "serverproductname",
+    "ServerVersionString_str": "serverversionstring",
+    "ServerBuildInfoString_str": "serverbuildinfostring",
+    "ServerVerInt_u32": 0,
+    "ServerBuildInt_u32": 0,
+    "ServerHostName_str": "serverhostname",
+    "ServerType_u32": 0,
+    "ServerBuildDate_dt": "2020-08-01T12:24:36.123",
+    "ServerFamilyName_str": "serverfamilyname",
+    "OsType_u32": 0,
+    "OsServicePack_u32": 0,
+    "OsSystemName_str": "ossystemname",
+    "OsProductName_str": "osproductname",
+    "OsVendorName_str": "osvendorname",
+    "OsVersion_str": "osversion",
+    "KernelName_str": "kernelname",
+    "KernelVersion_str": "kernelversion"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerProductName_strstring (ASCII)Server product name
ServerVersionString_strstring (ASCII)Server version string
ServerBuildInfoString_strstring (ASCII)Server build information string
ServerVerInt_u32number (uint32)Server version integer value
ServerBuildInt_u32number (uint32)Server build number integer value
ServerHostName_strstring (ASCII)Server host name
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
ServerBuildDate_dtDateBuild date and time of the server
ServerFamilyName_strstring (ASCII)Family name
OsType_u32number (enum)OS type
Values:
1100: Windows 95
1200: Windows 98
1300: Windows Me
1400: Windows (unknown)
2100: Windows NT 4.0 Workstation
2110: Windows NT 4.0 Server
2111: Windows NT 4.0 Server, Enterprise Edition
2112: Windows NT 4.0 Terminal Server
2113: BackOffice Server 4.5
2114: Small Business Server 4.5
2200: Windows 2000 Professional
2211: Windows 2000 Server
2212: Windows 2000 Advanced Server
2213: Windows 2000 Datacenter Server
2214: BackOffice Server 2000
2215: Small Business Server 2000
2300: Windows XP Home Edition
2301: Windows XP Professional
2410: Windows Server 2003 Web Edition
2411: Windows Server 2003 Standard Edition
2412: Windows Server 2003 Enterprise Edition
2413: Windows Server 2003 DataCenter Edition
2414: BackOffice Server 2003
2415: Small Business Server 2003
2500: Windows Vista
2510: Windows Server 2008
2600: Windows 7
2610: Windows Server 2008 R2
2700: Windows 8
2710: Windows Server 2012
2701: Windows 8.1
2711: Windows Server 2012 R2
2702: Windows 10
2712: Windows Server 10
2800: Windows 11 or later
2810: Windows Server 11 or later
3000: Unknown UNIX
3100: Linux
3200: Solaris
3300: Cygwin
3400: BSD
3500: MacOS X
OsServicePack_u32number (uint32)Service pack number
OsSystemName_strstring (ASCII)OS system name
OsProductName_strstring (ASCII)OS product name
OsVendorName_strstring (ASCII)OS vendor name
OsVersion_strstring (ASCII)OS version
KernelName_strstring (ASCII)Kernel name
KernelVersion_strstring (ASCII)Kernel version
+
+

+

"GetServerStatus" RPC API - Get Current Server Status

+

Description

+

Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerType_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "NumTcpConnectionsLocal_u32": 0,
+    "NumTcpConnectionsRemote_u32": 0,
+    "NumHubTotal_u32": 0,
+    "NumHubStandalone_u32": 0,
+    "NumHubStatic_u32": 0,
+    "NumHubDynamic_u32": 0,
+    "NumSessionsTotal_u32": 0,
+    "NumSessionsLocal_u32": 0,
+    "NumSessionsRemote_u32": 0,
+    "NumMacTables_u32": 0,
+    "NumIpTables_u32": 0,
+    "NumUsers_u32": 0,
+    "NumGroups_u32": 0,
+    "AssignedBridgeLicenses_u32": 0,
+    "AssignedClientLicenses_u32": 0,
+    "AssignedBridgeLicensesTotal_u32": 0,
+    "AssignedClientLicensesTotal_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "CurrentTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentTick_u64": 0,
+    "StartTime_dt": "2020-08-01T12:24:36.123",
+    "TotalMemory_u64": 0,
+    "UsedMemory_u64": 0,
+    "FreeMemory_u64": 0,
+    "TotalPhys_u64": 0,
+    "UsedPhys_u64": 0,
+    "FreePhys_u64": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
NumTcpConnections_u32number (uint32)Total number of TCP connections
NumTcpConnectionsLocal_u32number (uint32)Number of Local TCP connections
NumTcpConnectionsRemote_u32number (uint32)Number of remote TCP connections
NumHubTotal_u32number (uint32)Total number of HUBs
NumHubStandalone_u32number (uint32)Nymber of stand-alone HUB
NumHubStatic_u32number (uint32)Number of static HUBs
NumHubDynamic_u32number (uint32)Number of Dynamic HUBs
NumSessionsTotal_u32number (uint32)Total number of sessions
NumSessionsLocal_u32number (uint32)Number of local VPN sessions
NumSessionsRemote_u32number (uint32)The number of remote sessions
NumMacTables_u32number (uint32)Number of MAC table entries (total sum of all Virtual Hubs)
NumIpTables_u32number (uint32)Number of IP table entries (total sum of all Virtual Hubs)
NumUsers_u32number (uint32)Number of users (total sum of all Virtual Hubs)
NumGroups_u32number (uint32)Number of groups (total sum of all Virtual Hubs)
AssignedBridgeLicenses_u32number (uint32)Number of assigned bridge licenses (Useful to make a commercial version)
AssignedClientLicenses_u32number (uint32)Number of assigned client licenses (Useful to make a commercial version)
AssignedBridgeLicensesTotal_u32number (uint32)Number of Assigned bridge license (cluster-wide), useful to make a commercial version
AssignedClientLicensesTotal_u32number (uint32)Number of assigned client licenses (cluster-wide), useful to make a commercial version
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
CurrentTime_dtDateCurrent time
CurrentTick_u64number (uint64)64 bit High-Precision Logical System Clock
StartTime_dtDateVPN Server Start-up time
TotalMemory_u64number (uint64)Memory information: Total Memory
UsedMemory_u64number (uint64)Memory information: Used Memory
FreeMemory_u64number (uint64)Memory information: Free Memory
TotalPhys_u64number (uint64)Memory information: Total Phys
UsedPhys_u64number (uint64)Memory information: Used Phys
FreePhys_u64number (uint64)Memory information: Free Phys
+
+

+

"CreateListener" RPC API - Create New TCP Listener

+

Description

+

Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateListener",
+  "params": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Port_u32number (uint32)Port number (Range: 1 - 65535)
Enable_boolbooleanActive state
+
+

+

"EnumListener" RPC API - Get List of TCP Listeners

+

Description

+

Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumListener",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ListenerList": [
+      {
+        "Ports_u32": 0,
+        "Enables_bool": false,
+        "Errors_bool": false
+      },
+      {
+        "Ports_u32": 0,
+        "Enables_bool": false,
+        "Errors_bool": false
+      },
+      {
+        "Ports_u32": 0,
+        "Enables_bool": false,
+        "Errors_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ListenerListArray objectList of listener items
Ports_u32number (uint32)TCP port number (range: 1 - 65535)
Enables_boolbooleanActive state
Errors_boolbooleanThe flag to indicate if the error occurred on the listener port
+
+

+

"DeleteListener" RPC API - Delete TCP Listener

+

Description

+

Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteListener",
+  "params": {
+    "Port_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Port_u32number (uint32)Port number (Range: 1 - 65535)
Enable_boolbooleanActive state
+
+

+

"EnableListener" RPC API - Enable / Disable TCP Listener

+

Description

+

Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnableListener",
+  "params": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Port_u32number (uint32)Port number (Range: 1 - 65535)
Enable_boolbooleanActive state
+
+

+

"SetServerPassword" RPC API - Set VPN Server Administrator Password

+

Description

+

Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetServerPassword",
+  "params": {
+    "PlainTextPassword_str": "plaintextpassword"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "PlainTextPassword_str": "plaintextpassword"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
PlainTextPassword_strstring (ASCII)The plaintext password
+
+

+

"SetFarmSetting" RPC API - Set the VPN Server clustering configuration

+

Description

+

Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetFarmSetting",
+  "params": {
+    "ServerType_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "PublicIp_ip": "192.168.0.1",
+    "ControllerName_str": "controllername",
+    "ControllerPort_u32": 0,
+    "MemberPasswordPlaintext_str": "memberpasswordplaintext",
+    "Weight_u32": 0,
+    "ControllerOnly_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerType_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "PublicIp_ip": "192.168.0.1",
+    "ControllerName_str": "controllername",
+    "ControllerPort_u32": 0,
+    "MemberPasswordPlaintext_str": "memberpasswordplaintext",
+    "Weight_u32": 0,
+    "ControllerOnly_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
NumPort_u32number (uint32)Valid only for Cluster Member servers. Number of the Ports_u32 element.
Ports_u32number[] (uint32)Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers.
PublicIp_ipstring (IP address)Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used.
ControllerName_strstring (ASCII)Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller.
ControllerPort_u32number (uint32)Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller.
MemberPasswordPlaintext_strstring (ASCII)Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller.
Weight_u32number (uint32)This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used.
ControllerOnly_boolbooleanValid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments.
+
+

+

"GetFarmSetting" RPC API - Get Clustering Configuration of Current VPN Server

+

Description

+

Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetFarmSetting",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerType_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "PublicIp_ip": "192.168.0.1",
+    "ControllerName_str": "controllername",
+    "ControllerPort_u32": 0,
+    "MemberPasswordPlaintext_str": "memberpasswordplaintext",
+    "Weight_u32": 0,
+    "ControllerOnly_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
NumPort_u32number (uint32)Valid only for Cluster Member servers. Number of the Ports_u32 element.
Ports_u32number[] (uint32)Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers.
PublicIp_ipstring (IP address)Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used.
ControllerName_strstring (ASCII)Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller.
ControllerPort_u32number (uint32)Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller.
MemberPasswordPlaintext_strstring (ASCII)Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller.
Weight_u32number (uint32)This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used.
ControllerOnly_boolbooleanValid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments.
+
+

+

"GetFarmInfo" RPC API - Get Cluster Member Information

+

Description

+

Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetFarmInfo",
+  "params": {
+    "Id_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_u32": 0,
+    "Controller_bool": false,
+    "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "Ip_ip": "192.168.0.1",
+    "Hostname_str": "hostname",
+    "Point_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "NumFarmHub_u32": 0,
+    "HubsList": [
+      {
+        "HubName_str": "hubname",
+        "DynamicHub_bool": false
+      },
+      {
+        "HubName_str": "hubname",
+        "DynamicHub_bool": false
+      },
+      {
+        "HubName_str": "hubname",
+        "DynamicHub_bool": false
+      }
+    ],
+    "NumSessions_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "Weight_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_u32number (uint32)ID
Controller_boolbooleanThe flag if the server is Cluster Controller (false: Cluster Member servers)
ConnectedTime_dtDateConnection Established Time
Ip_ipstring (IP address)IP address
Hostname_strstring (ASCII)Host name
Point_u32number (uint32)Point
NumPort_u32number (uint32)Number of Public Ports
Ports_u32number[] (uint32)Public Ports
ServerCert_binstring (Base64 binary)Server certificate
NumFarmHub_u32number (uint32)Number of farm HUB
HubsListArray objectThe hosted Virtual Hub list
NumSessions_u32number (uint32)Number of hosted VPN sessions
NumTcpConnections_u32number (uint32)Number of TCP connections
Weight_u32number (uint32)Performance Standard Ratio
HubName_strstring (ASCII)The Virtual Hub name
DynamicHub_boolbooleanDynamic HUB
+
+

+

"EnumFarmMember" RPC API - Get List of Cluster Members

+

Description

+

Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumFarmMember",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "NumFarm_u32": 0,
+    "FarmMemberList": [
+      {
+        "Id_u32": 0,
+        "Controller_bool": false,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Ip_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "Point_u32": 0,
+        "NumSessions_u32": 0,
+        "NumTcpConnections_u32": 0,
+        "NumHubs_u32": 0,
+        "AssignedClientLicense_u32": 0,
+        "AssignedBridgeLicense_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Controller_bool": false,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Ip_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "Point_u32": 0,
+        "NumSessions_u32": 0,
+        "NumTcpConnections_u32": 0,
+        "NumHubs_u32": 0,
+        "AssignedClientLicense_u32": 0,
+        "AssignedBridgeLicense_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Controller_bool": false,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Ip_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "Point_u32": 0,
+        "NumSessions_u32": 0,
+        "NumTcpConnections_u32": 0,
+        "NumHubs_u32": 0,
+        "AssignedClientLicense_u32": 0,
+        "AssignedBridgeLicense_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NumFarm_u32number (uint32)Number of Cluster Members
FarmMemberListArray objectCluster Members list
Id_u32number (uint32)ID
Controller_boolbooleanController
ConnectedTime_dtDateConnection time
Ip_ipstring (IP address)IP address
Hostname_strstring (ASCII)Host name
Point_u32number (uint32)Point
NumSessions_u32number (uint32)Number of sessions
NumTcpConnections_u32number (uint32)Number of TCP connections
NumHubs_u32number (uint32)Number of HUBs
AssignedClientLicense_u32number (uint32)Number of assigned client licenses
AssignedBridgeLicense_u32number (uint32)Number of assigned bridge licenses
+
+

+

"GetFarmConnectionStatus" RPC API - Get Connection Status to Cluster Controller

+

Description

+

Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetFarmConnectionStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Ip_ip": "192.168.0.1",
+    "Port_u32": 0,
+    "Online_bool": false,
+    "LastError_u32": 0,
+    "StartedTime_dt": "2020-08-01T12:24:36.123",
+    "FirstConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "NumTry_u32": 0,
+    "NumConnected_u32": 0,
+    "NumFailed_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Ip_ipstring (IP address)IP address
Port_u32number (uint32)Port number
Online_boolbooleanOnline state
LastError_u32number (uint32)Last error code
StartedTime_dtDateConnection start time
FirstConnectedTime_dtDateFirst connection time
CurrentConnectedTime_dtDateConnection time of this time
NumTry_u32number (uint32)Number of retries
NumConnected_u32number (uint32)Number of connection count
NumFailed_u32number (uint32)Connection failure count
+
+

+

"SetServerCert" RPC API - Set SSL Certificate and Private Key of VPN Server

+

Description

+

Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetServerCert",
+  "params": {
+    "Cert_bin": "SGVsbG8gV29ybGQ=",
+    "Key_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Cert_bin": "SGVsbG8gV29ybGQ=",
+    "Key_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Cert_binstring (Base64 binary)The body of the certificate
Key_binstring (Base64 binary)The body of the private key
+
+

+

"GetServerCert" RPC API - Get SSL Certificate and Private Key of VPN Server

+

Description

+

Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerCert",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Cert_bin": "SGVsbG8gV29ybGQ=",
+    "Key_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Cert_binstring (Base64 binary)The body of the certificate
Key_binstring (Base64 binary)The body of the private key
+
+

+

"GetServerCipher" RPC API - Get the Encrypted Algorithm Used for VPN Communication

+

Description

+

Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerCipher",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "String_str": "string"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
String_strstring (ASCII)A string value
+
+

+

"SetServerCipher" RPC API - Set the Encrypted Algorithm Used for VPN Communication

+

Description

+

Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetServerCipher",
+  "params": {
+    "String_str": "string"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "String_str": "string"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
String_strstring (ASCII)A string value
+
+

+

"CreateHub" RPC API - Create New Virtual Hub

+

Description

+

Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateHub",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Specify the name of the Virtual Hub to create / update.
AdminPasswordPlainText_strstring (ASCII)Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password.
Online_boolbooleanOnline flag
MaxSession_u32number (uint32)Maximum number of VPN sessions
NoEnum_boolbooleanNo Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server.
HubType_u32number (enum)Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
+
+

+

"SetHub" RPC API - Set the Virtual Hub configuration

+

Description

+

Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHub",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Specify the name of the Virtual Hub to create / update.
AdminPasswordPlainText_strstring (ASCII)Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password.
Online_boolbooleanOnline flag
MaxSession_u32number (uint32)Maximum number of VPN sessions
NoEnum_boolbooleanNo Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server.
HubType_u32number (enum)Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
+
+

+

"GetHub" RPC API - Get the Virtual Hub configuration

+

Description

+

Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHub",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Specify the name of the Virtual Hub to create / update.
AdminPasswordPlainText_strstring (ASCII)Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password.
Online_boolbooleanOnline flag
MaxSession_u32number (uint32)Maximum number of VPN sessions
NoEnum_boolbooleanNo Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server.
HubType_u32number (enum)Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
+
+

+

"EnumHub" RPC API - Get List of Virtual Hubs

+

Description

+

Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumHub",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "NumHub_u32": 0,
+    "HubList": [
+      {
+        "HubName_str": "hubname",
+        "Online_bool": false,
+        "HubType_u32": 0,
+        "NumUsers_u32": 0,
+        "NumGroups_u32": 0,
+        "NumSessions_u32": 0,
+        "NumMacTables_u32": 0,
+        "NumIpTables_u32": 0,
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "NumLogin_u32": 0,
+        "IsTrafficFilled_bool": false,
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "HubName_str": "hubname",
+        "Online_bool": false,
+        "HubType_u32": 0,
+        "NumUsers_u32": 0,
+        "NumGroups_u32": 0,
+        "NumSessions_u32": 0,
+        "NumMacTables_u32": 0,
+        "NumIpTables_u32": 0,
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "NumLogin_u32": 0,
+        "IsTrafficFilled_bool": false,
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "HubName_str": "hubname",
+        "Online_bool": false,
+        "HubType_u32": 0,
+        "NumUsers_u32": 0,
+        "NumGroups_u32": 0,
+        "NumSessions_u32": 0,
+        "NumMacTables_u32": 0,
+        "NumIpTables_u32": 0,
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "NumLogin_u32": 0,
+        "IsTrafficFilled_bool": false,
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NumHub_u32number (uint32)Number of Virtual Hubs
HubListArray objectVirtual Hubs
HubName_strstring (ASCII)The name of the Virtual Hub
Online_boolbooleanOnline state
HubType_u32number (enum)Type of HUB (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
NumUsers_u32number (uint32)Number of users
NumGroups_u32number (uint32)Number of registered groups
NumSessions_u32number (uint32)Number of registered sessions
NumMacTables_u32number (uint32)Number of current MAC table entries
NumIpTables_u32number (uint32)Number of current IP table entries
LastCommTime_dtDateLast communication date and time
LastLoginTime_dtDateLast login date and time
CreatedTime_dtDateCreation date and time
NumLogin_u32number (uint32)Number of accumulated logins
IsTrafficFilled_boolbooleanWhether the traffic information is provided
Ex.Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Ex.Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Ex.Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Ex.Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Ex.Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Ex.Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Ex.Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Ex.Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
+
+

+

"DeleteHub" RPC API - Delete Virtual Hub

+

Description

+

Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteHub",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
+
+

+

"GetHubRadius" RPC API - Get Setting of RADIUS Server Used for User Authentication

+

Description

+

Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubRadius",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "RadiusServerName_str": "radiusservername",
+    "RadiusPort_u32": 0,
+    "RadiusSecret_str": "radiussecret",
+    "RadiusRetryInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
RadiusServerName_strstring (ASCII)RADIUS server name
RadiusPort_u32number (uint32)RADIUS port number
RadiusSecret_strstring (ASCII)Secret key
RadiusRetryInterval_u32number (uint32)Radius retry interval
+
+

+

"SetHubRadius" RPC API - Set RADIUS Server to use for User Authentication

+

Description

+

Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubRadius",
+  "params": {
+    "HubName_str": "hubname",
+    "RadiusServerName_str": "radiusservername",
+    "RadiusPort_u32": 0,
+    "RadiusSecret_str": "radiussecret",
+    "RadiusRetryInterval_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "RadiusServerName_str": "radiusservername",
+    "RadiusPort_u32": 0,
+    "RadiusSecret_str": "radiussecret",
+    "RadiusRetryInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
RadiusServerName_strstring (ASCII)RADIUS server name
RadiusPort_u32number (uint32)RADIUS port number
RadiusSecret_strstring (ASCII)Secret key
RadiusRetryInterval_u32number (uint32)Radius retry interval
+
+

+

"EnumConnection" RPC API - Get List of TCP Connections Connecting to the VPN Server

+

Description

+

Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumConnection",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "NumConnection_u32": 0,
+    "ConnectionList": [
+      {
+        "Name_str": "name",
+        "Hostname_str": "hostname",
+        "Ip_ip": "192.168.0.1",
+        "Port_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Type_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "Hostname_str": "hostname",
+        "Ip_ip": "192.168.0.1",
+        "Port_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Type_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "Hostname_str": "hostname",
+        "Ip_ip": "192.168.0.1",
+        "Port_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Type_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NumConnection_u32number (uint32)Number of connections
ConnectionListArray objectConnection list
Name_strstring (ASCII)Connection name
Hostname_strstring (ASCII)Host name
Ip_ipstring (IP address)IP address
Port_u32number (uint32)Port number
ConnectedTime_dtDateConnected time
Type_u32number (enum)Connection type
Values:
0: VPN Client
1: During initialization
2: Login connection
3: Additional connection
4: RPC for server farm
5: RPC for Management
6: HUB enumeration
7: Password change
8: SSTP
9: OpenVPN
+
+

+

"DisconnectConnection" RPC API - Disconnect TCP Connections Connecting to the VPN Server

+

Description

+

Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DisconnectConnection",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Connection name
+
+

+

"GetConnectionInfo" RPC API - Get Information of TCP Connections Connecting to the VPN Server

+

Description

+

Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetConnectionInfo",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "Type_u32": 0,
+    "Hostname_str": "hostname",
+    "Ip_ip": "192.168.0.1",
+    "Port_u32": 0,
+    "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "ServerStr_str": "serverstr",
+    "ServerVer_u32": 0,
+    "ServerBuild_u32": 0,
+    "ClientStr_str": "clientstr",
+    "ClientVer_u32": 0,
+    "ClientBuild_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Connection name
Type_u32number (enum)Type
Values:
0: VPN Client
1: During initialization
2: Login connection
3: Additional connection
4: RPC for server farm
5: RPC for Management
6: HUB enumeration
7: Password change
8: SSTP
9: OpenVPN
Hostname_strstring (ASCII)Host name
Ip_ipstring (IP address)IP address
Port_u32number (uint32)Port number
ConnectedTime_dtDateConnected time
ServerStr_strstring (ASCII)Server string
ServerVer_u32number (uint32)Server version
ServerBuild_u32number (uint32)Server build number
ClientStr_strstring (ASCII)Client string
ClientVer_u32number (uint32)Client version
ClientBuild_u32number (uint32)Client build number
+
+

+

"SetHubOnline" RPC API - Switch Virtual Hub to Online or Offline

+

Description

+

Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubOnline",
+  "params": {
+    "HubName_str": "hubname",
+    "Online_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Online_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline / offline flag
+
+

+

"GetHubStatus" RPC API - Get Current Status of Virtual Hub

+

Description

+

Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubStatus",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Online_bool": false,
+    "HubType_u32": 0,
+    "NumSessions_u32": 0,
+    "NumSessionsClient_u32": 0,
+    "NumSessionsBridge_u32": 0,
+    "NumAccessLists_u32": 0,
+    "NumUsers_u32": 0,
+    "NumGroups_u32": 0,
+    "NumMacTables_u32": 0,
+    "NumIpTables_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "SecureNATEnabled_bool": false,
+    "LastCommTime_dt": "2020-08-01T12:24:36.123",
+    "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "NumLogin_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline
HubType_u32number (enum)Type of HUB
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
NumSessions_u32number (uint32)Number of sessions
NumSessionsClient_u32number (uint32)Number of sessions (client mode)
NumSessionsBridge_u32number (uint32)Number of sessions (bridge mode)
NumAccessLists_u32number (uint32)Number of Access list entries
NumUsers_u32number (uint32)Number of users
NumGroups_u32number (uint32)Number of groups
NumMacTables_u32number (uint32)Number of MAC table entries
NumIpTables_u32number (uint32)Number of IP table entries
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
SecureNATEnabled_boolbooleanWhether SecureNAT is enabled
LastCommTime_dtDateLast communication date and time
LastLoginTime_dtDateLast login date and time
CreatedTime_dtDateCreation date and time
NumLogin_u32number (uint32)Number of logins
+
+

+

"SetHubLog" RPC API - Set the logging configuration of the Virtual Hub

+

Description

+

Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubLog",
+  "params": {
+    "HubName_str": "hubname",
+    "SaveSecurityLog_bool": false,
+    "SecurityLogSwitchType_u32": 0,
+    "SavePacketLog_bool": false,
+    "PacketLogSwitchType_u32": 0,
+    "PacketLogConfig_u32": [
+      1,
+      2,
+      3
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "SaveSecurityLog_bool": false,
+    "SecurityLogSwitchType_u32": 0,
+    "SavePacketLog_bool": false,
+    "PacketLogSwitchType_u32": 0,
+    "PacketLogConfig_u32": [
+      1,
+      2,
+      3
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
SaveSecurityLog_boolbooleanThe flag to enable / disable saving the security log
SecurityLogSwitchType_u32number (enum)The log filename switching setting of the security log
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
SavePacketLog_boolbooleanThe flag to enable / disable saving the security log
PacketLogSwitchType_u32number (enum)The log filename switching settings of the packet logs
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
PacketLogConfig_u32number (enum)Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7.
Values:
0: Not save
1: Only header
2: All payloads
+
+

+

"GetHubLog" RPC API - Get the logging configuration of the Virtual Hub

+

Description

+

Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubLog",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "SaveSecurityLog_bool": false,
+    "SecurityLogSwitchType_u32": 0,
+    "SavePacketLog_bool": false,
+    "PacketLogSwitchType_u32": 0,
+    "PacketLogConfig_u32": [
+      1,
+      2,
+      3
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
SaveSecurityLog_boolbooleanThe flag to enable / disable saving the security log
SecurityLogSwitchType_u32number (enum)The log filename switching setting of the security log
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
SavePacketLog_boolbooleanThe flag to enable / disable saving the security log
PacketLogSwitchType_u32number (enum)The log filename switching settings of the packet logs
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
PacketLogConfig_u32number (enum)Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7.
Values:
0: Not save
1: Only header
2: All payloads
+
+

+

"AddCa" RPC API - Add Trusted CA Certificate

+

Description

+

Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddCa",
+  "params": {
+    "HubName_str": "hubname",
+    "Cert_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Cert_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Cert_binstring (Base64 binary)The body of the X.509 certificate
+
+

+

"EnumCa" RPC API - Get List of Trusted CA Certificates

+

Description

+

Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumCa",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "CAList": [
+      {
+        "Key_u32": 0,
+        "SubjectName_utf": "subjectname",
+        "IssuerName_utf": "issuername",
+        "Expires_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Key_u32": 0,
+        "SubjectName_utf": "subjectname",
+        "IssuerName_utf": "issuername",
+        "Expires_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Key_u32": 0,
+        "SubjectName_utf": "subjectname",
+        "IssuerName_utf": "issuername",
+        "Expires_dt": "2020-08-01T12:24:36.123"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
CAListArray objectThe list of CA
Key_u32number (uint32)The key id of the item
SubjectName_utfstring (UTF8)Subject
IssuerName_utfstring (UTF8)Issuer
Expires_dtDateExpiration date
+
+

+

"GetCa" RPC API - Get Trusted CA Certificate

+

Description

+

Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetCa",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "Cert_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)The key id of the certificate
Cert_binstring (Base64 binary)The body of the X.509 certificate
+
+

+

"DeleteCa" RPC API - Delete Trusted CA Certificate

+

Description

+

Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteCa",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Certificate key id to be deleted
+
+

+ +

Description

+

Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateLink",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "CheckServerCert_bool": false,
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "Online_bool": false,
+    "CheckServerCert_bool": false,
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "ProxyName_str": "clientoption_proxyname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "clientoption_proxyusername",
+    "ProxyPassword_str": "clientoption_proxypassword",
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "DisableQoS_bool": false,
+    "NoTls1_bool": false,
+    "NoUdpAcceleration_bool": false,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
CheckServerCert_boolbooleanThe flag to enable validation for the server certificate
ServerCert_binstring (Base64 binary)The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true.
AccountName_utfstring (UTF8)Client Option Parameters: Specify the name of the Cascade Connection
Hostname_strstring (ASCII)Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address.
Port_u32number (uint32)Client Option Parameters: Specify the port number of the destination VPN Server.
ProxyType_u32number (enum)Client Option Parameters: The type of the proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyName_strstring (ASCII)Client Option Parameters: The hostname or IP address of the proxy server name
ProxyPort_u32number (uint32)Client Option Parameters: The port number of the proxy server
ProxyUsername_strstring (ASCII)Client Option Parameters: The username to connect to the proxy server
ProxyPassword_strstring (ASCII)Client Option Parameters: The password to connect to the proxy server
HubName_strstring (ASCII)Client Option Parameters: The Virtual Hub on the destination VPN Server
MaxConnection_u32number (uint32)Client Option Parameters: Number of TCP Connections to Use in VPN Communication
UseEncrypt_boolbooleanClient Option Parameters: The flag to enable the encryption on the communication
UseCompress_boolbooleanClient Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection
HalfConnection_boolbooleanClient Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction.
AdditionalConnectionInterval_u32number (uint32)Client Option Parameters: Connection attempt interval when additional connection will be established
ConnectionDisconnectSpan_u32number (uint32)Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive)
DisableQoS_boolbooleanClient Option Parameters: Disable QoS Control Function if the value is true
NoTls1_boolbooleanClient Option Parameters: Do not use TLS 1.x of the value is true
NoUdpAcceleration_boolbooleanClient Option Parameters: Do not use UDP acceleration mode if the value is true
AuthType_u32number (enum)Authentication type
Values:
0: Anonymous authentication
1: SHA-0 hashed password authentication
2: Plain password authentication
3: Certificate authentication
Username_strstring (ASCII)User name
HashedPassword_binstring (Base64 binary)SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
PlainPassword_strstring (ASCII)Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
ClientX_binstring (Base64 binary)Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
ClientK_binstring (Base64 binary)Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
SecPol_CheckMac_boolbooleanSecurity policy: Prohibit the duplicate MAC address
SecPol_CheckIP_boolbooleanSecurity policy: Prohibit a duplicate IP address (IPv4)
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
SecPol_RAFilter_boolbooleanSecurity policy: Filter the router advertisement packet (IPv6)
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
SecPol_CheckIPv6_boolbooleanSecurity policy: Prohibit the duplicate IP address (IPv6)
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+ +

Description

+

Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetLink",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "AccountName_utf": "clientoption_accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "Online_bool": false,
+    "CheckServerCert_bool": false,
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "ProxyName_str": "clientoption_proxyname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "clientoption_proxyusername",
+    "ProxyPassword_str": "clientoption_proxypassword",
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "DisableQoS_bool": false,
+    "NoTls1_bool": false,
+    "NoUdpAcceleration_bool": false,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
CheckServerCert_boolbooleanThe flag to enable validation for the server certificate
ServerCert_binstring (Base64 binary)The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true.
AccountName_utfstring (UTF8)Client Option Parameters: Specify the name of the Cascade Connection
Hostname_strstring (ASCII)Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address.
Port_u32number (uint32)Client Option Parameters: Specify the port number of the destination VPN Server.
ProxyType_u32number (enum)Client Option Parameters: The type of the proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyName_strstring (ASCII)Client Option Parameters: The hostname or IP address of the proxy server name
ProxyPort_u32number (uint32)Client Option Parameters: The port number of the proxy server
ProxyUsername_strstring (ASCII)Client Option Parameters: The username to connect to the proxy server
ProxyPassword_strstring (ASCII)Client Option Parameters: The password to connect to the proxy server
HubName_strstring (ASCII)Client Option Parameters: The Virtual Hub on the destination VPN Server
MaxConnection_u32number (uint32)Client Option Parameters: Number of TCP Connections to Use in VPN Communication
UseEncrypt_boolbooleanClient Option Parameters: The flag to enable the encryption on the communication
UseCompress_boolbooleanClient Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection
HalfConnection_boolbooleanClient Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction.
AdditionalConnectionInterval_u32number (uint32)Client Option Parameters: Connection attempt interval when additional connection will be established
ConnectionDisconnectSpan_u32number (uint32)Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive)
DisableQoS_boolbooleanClient Option Parameters: Disable QoS Control Function if the value is true
NoTls1_boolbooleanClient Option Parameters: Do not use TLS 1.x of the value is true
NoUdpAcceleration_boolbooleanClient Option Parameters: Do not use UDP acceleration mode if the value is true
AuthType_u32number (enum)Authentication type
Values:
0: Anonymous authentication
1: SHA-0 hashed password authentication
2: Plain password authentication
3: Certificate authentication
Username_strstring (ASCII)User name
HashedPassword_binstring (Base64 binary)SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
PlainPassword_strstring (ASCII)Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
ClientX_binstring (Base64 binary)Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
ClientK_binstring (Base64 binary)Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
SecPol_CheckMac_boolbooleanSecurity policy: Prohibit the duplicate MAC address
SecPol_CheckIP_boolbooleanSecurity policy: Prohibit a duplicate IP address (IPv4)
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
SecPol_RAFilter_boolbooleanSecurity policy: Filter the router advertisement packet (IPv6)
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
SecPol_CheckIPv6_boolbooleanSecurity policy: Prohibit the duplicate IP address (IPv6)
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+ +

Description

+

Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetLink",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "CheckServerCert_bool": false,
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "Online_bool": false,
+    "CheckServerCert_bool": false,
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "ProxyName_str": "clientoption_proxyname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "clientoption_proxyusername",
+    "ProxyPassword_str": "clientoption_proxypassword",
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "DisableQoS_bool": false,
+    "NoTls1_bool": false,
+    "NoUdpAcceleration_bool": false,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
CheckServerCert_boolbooleanThe flag to enable validation for the server certificate
ServerCert_binstring (Base64 binary)The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true.
AccountName_utfstring (UTF8)Client Option Parameters: Specify the name of the Cascade Connection
Hostname_strstring (ASCII)Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address.
Port_u32number (uint32)Client Option Parameters: Specify the port number of the destination VPN Server.
ProxyType_u32number (enum)Client Option Parameters: The type of the proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyName_strstring (ASCII)Client Option Parameters: The hostname or IP address of the proxy server name
ProxyPort_u32number (uint32)Client Option Parameters: The port number of the proxy server
ProxyUsername_strstring (ASCII)Client Option Parameters: The username to connect to the proxy server
ProxyPassword_strstring (ASCII)Client Option Parameters: The password to connect to the proxy server
HubName_strstring (ASCII)Client Option Parameters: The Virtual Hub on the destination VPN Server
MaxConnection_u32number (uint32)Client Option Parameters: Number of TCP Connections to Use in VPN Communication
UseEncrypt_boolbooleanClient Option Parameters: The flag to enable the encryption on the communication
UseCompress_boolbooleanClient Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection
HalfConnection_boolbooleanClient Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction.
AdditionalConnectionInterval_u32number (uint32)Client Option Parameters: Connection attempt interval when additional connection will be established
ConnectionDisconnectSpan_u32number (uint32)Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive)
DisableQoS_boolbooleanClient Option Parameters: Disable QoS Control Function if the value is true
NoTls1_boolbooleanClient Option Parameters: Do not use TLS 1.x of the value is true
NoUdpAcceleration_boolbooleanClient Option Parameters: Do not use UDP acceleration mode if the value is true
AuthType_u32number (enum)Authentication type
Values:
0: Anonymous authentication
1: SHA-0 hashed password authentication
2: Plain password authentication
3: Certificate authentication
Username_strstring (ASCII)User name
HashedPassword_binstring (Base64 binary)SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
PlainPassword_strstring (ASCII)Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
ClientX_binstring (Base64 binary)Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
ClientK_binstring (Base64 binary)Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
SecPol_CheckMac_boolbooleanSecurity policy: Prohibit the duplicate MAC address
SecPol_CheckIP_boolbooleanSecurity policy: Prohibit a duplicate IP address (IPv4)
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
SecPol_RAFilter_boolbooleanSecurity policy: Filter the router advertisement packet (IPv6)
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
SecPol_CheckIPv6_boolbooleanSecurity policy: Prohibit the duplicate IP address (IPv6)
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+ +

Description

+

Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumLink",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "NumLink_u32": 0,
+    "LinkList": [
+      {
+        "AccountName_utf": "accountname",
+        "Online_bool": false,
+        "Connected_bool": false,
+        "LastError_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Hostname_str": "hostname",
+        "TargetHubName_str": "targethubname"
+      },
+      {
+        "AccountName_utf": "accountname",
+        "Online_bool": false,
+        "Connected_bool": false,
+        "LastError_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Hostname_str": "hostname",
+        "TargetHubName_str": "targethubname"
+      },
+      {
+        "AccountName_utf": "accountname",
+        "Online_bool": false,
+        "Connected_bool": false,
+        "LastError_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Hostname_str": "hostname",
+        "TargetHubName_str": "targethubname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
NumLink_u32number (uint32)Number of cascade connections
LinkListArray objectThe list of cascade connections
AccountName_utfstring (UTF8)The name of cascade connection
Online_boolbooleanOnline flag
Connected_boolbooleanThe flag indicates whether the cascade connection is established
LastError_u32number (uint32)The error last occurred if the cascade connection is in the fail state
ConnectedTime_dtDateConnection completion time
Hostname_strstring (ASCII)Host name of the destination VPN server
TargetHubName_strstring (ASCII)The Virtual Hub name
+
+

+

"SetLinkOnline" RPC API - Switch Cascade Connection to Online Status

+

Description

+

Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetLinkOnline",
+  "params": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
+
+

+

"SetLinkOffline" RPC API - Switch Cascade Connection to Offline Status

+

Description

+

Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetLinkOffline",
+  "params": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
+
+

+ +

Description

+

Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteLink",
+  "params": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
+
+

+ +

Description

+

Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "RenameLink",
+  "params": {
+    "HubName_str": "hubname",
+    "OldAccountName_utf": "oldaccountname",
+    "NewAccountName_utf": "newaccountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "OldAccountName_utf": "oldaccountname",
+    "NewAccountName_utf": "newaccountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
OldAccountName_utfstring (UTF8)The old name of the cascade connection
NewAccountName_utfstring (UTF8)The new name of the cascade connection
+
+

+

"GetLinkStatus" RPC API - Get Current Cascade Connection Status

+

Description

+

Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetLinkStatus",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "AccountName_utf": "accountname",
+    "Active_bool": false,
+    "Connected_bool": false,
+    "SessionStatus_u32": 0,
+    "ServerName_str": "servername",
+    "ServerPort_u32": 0,
+    "ServerProductName_str": "serverproductname",
+    "ServerProductVer_u32": 0,
+    "ServerProductBuild_u32": 0,
+    "ServerX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "StartTime_dt": "2020-08-01T12:24:36.123",
+    "FirstConnectionEstablisiedTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentConnectionEstablishTime_dt": "2020-08-01T12:24:36.123",
+    "NumConnectionsEatablished_u32": 0,
+    "HalfConnection_bool": false,
+    "QoS_bool": false,
+    "MaxTcpConnections_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "NumTcpConnectionsUpload_u32": 0,
+    "NumTcpConnectionsDownload_u32": 0,
+    "UseEncrypt_bool": false,
+    "CipherName_str": "ciphername",
+    "UseCompress_bool": false,
+    "IsRUDPSession_bool": false,
+    "UnderlayProtocol_str": "underlayprotocol",
+    "IsUdpAccelerationEnabled_bool": false,
+    "IsUsingUdpAcceleration_bool": false,
+    "SessionName_str": "sessionname",
+    "ConnectionName_str": "connectionname",
+    "SessionKey_bin": "SGVsbG8gV29ybGQ=",
+    "TotalSendSize_u64": 0,
+    "TotalRecvSize_u64": 0,
+    "TotalSendSizeReal_u64": 0,
+    "TotalRecvSizeReal_u64": 0,
+    "IsBridgeMode_bool": false,
+    "IsMonitorMode_bool": false,
+    "VLanId_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
Active_boolbooleanThe flag whether the cascade connection is enabled
Connected_boolbooleanThe flag whether the cascade connection is established
SessionStatus_u32number (enum)The session status
Values:
0: Connecting
1: Negotiating
2: During user authentication
3: Connection complete
4: Wait to retry
5: Idle state
ServerName_strstring (ASCII)The destination VPN server name
ServerPort_u32number (uint32)The port number of the server
ServerProductName_strstring (ASCII)Server product name
ServerProductVer_u32number (uint32)Server product version
ServerProductBuild_u32number (uint32)Server product build number
ServerX_binstring (Base64 binary)Server's X.509 certificate
ClientX_binstring (Base64 binary)Client certificate
StartTime_dtDateConnection start time
FirstConnectionEstablisiedTime_dtDateConnection completion time of the first connection
CurrentConnectionEstablishTime_dtDateConnection completion time of this connection
NumConnectionsEatablished_u32number (uint32)Number of connections have been established so far
HalfConnection_boolbooleanHalf-connection
QoS_boolbooleanVoIP / QoS
MaxTcpConnections_u32number (uint32)Maximum number of the underlying TCP connections
NumTcpConnections_u32number (uint32)Number of current underlying TCP connections
NumTcpConnectionsUpload_u32number (uint32)Number of underlying inbound TCP connections
NumTcpConnectionsDownload_u32number (uint32)Number of underlying outbound TCP connections
UseEncrypt_boolbooleanUse of encryption
CipherName_strstring (ASCII)Cipher algorithm name
UseCompress_boolbooleanUse of compression
IsRUDPSession_boolbooleanThe flag whether this is a R-UDP session
UnderlayProtocol_strstring (ASCII)Underlying physical communication protocol
IsUdpAccelerationEnabled_boolbooleanThe UDP acceleration is enabled
IsUsingUdpAcceleration_boolbooleanThe UDP acceleration is being actually used
SessionName_strstring (ASCII)Session name
ConnectionName_strstring (ASCII)Connection name
SessionKey_binstring (Base64 binary)Session key
TotalSendSize_u64number (uint64)Total transmitted data size
TotalRecvSize_u64number (uint64)Total received data size
TotalSendSizeReal_u64number (uint64)Total transmitted data size (no compression)
TotalRecvSizeReal_u64number (uint64)Total received data size (no compression)
IsBridgeMode_boolbooleanThe flag whether the VPN session is Bridge Mode
IsMonitorMode_boolbooleanThe flag whether the VPN session is Monitor mode
VLanId_u32number (uint32)VLAN ID
+
+

+

"AddAccess" RPC API - Add Access List Rule

+

Description

+

Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddAccess",
+  "params": {
+    "HubName_str": "hubname",
+    "AccessListSingle": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccessListSingle": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccessListSingleArray objectAccess list (Must be a single item)
Id_u32number (uint32)ID
Note_utfstring (UTF8)Specify a description (note) for this rule
Active_boolbooleanEnabled flag (true: enabled, false: disabled)
Priority_u32number (uint32)Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values.
Discard_boolbooleanThe flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded.
IsIPv6_boolbooleanThe flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6.
SrcIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field.
SrcSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
DestIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field.
DestSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
SrcIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field.
SrcSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
DestIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field.
DestSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
Protocol_u32number (enum)The IP protocol number
Values:
1: ICMP for IPv4
6: TCP
17: UDP
58: ICMP for IPv6
SrcPortStart_u32number (uint32)The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcPortEnd_u32number (uint32)The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortStart_u32number (uint32)The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortEnd_u32number (uint32)The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcUsername_strstring (ASCII)Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
DestUsername_strstring (ASCII)Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
CheckSrcMac_boolbooleanSpecify true if you want to check the source MAC address.
SrcMacAddress_binstring (Base64 binary)Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
SrcMacMask_binstring (Base64 binary)Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckDstMac_boolbooleanSpecify true if you want to check the destination MAC address.
DstMacAddress_binstring (Base64 binary)Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
DstMacMask_binstring (Base64 binary)Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckTcpState_boolbooleanSpecify true if you want to check the state of the TCP connection.
Established_boolbooleanValid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets.
Delay_u32number (uint32)Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most.
Jitter_u32number (uint32)Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate.
Loss_u32number (uint32)Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate.
RedirectUrl_strstring (ASCII)The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address.
+
+

+

"DeleteAccess" RPC API - Delete Rule from Access List

+

Description

+

Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteAccess",
+  "params": {
+    "HubName_str": "hubname",
+    "Id_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Id_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Id_u32number (uint32)ID
+
+

+

"EnumAccess" RPC API - Get Access List Rule List

+

Description

+

Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumAccess",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccessList": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccessListArray objectAccess list
Id_u32number (uint32)ID
Note_utfstring (UTF8)Specify a description (note) for this rule
Active_boolbooleanEnabled flag (true: enabled, false: disabled)
Priority_u32number (uint32)Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values.
Discard_boolbooleanThe flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded.
IsIPv6_boolbooleanThe flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6.
SrcIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field.
SrcSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
DestIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field.
DestSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
SrcIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field.
SrcSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
DestIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field.
DestSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
Protocol_u32number (enum)The IP protocol number
Values:
1: ICMP for IPv4
6: TCP
17: UDP
58: ICMP for IPv6
SrcPortStart_u32number (uint32)The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcPortEnd_u32number (uint32)The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortStart_u32number (uint32)The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortEnd_u32number (uint32)The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcUsername_strstring (ASCII)Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
DestUsername_strstring (ASCII)Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
CheckSrcMac_boolbooleanSpecify true if you want to check the source MAC address.
SrcMacAddress_binstring (Base64 binary)Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
SrcMacMask_binstring (Base64 binary)Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckDstMac_boolbooleanSpecify true if you want to check the destination MAC address.
DstMacAddress_binstring (Base64 binary)Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
DstMacMask_binstring (Base64 binary)Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckTcpState_boolbooleanSpecify true if you want to check the state of the TCP connection.
Established_boolbooleanValid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets.
Delay_u32number (uint32)Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most.
Jitter_u32number (uint32)Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate.
Loss_u32number (uint32)Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate.
RedirectUrl_strstring (ASCII)The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address.
+
+

+

"SetAccessList" RPC API - Replace all access lists on a single bulk API call

+

Description

+

Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetAccessList",
+  "params": {
+    "HubName_str": "hubname",
+    "AccessList": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccessList": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccessListArray objectAccess list
Id_u32number (uint32)ID
Note_utfstring (UTF8)Specify a description (note) for this rule
Active_boolbooleanEnabled flag (true: enabled, false: disabled)
Priority_u32number (uint32)Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values.
Discard_boolbooleanThe flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded.
IsIPv6_boolbooleanThe flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6.
SrcIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field.
SrcSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
DestIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field.
DestSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
SrcIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field.
SrcSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
DestIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field.
DestSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
Protocol_u32number (enum)The IP protocol number
Values:
1: ICMP for IPv4
6: TCP
17: UDP
58: ICMP for IPv6
SrcPortStart_u32number (uint32)The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcPortEnd_u32number (uint32)The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortStart_u32number (uint32)The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortEnd_u32number (uint32)The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcUsername_strstring (ASCII)Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
DestUsername_strstring (ASCII)Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
CheckSrcMac_boolbooleanSpecify true if you want to check the source MAC address.
SrcMacAddress_binstring (Base64 binary)Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
SrcMacMask_binstring (Base64 binary)Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckDstMac_boolbooleanSpecify true if you want to check the destination MAC address.
DstMacAddress_binstring (Base64 binary)Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
DstMacMask_binstring (Base64 binary)Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckTcpState_boolbooleanSpecify true if you want to check the state of the TCP connection.
Established_boolbooleanValid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets.
Delay_u32number (uint32)Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most.
Jitter_u32number (uint32)Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate.
Loss_u32number (uint32)Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate.
RedirectUrl_strstring (ASCII)The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address.
+
+

+

"CreateUser" RPC API - Create a user

+

Description

+

Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "NumLogin_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Specify the user name of the user
GroupName_strstring (ASCII)Assigned group name for the user
Realname_utfstring (UTF8)Optional real name (full name) of the user, allow using any Unicode characters
Note_utfstring (UTF8)Optional User Description
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateLast modified date and time
ExpireTime_dtDateExpiration date and time
AuthType_u32number (enum)Authentication method of the user
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
Auth_Password_strstring (ASCII)User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations.
UserX_binstring (Base64 binary)User certificate, valid only if AuthType_u32 == UserCert(2).
Serial_binstring (Base64 binary)Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3).
CommonName_utfstring (UTF8)Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3).
RadiusUsername_utfstring (UTF8)Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
NtUsername_utfstring (UTF8)Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
NumLogin_u32number (uint32)Number of total logins of the user
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"SetUser" RPC API - Change User Settings

+

Description

+

Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "NumLogin_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Specify the user name of the user
GroupName_strstring (ASCII)Assigned group name for the user
Realname_utfstring (UTF8)Optional real name (full name) of the user, allow using any Unicode characters
Note_utfstring (UTF8)Optional User Description
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateLast modified date and time
ExpireTime_dtDateExpiration date and time
AuthType_u32number (enum)Authentication method of the user
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
Auth_Password_strstring (ASCII)User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations.
UserX_binstring (Base64 binary)User certificate, valid only if AuthType_u32 == UserCert(2).
Serial_binstring (Base64 binary)Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3).
CommonName_utfstring (UTF8)Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3).
RadiusUsername_utfstring (UTF8)Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
NtUsername_utfstring (UTF8)Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
NumLogin_u32number (uint32)Number of total logins of the user
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"GetUser" RPC API - Get User Settings

+

Description

+

Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "NumLogin_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Specify the user name of the user
GroupName_strstring (ASCII)Assigned group name for the user
Realname_utfstring (UTF8)Optional real name (full name) of the user, allow using any Unicode characters
Note_utfstring (UTF8)Optional User Description
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateLast modified date and time
ExpireTime_dtDateExpiration date and time
AuthType_u32number (enum)Authentication method of the user
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
Auth_Password_strstring (ASCII)User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations.
UserX_binstring (Base64 binary)User certificate, valid only if AuthType_u32 == UserCert(2).
Serial_binstring (Base64 binary)Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3).
CommonName_utfstring (UTF8)Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3).
RadiusUsername_utfstring (UTF8)Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
NtUsername_utfstring (UTF8)Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
NumLogin_u32number (uint32)Number of total logins of the user
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"DeleteUser" RPC API - Delete a user

+

Description

+

Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)User or group name
+
+

+

"EnumUser" RPC API - Get List of Users

+

Description

+

Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumUser",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "UserList": [
+      {
+        "Name_str": "name",
+        "GroupName_str": "groupname",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "AuthType_u32": 0,
+        "NumLogin_u32": 0,
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "DenyAccess_bool": false,
+        "IsTrafficFilled_bool": false,
+        "IsExpiresFilled_bool": false,
+        "Expires_dt": "2020-08-01T12:24:36.123",
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "Name_str": "name",
+        "GroupName_str": "groupname",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "AuthType_u32": 0,
+        "NumLogin_u32": 0,
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "DenyAccess_bool": false,
+        "IsTrafficFilled_bool": false,
+        "IsExpiresFilled_bool": false,
+        "Expires_dt": "2020-08-01T12:24:36.123",
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "Name_str": "name",
+        "GroupName_str": "groupname",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "AuthType_u32": 0,
+        "NumLogin_u32": 0,
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "DenyAccess_bool": false,
+        "IsTrafficFilled_bool": false,
+        "IsExpiresFilled_bool": false,
+        "Expires_dt": "2020-08-01T12:24:36.123",
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
UserListArray objectUser list
Name_strstring (ASCII)User name
GroupName_strstring (ASCII)Group name
Realname_utfstring (UTF8)Real name
Note_utfstring (UTF8)Note
AuthType_u32number (enum)Authentication method
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
NumLogin_u32number (uint32)Number of logins
LastLoginTime_dtDateLast login date and time
DenyAccess_boolbooleanAccess denied
IsTrafficFilled_boolbooleanFlag of whether the traffic variable is set
IsExpiresFilled_boolbooleanFlag of whether expiration date variable is set
Expires_dtDateExpiration date
Ex.Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Ex.Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Ex.Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Ex.Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Ex.Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Ex.Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Ex.Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Ex.Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
+
+

+

"CreateGroup" RPC API - Create Group

+

Description

+

Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)The group name
Realname_utfstring (UTF8)Optional real name (full name) of the group, allow using any Unicode characters
Note_utfstring (UTF8)Optional, specify a description of the group
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"SetGroup" RPC API - Set group settings

+

Description

+

Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)The group name
Realname_utfstring (UTF8)Optional real name (full name) of the group, allow using any Unicode characters
Note_utfstring (UTF8)Optional, specify a description of the group
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"GetGroup" RPC API - Get Group Setting (Sync mode)

+

Description

+

Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)The group name
Realname_utfstring (UTF8)Optional real name (full name) of the group, allow using any Unicode characters
Note_utfstring (UTF8)Optional, specify a description of the group
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"DeleteGroup" RPC API - Delete User from Group

+

Description

+

Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)User or group name
+
+

+

"EnumGroup" RPC API - Get List of Groups

+

Description

+

Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumGroup",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "GroupList": [
+      {
+        "Name_str": "name",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "NumUsers_u32": 0,
+        "DenyAccess_bool": false
+      },
+      {
+        "Name_str": "name",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "NumUsers_u32": 0,
+        "DenyAccess_bool": false
+      },
+      {
+        "Name_str": "name",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "NumUsers_u32": 0,
+        "DenyAccess_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
GroupListArray objectGroup list
Name_strstring (ASCII)User name
Realname_utfstring (UTF8)Real name
Note_utfstring (UTF8)Note
NumUsers_u32number (uint32)Number of users
DenyAccess_boolbooleanAccess denied
+
+

+

"EnumSession" RPC API - Get List of Connected VPN Sessions

+

Description

+

Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumSession",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "SessionList": [
+      {
+        "Name_str": "name",
+        "RemoteSession_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "Username_str": "username",
+        "ClientIP_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "MaxNumTcp_u32": 0,
+        "CurrentNumTcp_u32": 0,
+        "PacketSize_u64": 0,
+        "PacketNum_u64": 0,
+        "LinkMode_bool": false,
+        "SecureNATMode_bool": false,
+        "BridgeMode_bool": false,
+        "Layer3Mode_bool": false,
+        "Client_BridgeMode_bool": false,
+        "Client_MonitorMode_bool": false,
+        "VLanId_u32": 0,
+        "UniqueId_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Name_str": "name",
+        "RemoteSession_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "Username_str": "username",
+        "ClientIP_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "MaxNumTcp_u32": 0,
+        "CurrentNumTcp_u32": 0,
+        "PacketSize_u64": 0,
+        "PacketNum_u64": 0,
+        "LinkMode_bool": false,
+        "SecureNATMode_bool": false,
+        "BridgeMode_bool": false,
+        "Layer3Mode_bool": false,
+        "Client_BridgeMode_bool": false,
+        "Client_MonitorMode_bool": false,
+        "VLanId_u32": 0,
+        "UniqueId_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Name_str": "name",
+        "RemoteSession_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "Username_str": "username",
+        "ClientIP_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "MaxNumTcp_u32": 0,
+        "CurrentNumTcp_u32": 0,
+        "PacketSize_u64": 0,
+        "PacketNum_u64": 0,
+        "LinkMode_bool": false,
+        "SecureNATMode_bool": false,
+        "BridgeMode_bool": false,
+        "Layer3Mode_bool": false,
+        "Client_BridgeMode_bool": false,
+        "Client_MonitorMode_bool": false,
+        "VLanId_u32": 0,
+        "UniqueId_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
SessionListArray objectVPN sessions list
Name_strstring (ASCII)Session name
RemoteSession_boolbooleanRemote session
RemoteHostname_strstring (ASCII)Remote server name
Username_strstring (ASCII)User name
ClientIP_ipstring (IP address)IP address
Hostname_strstring (ASCII)Host name
MaxNumTcp_u32number (uint32)Maximum number of underlying TCP connections
CurrentNumTcp_u32number (uint32)Number of current underlying TCP connections
PacketSize_u64number (uint64)Packet size transmitted
PacketNum_u64number (uint64)Number of packets transmitted
LinkMode_boolbooleanIs a Cascade VPN session
SecureNATMode_boolbooleanIs a SecureNAT VPN session
BridgeMode_boolbooleanIs the VPN session for Local Bridge
Layer3Mode_boolbooleanIs a Layer-3 Switch VPN session
Client_BridgeMode_boolbooleanIs in Bridge Mode
Client_MonitorMode_boolbooleanIs in Monitor Mode
VLanId_u32number (uint32)VLAN ID
UniqueId_binstring (Base64 binary)Unique ID of the VPN Session
CreatedTime_dtDateCreation date and time
LastCommTime_dtDateLast communication date and time
+
+

+

"GetSessionStatus" RPC API - Get Session Status

+

Description

+

Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSessionStatus",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Username_str": "username",
+    "RealUsername_str": "realusername",
+    "GroupName_str": "groupname",
+    "LinkMode_bool": false,
+    "Client_Ip_Address_ip": "192.168.0.1",
+    "SessionStatus_ClientHostName_str": "clienthostname",
+    "Active_bool": false,
+    "Connected_bool": false,
+    "SessionStatus_u32": 0,
+    "ServerName_str": "servername",
+    "ServerPort_u32": 0,
+    "ServerProductName_str": "serverproductname",
+    "ServerProductVer_u32": 0,
+    "ServerProductBuild_u32": 0,
+    "StartTime_dt": "2020-08-01T12:24:36.123",
+    "FirstConnectionEstablisiedTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentConnectionEstablishTime_dt": "2020-08-01T12:24:36.123",
+    "NumConnectionsEatablished_u32": 0,
+    "HalfConnection_bool": false,
+    "QoS_bool": false,
+    "MaxTcpConnections_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "NumTcpConnectionsUpload_u32": 0,
+    "NumTcpConnectionsDownload_u32": 0,
+    "UseEncrypt_bool": false,
+    "CipherName_str": "ciphername",
+    "UseCompress_bool": false,
+    "IsRUDPSession_bool": false,
+    "UnderlayProtocol_str": "underlayprotocol",
+    "IsUdpAccelerationEnabled_bool": false,
+    "IsUsingUdpAcceleration_bool": false,
+    "SessionName_str": "sessionname",
+    "ConnectionName_str": "connectionname",
+    "SessionKey_bin": "SGVsbG8gV29ybGQ=",
+    "TotalSendSize_u64": 0,
+    "TotalRecvSize_u64": 0,
+    "TotalSendSizeReal_u64": 0,
+    "TotalRecvSizeReal_u64": 0,
+    "IsBridgeMode_bool": false,
+    "IsMonitorMode_bool": false,
+    "VLanId_u32": 0,
+    "ClientProductName_str": "clientproductname",
+    "ClientProductVer_u32": 0,
+    "ClientProductBuild_u32": 0,
+    "ClientOsName_str": "clientosname",
+    "ClientOsVer_str": "clientosver",
+    "ClientOsProductId_str": "clientosproductid",
+    "ClientHostname_str": "clienthostname",
+    "UniqueId_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)VPN session name
Username_strstring (ASCII)User name
RealUsername_strstring (ASCII)Real user name which was used for the authentication
GroupName_strstring (ASCII)Group name
LinkMode_boolbooleanIs Cascade Session
Client_Ip_Address_ipstring (IP address)Client IP address
SessionStatus_ClientHostName_strstring (ASCII)Client host name
Active_boolbooleanOperation flag
Connected_boolbooleanConnected flag
SessionStatus_u32number (enum)State of the client session
Values:
0: Connecting
1: Negotiating
2: During user authentication
3: Connection complete
4: Wait to retry
5: Idle state
ServerName_strstring (ASCII)Server name
ServerPort_u32number (uint32)Port number of the server
ServerProductName_strstring (ASCII)Server product name
ServerProductVer_u32number (uint32)Server product version
ServerProductBuild_u32number (uint32)Server product build number
StartTime_dtDateConnection start time
FirstConnectionEstablisiedTime_dtDateConnection completion time of the first connection
CurrentConnectionEstablishTime_dtDateConnection completion time of this connection
NumConnectionsEatablished_u32number (uint32)Number of connections have been established so far
HalfConnection_boolbooleanHalf-connection
QoS_boolbooleanVoIP / QoS
MaxTcpConnections_u32number (uint32)Maximum number of the underlying TCP connections
NumTcpConnections_u32number (uint32)Number of current underlying TCP connections
NumTcpConnectionsUpload_u32number (uint32)Number of inbound underlying connections
NumTcpConnectionsDownload_u32number (uint32)Number of outbound underlying connections
UseEncrypt_boolbooleanUse of encryption
CipherName_strstring (ASCII)Cipher algorithm name
UseCompress_boolbooleanUse of compression
IsRUDPSession_boolbooleanIs R-UDP session
UnderlayProtocol_strstring (ASCII)Physical underlying communication protocol
IsUdpAccelerationEnabled_boolbooleanThe UDP acceleration is enabled
IsUsingUdpAcceleration_boolbooleanUsing the UDP acceleration function
SessionName_strstring (ASCII)VPN session name
ConnectionName_strstring (ASCII)Connection name
SessionKey_binstring (Base64 binary)Session key
TotalSendSize_u64number (uint64)Total transmitted data size
TotalRecvSize_u64number (uint64)Total received data size
TotalSendSizeReal_u64number (uint64)Total transmitted data size (no compression)
TotalRecvSizeReal_u64number (uint64)Total received data size (no compression)
IsBridgeMode_boolbooleanIs Bridge Mode
IsMonitorMode_boolbooleanIs Monitor mode
VLanId_u32number (uint32)VLAN ID
ClientProductName_strstring (ASCII)Client product name
ClientProductVer_u32number (uint32)Client version
ClientProductBuild_u32number (uint32)Client build number
ClientOsName_strstring (ASCII)Client OS name
ClientOsVer_strstring (ASCII)Client OS version
ClientOsProductId_strstring (ASCII)Client OS Product ID
ClientHostname_strstring (ASCII)Client host name
UniqueId_binstring (Base64 binary)Unique ID
+
+

+

"DeleteSession" RPC API - Disconnect Session

+

Description

+

Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteSession",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Session name
+
+

+

"EnumMacTable" RPC API - Get the MAC Address Table Database

+

Description

+

Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumMacTable",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "MacTable": [
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "VlanId_u32": 0
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "VlanId_u32": 0
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "VlanId_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
MacTableArray objectMAC table
Key_u32number (uint32)Key ID
SessionName_strstring (ASCII)Session name
MacAddress_binstring (Base64 binary)MAC address
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateUpdating date
RemoteItem_boolbooleanRemote items
RemoteHostname_strstring (ASCII)Remote host name
VlanId_u32number (uint32)VLAN ID
+
+

+

"DeleteMacTable" RPC API - Delete MAC Address Table Entry

+

Description

+

Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteMacTable",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
+
+

+

"EnumIpTable" RPC API - Get the IP Address Table Database

+

Description

+

Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumIpTable",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "IpTable": [
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "IpAddress_ip": "192.168.0.1",
+        "DhcpAllocated_bool": false,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname"
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "IpAddress_ip": "192.168.0.1",
+        "DhcpAllocated_bool": false,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname"
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "IpAddress_ip": "192.168.0.1",
+        "DhcpAllocated_bool": false,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
IpTableArray objectMAC table
Key_u32number (uint32)Key ID
SessionName_strstring (ASCII)Session name
IpAddress_ipstring (IP address)IP address
DhcpAllocated_boolbooleanAssigned by the DHCP
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateUpdating date
RemoteItem_boolbooleanRemote items
RemoteHostname_strstring (ASCII)Remote host name
+
+

+

"DeleteIpTable" RPC API - Delete IP Address Table Entry

+

Description

+

Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteIpTable",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
+
+

+

"SetKeep" RPC API - Set the Keep Alive Internet Connection Function

+

Description

+

Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetKeep",
+  "params": {
+    "UseKeepConnect_bool": false,
+    "KeepConnectHost_str": "keepconnecthost",
+    "KeepConnectPort_u32": 0,
+    "KeepConnectProtocol_u32": 0,
+    "KeepConnectInterval_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "UseKeepConnect_bool": false,
+    "KeepConnectHost_str": "keepconnecthost",
+    "KeepConnectPort_u32": 0,
+    "KeepConnectProtocol_u32": 0,
+    "KeepConnectInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
UseKeepConnect_boolbooleanThe flag to enable keep-alive to the Internet
KeepConnectHost_strstring (ASCII)Specify the host name or IP address of the destination
KeepConnectPort_u32number (uint32)Specify the port number of the destination
KeepConnectProtocol_u32number (enum)Protocol type
Values:
0: TCP
1: UDP
KeepConnectInterval_u32number (uint32)Interval Between Packets Sends (Seconds)
+
+

+

"GetKeep" RPC API - Get the Keep Alive Internet Connection Function

+

Description

+

Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetKeep",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "UseKeepConnect_bool": false,
+    "KeepConnectHost_str": "keepconnecthost",
+    "KeepConnectPort_u32": 0,
+    "KeepConnectProtocol_u32": 0,
+    "KeepConnectInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
UseKeepConnect_boolbooleanThe flag to enable keep-alive to the Internet
KeepConnectHost_strstring (ASCII)Specify the host name or IP address of the destination
KeepConnectPort_u32number (uint32)Specify the port number of the destination
KeepConnectProtocol_u32number (enum)Protocol type
Values:
0: TCP
1: UDP
KeepConnectInterval_u32number (uint32)Interval Between Packets Sends (Seconds)
+
+

+

"EnableSecureNAT" RPC API - Enable the Virtual NAT and DHCP Server Function (SecureNAT Function)

+

Description

+

Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnableSecureNAT",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
+
+

+

"DisableSecureNAT" RPC API - Disable the Virtual NAT and DHCP Server Function (SecureNAT Function)

+

Description

+

Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DisableSecureNAT",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
+
+

+

"SetSecureNATOption" RPC API - Change Settings of SecureNAT Function

+

Description

+

Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetSecureNATOption",
+  "params": {
+    "RpcHubName_str": "rpchubname",
+    "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+    "Ip_ip": "192.168.0.1",
+    "Mask_ip": "255.255.255.255",
+    "UseNat_bool": false,
+    "Mtu_u32": 0,
+    "NatTcpTimeout_u32": 0,
+    "NatUdpTimeout_u32": 0,
+    "UseDhcp_bool": false,
+    "DhcpLeaseIPStart_ip": "192.168.0.1",
+    "DhcpLeaseIPEnd_ip": "192.168.0.1",
+    "DhcpSubnetMask_ip": "255.255.255.255",
+    "DhcpExpireTimeSpan_u32": 0,
+    "DhcpGatewayAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress2_ip": "192.168.0.1",
+    "DhcpDomainName_str": "dhcpdomainname",
+    "SaveLog_bool": false,
+    "ApplyDhcpPushRoutes_bool": false,
+    "DhcpPushRoutes_str": "dhcppushroutes"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "RpcHubName_str": "rpchubname",
+    "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+    "Ip_ip": "192.168.0.1",
+    "Mask_ip": "255.255.255.255",
+    "UseNat_bool": false,
+    "Mtu_u32": 0,
+    "NatTcpTimeout_u32": 0,
+    "NatUdpTimeout_u32": 0,
+    "UseDhcp_bool": false,
+    "DhcpLeaseIPStart_ip": "192.168.0.1",
+    "DhcpLeaseIPEnd_ip": "192.168.0.1",
+    "DhcpSubnetMask_ip": "255.255.255.255",
+    "DhcpExpireTimeSpan_u32": 0,
+    "DhcpGatewayAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress2_ip": "192.168.0.1",
+    "DhcpDomainName_str": "dhcpdomainname",
+    "SaveLog_bool": false,
+    "ApplyDhcpPushRoutes_bool": false,
+    "DhcpPushRoutes_str": "dhcppushroutes"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
RpcHubName_strstring (ASCII)Target Virtual HUB name
MacAddress_binstring (Base64 binary)MAC address
Ip_ipstring (IP address)IP address
Mask_ipstring (IP address)Subnet mask
UseNat_boolbooleanUse flag of the Virtual NAT function
Mtu_u32number (uint32)MTU value (Standard: 1500)
NatTcpTimeout_u32number (uint32)NAT TCP timeout in seconds
NatUdpTimeout_u32number (uint32)NAT UDP timeout in seconds
UseDhcp_boolbooleanUsing flag of DHCP function
DhcpLeaseIPStart_ipstring (IP address)Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10)
DhcpLeaseIPEnd_ipstring (IP address)Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200)
DhcpSubnetMask_ipstring (IP address)Specify the subnet mask to be specified for the client. (Example: 255.255.255.0)
DhcpExpireTimeSpan_u32number (uint32)Specify the expiration date in second units for leasing an IP address to a client.
DhcpGatewayAddress_ipstring (IP address)Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway.
DhcpDnsServerAddress_ipstring (IP address)Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDnsServerAddress2_ipstring (IP address)Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDomainName_strstring (ASCII)Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name.
SaveLog_boolbooleanSpecify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting.
ApplyDhcpPushRoutes_boolbooleanThe flag to enable the DhcpPushRoutes_str field.
DhcpPushRoutes_strstring (ASCII)Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes.
+
+

+

"GetSecureNATOption" RPC API - Get Settings of SecureNAT Function

+

Description

+

Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSecureNATOption",
+  "params": {
+    "RpcHubName_str": "rpchubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "RpcHubName_str": "rpchubname",
+    "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+    "Ip_ip": "192.168.0.1",
+    "Mask_ip": "255.255.255.255",
+    "UseNat_bool": false,
+    "Mtu_u32": 0,
+    "NatTcpTimeout_u32": 0,
+    "NatUdpTimeout_u32": 0,
+    "UseDhcp_bool": false,
+    "DhcpLeaseIPStart_ip": "192.168.0.1",
+    "DhcpLeaseIPEnd_ip": "192.168.0.1",
+    "DhcpSubnetMask_ip": "255.255.255.255",
+    "DhcpExpireTimeSpan_u32": 0,
+    "DhcpGatewayAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress2_ip": "192.168.0.1",
+    "DhcpDomainName_str": "dhcpdomainname",
+    "SaveLog_bool": false,
+    "ApplyDhcpPushRoutes_bool": false,
+    "DhcpPushRoutes_str": "dhcppushroutes"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
RpcHubName_strstring (ASCII)Target Virtual HUB name
MacAddress_binstring (Base64 binary)MAC address
Ip_ipstring (IP address)IP address
Mask_ipstring (IP address)Subnet mask
UseNat_boolbooleanUse flag of the Virtual NAT function
Mtu_u32number (uint32)MTU value (Standard: 1500)
NatTcpTimeout_u32number (uint32)NAT TCP timeout in seconds
NatUdpTimeout_u32number (uint32)NAT UDP timeout in seconds
UseDhcp_boolbooleanUsing flag of DHCP function
DhcpLeaseIPStart_ipstring (IP address)Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10)
DhcpLeaseIPEnd_ipstring (IP address)Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200)
DhcpSubnetMask_ipstring (IP address)Specify the subnet mask to be specified for the client. (Example: 255.255.255.0)
DhcpExpireTimeSpan_u32number (uint32)Specify the expiration date in second units for leasing an IP address to a client.
DhcpGatewayAddress_ipstring (IP address)Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway.
DhcpDnsServerAddress_ipstring (IP address)Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDnsServerAddress2_ipstring (IP address)Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDomainName_strstring (ASCII)Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name.
SaveLog_boolbooleanSpecify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting.
ApplyDhcpPushRoutes_boolbooleanThe flag to enable the DhcpPushRoutes_str field.
DhcpPushRoutes_strstring (ASCII)Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes.
+
+

+

"EnumNAT" RPC API - Get Virtual NAT Function Session Table of SecureNAT Function

+

Description

+

Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumNAT",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "NatTable": [
+      {
+        "Id_u32": 0,
+        "Protocol_u32": 0,
+        "SrcIp_ip": "192.168.0.1",
+        "SrcHost_str": "srchost",
+        "SrcPort_u32": 0,
+        "DestIp_ip": "192.168.0.1",
+        "DestHost_str": "desthost",
+        "DestPort_u32": 0,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "SendSize_u64": 0,
+        "RecvSize_u64": 0,
+        "TcpStatus_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Protocol_u32": 0,
+        "SrcIp_ip": "192.168.0.1",
+        "SrcHost_str": "srchost",
+        "SrcPort_u32": 0,
+        "DestIp_ip": "192.168.0.1",
+        "DestHost_str": "desthost",
+        "DestPort_u32": 0,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "SendSize_u64": 0,
+        "RecvSize_u64": 0,
+        "TcpStatus_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Protocol_u32": 0,
+        "SrcIp_ip": "192.168.0.1",
+        "SrcHost_str": "srchost",
+        "SrcPort_u32": 0,
+        "DestIp_ip": "192.168.0.1",
+        "DestHost_str": "desthost",
+        "DestPort_u32": 0,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "SendSize_u64": 0,
+        "RecvSize_u64": 0,
+        "TcpStatus_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual Hub Name
NatTableArray objectNAT item
Id_u32number (uint32)ID
Protocol_u32number (enum)Protocol
Values:
0: TCP
1: UDP
2: DNS
3: ICMP
SrcIp_ipstring (IP address)Source IP address
SrcHost_strstring (ASCII)Source host name
SrcPort_u32number (uint32)Source port number
DestIp_ipstring (IP address)Destination IP address
DestHost_strstring (ASCII)Destination host name
DestPort_u32number (uint32)Destination port number
CreatedTime_dtDateConnection time
LastCommTime_dtDateLast communication time
SendSize_u64number (uint64)Transmission size
RecvSize_u64number (uint64)Receive size
TcpStatus_u32number (enum)TCP state
Values:
0: Connecting
1: Send the RST (Connection failure or disconnected)
2: Connection complete
3: Connection established
4: Wait for socket disconnection
+
+

+

"EnumDHCP" RPC API - Get Virtual DHCP Server Function Lease Table of SecureNAT Function

+

Description

+

Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumDHCP",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "DhcpTable": [
+      {
+        "Id_u32": 0,
+        "LeasedTime_dt": "2020-08-01T12:24:36.123",
+        "ExpireTime_dt": "2020-08-01T12:24:36.123",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "IpAddress_ip": "192.168.0.1",
+        "Mask_u32": 0,
+        "Hostname_str": "hostname"
+      },
+      {
+        "Id_u32": 0,
+        "LeasedTime_dt": "2020-08-01T12:24:36.123",
+        "ExpireTime_dt": "2020-08-01T12:24:36.123",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "IpAddress_ip": "192.168.0.1",
+        "Mask_u32": 0,
+        "Hostname_str": "hostname"
+      },
+      {
+        "Id_u32": 0,
+        "LeasedTime_dt": "2020-08-01T12:24:36.123",
+        "ExpireTime_dt": "2020-08-01T12:24:36.123",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "IpAddress_ip": "192.168.0.1",
+        "Mask_u32": 0,
+        "Hostname_str": "hostname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual Hub Name
DhcpTableArray objectDHCP Item
Id_u32number (uint32)ID
LeasedTime_dtDateLease time
ExpireTime_dtDateExpiration date
MacAddress_binstring (Base64 binary)MAC address
IpAddress_ipstring (IP address)IP address
Mask_u32number (uint32)Subnet mask
Hostname_strstring (ASCII)Host name
+
+

+

"GetSecureNATStatus" RPC API - Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function)

+

Description

+

Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSecureNATStatus",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "NumTcpSessions_u32": 0,
+    "NumUdpSessions_u32": 0,
+    "NumIcmpSessions_u32": 0,
+    "NumDnsSessions_u32": 0,
+    "NumDhcpClients_u32": 0,
+    "IsKernelMode_bool": false,
+    "IsRawIpMode_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual Hub Name
NumTcpSessions_u32number (uint32)Number of TCP sessions
NumUdpSessions_u32number (uint32)Ntmber of UDP sessions
NumIcmpSessions_u32number (uint32)Nymber of ICMP sessions
NumDnsSessions_u32number (uint32)Number of DNS sessions
NumDhcpClients_u32number (uint32)Number of DHCP clients
IsKernelMode_boolbooleanWhether the NAT is operating in the Kernel Mode
IsRawIpMode_boolbooleanWhether the NAT is operating in the Raw IP Mode
+
+

+

"EnumEthernet" RPC API - Get List of Network Adapters Usable as Local Bridge

+

Description

+

Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumEthernet",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "EthList": [
+      {
+        "DeviceName_str": "devicename",
+        "NetworkConnectionName_utf": "networkconnectionname"
+      },
+      {
+        "DeviceName_str": "devicename",
+        "NetworkConnectionName_utf": "networkconnectionname"
+      },
+      {
+        "DeviceName_str": "devicename",
+        "NetworkConnectionName_utf": "networkconnectionname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EthListArray objectEthernet Network Adapters list
DeviceName_strstring (ASCII)Device name
NetworkConnectionName_utfstring (UTF8)Network connection name (description)
+
+

+

"AddLocalBridge" RPC API - Create Local Bridge Connection

+

Description

+

Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddLocalBridge",
+  "params": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb",
+    "Online_bool": false,
+    "Active_bool": false,
+    "TapMode_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DeviceName_strstring (ASCII)Physical Ethernet device name
HubNameLB_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
Active_boolbooleanRunning flag
TapMode_boolbooleanSpecify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions).
+
+

+

"DeleteLocalBridge" RPC API - Delete Local Bridge Connection

+

Description

+

Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteLocalBridge",
+  "params": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb",
+    "Online_bool": false,
+    "Active_bool": false,
+    "TapMode_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DeviceName_strstring (ASCII)Physical Ethernet device name
HubNameLB_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
Active_boolbooleanRunning flag
TapMode_boolbooleanSpecify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions).
+
+

+

"EnumLocalBridge" RPC API - Get List of Local Bridge Connection

+

Description

+

Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumLocalBridge",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "LocalBridgeList": [
+      {
+        "DeviceName_str": "devicename",
+        "HubNameLB_str": "hubnamelb",
+        "Online_bool": false,
+        "Active_bool": false,
+        "TapMode_bool": false
+      },
+      {
+        "DeviceName_str": "devicename",
+        "HubNameLB_str": "hubnamelb",
+        "Online_bool": false,
+        "Active_bool": false,
+        "TapMode_bool": false
+      },
+      {
+        "DeviceName_str": "devicename",
+        "HubNameLB_str": "hubnamelb",
+        "Online_bool": false,
+        "Active_bool": false,
+        "TapMode_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
LocalBridgeListArray objectLocal Bridge list
DeviceName_strstring (ASCII)Physical Ethernet device name
HubNameLB_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
Active_boolbooleanRunning flag
TapMode_boolbooleanSpecify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions).
+
+

+

"GetBridgeSupport" RPC API - Get whether the localbridge function is supported on the current system

+

Description

+

Get whether the localbridge function is supported on the current system.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetBridgeSupport",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IsBridgeSupportedOs_bool": false,
+    "IsWinPcapNeeded_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IsBridgeSupportedOs_boolbooleanWhether the OS supports the Local Bridge function
IsWinPcapNeeded_boolbooleanWhether WinPcap is necessary to install
+
+

+

"RebootServer" RPC API - Reboot VPN Server Service

+

Description

+

Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "RebootServer",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"GetCaps" RPC API - Get List of Server Functions / Capability

+

Description

+

Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetCaps",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "CapsList": [
+      {
+        "CapsName_str": "capsname",
+        "CapsValue_u32": 0,
+        "CapsDescrption_utf": "capsdescrption"
+      },
+      {
+        "CapsName_str": "capsname",
+        "CapsValue_u32": 0,
+        "CapsDescrption_utf": "capsdescrption"
+      },
+      {
+        "CapsName_str": "capsname",
+        "CapsValue_u32": 0,
+        "CapsDescrption_utf": "capsdescrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
CapsListArray objectCaps list of the VPN Server
CapsName_strstring (ASCII)Name
CapsValue_u32number (uint32)Value
CapsDescrption_utfstring (UTF8)Descrption
+
+

+

"GetConfig" RPC API - Get the current configuration of the VPN Server

+

Description

+

Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetConfig",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "FileName_str": "filename",
+    "FileData_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FileName_strstring (ASCII)File name (valid only for returning from the server)
FileData_binstring (Base64 binary)File data
+
+

+

"SetConfig" RPC API - Write Configuration File to VPN Server

+

Description

+

Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetConfig",
+  "params": {
+    "FileData_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "FileName_str": "filename",
+    "FileData_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FileName_strstring (ASCII)File name (valid only for returning from the server)
FileData_binstring (Base64 binary)File data
+
+

+

"GetDefaultHubAdminOptions" RPC API - Get Virtual Hub Administration Option default values

+

Description

+

Get Virtual Hub Administration Option default values.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetDefaultHubAdminOptions",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"GetHubAdminOptions" RPC API - Get List of Virtual Hub Administration Options

+

Description

+

Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubAdminOptions",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"SetHubAdminOptions" RPC API - Set Values of Virtual Hub Administration Options

+

Description

+

Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubAdminOptions",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"GetHubExtOptions" RPC API - Get List of Virtual Hub Extended Options

+

Description

+

Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubExtOptions",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"SetHubExtOptions" RPC API - Set a Value of Virtual Hub Extended Options

+

Description

+

Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubExtOptions",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"AddL3Switch" RPC API - Define New Virtual Layer 3 Switch

+

Description

+

Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"DelL3Switch" RPC API - Delete Virtual Layer 3 Switch

+

Description

+

Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"EnumL3Switch" RPC API - Get List of Virtual Layer 3 Switches

+

Description

+

Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumL3Switch",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "L3SWList": [
+      {
+        "Name_str": "name",
+        "NumInterfaces_u32": 0,
+        "NumTables_u32": 0,
+        "Active_bool": false,
+        "Online_bool": false
+      },
+      {
+        "Name_str": "name",
+        "NumInterfaces_u32": 0,
+        "NumTables_u32": 0,
+        "Active_bool": false,
+        "Online_bool": false
+      },
+      {
+        "Name_str": "name",
+        "NumInterfaces_u32": 0,
+        "NumTables_u32": 0,
+        "Active_bool": false,
+        "Online_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
L3SWListArray objectLayer-3 switch list
Name_strstring (ASCII)Name of the layer-3 switch
NumInterfaces_u32number (uint32)Number of layer-3 switch virtual interfaces
NumTables_u32number (uint32)Number of routing tables
Active_boolbooleanActivated flag
Online_boolbooleanOnline flag
+
+

+

"StartL3Switch" RPC API - Start Virtual Layer 3 Switch Operation

+

Description

+

Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "StartL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"StopL3Switch" RPC API - Stop Virtual Layer 3 Switch Operation

+

Description

+

Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "StopL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"AddL3If" RPC API - Add Virtual Interface to Virtual Layer 3 Switch

+

Description

+

Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddL3If",
+  "params": {
+    "Name_str": "name",
+    "HubName_str": "hubname",
+    "IpAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "HubName_str": "hubname",
+    "IpAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
HubName_strstring (ASCII)Virtual HUB name
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask
+
+

+

"DelL3If" RPC API - Delete Virtual Interface of Virtual Layer 3 Switch

+

Description

+

Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelL3If",
+  "params": {
+    "Name_str": "name",
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "HubName_str": "hubname",
+    "IpAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
HubName_strstring (ASCII)Virtual HUB name
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask
+
+

+

"EnumL3If" RPC API - Get List of Interfaces Registered on the Virtual Layer 3 Switch

+

Description

+

Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumL3If",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "L3IFList": [
+      {
+        "Name_str": "name",
+        "HubName_str": "hubname",
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Name_str": "name",
+        "HubName_str": "hubname",
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Name_str": "name",
+        "HubName_str": "hubname",
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 switch name
L3IFListArray objectLayer-3 interface list
Name_strstring (ASCII)L3 switch name
HubName_strstring (ASCII)Virtual HUB name
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask
+
+

+

"AddL3Table" RPC API - Add Routing Table Entry for Virtual Layer 3 Switch

+

Description

+

Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddL3Table",
+  "params": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
NetworkAddress_ipstring (IP address)Network address
SubnetMask_ipstring (IP address)Subnet mask
GatewayAddress_ipstring (IP address)Gateway address
Metric_u32number (uint32)Metric
+
+

+

"DelL3Table" RPC API - Delete Routing Table Entry of Virtual Layer 3 Switch

+

Description

+

Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelL3Table",
+  "params": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
NetworkAddress_ipstring (IP address)Network address
SubnetMask_ipstring (IP address)Subnet mask
GatewayAddress_ipstring (IP address)Gateway address
Metric_u32number (uint32)Metric
+
+

+

"EnumL3Table" RPC API - Get List of Routing Tables of Virtual Layer 3 Switch

+

Description

+

Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumL3Table",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "L3Table": [
+      {
+        "Name_str": "name",
+        "NetworkAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255",
+        "GatewayAddress_ip": "192.168.0.1",
+        "Metric_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "NetworkAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255",
+        "GatewayAddress_ip": "192.168.0.1",
+        "Metric_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "NetworkAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255",
+        "GatewayAddress_ip": "192.168.0.1",
+        "Metric_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
L3TableArray objectRouting table item list
Name_strstring (ASCII)L3 switch name
NetworkAddress_ipstring (IP address)Network address
SubnetMask_ipstring (IP address)Subnet mask
GatewayAddress_ipstring (IP address)Gateway address
Metric_u32number (uint32)Metric
+
+

+

"EnumCrl" RPC API - Get List of Certificates Revocation List

+

Description

+

Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumCrl",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "CRLList": [
+      {
+        "Key_u32": 0,
+        "CrlInfo_utf": "crlinfo"
+      },
+      {
+        "Key_u32": 0,
+        "CrlInfo_utf": "crlinfo"
+      },
+      {
+        "Key_u32": 0,
+        "CrlInfo_utf": "crlinfo"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
CRLListArray objectCRL list
Key_u32number (uint32)Key ID
CrlInfo_utfstring (UTF8)The contents of the CRL item
+
+

+

"AddCrl" RPC API - Add a Revoked Certificate

+

Description

+

Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddCrl",
+  "params": {
+    "HubName_str": "hubname",
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"DelCrl" RPC API - Delete a Revoked Certificate

+

Description

+

Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelCrl",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"GetCrl" RPC API - Get a Revoked Certificate

+

Description

+

Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetCrl",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"SetCrl" RPC API - Change Existing CRL (Certificate Revocation List) Entry

+

Description

+

Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetCrl",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"SetAcList" RPC API - Add Rule to Source IP Address Limit List

+

Description

+

Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetAcList",
+  "params": {
+    "HubName_str": "hubname",
+    "ACList": [
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "ACList": [
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
ACListArray objectSource IP Address Limit List
Id_u32number (uint32)ID
Priority_u32number (uint32)Priority
Deny_boolbooleanDeny access
Masked_boolbooleanSet true if you want to specify the SubnetMask_ip item.
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask, valid only if Masked_bool == true
+
+

+

"GetAcList" RPC API - Get List of Rule Items of Source IP Address Limit List

+

Description

+

Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetAcList",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "ACList": [
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
ACListArray objectSource IP Address Limit List
Id_u32number (uint32)ID
Priority_u32number (uint32)Priority
Deny_boolbooleanDeny access
Masked_boolbooleanSet true if you want to specify the SubnetMask_ip item.
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask, valid only if Masked_bool == true
+
+

+

"EnumLogFile" RPC API - Get List of Log Files

+

Description

+

Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumLogFile",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "LogFiles": [
+      {
+        "ServerName_str": "servername",
+        "FilePath_str": "filepath",
+        "FileSize_u32": 0,
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "ServerName_str": "servername",
+        "FilePath_str": "filepath",
+        "FileSize_u32": 0,
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "ServerName_str": "servername",
+        "FilePath_str": "filepath",
+        "FileSize_u32": 0,
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
LogFilesArray objectLog file list
ServerName_strstring (ASCII)Server name
FilePath_strstring (ASCII)File path
FileSize_u32number (uint32)File size
UpdatedTime_dtDateLast write date
+
+

+

"ReadLogFile" RPC API - Download a part of Log File

+

Description

+

Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "ReadLogFile",
+  "params": {
+    "FilePath_str": "filepath"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerName_str": "servername",
+    "FilePath_str": "filepath",
+    "Offset_u32": 0,
+    "Buffer_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerName_strstring (ASCII)Server name
FilePath_strstring (ASCII)File Path
Offset_u32number (uint32)Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field.
Buffer_binstring (Base64 binary)Received buffer
+
+

+

"SetSysLog" RPC API - Set syslog Send Function

+

Description

+

Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetSysLog",
+  "params": {
+    "SaveType_u32": 0,
+    "Hostname_str": "hostname",
+    "Port_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "SaveType_u32": 0,
+    "Hostname_str": "hostname",
+    "Port_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SaveType_u32number (enum)The behavior of the syslog function
Values:
0: Do not use syslog
1: Only server log
2: Server and Virtual HUB security log
3: Server, Virtual HUB security, and packet log
Hostname_strstring (ASCII)Specify the host name or IP address of the syslog server
Port_u32number (uint32)Specify the port number of the syslog server
+
+

+

"GetSysLog" RPC API - Get syslog Send Function

+

Description

+

Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSysLog",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "SaveType_u32": 0,
+    "Hostname_str": "hostname",
+    "Port_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SaveType_u32number (enum)The behavior of the syslog function
Values:
0: Do not use syslog
1: Only server log
2: Server and Virtual HUB security log
3: Server, Virtual HUB security, and packet log
Hostname_strstring (ASCII)Specify the host name or IP address of the syslog server
Port_u32number (uint32)Specify the port number of the syslog server
+
+

+

"SetHubMsg" RPC API - Set Today's Message of Virtual Hub

+

Description

+

Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubMsg",
+  "params": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Msg_binstring (Base64 binary)Message (Unicode strings acceptable)
+
+

+

"GetHubMsg" RPC API - Get Today's Message of Virtual Hub

+

Description

+

Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubMsg",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Msg_binstring (Base64 binary)Message (Unicode strings acceptable)
+
+

+

"Crash" RPC API - Raise a vital error on the VPN Server / Bridge to terminate the process forcefully

+

Description

+

Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "Crash",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"GetAdminMsg" RPC API - Get the message for administrators

+

Description

+

Get the message for administrators.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetAdminMsg",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Msg_binstring (Base64 binary)Message (Unicode strings acceptable)
+
+

+

"Flush" RPC API - Save All Volatile Data of VPN Server / Bridge to the Configuration File

+

Description

+

Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "Flush",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"SetIPsecServices" RPC API - Enable or Disable IPsec VPN Server Function

+

Description

+

Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetIPsecServices",
+  "params": {
+    "L2TP_Raw_bool": false,
+    "L2TP_IPsec_bool": false,
+    "EtherIP_IPsec_bool": false,
+    "IPsec_Secret_str": "ipsec_secret",
+    "L2TP_DefaultHub_str": "l2tp_defaulthub"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "L2TP_Raw_bool": false,
+    "L2TP_IPsec_bool": false,
+    "EtherIP_IPsec_bool": false,
+    "IPsec_Secret_str": "ipsec_secret",
+    "L2TP_DefaultHub_str": "l2tp_defaulthub"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
L2TP_Raw_boolbooleanEnable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option.
L2TP_IPsec_boolbooleanEnable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option.
EtherIP_IPsec_boolbooleanEnable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging.
IPsec_Secret_strstring (ASCII)Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters.
L2TP_DefaultHub_strstring (ASCII)Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target.
+
+

+

"GetIPsecServices" RPC API - Get the Current IPsec VPN Server Settings

+

Description

+

Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetIPsecServices",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "L2TP_Raw_bool": false,
+    "L2TP_IPsec_bool": false,
+    "EtherIP_IPsec_bool": false,
+    "IPsec_Secret_str": "ipsec_secret",
+    "L2TP_DefaultHub_str": "l2tp_defaulthub"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
L2TP_Raw_boolbooleanEnable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option.
L2TP_IPsec_boolbooleanEnable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option.
EtherIP_IPsec_boolbooleanEnable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging.
IPsec_Secret_strstring (ASCII)Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters.
L2TP_DefaultHub_strstring (ASCII)Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target.
+
+

+

"AddEtherIpId" RPC API - Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices

+

Description

+

Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddEtherIpId",
+  "params": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"GetEtherIpId" RPC API - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions

+

Description

+

Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetEtherIpId",
+  "params": {
+    "Id_str": "id"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"DeleteEtherIpId" RPC API - Delete an EtherIP / L2TPv3 over IPsec Client Setting

+

Description

+

Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteEtherIpId",
+  "params": {
+    "Id_str": "id"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"EnumEtherIpId" RPC API - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions

+

Description

+

Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumEtherIpId",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Settings": [
+      {
+        "Id_str": "id",
+        "HubName_str": "hubname",
+        "UserName_str": "username",
+        "Password_str": "password"
+      },
+      {
+        "Id_str": "id",
+        "HubName_str": "hubname",
+        "UserName_str": "username",
+        "Password_str": "password"
+      },
+      {
+        "Id_str": "id",
+        "HubName_str": "hubname",
+        "UserName_str": "username",
+        "Password_str": "password"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SettingsArray objectSetting list
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"SetOpenVpnSstpConfig" RPC API - Set Settings for OpenVPN Clone Server Function

+

Description

+

Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetOpenVpnSstpConfig",
+  "params": {
+    "EnableOpenVPN_bool": false,
+    "OpenVPNPortList_str": "openvpnportlist",
+    "EnableSSTP_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "EnableOpenVPN_bool": false,
+    "OpenVPNPortList_str": "openvpnportlist",
+    "EnableSSTP_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EnableOpenVPN_boolbooleanSpecify true to enable the OpenVPN Clone Server Function. Specify false to disable.
OpenVPNPortList_strstring (ASCII)Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports.
EnableSSTP_boolbooleanpecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable.
+
+

+

"GetOpenVpnSstpConfig" RPC API - Get the Current Settings of OpenVPN Clone Server Function

+

Description

+

Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetOpenVpnSstpConfig",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "EnableOpenVPN_bool": false,
+    "OpenVPNPortList_str": "openvpnportlist",
+    "EnableSSTP_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EnableOpenVPN_boolbooleanSpecify true to enable the OpenVPN Clone Server Function. Specify false to disable.
OpenVPNPortList_strstring (ASCII)Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports.
EnableSSTP_boolbooleanpecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable.
+
+

+

"GetDDnsClientStatus" RPC API - Show the Current Status of Dynamic DNS Function

+

Description

+

Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetDDnsClientStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Err_IPv4_u32": 0,
+    "ErrStr_IPv4_utf": "errstr_ipv4",
+    "Err_IPv6_u32": 0,
+    "ErrStr_IPv6_utf": "errstr_ipv6",
+    "CurrentHostName_str": "currenthostname",
+    "CurrentFqdn_str": "currentfqdn",
+    "DnsSuffix_str": "dnssuffix",
+    "CurrentIPv4_str": "currentipv4",
+    "CurrentIPv6_str": "currentipv6"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Err_IPv4_u32number (uint32)Last error code (IPv4)
ErrStr_IPv4_utfstring (UTF8)Last error string (IPv4)
Err_IPv6_u32number (uint32)Last error code (IPv6)
ErrStr_IPv6_utfstring (UTF8)Last error string (IPv6)
CurrentHostName_strstring (ASCII)Current DDNS host name
CurrentFqdn_strstring (ASCII)Current FQDN of the DDNS hostname
DnsSuffix_strstring (ASCII)DDNS suffix
CurrentIPv4_strstring (ASCII)Current IPv4 address of the VPN Server
CurrentIPv6_strstring (ASCII)Current IPv6 address of the VPN Server
+
+

+

"ChangeDDnsClientHostname" RPC API - Set the Dynamic DNS Hostname

+

Description

+

Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "ChangeDDnsClientHostname",
+  "params": {
+    "StrValue_str": "strvalue"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"RegenerateServerCert" RPC API - Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server

+

Description

+

Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "RegenerateServerCert",
+  "params": {
+    "StrValue_str": "strvalue"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"MakeOpenVpnConfigFile" RPC API - Generate a Sample Setting File for OpenVPN Client

+

Description

+

Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "MakeOpenVpnConfigFile",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerName_str": "servername",
+    "FilePath_str": "filepath",
+    "Offset_u32": 0,
+    "Buffer_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerName_strstring (ASCII)Server name
FilePath_strstring (ASCII)File Path
Offset_u32number (uint32)Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field.
Buffer_binstring (Base64 binary)Received buffer
+
+

+

"SetSpecialListener" RPC API - Enable / Disable the VPN over ICMP / VPN over DNS Server Function

+

Description

+

Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetSpecialListener",
+  "params": {
+    "VpnOverIcmpListener_bool": false,
+    "VpnOverDnsListener_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "VpnOverIcmpListener_bool": false,
+    "VpnOverDnsListener_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
VpnOverIcmpListener_boolbooleanThe flag to activate the VPN over ICMP server function
VpnOverDnsListener_boolbooleanThe flag to activate the VPN over DNS function
+
+

+

"GetSpecialListener" RPC API - Get Current Setting of the VPN over ICMP / VPN over DNS Function

+

Description

+

Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSpecialListener",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "VpnOverIcmpListener_bool": false,
+    "VpnOverDnsListener_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
VpnOverIcmpListener_boolbooleanThe flag to activate the VPN over ICMP server function
VpnOverDnsListener_boolbooleanThe flag to activate the VPN over DNS function
+
+

+

"GetAzureStatus" RPC API - Show the current status of VPN Azure function

+

Description

+

Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetAzureStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IsEnabled_bool": false,
+    "IsConnected_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IsEnabled_boolbooleanWhether VPN Azure Function is Enabled
IsConnected_boolbooleanWhether connection to VPN Azure Cloud Server is established
+
+

+

"SetAzureStatus" RPC API - Enable / Disable VPN Azure Function

+

Description

+

Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetAzureStatus",
+  "params": {
+    "IsEnabled_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IsEnabled_bool": false,
+    "IsConnected_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IsEnabled_boolbooleanWhether VPN Azure Function is Enabled
IsConnected_boolbooleanWhether connection to VPN Azure Cloud Server is established
+
+

+

"GetDDnsInternetSettng" RPC API - Get the Proxy Settings for Connecting to the DDNS server

+

Description

+

Get the Proxy Settings for Connecting to the DDNS server.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetDDnsInternetSettng",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ProxyType_u32": 0,
+    "ProxyHostName_str": "proxyhostname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "proxyusername",
+    "ProxyPassword_str": "proxypassword"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ProxyType_u32number (enum)Type of proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyHostName_strstring (ASCII)Proxy server host name
ProxyPort_u32number (uint32)Proxy server port number
ProxyUsername_strstring (ASCII)Proxy server user name
ProxyPassword_strstring (ASCII)Proxy server password
+
+

+

"SetDDnsInternetSettng" RPC API - Set the Proxy Settings for Connecting to the DDNS server

+

Description

+

Set the Proxy Settings for Connecting to the DDNS server.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetDDnsInternetSettng",
+  "params": {
+    "ProxyType_u32": 0,
+    "ProxyHostName_str": "proxyhostname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "proxyusername",
+    "ProxyPassword_str": "proxypassword"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ProxyType_u32": 0,
+    "ProxyHostName_str": "proxyhostname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "proxyusername",
+    "ProxyPassword_str": "proxypassword"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ProxyType_u32number (enum)Type of proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyHostName_strstring (ASCII)Proxy server host name
ProxyPort_u32number (uint32)Proxy server port number
ProxyUsername_strstring (ASCII)Proxy server user name
ProxyPassword_strstring (ASCII)Proxy server password
+
+

Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen.
+Copyright (c) 2014-2019 SoftEther VPN Project under the Apache License 2.0.

+ +
+ + diff --git a/developer_tools/vpnserver-jsonrpc-clients/README.md b/developer_tools/vpnserver-jsonrpc-clients/README.md new file mode 100644 index 00000000..fa34a5ca --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/README.md @@ -0,0 +1,8735 @@ +# SoftEther VPN Server JSON-RPC API Suite Document +This reference describes all JSON-RPC functions available on SoftEther VPN Server. + + +You can access to the latest [SoftEther VPN Server JSON-RPC Document on GitHub](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/). + + +## What is SoftEther VPN Server JSON-RPC API Suite? +The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions). + + - Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API. + - You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.) + - If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server. + - No need to use any specific API client library since all APIs are provided on the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification). You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment. + - Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. [The Node.js Client Library for VPN Server RPC (vpnrpc)](https://www.npmjs.com/package/vpnrpc) package is also available. + + +## Principle + +### Entry point +The entry point URL of JSON-RPC is: +``` +https://:/api/ +``` + + - Older versions of SoftEther VPN before June 2019 don't support JSON-RPC APIs. + - If you want to completely disable the JSON-RPC on your VPN Server, set the `DisableJsonRpcWebApi` variable to `true` on the `vpn_server.config`. + + +### JSON-RPC specification +You must use HTTPS 1.1 `POST` method to call each of JSON-RPC APIs. +All APIs are based on the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification). + - JSON-RPC Notification is not supported. + - JSON-RPC Batch is not supported. + + +### "vpnrpc": Node.js Client Library package for VPN Server JSON-RPC +If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [JavaScript Client Library for VPN Server RPC (vpnrpc)](https://www.npmjs.com/package/vpnrpc). + + - You can use the `vpnrpc` library in JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js. + - As a sample code there is the [sample.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts) program in TypeScript. This sample calls all of available JSON-RPC APIs against the specified SoftEther VPN Server. (Note: This sample code is written in TypeScript.) + +You can use the following command to download the `vpnrpc` library package with Node.js. +``` +$ npm install --save-dev vpnrpc +``` + + + +### "vpnrpc.ts": TypeScript Client Library for VPN Server JSON-RPC +If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [TypeScript Client Library for VPN Server RPC (vpnrpc.ts)](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/). + + - You can use the [vpnrpc.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/vpnrpc.ts) library in TypeScript / JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js. + - As a sample code there is the [sample.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts) program in TypeScript. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server. + + +### "vpnserver-jsonrpc-client-csharp": C# Client Library for VPN Server JSON-RPC +If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [vpnserver-jsonrpc-client-csharp C# library](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/). + + - The [client library codes for C#](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/) is written in pure C# 7.3. It works on .NET Core 2.1 or later on Windows, Linux and macOS. Very comfort with Visual Studio for both Windows or macOS. + - As a sample code there is the [VpnServerRpcTest.cs](https://github.com/SoftEtherVPN/SoftEtherVPN/blob/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/VpnServerRpcTest.cs) program in C#. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server. + + + +### HTTPS Authentication +You must specify the following HTTPS custom headers for authentication on each of requests. + + +Value | Description +--- | --- +`X-VPNADMIN-HUBNAME` | The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify empty string if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. +`X-VPNADMIN-PASSWORD` | Specify the administration password. + + +- You can omit the above HTTPS custom authentication headers if you are calling JSON-RPC APIs from the web browser which is already logged in to the VPN Server with HTTPS Basic Authentication. In such usage the credential of HTTPS Basic Authtication will be used. + +*** + +## Table of contents +- [Test - Test RPC function](#test) +- [GetServerInfo - Get server information](#getserverinfo) +- [GetServerStatus - Get Current Server Status](#getserverstatus) +- [CreateListener - Create New TCP Listener](#createlistener) +- [EnumListener - Get List of TCP Listeners](#enumlistener) +- [DeleteListener - Delete TCP Listener](#deletelistener) +- [EnableListener - Enable / Disable TCP Listener](#enablelistener) +- [SetServerPassword - Set VPN Server Administrator Password](#setserverpassword) +- [SetFarmSetting - Set the VPN Server clustering configuration](#setfarmsetting) +- [GetFarmSetting - Get Clustering Configuration of Current VPN Server](#getfarmsetting) +- [GetFarmInfo - Get Cluster Member Information](#getfarminfo) +- [EnumFarmMember - Get List of Cluster Members](#enumfarmmember) +- [GetFarmConnectionStatus - Get Connection Status to Cluster Controller](#getfarmconnectionstatus) +- [SetServerCert - Set SSL Certificate and Private Key of VPN Server](#setservercert) +- [GetServerCert - Get SSL Certificate and Private Key of VPN Server](#getservercert) +- [GetServerCipher - Get the Encrypted Algorithm Used for VPN Communication](#getservercipher) +- [SetServerCipher - Set the Encrypted Algorithm Used for VPN Communication](#setservercipher) +- [CreateHub - Create New Virtual Hub](#createhub) +- [SetHub - Set the Virtual Hub configuration](#sethub) +- [GetHub - Get the Virtual Hub configuration](#gethub) +- [EnumHub - Get List of Virtual Hubs](#enumhub) +- [DeleteHub - Delete Virtual Hub](#deletehub) +- [GetHubRadius - Get Setting of RADIUS Server Used for User Authentication](#gethubradius) +- [SetHubRadius - Set RADIUS Server to use for User Authentication](#sethubradius) +- [EnumConnection - Get List of TCP Connections Connecting to the VPN Server](#enumconnection) +- [DisconnectConnection - Disconnect TCP Connections Connecting to the VPN Server](#disconnectconnection) +- [GetConnectionInfo - Get Information of TCP Connections Connecting to the VPN Server](#getconnectioninfo) +- [SetHubOnline - Switch Virtual Hub to Online or Offline](#sethubonline) +- [GetHubStatus - Get Current Status of Virtual Hub](#gethubstatus) +- [SetHubLog - Set the logging configuration of the Virtual Hub](#sethublog) +- [GetHubLog - Get the logging configuration of the Virtual Hub](#gethublog) +- [AddCa - Add Trusted CA Certificate](#addca) +- [EnumCa - Get List of Trusted CA Certificates](#enumca) +- [GetCa - Get Trusted CA Certificate](#getca) +- [DeleteCa - Delete Trusted CA Certificate](#deleteca) +- [CreateLink - Create New Cascade Connection](#createlink) +- [GetLink - Get the Cascade Connection Setting](#getlink) +- [SetLink - Change Existing Cascade Connection](#setlink) +- [EnumLink - Get List of Cascade Connections](#enumlink) +- [SetLinkOnline - Switch Cascade Connection to Online Status](#setlinkonline) +- [SetLinkOffline - Switch Cascade Connection to Offline Status](#setlinkoffline) +- [DeleteLink - Delete Cascade Connection Setting](#deletelink) +- [RenameLink - Change Name of Cascade Connection](#renamelink) +- [GetLinkStatus - Get Current Cascade Connection Status](#getlinkstatus) +- [AddAccess - Add Access List Rule](#addaccess) +- [DeleteAccess - Delete Rule from Access List](#deleteaccess) +- [EnumAccess - Get Access List Rule List](#enumaccess) +- [SetAccessList - Replace all access lists on a single bulk API call](#setaccesslist) +- [CreateUser - Create a user](#createuser) +- [SetUser - Change User Settings](#setuser) +- [GetUser - Get User Settings](#getuser) +- [DeleteUser - Delete a user](#deleteuser) +- [EnumUser - Get List of Users](#enumuser) +- [CreateGroup - Create Group](#creategroup) +- [SetGroup - Set group settings](#setgroup) +- [GetGroup - Get Group Setting (Sync mode)](#getgroup) +- [DeleteGroup - Delete User from Group](#deletegroup) +- [EnumGroup - Get List of Groups](#enumgroup) +- [EnumSession - Get List of Connected VPN Sessions](#enumsession) +- [GetSessionStatus - Get Session Status](#getsessionstatus) +- [DeleteSession - Disconnect Session](#deletesession) +- [EnumMacTable - Get the MAC Address Table Database](#enummactable) +- [DeleteMacTable - Delete MAC Address Table Entry](#deletemactable) +- [EnumIpTable - Get the IP Address Table Database](#enumiptable) +- [DeleteIpTable - Delete IP Address Table Entry](#deleteiptable) +- [SetKeep - Set the Keep Alive Internet Connection Function](#setkeep) +- [GetKeep - Get the Keep Alive Internet Connection Function](#getkeep) +- [EnableSecureNAT - Enable the Virtual NAT and DHCP Server Function (SecureNAT Function)](#enablesecurenat) +- [DisableSecureNAT - Disable the Virtual NAT and DHCP Server Function (SecureNAT Function)](#disablesecurenat) +- [SetSecureNATOption - Change Settings of SecureNAT Function](#setsecurenatoption) +- [GetSecureNATOption - Get Settings of SecureNAT Function](#getsecurenatoption) +- [EnumNAT - Get Virtual NAT Function Session Table of SecureNAT Function](#enumnat) +- [EnumDHCP - Get Virtual DHCP Server Function Lease Table of SecureNAT Function](#enumdhcp) +- [GetSecureNATStatus - Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function)](#getsecurenatstatus) +- [EnumEthernet - Get List of Network Adapters Usable as Local Bridge](#enumethernet) +- [AddLocalBridge - Create Local Bridge Connection](#addlocalbridge) +- [DeleteLocalBridge - Delete Local Bridge Connection](#deletelocalbridge) +- [EnumLocalBridge - Get List of Local Bridge Connection](#enumlocalbridge) +- [GetBridgeSupport - Get whether the localbridge function is supported on the current system](#getbridgesupport) +- [RebootServer - Reboot VPN Server Service](#rebootserver) +- [GetCaps - Get List of Server Functions / Capability](#getcaps) +- [GetConfig - Get the current configuration of the VPN Server](#getconfig) +- [SetConfig - Write Configuration File to VPN Server](#setconfig) +- [GetDefaultHubAdminOptions - Get Virtual Hub Administration Option default values](#getdefaulthubadminoptions) +- [GetHubAdminOptions - Get List of Virtual Hub Administration Options](#gethubadminoptions) +- [SetHubAdminOptions - Set Values of Virtual Hub Administration Options](#sethubadminoptions) +- [GetHubExtOptions - Get List of Virtual Hub Extended Options](#gethubextoptions) +- [SetHubExtOptions - Set a Value of Virtual Hub Extended Options](#sethubextoptions) +- [AddL3Switch - Define New Virtual Layer 3 Switch](#addl3switch) +- [DelL3Switch - Delete Virtual Layer 3 Switch](#dell3switch) +- [EnumL3Switch - Get List of Virtual Layer 3 Switches](#enuml3switch) +- [StartL3Switch - Start Virtual Layer 3 Switch Operation](#startl3switch) +- [StopL3Switch - Stop Virtual Layer 3 Switch Operation](#stopl3switch) +- [AddL3If - Add Virtual Interface to Virtual Layer 3 Switch](#addl3if) +- [DelL3If - Delete Virtual Interface of Virtual Layer 3 Switch](#dell3if) +- [EnumL3If - Get List of Interfaces Registered on the Virtual Layer 3 Switch](#enuml3if) +- [AddL3Table - Add Routing Table Entry for Virtual Layer 3 Switch](#addl3table) +- [DelL3Table - Delete Routing Table Entry of Virtual Layer 3 Switch](#dell3table) +- [EnumL3Table - Get List of Routing Tables of Virtual Layer 3 Switch](#enuml3table) +- [EnumCrl - Get List of Certificates Revocation List](#enumcrl) +- [AddCrl - Add a Revoked Certificate](#addcrl) +- [DelCrl - Delete a Revoked Certificate](#delcrl) +- [GetCrl - Get a Revoked Certificate](#getcrl) +- [SetCrl - Change Existing CRL (Certificate Revocation List) Entry](#setcrl) +- [SetAcList - Add Rule to Source IP Address Limit List](#setaclist) +- [GetAcList - Get List of Rule Items of Source IP Address Limit List](#getaclist) +- [EnumLogFile - Get List of Log Files](#enumlogfile) +- [ReadLogFile - Download a part of Log File](#readlogfile) +- [SetSysLog - Set syslog Send Function](#setsyslog) +- [GetSysLog - Get syslog Send Function](#getsyslog) +- [SetHubMsg - Set Today's Message of Virtual Hub](#sethubmsg) +- [GetHubMsg - Get Today's Message of Virtual Hub](#gethubmsg) +- [Crash - Raise a vital error on the VPN Server / Bridge to terminate the process forcefully](#crash) +- [GetAdminMsg - Get the message for administrators](#getadminmsg) +- [Flush - Save All Volatile Data of VPN Server / Bridge to the Configuration File](#flush) +- [SetIPsecServices - Enable or Disable IPsec VPN Server Function](#setipsecservices) +- [GetIPsecServices - Get the Current IPsec VPN Server Settings](#getipsecservices) +- [AddEtherIpId - Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices](#addetheripid) +- [GetEtherIpId - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions](#getetheripid) +- [DeleteEtherIpId - Delete an EtherIP / L2TPv3 over IPsec Client Setting](#deleteetheripid) +- [EnumEtherIpId - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions](#enumetheripid) +- [SetOpenVpnSstpConfig - Set Settings for OpenVPN Clone Server Function](#setopenvpnsstpconfig) +- [GetOpenVpnSstpConfig - Get the Current Settings of OpenVPN Clone Server Function](#getopenvpnsstpconfig) +- [GetDDnsClientStatus - Show the Current Status of Dynamic DNS Function](#getddnsclientstatus) +- [ChangeDDnsClientHostname - Set the Dynamic DNS Hostname](#changeddnsclienthostname) +- [RegenerateServerCert - Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server](#regenerateservercert) +- [MakeOpenVpnConfigFile - Generate a Sample Setting File for OpenVPN Client](#makeopenvpnconfigfile) +- [SetSpecialListener - Enable / Disable the VPN over ICMP / VPN over DNS Server Function](#setspeciallistener) +- [GetSpecialListener - Get Current Setting of the VPN over ICMP / VPN over DNS Function](#getspeciallistener) +- [GetAzureStatus - Show the current status of VPN Azure function](#getazurestatus) +- [SetAzureStatus - Enable / Disable VPN Azure Function](#setazurestatus) +- [GetDDnsInternetSettng - Get the Proxy Settings for Connecting to the DDNS server](#getddnsinternetsettng) +- [SetDDnsInternetSettng - Set the Proxy Settings for Connecting to the DDNS server](#setddnsinternetsettng) +- [SetVgsConfig - Set the VPN Gate Server Configuration](#setvgsconfig) +- [GetVgsConfig - Get the VPN Gate Server Configuration](#getvgsconfig) + +*** + +## "Test" RPC API - Test RPC function +### Description +Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "Test", + "params": { + "IntValue_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IntValue_u32": 0, + "Int64Value_u64": 0, + "StrValue_str": "strvalue", + "UniStrValue_utf": "unistrvalue" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IntValue_u32` | `number` (uint32) | A 32-bit integer field +`Int64Value_u64` | `number` (uint64) | A 64-bit integer field +`StrValue_str` | `string` (ASCII) | An Ascii string field +`UniStrValue_utf` | `string` (UTF8) | An UTF-8 string field + +*** + +## "GetServerInfo" RPC API - Get server information +### Description +Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetServerInfo", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ServerProductName_str": "serverproductname", + "ServerVersionString_str": "serverversionstring", + "ServerBuildInfoString_str": "serverbuildinfostring", + "ServerVerInt_u32": 0, + "ServerBuildInt_u32": 0, + "ServerHostName_str": "serverhostname", + "ServerType_u32": 0, + "ServerBuildDate_dt": "2020-08-01T12:24:36.123", + "ServerFamilyName_str": "serverfamilyname", + "OsType_u32": 0, + "OsServicePack_u32": 0, + "OsSystemName_str": "ossystemname", + "OsProductName_str": "osproductname", + "OsVendorName_str": "osvendorname", + "OsVersion_str": "osversion", + "KernelName_str": "kernelname", + "KernelVersion_str": "kernelversion" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ServerProductName_str` | `string` (ASCII) | Server product name +`ServerVersionString_str` | `string` (ASCII) | Server version string +`ServerBuildInfoString_str` | `string` (ASCII) | Server build information string +`ServerVerInt_u32` | `number` (uint32) | Server version integer value +`ServerBuildInt_u32` | `number` (uint32) | Server build number integer value +`ServerHostName_str` | `string` (ASCII) | Server host name +`ServerType_u32` | `number` (enum) | Type of server
Values:
`0`: Stand-alone server
`1`: Farm controller server
`2`: Farm member server +`ServerBuildDate_dt` | `Date` | Build date and time of the server +`ServerFamilyName_str` | `string` (ASCII) | Family name +`OsType_u32` | `number` (enum) | OS type
Values:
`1100`: Windows 95
`1200`: Windows 98
`1300`: Windows Me
`1400`: Windows (unknown)
`2100`: Windows NT 4.0 Workstation
`2110`: Windows NT 4.0 Server
`2111`: Windows NT 4.0 Server, Enterprise Edition
`2112`: Windows NT 4.0 Terminal Server
`2113`: BackOffice Server 4.5
`2114`: Small Business Server 4.5
`2200`: Windows 2000 Professional
`2211`: Windows 2000 Server
`2212`: Windows 2000 Advanced Server
`2213`: Windows 2000 Datacenter Server
`2214`: BackOffice Server 2000
`2215`: Small Business Server 2000
`2300`: Windows XP Home Edition
`2301`: Windows XP Professional
`2410`: Windows Server 2003 Web Edition
`2411`: Windows Server 2003 Standard Edition
`2412`: Windows Server 2003 Enterprise Edition
`2413`: Windows Server 2003 DataCenter Edition
`2414`: BackOffice Server 2003
`2415`: Small Business Server 2003
`2500`: Windows Vista
`2510`: Windows Server 2008
`2600`: Windows 7
`2610`: Windows Server 2008 R2
`2700`: Windows 8
`2710`: Windows Server 2012
`2701`: Windows 8.1
`2711`: Windows Server 2012 R2
`2702`: Windows 10
`2712`: Windows Server 10
`2800`: Windows 11 or later
`2810`: Windows Server 11 or later
`3000`: Unknown UNIX
`3100`: Linux
`3200`: Solaris
`3300`: Cygwin
`3400`: BSD
`3500`: MacOS X +`OsServicePack_u32` | `number` (uint32) | Service pack number +`OsSystemName_str` | `string` (ASCII) | OS system name +`OsProductName_str` | `string` (ASCII) | OS product name +`OsVendorName_str` | `string` (ASCII) | OS vendor name +`OsVersion_str` | `string` (ASCII) | OS version +`KernelName_str` | `string` (ASCII) | Kernel name +`KernelVersion_str` | `string` (ASCII) | Kernel version + +*** + +## "GetServerStatus" RPC API - Get Current Server Status +### Description +Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetServerStatus", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ServerType_u32": 0, + "NumTcpConnections_u32": 0, + "NumTcpConnectionsLocal_u32": 0, + "NumTcpConnectionsRemote_u32": 0, + "NumHubTotal_u32": 0, + "NumHubStandalone_u32": 0, + "NumHubStatic_u32": 0, + "NumHubDynamic_u32": 0, + "NumSessionsTotal_u32": 0, + "NumSessionsLocal_u32": 0, + "NumSessionsRemote_u32": 0, + "NumMacTables_u32": 0, + "NumIpTables_u32": 0, + "NumUsers_u32": 0, + "NumGroups_u32": 0, + "AssignedBridgeLicenses_u32": 0, + "AssignedClientLicenses_u32": 0, + "AssignedBridgeLicensesTotal_u32": 0, + "AssignedClientLicensesTotal_u32": 0, + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "CurrentTime_dt": "2020-08-01T12:24:36.123", + "CurrentTick_u64": 0, + "StartTime_dt": "2020-08-01T12:24:36.123", + "TotalMemory_u64": 0, + "UsedMemory_u64": 0, + "FreeMemory_u64": 0, + "TotalPhys_u64": 0, + "UsedPhys_u64": 0, + "FreePhys_u64": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ServerType_u32` | `number` (enum) | Type of server
Values:
`0`: Stand-alone server
`1`: Farm controller server
`2`: Farm member server +`NumTcpConnections_u32` | `number` (uint32) | Total number of TCP connections +`NumTcpConnectionsLocal_u32` | `number` (uint32) | Number of Local TCP connections +`NumTcpConnectionsRemote_u32` | `number` (uint32) | Number of remote TCP connections +`NumHubTotal_u32` | `number` (uint32) | Total number of HUBs +`NumHubStandalone_u32` | `number` (uint32) | Nymber of stand-alone HUB +`NumHubStatic_u32` | `number` (uint32) | Number of static HUBs +`NumHubDynamic_u32` | `number` (uint32) | Number of Dynamic HUBs +`NumSessionsTotal_u32` | `number` (uint32) | Total number of sessions +`NumSessionsLocal_u32` | `number` (uint32) | Number of local VPN sessions +`NumSessionsRemote_u32` | `number` (uint32) | The number of remote sessions +`NumMacTables_u32` | `number` (uint32) | Number of MAC table entries (total sum of all Virtual Hubs) +`NumIpTables_u32` | `number` (uint32) | Number of IP table entries (total sum of all Virtual Hubs) +`NumUsers_u32` | `number` (uint32) | Number of users (total sum of all Virtual Hubs) +`NumGroups_u32` | `number` (uint32) | Number of groups (total sum of all Virtual Hubs) +`AssignedBridgeLicenses_u32` | `number` (uint32) | Number of assigned bridge licenses (Useful to make a commercial version) +`AssignedClientLicenses_u32` | `number` (uint32) | Number of assigned client licenses (Useful to make a commercial version) +`AssignedBridgeLicensesTotal_u32` | `number` (uint32) | Number of Assigned bridge license (cluster-wide), useful to make a commercial version +`AssignedClientLicensesTotal_u32` | `number` (uint32) | Number of assigned client licenses (cluster-wide), useful to make a commercial version +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`CurrentTime_dt` | `Date` | Current time +`CurrentTick_u64` | `number` (uint64) | 64 bit High-Precision Logical System Clock +`StartTime_dt` | `Date` | VPN Server Start-up time +`TotalMemory_u64` | `number` (uint64) | Memory information: Total Memory +`UsedMemory_u64` | `number` (uint64) | Memory information: Used Memory +`FreeMemory_u64` | `number` (uint64) | Memory information: Free Memory +`TotalPhys_u64` | `number` (uint64) | Memory information: Total Phys +`UsedPhys_u64` | `number` (uint64) | Memory information: Used Phys +`FreePhys_u64` | `number` (uint64) | Memory information: Free Phys + +*** + +## "CreateListener" RPC API - Create New TCP Listener +### Description +Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "CreateListener", + "params": { + "Port_u32": 0, + "Enable_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Port_u32": 0, + "Enable_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Port_u32` | `number` (uint32) | Port number (Range: 1 - 65535) +`Enable_bool` | `boolean` | Active state + +*** + +## "EnumListener" RPC API - Get List of TCP Listeners +### Description +Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumListener", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ListenerList": [ + { + "Ports_u32": 0, + "Enables_bool": false, + "Errors_bool": false + }, + { + "Ports_u32": 0, + "Enables_bool": false, + "Errors_bool": false + }, + { + "Ports_u32": 0, + "Enables_bool": false, + "Errors_bool": false + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ListenerList` | `Array object` | List of listener items +`Ports_u32` | `number` (uint32) | TCP port number (range: 1 - 65535) +`Enables_bool` | `boolean` | Active state +`Errors_bool` | `boolean` | The flag to indicate if the error occurred on the listener port + +*** + +## "DeleteListener" RPC API - Delete TCP Listener +### Description +Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteListener", + "params": { + "Port_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Port_u32": 0, + "Enable_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Port_u32` | `number` (uint32) | Port number (Range: 1 - 65535) +`Enable_bool` | `boolean` | Active state + +*** + +## "EnableListener" RPC API - Enable / Disable TCP Listener +### Description +Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnableListener", + "params": { + "Port_u32": 0, + "Enable_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Port_u32": 0, + "Enable_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Port_u32` | `number` (uint32) | Port number (Range: 1 - 65535) +`Enable_bool` | `boolean` | Active state + +*** + +## "SetServerPassword" RPC API - Set VPN Server Administrator Password +### Description +Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetServerPassword", + "params": { + "PlainTextPassword_str": "plaintextpassword" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "PlainTextPassword_str": "plaintextpassword" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`PlainTextPassword_str` | `string` (ASCII) | The plaintext password + +*** + +## "SetFarmSetting" RPC API - Set the VPN Server clustering configuration +### Description +Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetFarmSetting", + "params": { + "ServerType_u32": 0, + "NumPort_u32": 0, + "Ports_u32": [ + 1, + 2, + 3 + ], + "PublicIp_ip": "192.168.0.1", + "ControllerName_str": "controllername", + "ControllerPort_u32": 0, + "MemberPasswordPlaintext_str": "memberpasswordplaintext", + "Weight_u32": 0, + "ControllerOnly_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ServerType_u32": 0, + "NumPort_u32": 0, + "Ports_u32": [ + 1, + 2, + 3 + ], + "PublicIp_ip": "192.168.0.1", + "ControllerName_str": "controllername", + "ControllerPort_u32": 0, + "MemberPasswordPlaintext_str": "memberpasswordplaintext", + "Weight_u32": 0, + "ControllerOnly_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ServerType_u32` | `number` (enum) | Type of server
Values:
`0`: Stand-alone server
`1`: Farm controller server
`2`: Farm member server +`NumPort_u32` | `number` (uint32) | Valid only for Cluster Member servers. Number of the Ports_u32 element. +`Ports_u32` | `number[]` (uint32) | Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. +`PublicIp_ip` | `string` (IP address) | Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. +`ControllerName_str` | `string` (ASCII) | Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. +`ControllerPort_u32` | `number` (uint32) | Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. +`MemberPasswordPlaintext_str` | `string` (ASCII) | Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. +`Weight_u32` | `number` (uint32) | This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. +`ControllerOnly_bool` | `boolean` | Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. + +*** + +## "GetFarmSetting" RPC API - Get Clustering Configuration of Current VPN Server +### Description +Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetFarmSetting", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ServerType_u32": 0, + "NumPort_u32": 0, + "Ports_u32": [ + 1, + 2, + 3 + ], + "PublicIp_ip": "192.168.0.1", + "ControllerName_str": "controllername", + "ControllerPort_u32": 0, + "MemberPasswordPlaintext_str": "memberpasswordplaintext", + "Weight_u32": 0, + "ControllerOnly_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ServerType_u32` | `number` (enum) | Type of server
Values:
`0`: Stand-alone server
`1`: Farm controller server
`2`: Farm member server +`NumPort_u32` | `number` (uint32) | Valid only for Cluster Member servers. Number of the Ports_u32 element. +`Ports_u32` | `number[]` (uint32) | Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. +`PublicIp_ip` | `string` (IP address) | Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. +`ControllerName_str` | `string` (ASCII) | Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. +`ControllerPort_u32` | `number` (uint32) | Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. +`MemberPasswordPlaintext_str` | `string` (ASCII) | Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. +`Weight_u32` | `number` (uint32) | This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. +`ControllerOnly_bool` | `boolean` | Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. + +*** + +## "GetFarmInfo" RPC API - Get Cluster Member Information +### Description +Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetFarmInfo", + "params": { + "Id_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Id_u32": 0, + "Controller_bool": false, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Ip_ip": "192.168.0.1", + "Hostname_str": "hostname", + "Point_u32": 0, + "NumPort_u32": 0, + "Ports_u32": [ + 1, + 2, + 3 + ], + "ServerCert_bin": "SGVsbG8gV29ybGQ=", + "NumFarmHub_u32": 0, + "HubsList": [ + { + "HubName_str": "hubname", + "DynamicHub_bool": false + }, + { + "HubName_str": "hubname", + "DynamicHub_bool": false + }, + { + "HubName_str": "hubname", + "DynamicHub_bool": false + } + ], + "NumSessions_u32": 0, + "NumTcpConnections_u32": 0, + "Weight_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Id_u32` | `number` (uint32) | ID +`Controller_bool` | `boolean` | The flag if the server is Cluster Controller (false: Cluster Member servers) +`ConnectedTime_dt` | `Date` | Connection Established Time +`Ip_ip` | `string` (IP address) | IP address +`Hostname_str` | `string` (ASCII) | Host name +`Point_u32` | `number` (uint32) | Point +`NumPort_u32` | `number` (uint32) | Number of Public Ports +`Ports_u32` | `number[]` (uint32) | Public Ports +`ServerCert_bin` | `string` (Base64 binary) | Server certificate +`NumFarmHub_u32` | `number` (uint32) | Number of farm HUB +`HubsList` | `Array object` | The hosted Virtual Hub list +`NumSessions_u32` | `number` (uint32) | Number of hosted VPN sessions +`NumTcpConnections_u32` | `number` (uint32) | Number of TCP connections +`Weight_u32` | `number` (uint32) | Performance Standard Ratio +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`DynamicHub_bool` | `boolean` | Dynamic HUB + +*** + +## "EnumFarmMember" RPC API - Get List of Cluster Members +### Description +Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumFarmMember", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "NumFarm_u32": 0, + "FarmMemberList": [ + { + "Id_u32": 0, + "Controller_bool": false, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Ip_ip": "192.168.0.1", + "Hostname_str": "hostname", + "Point_u32": 0, + "NumSessions_u32": 0, + "NumTcpConnections_u32": 0, + "NumHubs_u32": 0, + "AssignedClientLicense_u32": 0, + "AssignedBridgeLicense_u32": 0 + }, + { + "Id_u32": 0, + "Controller_bool": false, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Ip_ip": "192.168.0.1", + "Hostname_str": "hostname", + "Point_u32": 0, + "NumSessions_u32": 0, + "NumTcpConnections_u32": 0, + "NumHubs_u32": 0, + "AssignedClientLicense_u32": 0, + "AssignedBridgeLicense_u32": 0 + }, + { + "Id_u32": 0, + "Controller_bool": false, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Ip_ip": "192.168.0.1", + "Hostname_str": "hostname", + "Point_u32": 0, + "NumSessions_u32": 0, + "NumTcpConnections_u32": 0, + "NumHubs_u32": 0, + "AssignedClientLicense_u32": 0, + "AssignedBridgeLicense_u32": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`NumFarm_u32` | `number` (uint32) | Number of Cluster Members +`FarmMemberList` | `Array object` | Cluster Members list +`Id_u32` | `number` (uint32) | ID +`Controller_bool` | `boolean` | Controller +`ConnectedTime_dt` | `Date` | Connection time +`Ip_ip` | `string` (IP address) | IP address +`Hostname_str` | `string` (ASCII) | Host name +`Point_u32` | `number` (uint32) | Point +`NumSessions_u32` | `number` (uint32) | Number of sessions +`NumTcpConnections_u32` | `number` (uint32) | Number of TCP connections +`NumHubs_u32` | `number` (uint32) | Number of HUBs +`AssignedClientLicense_u32` | `number` (uint32) | Number of assigned client licenses +`AssignedBridgeLicense_u32` | `number` (uint32) | Number of assigned bridge licenses + +*** + +## "GetFarmConnectionStatus" RPC API - Get Connection Status to Cluster Controller +### Description +Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetFarmConnectionStatus", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Ip_ip": "192.168.0.1", + "Port_u32": 0, + "Online_bool": false, + "LastError_u32": 0, + "StartedTime_dt": "2020-08-01T12:24:36.123", + "FirstConnectedTime_dt": "2020-08-01T12:24:36.123", + "CurrentConnectedTime_dt": "2020-08-01T12:24:36.123", + "NumTry_u32": 0, + "NumConnected_u32": 0, + "NumFailed_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Ip_ip` | `string` (IP address) | IP address +`Port_u32` | `number` (uint32) | Port number +`Online_bool` | `boolean` | Online state +`LastError_u32` | `number` (uint32) | Last error code +`StartedTime_dt` | `Date` | Connection start time +`FirstConnectedTime_dt` | `Date` | First connection time +`CurrentConnectedTime_dt` | `Date` | Connection time of this time +`NumTry_u32` | `number` (uint32) | Number of retries +`NumConnected_u32` | `number` (uint32) | Number of connection count +`NumFailed_u32` | `number` (uint32) | Connection failure count + +*** + +## "SetServerCert" RPC API - Set SSL Certificate and Private Key of VPN Server +### Description +Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetServerCert", + "params": { + "Cert_bin": "SGVsbG8gV29ybGQ=", + "Key_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Cert_bin": "SGVsbG8gV29ybGQ=", + "Key_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Cert_bin` | `string` (Base64 binary) | The body of the certificate +`Key_bin` | `string` (Base64 binary) | The body of the private key + +*** + +## "GetServerCert" RPC API - Get SSL Certificate and Private Key of VPN Server +### Description +Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetServerCert", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Cert_bin": "SGVsbG8gV29ybGQ=", + "Key_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Cert_bin` | `string` (Base64 binary) | The body of the certificate +`Key_bin` | `string` (Base64 binary) | The body of the private key + +*** + +## "GetServerCipher" RPC API - Get the Encrypted Algorithm Used for VPN Communication +### Description +Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetServerCipher", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "String_str": "string" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`String_str` | `string` (ASCII) | A string value + +*** + +## "SetServerCipher" RPC API - Set the Encrypted Algorithm Used for VPN Communication +### Description +Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetServerCipher", + "params": { + "String_str": "string" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "String_str": "string" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`String_str` | `string` (ASCII) | A string value + +*** + +## "CreateHub" RPC API - Create New Virtual Hub +### Description +Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "CreateHub", + "params": { + "HubName_str": "hubname", + "AdminPasswordPlainText_str": "adminpasswordplaintext", + "Online_bool": false, + "MaxSession_u32": 0, + "NoEnum_bool": false, + "HubType_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminPasswordPlainText_str": "adminpasswordplaintext", + "Online_bool": false, + "MaxSession_u32": 0, + "NoEnum_bool": false, + "HubType_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to create / update. +`AdminPasswordPlainText_str` | `string` (ASCII) | Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. +`Online_bool` | `boolean` | Online flag +`MaxSession_u32` | `number` (uint32) | Maximum number of VPN sessions +`NoEnum_bool` | `boolean` | No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. +`HubType_u32` | `number` (enum) | Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
`0`: Stand-alone HUB
`1`: Static HUB
`2`: Dynamic HUB + +*** + +## "SetHub" RPC API - Set the Virtual Hub configuration +### Description +Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHub", + "params": { + "HubName_str": "hubname", + "AdminPasswordPlainText_str": "adminpasswordplaintext", + "Online_bool": false, + "MaxSession_u32": 0, + "NoEnum_bool": false, + "HubType_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminPasswordPlainText_str": "adminpasswordplaintext", + "Online_bool": false, + "MaxSession_u32": 0, + "NoEnum_bool": false, + "HubType_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to create / update. +`AdminPasswordPlainText_str` | `string` (ASCII) | Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. +`Online_bool` | `boolean` | Online flag +`MaxSession_u32` | `number` (uint32) | Maximum number of VPN sessions +`NoEnum_bool` | `boolean` | No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. +`HubType_u32` | `number` (enum) | Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
`0`: Stand-alone HUB
`1`: Static HUB
`2`: Dynamic HUB + +*** + +## "GetHub" RPC API - Get the Virtual Hub configuration +### Description +Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHub", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminPasswordPlainText_str": "adminpasswordplaintext", + "Online_bool": false, + "MaxSession_u32": 0, + "NoEnum_bool": false, + "HubType_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to create / update. +`AdminPasswordPlainText_str` | `string` (ASCII) | Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. +`Online_bool` | `boolean` | Online flag +`MaxSession_u32` | `number` (uint32) | Maximum number of VPN sessions +`NoEnum_bool` | `boolean` | No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. +`HubType_u32` | `number` (enum) | Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
`0`: Stand-alone HUB
`1`: Static HUB
`2`: Dynamic HUB + +*** + +## "EnumHub" RPC API - Get List of Virtual Hubs +### Description +Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumHub", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "NumHub_u32": 0, + "HubList": [ + { + "HubName_str": "hubname", + "Online_bool": false, + "HubType_u32": 0, + "NumUsers_u32": 0, + "NumGroups_u32": 0, + "NumSessions_u32": 0, + "NumMacTables_u32": 0, + "NumIpTables_u32": 0, + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "NumLogin_u32": 0, + "IsTrafficFilled_bool": false, + "Ex.Recv.BroadcastBytes_u64": 0, + "Ex.Recv.BroadcastCount_u64": 0, + "Ex.Recv.UnicastBytes_u64": 0, + "Ex.Recv.UnicastCount_u64": 0, + "Ex.Send.BroadcastBytes_u64": 0, + "Ex.Send.BroadcastCount_u64": 0, + "Ex.Send.UnicastBytes_u64": 0, + "Ex.Send.UnicastCount_u64": 0 + }, + { + "HubName_str": "hubname", + "Online_bool": false, + "HubType_u32": 0, + "NumUsers_u32": 0, + "NumGroups_u32": 0, + "NumSessions_u32": 0, + "NumMacTables_u32": 0, + "NumIpTables_u32": 0, + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "NumLogin_u32": 0, + "IsTrafficFilled_bool": false, + "Ex.Recv.BroadcastBytes_u64": 0, + "Ex.Recv.BroadcastCount_u64": 0, + "Ex.Recv.UnicastBytes_u64": 0, + "Ex.Recv.UnicastCount_u64": 0, + "Ex.Send.BroadcastBytes_u64": 0, + "Ex.Send.BroadcastCount_u64": 0, + "Ex.Send.UnicastBytes_u64": 0, + "Ex.Send.UnicastCount_u64": 0 + }, + { + "HubName_str": "hubname", + "Online_bool": false, + "HubType_u32": 0, + "NumUsers_u32": 0, + "NumGroups_u32": 0, + "NumSessions_u32": 0, + "NumMacTables_u32": 0, + "NumIpTables_u32": 0, + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "NumLogin_u32": 0, + "IsTrafficFilled_bool": false, + "Ex.Recv.BroadcastBytes_u64": 0, + "Ex.Recv.BroadcastCount_u64": 0, + "Ex.Recv.UnicastBytes_u64": 0, + "Ex.Recv.UnicastCount_u64": 0, + "Ex.Send.BroadcastBytes_u64": 0, + "Ex.Send.BroadcastCount_u64": 0, + "Ex.Send.UnicastBytes_u64": 0, + "Ex.Send.UnicastCount_u64": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`NumHub_u32` | `number` (uint32) | Number of Virtual Hubs +`HubList` | `Array object` | Virtual Hubs +`HubName_str` | `string` (ASCII) | The name of the Virtual Hub +`Online_bool` | `boolean` | Online state +`HubType_u32` | `number` (enum) | Type of HUB (Valid only for Clustered VPN Servers)
Values:
`0`: Stand-alone HUB
`1`: Static HUB
`2`: Dynamic HUB +`NumUsers_u32` | `number` (uint32) | Number of users +`NumGroups_u32` | `number` (uint32) | Number of registered groups +`NumSessions_u32` | `number` (uint32) | Number of registered sessions +`NumMacTables_u32` | `number` (uint32) | Number of current MAC table entries +`NumIpTables_u32` | `number` (uint32) | Number of current IP table entries +`LastCommTime_dt` | `Date` | Last communication date and time +`LastLoginTime_dt` | `Date` | Last login date and time +`CreatedTime_dt` | `Date` | Creation date and time +`NumLogin_u32` | `number` (uint32) | Number of accumulated logins +`IsTrafficFilled_bool` | `boolean` | Whether the traffic information is provided +`Ex.Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Ex.Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Ex.Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Ex.Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Ex.Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Ex.Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Ex.Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Ex.Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) + +*** + +## "DeleteHub" RPC API - Delete Virtual Hub +### Description +Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteHub", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name + +*** + +## "GetHubRadius" RPC API - Get Setting of RADIUS Server Used for User Authentication +### Description +Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHubRadius", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "RadiusServerName_str": "radiusservername", + "RadiusPort_u32": 0, + "RadiusSecret_str": "radiussecret", + "RadiusRetryInterval_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`RadiusServerName_str` | `string` (ASCII) | RADIUS server name +`RadiusPort_u32` | `number` (uint32) | RADIUS port number +`RadiusSecret_str` | `string` (ASCII) | Secret key +`RadiusRetryInterval_u32` | `number` (uint32) | Radius retry interval + +*** + +## "SetHubRadius" RPC API - Set RADIUS Server to use for User Authentication +### Description +Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHubRadius", + "params": { + "HubName_str": "hubname", + "RadiusServerName_str": "radiusservername", + "RadiusPort_u32": 0, + "RadiusSecret_str": "radiussecret", + "RadiusRetryInterval_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "RadiusServerName_str": "radiusservername", + "RadiusPort_u32": 0, + "RadiusSecret_str": "radiussecret", + "RadiusRetryInterval_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`RadiusServerName_str` | `string` (ASCII) | RADIUS server name +`RadiusPort_u32` | `number` (uint32) | RADIUS port number +`RadiusSecret_str` | `string` (ASCII) | Secret key +`RadiusRetryInterval_u32` | `number` (uint32) | Radius retry interval + +*** + +## "EnumConnection" RPC API - Get List of TCP Connections Connecting to the VPN Server +### Description +Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumConnection", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "NumConnection_u32": 0, + "ConnectionList": [ + { + "Name_str": "name", + "Hostname_str": "hostname", + "Ip_ip": "192.168.0.1", + "Port_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Type_u32": 0 + }, + { + "Name_str": "name", + "Hostname_str": "hostname", + "Ip_ip": "192.168.0.1", + "Port_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Type_u32": 0 + }, + { + "Name_str": "name", + "Hostname_str": "hostname", + "Ip_ip": "192.168.0.1", + "Port_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Type_u32": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`NumConnection_u32` | `number` (uint32) | Number of connections +`ConnectionList` | `Array object` | Connection list +`Name_str` | `string` (ASCII) | Connection name +`Hostname_str` | `string` (ASCII) | Host name +`Ip_ip` | `string` (IP address) | IP address +`Port_u32` | `number` (uint32) | Port number +`ConnectedTime_dt` | `Date` | Connected time +`Type_u32` | `number` (enum) | Connection type
Values:
`0`: VPN Client
`1`: During initialization
`2`: Login connection
`3`: Additional connection
`4`: RPC for server farm
`5`: RPC for Management
`6`: HUB enumeration
`7`: Password change
`8`: SSTP
`9`: OpenVPN + +*** + +## "DisconnectConnection" RPC API - Disconnect TCP Connections Connecting to the VPN Server +### Description +Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DisconnectConnection", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Connection name + +*** + +## "GetConnectionInfo" RPC API - Get Information of TCP Connections Connecting to the VPN Server +### Description +Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetConnectionInfo", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "Type_u32": 0, + "Hostname_str": "hostname", + "Ip_ip": "192.168.0.1", + "Port_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "ServerStr_str": "serverstr", + "ServerVer_u32": 0, + "ServerBuild_u32": 0, + "ClientStr_str": "clientstr", + "ClientVer_u32": 0, + "ClientBuild_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Connection name +`Type_u32` | `number` (enum) | Type
Values:
`0`: VPN Client
`1`: During initialization
`2`: Login connection
`3`: Additional connection
`4`: RPC for server farm
`5`: RPC for Management
`6`: HUB enumeration
`7`: Password change
`8`: SSTP
`9`: OpenVPN +`Hostname_str` | `string` (ASCII) | Host name +`Ip_ip` | `string` (IP address) | IP address +`Port_u32` | `number` (uint32) | Port number +`ConnectedTime_dt` | `Date` | Connected time +`ServerStr_str` | `string` (ASCII) | Server string +`ServerVer_u32` | `number` (uint32) | Server version +`ServerBuild_u32` | `number` (uint32) | Server build number +`ClientStr_str` | `string` (ASCII) | Client string +`ClientVer_u32` | `number` (uint32) | Client version +`ClientBuild_u32` | `number` (uint32) | Client build number + +*** + +## "SetHubOnline" RPC API - Switch Virtual Hub to Online or Offline +### Description +Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHubOnline", + "params": { + "HubName_str": "hubname", + "Online_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Online_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online / offline flag + +*** + +## "GetHubStatus" RPC API - Get Current Status of Virtual Hub +### Description +Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHubStatus", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Online_bool": false, + "HubType_u32": 0, + "NumSessions_u32": 0, + "NumSessionsClient_u32": 0, + "NumSessionsBridge_u32": 0, + "NumAccessLists_u32": 0, + "NumUsers_u32": 0, + "NumGroups_u32": 0, + "NumMacTables_u32": 0, + "NumIpTables_u32": 0, + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "SecureNATEnabled_bool": false, + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "NumLogin_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online +`HubType_u32` | `number` (enum) | Type of HUB
Values:
`0`: Stand-alone HUB
`1`: Static HUB
`2`: Dynamic HUB +`NumSessions_u32` | `number` (uint32) | Number of sessions +`NumSessionsClient_u32` | `number` (uint32) | Number of sessions (client mode) +`NumSessionsBridge_u32` | `number` (uint32) | Number of sessions (bridge mode) +`NumAccessLists_u32` | `number` (uint32) | Number of Access list entries +`NumUsers_u32` | `number` (uint32) | Number of users +`NumGroups_u32` | `number` (uint32) | Number of groups +`NumMacTables_u32` | `number` (uint32) | Number of MAC table entries +`NumIpTables_u32` | `number` (uint32) | Number of IP table entries +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`SecureNATEnabled_bool` | `boolean` | Whether SecureNAT is enabled +`LastCommTime_dt` | `Date` | Last communication date and time +`LastLoginTime_dt` | `Date` | Last login date and time +`CreatedTime_dt` | `Date` | Creation date and time +`NumLogin_u32` | `number` (uint32) | Number of logins + +*** + +## "SetHubLog" RPC API - Set the logging configuration of the Virtual Hub +### Description +Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHubLog", + "params": { + "HubName_str": "hubname", + "SaveSecurityLog_bool": false, + "SecurityLogSwitchType_u32": 0, + "SavePacketLog_bool": false, + "PacketLogSwitchType_u32": 0, + "PacketLogConfig_u32": [ + 1, + 2, + 3 + ] + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "SaveSecurityLog_bool": false, + "SecurityLogSwitchType_u32": 0, + "SavePacketLog_bool": false, + "PacketLogSwitchType_u32": 0, + "PacketLogConfig_u32": [ + 1, + 2, + 3 + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`SaveSecurityLog_bool` | `boolean` | The flag to enable / disable saving the security log +`SecurityLogSwitchType_u32` | `number` (enum) | The log filename switching setting of the security log
Values:
`0`: No switching
`1`: Secondly basis
`2`: Minutely basis
`3`: Hourly basis
`4`: Daily basis
`5`: Monthly basis +`SavePacketLog_bool` | `boolean` | The flag to enable / disable saving the security log +`PacketLogSwitchType_u32` | `number` (enum) | The log filename switching settings of the packet logs
Values:
`0`: No switching
`1`: Secondly basis
`2`: Minutely basis
`3`: Hourly basis
`4`: Daily basis
`5`: Monthly basis +`PacketLogConfig_u32` | `number` (enum) | Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7.
Values:
`0`: Not save
`1`: Only header
`2`: All payloads + +*** + +## "GetHubLog" RPC API - Get the logging configuration of the Virtual Hub +### Description +Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHubLog", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "SaveSecurityLog_bool": false, + "SecurityLogSwitchType_u32": 0, + "SavePacketLog_bool": false, + "PacketLogSwitchType_u32": 0, + "PacketLogConfig_u32": [ + 1, + 2, + 3 + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`SaveSecurityLog_bool` | `boolean` | The flag to enable / disable saving the security log +`SecurityLogSwitchType_u32` | `number` (enum) | The log filename switching setting of the security log
Values:
`0`: No switching
`1`: Secondly basis
`2`: Minutely basis
`3`: Hourly basis
`4`: Daily basis
`5`: Monthly basis +`SavePacketLog_bool` | `boolean` | The flag to enable / disable saving the security log +`PacketLogSwitchType_u32` | `number` (enum) | The log filename switching settings of the packet logs
Values:
`0`: No switching
`1`: Secondly basis
`2`: Minutely basis
`3`: Hourly basis
`4`: Daily basis
`5`: Monthly basis +`PacketLogConfig_u32` | `number` (enum) | Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7.
Values:
`0`: Not save
`1`: Only header
`2`: All payloads + +*** + +## "AddCa" RPC API - Add Trusted CA Certificate +### Description +Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddCa", + "params": { + "HubName_str": "hubname", + "Cert_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Cert_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Cert_bin` | `string` (Base64 binary) | The body of the X.509 certificate + +*** + +## "EnumCa" RPC API - Get List of Trusted CA Certificates +### Description +Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumCa", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "CAList": [ + { + "Key_u32": 0, + "SubjectName_utf": "subjectname", + "IssuerName_utf": "issuername", + "Expires_dt": "2020-08-01T12:24:36.123" + }, + { + "Key_u32": 0, + "SubjectName_utf": "subjectname", + "IssuerName_utf": "issuername", + "Expires_dt": "2020-08-01T12:24:36.123" + }, + { + "Key_u32": 0, + "SubjectName_utf": "subjectname", + "IssuerName_utf": "issuername", + "Expires_dt": "2020-08-01T12:24:36.123" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`CAList` | `Array object` | The list of CA +`Key_u32` | `number` (uint32) | The key id of the item +`SubjectName_utf` | `string` (UTF8) | Subject +`IssuerName_utf` | `string` (UTF8) | Issuer +`Expires_dt` | `Date` | Expiration date + +*** + +## "GetCa" RPC API - Get Trusted CA Certificate +### Description +Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetCa", + "params": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0, + "Cert_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | The key id of the certificate +`Cert_bin` | `string` (Base64 binary) | The body of the X.509 certificate + +*** + +## "DeleteCa" RPC API - Delete Trusted CA Certificate +### Description +Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteCa", + "params": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Certificate key id to be deleted + +*** + +## "CreateLink" RPC API - Create New Cascade Connection +### Description +Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "CreateLink", + "params": { + "HubName_Ex_str": "hubname_ex", + "CheckServerCert_bool": false, + "AccountName_utf": "clientoption_accountname", + "Hostname_str": "clientoption_hostname", + "Port_u32": 0, + "ProxyType_u32": 0, + "HubName_str": "clientoption_hubname", + "MaxConnection_u32": 0, + "UseEncrypt_bool": false, + "UseCompress_bool": false, + "HalfConnection_bool": false, + "AdditionalConnectionInterval_u32": 0, + "ConnectionDisconnectSpan_u32": 0, + "AuthType_u32": 0, + "Username_str": "clientauth_username", + "HashedPassword_bin": "SGVsbG8gV29ybGQ=", + "PlainPassword_str": "clientauth_plainpassword", + "ClientX_bin": "SGVsbG8gV29ybGQ=", + "ClientK_bin": "SGVsbG8gV29ybGQ=", + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "SecPol_CheckMac_bool": false, + "SecPol_CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:RSandRAFilter_bool": false, + "SecPol_RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "SecPol_CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_Ex_str": "hubname_ex", + "Online_bool": false, + "CheckServerCert_bool": false, + "ServerCert_bin": "SGVsbG8gV29ybGQ=", + "AccountName_utf": "clientoption_accountname", + "Hostname_str": "clientoption_hostname", + "Port_u32": 0, + "ProxyType_u32": 0, + "ProxyName_str": "clientoption_proxyname", + "ProxyPort_u32": 0, + "ProxyUsername_str": "clientoption_proxyusername", + "ProxyPassword_str": "clientoption_proxypassword", + "HubName_str": "clientoption_hubname", + "MaxConnection_u32": 0, + "UseEncrypt_bool": false, + "UseCompress_bool": false, + "HalfConnection_bool": false, + "AdditionalConnectionInterval_u32": 0, + "ConnectionDisconnectSpan_u32": 0, + "DisableQoS_bool": false, + "NoTls1_bool": false, + "NoUdpAcceleration_bool": false, + "AuthType_u32": 0, + "Username_str": "clientauth_username", + "HashedPassword_bin": "SGVsbG8gV29ybGQ=", + "PlainPassword_str": "clientauth_plainpassword", + "ClientX_bin": "SGVsbG8gV29ybGQ=", + "ClientK_bin": "SGVsbG8gV29ybGQ=", + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "SecPol_CheckMac_bool": false, + "SecPol_CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:RSandRAFilter_bool": false, + "SecPol_RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "SecPol_CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_Ex_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online flag +`CheckServerCert_bool` | `boolean` | The flag to enable validation for the server certificate +`ServerCert_bin` | `string` (Base64 binary) | The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. +`AccountName_utf` | `string` (UTF8) | Client Option Parameters: Specify the name of the Cascade Connection +`Hostname_str` | `string` (ASCII) | Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. +`Port_u32` | `number` (uint32) | Client Option Parameters: Specify the port number of the destination VPN Server. +`ProxyType_u32` | `number` (enum) | Client Option Parameters: The type of the proxy server
Values:
`0`: Direct TCP connection
`1`: Connection via HTTP proxy server
`2`: Connection via SOCKS proxy server +`ProxyName_str` | `string` (ASCII) | Client Option Parameters: The hostname or IP address of the proxy server name +`ProxyPort_u32` | `number` (uint32) | Client Option Parameters: The port number of the proxy server +`ProxyUsername_str` | `string` (ASCII) | Client Option Parameters: The username to connect to the proxy server +`ProxyPassword_str` | `string` (ASCII) | Client Option Parameters: The password to connect to the proxy server +`HubName_str` | `string` (ASCII) | Client Option Parameters: The Virtual Hub on the destination VPN Server +`MaxConnection_u32` | `number` (uint32) | Client Option Parameters: Number of TCP Connections to Use in VPN Communication +`UseEncrypt_bool` | `boolean` | Client Option Parameters: The flag to enable the encryption on the communication +`UseCompress_bool` | `boolean` | Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection +`HalfConnection_bool` | `boolean` | Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. +`AdditionalConnectionInterval_u32` | `number` (uint32) | Client Option Parameters: Connection attempt interval when additional connection will be established +`ConnectionDisconnectSpan_u32` | `number` (uint32) | Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) +`DisableQoS_bool` | `boolean` | Client Option Parameters: Disable QoS Control Function if the value is true +`NoTls1_bool` | `boolean` | Client Option Parameters: Do not use TLS 1.x of the value is true +`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true +`AuthType_u32` | `number` (enum) | Authentication type
Values:
`0`: Anonymous authentication
`1`: SHA-0 hashed password authentication
`2`: Plain password authentication
`3`: Certificate authentication +`Username_str` | `string` (ASCII) | User name +`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). +`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). +`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). +`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`SecPol_CheckMac_bool` | `boolean` | Security policy: Prohibit the duplicate MAC address +`SecPol_CheckIP_bool` | `boolean` | Security policy: Prohibit a duplicate IP address (IPv4) +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`SecPol_RAFilter_bool` | `boolean` | Security policy: Filter the router advertisement packet (IPv6) +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`SecPol_CheckIPv6_bool` | `boolean` | Security policy: Prohibit the duplicate IP address (IPv6) +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "GetLink" RPC API - Get the Cascade Connection Setting +### Description +Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetLink", + "params": { + "HubName_Ex_str": "hubname_ex", + "AccountName_utf": "clientoption_accountname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_Ex_str": "hubname_ex", + "Online_bool": false, + "CheckServerCert_bool": false, + "ServerCert_bin": "SGVsbG8gV29ybGQ=", + "AccountName_utf": "clientoption_accountname", + "Hostname_str": "clientoption_hostname", + "Port_u32": 0, + "ProxyType_u32": 0, + "ProxyName_str": "clientoption_proxyname", + "ProxyPort_u32": 0, + "ProxyUsername_str": "clientoption_proxyusername", + "ProxyPassword_str": "clientoption_proxypassword", + "HubName_str": "clientoption_hubname", + "MaxConnection_u32": 0, + "UseEncrypt_bool": false, + "UseCompress_bool": false, + "HalfConnection_bool": false, + "AdditionalConnectionInterval_u32": 0, + "ConnectionDisconnectSpan_u32": 0, + "DisableQoS_bool": false, + "NoTls1_bool": false, + "NoUdpAcceleration_bool": false, + "AuthType_u32": 0, + "Username_str": "clientauth_username", + "HashedPassword_bin": "SGVsbG8gV29ybGQ=", + "PlainPassword_str": "clientauth_plainpassword", + "ClientX_bin": "SGVsbG8gV29ybGQ=", + "ClientK_bin": "SGVsbG8gV29ybGQ=", + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "SecPol_CheckMac_bool": false, + "SecPol_CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:RSandRAFilter_bool": false, + "SecPol_RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "SecPol_CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_Ex_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online flag +`CheckServerCert_bool` | `boolean` | The flag to enable validation for the server certificate +`ServerCert_bin` | `string` (Base64 binary) | The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. +`AccountName_utf` | `string` (UTF8) | Client Option Parameters: Specify the name of the Cascade Connection +`Hostname_str` | `string` (ASCII) | Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. +`Port_u32` | `number` (uint32) | Client Option Parameters: Specify the port number of the destination VPN Server. +`ProxyType_u32` | `number` (enum) | Client Option Parameters: The type of the proxy server
Values:
`0`: Direct TCP connection
`1`: Connection via HTTP proxy server
`2`: Connection via SOCKS proxy server +`ProxyName_str` | `string` (ASCII) | Client Option Parameters: The hostname or IP address of the proxy server name +`ProxyPort_u32` | `number` (uint32) | Client Option Parameters: The port number of the proxy server +`ProxyUsername_str` | `string` (ASCII) | Client Option Parameters: The username to connect to the proxy server +`ProxyPassword_str` | `string` (ASCII) | Client Option Parameters: The password to connect to the proxy server +`HubName_str` | `string` (ASCII) | Client Option Parameters: The Virtual Hub on the destination VPN Server +`MaxConnection_u32` | `number` (uint32) | Client Option Parameters: Number of TCP Connections to Use in VPN Communication +`UseEncrypt_bool` | `boolean` | Client Option Parameters: The flag to enable the encryption on the communication +`UseCompress_bool` | `boolean` | Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection +`HalfConnection_bool` | `boolean` | Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. +`AdditionalConnectionInterval_u32` | `number` (uint32) | Client Option Parameters: Connection attempt interval when additional connection will be established +`ConnectionDisconnectSpan_u32` | `number` (uint32) | Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) +`DisableQoS_bool` | `boolean` | Client Option Parameters: Disable QoS Control Function if the value is true +`NoTls1_bool` | `boolean` | Client Option Parameters: Do not use TLS 1.x of the value is true +`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true +`AuthType_u32` | `number` (enum) | Authentication type
Values:
`0`: Anonymous authentication
`1`: SHA-0 hashed password authentication
`2`: Plain password authentication
`3`: Certificate authentication +`Username_str` | `string` (ASCII) | User name +`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). +`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). +`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). +`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`SecPol_CheckMac_bool` | `boolean` | Security policy: Prohibit the duplicate MAC address +`SecPol_CheckIP_bool` | `boolean` | Security policy: Prohibit a duplicate IP address (IPv4) +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`SecPol_RAFilter_bool` | `boolean` | Security policy: Filter the router advertisement packet (IPv6) +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`SecPol_CheckIPv6_bool` | `boolean` | Security policy: Prohibit the duplicate IP address (IPv6) +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "SetLink" RPC API - Change Existing Cascade Connection +### Description +Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetLink", + "params": { + "HubName_Ex_str": "hubname_ex", + "CheckServerCert_bool": false, + "AccountName_utf": "clientoption_accountname", + "Hostname_str": "clientoption_hostname", + "Port_u32": 0, + "ProxyType_u32": 0, + "HubName_str": "clientoption_hubname", + "MaxConnection_u32": 0, + "UseEncrypt_bool": false, + "UseCompress_bool": false, + "HalfConnection_bool": false, + "AdditionalConnectionInterval_u32": 0, + "ConnectionDisconnectSpan_u32": 0, + "AuthType_u32": 0, + "Username_str": "clientauth_username", + "HashedPassword_bin": "SGVsbG8gV29ybGQ=", + "PlainPassword_str": "clientauth_plainpassword", + "ClientX_bin": "SGVsbG8gV29ybGQ=", + "ClientK_bin": "SGVsbG8gV29ybGQ=", + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "SecPol_CheckMac_bool": false, + "SecPol_CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:RSandRAFilter_bool": false, + "SecPol_RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "SecPol_CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_Ex_str": "hubname_ex", + "Online_bool": false, + "CheckServerCert_bool": false, + "ServerCert_bin": "SGVsbG8gV29ybGQ=", + "AccountName_utf": "clientoption_accountname", + "Hostname_str": "clientoption_hostname", + "Port_u32": 0, + "ProxyType_u32": 0, + "ProxyName_str": "clientoption_proxyname", + "ProxyPort_u32": 0, + "ProxyUsername_str": "clientoption_proxyusername", + "ProxyPassword_str": "clientoption_proxypassword", + "HubName_str": "clientoption_hubname", + "MaxConnection_u32": 0, + "UseEncrypt_bool": false, + "UseCompress_bool": false, + "HalfConnection_bool": false, + "AdditionalConnectionInterval_u32": 0, + "ConnectionDisconnectSpan_u32": 0, + "DisableQoS_bool": false, + "NoTls1_bool": false, + "NoUdpAcceleration_bool": false, + "AuthType_u32": 0, + "Username_str": "clientauth_username", + "HashedPassword_bin": "SGVsbG8gV29ybGQ=", + "PlainPassword_str": "clientauth_plainpassword", + "ClientX_bin": "SGVsbG8gV29ybGQ=", + "ClientK_bin": "SGVsbG8gV29ybGQ=", + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "SecPol_CheckMac_bool": false, + "SecPol_CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:RSandRAFilter_bool": false, + "SecPol_RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "SecPol_CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_Ex_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online flag +`CheckServerCert_bool` | `boolean` | The flag to enable validation for the server certificate +`ServerCert_bin` | `string` (Base64 binary) | The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. +`AccountName_utf` | `string` (UTF8) | Client Option Parameters: Specify the name of the Cascade Connection +`Hostname_str` | `string` (ASCII) | Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. +`Port_u32` | `number` (uint32) | Client Option Parameters: Specify the port number of the destination VPN Server. +`ProxyType_u32` | `number` (enum) | Client Option Parameters: The type of the proxy server
Values:
`0`: Direct TCP connection
`1`: Connection via HTTP proxy server
`2`: Connection via SOCKS proxy server +`ProxyName_str` | `string` (ASCII) | Client Option Parameters: The hostname or IP address of the proxy server name +`ProxyPort_u32` | `number` (uint32) | Client Option Parameters: The port number of the proxy server +`ProxyUsername_str` | `string` (ASCII) | Client Option Parameters: The username to connect to the proxy server +`ProxyPassword_str` | `string` (ASCII) | Client Option Parameters: The password to connect to the proxy server +`HubName_str` | `string` (ASCII) | Client Option Parameters: The Virtual Hub on the destination VPN Server +`MaxConnection_u32` | `number` (uint32) | Client Option Parameters: Number of TCP Connections to Use in VPN Communication +`UseEncrypt_bool` | `boolean` | Client Option Parameters: The flag to enable the encryption on the communication +`UseCompress_bool` | `boolean` | Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection +`HalfConnection_bool` | `boolean` | Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. +`AdditionalConnectionInterval_u32` | `number` (uint32) | Client Option Parameters: Connection attempt interval when additional connection will be established +`ConnectionDisconnectSpan_u32` | `number` (uint32) | Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) +`DisableQoS_bool` | `boolean` | Client Option Parameters: Disable QoS Control Function if the value is true +`NoTls1_bool` | `boolean` | Client Option Parameters: Do not use TLS 1.x of the value is true +`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true +`AuthType_u32` | `number` (enum) | Authentication type
Values:
`0`: Anonymous authentication
`1`: SHA-0 hashed password authentication
`2`: Plain password authentication
`3`: Certificate authentication +`Username_str` | `string` (ASCII) | User name +`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). +`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). +`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). +`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`SecPol_CheckMac_bool` | `boolean` | Security policy: Prohibit the duplicate MAC address +`SecPol_CheckIP_bool` | `boolean` | Security policy: Prohibit a duplicate IP address (IPv4) +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`SecPol_RAFilter_bool` | `boolean` | Security policy: Filter the router advertisement packet (IPv6) +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`SecPol_CheckIPv6_bool` | `boolean` | Security policy: Prohibit the duplicate IP address (IPv6) +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "EnumLink" RPC API - Get List of Cascade Connections +### Description +Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumLink", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "NumLink_u32": 0, + "LinkList": [ + { + "AccountName_utf": "accountname", + "Online_bool": false, + "Connected_bool": false, + "LastError_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Hostname_str": "hostname", + "TargetHubName_str": "targethubname" + }, + { + "AccountName_utf": "accountname", + "Online_bool": false, + "Connected_bool": false, + "LastError_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Hostname_str": "hostname", + "TargetHubName_str": "targethubname" + }, + { + "AccountName_utf": "accountname", + "Online_bool": false, + "Connected_bool": false, + "LastError_u32": 0, + "ConnectedTime_dt": "2020-08-01T12:24:36.123", + "Hostname_str": "hostname", + "TargetHubName_str": "targethubname" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`NumLink_u32` | `number` (uint32) | Number of cascade connections +`LinkList` | `Array object` | The list of cascade connections +`AccountName_utf` | `string` (UTF8) | The name of cascade connection +`Online_bool` | `boolean` | Online flag +`Connected_bool` | `boolean` | The flag indicates whether the cascade connection is established +`LastError_u32` | `number` (uint32) | The error last occurred if the cascade connection is in the fail state +`ConnectedTime_dt` | `Date` | Connection completion time +`Hostname_str` | `string` (ASCII) | Host name of the destination VPN server +`TargetHubName_str` | `string` (ASCII) | The Virtual Hub name + +*** + +## "SetLinkOnline" RPC API - Switch Cascade Connection to Online Status +### Description +Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetLinkOnline", + "params": { + "HubName_str": "hubname", + "AccountName_utf": "accountname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AccountName_utf": "accountname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`AccountName_utf` | `string` (UTF8) | The name of the cascade connection + +*** + +## "SetLinkOffline" RPC API - Switch Cascade Connection to Offline Status +### Description +Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetLinkOffline", + "params": { + "HubName_str": "hubname", + "AccountName_utf": "accountname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AccountName_utf": "accountname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`AccountName_utf` | `string` (UTF8) | The name of the cascade connection + +*** + +## "DeleteLink" RPC API - Delete Cascade Connection Setting +### Description +Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteLink", + "params": { + "HubName_str": "hubname", + "AccountName_utf": "accountname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AccountName_utf": "accountname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`AccountName_utf` | `string` (UTF8) | The name of the cascade connection + +*** + +## "RenameLink" RPC API - Change Name of Cascade Connection +### Description +Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "RenameLink", + "params": { + "HubName_str": "hubname", + "OldAccountName_utf": "oldaccountname", + "NewAccountName_utf": "newaccountname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "OldAccountName_utf": "oldaccountname", + "NewAccountName_utf": "newaccountname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`OldAccountName_utf` | `string` (UTF8) | The old name of the cascade connection +`NewAccountName_utf` | `string` (UTF8) | The new name of the cascade connection + +*** + +## "GetLinkStatus" RPC API - Get Current Cascade Connection Status +### Description +Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetLinkStatus", + "params": { + "HubName_Ex_str": "hubname_ex", + "AccountName_utf": "accountname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_Ex_str": "hubname_ex", + "AccountName_utf": "accountname", + "Active_bool": false, + "Connected_bool": false, + "SessionStatus_u32": 0, + "ServerName_str": "servername", + "ServerPort_u32": 0, + "ServerProductName_str": "serverproductname", + "ServerProductVer_u32": 0, + "ServerProductBuild_u32": 0, + "ServerX_bin": "SGVsbG8gV29ybGQ=", + "ClientX_bin": "SGVsbG8gV29ybGQ=", + "StartTime_dt": "2020-08-01T12:24:36.123", + "FirstConnectionEstablisiedTime_dt": "2020-08-01T12:24:36.123", + "CurrentConnectionEstablishTime_dt": "2020-08-01T12:24:36.123", + "NumConnectionsEatablished_u32": 0, + "HalfConnection_bool": false, + "QoS_bool": false, + "MaxTcpConnections_u32": 0, + "NumTcpConnections_u32": 0, + "NumTcpConnectionsUpload_u32": 0, + "NumTcpConnectionsDownload_u32": 0, + "UseEncrypt_bool": false, + "CipherName_str": "ciphername", + "UseCompress_bool": false, + "IsRUDPSession_bool": false, + "UnderlayProtocol_str": "underlayprotocol", + "IsUdpAccelerationEnabled_bool": false, + "IsUsingUdpAcceleration_bool": false, + "SessionName_str": "sessionname", + "ConnectionName_str": "connectionname", + "SessionKey_bin": "SGVsbG8gV29ybGQ=", + "TotalSendSize_u64": 0, + "TotalRecvSize_u64": 0, + "TotalSendSizeReal_u64": 0, + "TotalRecvSizeReal_u64": 0, + "IsBridgeMode_bool": false, + "IsMonitorMode_bool": false, + "VLanId_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_Ex_str` | `string` (ASCII) | The Virtual Hub name +`AccountName_utf` | `string` (UTF8) | The name of the cascade connection +`Active_bool` | `boolean` | The flag whether the cascade connection is enabled +`Connected_bool` | `boolean` | The flag whether the cascade connection is established +`SessionStatus_u32` | `number` (enum) | The session status
Values:
`0`: Connecting
`1`: Negotiating
`2`: During user authentication
`3`: Connection complete
`4`: Wait to retry
`5`: Idle state +`ServerName_str` | `string` (ASCII) | The destination VPN server name +`ServerPort_u32` | `number` (uint32) | The port number of the server +`ServerProductName_str` | `string` (ASCII) | Server product name +`ServerProductVer_u32` | `number` (uint32) | Server product version +`ServerProductBuild_u32` | `number` (uint32) | Server product build number +`ServerX_bin` | `string` (Base64 binary) | Server's X.509 certificate +`ClientX_bin` | `string` (Base64 binary) | Client certificate +`StartTime_dt` | `Date` | Connection start time +`FirstConnectionEstablisiedTime_dt` | `Date` | Connection completion time of the first connection +`CurrentConnectionEstablishTime_dt` | `Date` | Connection completion time of this connection +`NumConnectionsEatablished_u32` | `number` (uint32) | Number of connections have been established so far +`HalfConnection_bool` | `boolean` | Half-connection +`QoS_bool` | `boolean` | VoIP / QoS +`MaxTcpConnections_u32` | `number` (uint32) | Maximum number of the underlying TCP connections +`NumTcpConnections_u32` | `number` (uint32) | Number of current underlying TCP connections +`NumTcpConnectionsUpload_u32` | `number` (uint32) | Number of underlying inbound TCP connections +`NumTcpConnectionsDownload_u32` | `number` (uint32) | Number of underlying outbound TCP connections +`UseEncrypt_bool` | `boolean` | Use of encryption +`CipherName_str` | `string` (ASCII) | Cipher algorithm name +`UseCompress_bool` | `boolean` | Use of compression +`IsRUDPSession_bool` | `boolean` | The flag whether this is a R-UDP session +`UnderlayProtocol_str` | `string` (ASCII) | Underlying physical communication protocol +`IsUdpAccelerationEnabled_bool` | `boolean` | The UDP acceleration is enabled +`IsUsingUdpAcceleration_bool` | `boolean` | The UDP acceleration is being actually used +`SessionName_str` | `string` (ASCII) | Session name +`ConnectionName_str` | `string` (ASCII) | Connection name +`SessionKey_bin` | `string` (Base64 binary) | Session key +`TotalSendSize_u64` | `number` (uint64) | Total transmitted data size +`TotalRecvSize_u64` | `number` (uint64) | Total received data size +`TotalSendSizeReal_u64` | `number` (uint64) | Total transmitted data size (no compression) +`TotalRecvSizeReal_u64` | `number` (uint64) | Total received data size (no compression) +`IsBridgeMode_bool` | `boolean` | The flag whether the VPN session is Bridge Mode +`IsMonitorMode_bool` | `boolean` | The flag whether the VPN session is Monitor mode +`VLanId_u32` | `number` (uint32) | VLAN ID + +*** + +## "AddAccess" RPC API - Add Access List Rule +### Description +Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddAccess", + "params": { + "HubName_str": "hubname", + "AccessListSingle": [ + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + } + ] + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AccessListSingle": [ + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`AccessListSingle` | `Array object` | Access list (Must be a single item) +`Id_u32` | `number` (uint32) | ID +`Note_utf` | `string` (UTF8) | Specify a description (note) for this rule +`Active_bool` | `boolean` | Enabled flag (true: enabled, false: disabled) +`Priority_u32` | `number` (uint32) | Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +`Discard_bool` | `boolean` | The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. +`IsIPv6_bool` | `boolean` | The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. +`SrcIpAddress_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. +`SrcSubnetMask_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. +`DestIpAddress_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. +`DestSubnetMask_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. +`SrcIpAddress6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. +`SrcSubnetMask6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. +`DestIpAddress6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. +`DestSubnetMask6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. +`Protocol_u32` | `number` (enum) | The IP protocol number
Values:
`1`: ICMP for IPv4
`6`: TCP
`17`: UDP
`58`: ICMP for IPv6 +`SrcPortStart_u32` | `number` (uint32) | The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`SrcPortEnd_u32` | `number` (uint32) | The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`DestPortStart_u32` | `number` (uint32) | The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`DestPortEnd_u32` | `number` (uint32) | The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`SrcUsername_str` | `string` (ASCII) | Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +`DestUsername_str` | `string` (ASCII) | Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +`CheckSrcMac_bool` | `boolean` | Specify true if you want to check the source MAC address. +`SrcMacAddress_bin` | `string` (Base64 binary) | Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. +`SrcMacMask_bin` | `string` (Base64 binary) | Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. +`CheckDstMac_bool` | `boolean` | Specify true if you want to check the destination MAC address. +`DstMacAddress_bin` | `string` (Base64 binary) | Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. +`DstMacMask_bin` | `string` (Base64 binary) | Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. +`CheckTcpState_bool` | `boolean` | Specify true if you want to check the state of the TCP connection. +`Established_bool` | `boolean` | Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. +`Delay_u32` | `number` (uint32) | Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. +`Jitter_u32` | `number` (uint32) | Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. +`Loss_u32` | `number` (uint32) | Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. +`RedirectUrl_str` | `string` (ASCII) | The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. + +*** + +## "DeleteAccess" RPC API - Delete Rule from Access List +### Description +Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteAccess", + "params": { + "HubName_str": "hubname", + "Id_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Id_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Id_u32` | `number` (uint32) | ID + +*** + +## "EnumAccess" RPC API - Get Access List Rule List +### Description +Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumAccess", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AccessList": [ + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + }, + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + }, + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`AccessList` | `Array object` | Access list +`Id_u32` | `number` (uint32) | ID +`Note_utf` | `string` (UTF8) | Specify a description (note) for this rule +`Active_bool` | `boolean` | Enabled flag (true: enabled, false: disabled) +`Priority_u32` | `number` (uint32) | Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +`Discard_bool` | `boolean` | The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. +`IsIPv6_bool` | `boolean` | The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. +`SrcIpAddress_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. +`SrcSubnetMask_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. +`DestIpAddress_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. +`DestSubnetMask_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. +`SrcIpAddress6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. +`SrcSubnetMask6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. +`DestIpAddress6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. +`DestSubnetMask6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. +`Protocol_u32` | `number` (enum) | The IP protocol number
Values:
`1`: ICMP for IPv4
`6`: TCP
`17`: UDP
`58`: ICMP for IPv6 +`SrcPortStart_u32` | `number` (uint32) | The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`SrcPortEnd_u32` | `number` (uint32) | The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`DestPortStart_u32` | `number` (uint32) | The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`DestPortEnd_u32` | `number` (uint32) | The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`SrcUsername_str` | `string` (ASCII) | Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +`DestUsername_str` | `string` (ASCII) | Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +`CheckSrcMac_bool` | `boolean` | Specify true if you want to check the source MAC address. +`SrcMacAddress_bin` | `string` (Base64 binary) | Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. +`SrcMacMask_bin` | `string` (Base64 binary) | Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. +`CheckDstMac_bool` | `boolean` | Specify true if you want to check the destination MAC address. +`DstMacAddress_bin` | `string` (Base64 binary) | Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. +`DstMacMask_bin` | `string` (Base64 binary) | Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. +`CheckTcpState_bool` | `boolean` | Specify true if you want to check the state of the TCP connection. +`Established_bool` | `boolean` | Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. +`Delay_u32` | `number` (uint32) | Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. +`Jitter_u32` | `number` (uint32) | Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. +`Loss_u32` | `number` (uint32) | Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. +`RedirectUrl_str` | `string` (ASCII) | The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. + +*** + +## "SetAccessList" RPC API - Replace all access lists on a single bulk API call +### Description +Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetAccessList", + "params": { + "HubName_str": "hubname", + "AccessList": [ + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + }, + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + }, + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + } + ] + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AccessList": [ + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + }, + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + }, + { + "Id_u32": 0, + "Note_utf": "note", + "Active_bool": false, + "Priority_u32": 0, + "Discard_bool": false, + "IsIPv6_bool": false, + "SrcIpAddress_ip": "192.168.0.1", + "SrcSubnetMask_ip": "255.255.255.255", + "DestIpAddress_ip": "192.168.0.1", + "DestSubnetMask_ip": "255.255.255.255", + "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=", + "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=", + "Protocol_u32": 0, + "SrcPortStart_u32": 0, + "SrcPortEnd_u32": 0, + "DestPortStart_u32": 0, + "DestPortEnd_u32": 0, + "SrcUsername_str": "srcusername", + "DestUsername_str": "destusername", + "CheckSrcMac_bool": false, + "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=", + "SrcMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckDstMac_bool": false, + "DstMacAddress_bin": "SGVsbG8gV29ybGQ=", + "DstMacMask_bin": "SGVsbG8gV29ybGQ=", + "CheckTcpState_bool": false, + "Established_bool": false, + "Delay_u32": 0, + "Jitter_u32": 0, + "Loss_u32": 0, + "RedirectUrl_str": "redirecturl" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`AccessList` | `Array object` | Access list +`Id_u32` | `number` (uint32) | ID +`Note_utf` | `string` (UTF8) | Specify a description (note) for this rule +`Active_bool` | `boolean` | Enabled flag (true: enabled, false: disabled) +`Priority_u32` | `number` (uint32) | Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +`Discard_bool` | `boolean` | The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. +`IsIPv6_bool` | `boolean` | The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. +`SrcIpAddress_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. +`SrcSubnetMask_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. +`DestIpAddress_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. +`DestSubnetMask_ip` | `string` (IP address) | Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. +`SrcIpAddress6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. +`SrcSubnetMask6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. +`DestIpAddress6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. +`DestSubnetMask6_bin` | `string` (Base64 binary) | Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. +`Protocol_u32` | `number` (enum) | The IP protocol number
Values:
`1`: ICMP for IPv4
`6`: TCP
`17`: UDP
`58`: ICMP for IPv6 +`SrcPortStart_u32` | `number` (uint32) | The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`SrcPortEnd_u32` | `number` (uint32) | The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`DestPortStart_u32` | `number` (uint32) | The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`DestPortEnd_u32` | `number` (uint32) | The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. +`SrcUsername_str` | `string` (ASCII) | Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +`DestUsername_str` | `string` (ASCII) | Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +`CheckSrcMac_bool` | `boolean` | Specify true if you want to check the source MAC address. +`SrcMacAddress_bin` | `string` (Base64 binary) | Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. +`SrcMacMask_bin` | `string` (Base64 binary) | Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. +`CheckDstMac_bool` | `boolean` | Specify true if you want to check the destination MAC address. +`DstMacAddress_bin` | `string` (Base64 binary) | Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. +`DstMacMask_bin` | `string` (Base64 binary) | Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. +`CheckTcpState_bool` | `boolean` | Specify true if you want to check the state of the TCP connection. +`Established_bool` | `boolean` | Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. +`Delay_u32` | `number` (uint32) | Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. +`Jitter_u32` | `number` (uint32) | Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. +`Loss_u32` | `number` (uint32) | Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. +`RedirectUrl_str` | `string` (ASCII) | The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. + +*** + +## "CreateUser" RPC API - Create a user +### Description +Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "CreateUser", + "params": { + "HubName_str": "hubname", + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "AuthType_u32": 0, + "Auth_Password_str": "auth_password", + "UserX_bin": "SGVsbG8gV29ybGQ=", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "CommonName_utf": "auth_rootcert_commonname", + "RadiusUsername_utf": "auth_radius_radiususername", + "NtUsername_utf": "auth_nt_ntusername", + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "AuthType_u32": 0, + "Auth_Password_str": "auth_password", + "UserX_bin": "SGVsbG8gV29ybGQ=", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "CommonName_utf": "auth_rootcert_commonname", + "RadiusUsername_utf": "auth_radius_radiususername", + "NtUsername_utf": "auth_nt_ntusername", + "NumLogin_u32": 0, + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | Specify the user name of the user +`GroupName_str` | `string` (ASCII) | Assigned group name for the user +`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the user, allow using any Unicode characters +`Note_utf` | `string` (UTF8) | Optional User Description +`CreatedTime_dt` | `Date` | Creation date and time +`UpdatedTime_dt` | `Date` | Last modified date and time +`ExpireTime_dt` | `Date` | Expiration date and time +`AuthType_u32` | `number` (enum) | Authentication method of the user
Values:
`0`: Anonymous authentication
`1`: Password authentication
`2`: User certificate authentication
`3`: Root certificate which is issued by trusted Certificate Authority
`4`: Radius authentication
`5`: Windows NT authentication +`Auth_Password_str` | `string` (ASCII) | User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. +`UserX_bin` | `string` (Base64 binary) | User certificate, valid only if AuthType_u32 == UserCert(2). +`Serial_bin` | `string` (Base64 binary) | Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). +`CommonName_utf` | `string` (UTF8) | Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). +`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). +`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). +`NumLogin_u32` | `number` (uint32) | Number of total logins of the user +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`UsePolicy_bool` | `boolean` | The flag whether to use security policy +`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`policy:NoBridge_bool` | `boolean` | Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +`policy:NoRouting_bool` | `boolean` | Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckMac_bool` | `boolean` | Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:CheckIP_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MonitorPort_bool` | `boolean` | Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +`policy:MaxConnection_u32` | `number` (uint32) | Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +`policy:TimeOut_u32` | `number` (uint32) | Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:FixPassword_bool` | `boolean` | Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +`policy:MultiLogins_u32` | `number` (uint32) | Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. +`policy:NoQoS_bool` | `boolean` | Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`policy:RAFilter_bool` | `boolean` | Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`policy:NoRoutingV6_bool` | `boolean` | Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckIPv6_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:NoSavePassword_bool` | `boolean` | Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:AutoDisconnect_u32` | `number` (uint32) | Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:NoIPv6DefaultRouterInRAWhenIPv6_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "SetUser" RPC API - Change User Settings +### Description +Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetUser", + "params": { + "HubName_str": "hubname", + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "AuthType_u32": 0, + "Auth_Password_str": "auth_password", + "UserX_bin": "SGVsbG8gV29ybGQ=", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "CommonName_utf": "auth_rootcert_commonname", + "RadiusUsername_utf": "auth_radius_radiususername", + "NtUsername_utf": "auth_nt_ntusername", + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "AuthType_u32": 0, + "Auth_Password_str": "auth_password", + "UserX_bin": "SGVsbG8gV29ybGQ=", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "CommonName_utf": "auth_rootcert_commonname", + "RadiusUsername_utf": "auth_radius_radiususername", + "NtUsername_utf": "auth_nt_ntusername", + "NumLogin_u32": 0, + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | Specify the user name of the user +`GroupName_str` | `string` (ASCII) | Assigned group name for the user +`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the user, allow using any Unicode characters +`Note_utf` | `string` (UTF8) | Optional User Description +`CreatedTime_dt` | `Date` | Creation date and time +`UpdatedTime_dt` | `Date` | Last modified date and time +`ExpireTime_dt` | `Date` | Expiration date and time +`AuthType_u32` | `number` (enum) | Authentication method of the user
Values:
`0`: Anonymous authentication
`1`: Password authentication
`2`: User certificate authentication
`3`: Root certificate which is issued by trusted Certificate Authority
`4`: Radius authentication
`5`: Windows NT authentication +`Auth_Password_str` | `string` (ASCII) | User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. +`UserX_bin` | `string` (Base64 binary) | User certificate, valid only if AuthType_u32 == UserCert(2). +`Serial_bin` | `string` (Base64 binary) | Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). +`CommonName_utf` | `string` (UTF8) | Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). +`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). +`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). +`NumLogin_u32` | `number` (uint32) | Number of total logins of the user +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`UsePolicy_bool` | `boolean` | The flag whether to use security policy +`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`policy:NoBridge_bool` | `boolean` | Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +`policy:NoRouting_bool` | `boolean` | Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckMac_bool` | `boolean` | Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:CheckIP_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MonitorPort_bool` | `boolean` | Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +`policy:MaxConnection_u32` | `number` (uint32) | Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +`policy:TimeOut_u32` | `number` (uint32) | Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:FixPassword_bool` | `boolean` | Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +`policy:MultiLogins_u32` | `number` (uint32) | Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. +`policy:NoQoS_bool` | `boolean` | Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`policy:RAFilter_bool` | `boolean` | Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`policy:NoRoutingV6_bool` | `boolean` | Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckIPv6_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:NoSavePassword_bool` | `boolean` | Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:AutoDisconnect_u32` | `number` (uint32) | Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:NoIPv6DefaultRouterInRAWhenIPv6_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "GetUser" RPC API - Get User Settings +### Description +Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetUser", + "params": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "AuthType_u32": 0, + "Auth_Password_str": "auth_password", + "UserX_bin": "SGVsbG8gV29ybGQ=", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "CommonName_utf": "auth_rootcert_commonname", + "RadiusUsername_utf": "auth_radius_radiususername", + "NtUsername_utf": "auth_nt_ntusername", + "NumLogin_u32": 0, + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | Specify the user name of the user +`GroupName_str` | `string` (ASCII) | Assigned group name for the user +`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the user, allow using any Unicode characters +`Note_utf` | `string` (UTF8) | Optional User Description +`CreatedTime_dt` | `Date` | Creation date and time +`UpdatedTime_dt` | `Date` | Last modified date and time +`ExpireTime_dt` | `Date` | Expiration date and time +`AuthType_u32` | `number` (enum) | Authentication method of the user
Values:
`0`: Anonymous authentication
`1`: Password authentication
`2`: User certificate authentication
`3`: Root certificate which is issued by trusted Certificate Authority
`4`: Radius authentication
`5`: Windows NT authentication +`Auth_Password_str` | `string` (ASCII) | User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. +`UserX_bin` | `string` (Base64 binary) | User certificate, valid only if AuthType_u32 == UserCert(2). +`Serial_bin` | `string` (Base64 binary) | Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). +`CommonName_utf` | `string` (UTF8) | Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). +`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). +`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). +`NumLogin_u32` | `number` (uint32) | Number of total logins of the user +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`UsePolicy_bool` | `boolean` | The flag whether to use security policy +`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`policy:NoBridge_bool` | `boolean` | Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +`policy:NoRouting_bool` | `boolean` | Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckMac_bool` | `boolean` | Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:CheckIP_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MonitorPort_bool` | `boolean` | Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +`policy:MaxConnection_u32` | `number` (uint32) | Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +`policy:TimeOut_u32` | `number` (uint32) | Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:FixPassword_bool` | `boolean` | Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +`policy:MultiLogins_u32` | `number` (uint32) | Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. +`policy:NoQoS_bool` | `boolean` | Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`policy:RAFilter_bool` | `boolean` | Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`policy:NoRoutingV6_bool` | `boolean` | Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckIPv6_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:NoSavePassword_bool` | `boolean` | Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:AutoDisconnect_u32` | `number` (uint32) | Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:NoIPv6DefaultRouterInRAWhenIPv6_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "DeleteUser" RPC API - Delete a user +### Description +Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteUser", + "params": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | User or group name + +*** + +## "EnumUser" RPC API - Get List of Users +### Description +Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumUser", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "UserList": [ + { + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "AuthType_u32": 0, + "NumLogin_u32": 0, + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "DenyAccess_bool": false, + "IsTrafficFilled_bool": false, + "IsExpiresFilled_bool": false, + "Expires_dt": "2020-08-01T12:24:36.123", + "Ex.Recv.BroadcastBytes_u64": 0, + "Ex.Recv.BroadcastCount_u64": 0, + "Ex.Recv.UnicastBytes_u64": 0, + "Ex.Recv.UnicastCount_u64": 0, + "Ex.Send.BroadcastBytes_u64": 0, + "Ex.Send.BroadcastCount_u64": 0, + "Ex.Send.UnicastBytes_u64": 0, + "Ex.Send.UnicastCount_u64": 0 + }, + { + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "AuthType_u32": 0, + "NumLogin_u32": 0, + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "DenyAccess_bool": false, + "IsTrafficFilled_bool": false, + "IsExpiresFilled_bool": false, + "Expires_dt": "2020-08-01T12:24:36.123", + "Ex.Recv.BroadcastBytes_u64": 0, + "Ex.Recv.BroadcastCount_u64": 0, + "Ex.Recv.UnicastBytes_u64": 0, + "Ex.Recv.UnicastCount_u64": 0, + "Ex.Send.BroadcastBytes_u64": 0, + "Ex.Send.BroadcastCount_u64": 0, + "Ex.Send.UnicastBytes_u64": 0, + "Ex.Send.UnicastCount_u64": 0 + }, + { + "Name_str": "name", + "GroupName_str": "groupname", + "Realname_utf": "realname", + "Note_utf": "note", + "AuthType_u32": 0, + "NumLogin_u32": 0, + "LastLoginTime_dt": "2020-08-01T12:24:36.123", + "DenyAccess_bool": false, + "IsTrafficFilled_bool": false, + "IsExpiresFilled_bool": false, + "Expires_dt": "2020-08-01T12:24:36.123", + "Ex.Recv.BroadcastBytes_u64": 0, + "Ex.Recv.BroadcastCount_u64": 0, + "Ex.Recv.UnicastBytes_u64": 0, + "Ex.Recv.UnicastCount_u64": 0, + "Ex.Send.BroadcastBytes_u64": 0, + "Ex.Send.BroadcastCount_u64": 0, + "Ex.Send.UnicastBytes_u64": 0, + "Ex.Send.UnicastCount_u64": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`UserList` | `Array object` | User list +`Name_str` | `string` (ASCII) | User name +`GroupName_str` | `string` (ASCII) | Group name +`Realname_utf` | `string` (UTF8) | Real name +`Note_utf` | `string` (UTF8) | Note +`AuthType_u32` | `number` (enum) | Authentication method
Values:
`0`: Anonymous authentication
`1`: Password authentication
`2`: User certificate authentication
`3`: Root certificate which is issued by trusted Certificate Authority
`4`: Radius authentication
`5`: Windows NT authentication +`NumLogin_u32` | `number` (uint32) | Number of logins +`LastLoginTime_dt` | `Date` | Last login date and time +`DenyAccess_bool` | `boolean` | Access denied +`IsTrafficFilled_bool` | `boolean` | Flag of whether the traffic variable is set +`IsExpiresFilled_bool` | `boolean` | Flag of whether expiration date variable is set +`Expires_dt` | `Date` | Expiration date +`Ex.Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Ex.Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Ex.Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Ex.Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Ex.Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Ex.Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Ex.Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Ex.Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) + +*** + +## "CreateGroup" RPC API - Create Group +### Description +Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "CreateGroup", + "params": { + "HubName_str": "hubname", + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | The group name +`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters +`Note_utf` | `string` (UTF8) | Optional, specify a description of the group +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`UsePolicy_bool` | `boolean` | The flag whether to use security policy +`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`policy:NoBridge_bool` | `boolean` | Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +`policy:NoRouting_bool` | `boolean` | Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckMac_bool` | `boolean` | Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:CheckIP_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MonitorPort_bool` | `boolean` | Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +`policy:MaxConnection_u32` | `number` (uint32) | Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +`policy:TimeOut_u32` | `number` (uint32) | Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:FixPassword_bool` | `boolean` | Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +`policy:MultiLogins_u32` | `number` (uint32) | Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. +`policy:NoQoS_bool` | `boolean` | Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`policy:RAFilter_bool` | `boolean` | Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`policy:NoRoutingV6_bool` | `boolean` | Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckIPv6_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:NoSavePassword_bool` | `boolean` | Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:AutoDisconnect_u32` | `number` (uint32) | Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:NoIPv6DefaultRouterInRAWhenIPv6_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "SetGroup" RPC API - Set group settings +### Description +Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetGroup", + "params": { + "HubName_str": "hubname", + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | The group name +`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters +`Note_utf` | `string` (UTF8) | Optional, specify a description of the group +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`UsePolicy_bool` | `boolean` | The flag whether to use security policy +`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`policy:NoBridge_bool` | `boolean` | Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +`policy:NoRouting_bool` | `boolean` | Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckMac_bool` | `boolean` | Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:CheckIP_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MonitorPort_bool` | `boolean` | Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +`policy:MaxConnection_u32` | `number` (uint32) | Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +`policy:TimeOut_u32` | `number` (uint32) | Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:FixPassword_bool` | `boolean` | Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +`policy:MultiLogins_u32` | `number` (uint32) | Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. +`policy:NoQoS_bool` | `boolean` | Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`policy:RAFilter_bool` | `boolean` | Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`policy:NoRoutingV6_bool` | `boolean` | Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckIPv6_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:NoSavePassword_bool` | `boolean` | Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:AutoDisconnect_u32` | `number` (uint32) | Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:NoIPv6DefaultRouterInRAWhenIPv6_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "GetGroup" RPC API - Get Group Setting (Sync mode) +### Description +Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetGroup", + "params": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "Recv.BroadcastBytes_u64": 0, + "Recv.BroadcastCount_u64": 0, + "Recv.UnicastBytes_u64": 0, + "Recv.UnicastCount_u64": 0, + "Send.BroadcastBytes_u64": 0, + "Send.BroadcastCount_u64": 0, + "Send.UnicastBytes_u64": 0, + "Send.UnicastCount_u64": 0, + "UsePolicy_bool": false, + "policy:Access_bool": false, + "policy:DHCPFilter_bool": false, + "policy:DHCPNoServer_bool": false, + "policy:DHCPForce_bool": false, + "policy:NoBridge_bool": false, + "policy:NoRouting_bool": false, + "policy:CheckMac_bool": false, + "policy:CheckIP_bool": false, + "policy:ArpDhcpOnly_bool": false, + "policy:PrivacyFilter_bool": false, + "policy:NoServer_bool": false, + "policy:NoBroadcastLimiter_bool": false, + "policy:MonitorPort_bool": false, + "policy:MaxConnection_u32": 0, + "policy:TimeOut_u32": 0, + "policy:MaxMac_u32": 0, + "policy:MaxIP_u32": 0, + "policy:MaxUpload_u32": 0, + "policy:MaxDownload_u32": 0, + "policy:FixPassword_bool": false, + "policy:MultiLogins_u32": 0, + "policy:NoQoS_bool": false, + "policy:RSandRAFilter_bool": false, + "policy:RAFilter_bool": false, + "policy:DHCPv6Filter_bool": false, + "policy:DHCPv6NoServer_bool": false, + "policy:NoRoutingV6_bool": false, + "policy:CheckIPv6_bool": false, + "policy:NoServerV6_bool": false, + "policy:MaxIPv6_u32": 0, + "policy:NoSavePassword_bool": false, + "policy:AutoDisconnect_u32": 0, + "policy:FilterIPv4_bool": false, + "policy:FilterIPv6_bool": false, + "policy:FilterNonIP_bool": false, + "policy:NoIPv6DefaultRouterInRA_bool": false, + "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false, + "policy:VLanId_u32": 0, + "policy:Ver3_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | The group name +`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters +`Note_utf` | `string` (UTF8) | Optional, specify a description of the group +`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv) +`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv) +`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv) +`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv) +`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send) +`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send) +`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send) +`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send) +`UsePolicy_bool` | `boolean` | The flag whether to use security policy +`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. +`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPNoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +`policy:DHCPForce_bool` | `boolean` | Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +`policy:NoBridge_bool` | `boolean` | Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +`policy:NoRouting_bool` | `boolean` | Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckMac_bool` | `boolean` | Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:CheckIP_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:ArpDhcpOnly_bool` | `boolean` | Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +`policy:PrivacyFilter_bool` | `boolean` | Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. +`policy:NoServer_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +`policy:NoBroadcastLimiter_bool` | `boolean` | Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +`policy:MonitorPort_bool` | `boolean` | Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +`policy:MaxConnection_u32` | `number` (uint32) | Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +`policy:TimeOut_u32` | `number` (uint32) | Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +`policy:MaxMac_u32` | `number` (uint32) | Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. +`policy:MaxIP_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +`policy:MaxUpload_u32` | `number` (uint32) | Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +`policy:MaxDownload_u32` | `number` (uint32) | Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +`policy:FixPassword_bool` | `boolean` | Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +`policy:MultiLogins_u32` | `number` (uint32) | Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. +`policy:NoQoS_bool` | `boolean` | Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. +`policy:RSandRAFilter_bool` | `boolean` | Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +`policy:RAFilter_bool` | `boolean` | Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +`policy:DHCPv6Filter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. +`policy:DHCPv6NoServer_bool` | `boolean` | Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +`policy:NoRoutingV6_bool` | `boolean` | Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +`policy:CheckIPv6_bool` | `boolean` | Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +`policy:NoServerV6_bool` | `boolean` | Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +`policy:MaxIPv6_u32` | `number` (uint32) | Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +`policy:NoSavePassword_bool` | `boolean` | Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:AutoDisconnect_u32` | `number` (uint32) | Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +`policy:FilterIPv4_bool` | `boolean` | Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. +`policy:FilterIPv6_bool` | `boolean` | Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. +`policy:FilterNonIP_bool` | `boolean` | Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +`policy:NoIPv6DefaultRouterInRA_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:NoIPv6DefaultRouterInRAWhenIPv6_bool` | `boolean` | Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +`policy:VLanId_u32` | `number` (uint32) | Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. +`policy:Ver3_bool` | `boolean` | Security policy: Whether version 3.0 (must be true) + +*** + +## "DeleteGroup" RPC API - Delete User from Group +### Description +Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteGroup", + "params": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | User or group name + +*** + +## "EnumGroup" RPC API - Get List of Groups +### Description +Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumGroup", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "GroupList": [ + { + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "NumUsers_u32": 0, + "DenyAccess_bool": false + }, + { + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "NumUsers_u32": 0, + "DenyAccess_bool": false + }, + { + "Name_str": "name", + "Realname_utf": "realname", + "Note_utf": "note", + "NumUsers_u32": 0, + "DenyAccess_bool": false + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`GroupList` | `Array object` | Group list +`Name_str` | `string` (ASCII) | User name +`Realname_utf` | `string` (UTF8) | Real name +`Note_utf` | `string` (UTF8) | Note +`NumUsers_u32` | `number` (uint32) | Number of users +`DenyAccess_bool` | `boolean` | Access denied + +*** + +## "EnumSession" RPC API - Get List of Connected VPN Sessions +### Description +Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumSession", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "SessionList": [ + { + "Name_str": "name", + "RemoteSession_bool": false, + "RemoteHostname_str": "remotehostname", + "Username_str": "username", + "ClientIP_ip": "192.168.0.1", + "Hostname_str": "hostname", + "MaxNumTcp_u32": 0, + "CurrentNumTcp_u32": 0, + "PacketSize_u64": 0, + "PacketNum_u64": 0, + "LinkMode_bool": false, + "SecureNATMode_bool": false, + "BridgeMode_bool": false, + "Layer3Mode_bool": false, + "Client_BridgeMode_bool": false, + "Client_MonitorMode_bool": false, + "VLanId_u32": 0, + "UniqueId_bin": "SGVsbG8gV29ybGQ=", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "LastCommTime_dt": "2020-08-01T12:24:36.123" + }, + { + "Name_str": "name", + "RemoteSession_bool": false, + "RemoteHostname_str": "remotehostname", + "Username_str": "username", + "ClientIP_ip": "192.168.0.1", + "Hostname_str": "hostname", + "MaxNumTcp_u32": 0, + "CurrentNumTcp_u32": 0, + "PacketSize_u64": 0, + "PacketNum_u64": 0, + "LinkMode_bool": false, + "SecureNATMode_bool": false, + "BridgeMode_bool": false, + "Layer3Mode_bool": false, + "Client_BridgeMode_bool": false, + "Client_MonitorMode_bool": false, + "VLanId_u32": 0, + "UniqueId_bin": "SGVsbG8gV29ybGQ=", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "LastCommTime_dt": "2020-08-01T12:24:36.123" + }, + { + "Name_str": "name", + "RemoteSession_bool": false, + "RemoteHostname_str": "remotehostname", + "Username_str": "username", + "ClientIP_ip": "192.168.0.1", + "Hostname_str": "hostname", + "MaxNumTcp_u32": 0, + "CurrentNumTcp_u32": 0, + "PacketSize_u64": 0, + "PacketNum_u64": 0, + "LinkMode_bool": false, + "SecureNATMode_bool": false, + "BridgeMode_bool": false, + "Layer3Mode_bool": false, + "Client_BridgeMode_bool": false, + "Client_MonitorMode_bool": false, + "VLanId_u32": 0, + "UniqueId_bin": "SGVsbG8gV29ybGQ=", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "LastCommTime_dt": "2020-08-01T12:24:36.123" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`SessionList` | `Array object` | VPN sessions list +`Name_str` | `string` (ASCII) | Session name +`RemoteSession_bool` | `boolean` | Remote session +`RemoteHostname_str` | `string` (ASCII) | Remote server name +`Username_str` | `string` (ASCII) | User name +`ClientIP_ip` | `string` (IP address) | IP address +`Hostname_str` | `string` (ASCII) | Host name +`MaxNumTcp_u32` | `number` (uint32) | Maximum number of underlying TCP connections +`CurrentNumTcp_u32` | `number` (uint32) | Number of current underlying TCP connections +`PacketSize_u64` | `number` (uint64) | Packet size transmitted +`PacketNum_u64` | `number` (uint64) | Number of packets transmitted +`LinkMode_bool` | `boolean` | Is a Cascade VPN session +`SecureNATMode_bool` | `boolean` | Is a SecureNAT VPN session +`BridgeMode_bool` | `boolean` | Is the VPN session for Local Bridge +`Layer3Mode_bool` | `boolean` | Is a Layer-3 Switch VPN session +`Client_BridgeMode_bool` | `boolean` | Is in Bridge Mode +`Client_MonitorMode_bool` | `boolean` | Is in Monitor Mode +`VLanId_u32` | `number` (uint32) | VLAN ID +`UniqueId_bin` | `string` (Base64 binary) | Unique ID of the VPN Session +`CreatedTime_dt` | `Date` | Creation date and time +`LastCommTime_dt` | `Date` | Last communication date and time + +*** + +## "GetSessionStatus" RPC API - Get Session Status +### Description +Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetSessionStatus", + "params": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name", + "Username_str": "username", + "RealUsername_str": "realusername", + "GroupName_str": "groupname", + "LinkMode_bool": false, + "Client_Ip_Address_ip": "192.168.0.1", + "SessionStatus_ClientHostName_str": "clienthostname", + "Active_bool": false, + "Connected_bool": false, + "SessionStatus_u32": 0, + "ServerName_str": "servername", + "ServerPort_u32": 0, + "ServerProductName_str": "serverproductname", + "ServerProductVer_u32": 0, + "ServerProductBuild_u32": 0, + "StartTime_dt": "2020-08-01T12:24:36.123", + "FirstConnectionEstablisiedTime_dt": "2020-08-01T12:24:36.123", + "CurrentConnectionEstablishTime_dt": "2020-08-01T12:24:36.123", + "NumConnectionsEatablished_u32": 0, + "HalfConnection_bool": false, + "QoS_bool": false, + "MaxTcpConnections_u32": 0, + "NumTcpConnections_u32": 0, + "NumTcpConnectionsUpload_u32": 0, + "NumTcpConnectionsDownload_u32": 0, + "UseEncrypt_bool": false, + "CipherName_str": "ciphername", + "UseCompress_bool": false, + "IsRUDPSession_bool": false, + "UnderlayProtocol_str": "underlayprotocol", + "IsUdpAccelerationEnabled_bool": false, + "IsUsingUdpAcceleration_bool": false, + "SessionName_str": "sessionname", + "ConnectionName_str": "connectionname", + "SessionKey_bin": "SGVsbG8gV29ybGQ=", + "TotalSendSize_u64": 0, + "TotalRecvSize_u64": 0, + "TotalSendSizeReal_u64": 0, + "TotalRecvSizeReal_u64": 0, + "IsBridgeMode_bool": false, + "IsMonitorMode_bool": false, + "VLanId_u32": 0, + "ClientProductName_str": "clientproductname", + "ClientProductVer_u32": 0, + "ClientProductBuild_u32": 0, + "ClientOsName_str": "clientosname", + "ClientOsVer_str": "clientosver", + "ClientOsProductId_str": "clientosproductid", + "ClientHostname_str": "clienthostname", + "UniqueId_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | VPN session name +`Username_str` | `string` (ASCII) | User name +`RealUsername_str` | `string` (ASCII) | Real user name which was used for the authentication +`GroupName_str` | `string` (ASCII) | Group name +`LinkMode_bool` | `boolean` | Is Cascade Session +`Client_Ip_Address_ip` | `string` (IP address) | Client IP address +`SessionStatus_ClientHostName_str` | `string` (ASCII) | Client host name +`Active_bool` | `boolean` | Operation flag +`Connected_bool` | `boolean` | Connected flag +`SessionStatus_u32` | `number` (enum) | State of the client session
Values:
`0`: Connecting
`1`: Negotiating
`2`: During user authentication
`3`: Connection complete
`4`: Wait to retry
`5`: Idle state +`ServerName_str` | `string` (ASCII) | Server name +`ServerPort_u32` | `number` (uint32) | Port number of the server +`ServerProductName_str` | `string` (ASCII) | Server product name +`ServerProductVer_u32` | `number` (uint32) | Server product version +`ServerProductBuild_u32` | `number` (uint32) | Server product build number +`StartTime_dt` | `Date` | Connection start time +`FirstConnectionEstablisiedTime_dt` | `Date` | Connection completion time of the first connection +`CurrentConnectionEstablishTime_dt` | `Date` | Connection completion time of this connection +`NumConnectionsEatablished_u32` | `number` (uint32) | Number of connections have been established so far +`HalfConnection_bool` | `boolean` | Half-connection +`QoS_bool` | `boolean` | VoIP / QoS +`MaxTcpConnections_u32` | `number` (uint32) | Maximum number of the underlying TCP connections +`NumTcpConnections_u32` | `number` (uint32) | Number of current underlying TCP connections +`NumTcpConnectionsUpload_u32` | `number` (uint32) | Number of inbound underlying connections +`NumTcpConnectionsDownload_u32` | `number` (uint32) | Number of outbound underlying connections +`UseEncrypt_bool` | `boolean` | Use of encryption +`CipherName_str` | `string` (ASCII) | Cipher algorithm name +`UseCompress_bool` | `boolean` | Use of compression +`IsRUDPSession_bool` | `boolean` | Is R-UDP session +`UnderlayProtocol_str` | `string` (ASCII) | Physical underlying communication protocol +`IsUdpAccelerationEnabled_bool` | `boolean` | The UDP acceleration is enabled +`IsUsingUdpAcceleration_bool` | `boolean` | Using the UDP acceleration function +`SessionName_str` | `string` (ASCII) | VPN session name +`ConnectionName_str` | `string` (ASCII) | Connection name +`SessionKey_bin` | `string` (Base64 binary) | Session key +`TotalSendSize_u64` | `number` (uint64) | Total transmitted data size +`TotalRecvSize_u64` | `number` (uint64) | Total received data size +`TotalSendSizeReal_u64` | `number` (uint64) | Total transmitted data size (no compression) +`TotalRecvSizeReal_u64` | `number` (uint64) | Total received data size (no compression) +`IsBridgeMode_bool` | `boolean` | Is Bridge Mode +`IsMonitorMode_bool` | `boolean` | Is Monitor mode +`VLanId_u32` | `number` (uint32) | VLAN ID +`ClientProductName_str` | `string` (ASCII) | Client product name +`ClientProductVer_u32` | `number` (uint32) | Client version +`ClientProductBuild_u32` | `number` (uint32) | Client build number +`ClientOsName_str` | `string` (ASCII) | Client OS name +`ClientOsVer_str` | `string` (ASCII) | Client OS version +`ClientOsProductId_str` | `string` (ASCII) | Client OS Product ID +`ClientHostname_str` | `string` (ASCII) | Client host name +`UniqueId_bin` | `string` (Base64 binary) | Unique ID + +*** + +## "DeleteSession" RPC API - Disconnect Session +### Description +Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteSession", + "params": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Name_str` | `string` (ASCII) | Session name + +*** + +## "EnumMacTable" RPC API - Get the MAC Address Table Database +### Description +Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumMacTable", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "MacTable": [ + { + "Key_u32": 0, + "SessionName_str": "sessionname", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "RemoteItem_bool": false, + "RemoteHostname_str": "remotehostname", + "VlanId_u32": 0 + }, + { + "Key_u32": 0, + "SessionName_str": "sessionname", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "RemoteItem_bool": false, + "RemoteHostname_str": "remotehostname", + "VlanId_u32": 0 + }, + { + "Key_u32": 0, + "SessionName_str": "sessionname", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "RemoteItem_bool": false, + "RemoteHostname_str": "remotehostname", + "VlanId_u32": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`MacTable` | `Array object` | MAC table +`Key_u32` | `number` (uint32) | Key ID +`SessionName_str` | `string` (ASCII) | Session name +`MacAddress_bin` | `string` (Base64 binary) | MAC address +`CreatedTime_dt` | `Date` | Creation date and time +`UpdatedTime_dt` | `Date` | Updating date +`RemoteItem_bool` | `boolean` | Remote items +`RemoteHostname_str` | `string` (ASCII) | Remote host name +`VlanId_u32` | `number` (uint32) | VLAN ID + +*** + +## "DeleteMacTable" RPC API - Delete MAC Address Table Entry +### Description +Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteMacTable", + "params": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Key ID + +*** + +## "EnumIpTable" RPC API - Get the IP Address Table Database +### Description +Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumIpTable", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "IpTable": [ + { + "Key_u32": 0, + "SessionName_str": "sessionname", + "IpAddress_ip": "192.168.0.1", + "DhcpAllocated_bool": false, + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "RemoteItem_bool": false, + "RemoteHostname_str": "remotehostname" + }, + { + "Key_u32": 0, + "SessionName_str": "sessionname", + "IpAddress_ip": "192.168.0.1", + "DhcpAllocated_bool": false, + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "RemoteItem_bool": false, + "RemoteHostname_str": "remotehostname" + }, + { + "Key_u32": 0, + "SessionName_str": "sessionname", + "IpAddress_ip": "192.168.0.1", + "DhcpAllocated_bool": false, + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "UpdatedTime_dt": "2020-08-01T12:24:36.123", + "RemoteItem_bool": false, + "RemoteHostname_str": "remotehostname" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`IpTable` | `Array object` | MAC table +`Key_u32` | `number` (uint32) | Key ID +`SessionName_str` | `string` (ASCII) | Session name +`IpAddress_ip` | `string` (IP address) | IP address +`DhcpAllocated_bool` | `boolean` | Assigned by the DHCP +`CreatedTime_dt` | `Date` | Creation date and time +`UpdatedTime_dt` | `Date` | Updating date +`RemoteItem_bool` | `boolean` | Remote items +`RemoteHostname_str` | `string` (ASCII) | Remote host name + +*** + +## "DeleteIpTable" RPC API - Delete IP Address Table Entry +### Description +Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteIpTable", + "params": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Key ID + +*** + +## "SetKeep" RPC API - Set the Keep Alive Internet Connection Function +### Description +Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetKeep", + "params": { + "UseKeepConnect_bool": false, + "KeepConnectHost_str": "keepconnecthost", + "KeepConnectPort_u32": 0, + "KeepConnectProtocol_u32": 0, + "KeepConnectInterval_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "UseKeepConnect_bool": false, + "KeepConnectHost_str": "keepconnecthost", + "KeepConnectPort_u32": 0, + "KeepConnectProtocol_u32": 0, + "KeepConnectInterval_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`UseKeepConnect_bool` | `boolean` | The flag to enable keep-alive to the Internet +`KeepConnectHost_str` | `string` (ASCII) | Specify the host name or IP address of the destination +`KeepConnectPort_u32` | `number` (uint32) | Specify the port number of the destination +`KeepConnectProtocol_u32` | `number` (enum) | Protocol type
Values:
`0`: TCP
`1`: UDP +`KeepConnectInterval_u32` | `number` (uint32) | Interval Between Packets Sends (Seconds) + +*** + +## "GetKeep" RPC API - Get the Keep Alive Internet Connection Function +### Description +Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetKeep", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "UseKeepConnect_bool": false, + "KeepConnectHost_str": "keepconnecthost", + "KeepConnectPort_u32": 0, + "KeepConnectProtocol_u32": 0, + "KeepConnectInterval_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`UseKeepConnect_bool` | `boolean` | The flag to enable keep-alive to the Internet +`KeepConnectHost_str` | `string` (ASCII) | Specify the host name or IP address of the destination +`KeepConnectPort_u32` | `number` (uint32) | Specify the port number of the destination +`KeepConnectProtocol_u32` | `number` (enum) | Protocol type
Values:
`0`: TCP
`1`: UDP +`KeepConnectInterval_u32` | `number` (uint32) | Interval Between Packets Sends (Seconds) + +*** + +## "EnableSecureNAT" RPC API - Enable the Virtual NAT and DHCP Server Function (SecureNAT Function) +### Description +Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnableSecureNAT", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name + +*** + +## "DisableSecureNAT" RPC API - Disable the Virtual NAT and DHCP Server Function (SecureNAT Function) +### Description +Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DisableSecureNAT", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name + +*** + +## "SetSecureNATOption" RPC API - Change Settings of SecureNAT Function +### Description +Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetSecureNATOption", + "params": { + "RpcHubName_str": "rpchubname", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "Ip_ip": "192.168.0.1", + "Mask_ip": "255.255.255.255", + "UseNat_bool": false, + "Mtu_u32": 0, + "NatTcpTimeout_u32": 0, + "NatUdpTimeout_u32": 0, + "UseDhcp_bool": false, + "DhcpLeaseIPStart_ip": "192.168.0.1", + "DhcpLeaseIPEnd_ip": "192.168.0.1", + "DhcpSubnetMask_ip": "255.255.255.255", + "DhcpExpireTimeSpan_u32": 0, + "DhcpGatewayAddress_ip": "192.168.0.1", + "DhcpDnsServerAddress_ip": "192.168.0.1", + "DhcpDnsServerAddress2_ip": "192.168.0.1", + "DhcpDomainName_str": "dhcpdomainname", + "SaveLog_bool": false, + "ApplyDhcpPushRoutes_bool": false, + "DhcpPushRoutes_str": "dhcppushroutes" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "RpcHubName_str": "rpchubname", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "Ip_ip": "192.168.0.1", + "Mask_ip": "255.255.255.255", + "UseNat_bool": false, + "Mtu_u32": 0, + "NatTcpTimeout_u32": 0, + "NatUdpTimeout_u32": 0, + "UseDhcp_bool": false, + "DhcpLeaseIPStart_ip": "192.168.0.1", + "DhcpLeaseIPEnd_ip": "192.168.0.1", + "DhcpSubnetMask_ip": "255.255.255.255", + "DhcpExpireTimeSpan_u32": 0, + "DhcpGatewayAddress_ip": "192.168.0.1", + "DhcpDnsServerAddress_ip": "192.168.0.1", + "DhcpDnsServerAddress2_ip": "192.168.0.1", + "DhcpDomainName_str": "dhcpdomainname", + "SaveLog_bool": false, + "ApplyDhcpPushRoutes_bool": false, + "DhcpPushRoutes_str": "dhcppushroutes" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`RpcHubName_str` | `string` (ASCII) | Target Virtual HUB name +`MacAddress_bin` | `string` (Base64 binary) | MAC address +`Ip_ip` | `string` (IP address) | IP address +`Mask_ip` | `string` (IP address) | Subnet mask +`UseNat_bool` | `boolean` | Use flag of the Virtual NAT function +`Mtu_u32` | `number` (uint32) | MTU value (Standard: 1500) +`NatTcpTimeout_u32` | `number` (uint32) | NAT TCP timeout in seconds +`NatUdpTimeout_u32` | `number` (uint32) | NAT UDP timeout in seconds +`UseDhcp_bool` | `boolean` | Using flag of DHCP function +`DhcpLeaseIPStart_ip` | `string` (IP address) | Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) +`DhcpLeaseIPEnd_ip` | `string` (IP address) | Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) +`DhcpSubnetMask_ip` | `string` (IP address) | Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) +`DhcpExpireTimeSpan_u32` | `number` (uint32) | Specify the expiration date in second units for leasing an IP address to a client. +`DhcpGatewayAddress_ip` | `string` (IP address) | Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. +`DhcpDnsServerAddress_ip` | `string` (IP address) | Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. +`DhcpDnsServerAddress2_ip` | `string` (IP address) | Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. +`DhcpDomainName_str` | `string` (ASCII) | Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. +`SaveLog_bool` | `boolean` | Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. +`ApplyDhcpPushRoutes_bool` | `boolean` | The flag to enable the DhcpPushRoutes_str field. +`DhcpPushRoutes_str` | `string` (ASCII) | Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. + +*** + +## "GetSecureNATOption" RPC API - Get Settings of SecureNAT Function +### Description +Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetSecureNATOption", + "params": { + "RpcHubName_str": "rpchubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "RpcHubName_str": "rpchubname", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "Ip_ip": "192.168.0.1", + "Mask_ip": "255.255.255.255", + "UseNat_bool": false, + "Mtu_u32": 0, + "NatTcpTimeout_u32": 0, + "NatUdpTimeout_u32": 0, + "UseDhcp_bool": false, + "DhcpLeaseIPStart_ip": "192.168.0.1", + "DhcpLeaseIPEnd_ip": "192.168.0.1", + "DhcpSubnetMask_ip": "255.255.255.255", + "DhcpExpireTimeSpan_u32": 0, + "DhcpGatewayAddress_ip": "192.168.0.1", + "DhcpDnsServerAddress_ip": "192.168.0.1", + "DhcpDnsServerAddress2_ip": "192.168.0.1", + "DhcpDomainName_str": "dhcpdomainname", + "SaveLog_bool": false, + "ApplyDhcpPushRoutes_bool": false, + "DhcpPushRoutes_str": "dhcppushroutes" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`RpcHubName_str` | `string` (ASCII) | Target Virtual HUB name +`MacAddress_bin` | `string` (Base64 binary) | MAC address +`Ip_ip` | `string` (IP address) | IP address +`Mask_ip` | `string` (IP address) | Subnet mask +`UseNat_bool` | `boolean` | Use flag of the Virtual NAT function +`Mtu_u32` | `number` (uint32) | MTU value (Standard: 1500) +`NatTcpTimeout_u32` | `number` (uint32) | NAT TCP timeout in seconds +`NatUdpTimeout_u32` | `number` (uint32) | NAT UDP timeout in seconds +`UseDhcp_bool` | `boolean` | Using flag of DHCP function +`DhcpLeaseIPStart_ip` | `string` (IP address) | Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) +`DhcpLeaseIPEnd_ip` | `string` (IP address) | Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) +`DhcpSubnetMask_ip` | `string` (IP address) | Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) +`DhcpExpireTimeSpan_u32` | `number` (uint32) | Specify the expiration date in second units for leasing an IP address to a client. +`DhcpGatewayAddress_ip` | `string` (IP address) | Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. +`DhcpDnsServerAddress_ip` | `string` (IP address) | Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. +`DhcpDnsServerAddress2_ip` | `string` (IP address) | Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. +`DhcpDomainName_str` | `string` (ASCII) | Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. +`SaveLog_bool` | `boolean` | Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. +`ApplyDhcpPushRoutes_bool` | `boolean` | The flag to enable the DhcpPushRoutes_str field. +`DhcpPushRoutes_str` | `string` (ASCII) | Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. + +*** + +## "EnumNAT" RPC API - Get Virtual NAT Function Session Table of SecureNAT Function +### Description +Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumNAT", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "NatTable": [ + { + "Id_u32": 0, + "Protocol_u32": 0, + "SrcIp_ip": "192.168.0.1", + "SrcHost_str": "srchost", + "SrcPort_u32": 0, + "DestIp_ip": "192.168.0.1", + "DestHost_str": "desthost", + "DestPort_u32": 0, + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "SendSize_u64": 0, + "RecvSize_u64": 0, + "TcpStatus_u32": 0 + }, + { + "Id_u32": 0, + "Protocol_u32": 0, + "SrcIp_ip": "192.168.0.1", + "SrcHost_str": "srchost", + "SrcPort_u32": 0, + "DestIp_ip": "192.168.0.1", + "DestHost_str": "desthost", + "DestPort_u32": 0, + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "SendSize_u64": 0, + "RecvSize_u64": 0, + "TcpStatus_u32": 0 + }, + { + "Id_u32": 0, + "Protocol_u32": 0, + "SrcIp_ip": "192.168.0.1", + "SrcHost_str": "srchost", + "SrcPort_u32": 0, + "DestIp_ip": "192.168.0.1", + "DestHost_str": "desthost", + "DestPort_u32": 0, + "CreatedTime_dt": "2020-08-01T12:24:36.123", + "LastCommTime_dt": "2020-08-01T12:24:36.123", + "SendSize_u64": 0, + "RecvSize_u64": 0, + "TcpStatus_u32": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual Hub Name +`NatTable` | `Array object` | NAT item +`Id_u32` | `number` (uint32) | ID +`Protocol_u32` | `number` (enum) | Protocol
Values:
`0`: TCP
`1`: UDP
`2`: DNS
`3`: ICMP +`SrcIp_ip` | `string` (IP address) | Source IP address +`SrcHost_str` | `string` (ASCII) | Source host name +`SrcPort_u32` | `number` (uint32) | Source port number +`DestIp_ip` | `string` (IP address) | Destination IP address +`DestHost_str` | `string` (ASCII) | Destination host name +`DestPort_u32` | `number` (uint32) | Destination port number +`CreatedTime_dt` | `Date` | Connection time +`LastCommTime_dt` | `Date` | Last communication time +`SendSize_u64` | `number` (uint64) | Transmission size +`RecvSize_u64` | `number` (uint64) | Receive size +`TcpStatus_u32` | `number` (enum) | TCP state
Values:
`0`: Connecting
`1`: Send the RST (Connection failure or disconnected)
`2`: Connection complete
`3`: Connection established
`4`: Wait for socket disconnection + +*** + +## "EnumDHCP" RPC API - Get Virtual DHCP Server Function Lease Table of SecureNAT Function +### Description +Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumDHCP", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "DhcpTable": [ + { + "Id_u32": 0, + "LeasedTime_dt": "2020-08-01T12:24:36.123", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "IpAddress_ip": "192.168.0.1", + "Mask_u32": 0, + "Hostname_str": "hostname" + }, + { + "Id_u32": 0, + "LeasedTime_dt": "2020-08-01T12:24:36.123", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "IpAddress_ip": "192.168.0.1", + "Mask_u32": 0, + "Hostname_str": "hostname" + }, + { + "Id_u32": 0, + "LeasedTime_dt": "2020-08-01T12:24:36.123", + "ExpireTime_dt": "2020-08-01T12:24:36.123", + "MacAddress_bin": "SGVsbG8gV29ybGQ=", + "IpAddress_ip": "192.168.0.1", + "Mask_u32": 0, + "Hostname_str": "hostname" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual Hub Name +`DhcpTable` | `Array object` | DHCP Item +`Id_u32` | `number` (uint32) | ID +`LeasedTime_dt` | `Date` | Lease time +`ExpireTime_dt` | `Date` | Expiration date +`MacAddress_bin` | `string` (Base64 binary) | MAC address +`IpAddress_ip` | `string` (IP address) | IP address +`Mask_u32` | `number` (uint32) | Subnet mask +`Hostname_str` | `string` (ASCII) | Host name + +*** + +## "GetSecureNATStatus" RPC API - Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function) +### Description +Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetSecureNATStatus", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "NumTcpSessions_u32": 0, + "NumUdpSessions_u32": 0, + "NumIcmpSessions_u32": 0, + "NumDnsSessions_u32": 0, + "NumDhcpClients_u32": 0, + "IsKernelMode_bool": false, + "IsRawIpMode_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual Hub Name +`NumTcpSessions_u32` | `number` (uint32) | Number of TCP sessions +`NumUdpSessions_u32` | `number` (uint32) | Ntmber of UDP sessions +`NumIcmpSessions_u32` | `number` (uint32) | Nymber of ICMP sessions +`NumDnsSessions_u32` | `number` (uint32) | Number of DNS sessions +`NumDhcpClients_u32` | `number` (uint32) | Number of DHCP clients +`IsKernelMode_bool` | `boolean` | Whether the NAT is operating in the Kernel Mode +`IsRawIpMode_bool` | `boolean` | Whether the NAT is operating in the Raw IP Mode + +*** + +## "EnumEthernet" RPC API - Get List of Network Adapters Usable as Local Bridge +### Description +Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumEthernet", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "EthList": [ + { + "DeviceName_str": "devicename", + "NetworkConnectionName_utf": "networkconnectionname" + }, + { + "DeviceName_str": "devicename", + "NetworkConnectionName_utf": "networkconnectionname" + }, + { + "DeviceName_str": "devicename", + "NetworkConnectionName_utf": "networkconnectionname" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`EthList` | `Array object` | Ethernet Network Adapters list +`DeviceName_str` | `string` (ASCII) | Device name +`NetworkConnectionName_utf` | `string` (UTF8) | Network connection name (description) + +*** + +## "AddLocalBridge" RPC API - Create Local Bridge Connection +### Description +Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddLocalBridge", + "params": { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb", + "Online_bool": false, + "Active_bool": false, + "TapMode_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`DeviceName_str` | `string` (ASCII) | Physical Ethernet device name +`HubNameLB_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online flag +`Active_bool` | `boolean` | Running flag +`TapMode_bool` | `boolean` | Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). + +*** + +## "DeleteLocalBridge" RPC API - Delete Local Bridge Connection +### Description +Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteLocalBridge", + "params": { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb", + "Online_bool": false, + "Active_bool": false, + "TapMode_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`DeviceName_str` | `string` (ASCII) | Physical Ethernet device name +`HubNameLB_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online flag +`Active_bool` | `boolean` | Running flag +`TapMode_bool` | `boolean` | Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). + +*** + +## "EnumLocalBridge" RPC API - Get List of Local Bridge Connection +### Description +Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumLocalBridge", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "LocalBridgeList": [ + { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb", + "Online_bool": false, + "Active_bool": false, + "TapMode_bool": false + }, + { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb", + "Online_bool": false, + "Active_bool": false, + "TapMode_bool": false + }, + { + "DeviceName_str": "devicename", + "HubNameLB_str": "hubnamelb", + "Online_bool": false, + "Active_bool": false, + "TapMode_bool": false + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`LocalBridgeList` | `Array object` | Local Bridge list +`DeviceName_str` | `string` (ASCII) | Physical Ethernet device name +`HubNameLB_str` | `string` (ASCII) | The Virtual Hub name +`Online_bool` | `boolean` | Online flag +`Active_bool` | `boolean` | Running flag +`TapMode_bool` | `boolean` | Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). + +*** + +## "GetBridgeSupport" RPC API - Get whether the localbridge function is supported on the current system +### Description +Get whether the localbridge function is supported on the current system. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetBridgeSupport", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IsBridgeSupportedOs_bool": false, + "IsWinPcapNeeded_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IsBridgeSupportedOs_bool` | `boolean` | Whether the OS supports the Local Bridge function +`IsWinPcapNeeded_bool` | `boolean` | Whether WinPcap is necessary to install + +*** + +## "RebootServer" RPC API - Reboot VPN Server Service +### Description +Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "RebootServer", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IntValue_u32": 0, + "Int64Value_u64": 0, + "StrValue_str": "strvalue", + "UniStrValue_utf": "unistrvalue" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IntValue_u32` | `number` (uint32) | A 32-bit integer field +`Int64Value_u64` | `number` (uint64) | A 64-bit integer field +`StrValue_str` | `string` (ASCII) | An Ascii string field +`UniStrValue_utf` | `string` (UTF8) | An UTF-8 string field + +*** + +## "GetCaps" RPC API - Get List of Server Functions / Capability +### Description +Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetCaps", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "CapsList": [ + { + "CapsName_str": "capsname", + "CapsValue_u32": 0, + "CapsDescrption_utf": "capsdescrption" + }, + { + "CapsName_str": "capsname", + "CapsValue_u32": 0, + "CapsDescrption_utf": "capsdescrption" + }, + { + "CapsName_str": "capsname", + "CapsValue_u32": 0, + "CapsDescrption_utf": "capsdescrption" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`CapsList` | `Array object` | Caps list of the VPN Server +`CapsName_str` | `string` (ASCII) | Name +`CapsValue_u32` | `number` (uint32) | Value +`CapsDescrption_utf` | `string` (UTF8) | Descrption + +*** + +## "GetConfig" RPC API - Get the current configuration of the VPN Server +### Description +Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetConfig", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "FileName_str": "filename", + "FileData_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`FileName_str` | `string` (ASCII) | File name (valid only for returning from the server) +`FileData_bin` | `string` (Base64 binary) | File data + +*** + +## "SetConfig" RPC API - Write Configuration File to VPN Server +### Description +Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetConfig", + "params": { + "FileData_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "FileName_str": "filename", + "FileData_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`FileName_str` | `string` (ASCII) | File name (valid only for returning from the server) +`FileData_bin` | `string` (Base64 binary) | File data + +*** + +## "GetDefaultHubAdminOptions" RPC API - Get Virtual Hub Administration Option default values +### Description +Get Virtual Hub Administration Option default values. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetDefaultHubAdminOptions", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual HUB name +`AdminOptionList` | `Array object` | List data +`Name_str` | `string` (ASCII) | Name +`Value_u32` | `number` (uint32) | Data +`Descrption_utf` | `string` (UTF8) | Descrption + +*** + +## "GetHubAdminOptions" RPC API - Get List of Virtual Hub Administration Options +### Description +Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHubAdminOptions", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual HUB name +`AdminOptionList` | `Array object` | List data +`Name_str` | `string` (ASCII) | Name +`Value_u32` | `number` (uint32) | Data +`Descrption_utf` | `string` (UTF8) | Descrption + +*** + +## "SetHubAdminOptions" RPC API - Set Values of Virtual Hub Administration Options +### Description +Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHubAdminOptions", + "params": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual HUB name +`AdminOptionList` | `Array object` | List data +`Name_str` | `string` (ASCII) | Name +`Value_u32` | `number` (uint32) | Data +`Descrption_utf` | `string` (UTF8) | Descrption + +*** + +## "GetHubExtOptions" RPC API - Get List of Virtual Hub Extended Options +### Description +Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHubExtOptions", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual HUB name +`AdminOptionList` | `Array object` | List data +`Name_str` | `string` (ASCII) | Name +`Value_u32` | `number` (uint32) | Data +`Descrption_utf` | `string` (UTF8) | Descrption + +*** + +## "SetHubExtOptions" RPC API - Set a Value of Virtual Hub Extended Options +### Description +Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHubExtOptions", + "params": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "AdminOptionList": [ + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + }, + { + "Name_str": "name", + "Value_u32": 0, + "Descrption_utf": "descrption" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | Virtual HUB name +`AdminOptionList` | `Array object` | List data +`Name_str` | `string` (ASCII) | Name +`Value_u32` | `number` (uint32) | Data +`Descrption_utf` | `string` (UTF8) | Descrption + +*** + +## "AddL3Switch" RPC API - Define New Virtual Layer 3 Switch +### Description +Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddL3Switch", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Layer-3 Switch name + +*** + +## "DelL3Switch" RPC API - Delete Virtual Layer 3 Switch +### Description +Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DelL3Switch", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Layer-3 Switch name + +*** + +## "EnumL3Switch" RPC API - Get List of Virtual Layer 3 Switches +### Description +Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumL3Switch", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "L3SWList": [ + { + "Name_str": "name", + "NumInterfaces_u32": 0, + "NumTables_u32": 0, + "Active_bool": false, + "Online_bool": false + }, + { + "Name_str": "name", + "NumInterfaces_u32": 0, + "NumTables_u32": 0, + "Active_bool": false, + "Online_bool": false + }, + { + "Name_str": "name", + "NumInterfaces_u32": 0, + "NumTables_u32": 0, + "Active_bool": false, + "Online_bool": false + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`L3SWList` | `Array object` | Layer-3 switch list +`Name_str` | `string` (ASCII) | Name of the layer-3 switch +`NumInterfaces_u32` | `number` (uint32) | Number of layer-3 switch virtual interfaces +`NumTables_u32` | `number` (uint32) | Number of routing tables +`Active_bool` | `boolean` | Activated flag +`Online_bool` | `boolean` | Online flag + +*** + +## "StartL3Switch" RPC API - Start Virtual Layer 3 Switch Operation +### Description +Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "StartL3Switch", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Layer-3 Switch name + +*** + +## "StopL3Switch" RPC API - Stop Virtual Layer 3 Switch Operation +### Description +Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "StopL3Switch", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Layer-3 Switch name + +*** + +## "AddL3If" RPC API - Add Virtual Interface to Virtual Layer 3 Switch +### Description +Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddL3If", + "params": { + "Name_str": "name", + "HubName_str": "hubname", + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "HubName_str": "hubname", + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | L3 switch name +`HubName_str` | `string` (ASCII) | Virtual HUB name +`IpAddress_ip` | `string` (IP address) | IP address +`SubnetMask_ip` | `string` (IP address) | Subnet mask + +*** + +## "DelL3If" RPC API - Delete Virtual Interface of Virtual Layer 3 Switch +### Description +Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DelL3If", + "params": { + "Name_str": "name", + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "HubName_str": "hubname", + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | L3 switch name +`HubName_str` | `string` (ASCII) | Virtual HUB name +`IpAddress_ip` | `string` (IP address) | IP address +`SubnetMask_ip` | `string` (IP address) | Subnet mask + +*** + +## "EnumL3If" RPC API - Get List of Interfaces Registered on the Virtual Layer 3 Switch +### Description +Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumL3If", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "L3IFList": [ + { + "Name_str": "name", + "HubName_str": "hubname", + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Name_str": "name", + "HubName_str": "hubname", + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Name_str": "name", + "HubName_str": "hubname", + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | Layer-3 switch name +`L3IFList` | `Array object` | Layer-3 interface list +`Name_str` | `string` (ASCII) | L3 switch name +`HubName_str` | `string` (ASCII) | Virtual HUB name +`IpAddress_ip` | `string` (IP address) | IP address +`SubnetMask_ip` | `string` (IP address) | Subnet mask + +*** + +## "AddL3Table" RPC API - Add Routing Table Entry for Virtual Layer 3 Switch +### Description +Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddL3Table", + "params": { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | L3 switch name +`NetworkAddress_ip` | `string` (IP address) | Network address +`SubnetMask_ip` | `string` (IP address) | Subnet mask +`GatewayAddress_ip` | `string` (IP address) | Gateway address +`Metric_u32` | `number` (uint32) | Metric + +*** + +## "DelL3Table" RPC API - Delete Routing Table Entry of Virtual Layer 3 Switch +### Description +Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DelL3Table", + "params": { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | L3 switch name +`NetworkAddress_ip` | `string` (IP address) | Network address +`SubnetMask_ip` | `string` (IP address) | Subnet mask +`GatewayAddress_ip` | `string` (IP address) | Gateway address +`Metric_u32` | `number` (uint32) | Metric + +*** + +## "EnumL3Table" RPC API - Get List of Routing Tables of Virtual Layer 3 Switch +### Description +Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumL3Table", + "params": { + "Name_str": "name" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Name_str": "name", + "L3Table": [ + { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + }, + { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + }, + { + "Name_str": "name", + "NetworkAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255", + "GatewayAddress_ip": "192.168.0.1", + "Metric_u32": 0 + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Name_str` | `string` (ASCII) | L3 switch name +`L3Table` | `Array object` | Routing table item list +`Name_str` | `string` (ASCII) | L3 switch name +`NetworkAddress_ip` | `string` (IP address) | Network address +`SubnetMask_ip` | `string` (IP address) | Subnet mask +`GatewayAddress_ip` | `string` (IP address) | Gateway address +`Metric_u32` | `number` (uint32) | Metric + +*** + +## "EnumCrl" RPC API - Get List of Certificates Revocation List +### Description +Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumCrl", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "CRLList": [ + { + "Key_u32": 0, + "CrlInfo_utf": "crlinfo" + }, + { + "Key_u32": 0, + "CrlInfo_utf": "crlinfo" + }, + { + "Key_u32": 0, + "CrlInfo_utf": "crlinfo" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`CRLList` | `Array object` | CRL list +`Key_u32` | `number` (uint32) | Key ID +`CrlInfo_utf` | `string` (UTF8) | The contents of the CRL item + +*** + +## "AddCrl" RPC API - Add a Revoked Certificate +### Description +Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddCrl", + "params": { + "HubName_str": "hubname", + "CommonName_utf": "commonname", + "Organization_utf": "organization", + "Unit_utf": "unit", + "Country_utf": "country", + "State_utf": "state", + "Local_utf": "local", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "DigestMD5_bin": "SGVsbG8gV29ybGQ=", + "DigestSHA1_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0, + "CommonName_utf": "commonname", + "Organization_utf": "organization", + "Unit_utf": "unit", + "Country_utf": "country", + "State_utf": "state", + "Local_utf": "local", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "DigestMD5_bin": "SGVsbG8gV29ybGQ=", + "DigestSHA1_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Key ID +`CommonName_utf` | `string` (UTF8) | CN, optional +`Organization_utf` | `string` (UTF8) | O, optional +`Unit_utf` | `string` (UTF8) | OU, optional +`Country_utf` | `string` (UTF8) | C, optional +`State_utf` | `string` (UTF8) | ST, optional +`Local_utf` | `string` (UTF8) | L, optional +`Serial_bin` | `string` (Base64 binary) | Serial, optional +`DigestMD5_bin` | `string` (Base64 binary) | MD5 Digest, optional +`DigestSHA1_bin` | `string` (Base64 binary) | SHA1 Digest, optional + +*** + +## "DelCrl" RPC API - Delete a Revoked Certificate +### Description +Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DelCrl", + "params": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0, + "CommonName_utf": "commonname", + "Organization_utf": "organization", + "Unit_utf": "unit", + "Country_utf": "country", + "State_utf": "state", + "Local_utf": "local", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "DigestMD5_bin": "SGVsbG8gV29ybGQ=", + "DigestSHA1_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Key ID +`CommonName_utf` | `string` (UTF8) | CN, optional +`Organization_utf` | `string` (UTF8) | O, optional +`Unit_utf` | `string` (UTF8) | OU, optional +`Country_utf` | `string` (UTF8) | C, optional +`State_utf` | `string` (UTF8) | ST, optional +`Local_utf` | `string` (UTF8) | L, optional +`Serial_bin` | `string` (Base64 binary) | Serial, optional +`DigestMD5_bin` | `string` (Base64 binary) | MD5 Digest, optional +`DigestSHA1_bin` | `string` (Base64 binary) | SHA1 Digest, optional + +*** + +## "GetCrl" RPC API - Get a Revoked Certificate +### Description +Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetCrl", + "params": { + "HubName_str": "hubname", + "Key_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0, + "CommonName_utf": "commonname", + "Organization_utf": "organization", + "Unit_utf": "unit", + "Country_utf": "country", + "State_utf": "state", + "Local_utf": "local", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "DigestMD5_bin": "SGVsbG8gV29ybGQ=", + "DigestSHA1_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Key ID +`CommonName_utf` | `string` (UTF8) | CN, optional +`Organization_utf` | `string` (UTF8) | O, optional +`Unit_utf` | `string` (UTF8) | OU, optional +`Country_utf` | `string` (UTF8) | C, optional +`State_utf` | `string` (UTF8) | ST, optional +`Local_utf` | `string` (UTF8) | L, optional +`Serial_bin` | `string` (Base64 binary) | Serial, optional +`DigestMD5_bin` | `string` (Base64 binary) | MD5 Digest, optional +`DigestSHA1_bin` | `string` (Base64 binary) | SHA1 Digest, optional + +*** + +## "SetCrl" RPC API - Change Existing CRL (Certificate Revocation List) Entry +### Description +Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetCrl", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Key_u32": 0, + "CommonName_utf": "commonname", + "Organization_utf": "organization", + "Unit_utf": "unit", + "Country_utf": "country", + "State_utf": "state", + "Local_utf": "local", + "Serial_bin": "SGVsbG8gV29ybGQ=", + "DigestMD5_bin": "SGVsbG8gV29ybGQ=", + "DigestSHA1_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Key_u32` | `number` (uint32) | Key ID +`CommonName_utf` | `string` (UTF8) | CN, optional +`Organization_utf` | `string` (UTF8) | O, optional +`Unit_utf` | `string` (UTF8) | OU, optional +`Country_utf` | `string` (UTF8) | C, optional +`State_utf` | `string` (UTF8) | ST, optional +`Local_utf` | `string` (UTF8) | L, optional +`Serial_bin` | `string` (Base64 binary) | Serial, optional +`DigestMD5_bin` | `string` (Base64 binary) | MD5 Digest, optional +`DigestSHA1_bin` | `string` (Base64 binary) | SHA1 Digest, optional + +*** + +## "SetAcList" RPC API - Add Rule to Source IP Address Limit List +### Description +Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetAcList", + "params": { + "HubName_str": "hubname", + "ACList": [ + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } + ] + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "ACList": [ + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`ACList` | `Array object` | Source IP Address Limit List +`Id_u32` | `number` (uint32) | ID +`Priority_u32` | `number` (uint32) | Priority +`Deny_bool` | `boolean` | Deny access +`Masked_bool` | `boolean` | Set true if you want to specify the SubnetMask_ip item. +`IpAddress_ip` | `string` (IP address) | IP address +`SubnetMask_ip` | `string` (IP address) | Subnet mask, valid only if Masked_bool == true + +*** + +## "GetAcList" RPC API - Get List of Rule Items of Source IP Address Limit List +### Description +Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetAcList", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "ACList": [ + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + }, + { + "Id_u32": 0, + "Priority_u32": 0, + "Deny_bool": false, + "Masked_bool": false, + "IpAddress_ip": "192.168.0.1", + "SubnetMask_ip": "255.255.255.255" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`ACList` | `Array object` | Source IP Address Limit List +`Id_u32` | `number` (uint32) | ID +`Priority_u32` | `number` (uint32) | Priority +`Deny_bool` | `boolean` | Deny access +`Masked_bool` | `boolean` | Set true if you want to specify the SubnetMask_ip item. +`IpAddress_ip` | `string` (IP address) | IP address +`SubnetMask_ip` | `string` (IP address) | Subnet mask, valid only if Masked_bool == true + +*** + +## "EnumLogFile" RPC API - Get List of Log Files +### Description +Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumLogFile", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "LogFiles": [ + { + "ServerName_str": "servername", + "FilePath_str": "filepath", + "FileSize_u32": 0, + "UpdatedTime_dt": "2020-08-01T12:24:36.123" + }, + { + "ServerName_str": "servername", + "FilePath_str": "filepath", + "FileSize_u32": 0, + "UpdatedTime_dt": "2020-08-01T12:24:36.123" + }, + { + "ServerName_str": "servername", + "FilePath_str": "filepath", + "FileSize_u32": 0, + "UpdatedTime_dt": "2020-08-01T12:24:36.123" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`LogFiles` | `Array object` | Log file list +`ServerName_str` | `string` (ASCII) | Server name +`FilePath_str` | `string` (ASCII) | File path +`FileSize_u32` | `number` (uint32) | File size +`UpdatedTime_dt` | `Date` | Last write date + +*** + +## "ReadLogFile" RPC API - Download a part of Log File +### Description +Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "ReadLogFile", + "params": { + "FilePath_str": "filepath" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ServerName_str": "servername", + "FilePath_str": "filepath", + "Offset_u32": 0, + "Buffer_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ServerName_str` | `string` (ASCII) | Server name +`FilePath_str` | `string` (ASCII) | File Path +`Offset_u32` | `number` (uint32) | Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. +`Buffer_bin` | `string` (Base64 binary) | Received buffer + +*** + +## "SetSysLog" RPC API - Set syslog Send Function +### Description +Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetSysLog", + "params": { + "SaveType_u32": 0, + "Hostname_str": "hostname", + "Port_u32": 0 + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "SaveType_u32": 0, + "Hostname_str": "hostname", + "Port_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`SaveType_u32` | `number` (enum) | The behavior of the syslog function
Values:
`0`: Do not use syslog
`1`: Only server log
`2`: Server and Virtual HUB security log
`3`: Server, Virtual HUB security, and packet log +`Hostname_str` | `string` (ASCII) | Specify the host name or IP address of the syslog server +`Port_u32` | `number` (uint32) | Specify the port number of the syslog server + +*** + +## "GetSysLog" RPC API - Get syslog Send Function +### Description +Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetSysLog", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "SaveType_u32": 0, + "Hostname_str": "hostname", + "Port_u32": 0 + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`SaveType_u32` | `number` (enum) | The behavior of the syslog function
Values:
`0`: Do not use syslog
`1`: Only server log
`2`: Server and Virtual HUB security log
`3`: Server, Virtual HUB security, and packet log +`Hostname_str` | `string` (ASCII) | Specify the host name or IP address of the syslog server +`Port_u32` | `number` (uint32) | Specify the port number of the syslog server + +*** + +## "SetHubMsg" RPC API - Set Today's Message of Virtual Hub +### Description +Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetHubMsg", + "params": { + "HubName_str": "hubname", + "Msg_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Msg_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Msg_bin` | `string` (Base64 binary) | Message (Unicode strings acceptable) + +*** + +## "GetHubMsg" RPC API - Get Today's Message of Virtual Hub +### Description +Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetHubMsg", + "params": { + "HubName_str": "hubname" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Msg_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Msg_bin` | `string` (Base64 binary) | Message (Unicode strings acceptable) + +*** + +## "Crash" RPC API - Raise a vital error on the VPN Server / Bridge to terminate the process forcefully +### Description +Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "Crash", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IntValue_u32": 0, + "Int64Value_u64": 0, + "StrValue_str": "strvalue", + "UniStrValue_utf": "unistrvalue" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IntValue_u32` | `number` (uint32) | A 32-bit integer field +`Int64Value_u64` | `number` (uint64) | A 64-bit integer field +`StrValue_str` | `string` (ASCII) | An Ascii string field +`UniStrValue_utf` | `string` (UTF8) | An UTF-8 string field + +*** + +## "GetAdminMsg" RPC API - Get the message for administrators +### Description +Get the message for administrators. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetAdminMsg", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "HubName_str": "hubname", + "Msg_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`HubName_str` | `string` (ASCII) | The Virtual Hub name +`Msg_bin` | `string` (Base64 binary) | Message (Unicode strings acceptable) + +*** + +## "Flush" RPC API - Save All Volatile Data of VPN Server / Bridge to the Configuration File +### Description +Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "Flush", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IntValue_u32": 0, + "Int64Value_u64": 0, + "StrValue_str": "strvalue", + "UniStrValue_utf": "unistrvalue" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IntValue_u32` | `number` (uint32) | A 32-bit integer field +`Int64Value_u64` | `number` (uint64) | A 64-bit integer field +`StrValue_str` | `string` (ASCII) | An Ascii string field +`UniStrValue_utf` | `string` (UTF8) | An UTF-8 string field + +*** + +## "SetIPsecServices" RPC API - Enable or Disable IPsec VPN Server Function +### Description +Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetIPsecServices", + "params": { + "L2TP_Raw_bool": false, + "L2TP_IPsec_bool": false, + "EtherIP_IPsec_bool": false, + "IPsec_Secret_str": "ipsec_secret", + "L2TP_DefaultHub_str": "l2tp_defaulthub" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "L2TP_Raw_bool": false, + "L2TP_IPsec_bool": false, + "EtherIP_IPsec_bool": false, + "IPsec_Secret_str": "ipsec_secret", + "L2TP_DefaultHub_str": "l2tp_defaulthub" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`L2TP_Raw_bool` | `boolean` | Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. +`L2TP_IPsec_bool` | `boolean` | Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. +`EtherIP_IPsec_bool` | `boolean` | Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. +`IPsec_Secret_str` | `string` (ASCII) | Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. +`L2TP_DefaultHub_str` | `string` (ASCII) | Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. + +*** + +## "GetIPsecServices" RPC API - Get the Current IPsec VPN Server Settings +### Description +Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetIPsecServices", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "L2TP_Raw_bool": false, + "L2TP_IPsec_bool": false, + "EtherIP_IPsec_bool": false, + "IPsec_Secret_str": "ipsec_secret", + "L2TP_DefaultHub_str": "l2tp_defaulthub" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`L2TP_Raw_bool` | `boolean` | Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. +`L2TP_IPsec_bool` | `boolean` | Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. +`EtherIP_IPsec_bool` | `boolean` | Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. +`IPsec_Secret_str` | `string` (ASCII) | Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. +`L2TP_DefaultHub_str` | `string` (ASCII) | Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. + +*** + +## "AddEtherIpId" RPC API - Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices +### Description +Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "AddEtherIpId", + "params": { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Id_str` | `string` (ASCII) | Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to connect. +`UserName_str` | `string` (ASCII) | Specify the username to login to the destination Virtual Hub. +`Password_str` | `string` (ASCII) | Specify the password to login to the destination Virtual Hub. + +*** + +## "GetEtherIpId" RPC API - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions +### Description +Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetEtherIpId", + "params": { + "Id_str": "id" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Id_str` | `string` (ASCII) | Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to connect. +`UserName_str` | `string` (ASCII) | Specify the username to login to the destination Virtual Hub. +`Password_str` | `string` (ASCII) | Specify the password to login to the destination Virtual Hub. + +*** + +## "DeleteEtherIpId" RPC API - Delete an EtherIP / L2TPv3 over IPsec Client Setting +### Description +Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "DeleteEtherIpId", + "params": { + "Id_str": "id" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Id_str` | `string` (ASCII) | Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to connect. +`UserName_str` | `string` (ASCII) | Specify the username to login to the destination Virtual Hub. +`Password_str` | `string` (ASCII) | Specify the password to login to the destination Virtual Hub. + +*** + +## "EnumEtherIpId" RPC API - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions +### Description +Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "EnumEtherIpId", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Settings": [ + { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + }, + { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + }, + { + "Id_str": "id", + "HubName_str": "hubname", + "UserName_str": "username", + "Password_str": "password" + } + ] + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Settings` | `Array object` | Setting list +`Id_str` | `string` (ASCII) | Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. +`HubName_str` | `string` (ASCII) | Specify the name of the Virtual Hub to connect. +`UserName_str` | `string` (ASCII) | Specify the username to login to the destination Virtual Hub. +`Password_str` | `string` (ASCII) | Specify the password to login to the destination Virtual Hub. + +*** + +## "SetOpenVpnSstpConfig" RPC API - Set Settings for OpenVPN Clone Server Function +### Description +Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetOpenVpnSstpConfig", + "params": { + "EnableOpenVPN_bool": false, + "OpenVPNPortList_str": "openvpnportlist", + "EnableSSTP_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "EnableOpenVPN_bool": false, + "OpenVPNPortList_str": "openvpnportlist", + "EnableSSTP_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`EnableOpenVPN_bool` | `boolean` | Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. +`OpenVPNPortList_str` | `string` (ASCII) | Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. +`EnableSSTP_bool` | `boolean` | pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. + +*** + +## "GetOpenVpnSstpConfig" RPC API - Get the Current Settings of OpenVPN Clone Server Function +### Description +Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetOpenVpnSstpConfig", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "EnableOpenVPN_bool": false, + "OpenVPNPortList_str": "openvpnportlist", + "EnableSSTP_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`EnableOpenVPN_bool` | `boolean` | Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. +`OpenVPNPortList_str` | `string` (ASCII) | Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. +`EnableSSTP_bool` | `boolean` | pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. + +*** + +## "GetDDnsClientStatus" RPC API - Show the Current Status of Dynamic DNS Function +### Description +Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetDDnsClientStatus", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "Err_IPv4_u32": 0, + "ErrStr_IPv4_utf": "errstr_ipv4", + "Err_IPv6_u32": 0, + "ErrStr_IPv6_utf": "errstr_ipv6", + "CurrentHostName_str": "currenthostname", + "CurrentFqdn_str": "currentfqdn", + "DnsSuffix_str": "dnssuffix", + "CurrentIPv4_str": "currentipv4", + "CurrentIPv6_str": "currentipv6" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`Err_IPv4_u32` | `number` (uint32) | Last error code (IPv4) +`ErrStr_IPv4_utf` | `string` (UTF8) | Last error string (IPv4) +`Err_IPv6_u32` | `number` (uint32) | Last error code (IPv6) +`ErrStr_IPv6_utf` | `string` (UTF8) | Last error string (IPv6) +`CurrentHostName_str` | `string` (ASCII) | Current DDNS host name +`CurrentFqdn_str` | `string` (ASCII) | Current FQDN of the DDNS hostname +`DnsSuffix_str` | `string` (ASCII) | DDNS suffix +`CurrentIPv4_str` | `string` (ASCII) | Current IPv4 address of the VPN Server +`CurrentIPv6_str` | `string` (ASCII) | Current IPv6 address of the VPN Server + +*** + +## "ChangeDDnsClientHostname" RPC API - Set the Dynamic DNS Hostname +### Description +Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "ChangeDDnsClientHostname", + "params": { + "StrValue_str": "strvalue" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IntValue_u32": 0, + "Int64Value_u64": 0, + "StrValue_str": "strvalue", + "UniStrValue_utf": "unistrvalue" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IntValue_u32` | `number` (uint32) | A 32-bit integer field +`Int64Value_u64` | `number` (uint64) | A 64-bit integer field +`StrValue_str` | `string` (ASCII) | An Ascii string field +`UniStrValue_utf` | `string` (UTF8) | An UTF-8 string field + +*** + +## "RegenerateServerCert" RPC API - Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server +### Description +Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "RegenerateServerCert", + "params": { + "StrValue_str": "strvalue" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IntValue_u32": 0, + "Int64Value_u64": 0, + "StrValue_str": "strvalue", + "UniStrValue_utf": "unistrvalue" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IntValue_u32` | `number` (uint32) | A 32-bit integer field +`Int64Value_u64` | `number` (uint64) | A 64-bit integer field +`StrValue_str` | `string` (ASCII) | An Ascii string field +`UniStrValue_utf` | `string` (UTF8) | An UTF-8 string field + +*** + +## "MakeOpenVpnConfigFile" RPC API - Generate a Sample Setting File for OpenVPN Client +### Description +Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "MakeOpenVpnConfigFile", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ServerName_str": "servername", + "FilePath_str": "filepath", + "Offset_u32": 0, + "Buffer_bin": "SGVsbG8gV29ybGQ=" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ServerName_str` | `string` (ASCII) | Server name +`FilePath_str` | `string` (ASCII) | File Path +`Offset_u32` | `number` (uint32) | Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. +`Buffer_bin` | `string` (Base64 binary) | Received buffer + +*** + +## "SetSpecialListener" RPC API - Enable / Disable the VPN over ICMP / VPN over DNS Server Function +### Description +Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetSpecialListener", + "params": { + "VpnOverIcmpListener_bool": false, + "VpnOverDnsListener_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "VpnOverIcmpListener_bool": false, + "VpnOverDnsListener_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`VpnOverIcmpListener_bool` | `boolean` | The flag to activate the VPN over ICMP server function +`VpnOverDnsListener_bool` | `boolean` | The flag to activate the VPN over DNS function + +*** + +## "GetSpecialListener" RPC API - Get Current Setting of the VPN over ICMP / VPN over DNS Function +### Description +Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetSpecialListener", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "VpnOverIcmpListener_bool": false, + "VpnOverDnsListener_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`VpnOverIcmpListener_bool` | `boolean` | The flag to activate the VPN over ICMP server function +`VpnOverDnsListener_bool` | `boolean` | The flag to activate the VPN over DNS function + +*** + +## "GetAzureStatus" RPC API - Show the current status of VPN Azure function +### Description +Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetAzureStatus", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IsEnabled_bool": false, + "IsConnected_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IsEnabled_bool` | `boolean` | Whether VPN Azure Function is Enabled +`IsConnected_bool` | `boolean` | Whether connection to VPN Azure Cloud Server is established + +*** + +## "SetAzureStatus" RPC API - Enable / Disable VPN Azure Function +### Description +Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetAzureStatus", + "params": { + "IsEnabled_bool": false + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "IsEnabled_bool": false, + "IsConnected_bool": false + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`IsEnabled_bool` | `boolean` | Whether VPN Azure Function is Enabled +`IsConnected_bool` | `boolean` | Whether connection to VPN Azure Cloud Server is established + +*** + +## "GetDDnsInternetSettng" RPC API - Get the Proxy Settings for Connecting to the DDNS server +### Description +Get the Proxy Settings for Connecting to the DDNS server. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "GetDDnsInternetSettng", + "params": {} +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ProxyType_u32": 0, + "ProxyHostName_str": "proxyhostname", + "ProxyPort_u32": 0, + "ProxyUsername_str": "proxyusername", + "ProxyPassword_str": "proxypassword" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ProxyType_u32` | `number` (enum) | Type of proxy server
Values:
`0`: Direct TCP connection
`1`: Connection via HTTP proxy server
`2`: Connection via SOCKS proxy server +`ProxyHostName_str` | `string` (ASCII) | Proxy server host name +`ProxyPort_u32` | `number` (uint32) | Proxy server port number +`ProxyUsername_str` | `string` (ASCII) | Proxy server user name +`ProxyPassword_str` | `string` (ASCII) | Proxy server password + +*** + +## "SetDDnsInternetSettng" RPC API - Set the Proxy Settings for Connecting to the DDNS server +### Description +Set the Proxy Settings for Connecting to the DDNS server. + +### Input JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "method": "SetDDnsInternetSettng", + "params": { + "ProxyType_u32": 0, + "ProxyHostName_str": "proxyhostname", + "ProxyPort_u32": 0, + "ProxyUsername_str": "proxyusername", + "ProxyPassword_str": "proxypassword" + } +} +``` + +### Output JSON-RPC Format +```json +{ + "jsonrpc": "2.0", + "id": "rpc_call_id", + "result": { + "ProxyType_u32": 0, + "ProxyHostName_str": "proxyhostname", + "ProxyPort_u32": 0, + "ProxyUsername_str": "proxyusername", + "ProxyPassword_str": "proxypassword" + } +} +``` + +### Parameters + +Name | Type | Description +--- | --- | --- +`ProxyType_u32` | `number` (enum) | Type of proxy server
Values:
`0`: Direct TCP connection
`1`: Connection via HTTP proxy server
`2`: Connection via SOCKS proxy server +`ProxyHostName_str` | `string` (ASCII) | Proxy server host name +`ProxyPort_u32` | `number` (uint32) | Proxy server port number +`ProxyUsername_str` | `string` (ASCII) | Proxy server user name +`ProxyPassword_str` | `string` (ASCII) | Proxy server password + +*** +Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen. +Copyright (c) 2014-2019 [SoftEther VPN Project](https://www.softether.org/) under the Apache License 2.0. + diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/JsonRpc.cs b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/JsonRpc.cs new file mode 100644 index 00000000..8263a325 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/JsonRpc.cs @@ -0,0 +1,282 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// JsonRpc.cs - JSON-RPC Client Utility Functions +// +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +using System; +using System.IO; +using System.Net.Security; +using System.Net.Http; +using System.Collections.Generic; +using System.Text; +using System.Security.Cryptography.X509Certificates; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace SoftEther.JsonRpc +{ + /// + /// Internal utility class + /// + static class ClientUtil + { + public const int DefaultMaxDepth = 8; + + public static string NonNull(this string s) { if (s == null) return ""; else return s; } + public static bool IsEmpty(this string str) + { + if (str == null || str.Trim().Length == 0) + return true; + else + return false; + } + public static bool IsFilled(this string str) => !IsEmpty(str); + + public static string ObjectToJson(this object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false) => ClientUtil.Serialize(obj, include_null, escape_html, max_depth, compact, reference_handling); + public static T JsonToObject(this string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize(str, include_null, max_depth); + public static object JsonToObject(this string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize(str, type, include_null, max_depth); + + public static string Serialize(object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false) + { + JsonSerializerSettings setting = new JsonSerializerSettings() + { + MaxDepth = max_depth, + NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore, + ReferenceLoopHandling = ReferenceLoopHandling.Error, + PreserveReferencesHandling = reference_handling ? PreserveReferencesHandling.All : PreserveReferencesHandling.None, + StringEscapeHandling = escape_html ? StringEscapeHandling.EscapeHtml : StringEscapeHandling.Default, + }; + return JsonConvert.SerializeObject(obj, compact ? Formatting.None : Formatting.Indented, setting); + } + + public static T Deserialize(string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) + => (T)Deserialize(str, typeof(T), include_null, max_depth); + + public static object Deserialize(string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) + { + JsonSerializerSettings setting = new JsonSerializerSettings() + { + MaxDepth = max_depth, + NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore, + ObjectCreationHandling = ObjectCreationHandling.Replace, + ReferenceLoopHandling = ReferenceLoopHandling.Error, + }; + return JsonConvert.DeserializeObject(str, type, setting); + } + + public static void Print(this object o) + { + string str = o.ObjectToJson(); + + if (o is string) str = (string)o; + + Console.WriteLine(str); + } + } + + /// + /// JSON-RPC exception class + /// + class JsonRpcException : Exception + { + public JsonRpcError RpcError { get; } + public JsonRpcException(JsonRpcError err) + : base($"Code={err.Code}, Message={err.Message.NonNull()}" + + (err == null || err.Data == null ? "" : $", Data={err.Data.ObjectToJson(compact: true)}")) + { + this.RpcError = err; + } + } + + /// + /// JSON-RPC request class. See https://www.jsonrpc.org/specification + /// + class JsonRpcRequest + { + [JsonProperty("jsonrpc", Order = 1)] + public string Version { get; set; } = "2.0"; + + [JsonProperty("id", Order = 2)] + public string Id { get; set; } = null; + + [JsonProperty("method", Order = 3)] + public string Method { get; set; } = ""; + + [JsonProperty("params", Order = 4)] + public object Params { get; set; } = null; + + public JsonRpcRequest() { } + + public JsonRpcRequest(string method, object param, string id) + { + this.Method = method; + this.Params = param; + this.Id = id; + } + } + + /// + /// JSON-RPC response class with generics + /// + /// + class JsonRpcResponse + { + [JsonProperty("jsonrpc", Order = 1)] + public virtual string Version { get; set; } = "2.0"; + + [JsonProperty("id", NullValueHandling = NullValueHandling.Include, Order = 2)] + public virtual string Id { get; set; } = null; + + [JsonProperty("result", Order = 3)] + public virtual TResult Result { get; set; } = default(TResult); + + [JsonProperty("error", Order = 4)] + public virtual JsonRpcError Error { get; set; } = null; + + [JsonIgnore] + public virtual bool IsError => this.Error != null; + + [JsonIgnore] + public virtual bool IsOk => !IsError; + + public virtual void ThrowIfError() + { + if (this.IsError) throw new JsonRpcException(this.Error); + } + + public override string ToString() + { + return this.ObjectToJson(compact: true); + } + } + + /// + /// JSON-RPC error class. See https://www.jsonrpc.org/specification + /// + class JsonRpcError + { + public JsonRpcError() { } + public JsonRpcError(int code, string message, object data = null) + { + this.Code = code; + this.Message = message.NonNull(); + if (this.Message.IsEmpty()) this.Message = $"JSON-RPC Error {code}"; + this.Data = data; + } + + [JsonProperty("code")] + public int Code { get; set; } = 0; + + [JsonProperty("message")] + public string Message { get; set; } = null; + + [JsonProperty("data")] + public object Data { get; set; } = null; + } + + /// + /// JSON-RPC client. See https://www.jsonrpc.org/specification + /// + class JsonRpcClient + { + HttpClientHandler client_handler; + HttpClient client; + public const int DefaultTimeoutMsecs = 60 * 1000; + public int TimeoutMsecs { get => (int)client.Timeout.TotalMilliseconds; set => client.Timeout = new TimeSpan(0, 0, 0, 0, value); } + public Dictionary HttpHeaders { get; } = new Dictionary(); + + string base_url; + + /// + /// JSON-RPC client class constructor + /// + /// The URL + /// The SSL certificate validation callback + public JsonRpcClient(string url, Func cert_check_proc = null) + { + if (cert_check_proc == null) cert_check_proc = (message, cert, chain, errors) => true; + client_handler = new HttpClientHandler(); + + this.client_handler.AllowAutoRedirect = true; + this.client_handler.MaxAutomaticRedirections = 10; + + client_handler.ServerCertificateCustomValidationCallback = cert_check_proc; + + client = new HttpClient(client_handler, true); + //Console.WriteLine("new HttpClient(client_handler, true);"); + + this.base_url = url; + + this.TimeoutMsecs = DefaultTimeoutMsecs; + } + + /// + /// Call a single RPC call (without error check). You can wait for the response with Task or await statement. + /// + /// The name of RPC method + /// The parameters + public async Task CallInternalAsync(string method_name, object param) + { + string id = DateTime.Now.Ticks.ToString(); + + JsonRpcRequest req = new JsonRpcRequest(method_name, param, id); + + string req_string = req.ObjectToJson(); + + //Console.WriteLine($"req: {req_string}"); + + HttpContent content = new StringContent(req_string, Encoding.UTF8, "application/json"); + + foreach (string key in this.HttpHeaders.Keys) + { + string value = this.HttpHeaders[key]; + + content.Headers.Add(key, value); + } + + HttpResponseMessage response = await this.client.PostAsync(base_url, content); + + Stream responseStream = await response.Content.ReadAsStreamAsync(); + + if (!response.IsSuccessStatusCode) + { + using (StreamReader streamReader = new StreamReader(responseStream)) + { + throw new Exception($"Error: {response.StatusCode}: {await streamReader.ReadToEndAsync()}"); + } + } + + string ret_string; + + using (StreamReader streamReader = new StreamReader(responseStream)) + { + ret_string = await streamReader.ReadToEndAsync(); + } + + //Console.WriteLine($"ret: {ret_string}"); + + return ret_string; + } + + /// + /// Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + /// + /// The name of RPC method + /// The parameters + public async Task CallAsync(string method_name, object param) + { + string ret_string = await CallInternalAsync(method_name, param); + + JsonRpcResponse ret = ret_string.JsonToObject>(); + + ret.ThrowIfError(); + + return ret.Result; + } + } +} + diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/VPNServerRpc.cs b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/VPNServerRpc.cs new file mode 100644 index 00000000..e4a0b895 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/VPNServerRpc.cs @@ -0,0 +1,1399 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// VPNServerRpc.cs - SoftEther VPN Server's JSON-RPC Stubs +// +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +using System.Threading.Tasks; +using SoftEther.JsonRpc; + +namespace SoftEther.VPNServerRpc +{ + /// + /// VPN Server RPC Stubs + /// + public class VpnServerRpc + { + JsonRpcClient rpc_client; + + /// + /// Constructor of the VpnServerRpc class + /// + /// The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + /// The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + /// Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + /// The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + public VpnServerRpc(string vpnserver_host, int vpnserver_port, string admin_password, string hub_name = null) + { + rpc_client = new JsonRpcClient($"https://{vpnserver_host}:{vpnserver_port}/api/", null); + + rpc_client.HttpHeaders.Add("X-VPNADMIN-HUBNAME", string.IsNullOrEmpty(hub_name) ? "" : hub_name); + rpc_client.HttpHeaders.Add("X-VPNADMIN-PASSWORD", admin_password); + } + + /// + /// Call a RPC procedure + /// + public async Task CallAsync(string method_name, T request) + { + T response = await rpc_client.CallAsync(method_name, request); + + return response; + } + + /// + /// Test RPC function (Async mode). Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. + /// + public async Task TestAsync(VpnRpcTest t) => await CallAsync("Test", t); + + /// + /// Test RPC function (Sync mode). Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. + /// + public VpnRpcTest Test(VpnRpcTest t) => TestAsync(t).Result; + + /// + /// Get server information (Async mode). This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. + /// + public async Task GetServerInfoAsync() => await CallAsync("GetServerInfo", new VpnRpcServerInfo()); + + /// + /// Get server information (Sync mode). This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. + /// + public VpnRpcServerInfo GetServerInfo() => GetServerInfoAsync().Result; + + /// + /// Get Current Server Status (Async mode). This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. + /// + public async Task GetServerStatusAsync() => await CallAsync("GetServerStatus", new VpnRpcServerStatus()); + + /// + /// Get Current Server Status (Sync mode). This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. + /// + public VpnRpcServerStatus GetServerStatus() => GetServerStatusAsync().Result; + + /// + /// Create New TCP Listener (Async mode). This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. + /// + public async Task CreateListenerAsync(VpnRpcListener t) => await CallAsync("CreateListener", t); + + /// + /// Create New TCP Listener (Sync mode). This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListener CreateListener(VpnRpcListener t) => CreateListenerAsync(t).Result; + + /// + /// Get List of TCP Listeners (Async mode). This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnumListenerAsync() => await CallAsync("EnumListener", new VpnRpcListenerList()); + + /// + /// Get List of TCP Listeners (Async mode). This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListenerList EnumListener() => EnumListenerAsync().Result; + + /// + /// Delete TCP Listener (Async mode). This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task DeleteListenerAsync(VpnRpcListener t) => await CallAsync("DeleteListener", t); + + /// + /// Delete TCP Listener (Async mode). This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListener DeleteListener(VpnRpcListener t) => DeleteListenerAsync(t).Result; + + /// + /// Enable / Disable TCP Listener (Async mode). This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnableListenerAsync(VpnRpcListener t) => await CallAsync("EnableListener", t); + + /// + /// Enable / Disable TCP Listener (Async mode). This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListener EnableListener(VpnRpcListener t) => EnableListenerAsync(t).Result; + + /// + /// Set VPN Server Administrator Password (Async mode). This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetServerPasswordAsync(VpnRpcSetPassword t) => await CallAsync("SetServerPassword", t); + + /// + /// Set VPN Server Administrator Password (Async mode). This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcSetPassword SetServerPassword(VpnRpcSetPassword t) => SetServerPasswordAsync(t).Result; + + /// + /// Set the VPN Server clustering configuration (Async mode). Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. + /// + public async Task SetFarmSettingAsync(VpnRpcFarm t) => await CallAsync("SetFarmSetting", t); + + /// + /// Set the VPN Server clustering configuration (Async mode). Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. + /// + public VpnRpcFarm SetFarmSetting(VpnRpcFarm t) => SetFarmSettingAsync(t).Result; + + /// + /// Get Clustering Configuration of Current VPN Server (Async mode). You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetFarmSettingAsync() => await CallAsync("GetFarmSetting", new VpnRpcFarm()); + + /// + /// Get Clustering Configuration of Current VPN Server (Async mode). You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcFarm GetFarmSetting() => GetFarmSettingAsync().Result; + + /// + /// Get Cluster Member Information (Async mode). When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. + /// + public async Task GetFarmInfoAsync(VpnRpcFarmInfo t) => await CallAsync("GetFarmInfo", t); + + /// + /// Get Cluster Member Information (Async mode). When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcFarmInfo GetFarmInfo(VpnRpcFarmInfo t) => GetFarmInfoAsync(t).Result; + + /// + /// Get List of Cluster Members (Async mode). Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. + /// + public async Task EnumFarmMemberAsync() => await CallAsync("EnumFarmMember", new VpnRpcEnumFarm()); + + /// + /// Get List of Cluster Members (Async mode). Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcEnumFarm EnumFarmMember() => EnumFarmMemberAsync().Result; + + /// + /// Get Connection Status to Cluster Controller (Async mode). Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. + /// + public async Task GetFarmConnectionStatusAsync() => await CallAsync("GetFarmConnectionStatus", new VpnRpcFarmConnectionStatus()); + + /// + /// Get Connection Status to Cluster Controller (Sync mode). Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcFarmConnectionStatus GetFarmConnectionStatus() => GetFarmConnectionStatusAsync().Result; + + /// + /// Set SSL Certificate and Private Key of VPN Server (Async mode). You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetServerCertAsync(VpnRpcKeyPair t) => await CallAsync("SetServerCert", t); + + /// + /// Set SSL Certificate and Private Key of VPN Server (Sync mode). You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcKeyPair SetServerCert(VpnRpcKeyPair t) => SetServerCertAsync(t).Result; + + /// + /// Get SSL Certificate and Private Key of VPN Server (Async mode). Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetServerCertAsync() => await CallAsync("GetServerCert", new VpnRpcKeyPair()); + + /// + /// Get SSL Certificate and Private Key of VPN Server (Async mode). Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcKeyPair GetServerCert() => GetServerCertAsync().Result; + + /// + /// Get the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. + /// + public async Task GetServerCipherAsync() => await CallAsync("GetServerCipher", new VpnRpcStr()); + + /// + /// Get the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. + /// + public VpnRpcStr GetServerCipher() => GetServerCipherAsync().Result; + + /// + /// Set the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetServerCipherAsync(VpnRpcStr t) => await CallAsync("SetServerCipher", t); + + /// + /// Set the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcStr SetServerCipher(VpnRpcStr t) => SetServerCipherAsync(t).Result; + + /// + /// Create New Virtual Hub (Async mode). Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public async Task CreateHubAsync(VpnRpcCreateHub input_param) => await CallAsync("CreateHub", input_param); + + /// + /// Create New Virtual Hub (Async mode). Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public VpnRpcCreateHub CreateHub(VpnRpcCreateHub input_param) => CreateHubAsync(input_param).Result; + + /// + /// Set the Virtual Hub configuration (Async mode). You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. + /// + public async Task SetHubAsync(VpnRpcCreateHub input_param) => await CallAsync("SetHub", input_param); + + /// + /// Set the Virtual Hub configuration (Async mode). You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. + /// + public VpnRpcCreateHub SetHub(VpnRpcCreateHub input_param) => SetHubAsync(input_param).Result; + + /// + /// Get the Virtual Hub configuration (Async mode). You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. + /// + public async Task GetHubAsync(VpnRpcCreateHub input_param) => await CallAsync("GetHub", input_param); + + /// + /// Get the Virtual Hub configuration (Async mode). You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. + /// + public VpnRpcCreateHub GetHub(VpnRpcCreateHub input_param) => GetHubAsync(input_param).Result; + + /// + /// Get List of Virtual Hubs (Async mode). Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. + /// + public async Task EnumHubAsync() => await CallAsync("EnumHub", new VpnRpcEnumHub()); + + /// + /// Get List of Virtual Hubs (Async mode). Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. + /// + public VpnRpcEnumHub EnumHub() => EnumHubAsync().Result; + + /// + /// Delete Virtual Hub (Async mode). Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public async Task DeleteHubAsync(VpnRpcDeleteHub input_param) => await CallAsync("DeleteHub", input_param); + + /// + /// Delete Virtual Hub (Async mode). Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public VpnRpcDeleteHub DeleteHub(VpnRpcDeleteHub input_param) => DeleteHubAsync(input_param).Result; + + /// + /// Get Setting of RADIUS Server Used for User Authentication (Async mode). Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetHubRadiusAsync(VpnRpcRadius input_param) => await CallAsync("GetHubRadius", input_param); + + /// + /// Get Setting of RADIUS Server Used for User Authentication (Async mode). Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcRadius GetHubRadius(VpnRpcRadius input_param) => GetHubRadiusAsync(input_param).Result; + + /// + /// Set RADIUS Server to use for User Authentication (Async mode). To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetHubRadiusAsync(VpnRpcRadius input_param) => await CallAsync("SetHubRadius", input_param); + + /// + /// Set RADIUS Server to use for User Authentication (Async mode). To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcRadius SetHubRadius(VpnRpcRadius input_param) => SetHubRadiusAsync(input_param).Result; + + /// + /// Get List of TCP Connections Connecting to the VPN Server (Async mode). Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnumConnectionAsync() => await CallAsync("EnumConnection", new VpnRpcEnumConnection()); + + /// + /// Get List of TCP Connections Connecting to the VPN Server (Async mode). Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcEnumConnection EnumConnection() => EnumConnectionAsync().Result; + + /// + /// Disconnect TCP Connections Connecting to the VPN Server (Async mode). Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public async Task DisconnectConnectionAsync(VpnRpcDisconnectConnection input_param) => await CallAsync("DisconnectConnection", input_param); + + /// + /// Disconnect TCP Connections Connecting to the VPN Server (Async mode). Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcDisconnectConnection DisconnectConnection(VpnRpcDisconnectConnection input_param) => DisconnectConnectionAsync(input_param).Result; + + /// + /// Get Information of TCP Connections Connecting to the VPN Server (Async mode). Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetConnectionInfoAsync(VpnRpcConnectionInfo input_param) => await CallAsync("GetConnectionInfo", input_param); + + /// + /// Get Information of TCP Connections Connecting to the VPN Server (Async mode). Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcConnectionInfo GetConnectionInfo(VpnRpcConnectionInfo input_param) => GetConnectionInfoAsync(input_param).Result; + + /// + /// Switch Virtual Hub to Online or Offline (Async mode). Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetHubOnlineAsync(VpnRpcSetHubOnline input_param) => await CallAsync("SetHubOnline", input_param); + + /// + /// Switch Virtual Hub to Online or Offline (Async mode). Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcSetHubOnline SetHubOnline(VpnRpcSetHubOnline input_param) => SetHubOnlineAsync(input_param).Result; + + /// + /// Get Current Status of Virtual Hub (Async mode). Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. + /// + public async Task GetHubStatusAsync(VpnRpcHubStatus input_param) => await CallAsync("GetHubStatus", input_param); + + /// + /// Get Current Status of Virtual Hub (Async mode). Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. + /// + public VpnRpcHubStatus GetHubStatus(VpnRpcHubStatus input_param) => GetHubStatusAsync(input_param).Result; + + /// + /// Set the logging configuration of the Virtual Hub (Async mode). Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. + /// + public async Task SetHubLogAsync(VpnRpcHubLog input_param) => await CallAsync("SetHubLog", input_param); + + /// + /// Set the logging configuration of the Virtual Hub (Async mode). Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. + /// + public VpnRpcHubLog SetHubLog(VpnRpcHubLog input_param) => SetHubLogAsync(input_param).Result; + + /// + /// Get the logging configuration of the Virtual Hub (Async mode). Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. + /// + public async Task GetHubLogAsync(VpnRpcHubLog input_param) => await CallAsync("GetHubLog", input_param); + + /// + /// Get the logging configuration of the Virtual Hub (Async mode). Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. + /// + public VpnRpcHubLog GetHubLog(VpnRpcHubLog input_param) => GetHubLogAsync(input_param).Result; + + /// + /// Add Trusted CA Certificate (Async mode). Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task AddCaAsync(VpnRpcHubAddCA input_param) => await CallAsync("AddCa", input_param); + + /// + /// Add Trusted CA Certificate (Async mode). Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubAddCA AddCa(VpnRpcHubAddCA input_param) => AddCaAsync(input_param).Result; + + /// + /// Get List of Trusted CA Certificates (Async mode). Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumCaAsync(VpnRpcHubEnumCA input_param) => await CallAsync("EnumCa", input_param); + + /// + /// Get List of Trusted CA Certificates (Async mode). Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubEnumCA EnumCa(VpnRpcHubEnumCA input_param) => EnumCaAsync(input_param).Result; + + /// + /// Get Trusted CA Certificate (Async mode). Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task GetCaAsync(VpnRpcHubGetCA input_param) => await CallAsync("GetCa", input_param); + + /// + /// Get Trusted CA Certificate (Async mode). Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubGetCA GetCa(VpnRpcHubGetCA input_param) => GetCaAsync(input_param).Result; + + /// + /// Delete Trusted CA Certificate (Async mode). Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteCaAsync(VpnRpcHubDeleteCA input_param) => await CallAsync("DeleteCa", input_param); + + /// + /// Delete Trusted CA Certificate (Async mode). Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubDeleteCA DeleteCa(VpnRpcHubDeleteCA input_param) => DeleteCaAsync(input_param).Result; + + /// + /// Create New Cascade Connection (Async mode). Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task CreateLinkAsync(VpnRpcCreateLink input_param) => await CallAsync("CreateLink", input_param); + + /// + /// Create New Cascade Connection (Async mode). Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCreateLink CreateLink(VpnRpcCreateLink input_param) => CreateLinkAsync(input_param).Result; + + /// + /// Get the Cascade Connection Setting (Async mode). Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetLinkAsync(VpnRpcCreateLink input_param) => await CallAsync("GetLink", input_param); + + /// + /// Get the Cascade Connection Setting (Async mode). Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCreateLink GetLink(VpnRpcCreateLink input_param) => GetLinkAsync(input_param).Result; + + /// + /// Change Existing Cascade Connection (Async mode). Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. + /// + public async Task SetLinkAsync(VpnRpcCreateLink input_param) => await CallAsync("SetLink", input_param); + + /// + /// Change Existing Cascade Connection (Async mode). Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. + /// + public VpnRpcCreateLink SetLink(VpnRpcCreateLink input_param) => SetLinkAsync(input_param).Result; + + /// + /// Get List of Cascade Connections (Async mode). Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumLinkAsync(VpnRpcEnumLink input_param) => await CallAsync("EnumLink", input_param); + + /// + /// Get List of Cascade Connections (Async mode). Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumLink EnumLink(VpnRpcEnumLink input_param) => EnumLinkAsync(input_param).Result; + + /// + /// Switch Cascade Connection to Online Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetLinkOnlineAsync(VpnRpcLink input_param) => await CallAsync("SetLinkOnline", input_param); + + /// + /// Switch Cascade Connection to Online Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLink SetLinkOnline(VpnRpcLink input_param) => SetLinkOnlineAsync(input_param).Result; + + /// + /// Switch Cascade Connection to Offline Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetLinkOfflineAsync(VpnRpcLink input_param) => await CallAsync("SetLinkOffline", input_param); + + /// + /// Switch Cascade Connection to Offline Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLink SetLinkOffline(VpnRpcLink input_param) => SetLinkOfflineAsync(input_param).Result; + + /// + /// Delete Cascade Connection Setting (Async mode). Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DeleteLinkAsync(VpnRpcLink input_param) => await CallAsync("DeleteLink", input_param); + + /// + /// Delete Cascade Connection Setting (Async mode). Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLink DeleteLink(VpnRpcLink input_param) => DeleteLinkAsync(input_param).Result; + + /// + /// Change Name of Cascade Connection (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task RenameLinkAsync(VpnRpcRenameLink input_param) => await CallAsync("RenameLink", input_param); + + /// + /// Change Name of Cascade Connection (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcRenameLink RenameLink(VpnRpcRenameLink input_param) => RenameLinkAsync(input_param).Result; + + /// + /// Get Current Cascade Connection Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetLinkStatusAsync(VpnRpcLinkStatus input_param) => await CallAsync("GetLinkStatus", input_param); + + /// + /// Get Current Cascade Connection Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLinkStatus GetLinkStatus(VpnRpcLinkStatus input_param) => GetLinkStatusAsync(input_param).Result; + + /// + /// Add Access List Rule (Async mode). Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task AddAccessAsync(VpnRpcAddAccess input_param) => await CallAsync("AddAccess", input_param); + + /// + /// Add Access List Rule (Async mode). Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcAddAccess AddAccess(VpnRpcAddAccess input_param) => AddAccessAsync(input_param).Result; + + /// + /// Delete Rule from Access List (Async mode). Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteAccessAsync(VpnRpcDeleteAccess input_param) => await CallAsync("DeleteAccess", input_param); + + /// + /// Delete Rule from Access List (Async mode). Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcDeleteAccess DeleteAccess(VpnRpcDeleteAccess input_param) => DeleteAccessAsync(input_param).Result; + + /// + /// Get Access List Rule List (Async mode). Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumAccessAsync(VpnRpcEnumAccessList input_param) => await CallAsync("EnumAccess", input_param); + + /// + /// Get Access List Rule List (Async mode). Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcEnumAccessList EnumAccess(VpnRpcEnumAccessList input_param) => EnumAccessAsync(input_param).Result; + + /// + /// Replace all access lists on a single bulk API call (Async mode). This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. + /// + public async Task SetAccessListAsync(VpnRpcEnumAccessList input_param) => await CallAsync("SetAccessList", input_param); + + /// + /// Replace all access lists on a single bulk API call (Async mode). This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. + /// + public VpnRpcEnumAccessList SetAccessList(VpnRpcEnumAccessList input_param) => SetAccessListAsync(input_param).Result; + + /// + /// Create a user (Async mode). Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task CreateUserAsync(VpnRpcSetUser input_param) => await CallAsync("CreateUser", input_param); + + /// + /// Create a user (Async mode). Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetUser CreateUser(VpnRpcSetUser input_param) => CreateUserAsync(input_param).Result; + + /// + /// Change User Settings (Async mode). Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task SetUserAsync(VpnRpcSetUser input_param) => await CallAsync("SetUser", input_param); + + /// + /// Change User Settings (Async mode). Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetUser SetUser(VpnRpcSetUser input_param) => SetUserAsync(input_param).Result; + + /// + /// Get User Settings (Async mode). Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task GetUserAsync(VpnRpcSetUser input_param) => await CallAsync("GetUser", input_param); + + /// + /// Get User Settings (Async mode). Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetUser GetUser(VpnRpcSetUser input_param) => GetUserAsync(input_param).Result; + + /// + /// Delete a user (Async mode). Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteUserAsync(VpnRpcDeleteUser input_param) => await CallAsync("DeleteUser", input_param); + + /// + /// Delete a user (Sync mode). Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcDeleteUser DeleteUser(VpnRpcDeleteUser input_param) => DeleteUserAsync(input_param).Result; + + /// + /// Get List of Users (Async mode). Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumUserAsync(VpnRpcEnumUser input_param) => await CallAsync("EnumUser", input_param); + + /// + /// Get List of Users (Async mode). Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcEnumUser EnumUser(VpnRpcEnumUser input_param) => EnumUserAsync(input_param).Result; + + /// + /// Create Group (Async mode). Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task CreateGroupAsync(VpnRpcSetGroup input_param) => await CallAsync("CreateGroup", input_param); + + /// + /// Create Group (Async mode). Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetGroup CreateGroup(VpnRpcSetGroup input_param) => CreateGroupAsync(input_param).Result; + + /// + /// Set group settings (Async mode). Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task SetGroupAsync(VpnRpcSetGroup input_param) => await CallAsync("SetGroup", input_param); + + /// + /// Set group settings (Async mode). Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetGroup SetGroup(VpnRpcSetGroup input_param) => SetGroupAsync(input_param).Result; + + /// + /// Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task GetGroupAsync(VpnRpcSetGroup input_param) => await CallAsync("GetGroup", input_param); + + /// + /// Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetGroup GetGroup(VpnRpcSetGroup input_param) => GetGroupAsync(input_param).Result; + + /// + /// Delete User from Group (Async mode). Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteGroupAsync(VpnRpcDeleteUser input_param) => await CallAsync("DeleteGroup", input_param); + + /// + /// Delete User from Group (Async mode). Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcDeleteUser DeleteGroup(VpnRpcDeleteUser input_param) => DeleteGroupAsync(input_param).Result; + + /// + /// Get List of Groups (Async mode). Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumGroupAsync(VpnRpcEnumGroup input_param) => await CallAsync("EnumGroup", input_param); + + /// + /// Get List of Groups (Async mode). Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcEnumGroup EnumGroup(VpnRpcEnumGroup input_param) => EnumGroupAsync(input_param).Result; + + /// + /// Get List of Connected VPN Sessions (Async mode). Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. + /// + public async Task EnumSessionAsync(VpnRpcEnumSession input_param) => await CallAsync("EnumSession", input_param); + + /// + /// Get List of Connected VPN Sessions (Async mode). Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. + /// + public VpnRpcEnumSession EnumSession(VpnRpcEnumSession input_param) => EnumSessionAsync(input_param).Result; + + /// + /// Get Session Status (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. + /// + public async Task GetSessionStatusAsync(VpnRpcSessionStatus input_param) => await CallAsync("GetSessionStatus", input_param); + + /// + /// Get Session Status (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. + /// + public VpnRpcSessionStatus GetSessionStatus(VpnRpcSessionStatus input_param) => GetSessionStatusAsync(input_param).Result; + + /// + /// Disconnect Session (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. + /// + public async Task DeleteSessionAsync(VpnRpcDeleteSession input_param) => await CallAsync("DeleteSession", input_param); + + /// + /// Disconnect Session (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. + /// + public VpnRpcDeleteSession DeleteSession(VpnRpcDeleteSession input_param) => DeleteSessionAsync(input_param).Result; + + /// + /// Get the MAC Address Table Database (Async mode). Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. + /// + public async Task EnumMacTableAsync(VpnRpcEnumMacTable input_param) => await CallAsync("EnumMacTable", input_param); + + /// + /// Get the MAC Address Table Database (Async mode). Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. + /// + public VpnRpcEnumMacTable EnumMacTable(VpnRpcEnumMacTable input_param) => EnumMacTableAsync(input_param).Result; + + /// + /// Delete MAC Address Table Entry (Async mode). Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. + /// + public async Task DeleteMacTableAsync(VpnRpcDeleteTable input_param) => await CallAsync("DeleteMacTable", input_param); + + /// + /// Delete MAC Address Table Entry (Async mode). Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. + /// + public VpnRpcDeleteTable DeleteMacTable(VpnRpcDeleteTable input_param) => DeleteMacTableAsync(input_param).Result; + + /// + /// Get the IP Address Table Database (Async mode). Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. + /// + public async Task EnumIpTableAsync(VpnRpcEnumIpTable input_param) => await CallAsync("EnumIpTable", input_param); + + /// + /// Get the IP Address Table Database (Async mode). Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. + /// + public VpnRpcEnumIpTable EnumIpTable(VpnRpcEnumIpTable input_param) => EnumIpTableAsync(input_param).Result; + + /// + /// Delete IP Address Table Entry (Async mode). Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. + /// + public async Task DeleteIpTableAsync(VpnRpcDeleteTable input_param) => await CallAsync("DeleteIpTable", input_param); + + /// + /// Delete IP Address Table Entry (Async mode). Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. + /// + public VpnRpcDeleteTable DeleteIpTable(VpnRpcDeleteTable input_param) => DeleteIpTableAsync(input_param).Result; + + /// + /// Set the Keep Alive Internet Connection Function (Async mode). Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. + /// + public async Task SetKeepAsync(VpnRpcKeep input_param) => await CallAsync("SetKeep", input_param); + + /// + /// Set the Keep Alive Internet Connection Function (Async mode). Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. + /// + public VpnRpcKeep SetKeep(VpnRpcKeep input_param) => SetKeepAsync(input_param).Result; + + /// + /// Get the Keep Alive Internet Connection Function (Async mode). Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. + /// + public async Task GetKeepAsync(VpnRpcKeep input_param) => await CallAsync("GetKeep", input_param); + + /// + /// Get the Keep Alive Internet Connection Function (Async mode). Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. + /// + public VpnRpcKeep GetKeep(VpnRpcKeep input_param) => GetKeepAsync(input_param).Result; + + /// + /// Enable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnableSecureNATAsync(VpnRpcHub input_param) => await CallAsync("EnableSecureNAT", input_param); + + /// + /// Enable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcHub EnableSecureNAT(VpnRpcHub input_param) => EnableSecureNATAsync(input_param).Result; + + /// + /// Disable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DisableSecureNATAsync(VpnRpcHub input_param) => await CallAsync("DisableSecureNAT", input_param); + + /// + /// Disable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcHub DisableSecureNAT(VpnRpcHub input_param) => DisableSecureNATAsync(input_param).Result; + + /// + /// Change Settings of SecureNAT Function (Async mode). Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetSecureNATOptionAsync(VpnVhOption input_param) => await CallAsync("SetSecureNATOption", input_param); + + /// + /// Change Settings of SecureNAT Function (Async mode). Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnVhOption SetSecureNATOption(VpnVhOption input_param) => SetSecureNATOptionAsync(input_param).Result; + + /// + /// Get Settings of SecureNAT Function (Async mode). This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. + /// + public async Task GetSecureNATOptionAsync(VpnVhOption input_param) => await CallAsync("GetSecureNATOption", input_param); + + /// + /// Get Settings of SecureNAT Function (Async mode). This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. + /// + public VpnVhOption GetSecureNATOption(VpnVhOption input_param) => GetSecureNATOptionAsync(input_param).Result; + + /// + /// Get Virtual NAT Function Session Table of SecureNAT Function (Async mode). Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumNATAsync(VpnRpcEnumNat input_param) => await CallAsync("EnumNAT", input_param); + + /// + /// Get Virtual NAT Function Session Table of SecureNAT Function (Async mode). Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumNat EnumNAT(VpnRpcEnumNat input_param) => EnumNATAsync(input_param).Result; + + /// + /// Get Virtual DHCP Server Function Lease Table of SecureNAT Function (Async mode). Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumDHCPAsync(VpnRpcEnumDhcp input_param) => await CallAsync("EnumDHCP", input_param); + + /// + /// Get Virtual DHCP Server Function Lease Table of SecureNAT Function (Async mode). Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumDhcp EnumDHCP(VpnRpcEnumDhcp input_param) => EnumDHCPAsync(input_param).Result; + + /// + /// Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetSecureNATStatusAsync(VpnRpcNatStatus input_param) => await CallAsync("GetSecureNATStatus", input_param); + + /// + /// Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcNatStatus GetSecureNATStatus(VpnRpcNatStatus input_param) => GetSecureNATStatusAsync(input_param).Result; + + /// + /// Get List of Network Adapters Usable as Local Bridge (Async mode). Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnumEthernetAsync() => await CallAsync("EnumEthernet", new VpnRpcEnumEth()); + + /// + /// Get List of Network Adapters Usable as Local Bridge (Async mode). Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcEnumEth EnumEthernet() => EnumEthernetAsync().Result; + + /// + /// Create Local Bridge Connection (Async mode). Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. + /// + public async Task AddLocalBridgeAsync(VpnRpcLocalBridge input_param) => await CallAsync("AddLocalBridge", input_param); + + /// + /// Create Local Bridge Connection (Async mode). Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcLocalBridge AddLocalBridge(VpnRpcLocalBridge input_param) => AddLocalBridgeAsync(input_param).Result; + + /// + /// Delete Local Bridge Connection (Async mode). Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task DeleteLocalBridgeAsync(VpnRpcLocalBridge input_param) => await CallAsync("DeleteLocalBridge", input_param); + + /// + /// Delete Local Bridge Connection (Async mode). Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcLocalBridge DeleteLocalBridge(VpnRpcLocalBridge input_param) => DeleteLocalBridgeAsync(input_param).Result; + + /// + /// Get List of Local Bridge Connection (Async mode). Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. + /// + public async Task EnumLocalBridgeAsync() => await CallAsync("EnumLocalBridge", new VpnRpcEnumLocalBridge()); + + /// + /// Get List of Local Bridge Connection (Async mode). Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. + /// + public VpnRpcEnumLocalBridge EnumLocalBridge() => EnumLocalBridgeAsync().Result; + + /// + /// Get whether the localbridge function is supported on the current system (Async mode). + /// + public async Task GetBridgeSupportAsync() => await CallAsync("GetBridgeSupport", new VpnRpcBridgeSupport()); + + /// + /// Get whether the localbridge function is supported on the current system (Async mode). + /// + public VpnRpcBridgeSupport GetBridgeSupport() => GetBridgeSupportAsync().Result; + + /// + /// Reboot VPN Server Service (Async mode). Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. + /// + public async Task RebootServerAsync(VpnRpcTest input_param) => await CallAsync("RebootServer", input_param); + + /// + /// Reboot VPN Server Service (Async mode). Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcTest RebootServer(VpnRpcTest input_param) => RebootServerAsync(input_param).Result; + + /// + /// Get List of Server Functions / Capability (Async mode). Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. + /// + public async Task GetCapsAsync() => await CallAsync("GetCaps", new VpnCapslist()); + + /// + /// Get List of Server Functions / Capability (Async mode). Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. + /// + public VpnCapslist GetCaps() => GetCapsAsync().Result; + + /// + /// Get the current configuration of the VPN Server (Async mode). Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetConfigAsync() => await CallAsync("GetConfig", new VpnRpcConfig()); + + /// + /// Get the current configuration of the VPN Server (Async mode). Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcConfig GetConfig() => GetConfigAsync().Result; + + /// + /// Write Configuration File to VPN Server (Async mode). Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetConfigAsync(VpnRpcConfig input_param) => await CallAsync("SetConfig", input_param); + + /// + /// Write Configuration File to VPN Server (Async mode). Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcConfig SetConfig(VpnRpcConfig input_param) => SetConfigAsync(input_param).Result; + + /// + /// Get Virtual Hub Administration Option default values (Async mode). + /// + public async Task GetDefaultHubAdminOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("GetDefaultHubAdminOptions", input_param); + + /// + /// Get Virtual Hub Administration Option default values (Async mode). + /// + public VpnRpcAdminOption GetDefaultHubAdminOptions(VpnRpcAdminOption input_param) => GetDefaultHubAdminOptionsAsync(input_param).Result; + + /// + /// Get List of Virtual Hub Administration Options (Async mode). Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task GetHubAdminOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("GetHubAdminOptions", input_param); + + /// + /// Get List of Virtual Hub Administration Options (Async mode). Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption GetHubAdminOptions(VpnRpcAdminOption input_param) => GetHubAdminOptionsAsync(input_param).Result; + + /// + /// Set Values of Virtual Hub Administration Options (Async mode). Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task SetHubAdminOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("SetHubAdminOptions", input_param); + + /// + /// Set Values of Virtual Hub Administration Options (Async mode). Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption SetHubAdminOptions(VpnRpcAdminOption input_param) => SetHubAdminOptionsAsync(input_param).Result; + + /// + /// Get List of Virtual Hub Extended Options (Async mode). Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task GetHubExtOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("GetHubExtOptions", input_param); + + /// + /// Get List of Virtual Hub Extended Options (Async mode). Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption GetHubExtOptions(VpnRpcAdminOption input_param) => GetHubExtOptionsAsync(input_param).Result; + + /// + /// Set a Value of Virtual Hub Extended Options (Async mode). Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task SetHubExtOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("SetHubExtOptions", input_param); + + /// + /// Set a Value of Virtual Hub Extended Options (Async mode). Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption SetHubExtOptions(VpnRpcAdminOption input_param) => SetHubExtOptionsAsync(input_param).Result; + + /// + /// Define New Virtual Layer 3 Switch (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public async Task AddL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("AddL3Switch", input_param); + + /// + /// Define New Virtual Layer 3 Switch (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public VpnRpcL3Sw AddL3Switch(VpnRpcL3Sw input_param) => AddL3SwitchAsync(input_param).Result; + + /// + /// Delete Virtual Layer 3 Switch (Async mode). Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public async Task DelL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("DelL3Switch", input_param); + + /// + /// Delete Virtual Layer 3 Switch (Async mode). Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public VpnRpcL3Sw DelL3Switch(VpnRpcL3Sw input_param) => DelL3SwitchAsync(input_param).Result; + + /// + /// Get List of Virtual Layer 3 Switches (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public async Task EnumL3SwitchAsync() => await CallAsync("EnumL3Switch", new VpnRpcEnumL3Sw()); + + /// + /// Get List of Virtual Layer 3 Switches (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public VpnRpcEnumL3Sw EnumL3Switch() => EnumL3SwitchAsync().Result; + + /// + /// Start Virtual Layer 3 Switch Operation (Async mode). Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public async Task StartL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("StartL3Switch", input_param); + + /// + /// Start Virtual Layer 3 Switch Operation (Async mode). Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public VpnRpcL3Sw StartL3Switch(VpnRpcL3Sw input_param) => StartL3SwitchAsync(input_param).Result; + + /// + /// Stop Virtual Layer 3 Switch Operation (Async mode). Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task StopL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("StopL3Switch", input_param); + + /// + /// Stop Virtual Layer 3 Switch Operation (Async mode). Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcL3Sw StopL3Switch(VpnRpcL3Sw input_param) => StopL3SwitchAsync(input_param).Result; + + /// + /// Add Virtual Interface to Virtual Layer 3 Switch (Async mode). Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task AddL3IfAsync(VpnRpcL3If input_param) => await CallAsync("AddL3If", input_param); + + /// + /// Add Virtual Interface to Virtual Layer 3 Switch (Async mode). Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3If AddL3If(VpnRpcL3If input_param) => AddL3IfAsync(input_param).Result; + + /// + /// Delete Virtual Interface of Virtual Layer 3 Switch (Async mode). Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task DelL3IfAsync(VpnRpcL3If input_param) => await CallAsync("DelL3If", input_param); + + /// + /// Delete Virtual Interface of Virtual Layer 3 Switch (Async mode). Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3If DelL3If(VpnRpcL3If input_param) => DelL3IfAsync(input_param).Result; + + /// + /// Get List of Interfaces Registered on the Virtual Layer 3 Switch (Async mode). Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public async Task EnumL3IfAsync(VpnRpcEnumL3If input_param) => await CallAsync("EnumL3If", input_param); + + /// + /// Get List of Interfaces Registered on the Virtual Layer 3 Switch (Async mode). Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public VpnRpcEnumL3If EnumL3If(VpnRpcEnumL3If input_param) => EnumL3IfAsync(input_param).Result; + + /// + /// Add Routing Table Entry for Virtual Layer 3 Switch (Async mode). Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task AddL3TableAsync(VpnRpcL3Table input_param) => await CallAsync("AddL3Table", input_param); + + /// + /// Add Routing Table Entry for Virtual Layer 3 Switch (Async mode). Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3Table AddL3Table(VpnRpcL3Table input_param) => AddL3TableAsync(input_param).Result; + + /// + /// Delete Routing Table Entry of Virtual Layer 3 Switch (Async mode). Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task DelL3TableAsync(VpnRpcL3Table input_param) => await CallAsync("DelL3Table", input_param); + + /// + /// Delete Routing Table Entry of Virtual Layer 3 Switch (Async mode). Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3Table DelL3Table(VpnRpcL3Table input_param) => DelL3TableAsync(input_param).Result; + + /// + /// Get List of Routing Tables of Virtual Layer 3 Switch (Async mode). Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public async Task EnumL3TableAsync(VpnRpcEnumL3Table input_param) => await CallAsync("EnumL3Table", input_param); + + /// + /// Get List of Routing Tables of Virtual Layer 3 Switch (Async mode). Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public VpnRpcEnumL3Table EnumL3Table(VpnRpcEnumL3Table input_param) => EnumL3TableAsync(input_param).Result; + + /// + /// Get List of Certificates Revocation List (Async mode). Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumCrlAsync(VpnRpcEnumCrl input_param) => await CallAsync("EnumCrl", input_param); + + /// + /// Get List of Certificates Revocation List (Async mode). Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumCrl EnumCrl(VpnRpcEnumCrl input_param) => EnumCrlAsync(input_param).Result; + + /// + /// Add a Revoked Certificate (Async mode). Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task AddCrlAsync(VpnRpcCrl input_param) => await CallAsync("AddCrl", input_param); + + /// + /// Add a Revoked Certificate (Async mode). Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl AddCrl(VpnRpcCrl input_param) => AddCrlAsync(input_param).Result; + + /// + /// Delete a Revoked Certificate (Async mode). Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DelCrlAsync(VpnRpcCrl input_param) => await CallAsync("DelCrl", input_param); + + /// + /// Delete a Revoked Certificate (Async mode). Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl DelCrl(VpnRpcCrl input_param) => DelCrlAsync(input_param).Result; + + /// + /// Get a Revoked Certificate (Async mode). Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetCrlAsync(VpnRpcCrl input_param) => await CallAsync("GetCrl", input_param); + + /// + /// Get a Revoked Certificate (Async mode). Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl GetCrl(VpnRpcCrl input_param) => GetCrlAsync(input_param).Result; + + /// + /// Change Existing CRL (Certificate Revocation List) Entry (Async mode). Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetCrlAsync(VpnRpcCrl input_param) => await CallAsync("SetCrl", input_param); + + /// + /// Change Existing CRL (Certificate Revocation List) Entry (Async mode). Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl SetCrl(VpnRpcCrl input_param) => SetCrlAsync(input_param).Result; + + /// + /// Add Rule to Source IP Address Limit List (Async mode). Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetAcListAsync(VpnRpcAcList input_param) => await CallAsync("SetAcList", input_param); + + /// + /// Add Rule to Source IP Address Limit List (Async mode). Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAcList SetAcList(VpnRpcAcList input_param) => SetAcListAsync(input_param).Result; + + /// + /// Get List of Rule Items of Source IP Address Limit List (Async mode). Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetAcListAsync(VpnRpcAcList input_param) => await CallAsync("GetAcList", input_param); + + /// + /// Get List of Rule Items of Source IP Address Limit List (Async mode). Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAcList GetAcList(VpnRpcAcList input_param) => GetAcListAsync(input_param).Result; + + /// + /// Get List of Log Files (Async mode). Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public async Task EnumLogFileAsync() => await CallAsync("EnumLogFile", new VpnRpcEnumLogFile()); + + /// + /// Get List of Log Files (Async mode). Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public VpnRpcEnumLogFile EnumLogFile() => EnumLogFileAsync().Result; + + /// + /// Download a part of Log File (Async mode). Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public async Task ReadLogFileAsync(VpnRpcReadLogFile input_param) => await CallAsync("ReadLogFile", input_param); + + /// + /// Download a part of Log File (Async mode). Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public VpnRpcReadLogFile ReadLogFile(VpnRpcReadLogFile input_param) => ReadLogFileAsync(input_param).Result; + + /// + /// Set syslog Send Function (Async mode). Use this to set the usage of syslog send function and which syslog server to use. + /// + public async Task SetSysLogAsync(VpnSyslogSetting input_param) => await CallAsync("SetSysLog", input_param); + + /// + /// Set syslog Send Function (Async mode). Use this to set the usage of syslog send function and which syslog server to use. + /// + public VpnSyslogSetting SetSysLog(VpnSyslogSetting input_param) => SetSysLogAsync(input_param).Result; + + /// + /// Get syslog Send Function (Async mode). This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. + /// + public async Task GetSysLogAsync(VpnSyslogSetting input_param) => await CallAsync("GetSysLog", input_param); + + /// + /// Get syslog Send Function (Async mode). This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. + /// + public VpnSyslogSetting GetSysLog(VpnSyslogSetting input_param) => GetSysLogAsync(input_param).Result; + + /// + /// Set Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public async Task SetHubMsgAsync(VpnRpcMsg input_param) => await CallAsync("SetHubMsg", input_param); + + /// + /// Set Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public VpnRpcMsg SetHubMsg(VpnRpcMsg input_param) => SetHubMsgAsync(input_param).Result; + + /// + /// Get Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public async Task GetHubMsgAsync(VpnRpcMsg input_param) => await CallAsync("GetHubMsg", input_param); + + /// + /// Get Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public VpnRpcMsg GetHubMsg(VpnRpcMsg input_param) => GetHubMsgAsync(input_param).Result; + + /// + /// Raise a vital error on the VPN Server / Bridge to terminate the process forcefully (Async mode). This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public async Task CrashAsync(VpnRpcTest input_param) => await CallAsync("Crash", input_param); + + /// + /// Raise a vital error on the VPN Server / Bridge to terminate the process forcefully (Async mode). This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public VpnRpcTest Crash(VpnRpcTest input_param) => CrashAsync(input_param).Result; + + /// + /// Get the message for administrators (Async mode). + /// + public async Task GetAdminMsgAsync() => await CallAsync("GetAdminMsg", new VpnRpcMsg()); + + /// + /// Get message for administrators (Sync mode) + /// + public VpnRpcMsg GetAdminMsg() => GetAdminMsgAsync().Result; + + /// + /// Save All Volatile Data of VPN Server / Bridge to the Configuration File (Async mode). The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public async Task FlushAsync(VpnRpcTest input_param) => await CallAsync("Flush", input_param); + + /// + /// Save All Volatile Data of VPN Server / Bridge to the Configuration File (Sync mode). The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public VpnRpcTest Flush(VpnRpcTest input_param) => FlushAsync(input_param).Result; + + /// + /// Enable or Disable IPsec VPN Server Function (Async mode). Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetIPsecServicesAsync(VpnIPsecServices input_param) => await CallAsync("SetIPsecServices", input_param); + + /// + /// Enable or Disable IPsec VPN Server Function (Async mode). Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnIPsecServices SetIPsecServices(VpnIPsecServices input_param) => SetIPsecServicesAsync(input_param).Result; + + /// + /// Get the Current IPsec VPN Server Settings (Async mode). Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetIPsecServicesAsync() => await CallAsync("GetIPsecServices", new VpnIPsecServices()); + + /// + /// Get the Current IPsec VPN Server Settings (Async mode). Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnIPsecServices GetIPsecServices() => GetIPsecServicesAsync().Result; + + /// + /// Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices (Async mode). Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task AddEtherIpIdAsync(VpnEtherIpId input_param) => await CallAsync("AddEtherIpId", input_param); + + /// + /// Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices (Async mode). Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnEtherIpId AddEtherIpId(VpnEtherIpId input_param) => AddEtherIpIdAsync(input_param).Result; + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetEtherIpIdAsync(VpnEtherIpId input_param) => await CallAsync("GetEtherIpId", input_param); + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnEtherIpId GetEtherIpId(VpnEtherIpId input_param) => GetEtherIpIdAsync(input_param).Result; + + /// + /// Delete an EtherIP / L2TPv3 over IPsec Client Setting (Async mode). This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DeleteEtherIpIdAsync(VpnEtherIpId input_param) => await CallAsync("DeleteEtherIpId", input_param); + + /// + /// Delete an EtherIP / L2TPv3 over IPsec Client Setting (Async mode). This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnEtherIpId DeleteEtherIpId(VpnEtherIpId input_param) => DeleteEtherIpIdAsync(input_param).Result; + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumEtherIpIdAsync() => await CallAsync("EnumEtherIpId", new VpnRpcEnumEtherIpId()); + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumEtherIpId EnumEtherIpId() => EnumEtherIpIdAsync().Result; + + /// + /// Set Settings for OpenVPN Clone Server Function (Async mode). The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetOpenVpnSstpConfigAsync(VpnOpenVpnSstpConfig input_param) => await CallAsync("SetOpenVpnSstpConfig", input_param); + + /// + /// Set Settings for OpenVPN Clone Server Function (Async mode). The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnOpenVpnSstpConfig SetOpenVpnSstpConfig(VpnOpenVpnSstpConfig input_param) => SetOpenVpnSstpConfigAsync(input_param).Result; + + /// + /// Get the Current Settings of OpenVPN Clone Server Function (Async mode). Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetOpenVpnSstpConfigAsync() => await CallAsync("GetOpenVpnSstpConfig", new VpnOpenVpnSstpConfig()); + + /// + /// Get the Current Settings of OpenVPN Clone Server Function (Async mode). Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnOpenVpnSstpConfig GetOpenVpnSstpConfig() => GetOpenVpnSstpConfigAsync().Result; + + /// + /// Show the Current Status of Dynamic DNS Function (Async mode). Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task GetDDnsClientStatusAsync() => await CallAsync("GetDDnsClientStatus", new VpnDDnsClientStatus()); + + /// + /// Show the Current Status of Dynamic DNS Function (Async mode). Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnDDnsClientStatus GetDDnsClientStatus() => GetDDnsClientStatusAsync().Result; + + /// + /// Set the Dynamic DNS Hostname (Async mode). You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task ChangeDDnsClientHostnameAsync(VpnRpcTest input_param) => await CallAsync("ChangeDDnsClientHostname", input_param); + + /// + /// Set the Dynamic DNS Hostname (Async mode). You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcTest ChangeDDnsClientHostname(VpnRpcTest input_param) => ChangeDDnsClientHostnameAsync(input_param).Result; + + /// + /// Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server (Async mode). You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task RegenerateServerCertAsync(VpnRpcTest input_param) => await CallAsync("RegenerateServerCert", input_param); + + /// + /// Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server (Async mode). You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcTest RegenerateServerCert(VpnRpcTest input_param) => RegenerateServerCertAsync(input_param).Result; + + /// + /// Generate a Sample Setting File for OpenVPN Client (Async mode). Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task MakeOpenVpnConfigFileAsync() => await CallAsync("MakeOpenVpnConfigFile", new VpnRpcReadLogFile()); + + /// + /// Generate a Sample Setting File for OpenVPN Client (Async mode). Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcReadLogFile MakeOpenVpnConfigFile() => MakeOpenVpnConfigFileAsync().Result; + + /// + /// Enable / Disable the VPN over ICMP / VPN over DNS Server Function (Async mode). You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task SetSpecialListenerAsync(VpnRpcSpecialListener input_param) => await CallAsync("SetSpecialListener", input_param); + + /// + /// Enable / Disable the VPN over ICMP / VPN over DNS Server Function (Async mode). You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcSpecialListener SetSpecialListener(VpnRpcSpecialListener input_param) => SetSpecialListenerAsync(input_param).Result; + + /// + /// Get Current Setting of the VPN over ICMP / VPN over DNS Function (Async mode). Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task GetSpecialListenerAsync() => await CallAsync("GetSpecialListener", new VpnRpcSpecialListener()); + + /// + /// Get Current Setting of the VPN over ICMP / VPN over DNS Function (Async mode). Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcSpecialListener GetSpecialListener() => GetSpecialListenerAsync().Result; + + /// + /// Show the current status of VPN Azure function (Async mode). Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetAzureStatusAsync() => await CallAsync("GetAzureStatus", new VpnRpcAzureStatus()); + + /// + /// Show the current status of VPN Azure function (Async mode). Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAzureStatus GetAzureStatus() => GetAzureStatusAsync().Result; + + /// + /// Enable / Disable VPN Azure Function (Async mode). Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetAzureStatusAsync(VpnRpcAzureStatus input_param) => await CallAsync("SetAzureStatus", input_param); + + /// + /// Enable / Disable VPN Azure Function (Async mode). Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAzureStatus SetAzureStatus(VpnRpcAzureStatus input_param) => SetAzureStatusAsync(input_param).Result; + + /// + /// Get the Proxy Settings for Connecting to the DDNS server (Async mode). + /// + public async Task GetDDnsInternetSettngAsync() => await CallAsync("GetDDnsInternetSettng", new VpnInternetSetting()); + + /// + /// Get the Proxy Settings for Connecting to the DDNS server (Async mode). + /// + public VpnInternetSetting GetDDnsInternetSettng() => GetDDnsInternetSettngAsync().Result; + + /// + /// Set the Proxy Settings for Connecting to the DDNS server (Async mode). + /// + public async Task SetDDnsInternetSettngAsync(VpnInternetSetting input_param) => await CallAsync("SetDDnsInternetSettng", input_param); + + /// + /// Set the Proxy Settings for Connecting to the DDNS server (Sync mode). + /// + public VpnInternetSetting SetDDnsInternetSettng(VpnInternetSetting input_param) => SetDDnsInternetSettngAsync(input_param).Result; + + /// + /// Set the VPN Gate Server Configuration (Async mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public async Task SetVgsConfigAsync(VpnVgsConfig input_param) => await CallAsync("SetVgsConfig", input_param); + + /// + /// Set the VPN Gate Server Configuration (Sync mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public VpnVgsConfig SetVgsConfig(VpnVgsConfig input_param) => SetVgsConfigAsync(input_param).Result; + + /// + /// Get the VPN Gate Server Configuration (Async mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public async Task GetVgsConfigAsync() => await CallAsync("GetVgsConfig", new VpnVgsConfig()); + + /// + /// Get the VPN Gate Server Configuration (Sync mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public VpnVgsConfig GetVgsConfig() => GetVgsConfigAsync().Result; + + + } +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/VPNServerRpcTypes.cs b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/VPNServerRpcTypes.cs new file mode 100644 index 00000000..27f224cf --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/VPNServerRpcTypes.cs @@ -0,0 +1,5381 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// VPNServerRpcTypes.cs - Data Type Definition for SoftEther VPN Server JSON-RPC Stubs +// +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +using System; +using Newtonsoft.Json; + +namespace SoftEther.VPNServerRpc +{ + /// + /// IP Protocol Numbers + /// + public enum VpnIpProtocolNumber + { + /// + /// ICMP for IPv4 + /// + ICMPv4 = 1, + + /// + /// TCP + /// + TCP = 6, + + /// + /// UDP + /// + UDP = 17, + + /// + /// ICMP for IPv6 + /// + ICMPv6 = 58, + } + + /// + /// The body of the Access list + /// + public class VpnAccess + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Specify a description (note) for this rule + /// + public string Note_utf; + + /// + /// Enabled flag (true: enabled, false: disabled) + /// + public bool Active_bool; + + /// + /// Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. + /// + public uint Priority_u32; + + /// + /// The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. + /// + public bool Discard_bool; + + /// + /// The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. + /// + public bool IsIPv6_bool; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. + /// + public string SrcIpAddress_ip; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. + /// + public string SrcSubnetMask_ip; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. + /// + public string DestIpAddress_ip; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. + /// + public string DestSubnetMask_ip; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. + /// + public byte[] SrcIpAddress6_bin; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. + /// + public byte[] SrcSubnetMask6_bin; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. + /// + public byte[] DestIpAddress6_bin; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. + /// + public byte[] DestSubnetMask6_bin; + + /// + /// The IP protocol number + /// + public VpnIpProtocolNumber Protocol_u32; + + /// + /// The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint SrcPortStart_u32; + + /// + /// The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint SrcPortEnd_u32; + + /// + /// The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint DestPortStart_u32; + + /// + /// The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint DestPortEnd_u32; + + /// + /// Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. + /// + public string SrcUsername_str; + + /// + /// Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. + /// + public string DestUsername_str; + + /// + /// Specify true if you want to check the source MAC address. + /// + public bool CheckSrcMac_bool; + + /// + /// Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] SrcMacAddress_bin; + + /// + /// Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] SrcMacMask_bin; + + /// + /// Specify true if you want to check the destination MAC address. + /// + public bool CheckDstMac_bool; + + /// + /// Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] DstMacAddress_bin; + + /// + /// Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] DstMacMask_bin; + + /// + /// Specify true if you want to check the state of the TCP connection. + /// + public bool CheckTcpState_bool; + + /// + /// Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. + /// + public bool Established_bool; + + /// + /// Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. + /// + public uint Delay_u32; + + /// + /// Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. + /// + public uint Jitter_u32; + + /// + /// Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. + /// + public uint Loss_u32; + + /// + /// The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. + /// + public string RedirectUrl_str; + } + + /// + /// Add an item to Access List + /// + public class VpnRpcAddAccess + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Access list (Must be a single item) + /// + public VpnAccess[] AccessListSingle; + } + + /// + /// Add CA to HUB + /// + public class VpnRpcHubAddCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The body of the X.509 certificate + /// + public byte[] Cert_bin; + } + + /// + /// CRL entry + /// + public class VpnRpcCrl + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// CN, optional + /// + public string CommonName_utf; + + /// + /// O, optional + /// + public string Organization_utf; + + /// + /// OU, optional + /// + public string Unit_utf; + + /// + /// C, optional + /// + public string Country_utf; + + /// + /// ST, optional + /// + public string State_utf; + + /// + /// L, optional + /// + public string Local_utf; + + /// + /// Serial, optional + /// + public byte[] Serial_bin; + + /// + /// MD5 Digest, optional + /// + public byte[] DigestMD5_bin; + + /// + /// SHA1 Digest, optional + /// + public byte[] DigestSHA1_bin; + } + + /// + /// EtherIP key list entry + /// + public class VpnEtherIpId + { + /// + /// Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. + /// + public string Id_str; + + /// + /// Specify the name of the Virtual Hub to connect. + /// + public string HubName_str; + + /// + /// Specify the username to login to the destination Virtual Hub. + /// + public string UserName_str; + + /// + /// Specify the password to login to the destination Virtual Hub. + /// + public string Password_str; + } + + /// + /// Layer-3 virtual interface + /// + public class VpnRpcL3If + { + /// + /// L3 switch name + /// + public string Name_str; + + /// + /// Virtual HUB name + /// + public string HubName_str; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Subnet mask + /// + public string SubnetMask_ip; + } + + /// + /// Layer-3 switch + /// + public class VpnRpcL3Sw + { + /// + /// Layer-3 Switch name + /// + public string Name_str; + } + + /// + /// Routing table + /// + public class VpnRpcL3Table + { + /// + /// L3 switch name + /// + public string Name_str; + + /// + /// Network address + /// + public string NetworkAddress_ip; + + /// + /// Subnet mask + /// + public string SubnetMask_ip; + + /// + /// Gateway address + /// + public string GatewayAddress_ip; + + /// + /// Metric + /// + public uint Metric_u32; + } + + /// + /// Generic parameter to contain u32, u64, ascii_string and unicode string + /// + public class VpnRpcTest + { + /// + /// A 32-bit integer field + /// + public uint IntValue_u32; + + /// + /// A 64-bit integer field + /// + public ulong Int64Value_u64; + + /// + /// An Ascii string field + /// + public string StrValue_str; + + /// + /// An UTF-8 string field + /// + public string UniStrValue_utf; + } + + /// + /// Local Bridge list item + /// + public class VpnRpcLocalBridge + { + /// + /// Physical Ethernet device name + /// + public string DeviceName_str; + + /// + /// The Virtual Hub name + /// + public string HubNameLB_str; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// Running flag + /// + public bool Active_bool; + + /// + /// Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). + /// + public bool TapMode_bool; + } + + /// + /// Create, configure, and get the group + /// + public class VpnRpcSetGroup + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The group name + /// + public string Name_str; + + /// + /// Optional real name (full name) of the group, allow using any Unicode characters + /// + public string Realname_utf; + + /// + /// Optional, specify a description of the group + /// + public string Note_utf; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// The flag whether to use security policy + /// + public bool UsePolicy_bool; + + // ---- Start of Security policy --- + /// + /// Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. + /// + [JsonProperty("policy:Access_bool")] + public bool SecPol_Access_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPFilter_bool")] + public bool SecPol_DHCPFilter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPNoServer_bool")] + public bool SecPol_DHCPNoServer_bool; + + /// + /// Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. + /// + [JsonProperty("policy:DHCPForce_bool")] + public bool SecPol_DHCPForce_bool; + + /// + /// Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. + /// + [JsonProperty("policy:NoBridge_bool")] + public bool SecPol_NoBridge_bool; + + /// + /// Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRouting_bool")] + public bool SecPol_NoRouting_bool; + + /// + /// Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckMac_bool")] + public bool SecPol_CheckMac_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIP_bool")] + public bool SecPol_CheckIP_bool; + + /// + /// Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. + /// + [JsonProperty("policy:ArpDhcpOnly_bool")] + public bool SecPol_ArpDhcpOnly_bool; + + /// + /// Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. + /// + [JsonProperty("policy:PrivacyFilter_bool")] + public bool SecPol_PrivacyFilter_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. + /// + [JsonProperty("policy:NoServer_bool")] + public bool SecPol_NoServer_bool; + + /// + /// Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. + /// + [JsonProperty("policy:NoBroadcastLimiter_bool")] + public bool SecPol_NoBroadcastLimiter_bool; + + /// + /// Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. + /// + [JsonProperty("policy:MonitorPort_bool")] + public bool SecPol_MonitorPort_bool; + + /// + /// Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. + /// + [JsonProperty("policy:MaxConnection_u32")] + public uint SecPol_MaxConnection_u32; + + /// + /// Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. + /// + [JsonProperty("policy:TimeOut_u32")] + public uint SecPol_TimeOut_u32; + + /// + /// Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. + /// + [JsonProperty("policy:MaxMac_u32")] + public uint SecPol_MaxMac_u32; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIP_u32")] + public uint SecPol_MaxIP_u32; + + /// + /// Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. + /// + [JsonProperty("policy:MaxUpload_u32")] + public uint SecPol_MaxUpload_u32; + + /// + /// Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. + /// + [JsonProperty("policy:MaxDownload_u32")] + public uint SecPol_MaxDownload_u32; + + /// + /// Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. + /// + [JsonProperty("policy:FixPassword_bool")] + public bool SecPol_FixPassword_bool; + + /// + /// Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. + /// + [JsonProperty("policy:MultiLogins_u32")] + public uint SecPol_MultiLogins_u32; + + /// + /// Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. + /// + [JsonProperty("policy:NoQoS_bool")] + public bool SecPol_NoQoS_bool; + + /// + /// Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. + /// + [JsonProperty("policy:RSandRAFilter_bool")] + public bool SecPol_RSandRAFilter_bool; + + /// + /// Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. + /// + [JsonProperty("policy:RAFilter_bool")] + public bool SecPol_RAFilter_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPv6Filter_bool")] + public bool SecPol_DHCPv6Filter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPv6NoServer_bool")] + public bool SecPol_DHCPv6NoServer_bool; + + /// + /// Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRoutingV6_bool")] + public bool SecPol_NoRoutingV6_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIPv6_bool")] + public bool SecPol_CheckIPv6_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. + /// + [JsonProperty("policy:NoServerV6_bool")] + public bool SecPol_NoServerV6_bool; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIPv6_u32")] + public uint SecPol_MaxIPv6_u32; + + /// + /// Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:NoSavePassword_bool")] + public bool SecPol_NoSavePassword_bool; + + /// + /// Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:AutoDisconnect_u32")] + public uint SecPol_AutoDisconnect_u32; + + /// + /// Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv4_bool")] + public bool SecPol_FilterIPv4_bool; + + /// + /// Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv6_bool")] + public bool SecPol_FilterIPv6_bool; + + /// + /// Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. + /// + [JsonProperty("policy:FilterNonIP_bool")] + public bool SecPol_FilterNonIP_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRA_bool")] + public bool SecPol_NoIPv6DefaultRouterInRA_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRAWhenIPv6_bool")] + public bool SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool; + + /// + /// Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + /// + [JsonProperty("policy:VLanId_u32")] + public uint SecPol_VLanId_u32; + + /// + /// Security policy: Whether version 3.0 (must be true) + /// + [JsonProperty("policy:Ver3_bool")] + public bool SecPol_Ver3_bool = true; + // ---- End of Security policy --- + } + + /// + /// Hub types + /// + public enum VpnRpcHubType + { + /// + /// Stand-alone HUB + /// + Standalone = 0, + + /// + /// Static HUB + /// + FarmStatic = 1, + + /// + /// Dynamic HUB + /// + FarmDynamic = 2, + } + + /// + /// Create a HUB + /// + public class VpnRpcCreateHub + { + /// + /// Specify the name of the Virtual Hub to create / update. + /// + public string HubName_str; + + /// + /// Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. + /// + public string AdminPasswordPlainText_str; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// Maximum number of VPN sessions + /// + public uint MaxSession_u32; + + /// + /// No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. + /// + public bool NoEnum_bool; + + /// + /// Type of the Virtual Hub (Valid only for Clustered VPN Servers) + /// + public VpnRpcHubType HubType_u32; + } + + public enum VpnRpcClientAuthType + { + /// + /// Anonymous authentication + /// + Anonymous = 0, + + /// + /// SHA-0 hashed password authentication + /// + SHA0_Hashed_Password = 1, + + /// + /// Plain password authentication + /// + PlainPassword = 2, + + /// + /// Certificate authentication + /// + Cert = 3, + } + + /// + /// Create and set of link + /// + public class VpnRpcCreateLink + { + /// + /// The Virtual Hub name + /// + public string HubName_Ex_str; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// The flag to enable validation for the server certificate + /// + public bool CheckServerCert_bool; + + /// + /// The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. + /// + public byte[] ServerCert_bin; + + // ---- Start of Client Option Parameters --- + /// + /// Client Option Parameters: Specify the name of the Cascade Connection + /// + [JsonProperty("AccountName_utf")] + public string ClientOption_AccountName_utf; + + /// + /// Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. + /// + [JsonProperty("Hostname_str")] + public string ClientOption_Hostname_str; + + /// + /// Client Option Parameters: Specify the port number of the destination VPN Server. + /// + [JsonProperty("Port_u32")] + public uint ClientOption_Port_u32; + + /// + /// Client Option Parameters: The type of the proxy server + /// + [JsonProperty("ProxyType_u32")] + public VpnRpcProxyType ClientOption_ProxyType_u32; + + /// + /// Client Option Parameters: The hostname or IP address of the proxy server name + /// + [JsonProperty("ProxyName_str")] + public string ClientOption_ProxyName_str; + + /// + /// Client Option Parameters: The port number of the proxy server + /// + [JsonProperty("ProxyPort_u32")] + public uint ClientOption_ProxyPort_u32; + + /// + /// Client Option Parameters: The username to connect to the proxy server + /// + [JsonProperty("ProxyUsername_str")] + public string ClientOption_ProxyUsername_str; + + /// + /// Client Option Parameters: The password to connect to the proxy server + /// + [JsonProperty("ProxyPassword_str")] + public string ClientOption_ProxyPassword_str; + + /// + /// Client Option Parameters: The Virtual Hub on the destination VPN Server + /// + [JsonProperty("HubName_str")] + public string ClientOption_HubName_str; + + /// + /// Client Option Parameters: Number of TCP Connections to Use in VPN Communication + /// + [JsonProperty("MaxConnection_u32")] + public uint ClientOption_MaxConnection_u32; + + /// + /// Client Option Parameters: The flag to enable the encryption on the communication + /// + [JsonProperty("UseEncrypt_bool")] + public bool ClientOption_UseEncrypt_bool; + + /// + /// Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection + /// + [JsonProperty("UseCompress_bool")] + public bool ClientOption_UseCompress_bool; + + /// + /// Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. + /// + [JsonProperty("HalfConnection_bool")] + public bool ClientOption_HalfConnection_bool; + + /// + /// Client Option Parameters: Connection attempt interval when additional connection will be established + /// + [JsonProperty("AdditionalConnectionInterval_u32")] + public uint ClientOption_AdditionalConnectionInterval_u32; + + /// + /// Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) + /// + [JsonProperty("ConnectionDisconnectSpan_u32")] + public uint ClientOption_ConnectionDisconnectSpan_u32; + + /// + /// Client Option Parameters: Disable QoS Control Function if the value is true + /// + [JsonProperty("DisableQoS_bool")] + public bool ClientOption_DisableQoS_bool; + + /// + /// Client Option Parameters: Do not use TLS 1.x of the value is true + /// + [JsonProperty("NoTls1_bool")] + public bool ClientOption_NoTls1_bool; + + /// + /// Client Option Parameters: Do not use UDP acceleration mode if the value is true + /// + [JsonProperty("NoUdpAcceleration_bool")] + public bool ClientOption_NoUdpAcceleration_bool; + // ---- End of Client Option --- + + // ---- Start of Client Auth Parameters --- + /// + /// Authentication type + /// + [JsonProperty("AuthType_u32")] + public VpnRpcClientAuthType ClientAuth_AuthType_u32; + + /// + /// User name + /// + [JsonProperty("Username_str")] + public string ClientAuth_Username_str; + + /// + /// SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). + /// + [JsonProperty("HashedPassword_bin")] + public byte[] ClientAuth_HashedPassword_bin; + + /// + /// Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). + /// + [JsonProperty("PlainPassword_str")] + public string ClientAuth_PlainPassword_str; + + /// + /// Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). + /// + [JsonProperty("ClientX_bin")] + public byte[] ClientAuth_ClientX_bin; + + /// + /// Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). + /// + [JsonProperty("ClientK_bin")] + public byte[] ClientAuth_ClientK_bin; + + /// + /// Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPFilter_bool")] + public bool SecPol_DHCPFilter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPNoServer_bool")] + public bool SecPol_DHCPNoServer_bool; + + /// + /// Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. + /// + [JsonProperty("policy:DHCPForce_bool")] + public bool SecPol_DHCPForce_bool; + + /// + /// Security policy: Prohibit the duplicate MAC address + /// + /// Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + public bool SecPol_CheckMac_bool; + + /// + /// Security policy: Prohibit a duplicate IP address (IPv4) + /// + /// Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + public bool SecPol_CheckIP_bool; + + /// + /// Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. + /// + [JsonProperty("policy:ArpDhcpOnly_bool")] + public bool SecPol_ArpDhcpOnly_bool; + + /// + /// Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. + /// + [JsonProperty("policy:PrivacyFilter_bool")] + public bool SecPol_PrivacyFilter_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. + /// + [JsonProperty("policy:NoServer_bool")] + public bool SecPol_NoServer_bool; + + /// + /// Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. + /// + [JsonProperty("policy:NoBroadcastLimiter_bool")] + public bool SecPol_NoBroadcastLimiter_bool; + + /// + /// Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. + /// + [JsonProperty("policy:MaxMac_u32")] + public uint SecPol_MaxMac_u32; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIP_u32")] + public uint SecPol_MaxIP_u32; + + /// + /// Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. + /// + [JsonProperty("policy:MaxUpload_u32")] + public uint SecPol_MaxUpload_u32; + + /// + /// Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. + /// + [JsonProperty("policy:MaxDownload_u32")] + public uint SecPol_MaxDownload_u32; + + /// + /// Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. + /// + [JsonProperty("policy:RSandRAFilter_bool")] + public bool SecPol_RSandRAFilter_bool; + + /// + /// Security policy: Filter the router advertisement packet (IPv6) + /// + /// Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. + public bool SecPol_RAFilter_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPv6Filter_bool")] + public bool SecPol_DHCPv6Filter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPv6NoServer_bool")] + public bool SecPol_DHCPv6NoServer_bool; + + /// + /// Security policy: Prohibit the duplicate IP address (IPv6) + /// + /// Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + public bool SecPol_CheckIPv6_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. + /// + [JsonProperty("policy:NoServerV6_bool")] + public bool SecPol_NoServerV6_bool; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIPv6_u32")] + public uint SecPol_MaxIPv6_u32; + + /// + /// Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv4_bool")] + public bool SecPol_FilterIPv4_bool; + + /// + /// Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv6_bool")] + public bool SecPol_FilterIPv6_bool; + + /// + /// Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. + /// + [JsonProperty("policy:FilterNonIP_bool")] + public bool SecPol_FilterNonIP_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRA_bool")] + public bool SecPol_NoIPv6DefaultRouterInRA_bool; + + /// + /// Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + /// + [JsonProperty("policy:VLanId_u32")] + public uint SecPol_VLanId_u32; + + /// + /// Security policy: Whether version 3.0 (must be true) + /// + [JsonProperty("policy:Ver3_bool")] + public bool SecPol_Ver3_bool = true; + // ---- End of Security policy --- + } + + /// + /// Listener + /// + public class VpnRpcListener + { + /// + /// Port number (Range: 1 - 65535) + /// + public uint Port_u32; + + /// + /// Active state + /// + public bool Enable_bool; + } + + /// + /// User authentication type (server side) + /// + public enum VpnRpcUserAuthType + { + /// + /// Anonymous authentication + /// + Anonymous = 0, + + /// + /// Password authentication + /// + Password = 1, + + /// + /// User certificate authentication + /// + UserCert = 2, + + /// + /// Root certificate which is issued by trusted Certificate Authority + /// + RootCert = 3, + + /// + /// Radius authentication + /// + Radius = 4, + + /// + /// Windows NT authentication + /// + NTDomain = 5, + } + + /// + /// Create, configure, and get the user + /// + public class VpnRpcSetUser + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Specify the user name of the user + /// + public string Name_str; + + /// + /// Assigned group name for the user + /// + public string GroupName_str; + + /// + /// Optional real name (full name) of the user, allow using any Unicode characters + /// + public string Realname_utf; + + /// + /// Optional User Description + /// + public string Note_utf; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Last modified date and time + /// + public DateTime UpdatedTime_dt; + + /// + /// Expiration date and time + /// + public DateTime ExpireTime_dt; + + /// + /// Authentication method of the user + /// + public VpnRpcUserAuthType AuthType_u32; + + /// + /// User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. + /// + public string Auth_Password_str; + + /// + /// User certificate, valid only if AuthType_u32 == UserCert(2). + /// + [JsonProperty("UserX_bin")] + public byte[] Auth_UserCert_CertData; + + /// + /// Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). + /// + [JsonProperty("Serial_bin")] + public byte[] Auth_RootCert_Serial; + + /// + /// Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). + /// + [JsonProperty("CommonName_utf")] + public string Auth_RootCert_CommonName; + + /// + /// Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). + /// + [JsonProperty("RadiusUsername_utf")] + public string Auth_Radius_RadiusUsername; + + /// + /// Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). + /// + [JsonProperty("NtUsername_utf")] + public string Auth_NT_NTUsername; + + /// + /// Number of total logins of the user + /// + public uint NumLogin_u32; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// The flag whether to use security policy + /// + public bool UsePolicy_bool; + + // ---- Start of Security policy --- + /// + /// Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. + /// + [JsonProperty("policy:Access_bool")] + public bool SecPol_Access_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPFilter_bool")] + public bool SecPol_DHCPFilter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPNoServer_bool")] + public bool SecPol_DHCPNoServer_bool; + + /// + /// Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. + /// + [JsonProperty("policy:DHCPForce_bool")] + public bool SecPol_DHCPForce_bool; + + /// + /// Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. + /// + [JsonProperty("policy:NoBridge_bool")] + public bool SecPol_NoBridge_bool; + + /// + /// Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRouting_bool")] + public bool SecPol_NoRouting_bool; + + /// + /// Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckMac_bool")] + public bool SecPol_CheckMac_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIP_bool")] + public bool SecPol_CheckIP_bool; + + /// + /// Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. + /// + [JsonProperty("policy:ArpDhcpOnly_bool")] + public bool SecPol_ArpDhcpOnly_bool; + + /// + /// Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. + /// + [JsonProperty("policy:PrivacyFilter_bool")] + public bool SecPol_PrivacyFilter_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. + /// + [JsonProperty("policy:NoServer_bool")] + public bool SecPol_NoServer_bool; + + /// + /// Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. + /// + [JsonProperty("policy:NoBroadcastLimiter_bool")] + public bool SecPol_NoBroadcastLimiter_bool; + + /// + /// Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. + /// + [JsonProperty("policy:MonitorPort_bool")] + public bool SecPol_MonitorPort_bool; + + /// + /// Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. + /// + [JsonProperty("policy:MaxConnection_u32")] + public uint SecPol_MaxConnection_u32; + + /// + /// Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. + /// + [JsonProperty("policy:TimeOut_u32")] + public uint SecPol_TimeOut_u32; + + /// + /// Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. + /// + [JsonProperty("policy:MaxMac_u32")] + public uint SecPol_MaxMac_u32; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIP_u32")] + public uint SecPol_MaxIP_u32; + + /// + /// Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. + /// + [JsonProperty("policy:MaxUpload_u32")] + public uint SecPol_MaxUpload_u32; + + /// + /// Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. + /// + [JsonProperty("policy:MaxDownload_u32")] + public uint SecPol_MaxDownload_u32; + + /// + /// Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. + /// + [JsonProperty("policy:FixPassword_bool")] + public bool SecPol_FixPassword_bool; + + /// + /// Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. + /// + [JsonProperty("policy:MultiLogins_u32")] + public uint SecPol_MultiLogins_u32; + + /// + /// Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. + /// + [JsonProperty("policy:NoQoS_bool")] + public bool SecPol_NoQoS_bool; + + /// + /// Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. + /// + [JsonProperty("policy:RSandRAFilter_bool")] + public bool SecPol_RSandRAFilter_bool; + + /// + /// Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. + /// + [JsonProperty("policy:RAFilter_bool")] + public bool SecPol_RAFilter_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPv6Filter_bool")] + public bool SecPol_DHCPv6Filter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPv6NoServer_bool")] + public bool SecPol_DHCPv6NoServer_bool; + + /// + /// Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRoutingV6_bool")] + public bool SecPol_NoRoutingV6_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIPv6_bool")] + public bool SecPol_CheckIPv6_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. + /// + [JsonProperty("policy:NoServerV6_bool")] + public bool SecPol_NoServerV6_bool; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIPv6_u32")] + public uint SecPol_MaxIPv6_u32; + + /// + /// Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:NoSavePassword_bool")] + public bool SecPol_NoSavePassword_bool; + + /// + /// Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:AutoDisconnect_u32")] + public uint SecPol_AutoDisconnect_u32; + + /// + /// Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv4_bool")] + public bool SecPol_FilterIPv4_bool; + + /// + /// Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv6_bool")] + public bool SecPol_FilterIPv6_bool; + + /// + /// Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. + /// + [JsonProperty("policy:FilterNonIP_bool")] + public bool SecPol_FilterNonIP_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRA_bool")] + public bool SecPol_NoIPv6DefaultRouterInRA_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRAWhenIPv6_bool")] + public bool SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool; + + /// + /// Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + /// + [JsonProperty("policy:VLanId_u32")] + public uint SecPol_VLanId_u32; + + /// + /// Security policy: Whether version 3.0 (must be true) + /// + [JsonProperty("policy:Ver3_bool")] + public bool SecPol_Ver3_bool = true; + // ---- End of Security policy --- + } + + /// + /// Delete the access list + /// + public class VpnRpcDeleteAccess + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// ID + /// + public uint Id_u32; + } + + /// + /// Delete the CA of HUB + /// + public class VpnRpcHubDeleteCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Certificate key id to be deleted + /// + public uint Key_u32; + } + + /// + /// Deleting a user or group + /// + public class VpnRpcDeleteUser + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// User or group name + /// + public string Name_str; + } + + /// + /// Delete the HUB + /// + public class VpnRpcDeleteHub + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + } + + /// + /// Delete the table + /// + public class VpnRpcDeleteTable + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Key ID + /// + public uint Key_u32; + } + + /// + /// Specify the Link + /// + public class VpnRpcLink + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The name of the cascade connection + /// + public string AccountName_utf; + } + + /// + /// Disconnect the session + /// + public class VpnRpcDeleteSession + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Session name + /// + public string Name_str; + } + + /// + /// Specify the HUB + /// + public class VpnRpcHub + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + } + + /// + /// Disconnect a connection + /// + public class VpnRpcDisconnectConnection + { + /// + /// Connection name + /// + public string Name_str; + } + + /// + /// Enumeration of the access list + /// + public class VpnRpcEnumAccessList + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Access list + /// + public VpnAccess[] AccessList; + } + + /// + /// CA enumeration items of HUB + /// + public class VpnRpcHubEnumCAItem + { + /// + /// The key id of the item + /// + public uint Key_u32; + + /// + /// Subject + /// + public string SubjectName_utf; + + /// + /// Issuer + /// + public string IssuerName_utf; + + /// + /// Expiration date + /// + public DateTime Expires_dt; + } + + /// + /// CA enumeration of HUB + /// + public class VpnRpcHubEnumCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The list of CA + /// + public VpnRpcHubEnumCAItem[] CAList; + } + + /// + /// Type of connection + /// + public enum VpnRpcConnectionType + { + /// + /// VPN Client + /// + Client = 0, + + /// + /// During initialization + /// + Init = 1, + + /// + /// Login connection + /// + Login = 2, + + /// + /// Additional connection + /// + Additional = 3, + + /// + /// RPC for server farm + /// + FarmRpc = 4, + + /// + /// RPC for Management + /// + AdminRpc = 5, + + /// + /// HUB enumeration + /// + EnumHub = 6, + + /// + /// Password change + /// + Password = 7, + + /// + /// SSTP + /// + SSTP = 8, + + /// + /// OpenVPN + /// + OpenVPN = 9, + } + + /// + /// Connection enumeration items + /// + public class VpnRpcEnumConnectionItem + { + /// + /// Connection name + /// + public string Name_str; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Port number + /// + public uint Port_u32; + + /// + /// Connected time + /// + public DateTime ConnectedTime_dt; + + /// + /// Connection type + /// + public VpnRpcConnectionType Type_u32; + } + + /// + /// Connection enumeration + /// + public class VpnRpcEnumConnection + { + /// + /// Number of connections + /// + public uint NumConnection_u32; + + /// + /// Connection list + /// + public VpnRpcEnumConnectionItem[] ConnectionList; + } + + /// + /// Enum CRL Item + /// + public class VpnRpcEnumCrlItem + { + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// The contents of the CRL item + /// + public string CrlInfo_utf; + } + + /// + /// Enum CRL + /// + public class VpnRpcEnumCrl + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// CRL list + /// + public VpnRpcEnumCrlItem[] CRLList; + } + + /// + /// RPC_ENUM_DHCP_ITEM + /// + public class VpnRpcEnumDhcpItem + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Lease time + /// + public DateTime LeasedTime_dt; + + /// + /// Expiration date + /// + public DateTime ExpireTime_dt; + + /// + /// MAC address + /// + public byte[] MacAddress_bin; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Subnet mask + /// + public uint Mask_u32; + + /// + /// Host name + /// + public string Hostname_str; + } + + /// + /// RPC_ENUM_DHCP + /// + public class VpnRpcEnumDhcp + { + /// + /// Virtual Hub Name + /// + public string HubName_str; + + /// + /// DHCP Item + /// + public VpnRpcEnumDhcpItem[] DhcpTable; + } + + /// + /// EtherIP setting list + /// + public class VpnRpcEnumEtherIpId + { + /// + /// Setting list + /// + public VpnEtherIpId[] Settings; + } + + /// + /// Ethernet Network Adapters list item + /// + public class VpnRpcEnumEthItem + { + /// + /// Device name + /// + public string DeviceName_str; + + /// + /// Network connection name (description) + /// + public string NetworkConnectionName_utf; + } + + /// + /// Ethernet Network Adapters list + /// + public class VpnRpcEnumEth + { + /// + /// Ethernet Network Adapters list + /// + public VpnRpcEnumEthItem[] EthList; + } + + /// + /// Server farm members enumeration items + /// + public class VpnRpcEnumFarmItem + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Controller + /// + public bool Controller_bool; + + /// + /// Connection time + /// + public DateTime ConnectedTime_dt; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// Point + /// + public uint Point_u32; + + /// + /// Number of sessions + /// + public uint NumSessions_u32; + + /// + /// Number of TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of HUBs + /// + public uint NumHubs_u32; + + /// + /// Number of assigned client licenses + /// + public uint AssignedClientLicense_u32; + + /// + /// Number of assigned bridge licenses + /// + public uint AssignedBridgeLicense_u32; + } + + /// + /// Server farm member enumeration + /// + public class VpnRpcEnumFarm + { + /// + /// Number of Cluster Members + /// + public uint NumFarm_u32; + + /// + /// Cluster Members list + /// + public VpnRpcEnumFarmItem[] FarmMemberList; + } + + /// + /// Enumeration items in the group + /// + public class VpnRpcEnumGroupItem + { + /// + /// User name + /// + public string Name_str; + + /// + /// Real name + /// + public string Realname_utf; + + /// + /// Note + /// + public string Note_utf; + + /// + /// Number of users + /// + public uint NumUsers_u32; + + /// + /// Access denied + /// + public bool DenyAccess_bool; + } + + /// + /// Group enumeration + /// + public class VpnRpcEnumGroup + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Group list + /// + public VpnRpcEnumGroupItem[] GroupList; + } + + /// + /// Enumeration items of HUB + /// + public class VpnRpcEnumHubItem + { + /// + /// The name of the Virtual Hub + /// + public string HubName_str; + + /// + /// Online state + /// + public bool Online_bool; + + /// + /// Type of HUB (Valid only for Clustered VPN Servers) + /// + public VpnRpcHubType HubType_u32; + + /// + /// Number of users + /// + public uint NumUsers_u32; + + /// + /// Number of registered groups + /// + public uint NumGroups_u32; + + /// + /// Number of registered sessions + /// + public uint NumSessions_u32; + + /// + /// Number of current MAC table entries + /// + public uint NumMacTables_u32; + + /// + /// Number of current IP table entries + /// + public uint NumIpTables_u32; + + /// + /// Last communication date and time + /// + public DateTime LastCommTime_dt; + + /// + /// Last login date and time + /// + public DateTime LastLoginTime_dt; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Number of accumulated logins + /// + public uint NumLogin_u32; + + /// + /// Whether the traffic information is provided + /// + public bool IsTrafficFilled_bool; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Ex.Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Ex.Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Ex.Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Ex.Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + } + + /// + /// Enumeration of HUB + /// + public class VpnRpcEnumHub + { + /// + /// Number of Virtual Hubs + /// + public uint NumHub_u32; + + /// + /// Virtual Hubs + /// + public VpnRpcEnumHubItem[] HubList; + } + + /// + /// Enumeration items of IP table + /// + public class VpnRpcEnumIpTableItem + { + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// Session name + /// + public string SessionName_str; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Assigned by the DHCP + /// + public bool DhcpAllocated_bool; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Updating date + /// + public DateTime UpdatedTime_dt; + + /// + /// Remote items + /// + public bool RemoteItem_bool; + + /// + /// Remote host name + /// + public string RemoteHostname_str; + } + + /// + /// Enumeration of IP table + /// + public class VpnRpcEnumIpTable + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// MAC table + /// + public VpnRpcEnumIpTableItem[] IpTable; + } + + /// + /// Layer-3 interface enumeration + /// + public class VpnRpcEnumL3If + { + /// + /// Layer-3 switch name + /// + public string Name_str; + + /// + /// Layer-3 interface list + /// + public VpnRpcL3If[] L3IFList; + } + + /// + /// Layer-3 switch enumeration item + /// + public class VpnRpcEnumL3SwItem + { + /// + /// Name of the layer-3 switch + /// + public string Name_str; + + /// + /// Number of layer-3 switch virtual interfaces + /// + public uint NumInterfaces_u32; + + /// + /// Number of routing tables + /// + public uint NumTables_u32; + + /// + /// Activated flag + /// + public bool Active_bool; + + /// + /// Online flag + /// + public bool Online_bool; + } + + /// + /// Layer-3 switch enumeration + /// + public class VpnRpcEnumL3Sw + { + /// + /// Layer-3 switch list + /// + public VpnRpcEnumL3SwItem[] L3SWList; + } + + /// + /// Routing table enumeration + /// + public class VpnRpcEnumL3Table + { + /// + /// L3 switch name + /// + public string Name_str; + + /// + /// Routing table item list + /// + public VpnRpcL3Table[] L3Table; + } + + /// + /// Cascade Connection Enumeration + /// + public class VpnRpcEnumLinkItem + { + /// + /// The name of cascade connection + /// + public string AccountName_utf; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// The flag indicates whether the cascade connection is established + /// + public bool Connected_bool; + + /// + /// The error last occurred if the cascade connection is in the fail state + /// + public uint LastError_u32; + + /// + /// Connection completion time + /// + public DateTime ConnectedTime_dt; + + /// + /// Host name of the destination VPN server + /// + public string Hostname_str; + + /// + /// The Virtual Hub name + /// + public string TargetHubName_str; + } + + /// + /// Enumeration of the link + /// + public class VpnRpcEnumLink + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Number of cascade connections + /// + public uint NumLink_u32; + + /// + /// The list of cascade connections + /// + public VpnRpcEnumLinkItem[] LinkList; + } + + /// + /// List of listeners item + /// + public class VpnRpcListenerListItem + { + /// + /// TCP port number (range: 1 - 65535) + /// + public uint Ports_u32; + + /// + /// Active state + /// + public bool Enables_bool; + + /// + /// The flag to indicate if the error occurred on the listener port + /// + public bool Errors_bool; + } + + /// + /// List of listeners + /// + public class VpnRpcListenerList + { + /// + /// List of listener items + /// + public VpnRpcListenerListItem[] ListenerList; + } + + /// + /// Local Bridge enumeration + /// + public class VpnRpcEnumLocalBridge + { + /// + /// Local Bridge list + /// + public VpnRpcLocalBridge[] LocalBridgeList; + } + + /// + /// Log file enumeration + /// + public class VpnRpcEnumLogFileItem + { + /// + /// Server name + /// + public string ServerName_str; + + /// + /// File path + /// + public string FilePath_str; + + /// + /// File size + /// + public uint FileSize_u32; + + /// + /// Last write date + /// + public DateTime UpdatedTime_dt; + } + + /// + /// Log file enumeration + /// + public class VpnRpcEnumLogFile + { + /// + /// Log file list + /// + public VpnRpcEnumLogFileItem[] LogFiles; + } + + /// + /// Enumeration items of the MAC table + /// + public class VpnRpcEnumMacTableItem + { + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// Session name + /// + public string SessionName_str; + + /// + /// MAC address + /// + public byte[] MacAddress_bin; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Updating date + /// + public DateTime UpdatedTime_dt; + + /// + /// Remote items + /// + public bool RemoteItem_bool; + + /// + /// Remote host name + /// + public string RemoteHostname_str; + + /// + /// VLAN ID + /// + public uint VlanId_u32; + } + + /// + /// Enumeration of the MAC table + /// + public class VpnRpcEnumMacTable + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// MAC table + /// + public VpnRpcEnumMacTableItem[] MacTable; + } + + /// + /// NAT Entry Protocol Number + /// + public enum VpnRpcNatProtocol + { + /// + /// TCP + /// + TCP = 0, + + /// + /// UDP + /// + UDP = 1, + + /// + /// DNS + /// + DNS = 2, + + /// + /// ICMP + /// + ICMP = 3, + } + + /// + /// State of NAT session (TCP) + /// + public enum VpnRpcNatTcpState + { + /// + /// Connecting + /// + Connecting = 0, + + /// + /// Send the RST (Connection failure or disconnected) + /// + SendReset = 1, + + /// + /// Connection complete + /// + Connected = 2, + + /// + /// Connection established + /// + Established = 3, + + /// + /// Wait for socket disconnection + /// + WaitDisconnect = 4, + } + + /// + /// VpnRpcEnumNat List Item + /// + public class VpnRpcEnumNatItem + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Protocol + /// + public VpnRpcNatProtocol Protocol_u32; + + /// + /// Source IP address + /// + public string SrcIp_ip; + + /// + /// Source host name + /// + public string SrcHost_str; + + /// + /// Source port number + /// + public uint SrcPort_u32; + + /// + /// Destination IP address + /// + public string DestIp_ip; + + /// + /// Destination host name + /// + public string DestHost_str; + + /// + /// Destination port number + /// + public uint DestPort_u32; + + /// + /// Connection time + /// + public DateTime CreatedTime_dt; + + /// + /// Last communication time + /// + public DateTime LastCommTime_dt; + + /// + /// Transmission size + /// + public ulong SendSize_u64; + + /// + /// Receive size + /// + public ulong RecvSize_u64; + + /// + /// TCP state + /// + public VpnRpcNatTcpState TcpStatus_u32; + } + + /// + /// RPC_ENUM_NAT + /// + public class VpnRpcEnumNat + { + /// + /// Virtual Hub Name + /// + public string HubName_str; + + /// + /// NAT item + /// + public VpnRpcEnumNatItem[] NatTable; + } + + /// + /// Enumeration item of VPN session + /// + public class VpnRpcEnumSessionItem + { + /// + /// Session name + /// + public string Name_str; + + /// + /// Remote session + /// + public bool RemoteSession_bool; + + /// + /// Remote server name + /// + public string RemoteHostname_str; + + /// + /// User name + /// + public string Username_str; + + /// + /// IP address + /// + public string ClientIP_ip; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// Maximum number of underlying TCP connections + /// + public uint MaxNumTcp_u32; + + /// + /// Number of current underlying TCP connections + /// + public uint CurrentNumTcp_u32; + + /// + /// Packet size transmitted + /// + public ulong PacketSize_u64; + + /// + /// Number of packets transmitted + /// + public ulong PacketNum_u64; + + /// + /// Is a Cascade VPN session + /// + public bool LinkMode_bool; + + /// + /// Is a SecureNAT VPN session + /// + public bool SecureNATMode_bool; + + /// + /// Is the VPN session for Local Bridge + /// + public bool BridgeMode_bool; + + /// + /// Is a Layer-3 Switch VPN session + /// + public bool Layer3Mode_bool; + + /// + /// Is in Bridge Mode + /// + public bool Client_BridgeMode_bool; + + /// + /// Is in Monitor Mode + /// + public bool Client_MonitorMode_bool; + + /// + /// VLAN ID + /// + public uint VLanId_u32; + + /// + /// Unique ID of the VPN Session + /// + public byte[] UniqueId_bin; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Last communication date and time + /// + public DateTime LastCommTime_dt; + } + + /// + /// Enumerate VPN sessions + /// + public class VpnRpcEnumSession + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// VPN sessions list + /// + public VpnRpcEnumSessionItem[] SessionList; + } + + /// + /// Enumeration item of user + /// + public class VpnRpcEnumUserItem + { + /// + /// User name + /// + public string Name_str; + + /// + /// Group name + /// + public string GroupName_str; + + /// + /// Real name + /// + public string Realname_utf; + + /// + /// Note + /// + public string Note_utf; + + /// + /// Authentication method + /// + public VpnRpcUserAuthType AuthType_u32; + + /// + /// Number of logins + /// + public uint NumLogin_u32; + + /// + /// Last login date and time + /// + public DateTime LastLoginTime_dt; + + /// + /// Access denied + /// + public bool DenyAccess_bool; + + /// + /// Flag of whether the traffic variable is set + /// + public bool IsTrafficFilled_bool; + + /// + /// Flag of whether expiration date variable is set + /// + public bool IsExpiresFilled_bool; + + /// + /// Expiration date + /// + public DateTime Expires_dt; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Ex.Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Ex.Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Ex.Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Ex.Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + } + + /// + /// Enumeration of user + /// + public class VpnRpcEnumUser + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// User list + /// + public VpnRpcEnumUserItem[] UserList; + } + + /// + /// Source IP Address Limit List Item + /// + public class VpnAc + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Priority + /// + public uint Priority_u32; + + /// + /// Deny access + /// + public bool Deny_bool; + + /// + /// Set true if you want to specify the SubnetMask_ip item. + /// + public bool Masked_bool; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Subnet mask, valid only if Masked_bool == true + /// + public string SubnetMask_ip; + } + + /// + /// Source IP Address Limit List + /// + public class VpnRpcAcList + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Source IP Address Limit List + /// + public VpnAc[] ACList; + } + + /// + /// Message + /// + public class VpnRpcMsg + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Message (Unicode strings acceptable) + /// + public byte[] Msg_bin; + } + + /// + /// Get / Set the Azure state + /// + public class VpnRpcAzureStatus + { + /// + /// Whether VPN Azure Function is Enabled + /// + public bool IsEnabled_bool; + + /// + /// Whether connection to VPN Azure Cloud Server is established + /// + public bool IsConnected_bool; + } + + /// + /// Local Bridge support information + /// + public class VpnRpcBridgeSupport + { + /// + /// Whether the OS supports the Local Bridge function + /// + public bool IsBridgeSupportedOs_bool; + + /// + /// Whether WinPcap is necessary to install + /// + public bool IsWinPcapNeeded_bool; + } + + /// + /// Get the CA of HUB + /// + public class VpnRpcHubGetCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The key id of the certificate + /// + public uint Key_u32; + + /// + /// The body of the X.509 certificate + /// + public byte[] Cert_bin; + } + + /// + /// Caps item of the VPN Server + /// + public class VpnCaps + { + /// + /// Name + /// + public string CapsName_str; + + /// + /// Value + /// + public uint CapsValue_u32; + + /// + /// Descrption + /// + public string CapsDescrption_utf; + } + + /// + /// Caps list of the VPN Server + /// + public class VpnCapslist + { + /// + /// Caps list of the VPN Server + /// + public VpnCaps[] CapsList; + } + + /// + /// Config operation + /// + public class VpnRpcConfig + { + /// + /// File name (valid only for returning from the server) + /// + public string FileName_str; + + /// + /// File data + /// + public byte[] FileData_bin; + } + + /// + /// Connection information + /// + public class VpnRpcConnectionInfo + { + /// + /// Connection name + /// + public string Name_str; + + /// + /// Type + /// + public VpnRpcConnectionType Type_u32; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Port number + /// + public uint Port_u32; + + /// + /// Connected time + /// + public DateTime ConnectedTime_dt; + + /// + /// Server string + /// + public string ServerStr_str; + + /// + /// Server version + /// + public uint ServerVer_u32; + + /// + /// Server build number + /// + public uint ServerBuild_u32; + + /// + /// Client string + /// + public string ClientStr_str; + + /// + /// Client version + /// + public uint ClientVer_u32; + + /// + /// Client build number + /// + public uint ClientBuild_u32; + } + + /// + /// Proxy type + /// + public enum VpnRpcProxyType + { + /// + /// Direct TCP connection + /// + Direct = 0, + + /// + /// Connection via HTTP proxy server + /// + HTTP = 1, + + /// + /// Connection via SOCKS proxy server + /// + SOCKS = 2, + } + + /// + /// The current status of the DDNS + /// + public class VpnDDnsClientStatus + { + /// + /// Last error code (IPv4) + /// + public uint Err_IPv4_u32; + + /// + /// Last error string (IPv4) + /// + public string ErrStr_IPv4_utf; + + /// + /// Last error code (IPv6) + /// + public uint Err_IPv6_u32; + + /// + /// Last error string (IPv6) + /// + public string ErrStr_IPv6_utf; + + /// + /// Current DDNS host name + /// + public string CurrentHostName_str; + + /// + /// Current FQDN of the DDNS hostname + /// + public string CurrentFqdn_str; + + /// + /// DDNS suffix + /// + public string DnsSuffix_str; + + /// + /// Current IPv4 address of the VPN Server + /// + public string CurrentIPv4_str; + + /// + /// Current IPv6 address of the VPN Server + /// + public string CurrentIPv6_str; + } + + /// + /// Internet connection settings + /// + public class VpnInternetSetting + { + /// + /// Type of proxy server + /// + public VpnRpcProxyType ProxyType_u32; + + /// + /// Proxy server host name + /// + public string ProxyHostName_str; + + /// + /// Proxy server port number + /// + public uint ProxyPort_u32; + + /// + /// Proxy server user name + /// + public string ProxyUsername_str; + + /// + /// Proxy server password + /// + public string ProxyPassword_str; + } + + /// + /// Administration options + /// + public class VpnAdminOption + { + /// + /// Name + /// + public string Name_str; + + /// + /// Data + /// + public uint Value_u32; + + /// + /// Descrption + /// + public string Descrption_utf; + } + + /// + /// Administration options list + /// + public class VpnRpcAdminOption + { + /// + /// Virtual HUB name + /// + public string HubName_str; + + /// + /// List data + /// + public VpnAdminOption[] AdminOptionList; + } + + /// + /// Connection state to the controller + /// + public class VpnRpcFarmConnectionStatus + { + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Port number + /// + public uint Port_u32; + + /// + /// Online state + /// + public bool Online_bool; + + /// + /// Last error code + /// + public uint LastError_u32; + + /// + /// Connection start time + /// + public DateTime StartedTime_dt; + + /// + /// First connection time + /// + public DateTime FirstConnectedTime_dt; + + /// + /// Connection time of this time + /// + public DateTime CurrentConnectedTime_dt; + + /// + /// Number of retries + /// + public uint NumTry_u32; + + /// + /// Number of connection count + /// + public uint NumConnected_u32; + + /// + /// Connection failure count + /// + public uint NumFailed_u32; + } + + /// + /// HUB item of each farm member + /// + public class VpnRpcFarmHub + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Dynamic HUB + /// + public bool DynamicHub_bool; + } + + + /// + /// Server farm member information acquisition + /// + public class VpnRpcFarmInfo + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// The flag if the server is Cluster Controller (false: Cluster Member servers) + /// + public bool Controller_bool; + + /// + /// Connection Established Time + /// + public DateTime ConnectedTime_dt; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// Point + /// + public uint Point_u32; + + /// + /// Number of Public Ports + /// + public uint NumPort_u32; + + /// + /// Public Ports + /// + public uint[] Ports_u32; + + /// + /// Server certificate + /// + public byte[] ServerCert_bin; + + /// + /// Number of farm HUB + /// + public uint NumFarmHub_u32; + + /// + /// The hosted Virtual Hub list + /// + public VpnRpcFarmHub[] HubsList; + + /// + /// Number of hosted VPN sessions + /// + public uint NumSessions_u32; + + /// + /// Number of TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Performance Standard Ratio + /// + public uint Weight_u32; + } + + /// + /// Server farm configuration + /// + public class VpnRpcFarm + { + /// + /// Type of server + /// + public VpnRpcServerType ServerType_u32; + + /// + /// Valid only for Cluster Member servers. Number of the Ports_u32 element. + /// + public uint NumPort_u32; + + /// + /// Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. + /// + public uint[] Ports_u32; + + /// + /// Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. + /// + public string PublicIp_ip; + + /// + /// Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. + /// + public string ControllerName_str; + + /// + /// Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. + /// + public uint ControllerPort_u32; + + /// + /// Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. + /// + public string MemberPasswordPlaintext_str; + + /// + /// This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. + /// + public uint Weight_u32; + + /// + /// Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. + /// + public bool ControllerOnly_bool; + } + + /// + /// Log switch type + /// + public enum VpnRpcLogSwitchType + { + /// + /// No switching + /// + No = 0, + + /// + /// Secondly basis + /// + Second = 1, + + /// + /// Minutely basis + /// + Minute = 2, + + /// + /// Hourly basis + /// + Hour = 3, + + /// + /// Daily basis + /// + Day = 4, + + /// + /// Monthly basis + /// + Month = 5, + } + + /// + /// Packet log settings + /// + public enum VpnRpcPacketLogSetting + { + /// + /// Not save + /// + None = 0, + + /// + /// Only header + /// + Header = 1, + + /// + /// All payloads + /// + All = 2, + } + + /// + /// Packet log settings array index + /// + public enum VpnRpcPacketLogSettingIndex + { + /// + /// TCP connection log + /// + TcpConnection = 0, + + /// + /// TCP packet log + /// + TcpAll = 1, + + /// + /// DHCP Log + /// + Dhcp = 2, + + /// + /// UDP log + /// + Udp = 3, + + /// + /// ICMP log + /// + Icmp = 4, + + /// + /// IP log + /// + Ip = 5, + + /// + /// ARP log + /// + Arp = 6, + + /// + /// Ethernet log + /// + Ethernet = 7, + } + + /// + /// HUB log settings + /// + public class VpnRpcHubLog + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The flag to enable / disable saving the security log + /// + public bool SaveSecurityLog_bool; + + /// + /// The log filename switching setting of the security log + /// + public VpnRpcLogSwitchType SecurityLogSwitchType_u32; + + /// + /// The flag to enable / disable saving the security log + /// + public bool SavePacketLog_bool; + + /// + /// The log filename switching settings of the packet logs + /// + public VpnRpcLogSwitchType PacketLogSwitchType_u32; + + /// + /// Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7. + /// + public VpnRpcPacketLogSetting[] PacketLogConfig_u32 = new VpnRpcPacketLogSetting[16]; + } + + /// + /// RADIUS server options + /// + public class VpnRpcRadius + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// RADIUS server name + /// + public string RadiusServerName_str; + + /// + /// RADIUS port number + /// + public uint RadiusPort_u32; + + /// + /// Secret key + /// + public string RadiusSecret_str; + + /// + /// Radius retry interval + /// + public uint RadiusRetryInterval_u32; + } + + /// + /// Get the state HUB + /// + public class VpnRpcHubStatus + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Online + /// + public bool Online_bool; + + /// + /// Type of HUB + /// + public VpnRpcHubType HubType_u32; + + /// + /// Number of sessions + /// + public uint NumSessions_u32; + + /// + /// Number of sessions (client mode) + /// + public uint NumSessionsClient_u32; + + /// + /// Number of sessions (bridge mode) + /// + public uint NumSessionsBridge_u32; + + /// + /// Number of Access list entries + /// + public uint NumAccessLists_u32; + + /// + /// Number of users + /// + public uint NumUsers_u32; + + /// + /// Number of groups + /// + public uint NumGroups_u32; + + /// + /// Number of MAC table entries + /// + public uint NumMacTables_u32; + + /// + /// Number of IP table entries + /// + public uint NumIpTables_u32; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// Whether SecureNAT is enabled + /// + public bool SecureNATEnabled_bool; + + /// + /// Last communication date and time + /// + public DateTime LastCommTime_dt; + + /// + /// Last login date and time + /// + public DateTime LastLoginTime_dt; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Number of logins + /// + public uint NumLogin_u32; + } + + /// + /// List of services provided by IPsec server + /// + public class VpnIPsecServices + { + /// + /// Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. + /// + public bool L2TP_Raw_bool; + + /// + /// Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. + /// + public bool L2TP_IPsec_bool; + + /// + /// Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. + /// + public bool EtherIP_IPsec_bool; + + /// + /// Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. + /// + public string IPsec_Secret_str; + + /// + /// Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. + /// + public string L2TP_DefaultHub_str; + } + + /// + /// Keep alive protocol + /// + public enum VpnRpcKeepAliveProtocol + { + /// + /// TCP + /// + TCP = 0, + + /// + /// UDP + /// + UDP = 1, + } + + /// + /// Keep Alive settings + /// + public class VpnRpcKeep + { + /// + /// The flag to enable keep-alive to the Internet + /// + public bool UseKeepConnect_bool; + + /// + /// Specify the host name or IP address of the destination + /// + public string KeepConnectHost_str; + + /// + /// Specify the port number of the destination + /// + public uint KeepConnectPort_u32; + + /// + /// Protocol type + /// + public VpnRpcKeepAliveProtocol KeepConnectProtocol_u32; + + /// + /// Interval Between Packets Sends (Seconds) + /// + public uint KeepConnectInterval_u32; + } + + /// + /// State of the client session + /// + public enum VpnRpcClientSessionStatus + { + /// + /// Connecting + /// + Connecting = 0, + + /// + /// Negotiating + /// + Negotiation = 1, + + /// + /// During user authentication + /// + Auth = 2, + + /// + /// Connection complete + /// + Established = 3, + + /// + /// Wait to retry + /// + Retry = 4, + + /// + /// Idle state + /// + Idle = 5, + } + + /// + /// Get the link state + /// + public class VpnRpcLinkStatus + { + /// + /// The Virtual Hub name + /// + public string HubName_Ex_str; + + /// + /// The name of the cascade connection + /// + public string AccountName_utf; + + /// + /// The flag whether the cascade connection is enabled + /// + public bool Active_bool; + + /// + /// The flag whether the cascade connection is established + /// + public bool Connected_bool; + + /// + /// The session status + /// + public VpnRpcClientSessionStatus SessionStatus_u32; + + /// + /// The destination VPN server name + /// + public string ServerName_str; + + /// + /// The port number of the server + /// + public uint ServerPort_u32; + + /// + /// Server product name + /// + public string ServerProductName_str; + + /// + /// Server product version + /// + public uint ServerProductVer_u32; + + /// + /// Server product build number + /// + public uint ServerProductBuild_u32; + + /// + /// Server's X.509 certificate + /// + public byte[] ServerX_bin; + + /// + /// Client certificate + /// + public byte[] ClientX_bin; + + /// + /// Connection start time + /// + public DateTime StartTime_dt; + + /// + /// Connection completion time of the first connection + /// + public DateTime FirstConnectionEstablisiedTime_dt; + + /// + /// Connection completion time of this connection + /// + public DateTime CurrentConnectionEstablishTime_dt; + + /// + /// Number of connections have been established so far + /// + public uint NumConnectionsEatablished_u32; + + /// + /// Half-connection + /// + public bool HalfConnection_bool; + + /// + /// VoIP / QoS + /// + public bool QoS_bool; + + /// + /// Maximum number of the underlying TCP connections + /// + public uint MaxTcpConnections_u32; + + /// + /// Number of current underlying TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of underlying inbound TCP connections + /// + public uint NumTcpConnectionsUpload_u32; + + /// + /// Number of underlying outbound TCP connections + /// + public uint NumTcpConnectionsDownload_u32; + + /// + /// Use of encryption + /// + public bool UseEncrypt_bool; + + /// + /// Cipher algorithm name + /// + public string CipherName_str; + + /// + /// Use of compression + /// + public bool UseCompress_bool; + + /// + /// The flag whether this is a R-UDP session + /// + public bool IsRUDPSession_bool; + + /// + /// Underlying physical communication protocol + /// + public string UnderlayProtocol_str; + + /// + /// The UDP acceleration is enabled + /// + public bool IsUdpAccelerationEnabled_bool; + + /// + /// The UDP acceleration is being actually used + /// + public bool IsUsingUdpAcceleration_bool; + + /// + /// Session name + /// + public string SessionName_str; + + /// + /// Connection name + /// + public string ConnectionName_str; + + /// + /// Session key + /// + public byte[] SessionKey_bin; + + /// + /// Total transmitted data size + /// + public ulong TotalSendSize_u64; + + /// + /// Total received data size + /// + public ulong TotalRecvSize_u64; + + /// + /// Total transmitted data size (no compression) + /// + public ulong TotalSendSizeReal_u64; + + /// + /// Total received data size (no compression) + /// + public ulong TotalRecvSizeReal_u64; + + /// + /// The flag whether the VPN session is Bridge Mode + /// + public bool IsBridgeMode_bool; + + /// + /// The flag whether the VPN session is Monitor mode + /// + public bool IsMonitorMode_bool; + + /// + /// VLAN ID + /// + public uint VLanId_u32; + } + + /// + /// Setting of SSTP and OpenVPN + /// + public class VpnOpenVpnSstpConfig + { + /// + /// Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. + /// + public bool EnableOpenVPN_bool; + + /// + /// Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. + /// + public string OpenVPNPortList_str; + + /// + /// pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. + /// + public bool EnableSSTP_bool; + } + + /// + /// Virtual host option + /// + public class VpnVhOption + { + /// + /// Target Virtual HUB name + /// + public string RpcHubName_str; + + /// + /// MAC address + /// + public byte[] MacAddress_bin; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Subnet mask + /// + public string Mask_ip; + + /// + /// Use flag of the Virtual NAT function + /// + public bool UseNat_bool; + + /// + /// MTU value (Standard: 1500) + /// + public uint Mtu_u32; + + /// + /// NAT TCP timeout in seconds + /// + public uint NatTcpTimeout_u32; + + /// + /// NAT UDP timeout in seconds + /// + public uint NatUdpTimeout_u32; + + /// + /// Using flag of DHCP function + /// + public bool UseDhcp_bool; + + /// + /// Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) + /// + public string DhcpLeaseIPStart_ip; + + /// + /// Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) + /// + public string DhcpLeaseIPEnd_ip; + + /// + /// Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) + /// + public string DhcpSubnetMask_ip; + + /// + /// Specify the expiration date in second units for leasing an IP address to a client. + /// + public uint DhcpExpireTimeSpan_u32; + + /// + /// Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. + /// + public string DhcpGatewayAddress_ip; + + /// + /// Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. + /// + public string DhcpDnsServerAddress_ip; + + /// + /// Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. + /// + public string DhcpDnsServerAddress2_ip; + + /// + /// Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. + /// + public string DhcpDomainName_str; + + /// + /// Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. + /// + public bool SaveLog_bool; + + /// + /// The flag to enable the DhcpPushRoutes_str field. + /// + public bool ApplyDhcpPushRoutes_bool; + + /// + /// Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. + /// + public string DhcpPushRoutes_str; + } + + /// + /// RPC_NAT_STATUS + /// + public class VpnRpcNatStatus + { + /// + /// Virtual Hub Name + /// + public string HubName_str; + + /// + /// Number of TCP sessions + /// + public uint NumTcpSessions_u32; + + /// + /// Ntmber of UDP sessions + /// + public uint NumUdpSessions_u32; + + /// + /// Nymber of ICMP sessions + /// + public uint NumIcmpSessions_u32; + + /// + /// Number of DNS sessions + /// + public uint NumDnsSessions_u32; + + /// + /// Number of DHCP clients + /// + public uint NumDhcpClients_u32; + + /// + /// Whether the NAT is operating in the Kernel Mode + /// + public bool IsKernelMode_bool; + + /// + /// Whether the NAT is operating in the Raw IP Mode + /// + public bool IsRawIpMode_bool; + } + + /// + /// Key pair + /// + public class VpnRpcKeyPair + { + /// + /// The body of the certificate + /// + public byte[] Cert_bin; + + /// + /// The body of the private key + /// + public byte[] Key_bin; + } + + /// + /// Single string value + /// + public class VpnRpcStr + { + /// + /// A string value + /// + public string String_str; + } + + /// + /// Type of VPN Server + /// + public enum VpnRpcServerType + { + /// + /// Stand-alone server + /// + Standalone = 0, + + /// + /// Farm controller server + /// + FarmController = 1, + + /// + /// Farm member server + /// + FarmMember = 2, + } + + /// + /// Operating system type + /// + public enum VpnRpcOsType + { + /// + /// Windows 95 + /// + WINDOWS_95 = 1100, + + /// + /// Windows 98 + /// + WINDOWS_98 = 1200, + + /// + /// Windows Me + /// + WINDOWS_ME = 1300, + + /// + /// Windows (unknown) + /// + WINDOWS_UNKNOWN = 1400, + + /// + /// Windows NT 4.0 Workstation + /// + WINDOWS_NT_4_WORKSTATION = 2100, + + /// + /// Windows NT 4.0 Server + /// + WINDOWS_NT_4_SERVER = 2110, + + /// + /// Windows NT 4.0 Server, Enterprise Edition + /// + WINDOWS_NT_4_SERVER_ENTERPRISE = 2111, + + /// + /// Windows NT 4.0 Terminal Server + /// + WINDOWS_NT_4_TERMINAL_SERVER = 2112, + + /// + /// BackOffice Server 4.5 + /// + WINDOWS_NT_4_BACKOFFICE = 2113, + + /// + /// Small Business Server 4.5 + /// + WINDOWS_NT_4_SMS = 2114, + + /// + /// Windows 2000 Professional + /// + WINDOWS_2000_PROFESSIONAL = 2200, + + /// + /// Windows 2000 Server + /// + WINDOWS_2000_SERVER = 2211, + + /// + /// Windows 2000 Advanced Server + /// + WINDOWS_2000_ADVANCED_SERVER = 2212, + + /// + /// Windows 2000 Datacenter Server + /// + WINDOWS_2000_DATACENTER_SERVER = 2213, + + /// + /// BackOffice Server 2000 + /// + WINDOWS_2000_BACKOFFICE = 2214, + + /// + /// Small Business Server 2000 + /// + WINDOWS_2000_SBS = 2215, + + /// + /// Windows XP Home Edition + /// + WINDOWS_XP_HOME = 2300, + + /// + /// Windows XP Professional + /// + WINDOWS_XP_PROFESSIONAL = 2301, + + /// + /// Windows Server 2003 Web Edition + /// + WINDOWS_2003_WEB = 2410, + + /// + /// Windows Server 2003 Standard Edition + /// + WINDOWS_2003_STANDARD = 2411, + + /// + /// Windows Server 2003 Enterprise Edition + /// + WINDOWS_2003_ENTERPRISE = 2412, + + /// + /// Windows Server 2003 DataCenter Edition + /// + WINDOWS_2003_DATACENTER = 2413, + + /// + /// BackOffice Server 2003 + /// + WINDOWS_2003_BACKOFFICE = 2414, + + /// + /// Small Business Server 2003 + /// + WINDOWS_2003_SBS = 2415, + + /// + /// Windows Vista + /// + WINDOWS_LONGHORN_PROFESSIONAL = 2500, + + /// + /// Windows Server 2008 + /// + WINDOWS_LONGHORN_SERVER = 2510, + + /// + /// Windows 7 + /// + WINDOWS_7 = 2600, + + /// + /// Windows Server 2008 R2 + /// + WINDOWS_SERVER_2008_R2 = 2610, + + /// + /// Windows 8 + /// + WINDOWS_8 = 2700, + + /// + /// Windows Server 2012 + /// + WINDOWS_SERVER_8 = 2710, + + /// + /// Windows 8.1 + /// + WINDOWS_81 = 2701, + + /// + /// Windows Server 2012 R2 + /// + WINDOWS_SERVER_81 = 2711, + + /// + /// Windows 10 + /// + WINDOWS_10 = 2702, + + /// + /// Windows Server 10 + /// + WINDOWS_SERVER_10 = 2712, + + /// + /// Windows 11 or later + /// + WINDOWS_11 = 2800, + + /// + /// Windows Server 11 or later + /// + WINDOWS_SERVER_11 = 2810, + + /// + /// Unknown UNIX + /// + UNIX_UNKNOWN = 3000, + + /// + /// Linux + /// + LINUX = 3100, + + /// + /// Solaris + /// + SOLARIS = 3200, + + /// + /// Cygwin + /// + CYGWIN = 3300, + + /// + /// BSD + /// + BSD = 3400, + + /// + /// MacOS X + /// + MACOS_X = 3500, + } + + /// + /// VPN Server Information + /// + public class VpnRpcServerInfo + { + /// + /// Server product name + /// + public string ServerProductName_str; + + /// + /// Server version string + /// + public string ServerVersionString_str; + + /// + /// Server build information string + /// + public string ServerBuildInfoString_str; + + /// + /// Server version integer value + /// + public uint ServerVerInt_u32; + + /// + /// Server build number integer value + /// + public uint ServerBuildInt_u32; + + /// + /// Server host name + /// + public string ServerHostName_str; + + /// + /// Type of server + /// + public VpnRpcServerType ServerType_u32; + + /// + /// Build date and time of the server + /// + public DateTime ServerBuildDate_dt; + + /// + /// Family name + /// + public string ServerFamilyName_str; + + /// + /// OS type + /// + public VpnRpcOsType OsType_u32; + + /// + /// Service pack number + /// + public uint OsServicePack_u32; + + /// + /// OS system name + /// + public string OsSystemName_str; + + /// + /// OS product name + /// + public string OsProductName_str; + + /// + /// OS vendor name + /// + public string OsVendorName_str; + + /// + /// OS version + /// + public string OsVersion_str; + + /// + /// Kernel name + /// + public string KernelName_str; + + /// + /// Kernel version + /// + public string KernelVersion_str; + } + + /// + /// Server status + /// + public class VpnRpcServerStatus + { + /// + /// Type of server + /// + public VpnRpcServerType ServerType_u32; + + /// + /// Total number of TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of Local TCP connections + /// + public uint NumTcpConnectionsLocal_u32; + + /// + /// Number of remote TCP connections + /// + public uint NumTcpConnectionsRemote_u32; + + /// + /// Total number of HUBs + /// + public uint NumHubTotal_u32; + + /// + /// Nymber of stand-alone HUB + /// + public uint NumHubStandalone_u32; + + /// + /// Number of static HUBs + /// + public uint NumHubStatic_u32; + + /// + /// Number of Dynamic HUBs + /// + public uint NumHubDynamic_u32; + + /// + /// Total number of sessions + /// + public uint NumSessionsTotal_u32; + + /// + /// Number of local VPN sessions + /// + public uint NumSessionsLocal_u32; + + /// + /// The number of remote sessions + /// + public uint NumSessionsRemote_u32; + + /// + /// Number of MAC table entries (total sum of all Virtual Hubs) + /// + public uint NumMacTables_u32; + + /// + /// Number of IP table entries (total sum of all Virtual Hubs) + /// + public uint NumIpTables_u32; + + /// + /// Number of users (total sum of all Virtual Hubs) + /// + public uint NumUsers_u32; + + /// + /// Number of groups (total sum of all Virtual Hubs) + /// + public uint NumGroups_u32; + + /// + /// Number of assigned bridge licenses (Useful to make a commercial version) + /// + public uint AssignedBridgeLicenses_u32; + + /// + /// Number of assigned client licenses (Useful to make a commercial version) + /// + public uint AssignedClientLicenses_u32; + + /// + /// Number of Assigned bridge license (cluster-wide), useful to make a commercial version + /// + public uint AssignedBridgeLicensesTotal_u32; + + /// + /// Number of assigned client licenses (cluster-wide), useful to make a commercial version + /// + public uint AssignedClientLicensesTotal_u32; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// Current time + /// + public DateTime CurrentTime_dt; + + /// + /// 64 bit High-Precision Logical System Clock + /// + public ulong CurrentTick_u64; + + /// + /// VPN Server Start-up time + /// + public DateTime StartTime_dt; + + /// + /// Memory information: Total Memory + /// + public ulong TotalMemory_u64; + + /// + /// Memory information: Used Memory + /// + public ulong UsedMemory_u64; + + /// + /// Memory information: Free Memory + /// + public ulong FreeMemory_u64; + + /// + /// Memory information: Total Phys + /// + public ulong TotalPhys_u64; + + /// + /// Memory information: Used Phys + /// + public ulong UsedPhys_u64; + + /// + /// Memory information: Free Phys + /// + public ulong FreePhys_u64; + } + + /// + /// VPN Session status + /// + public class VpnRpcSessionStatus + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// VPN session name + /// + public string Name_str; + + /// + /// User name + /// + public string Username_str; + + /// + /// Real user name which was used for the authentication + /// + public string RealUsername_str; + + /// + /// Group name + /// + public string GroupName_str; + + /// + /// Is Cascade Session + /// + public bool LinkMode_bool; + + /// + /// Client IP address + /// + public string Client_Ip_Address_ip; + + /// + /// Client host name + /// + [JsonProperty("SessionStatus_ClientHostName_str")] + public string ClientHostName_str; + + /// + /// Operation flag + /// + public bool Active_bool; + + /// + /// Connected flag + /// + public bool Connected_bool; + + /// + /// State of the client session + /// + public VpnRpcClientSessionStatus SessionStatus_u32; + + /// + /// Server name + /// + public string ServerName_str; + + /// + /// Port number of the server + /// + public uint ServerPort_u32; + + /// + /// Server product name + /// + public string ServerProductName_str; + + /// + /// Server product version + /// + public uint ServerProductVer_u32; + + /// + /// Server product build number + /// + public uint ServerProductBuild_u32; + + /// + /// Connection start time + /// + public DateTime StartTime_dt; + + /// + /// Connection completion time of the first connection + /// + public DateTime FirstConnectionEstablisiedTime_dt; + + /// + /// Connection completion time of this connection + /// + public DateTime CurrentConnectionEstablishTime_dt; + + /// + /// Number of connections have been established so far + /// + public uint NumConnectionsEatablished_u32; + + /// + /// Half-connection + /// + public bool HalfConnection_bool; + + /// + /// VoIP / QoS + /// + public bool QoS_bool; + + /// + /// Maximum number of the underlying TCP connections + /// + public uint MaxTcpConnections_u32; + + /// + /// Number of current underlying TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of inbound underlying connections + /// + public uint NumTcpConnectionsUpload_u32; + + /// + /// Number of outbound underlying connections + /// + public uint NumTcpConnectionsDownload_u32; + + /// + /// Use of encryption + /// + public bool UseEncrypt_bool; + + /// + /// Cipher algorithm name + /// + public string CipherName_str; + + /// + /// Use of compression + /// + public bool UseCompress_bool; + + /// + /// Is R-UDP session + /// + public bool IsRUDPSession_bool; + + /// + /// Physical underlying communication protocol + /// + public string UnderlayProtocol_str; + + /// + /// The UDP acceleration is enabled + /// + public bool IsUdpAccelerationEnabled_bool; + + /// + /// Using the UDP acceleration function + /// + public bool IsUsingUdpAcceleration_bool; + + /// + /// VPN session name + /// + public string SessionName_str; + + /// + /// Connection name + /// + public string ConnectionName_str; + + /// + /// Session key + /// + public byte[] SessionKey_bin; + + /// + /// Total transmitted data size + /// + public ulong TotalSendSize_u64; + + /// + /// Total received data size + /// + public ulong TotalRecvSize_u64; + + /// + /// Total transmitted data size (no compression) + /// + public ulong TotalSendSizeReal_u64; + + /// + /// Total received data size (no compression) + /// + public ulong TotalRecvSizeReal_u64; + + /// + /// Is Bridge Mode + /// + public bool IsBridgeMode_bool; + + /// + /// Is Monitor mode + /// + public bool IsMonitorMode_bool; + + /// + /// VLAN ID + /// + public uint VLanId_u32; + + /// + /// Client product name + /// + public string ClientProductName_str; + + /// + /// Client version + /// + public uint ClientProductVer_u32; + + /// + /// Client build number + /// + public uint ClientProductBuild_u32; + + /// + /// Client OS name + /// + public string ClientOsName_str; + + /// + /// Client OS version + /// + public string ClientOsVer_str; + + /// + /// Client OS Product ID + /// + public string ClientOsProductId_str; + + /// + /// Client host name + /// + public string ClientHostname_str; + + /// + /// Unique ID + /// + public byte[] UniqueId_bin; + } + + /// + /// Set the special listener + /// + public class VpnRpcSpecialListener + { + /// + /// The flag to activate the VPN over ICMP server function + /// + public bool VpnOverIcmpListener_bool; + + /// + /// The flag to activate the VPN over DNS function + /// + public bool VpnOverDnsListener_bool; + } + + /// + /// Syslog configuration + /// + public enum VpnSyslogSaveType + { + /// + /// Do not use syslog + /// + None = 0, + + /// + /// Only server log + /// + ServerLog = 1, + + /// + /// Server and Virtual HUB security log + /// + ServerAndHubSecurityLog = 2, + + /// + /// Server, Virtual HUB security, and packet log + /// + ServerAndHubAllLog = 3, + } + + /// + /// Syslog configuration + /// + public class VpnSyslogSetting + { + /// + /// The behavior of the syslog function + /// + public VpnSyslogSaveType SaveType_u32; + + /// + /// Specify the host name or IP address of the syslog server + /// + public string Hostname_str; + + /// + /// Specify the port number of the syslog server + /// + public uint Port_u32; + } + + /// + /// VPN Gate Server Config + /// + public class VpnVgsConfig + { + /// + /// Active flag + /// + public bool IsEnabled_bool; + + /// + /// Message + /// + public string Message_utf; + + /// + /// Owner name + /// + public string Owner_utf; + + /// + /// Abuse email + /// + public string Abuse_utf; + + /// + /// Log save flag + /// + public bool NoLog_bool; + + /// + /// Save log permanently + /// + public bool LogPermanent_bool; + + /// + /// Enable the L2TP VPN function + /// + public bool EnableL2TP_bool; + } + + /// + /// Read a Log file + /// + public class VpnRpcReadLogFile + { + /// + /// Server name + /// + public string ServerName_str; + + /// + /// File Path + /// + public string FilePath_str; + + /// + /// Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. + /// + public uint Offset_u32; + + /// + /// Received buffer + /// + public byte[] Buffer_bin; + } + + /// + /// Rename link + /// + public class VpnRpcRenameLink + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The old name of the cascade connection + /// + public string OldAccountName_utf; + + /// + /// The new name of the cascade connection + /// + public string NewAccountName_utf; + } + + /// + /// Online or offline the HUB + /// + public class VpnRpcSetHubOnline + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Online / offline flag + /// + public bool Online_bool; + } + + /// + /// Set Password + /// + public class VpnRpcSetPassword + { + /// + /// The plaintext password + /// + public string PlainTextPassword_str; + } + +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/Main.cs b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/Main.cs new file mode 100644 index 00000000..1021e12b --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/Main.cs @@ -0,0 +1,17 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// Program.cs - The Main() entry point +// +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +class Program +{ + static void Main(string[] args) + { + VPNRPCTest test = new VPNRPCTest(); + test.Test_All(); + } +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/VpnServerRpcTest.cs b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/VpnServerRpcTest.cs new file mode 100644 index 00000000..d9ab15f3 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/VpnServerRpcTest.cs @@ -0,0 +1,3736 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// VpnServerRpcTest.cs - Test sample code for SoftEther VPN Server JSON-RPC Stub +// +// This sample code shows how to call all available RPC functions. +// You can copy and paste test code to write your own C# codes. +// +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +using System; +using SoftEther.VPNServerRpc; + +class VPNRPCTest +{ + VpnServerRpc api; + + Random rand = new Random(); + + string hub_name = "TEST"; + + public VPNRPCTest() + { + api = new VpnServerRpc("127.0.0.1", 443, "PASSWORD_HERE", ""); // Speficy your VPN Server's password here. + } + + /// + /// Tests all VPN APIs + /// + public void Test_All() + { + hub_name = "TEST"; + + Test_Test(); + + Test_GetServerInfo(); + Test_GetServerStatus(); + + uint new_listener_port = Test_CreateListener(); + Test_EnableListener(new_listener_port, false); + Test_EnumListener(); + Test_EnableListener(new_listener_port, true); + Test_EnumListener(); + Test_DeleteListener(new_listener_port); + + Test_SetServerPassword(); + + Test_GetFarmSetting(); + + if (false) + { + + Test_SetFarmSetting(); + + VpnRpcEnumFarm farm_members = Test_EnumFarmMember(); + + foreach (VpnRpcEnumFarmItem farm_member in farm_members.FarmMemberList) + { + Test_GetFarmInfo(farm_member.Id_u32); + } + + Test_GetFarmConnectionStatus(); + } + else if (false) + { + Console.WriteLine("abc"); + } + else + { + Console.WriteLine("def"); + } + + Test_GetServerCert(); + + Test_SetServerCert(); + + Test_GetServerCipher(); + + Test_SetServerCipher(); + + VpnRpcEnumConnection enum_connection = Test_EnumConnection(); + + foreach (VpnRpcEnumConnectionItem connecton in enum_connection.ConnectionList) + { + Test_GetConnectionInfo(connecton.Name_str); + //Test_DisconnectConnection(connecton.Name_str); + } + + hub_name = Test_CreateHub(); + + Test_SetHub(); + Test_GetHub(); + Test_EnumHub(); + Test_SetHubRadius(); + Test_GetHubRadius(); + + Test_SetHubOnline(); + Test_GetHubStatus(); + + VpnRpcHubLog hub_log_settings = Test_GetHubLog(); + Test_SetHubLog(hub_log_settings); + + Test_AddCa(); + VpnRpcHubEnumCA enum_ca = Test_EnumCa(); + foreach (VpnRpcHubEnumCAItem ca in enum_ca.CAList) + { + Test_GetCa(ca.Key_u32); + Test_DeleteCa(ca.Key_u32); + } + + Test_CreateLink(); + Test_GetLink(); + Test_SetLink(); + Test_SetLinkOffline(); + Test_SetLinkOnline(); + VpnRpcEnumLink enum_link = Test_EnumLink(); + foreach (var link in enum_link.LinkList) + { + Test_GetLinkStatus(link.AccountName_utf); + } + System.Threading.Thread.Sleep(3000); + Test_RenameLink(); + Test_DeleteLink(); + + Test_AddAccess(); + Test_EnumAccess(); + Test_DeleteAccess(); + Test_SetAccessList(); + + Test_CreateGroup(); + Test_SetGroup(); + Test_GetGroup(); + + Test_CreateUser(); + Test_SetUser(); + Test_GetUser(); + Test_EnumUser(); + Test_EnumGroup(); + + Test_DeleteUser(); + Test_DeleteGroup(); + + VpnRpcEnumSession enum_session = Test_EnumSession(); + + foreach (VpnRpcEnumSessionItem session in enum_session.SessionList) + { + Test_GetSessionStatus(session.Name_str); + + Test_DeleteSession(session.Name_str); + } + + VpnRpcEnumMacTable enum_mac = Test_EnumMacTable(); + + foreach (VpnRpcEnumMacTableItem mac in enum_mac.MacTable) + { + Test_DeleteMacTable(mac.Key_u32); + } + + VpnRpcEnumIpTable enum_ip = Test_EnumIpTable(); + + foreach (VpnRpcEnumIpTableItem ip in enum_ip.IpTable) + { + Test_DeleteIpTable(ip.Key_u32); + } + + Test_SetKeep(); + Test_GetKeep(); + + Test_EnableSecureNAT(); + Test_GetSecureNATOption(); + Test_SetSecureNATOption(); + Test_EnumNAT(); + Test_EnumDHCP(); + Test_GetSecureNATStatus(); + Test_DisableSecureNAT(); + + Test_EnumEthernet(); + //Test_AddLocalBridge(); + Test_EnumLocalBridge(); + //Test_DeleteLocalBridge(); + Test_GetBridgeSupport(); + + Test_GetCaps(); + Test_GetConfig(); + //Test_SetConfig(); + + Test_GetDefaultHubAdminOptions(); + Test_GetHubAdminOptions(); + Test_SetHubAdminOptions(); + Test_GetHubExtOptions(); + Test_SetHubExtOptions(); + + Test_AddL3Switch(); + Test_AddL3If(); + Test_EnumL3Switch(); + Test_EnumL3If(); + Test_AddL3Table(); + Test_EnumL3Table(); + Test_DelL3Table(); + Test_StartL3Switch(); + Test_StopL3Switch(); + Test_DelL3If(); + Test_DelL3Switch(); + + Test_AddCrl(); + VpnRpcEnumCrl enum_crl = Test_EnumCrl(); + foreach (VpnRpcEnumCrlItem crl in enum_crl.CRLList) + { + VpnRpcCrl got_crl = Test_GetCrl(crl.Key_u32); + + got_crl.CommonName_utf = got_crl.CommonName_utf + "_a"; + Test_SetCrl(got_crl); + } + + enum_crl = Test_EnumCrl(); + foreach (VpnRpcEnumCrlItem crl in enum_crl.CRLList) + { + Test_DelCrl(crl.Key_u32); + } + + Test_SetAcList(); + Test_GetAcList(); + + VpnRpcEnumLogFile enum_log_file = Test_EnumLogFile(); + foreach (VpnRpcEnumLogFileItem log in enum_log_file.LogFiles) + { + Test_ReadLogFile(log.FilePath_str); + + break; + } + + Test_SetSysLog(true); + Test_GetSysLog(); + Test_SetSysLog(false); + + Test_SetHubMsg(); + Test_GetHubMsg(); + Test_GetAdminMsg(); + Test_Flush(); + + Test_SetIPsecServices(); + Test_GetIPsecServices(); + + Test_AddEtherIpId(); + VpnRpcEnumEtherIpId enum_etherip_id = Test_EnumEtherIpId(); + foreach (VpnEtherIpId etherip_id in enum_etherip_id.Settings) + { + Test_GetEtherIpId(etherip_id.Id_str); + Test_DeleteEtherIpId(etherip_id.Id_str); + } + + Test_SetOpenVpnSstpConfig(); + Test_GetOpenVpnSstpConfig(); + + Test_GetDDnsClientStatus(); + Test_SetDDnsInternetSettng(); + Test_GetDDnsInternetSettng(); + + Test_ChangeDDnsClientHostname(); + Test_RegenerateServerCert(); + Test_MakeOpenVpnConfigFile(); + Test_SetSpecialListener(); + Test_GetSpecialListener(); + + Test_GetAzureStatus(); + Test_SetAzureStatus(); + Test_SetVgsConfig(); + Test_GetVgsConfig(); + + Test_DeleteHub(); + //Test_RebootServer(); + + return; + } + + + /// + /// API test for 'Test', test RPC function + /// + public void Test_Test() + { + Console.WriteLine("Begin: Test_Test"); + + VpnRpcTest a = new VpnRpcTest() { IntValue_u32 = 12345 }; + + VpnRpcTest b = api.Test(a); + + print_object(b); + + Console.WriteLine("End: Test_Test"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerInfo', Get server information + /// + public void Test_GetServerInfo() + { + Console.WriteLine("Begin: Test_GetServerInfo"); + + VpnRpcServerInfo info = api.GetServerInfo(); + + print_object(info); + + Console.WriteLine("End: Test_GetServerInfo"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerStatus', Get server status + /// + public void Test_GetServerStatus() + { + Console.WriteLine("Begin: Test_GetServerStatus"); + + VpnRpcServerStatus out_rpc_server_status = api.GetServerStatus(); + + print_object(out_rpc_server_status); + + Console.WriteLine("End: Test_GetServerStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateListener', Create a listener + /// + public uint Test_CreateListener() + { + Console.WriteLine("Begin: Test_CreateListener"); + + uint port = (uint)rand.Next(1025, 65534); + + Console.WriteLine("Creating a new listener port: Port " + port); + VpnRpcListener in_rpc_listener = new VpnRpcListener() { Enable_bool = true, Port_u32 = port, }; + VpnRpcListener out_rpc_listener = api.CreateListener(in_rpc_listener); + + Console.WriteLine("Done."); + Console.WriteLine("End: Test_CreateListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return port; + } + + /// + /// API test for 'EnumListener', Enumerating listeners + /// + public void Test_EnumListener() + { + Console.WriteLine("Begin: Test_EnumListener"); + + VpnRpcListenerList out_rpc_listener_list = api.EnumListener(); + + print_object(out_rpc_listener_list); + + Console.WriteLine("End: Test_EnumListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteListener', Delete a listener + /// + public void Test_DeleteListener(uint port) + { + Console.WriteLine("Begin: Test_DeleteListener"); + + Console.WriteLine("Deleting a new listener port: Port" + port); + VpnRpcListener in_rpc_listener = new VpnRpcListener() { Port_u32 = port }; + VpnRpcListener out_rpc_listener = api.DeleteListener(in_rpc_listener); + + Console.WriteLine("Done."); + Console.WriteLine("End: Test_DeleteListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnableListener', Enable / Disable listener + /// + public void Test_EnableListener(uint port, bool enabled) + { + Console.WriteLine("Begin: Test_EnableListener"); + + if (enabled) + { + Console.WriteLine("Enabling listener port = " + port); + } + else + { + Console.WriteLine("Disabling listener port = " + port); + } + + VpnRpcListener in_rpc_listener = new VpnRpcListener() { Port_u32 = port, Enable_bool = enabled }; + VpnRpcListener out_rpc_listener = api.EnableListener(in_rpc_listener); + + Console.WriteLine("Done."); + + Console.WriteLine("End: Test_EnableListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetServerPassword', Set server password + /// + public void Test_SetServerPassword() + { + string password = "microsoft"; + + Console.WriteLine("Begin: Test_SetServerPassword"); + + Console.WriteLine("Set the server administrator password to '" + password + "'."); + + VpnRpcSetPassword in_rpc_set_password = new VpnRpcSetPassword() { PlainTextPassword_str = password }; + VpnRpcSetPassword out_rpc_set_password = api.SetServerPassword(in_rpc_set_password); + + Console.WriteLine("Done."); + + Console.WriteLine("End: Test_SetServerPassword"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetFarmSetting', Set clustering configuration + /// + public void Test_SetFarmSetting() + { + Console.WriteLine("Begin: Test_SetFarmSetting"); + + VpnRpcFarm in_rpc_farm = new VpnRpcFarm() + { + ServerType_u32 = VpnRpcServerType.FarmController, + NumPort_u32 = 2, + Ports_u32 = new uint[] { 443, 444, 445 }, + PublicIp_ip = "1.2.3.4", + ControllerName_str = "controller", + MemberPasswordPlaintext_str = "microsoft", + ControllerPort_u32 = 443, + Weight_u32 = 100, + ControllerOnly_bool = false, + }; + + VpnRpcFarm out_rpc_farm = api.SetFarmSetting(in_rpc_farm); + + Console.WriteLine("End: Test_SetFarmSetting"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetFarmSetting', Get clustering configuration + /// + public void Test_GetFarmSetting() + { + Console.WriteLine("Begin: Test_GetFarmSetting"); + + // VpnRpcFarm in_rpc_farm = new VpnRpcFarm(); + VpnRpcFarm out_rpc_farm = api.GetFarmSetting(); + + print_object(out_rpc_farm); + + Console.WriteLine("End: Test_GetFarmSetting"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetFarmInfo', Get cluster member information + /// + public void Test_GetFarmInfo(uint id) + { + Console.WriteLine("Begin: Test_GetFarmInfo"); + + VpnRpcFarmInfo in_rpc_farm_info = new VpnRpcFarmInfo() { Id_u32 = id }; + VpnRpcFarmInfo out_rpc_farm_info = api.GetFarmInfo(in_rpc_farm_info); + + print_object(out_rpc_farm_info); + + Console.WriteLine("End: Test_GetFarmInfo"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumFarmMember', Enumerate cluster members + /// + public VpnRpcEnumFarm Test_EnumFarmMember() + { + Console.WriteLine("Begin: Test_EnumFarmMember"); + + VpnRpcEnumFarm out_rpc_enum_farm = api.EnumFarmMember(); + + print_object(out_rpc_enum_farm); + + Console.WriteLine("End: Test_EnumFarmMember"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_farm; + } + + /// + /// API test for 'GetFarmConnectionStatus', Get status of connection to cluster controller + /// + public void Test_GetFarmConnectionStatus() + { + Console.WriteLine("Begin: Test_GetFarmConnectionStatus"); + + VpnRpcFarmConnectionStatus out_rpc_farm_connection_status = api.GetFarmConnectionStatus(); + + print_object(out_rpc_farm_connection_status); + + Console.WriteLine("End: Test_GetFarmConnectionStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetServerCert', Set the server certification + /// + public void Test_SetServerCert() + { + Console.WriteLine("Begin: Test_SetServerCert"); + + VpnRpcKeyPair in_rpc_key_pair = new VpnRpcKeyPair() + { + Cert_bin = new byte[] + { +0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x43,0x45,0x52,0x54,0x49, +0x46,0x49,0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x44, +0x72,0x6a,0x43,0x43,0x41,0x70,0x61,0x67,0x41,0x77,0x49,0x42,0x41,0x67,0x49,0x42, +0x41,0x44,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42, +0x41,0x51,0x73,0x46,0x41,0x44,0x42,0x57,0x4d,0x51,0x77,0x77,0x43,0x67,0x59,0x44, +0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x0a,0x46,0x54,0x41, +0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72,0x2b,0x4f, +0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x4d,0x41,0x6b, +0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78,0x45,0x44,0x41, +0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69,0x0a,0x59,0x58, +0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41, +0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77,0x48,0x68, +0x63,0x4e,0x4d,0x54,0x67,0x78,0x4d,0x44,0x45,0x78,0x4d,0x6a,0x4d,0x7a,0x4e,0x54, +0x41,0x78,0x57,0x68,0x63,0x4e,0x4e,0x44,0x49,0x78,0x4d,0x44,0x41,0x31,0x0a,0x4d, +0x6a,0x4d,0x7a,0x4e,0x54,0x41,0x78,0x57,0x6a,0x42,0x57,0x4d,0x51,0x77,0x77,0x43, +0x67,0x59,0x44,0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x46, +0x54,0x41,0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72, +0x2b,0x4f,0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x0a, +0x4d,0x41,0x6b,0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78, +0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69, +0x59,0x58,0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56, +0x42,0x41,0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77, +0x0a,0x67,0x67,0x45,0x69,0x4d,0x41,0x30,0x47,0x43,0x53,0x71,0x47,0x53,0x49,0x62, +0x33,0x44,0x51,0x45,0x42,0x41,0x51,0x55,0x41,0x41,0x34,0x49,0x42,0x44,0x77,0x41, +0x77,0x67,0x67,0x45,0x4b,0x41,0x6f,0x49,0x42,0x41,0x51,0x44,0x58,0x45,0x63,0x76, +0x72,0x59,0x37,0x56,0x2b,0x7a,0x64,0x42,0x79,0x72,0x64,0x4e,0x78,0x4a,0x59,0x45, +0x6d,0x0a,0x61,0x41,0x4e,0x59,0x55,0x4f,0x37,0x76,0x57,0x34,0x68,0x64,0x41,0x35, +0x49,0x42,0x49,0x46,0x6d,0x4d,0x70,0x6e,0x62,0x79,0x69,0x4e,0x6e,0x5a,0x77,0x36, +0x57,0x39,0x6f,0x61,0x67,0x78,0x33,0x5a,0x49,0x65,0x65,0x48,0x56,0x59,0x62,0x52, +0x69,0x4b,0x36,0x41,0x66,0x46,0x74,0x53,0x31,0x32,0x2b,0x45,0x31,0x4d,0x59,0x31, +0x64,0x32,0x0a,0x61,0x71,0x51,0x31,0x53,0x72,0x49,0x43,0x39,0x51,0x35,0x55,0x6e, +0x5a,0x61,0x42,0x72,0x62,0x57,0x32,0x32,0x6d,0x4e,0x75,0x6c,0x4d,0x34,0x2f,0x6c, +0x49,0x4a,0x72,0x48,0x70,0x51,0x55,0x68,0x50,0x78,0x6f,0x62,0x79,0x34,0x2f,0x36, +0x4e,0x41,0x37,0x71,0x4b,0x67,0x55,0x48,0x69,0x79,0x4f,0x64,0x33,0x4a,0x42,0x70, +0x4f,0x66,0x77,0x0a,0x38,0x54,0x76,0x53,0x74,0x51,0x78,0x34,0x4c,0x38,0x59,0x64, +0x4b,0x51,0x35,0x68,0x74,0x7a,0x6b,0x32,0x68,0x70,0x52,0x4a,0x4c,0x30,0x6c,0x4b, +0x67,0x47,0x31,0x57,0x34,0x75,0x4b,0x32,0x39,0x39,0x42,0x74,0x7a,0x64,0x41,0x67, +0x66,0x42,0x76,0x43,0x54,0x33,0x41,0x31,0x61,0x53,0x70,0x6a,0x49,0x47,0x74,0x6e, +0x69,0x72,0x49,0x31,0x0a,0x46,0x4c,0x52,0x58,0x47,0x79,0x38,0x31,0x31,0x57,0x4a, +0x39,0x4a,0x68,0x68,0x34,0x41,0x4b,0x4c,0x66,0x79,0x56,0x70,0x42,0x4a,0x67,0x65, +0x34,0x73,0x56,0x72,0x36,0x4e,0x75,0x75,0x49,0x66,0x32,0x71,0x47,0x31,0x6f,0x79, +0x31,0x30,0x70,0x61,0x51,0x4e,0x65,0x71,0x32,0x33,0x55,0x47,0x61,0x59,0x74,0x2f, +0x7a,0x55,0x56,0x4a,0x77,0x0a,0x55,0x74,0x30,0x57,0x45,0x6b,0x58,0x38,0x48,0x4f, +0x63,0x62,0x33,0x75,0x49,0x6f,0x54,0x6d,0x61,0x4f,0x34,0x72,0x48,0x42,0x55,0x4a, +0x71,0x45,0x79,0x39,0x51,0x58,0x7a,0x53,0x57,0x77,0x43,0x35,0x78,0x45,0x43,0x64, +0x37,0x43,0x4a,0x53,0x53,0x68,0x31,0x30,0x4f,0x75,0x6e,0x6c,0x75,0x4c,0x32,0x4d, +0x47,0x65,0x5a,0x47,0x6e,0x76,0x0a,0x41,0x67,0x4d,0x42,0x41,0x41,0x47,0x6a,0x67, +0x59,0x59,0x77,0x67,0x59,0x4d,0x77,0x44,0x77,0x59,0x44,0x56,0x52,0x30,0x54,0x41, +0x51,0x48,0x2f,0x42,0x41,0x55,0x77,0x41,0x77,0x45,0x42,0x2f,0x7a,0x41,0x4c,0x42, +0x67,0x4e,0x56,0x48,0x51,0x38,0x45,0x42,0x41,0x4d,0x43,0x41,0x66,0x59,0x77,0x59, +0x77,0x59,0x44,0x56,0x52,0x30,0x6c,0x0a,0x42,0x46,0x77,0x77,0x57,0x67,0x59,0x49, +0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x45,0x47,0x43,0x43,0x73,0x47, +0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x43,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46, +0x42,0x51,0x63,0x44,0x41,0x77,0x59,0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48, +0x41,0x77,0x51,0x47,0x43,0x43,0x73,0x47,0x0a,0x41,0x51,0x55,0x46,0x42,0x77,0x4d, +0x46,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46,0x42,0x51,0x63,0x44,0x42,0x67,0x59, +0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x63,0x47,0x43,0x43,0x73, +0x47,0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x49,0x42,0x67,0x67,0x72,0x42,0x67,0x45, +0x46,0x42,0x51,0x63,0x44,0x43,0x54,0x41,0x4e,0x0a,0x42,0x67,0x6b,0x71,0x68,0x6b, +0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x73,0x46,0x41,0x41,0x4f,0x43,0x41,0x51, +0x45,0x41,0x46,0x6d,0x34,0x37,0x47,0x55,0x70,0x50,0x57,0x35,0x2b,0x37,0x69,0x46, +0x74,0x69,0x6c,0x6f,0x6b,0x35,0x32,0x49,0x6f,0x54,0x57,0x72,0x74,0x46,0x67,0x32, +0x79,0x69,0x36,0x6b,0x49,0x32,0x69,0x52,0x4e,0x51,0x0a,0x4b,0x75,0x67,0x48,0x55, +0x49,0x4f,0x34,0x4b,0x53,0x71,0x4a,0x56,0x42,0x50,0x38,0x61,0x4b,0x4f,0x61,0x54, +0x5a,0x47,0x45,0x31,0x4b,0x4d,0x68,0x2f,0x59,0x6a,0x68,0x36,0x71,0x2f,0x67,0x50, +0x61,0x6c,0x67,0x64,0x2f,0x38,0x44,0x6d,0x72,0x78,0x53,0x4a,0x6d,0x55,0x78,0x33, +0x62,0x4e,0x62,0x38,0x52,0x59,0x36,0x70,0x4b,0x7a,0x74,0x0a,0x5a,0x64,0x75,0x53, +0x61,0x53,0x2b,0x57,0x55,0x30,0x59,0x74,0x2b,0x6c,0x47,0x35,0x76,0x56,0x67,0x61, +0x70,0x48,0x45,0x71,0x36,0x79,0x71,0x4c,0x62,0x65,0x56,0x78,0x51,0x4c,0x75,0x62, +0x54,0x69,0x6e,0x4f,0x66,0x56,0x56,0x5a,0x58,0x79,0x45,0x43,0x59,0x47,0x4d,0x73, +0x59,0x71,0x65,0x6e,0x4a,0x6a,0x4e,0x63,0x62,0x49,0x5a,0x4e,0x0a,0x79,0x4d,0x75, +0x72,0x46,0x63,0x67,0x30,0x34,0x36,0x4f,0x34,0x59,0x79,0x68,0x56,0x79,0x71,0x53, +0x69,0x74,0x43,0x59,0x37,0x68,0x2f,0x65,0x71,0x67,0x6b,0x50,0x4a,0x51,0x30,0x68, +0x6b,0x70,0x39,0x45,0x64,0x51,0x77,0x62,0x6e,0x38,0x56,0x6c,0x66,0x78,0x64,0x42, +0x58,0x77,0x51,0x34,0x4e,0x48,0x4b,0x30,0x4a,0x56,0x46,0x2f,0x33,0x0a,0x71,0x48, +0x61,0x68,0x4e,0x48,0x4f,0x35,0x64,0x62,0x4a,0x5a,0x57,0x59,0x41,0x62,0x42,0x44, +0x70,0x32,0x51,0x45,0x53,0x70,0x76,0x6f,0x2b,0x38,0x33,0x6c,0x68,0x34,0x64,0x6e, +0x58,0x6a,0x46,0x58,0x4d,0x43,0x48,0x76,0x52,0x68,0x35,0x31,0x79,0x2f,0x54,0x71, +0x79,0x42,0x34,0x56,0x76,0x72,0x52,0x4b,0x49,0x4b,0x74,0x54,0x6f,0x7a,0x0a,0x5a, +0x6a,0x48,0x59,0x49,0x63,0x62,0x6a,0x76,0x53,0x58,0x4d,0x7a,0x61,0x44,0x50,0x6a, +0x50,0x63,0x5a,0x47,0x6a,0x42,0x4a,0x6c,0x47,0x36,0x43,0x76,0x44,0x34,0x4c,0x6d, +0x59,0x7a,0x72,0x6b,0x48,0x34,0x31,0x63,0x7a,0x72,0x34,0x57,0x41,0x3d,0x3d,0x0a, +0x2d,0x2d,0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x43,0x45,0x52,0x54,0x49,0x46,0x49, +0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a + }, + Key_bin = new byte[] + { +0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x50,0x52,0x49,0x56,0x41, +0x54,0x45,0x20,0x4b,0x45,0x59,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x45, +0x76,0x67,0x49,0x42,0x41,0x44,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47, +0x39,0x77,0x30,0x42,0x41,0x51,0x45,0x46,0x41,0x41,0x53,0x43,0x42,0x4b,0x67,0x77, +0x67,0x67,0x53,0x6b,0x41,0x67,0x45,0x41,0x41,0x6f,0x49,0x42,0x41,0x51,0x44,0x58, +0x45,0x63,0x76,0x72,0x59,0x37,0x56,0x2b,0x7a,0x64,0x42,0x79,0x0a,0x72,0x64,0x4e, +0x78,0x4a,0x59,0x45,0x6d,0x61,0x41,0x4e,0x59,0x55,0x4f,0x37,0x76,0x57,0x34,0x68, +0x64,0x41,0x35,0x49,0x42,0x49,0x46,0x6d,0x4d,0x70,0x6e,0x62,0x79,0x69,0x4e,0x6e, +0x5a,0x77,0x36,0x57,0x39,0x6f,0x61,0x67,0x78,0x33,0x5a,0x49,0x65,0x65,0x48,0x56, +0x59,0x62,0x52,0x69,0x4b,0x36,0x41,0x66,0x46,0x74,0x53,0x31,0x32,0x0a,0x2b,0x45, +0x31,0x4d,0x59,0x31,0x64,0x32,0x61,0x71,0x51,0x31,0x53,0x72,0x49,0x43,0x39,0x51, +0x35,0x55,0x6e,0x5a,0x61,0x42,0x72,0x62,0x57,0x32,0x32,0x6d,0x4e,0x75,0x6c,0x4d, +0x34,0x2f,0x6c,0x49,0x4a,0x72,0x48,0x70,0x51,0x55,0x68,0x50,0x78,0x6f,0x62,0x79, +0x34,0x2f,0x36,0x4e,0x41,0x37,0x71,0x4b,0x67,0x55,0x48,0x69,0x79,0x4f,0x0a,0x64, +0x33,0x4a,0x42,0x70,0x4f,0x66,0x77,0x38,0x54,0x76,0x53,0x74,0x51,0x78,0x34,0x4c, +0x38,0x59,0x64,0x4b,0x51,0x35,0x68,0x74,0x7a,0x6b,0x32,0x68,0x70,0x52,0x4a,0x4c, +0x30,0x6c,0x4b,0x67,0x47,0x31,0x57,0x34,0x75,0x4b,0x32,0x39,0x39,0x42,0x74,0x7a, +0x64,0x41,0x67,0x66,0x42,0x76,0x43,0x54,0x33,0x41,0x31,0x61,0x53,0x70,0x6a,0x0a, +0x49,0x47,0x74,0x6e,0x69,0x72,0x49,0x31,0x46,0x4c,0x52,0x58,0x47,0x79,0x38,0x31, +0x31,0x57,0x4a,0x39,0x4a,0x68,0x68,0x34,0x41,0x4b,0x4c,0x66,0x79,0x56,0x70,0x42, +0x4a,0x67,0x65,0x34,0x73,0x56,0x72,0x36,0x4e,0x75,0x75,0x49,0x66,0x32,0x71,0x47, +0x31,0x6f,0x79,0x31,0x30,0x70,0x61,0x51,0x4e,0x65,0x71,0x32,0x33,0x55,0x47,0x61, +0x0a,0x59,0x74,0x2f,0x7a,0x55,0x56,0x4a,0x77,0x55,0x74,0x30,0x57,0x45,0x6b,0x58, +0x38,0x48,0x4f,0x63,0x62,0x33,0x75,0x49,0x6f,0x54,0x6d,0x61,0x4f,0x34,0x72,0x48, +0x42,0x55,0x4a,0x71,0x45,0x79,0x39,0x51,0x58,0x7a,0x53,0x57,0x77,0x43,0x35,0x78, +0x45,0x43,0x64,0x37,0x43,0x4a,0x53,0x53,0x68,0x31,0x30,0x4f,0x75,0x6e,0x6c,0x75, +0x4c,0x0a,0x32,0x4d,0x47,0x65,0x5a,0x47,0x6e,0x76,0x41,0x67,0x4d,0x42,0x41,0x41, +0x45,0x43,0x67,0x67,0x45,0x41,0x54,0x77,0x34,0x52,0x6f,0x52,0x4c,0x6a,0x73,0x68, +0x72,0x42,0x56,0x6f,0x59,0x69,0x78,0x4f,0x4a,0x2b,0x57,0x4c,0x6d,0x2f,0x45,0x51, +0x57,0x65,0x37,0x6f,0x6a,0x38,0x31,0x51,0x50,0x73,0x39,0x56,0x45,0x49,0x32,0x62, +0x53,0x4f,0x0a,0x34,0x4a,0x51,0x42,0x55,0x42,0x53,0x6b,0x70,0x64,0x48,0x34,0x57, +0x32,0x77,0x51,0x75,0x2f,0x61,0x58,0x57,0x38,0x75,0x75,0x53,0x39,0x45,0x43,0x6d, +0x6d,0x41,0x41,0x75,0x45,0x79,0x4a,0x54,0x56,0x7a,0x75,0x31,0x32,0x35,0x58,0x73, +0x65,0x63,0x6c,0x44,0x41,0x55,0x38,0x49,0x55,0x70,0x54,0x2b,0x70,0x4c,0x35,0x79, +0x70,0x37,0x34,0x0a,0x45,0x62,0x76,0x4e,0x48,0x48,0x33,0x67,0x65,0x72,0x4f,0x67, +0x78,0x76,0x49,0x6a,0x50,0x64,0x67,0x77,0x62,0x66,0x6d,0x4d,0x49,0x59,0x48,0x62, +0x56,0x70,0x6e,0x49,0x30,0x77,0x32,0x42,0x43,0x44,0x51,0x76,0x74,0x64,0x64,0x57, +0x6f,0x42,0x74,0x41,0x33,0x43,0x54,0x6a,0x63,0x2f,0x43,0x56,0x67,0x73,0x47,0x77, +0x33,0x43,0x4e,0x72,0x0a,0x46,0x78,0x41,0x46,0x35,0x73,0x4a,0x34,0x63,0x5a,0x4c, +0x6e,0x5a,0x31,0x45,0x36,0x69,0x74,0x4c,0x54,0x50,0x69,0x6f,0x6a,0x74,0x76,0x48, +0x48,0x34,0x61,0x64,0x6d,0x68,0x68,0x43,0x61,0x42,0x49,0x78,0x76,0x47,0x2f,0x53, +0x6e,0x59,0x77,0x4e,0x35,0x38,0x37,0x55,0x5a,0x6d,0x37,0x4c,0x57,0x50,0x61,0x67, +0x4c,0x41,0x33,0x67,0x69,0x0a,0x48,0x4b,0x4f,0x2b,0x4b,0x79,0x42,0x51,0x39,0x33, +0x31,0x4e,0x4d,0x61,0x65,0x6a,0x36,0x6d,0x75,0x75,0x46,0x32,0x30,0x32,0x76,0x34, +0x37,0x6c,0x57,0x6b,0x64,0x50,0x4f,0x6e,0x52,0x43,0x69,0x6f,0x4d,0x58,0x30,0x63, +0x31,0x6a,0x36,0x76,0x32,0x61,0x59,0x34,0x34,0x77,0x55,0x4b,0x71,0x39,0x4d,0x52, +0x67,0x6f,0x52,0x76,0x4a,0x37,0x0a,0x41,0x39,0x77,0x65,0x72,0x4c,0x6b,0x68,0x35, +0x78,0x78,0x35,0x35,0x32,0x4f,0x74,0x71,0x50,0x36,0x73,0x61,0x6d,0x75,0x47,0x44, +0x52,0x78,0x31,0x42,0x70,0x36,0x53,0x4f,0x70,0x68,0x43,0x45,0x50,0x48,0x59,0x67, +0x51,0x4b,0x42,0x67,0x51,0x44,0x36,0x33,0x65,0x2b,0x52,0x75,0x6c,0x36,0x46,0x78, +0x47,0x43,0x76,0x67,0x70,0x6b,0x33,0x0a,0x57,0x67,0x2f,0x54,0x31,0x77,0x2f,0x59, +0x4b,0x6b,0x79,0x4f,0x49,0x46,0x4c,0x63,0x46,0x4c,0x57,0x71,0x42,0x44,0x71,0x6c, +0x6e,0x58,0x65,0x63,0x6c,0x6b,0x50,0x4b,0x6a,0x57,0x4e,0x2f,0x32,0x70,0x4a,0x6d, +0x4f,0x31,0x63,0x46,0x63,0x44,0x4a,0x46,0x59,0x64,0x32,0x45,0x49,0x45,0x72,0x76, +0x42,0x57,0x54,0x34,0x51,0x39,0x4d,0x42,0x0a,0x4e,0x35,0x6c,0x44,0x6b,0x47,0x75, +0x6a,0x34,0x2f,0x6b,0x68,0x56,0x6c,0x79,0x6e,0x77,0x62,0x64,0x42,0x6e,0x47,0x43, +0x34,0x61,0x34,0x48,0x4a,0x49,0x4a,0x76,0x61,0x35,0x63,0x70,0x49,0x63,0x57,0x65, +0x4a,0x72,0x35,0x61,0x57,0x33,0x69,0x44,0x36,0x68,0x53,0x73,0x61,0x6c,0x79,0x55, +0x76,0x4a,0x4d,0x6d,0x64,0x4d,0x42,0x6e,0x47,0x0a,0x37,0x2b,0x50,0x65,0x53,0x2b, +0x4e,0x73,0x4b,0x30,0x61,0x63,0x31,0x67,0x33,0x4d,0x6c,0x56,0x35,0x42,0x41,0x32, +0x70,0x55,0x54,0x77,0x4b,0x42,0x67,0x51,0x44,0x62,0x65,0x46,0x6d,0x2b,0x46,0x46, +0x35,0x62,0x76,0x6f,0x4b,0x7a,0x49,0x4c,0x6c,0x31,0x62,0x79,0x6b,0x6c,0x52,0x6b, +0x69,0x76,0x7a,0x6b,0x62,0x7a,0x49,0x6b,0x41,0x78,0x0a,0x35,0x56,0x6b,0x74,0x67, +0x36,0x4a,0x35,0x63,0x76,0x38,0x44,0x35,0x2b,0x72,0x71,0x50,0x75,0x6a,0x4f,0x66, +0x39,0x67,0x42,0x6a,0x4e,0x37,0x70,0x64,0x78,0x39,0x39,0x35,0x6b,0x47,0x49,0x78, +0x5a,0x39,0x6d,0x31,0x68,0x57,0x69,0x78,0x55,0x55,0x31,0x55,0x6f,0x38,0x72,0x70, +0x39,0x4a,0x69,0x47,0x4f,0x36,0x72,0x65,0x31,0x77,0x69,0x0a,0x6a,0x56,0x2f,0x4c, +0x31,0x64,0x37,0x55,0x66,0x39,0x48,0x6a,0x65,0x61,0x70,0x4f,0x46,0x62,0x34,0x6b, +0x72,0x71,0x52,0x58,0x54,0x65,0x75,0x4d,0x6e,0x35,0x35,0x44,0x33,0x64,0x70,0x79, +0x6a,0x51,0x4e,0x43,0x30,0x5a,0x50,0x72,0x61,0x6d,0x58,0x64,0x38,0x31,0x57,0x6f, +0x6f,0x56,0x77,0x58,0x59,0x41,0x66,0x69,0x46,0x76,0x4c,0x49,0x0a,0x6f,0x66,0x31, +0x37,0x51,0x67,0x67,0x49,0x59,0x51,0x4b,0x42,0x67,0x51,0x44,0x59,0x55,0x67,0x67, +0x43,0x34,0x58,0x49,0x67,0x5a,0x76,0x58,0x34,0x59,0x65,0x55,0x38,0x6c,0x61,0x79, +0x51,0x50,0x79,0x4b,0x71,0x67,0x38,0x37,0x2f,0x76,0x31,0x2b,0x7a,0x35,0x79,0x65, +0x2f,0x4d,0x32,0x5a,0x65,0x36,0x53,0x6e,0x37,0x48,0x4a,0x66,0x59,0x0a,0x55,0x5a, +0x4d,0x36,0x37,0x48,0x37,0x52,0x4b,0x4e,0x6f,0x68,0x46,0x6c,0x35,0x43,0x39,0x65, +0x44,0x4e,0x7a,0x67,0x72,0x50,0x6b,0x52,0x63,0x2f,0x2f,0x54,0x77,0x32,0x45,0x48, +0x74,0x59,0x68,0x33,0x42,0x4b,0x49,0x6f,0x72,0x77,0x39,0x45,0x64,0x78,0x59,0x4e, +0x6c,0x6b,0x2b,0x6a,0x4e,0x73,0x30,0x30,0x64,0x57,0x35,0x34,0x64,0x39,0x0a,0x65, +0x69,0x69,0x7a,0x7a,0x78,0x59,0x34,0x34,0x2f,0x41,0x32,0x70,0x39,0x52,0x49,0x4d, +0x67,0x79,0x35,0x49,0x52,0x77,0x76,0x53,0x73,0x6d,0x50,0x67,0x61,0x71,0x34,0x6f, +0x4b,0x4d,0x64,0x54,0x4e,0x4d,0x4f,0x73,0x30,0x4a,0x77,0x65,0x79,0x50,0x72,0x42, +0x65,0x49,0x41,0x72,0x62,0x46,0x43,0x67,0x51,0x4b,0x42,0x67,0x51,0x43,0x71,0x0a, +0x57,0x30,0x34,0x56,0x33,0x49,0x75,0x74,0x33,0x55,0x42,0x6f,0x75,0x50,0x4d,0x63, +0x63,0x38,0x2f,0x56,0x62,0x69,0x77,0x48,0x77,0x79,0x2b,0x52,0x6c,0x4c,0x6d,0x4e, +0x77,0x59,0x41,0x71,0x63,0x79,0x35,0x50,0x35,0x58,0x4b,0x4c,0x33,0x70,0x36,0x62, +0x65,0x33,0x2b,0x4d,0x6f,0x76,0x48,0x52,0x71,0x6a,0x35,0x78,0x72,0x4a,0x54,0x57, +0x0a,0x54,0x6a,0x2f,0x36,0x59,0x61,0x51,0x73,0x31,0x2b,0x72,0x74,0x63,0x51,0x45, +0x61,0x74,0x64,0x34,0x4b,0x50,0x66,0x64,0x78,0x53,0x2f,0x63,0x66,0x52,0x74,0x38, +0x71,0x74,0x75,0x42,0x77,0x51,0x61,0x2f,0x34,0x39,0x4d,0x72,0x41,0x4c,0x76,0x57, +0x43,0x4c,0x53,0x42,0x75,0x4b,0x74,0x33,0x49,0x49,0x75,0x53,0x2f,0x51,0x44,0x74, +0x43,0x0a,0x5a,0x4e,0x67,0x6d,0x36,0x4d,0x78,0x71,0x4e,0x6e,0x49,0x43,0x58,0x35, +0x46,0x34,0x36,0x6d,0x52,0x49,0x52,0x42,0x42,0x4f,0x32,0x4b,0x7a,0x6c,0x30,0x33, +0x68,0x62,0x51,0x6c,0x71,0x58,0x4c,0x5a,0x63,0x38,0x6f,0x51,0x4b,0x42,0x67,0x43, +0x53,0x77,0x66,0x46,0x7a,0x68,0x48,0x76,0x78,0x36,0x68,0x69,0x64,0x57,0x67,0x48, +0x4a,0x63,0x0a,0x77,0x79,0x76,0x64,0x6e,0x70,0x58,0x78,0x36,0x5a,0x4c,0x6e,0x6f, +0x61,0x7a,0x61,0x6f,0x48,0x47,0x74,0x4d,0x47,0x43,0x45,0x5a,0x49,0x50,0x66,0x6a, +0x4c,0x42,0x63,0x30,0x4d,0x74,0x79,0x45,0x64,0x53,0x4c,0x78,0x54,0x6c,0x35,0x59, +0x70,0x78,0x6f,0x6d,0x43,0x46,0x55,0x4d,0x33,0x55,0x63,0x59,0x4e,0x2f,0x50,0x5a, +0x66,0x58,0x41,0x0a,0x6d,0x36,0x31,0x45,0x6d,0x71,0x53,0x53,0x4d,0x56,0x63,0x47, +0x50,0x67,0x65,0x2f,0x43,0x34,0x44,0x42,0x5a,0x59,0x6a,0x53,0x45,0x71,0x62,0x67, +0x37,0x6d,0x73,0x52,0x30,0x33,0x37,0x42,0x58,0x54,0x48,0x6b,0x78,0x44,0x62,0x33, +0x71,0x48,0x46,0x54,0x6f,0x30,0x6b,0x48,0x57,0x4a,0x66,0x34,0x39,0x59,0x77,0x32, +0x73,0x77,0x6a,0x54,0x0a,0x72,0x4f,0x38,0x46,0x46,0x44,0x52,0x56,0x50,0x44,0x4c, +0x5a,0x61,0x37,0x36,0x47,0x67,0x79,0x41,0x55,0x4a,0x38,0x55,0x63,0x0a,0x2d,0x2d, +0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x50,0x52,0x49,0x56,0x41,0x54,0x45,0x20,0x4b, +0x45,0x59,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a + }, + }; + + VpnRpcKeyPair out_rpc_key_pair = api.SetServerCert(in_rpc_key_pair); + + print_object(out_rpc_key_pair); + + Console.WriteLine("End: Test_SetServerCert"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerCert', Get the server certification + /// + public void Test_GetServerCert() + { + Console.WriteLine("Begin: Test_GetServerCert"); + + VpnRpcKeyPair out_rpc_key_pair = api.GetServerCert(); + + print_object(out_rpc_key_pair); + + Console.WriteLine("End: Test_GetServerCert"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerCipher', Get cipher for SSL + /// + public void Test_GetServerCipher() + { + Console.WriteLine("Begin: Test_GetServerCipher"); + + VpnRpcStr out_rpc_str = api.GetServerCipher(); + + print_object(out_rpc_str); + + Console.WriteLine("End: Test_GetServerCipher"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetServerCipher', Set cipher for SSL to the server + /// + public void Test_SetServerCipher() + { + Console.WriteLine("Begin: Test_SetServerCipher"); + + VpnRpcStr in_rpc_str = new VpnRpcStr() { String_str = "RC4-MD5" }; + VpnRpcStr out_rpc_str = api.SetServerCipher(in_rpc_str); + + print_object(out_rpc_str); + + Console.WriteLine("End: Test_SetServerCipher"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateHub', Create a hub + /// + public string Test_CreateHub() + { + string hub_name = "Test_" + rand.Next(100000, 999999); + Console.WriteLine("Begin: Test_CreateHub"); + + VpnRpcCreateHub in_rpc_create_hub = new VpnRpcCreateHub() + { + HubName_str = hub_name, + HubType_u32 = VpnRpcHubType.Standalone, + Online_bool = true, + AdminPasswordPlainText_str = "microsoft", + MaxSession_u32 = 123, + NoEnum_bool = false, + }; + + VpnRpcCreateHub out_rpc_create_hub = api.CreateHub(in_rpc_create_hub); + + print_object(out_rpc_create_hub); + + Console.WriteLine("End: Test_CreateHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return hub_name; + } + + /// + /// API test for 'SetHub', Set hub configuration + /// + public void Test_SetHub() + { + Console.WriteLine("Begin: Test_SetHub"); + + VpnRpcCreateHub in_rpc_create_hub = new VpnRpcCreateHub() + { + HubName_str = hub_name, + AdminPasswordPlainText_str = "aho", + HubType_u32 = VpnRpcHubType.Standalone, + NoEnum_bool = false, + MaxSession_u32 = 128, + Online_bool = true, + }; + + VpnRpcCreateHub out_rpc_create_hub = api.SetHub(in_rpc_create_hub); + + print_object(out_rpc_create_hub); + + Console.WriteLine("End: Test_SetHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHub', Get hub configuration + /// + public void Test_GetHub() + { + Console.WriteLine("Begin: Test_GetHub"); + + VpnRpcCreateHub in_rpc_create_hub = new VpnRpcCreateHub() + { + HubName_str = hub_name, + }; + + VpnRpcCreateHub out_rpc_create_hub = api.GetHub(in_rpc_create_hub); + + print_object(out_rpc_create_hub); + + Console.WriteLine("End: Test_GetHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumHub', Enumerate hubs + /// + public void Test_EnumHub() + { + Console.WriteLine("Begin: Test_EnumHub"); + + VpnRpcEnumHub out_rpc_enum_hub = api.EnumHub(); + + print_object(out_rpc_enum_hub); + + Console.WriteLine("End: Test_EnumHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteHub', Delete a hub + /// + public void Test_DeleteHub() + { + Console.WriteLine("Begin: Test_DeleteHub"); + + VpnRpcDeleteHub in_rpc_delete_hub = new VpnRpcDeleteHub() + { + HubName_str = hub_name, + }; + VpnRpcDeleteHub out_rpc_delete_hub = api.DeleteHub(in_rpc_delete_hub); + + print_object(out_rpc_delete_hub); + + Console.WriteLine("End: Test_DeleteHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubRadius', Get Radius options of the hub + /// + public void Test_GetHubRadius() + { + Console.WriteLine("Begin: Test_GetHubRadius"); + + VpnRpcRadius in_rpc_radius = new VpnRpcRadius() + { + HubName_str = hub_name, + }; + VpnRpcRadius out_rpc_radius = api.GetHubRadius(in_rpc_radius); + + print_object(out_rpc_radius); + + Console.WriteLine("End: Test_GetHubRadius"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubRadius', Set Radius options of the hub + /// + public void Test_SetHubRadius() + { + Console.WriteLine("Begin: Test_SetHubRadius"); + + VpnRpcRadius in_rpc_radius = new VpnRpcRadius() + { + HubName_str = hub_name, + RadiusServerName_str = "1.2.3.4", + RadiusPort_u32 = 1234, + RadiusSecret_str = "microsoft", + RadiusRetryInterval_u32 = 1000, + }; + VpnRpcRadius out_rpc_radius = api.SetHubRadius(in_rpc_radius); + + print_object(out_rpc_radius); + + Console.WriteLine("End: Test_SetHubRadius"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumConnection', Enumerate connections + /// + public VpnRpcEnumConnection Test_EnumConnection() + { + Console.WriteLine("Begin: Test_EnumConnection"); + + VpnRpcEnumConnection out_rpc_enum_connection = api.EnumConnection(); + + print_object(out_rpc_enum_connection); + + Console.WriteLine("End: Test_EnumConnection"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_connection; + } + + /// + /// API test for 'DisconnectConnection', Disconnect a connection + /// + public void Test_DisconnectConnection(string connection_id) + { + Console.WriteLine("Begin: Test_DisconnectConnection"); + + VpnRpcDisconnectConnection in_rpc_disconnect_connection = new VpnRpcDisconnectConnection() + { + Name_str = connection_id, + }; + VpnRpcDisconnectConnection out_rpc_disconnect_connection = api.DisconnectConnection(in_rpc_disconnect_connection); + + print_object(out_rpc_disconnect_connection); + + Console.WriteLine("End: Test_DisconnectConnection"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetConnectionInfo', Get connection information + /// + public void Test_GetConnectionInfo(string name) + { + Console.WriteLine("Begin: Test_GetConnectionInfo"); + + VpnRpcConnectionInfo in_rpc_connection_info = new VpnRpcConnectionInfo() + { + Name_str = name, + }; + VpnRpcConnectionInfo out_rpc_connection_info = api.GetConnectionInfo(in_rpc_connection_info); + + print_object(out_rpc_connection_info); + + Console.WriteLine("End: Test_GetConnectionInfo"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubOnline', Make a hub on-line or off-line + /// + public void Test_SetHubOnline() + { + Console.WriteLine("Begin: Test_SetHubOnline"); + + VpnRpcSetHubOnline in_rpc_set_hub_online = new VpnRpcSetHubOnline() + { + HubName_str = hub_name, + Online_bool = true, + }; + VpnRpcSetHubOnline out_rpc_set_hub_online = api.SetHubOnline(in_rpc_set_hub_online); + + print_object(out_rpc_set_hub_online); + + Console.WriteLine("End: Test_SetHubOnline"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubStatus', Get hub status + /// + public void Test_GetHubStatus() + { + Console.WriteLine("Begin: Test_GetHubStatus"); + + VpnRpcHubStatus in_rpc_hub_status = new VpnRpcHubStatus() + { + HubName_str = hub_name, + }; + VpnRpcHubStatus out_rpc_hub_status = api.GetHubStatus(in_rpc_hub_status); + + print_object(out_rpc_hub_status); + + Console.WriteLine("End: Test_GetHubStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubLog', Set logging configuration into the hub + /// + public void Test_SetHubLog(VpnRpcHubLog in_rpc_hub_log) + { + Console.WriteLine("Begin: Test_SetHubLog"); + + VpnRpcHubLog out_rpc_hub_log = api.SetHubLog(in_rpc_hub_log); + + print_object(out_rpc_hub_log); + + Console.WriteLine("End: Test_SetHubLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubLog', Get logging configuration of the hub + /// + public VpnRpcHubLog Test_GetHubLog() + { + Console.WriteLine("Begin: Test_GetHubLog"); + + VpnRpcHubLog in_rpc_hub_log = new VpnRpcHubLog() + { + HubName_str = hub_name, + }; + VpnRpcHubLog out_rpc_hub_log = api.GetHubLog(in_rpc_hub_log); + + print_object(out_rpc_hub_log); + + Console.WriteLine("End: Test_GetHubLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_hub_log; + } + + /// + /// API test for 'AddCa', Add CA(Certificate Authority) into the hub + /// + public void Test_AddCa() + { + Console.WriteLine("Begin: Test_AddCa"); + + VpnRpcHubAddCA in_rpc_hub_add_ca = new VpnRpcHubAddCA() + { + HubName_str = hub_name, + Cert_bin = new byte[] + { +0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x43,0x45,0x52,0x54,0x49, +0x46,0x49,0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x44, +0x72,0x6a,0x43,0x43,0x41,0x70,0x61,0x67,0x41,0x77,0x49,0x42,0x41,0x67,0x49,0x42, +0x41,0x44,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42, +0x41,0x51,0x73,0x46,0x41,0x44,0x42,0x57,0x4d,0x51,0x77,0x77,0x43,0x67,0x59,0x44, +0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x0a,0x46,0x54,0x41, +0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72,0x2b,0x4f, +0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x4d,0x41,0x6b, +0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78,0x45,0x44,0x41, +0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69,0x0a,0x59,0x58, +0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41, +0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77,0x48,0x68, +0x63,0x4e,0x4d,0x54,0x67,0x78,0x4d,0x44,0x45,0x78,0x4d,0x6a,0x4d,0x7a,0x4e,0x54, +0x41,0x78,0x57,0x68,0x63,0x4e,0x4e,0x44,0x49,0x78,0x4d,0x44,0x41,0x31,0x0a,0x4d, +0x6a,0x4d,0x7a,0x4e,0x54,0x41,0x78,0x57,0x6a,0x42,0x57,0x4d,0x51,0x77,0x77,0x43, +0x67,0x59,0x44,0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x46, +0x54,0x41,0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72, +0x2b,0x4f,0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x0a, +0x4d,0x41,0x6b,0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78, +0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69, +0x59,0x58,0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56, +0x42,0x41,0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77, +0x0a,0x67,0x67,0x45,0x69,0x4d,0x41,0x30,0x47,0x43,0x53,0x71,0x47,0x53,0x49,0x62, +0x33,0x44,0x51,0x45,0x42,0x41,0x51,0x55,0x41,0x41,0x34,0x49,0x42,0x44,0x77,0x41, +0x77,0x67,0x67,0x45,0x4b,0x41,0x6f,0x49,0x42,0x41,0x51,0x44,0x58,0x45,0x63,0x76, +0x72,0x59,0x37,0x56,0x2b,0x7a,0x64,0x42,0x79,0x72,0x64,0x4e,0x78,0x4a,0x59,0x45, +0x6d,0x0a,0x61,0x41,0x4e,0x59,0x55,0x4f,0x37,0x76,0x57,0x34,0x68,0x64,0x41,0x35, +0x49,0x42,0x49,0x46,0x6d,0x4d,0x70,0x6e,0x62,0x79,0x69,0x4e,0x6e,0x5a,0x77,0x36, +0x57,0x39,0x6f,0x61,0x67,0x78,0x33,0x5a,0x49,0x65,0x65,0x48,0x56,0x59,0x62,0x52, +0x69,0x4b,0x36,0x41,0x66,0x46,0x74,0x53,0x31,0x32,0x2b,0x45,0x31,0x4d,0x59,0x31, +0x64,0x32,0x0a,0x61,0x71,0x51,0x31,0x53,0x72,0x49,0x43,0x39,0x51,0x35,0x55,0x6e, +0x5a,0x61,0x42,0x72,0x62,0x57,0x32,0x32,0x6d,0x4e,0x75,0x6c,0x4d,0x34,0x2f,0x6c, +0x49,0x4a,0x72,0x48,0x70,0x51,0x55,0x68,0x50,0x78,0x6f,0x62,0x79,0x34,0x2f,0x36, +0x4e,0x41,0x37,0x71,0x4b,0x67,0x55,0x48,0x69,0x79,0x4f,0x64,0x33,0x4a,0x42,0x70, +0x4f,0x66,0x77,0x0a,0x38,0x54,0x76,0x53,0x74,0x51,0x78,0x34,0x4c,0x38,0x59,0x64, +0x4b,0x51,0x35,0x68,0x74,0x7a,0x6b,0x32,0x68,0x70,0x52,0x4a,0x4c,0x30,0x6c,0x4b, +0x67,0x47,0x31,0x57,0x34,0x75,0x4b,0x32,0x39,0x39,0x42,0x74,0x7a,0x64,0x41,0x67, +0x66,0x42,0x76,0x43,0x54,0x33,0x41,0x31,0x61,0x53,0x70,0x6a,0x49,0x47,0x74,0x6e, +0x69,0x72,0x49,0x31,0x0a,0x46,0x4c,0x52,0x58,0x47,0x79,0x38,0x31,0x31,0x57,0x4a, +0x39,0x4a,0x68,0x68,0x34,0x41,0x4b,0x4c,0x66,0x79,0x56,0x70,0x42,0x4a,0x67,0x65, +0x34,0x73,0x56,0x72,0x36,0x4e,0x75,0x75,0x49,0x66,0x32,0x71,0x47,0x31,0x6f,0x79, +0x31,0x30,0x70,0x61,0x51,0x4e,0x65,0x71,0x32,0x33,0x55,0x47,0x61,0x59,0x74,0x2f, +0x7a,0x55,0x56,0x4a,0x77,0x0a,0x55,0x74,0x30,0x57,0x45,0x6b,0x58,0x38,0x48,0x4f, +0x63,0x62,0x33,0x75,0x49,0x6f,0x54,0x6d,0x61,0x4f,0x34,0x72,0x48,0x42,0x55,0x4a, +0x71,0x45,0x79,0x39,0x51,0x58,0x7a,0x53,0x57,0x77,0x43,0x35,0x78,0x45,0x43,0x64, +0x37,0x43,0x4a,0x53,0x53,0x68,0x31,0x30,0x4f,0x75,0x6e,0x6c,0x75,0x4c,0x32,0x4d, +0x47,0x65,0x5a,0x47,0x6e,0x76,0x0a,0x41,0x67,0x4d,0x42,0x41,0x41,0x47,0x6a,0x67, +0x59,0x59,0x77,0x67,0x59,0x4d,0x77,0x44,0x77,0x59,0x44,0x56,0x52,0x30,0x54,0x41, +0x51,0x48,0x2f,0x42,0x41,0x55,0x77,0x41,0x77,0x45,0x42,0x2f,0x7a,0x41,0x4c,0x42, +0x67,0x4e,0x56,0x48,0x51,0x38,0x45,0x42,0x41,0x4d,0x43,0x41,0x66,0x59,0x77,0x59, +0x77,0x59,0x44,0x56,0x52,0x30,0x6c,0x0a,0x42,0x46,0x77,0x77,0x57,0x67,0x59,0x49, +0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x45,0x47,0x43,0x43,0x73,0x47, +0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x43,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46, +0x42,0x51,0x63,0x44,0x41,0x77,0x59,0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48, +0x41,0x77,0x51,0x47,0x43,0x43,0x73,0x47,0x0a,0x41,0x51,0x55,0x46,0x42,0x77,0x4d, +0x46,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46,0x42,0x51,0x63,0x44,0x42,0x67,0x59, +0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x63,0x47,0x43,0x43,0x73, +0x47,0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x49,0x42,0x67,0x67,0x72,0x42,0x67,0x45, +0x46,0x42,0x51,0x63,0x44,0x43,0x54,0x41,0x4e,0x0a,0x42,0x67,0x6b,0x71,0x68,0x6b, +0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x73,0x46,0x41,0x41,0x4f,0x43,0x41,0x51, +0x45,0x41,0x46,0x6d,0x34,0x37,0x47,0x55,0x70,0x50,0x57,0x35,0x2b,0x37,0x69,0x46, +0x74,0x69,0x6c,0x6f,0x6b,0x35,0x32,0x49,0x6f,0x54,0x57,0x72,0x74,0x46,0x67,0x32, +0x79,0x69,0x36,0x6b,0x49,0x32,0x69,0x52,0x4e,0x51,0x0a,0x4b,0x75,0x67,0x48,0x55, +0x49,0x4f,0x34,0x4b,0x53,0x71,0x4a,0x56,0x42,0x50,0x38,0x61,0x4b,0x4f,0x61,0x54, +0x5a,0x47,0x45,0x31,0x4b,0x4d,0x68,0x2f,0x59,0x6a,0x68,0x36,0x71,0x2f,0x67,0x50, +0x61,0x6c,0x67,0x64,0x2f,0x38,0x44,0x6d,0x72,0x78,0x53,0x4a,0x6d,0x55,0x78,0x33, +0x62,0x4e,0x62,0x38,0x52,0x59,0x36,0x70,0x4b,0x7a,0x74,0x0a,0x5a,0x64,0x75,0x53, +0x61,0x53,0x2b,0x57,0x55,0x30,0x59,0x74,0x2b,0x6c,0x47,0x35,0x76,0x56,0x67,0x61, +0x70,0x48,0x45,0x71,0x36,0x79,0x71,0x4c,0x62,0x65,0x56,0x78,0x51,0x4c,0x75,0x62, +0x54,0x69,0x6e,0x4f,0x66,0x56,0x56,0x5a,0x58,0x79,0x45,0x43,0x59,0x47,0x4d,0x73, +0x59,0x71,0x65,0x6e,0x4a,0x6a,0x4e,0x63,0x62,0x49,0x5a,0x4e,0x0a,0x79,0x4d,0x75, +0x72,0x46,0x63,0x67,0x30,0x34,0x36,0x4f,0x34,0x59,0x79,0x68,0x56,0x79,0x71,0x53, +0x69,0x74,0x43,0x59,0x37,0x68,0x2f,0x65,0x71,0x67,0x6b,0x50,0x4a,0x51,0x30,0x68, +0x6b,0x70,0x39,0x45,0x64,0x51,0x77,0x62,0x6e,0x38,0x56,0x6c,0x66,0x78,0x64,0x42, +0x58,0x77,0x51,0x34,0x4e,0x48,0x4b,0x30,0x4a,0x56,0x46,0x2f,0x33,0x0a,0x71,0x48, +0x61,0x68,0x4e,0x48,0x4f,0x35,0x64,0x62,0x4a,0x5a,0x57,0x59,0x41,0x62,0x42,0x44, +0x70,0x32,0x51,0x45,0x53,0x70,0x76,0x6f,0x2b,0x38,0x33,0x6c,0x68,0x34,0x64,0x6e, +0x58,0x6a,0x46,0x58,0x4d,0x43,0x48,0x76,0x52,0x68,0x35,0x31,0x79,0x2f,0x54,0x71, +0x79,0x42,0x34,0x56,0x76,0x72,0x52,0x4b,0x49,0x4b,0x74,0x54,0x6f,0x7a,0x0a,0x5a, +0x6a,0x48,0x59,0x49,0x63,0x62,0x6a,0x76,0x53,0x58,0x4d,0x7a,0x61,0x44,0x50,0x6a, +0x50,0x63,0x5a,0x47,0x6a,0x42,0x4a,0x6c,0x47,0x36,0x43,0x76,0x44,0x34,0x4c,0x6d, +0x59,0x7a,0x72,0x6b,0x48,0x34,0x31,0x63,0x7a,0x72,0x34,0x57,0x41,0x3d,0x3d,0x0a, +0x2d,0x2d,0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x43,0x45,0x52,0x54,0x49,0x46,0x49, +0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a + }, + }; + VpnRpcHubAddCA out_rpc_hub_add_ca = api.AddCa(in_rpc_hub_add_ca); + + print_object(out_rpc_hub_add_ca); + + Console.WriteLine("End: Test_AddCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumCa', Enumerate CA(Certificate Authority) in the hub + /// + public VpnRpcHubEnumCA Test_EnumCa() + { + Console.WriteLine("Begin: Test_EnumCa"); + + VpnRpcHubEnumCA in_rpc_hub_enum_ca = new VpnRpcHubEnumCA() + { + HubName_str = hub_name, + }; + VpnRpcHubEnumCA out_rpc_hub_enum_ca = api.EnumCa(in_rpc_hub_enum_ca); + + print_object(out_rpc_hub_enum_ca); + + Console.WriteLine("End: Test_EnumCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_hub_enum_ca; + } + + /// + /// API test for 'GetCa', Get CA(Certificate Authority) setting from the hub + /// + public void Test_GetCa(uint key) + { + Console.WriteLine("Begin: Test_GetCa"); + + VpnRpcHubGetCA in_rpc_hub_get_ca = new VpnRpcHubGetCA() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcHubGetCA out_rpc_hub_get_ca = api.GetCa(in_rpc_hub_get_ca); + + print_object(out_rpc_hub_get_ca); + + Console.WriteLine("End: Test_GetCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteCa', Delete a CA(Certificate Authority) setting from the hub + /// + public void Test_DeleteCa(uint key) + { + Console.WriteLine("Begin: Test_DeleteCa"); + + VpnRpcHubDeleteCA in_rpc_hub_delete_ca = new VpnRpcHubDeleteCA() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcHubDeleteCA out_rpc_hub_delete_ca = api.DeleteCa(in_rpc_hub_delete_ca); + + print_object(out_rpc_hub_delete_ca); + + Console.WriteLine("End: Test_DeleteCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetLinkOnline', Make a link into on-line + /// + public void Test_SetLinkOnline() + { + Console.WriteLine("Begin: Test_SetLinkOnline"); + + VpnRpcLink in_rpc_link = new VpnRpcLink() + { + HubName_str = hub_name, + AccountName_utf = "linktest", + }; + VpnRpcLink out_rpc_link = api.SetLinkOnline(in_rpc_link); + + print_object(out_rpc_link); + + Console.WriteLine("End: Test_SetLinkOnline"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetLinkOffline', Make a link into off-line + /// + public void Test_SetLinkOffline() + { + Console.WriteLine("Begin: Test_SetLinkOffline"); + + VpnRpcLink in_rpc_link = new VpnRpcLink() + { + HubName_str = hub_name, + AccountName_utf = "linktest", + }; + VpnRpcLink out_rpc_link = api.SetLinkOffline(in_rpc_link); + + print_object(out_rpc_link); + + Console.WriteLine("End: Test_SetLinkOffline"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteLink', Delete a link + /// + public void Test_DeleteLink() + { + Console.WriteLine("Begin: Test_DeleteLink"); + + VpnRpcLink in_rpc_link = new VpnRpcLink() + { + HubName_str = hub_name, + AccountName_utf = "linktest2", + }; + VpnRpcLink out_rpc_link = api.DeleteLink(in_rpc_link); + + print_object(out_rpc_link); + + Console.WriteLine("End: Test_DeleteLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'RenameLink', Rename link (cascade connection) + /// + public void Test_RenameLink() + { + Console.WriteLine("Begin: Test_RenameLink"); + + VpnRpcRenameLink in_rpc_rename_link = new VpnRpcRenameLink() + { + HubName_str = hub_name, + OldAccountName_utf = "linktest", + NewAccountName_utf = "linktest2", + }; + VpnRpcRenameLink out_rpc_rename_link = api.RenameLink(in_rpc_rename_link); + + print_object(out_rpc_rename_link); + + Console.WriteLine("End: Test_RenameLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateLink', Create a new link(cascade) + /// + public void Test_CreateLink() + { + Console.WriteLine("Begin: Test_CreateLink"); + + VpnRpcCreateLink in_rpc_create_link = new VpnRpcCreateLink() + { + HubName_Ex_str = hub_name, + CheckServerCert_bool = false, + + ClientOption_AccountName_utf = "linktest", + ClientOption_Hostname_str = "1.2.3.4", + ClientOption_Port_u32 = 443, + ClientOption_ProxyType_u32 = 0, + ClientOption_HubName_str = "ABC", + ClientOption_MaxConnection_u32 = 16, + ClientOption_UseEncrypt_bool = true, + ClientOption_UseCompress_bool = false, + ClientOption_HalfConnection_bool = true, + ClientOption_AdditionalConnectionInterval_u32 = 2, + ClientOption_ConnectionDisconnectSpan_u32 = 24, + + ClientAuth_AuthType_u32 = VpnRpcClientAuthType.PlainPassword, + ClientAuth_Username_str = "181012", + ClientAuth_PlainPassword_str = "microsoft", + ClientAuth_HashedPassword_bin = new byte[0] { }, + ClientAuth_ClientX_bin = new byte[0] { }, + ClientAuth_ClientK_bin = new byte[0] { }, + + SecPol_DHCPFilter_bool = true, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = true, + SecPol_CheckMac_bool = true, + SecPol_CheckIP_bool = true, + SecPol_ArpDhcpOnly_bool = true, + SecPol_PrivacyFilter_bool = true, + SecPol_NoServer_bool = true, + SecPol_NoBroadcastLimiter_bool = true, + SecPol_MaxMac_u32 = 32, + SecPol_MaxIP_u32 = 64, + SecPol_MaxUpload_u32 = 960000, + SecPol_MaxDownload_u32 = 1280000, + SecPol_RSandRAFilter_bool = true, + SecPol_RAFilter_bool = true, + SecPol_DHCPv6Filter_bool = true, + SecPol_DHCPv6NoServer_bool = true, + SecPol_CheckIPv6_bool = true, + SecPol_NoServerV6_bool = true, + SecPol_MaxIPv6_u32 = 127, + SecPol_FilterIPv4_bool = true, + SecPol_FilterIPv6_bool = true, + SecPol_FilterNonIP_bool = true, + SecPol_NoIPv6DefaultRouterInRA_bool = true, + SecPol_VLanId_u32 = 123, + SecPol_Ver3_bool = true, + }; + VpnRpcCreateLink out_rpc_create_link = api.CreateLink(in_rpc_create_link); + + print_object(out_rpc_create_link); + + Console.WriteLine("End: Test_CreateLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetLink', Get link configuration + /// + public void Test_GetLink() + { + Console.WriteLine("Begin: Test_GetLink"); + + VpnRpcCreateLink in_rpc_create_link = new VpnRpcCreateLink() + { + HubName_Ex_str = hub_name, + ClientOption_AccountName_utf = "linktest", + }; + VpnRpcCreateLink out_rpc_create_link = api.GetLink(in_rpc_create_link); + + print_object(out_rpc_create_link); + + Console.WriteLine("End: Test_GetLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetLink', Set link configuration + /// + public void Test_SetLink() + { + Console.WriteLine("Begin: Test_SetLink"); + + VpnRpcCreateLink in_rpc_create_link = new VpnRpcCreateLink() + { + HubName_Ex_str = hub_name, + CheckServerCert_bool = false, + + ClientOption_AccountName_utf = "linktest", + ClientOption_Hostname_str = "1.2.3.4", + ClientOption_Port_u32 = 443, + ClientOption_ProxyType_u32 = 0, + ClientOption_HubName_str = "ABC", + ClientOption_MaxConnection_u32 = 16, + ClientOption_UseEncrypt_bool = true, + ClientOption_UseCompress_bool = false, + ClientOption_HalfConnection_bool = true, + ClientOption_AdditionalConnectionInterval_u32 = 2, + ClientOption_ConnectionDisconnectSpan_u32 = 24, + + ClientAuth_AuthType_u32 = VpnRpcClientAuthType.PlainPassword, + ClientAuth_Username_str = "181012", + ClientAuth_PlainPassword_str = "microsoft", + ClientAuth_HashedPassword_bin = new byte[0] { }, + ClientAuth_ClientX_bin = new byte[0] { }, + ClientAuth_ClientK_bin = new byte[0] { }, + + SecPol_DHCPFilter_bool = true, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = true, + SecPol_CheckMac_bool = true, + SecPol_CheckIP_bool = true, + SecPol_ArpDhcpOnly_bool = true, + SecPol_PrivacyFilter_bool = true, + SecPol_NoServer_bool = true, + SecPol_NoBroadcastLimiter_bool = true, + SecPol_MaxMac_u32 = 32, + SecPol_MaxIP_u32 = 64, + SecPol_MaxUpload_u32 = 960000, + SecPol_MaxDownload_u32 = 1280000, + SecPol_RSandRAFilter_bool = true, + SecPol_RAFilter_bool = true, + SecPol_DHCPv6Filter_bool = true, + SecPol_DHCPv6NoServer_bool = true, + SecPol_CheckIPv6_bool = true, + SecPol_NoServerV6_bool = true, + SecPol_MaxIPv6_u32 = 127, + SecPol_FilterIPv4_bool = true, + SecPol_FilterIPv6_bool = true, + SecPol_FilterNonIP_bool = true, + SecPol_NoIPv6DefaultRouterInRA_bool = true, + SecPol_VLanId_u32 = 123, + SecPol_Ver3_bool = true, + }; + VpnRpcCreateLink out_rpc_create_link = api.SetLink(in_rpc_create_link); + + print_object(out_rpc_create_link); + + Console.WriteLine("End: Test_SetLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumLink', Enumerate links + /// + public VpnRpcEnumLink Test_EnumLink() + { + Console.WriteLine("Begin: Test_EnumLink"); + + VpnRpcEnumLink in_rpc_enum_link = new VpnRpcEnumLink() + { + HubName_str = hub_name, + }; + VpnRpcEnumLink out_rpc_enum_link = api.EnumLink(in_rpc_enum_link); + + print_object(out_rpc_enum_link); + + Console.WriteLine("End: Test_EnumLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_link; + } + + /// + /// API test for 'GetLinkStatus', Get link status + /// + public void Test_GetLinkStatus(string name) + { + Console.WriteLine("Begin: Test_GetLinkStatus"); + + VpnRpcLinkStatus in_rpc_link_status = new VpnRpcLinkStatus() + { + HubName_Ex_str = hub_name, + AccountName_utf = name, + }; + VpnRpcLinkStatus out_rpc_link_status = api.GetLinkStatus(in_rpc_link_status); + + print_object(out_rpc_link_status); + + Console.WriteLine("End: Test_GetLinkStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddAccess', Add access list entry + /// + public void Test_AddAccess() + { + Console.WriteLine("Begin: Test_AddAccess"); + + VpnRpcAddAccess in_rpc_add_access_ipv4 = new VpnRpcAddAccess() + { + HubName_str = hub_name, + + AccessListSingle = new VpnAccess[1] + { + new VpnAccess() + { + Note_utf = "IPv4 Test", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = false, + SrcIpAddress_ip = "192.168.0.0", + SrcSubnetMask_ip = "255.255.255.0", + DestIpAddress_ip = "10.0.0.0", + DestSubnetMask_ip = "255.255.0.0", + Protocol_u32 = VpnIpProtocolNumber.TCP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + }, + }; + VpnRpcAddAccess out_rpc_add_access_ipv4 = api.AddAccess(in_rpc_add_access_ipv4); + + VpnRpcAddAccess in_rpc_add_access_ipv6 = new VpnRpcAddAccess() + { + HubName_str = hub_name, + + AccessListSingle = new VpnAccess[1] + { + new VpnAccess() + { + Note_utf = "IPv6 Test", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = true, + SrcIpAddress6_bin = new byte[] { 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + SrcSubnetMask6_bin = new byte[] { 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + Protocol_u32 = VpnIpProtocolNumber.UDP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + }, + }; + VpnRpcAddAccess out_rpc_add_access_ipv6 = api.AddAccess(in_rpc_add_access_ipv6); + + Console.WriteLine("End: Test_AddAccess"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteAccess', Delete access list entry + /// + public void Test_DeleteAccess() + { + Console.WriteLine("Begin: Test_DeleteAccess"); + + VpnRpcDeleteAccess in_rpc_delete_access = new VpnRpcDeleteAccess() + { + HubName_str = hub_name, + Id_u32 = 1, + }; + VpnRpcDeleteAccess out_rpc_delete_access = api.DeleteAccess(in_rpc_delete_access); + + print_object(out_rpc_delete_access); + + Console.WriteLine("End: Test_DeleteAccess"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumAccess', Get access list + /// + public void Test_EnumAccess() + { + Console.WriteLine("Begin: Test_EnumAccess"); + + VpnRpcEnumAccessList in_rpc_enum_access_list = new VpnRpcEnumAccessList() + { + HubName_str = hub_name, + }; + VpnRpcEnumAccessList out_rpc_enum_access_list = api.EnumAccess(in_rpc_enum_access_list); + + print_object(out_rpc_enum_access_list); + + Console.WriteLine("End: Test_EnumAccess"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetAccessList', Set access list + /// + public void Test_SetAccessList() + { + Console.WriteLine("Begin: Test_SetAccessList"); + + VpnRpcEnumAccessList in_rpc_enum_access_list = new VpnRpcEnumAccessList() + { + HubName_str = hub_name, + AccessList = new VpnAccess[] + { + new VpnAccess() + { + Note_utf = "IPv4 Test 2", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = false, + SrcIpAddress_ip = "192.168.0.0", + SrcSubnetMask_ip = "255.255.255.0", + DestIpAddress_ip = "10.0.0.0", + DestSubnetMask_ip = "255.255.0.0", + Protocol_u32 = VpnIpProtocolNumber.TCP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + new VpnAccess() + { + Note_utf = "IPv6 Test 2", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = true, + SrcIpAddress6_bin = new byte[] { 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + SrcSubnetMask6_bin = new byte[] { 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + Protocol_u32 = VpnIpProtocolNumber.UDP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + } + }; + VpnRpcEnumAccessList out_rpc_enum_access_list = api.SetAccessList(in_rpc_enum_access_list); + + print_object(out_rpc_enum_access_list); + + Console.WriteLine("End: Test_SetAccessList"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateUser', Create a user + /// + public void Test_CreateUser() + { + Console.WriteLine("Begin: Test_CreateUser"); + + VpnRpcSetUser in_rpc_set_user = new VpnRpcSetUser() + { + HubName_str = hub_name, + Name_str = "test1", + Realname_utf = "Cat man", + Note_utf = "Hey!!!", + AuthType_u32 = VpnRpcUserAuthType.Password, + Auth_Password_str = "microsoft", + Auth_UserCert_CertData = new byte[0] { }, + Auth_RootCert_Serial = new byte[0] { }, + Auth_RootCert_CommonName = "", + Auth_Radius_RadiusUsername = "", + Auth_NT_NTUsername = "", + ExpireTime_dt = new DateTime(2019, 1, 1), + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetUser out_rpc_set_user = api.CreateUser(in_rpc_set_user); + + Console.WriteLine("End: Test_CreateUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetUser', Set user setting + /// + public void Test_SetUser() + { + Console.WriteLine("Begin: Test_SetUser"); + + VpnRpcSetUser in_rpc_set_user = new VpnRpcSetUser() + { + HubName_str = hub_name, + Name_str = "test1", + Realname_utf = "Cat man", + Note_utf = "Hey!!!", + GroupName_str = "group1", + AuthType_u32 = VpnRpcUserAuthType.Anonymous, + Auth_Password_str = "", + Auth_UserCert_CertData = new byte[0] { }, + Auth_RootCert_Serial = new byte[0] { }, + Auth_RootCert_CommonName = "", + Auth_Radius_RadiusUsername = "", + Auth_NT_NTUsername = "", + ExpireTime_dt = new DateTime(2019, 1, 1), + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetUser out_rpc_set_user = api.SetUser(in_rpc_set_user); + + Console.WriteLine("End: Test_SetUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetUser', Get user setting + /// + public void Test_GetUser() + { + Console.WriteLine("Begin: Test_GetUser"); + + VpnRpcSetUser in_rpc_set_user = new VpnRpcSetUser() + { + HubName_str = hub_name, + Name_str = "test1", + }; + VpnRpcSetUser out_rpc_set_user = api.GetUser(in_rpc_set_user); + + print_object(out_rpc_set_user); + + Console.WriteLine("End: Test_GetUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteUser', Delete a user + /// + public void Test_DeleteUser() + { + Console.WriteLine("Begin: Test_DeleteUser"); + + VpnRpcDeleteUser in_rpc_delete_user = new VpnRpcDeleteUser() + { + HubName_str = hub_name, + Name_str = "test1", + }; + VpnRpcDeleteUser out_rpc_delete_user = api.DeleteUser(in_rpc_delete_user); + + Console.WriteLine("End: Test_DeleteUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumUser', Enumerate users + /// + public void Test_EnumUser() + { + Console.WriteLine("Begin: Test_EnumUser"); + + VpnRpcEnumUser in_rpc_enum_user = new VpnRpcEnumUser() + { + HubName_str = hub_name, + }; + VpnRpcEnumUser out_rpc_enum_user = api.EnumUser(in_rpc_enum_user); + + print_object(out_rpc_enum_user); + + Console.WriteLine("End: Test_EnumUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateGroup', Create a group + /// + public void Test_CreateGroup() + { + Console.WriteLine("Begin: Test_CreateGroup"); + + VpnRpcSetGroup in_rpc_set_group = new VpnRpcSetGroup() + { + HubName_str = hub_name, + Name_str = "group1", + Realname_utf = "Cat group", + Note_utf = "This is it! This is it!!", + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetGroup out_rpc_set_group = api.CreateGroup(in_rpc_set_group); + + print_object(out_rpc_set_group); + + Console.WriteLine("End: Test_CreateGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetGroup', Set group setting + /// + public void Test_SetGroup() + { + Console.WriteLine("Begin: Test_SetGroup"); + + VpnRpcSetGroup in_rpc_set_group = new VpnRpcSetGroup() + { + HubName_str = hub_name, + Name_str = "group1", + Realname_utf = "Cat group 2", + Note_utf = "This is it! This is it!! 2", + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetGroup out_rpc_set_group = api.SetGroup(in_rpc_set_group); + + print_object(out_rpc_set_group); + + Console.WriteLine("End: Test_SetGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetGroup', Get group information + /// + public void Test_GetGroup() + { + Console.WriteLine("Begin: Test_GetGroup"); + + VpnRpcSetGroup in_rpc_set_group = new VpnRpcSetGroup() + { + HubName_str = hub_name, + Name_str = "group1", + }; + VpnRpcSetGroup out_rpc_set_group = api.GetGroup(in_rpc_set_group); + + print_object(out_rpc_set_group); + + Console.WriteLine("End: Test_GetGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteGroup', Delete a group + /// + public void Test_DeleteGroup() + { + Console.WriteLine("Begin: Test_DeleteGroup"); + + VpnRpcDeleteUser in_rpc_delete_user = new VpnRpcDeleteUser() + { + HubName_str = hub_name, + Name_str = "group1", + }; + VpnRpcDeleteUser out_rpc_delete_user = api.DeleteGroup(in_rpc_delete_user); + + print_object(out_rpc_delete_user); + + Console.WriteLine("End: Test_DeleteGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumGroup', Enumerate groups + /// + public void Test_EnumGroup() + { + Console.WriteLine("Begin: Test_EnumGroup"); + + VpnRpcEnumGroup in_rpc_enum_group = new VpnRpcEnumGroup() + { + HubName_str = hub_name, + }; + VpnRpcEnumGroup out_rpc_enum_group = api.EnumGroup(in_rpc_enum_group); + + print_object(out_rpc_enum_group); + + Console.WriteLine("End: Test_EnumGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumSession', Enumerate sessions + /// + public VpnRpcEnumSession Test_EnumSession() + { + Console.WriteLine("Begin: Test_EnumSession"); + + VpnRpcEnumSession in_rpc_enum_session = new VpnRpcEnumSession() + { + HubName_str = hub_name, + }; + VpnRpcEnumSession out_rpc_enum_session = api.EnumSession(in_rpc_enum_session); + + print_object(out_rpc_enum_session); + + Console.WriteLine("End: Test_EnumSession"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_session; + } + + /// + /// API test for 'GetSessionStatus', Get session status + /// + public void Test_GetSessionStatus(string session_name) + { + Console.WriteLine("Begin: Test_GetSessionStatus"); + + VpnRpcSessionStatus in_rpc_session_status = new VpnRpcSessionStatus() + { + HubName_str = hub_name, + Name_str = session_name, + }; + VpnRpcSessionStatus out_rpc_session_status = api.GetSessionStatus(in_rpc_session_status); + + print_object(out_rpc_session_status); + + Console.WriteLine("End: Test_GetSessionStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteSession', Delete a session + /// + public void Test_DeleteSession(string session_id) + { + Console.WriteLine("Begin: Test_DeleteSession"); + + VpnRpcDeleteSession in_rpc_delete_session = new VpnRpcDeleteSession() + { + HubName_str = hub_name, + Name_str = session_id, + }; + VpnRpcDeleteSession out_rpc_delete_session = api.DeleteSession(in_rpc_delete_session); + + print_object(out_rpc_delete_session); + + Console.WriteLine("End: Test_DeleteSession"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumMacTable', Get MAC address table + /// + public VpnRpcEnumMacTable Test_EnumMacTable() + { + Console.WriteLine("Begin: Test_EnumMacTable"); + + VpnRpcEnumMacTable in_rpc_enum_mac_table = new VpnRpcEnumMacTable() + { + HubName_str = hub_name, + }; + VpnRpcEnumMacTable out_rpc_enum_mac_table = api.EnumMacTable(in_rpc_enum_mac_table); + + print_object(out_rpc_enum_mac_table); + + Console.WriteLine("End: Test_EnumMacTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_mac_table; + } + + /// + /// API test for 'DeleteMacTable', Delete MAC address table entry + /// + public void Test_DeleteMacTable(uint key32) + { + Console.WriteLine("Begin: Test_DeleteMacTable"); + + VpnRpcDeleteTable in_rpc_delete_table = new VpnRpcDeleteTable() + { + HubName_str = hub_name, + Key_u32 = key32, + }; + VpnRpcDeleteTable out_rpc_delete_table = api.DeleteMacTable(in_rpc_delete_table); + + Console.WriteLine("End: Test_DeleteMacTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumIpTable', Get IP address table + /// + public VpnRpcEnumIpTable Test_EnumIpTable() + { + Console.WriteLine("Begin: Test_EnumIpTable"); + + VpnRpcEnumIpTable in_rpc_enum_ip_table = new VpnRpcEnumIpTable() + { + HubName_str = hub_name, + }; + VpnRpcEnumIpTable out_rpc_enum_ip_table = api.EnumIpTable(in_rpc_enum_ip_table); + + print_object(out_rpc_enum_ip_table); + + Console.WriteLine("End: Test_EnumIpTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_ip_table; + } + + /// + /// API test for 'DeleteIpTable', Delete IP address table entry + /// + public void Test_DeleteIpTable(uint key32) + { + Console.WriteLine("Begin: Test_DeleteIpTable"); + + VpnRpcDeleteTable in_rpc_delete_table = new VpnRpcDeleteTable() + { + HubName_str = hub_name, + Key_u32 = key32, + }; + VpnRpcDeleteTable out_rpc_delete_table = api.DeleteIpTable(in_rpc_delete_table); + + print_object(out_rpc_delete_table); + + Console.WriteLine("End: Test_DeleteIpTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetKeep', Set keep-alive function setting + /// + public void Test_SetKeep() + { + Console.WriteLine("Begin: Test_SetKeep"); + + VpnRpcKeep in_rpc_keep = new VpnRpcKeep() + { + UseKeepConnect_bool = true, + KeepConnectHost_str = "www.softether.org", + KeepConnectPort_u32 = 123, + KeepConnectProtocol_u32 = VpnRpcKeepAliveProtocol.UDP, + KeepConnectInterval_u32 = 1, + }; + VpnRpcKeep out_rpc_keep = api.SetKeep(in_rpc_keep); + + print_object(out_rpc_keep); + + Console.WriteLine("End: Test_SetKeep"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetKeep', Get keep-alive function setting + /// + public void Test_GetKeep() + { + Console.WriteLine("Begin: Test_GetKeep"); + + VpnRpcKeep in_rpc_keep = new VpnRpcKeep() + { + }; + VpnRpcKeep out_rpc_keep = api.GetKeep(in_rpc_keep); + + print_object(out_rpc_keep); + + Console.WriteLine("End: Test_GetKeep"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnableSecureNAT', Enable SecureNAT function of the hub + /// + public void Test_EnableSecureNAT() + { + Console.WriteLine("Begin: Test_EnableSecureNAT"); + + VpnRpcHub in_rpc_hub = new VpnRpcHub() + { + HubName_str = hub_name, + }; + VpnRpcHub out_rpc_hub = api.EnableSecureNAT(in_rpc_hub); + + print_object(out_rpc_hub); + + Console.WriteLine("End: Test_EnableSecureNAT"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DisableSecureNAT', Disable the SecureNAT function of the hub + /// + public void Test_DisableSecureNAT() + { + Console.WriteLine("Begin: Test_DisableSecureNAT"); + + VpnRpcHub in_rpc_hub = new VpnRpcHub() + { + HubName_str = hub_name, + }; + VpnRpcHub out_rpc_hub = api.DisableSecureNAT(in_rpc_hub); + + print_object(out_rpc_hub); + + Console.WriteLine("End: Test_DisableSecureNAT"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetSecureNATOption', Set SecureNAT options + /// + public void Test_SetSecureNATOption() + { + Console.WriteLine("Begin: Test_SetSecureNATOption"); + + VpnVhOption in_vh_option = new VpnVhOption() + { + RpcHubName_str = hub_name, + MacAddress_bin = new byte[] { 0x00, 0xAC, 0x00, 0x11, 0x22, 0x33 }, + Ip_ip = "10.0.0.254", + Mask_ip = "255.255.255.0", + UseNat_bool = true, + Mtu_u32 = 1200, + NatTcpTimeout_u32 = 100, + NatUdpTimeout_u32 = 50, + UseDhcp_bool = true, + DhcpLeaseIPStart_ip = "10.0.0.101", + DhcpLeaseIPEnd_ip = "10.0.0.199", + DhcpSubnetMask_ip = "255.255.255.0", + DhcpExpireTimeSpan_u32 = 3600, + DhcpGatewayAddress_ip = "10.0.0.254", + DhcpDnsServerAddress_ip = "10.0.0.254", + DhcpDnsServerAddress2_ip = "8.8.8.8", + DhcpDomainName_str = "lab.coe.ad.jp", + SaveLog_bool = true, + ApplyDhcpPushRoutes_bool = false, + DhcpPushRoutes_str = "", + }; + VpnVhOption out_vh_option = api.SetSecureNATOption(in_vh_option); + + print_object(out_vh_option); + + Console.WriteLine("End: Test_SetSecureNATOption"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSecureNATOption', Get SecureNAT options + /// + public void Test_GetSecureNATOption() + { + Console.WriteLine("Begin: Test_GetSecureNATOption"); + + VpnVhOption in_vh_option = new VpnVhOption() + { + RpcHubName_str = hub_name, + }; + VpnVhOption out_vh_option = api.GetSecureNATOption(in_vh_option); + + print_object(out_vh_option); + + Console.WriteLine("End: Test_GetSecureNATOption"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumNAT', Enumerate NAT entries of the SecureNAT + /// + public void Test_EnumNAT() + { + Console.WriteLine("Begin: Test_EnumNAT"); + + VpnRpcEnumNat in_rpc_enum_nat = new VpnRpcEnumNat() + { + HubName_str = hub_name, + }; + VpnRpcEnumNat out_rpc_enum_nat = api.EnumNAT(in_rpc_enum_nat); + + print_object(out_rpc_enum_nat); + + Console.WriteLine("End: Test_EnumNAT"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumDHCP', Enumerate DHCP entries + /// + public void Test_EnumDHCP() + { + Console.WriteLine("Begin: Test_EnumDHCP"); + + VpnRpcEnumDhcp in_rpc_enum_dhcp = new VpnRpcEnumDhcp() + { + HubName_str = hub_name, + }; + VpnRpcEnumDhcp out_rpc_enum_dhcp = api.EnumDHCP(in_rpc_enum_dhcp); + + print_object(out_rpc_enum_dhcp); + + Console.WriteLine("End: Test_EnumDHCP"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSecureNATStatus', Get status of the SecureNAT + /// + public void Test_GetSecureNATStatus() + { + Console.WriteLine("Begin: Test_GetSecureNATStatus"); + + VpnRpcNatStatus in_rpc_nat_status = new VpnRpcNatStatus() + { + HubName_str = hub_name, + }; + VpnRpcNatStatus out_rpc_nat_status = api.GetSecureNATStatus(in_rpc_nat_status); + + print_object(out_rpc_nat_status); + + Console.WriteLine("End: Test_GetSecureNATStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumEthernet', Enumerate Ethernet devices + /// + public void Test_EnumEthernet() + { + Console.WriteLine("Begin: Test_EnumEthernet"); + + VpnRpcEnumEth out_rpc_enum_eth = api.EnumEthernet(); + + print_object(out_rpc_enum_eth); + + Console.WriteLine("End: Test_EnumEthernet"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddLocalBridge', Add a new local bridge + /// + public void Test_AddLocalBridge() + { + Console.WriteLine("Begin: Test_AddLocalBridge"); + + VpnRpcLocalBridge in_rpc_localbridge = new VpnRpcLocalBridge() + { + DeviceName_str = "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str = hub_name, + }; + VpnRpcLocalBridge out_rpc_localbridge = api.AddLocalBridge(in_rpc_localbridge); + + print_object(out_rpc_localbridge); + + Console.WriteLine("End: Test_AddLocalBridge"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteLocalBridge', Delete a local bridge + /// + public void Test_DeleteLocalBridge() + { + Console.WriteLine("Begin: Test_DeleteLocalBridge"); + + VpnRpcLocalBridge in_rpc_localbridge = new VpnRpcLocalBridge() + { + DeviceName_str = "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str = hub_name, + }; + VpnRpcLocalBridge out_rpc_localbridge = api.DeleteLocalBridge(in_rpc_localbridge); + + print_object(out_rpc_localbridge); + + Console.WriteLine("End: Test_DeleteLocalBridge"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumLocalBridge', Enumerate local bridges + /// + public void Test_EnumLocalBridge() + { + Console.WriteLine("Begin: Test_EnumLocalBridge"); + + VpnRpcEnumLocalBridge out_rpc_enum_localbridge = api.EnumLocalBridge(); + + print_object(out_rpc_enum_localbridge); + + Console.WriteLine("End: Test_EnumLocalBridge"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetBridgeSupport', Get availability to localbridge function + /// + public void Test_GetBridgeSupport() + { + Console.WriteLine("Begin: Test_GetBridgeSupport"); + + VpnRpcBridgeSupport out_rpc_bridge_support = api.GetBridgeSupport(); + + print_object(out_rpc_bridge_support); + + Console.WriteLine("End: Test_GetBridgeSupport"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'RebootServer', Reboot server itself + /// + public void Test_RebootServer() + { + Console.WriteLine("Begin: Test_RebootServer"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + }; + VpnRpcTest out_rpc_test = api.RebootServer(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_RebootServer"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetCaps', Get capabilities + /// + public void Test_GetCaps() + { + Console.WriteLine("Begin: Test_GetCaps"); + + VpnCapslist out_capslist = api.GetCaps(); + + print_object(out_capslist); + + Console.WriteLine("End: Test_GetCaps"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetConfig', Get configuration file stream + /// + public void Test_GetConfig() + { + Console.WriteLine("Begin: Test_GetConfig"); + + VpnRpcConfig out_rpc_config = api.GetConfig(); + + print_object(out_rpc_config); + + Console.WriteLine("End: Test_GetConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetConfig', Overwrite configuration file by specified data + /// + public void Test_SetConfig() + { + Console.WriteLine("Begin: Test_SetConfig"); + + VpnRpcConfig in_rpc_config = new VpnRpcConfig() + { + FileData_bin = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, }, + }; + VpnRpcConfig out_rpc_config = api.SetConfig(in_rpc_config); + + Console.WriteLine("End: Test_SetConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetDefaultHubAdminOptions', Get default hub administration options + /// + public void Test_GetDefaultHubAdminOptions() + { + Console.WriteLine("Begin: Test_GetDefaultHubAdminOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + }; + VpnRpcAdminOption out_rpc_admin_option = api.GetDefaultHubAdminOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_GetDefaultHubAdminOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubAdminOptions', Get hub administration options + /// + public void Test_GetHubAdminOptions() + { + Console.WriteLine("Begin: Test_GetHubAdminOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + }; + VpnRpcAdminOption out_rpc_admin_option = api.GetHubAdminOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_GetHubAdminOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubAdminOptions', Set hub administration options + /// + public void Test_SetHubAdminOptions() + { + Console.WriteLine("Begin: Test_SetHubAdminOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + AdminOptionList = new VpnAdminOption[] + { + new VpnAdminOption() + { + Name_str = "no_securenat_enablenat", + Value_u32 = 1, + } + } + }; + VpnRpcAdminOption out_rpc_admin_option = api.SetHubAdminOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_SetHubAdminOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubExtOptions', Get hub extended options + /// + public void Test_GetHubExtOptions() + { + Console.WriteLine("Begin: Test_GetHubExtOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + }; + VpnRpcAdminOption out_rpc_admin_option = api.GetHubExtOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_GetHubExtOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubExtOptions', Set hub extended options + /// + public void Test_SetHubExtOptions() + { + Console.WriteLine("Begin: Test_SetHubExtOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + AdminOptionList = new VpnAdminOption[] + { + new VpnAdminOption() + { + Name_str = "SecureNAT_RandomizeAssignIp", + Value_u32 = 1, + } + } + }; + VpnRpcAdminOption out_rpc_admin_option = api.SetHubExtOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_SetHubExtOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddL3Switch', Add a new virtual layer-3 switch + /// + public void Test_AddL3Switch() + { + Console.WriteLine("Begin: Test_AddL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.AddL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_AddL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelL3Switch', Delete a virtual layer-3 switch + /// + public void Test_DelL3Switch() + { + Console.WriteLine("Begin: Test_DelL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.DelL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_DelL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumL3Switch', Enumerate virtual layer-3 switches + /// + public void Test_EnumL3Switch() + { + Console.WriteLine("Begin: Test_EnumL3Switch"); + + VpnRpcEnumL3Sw out_rpc_enum_l3sw = api.EnumL3Switch(); + + print_object(out_rpc_enum_l3sw); + + Console.WriteLine("End: Test_EnumL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'StartL3Switch', Start a virtual layer-3 switch + /// + public void Test_StartL3Switch() + { + Console.WriteLine("Begin: Test_StartL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.StartL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_StartL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'StopL3Switch', Stop a virtual layer-3 switch + /// + public void Test_StopL3Switch() + { + Console.WriteLine("Begin: Test_StopL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.StopL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_StopL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddL3If', Add new virtual interface on virtual L3 switch + /// + public void Test_AddL3If() + { + Console.WriteLine("Begin: Test_AddL3If"); + + VpnRpcL3If in_rpc_l3if = new VpnRpcL3If() + { + Name_str = "L3SW1", + HubName_str = hub_name, + IpAddress_ip = "192.168.0.1", + SubnetMask_ip = "255.255.255.0", + }; + VpnRpcL3If out_rpc_l3if = api.AddL3If(in_rpc_l3if); + + print_object(out_rpc_l3if); + + Console.WriteLine("End: Test_AddL3If"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelL3If', Delete a virtual interface on virtual L3 switch + /// + public void Test_DelL3If() + { + Console.WriteLine("Begin: Test_DelL3If"); + + VpnRpcL3If in_rpc_l3if = new VpnRpcL3If() + { + Name_str = "L3SW1", + HubName_str = hub_name, + }; + VpnRpcL3If out_rpc_l3if = api.DelL3If(in_rpc_l3if); + + print_object(out_rpc_l3if); + + Console.WriteLine("End: Test_DelL3If"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumL3If', Enumerate virtual interfaces on virtual L3 switch + /// + public void Test_EnumL3If() + { + Console.WriteLine("Begin: Test_EnumL3If"); + + VpnRpcEnumL3If in_rpc_enum_l3if = new VpnRpcEnumL3If() + { + Name_str = "L3SW1", + }; + VpnRpcEnumL3If out_rpc_enum_l3if = api.EnumL3If(in_rpc_enum_l3if); + + print_object(out_rpc_enum_l3if); + + Console.WriteLine("End: Test_EnumL3If"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddL3Table', Add new routing table entry on virtual L3 switch + /// + public void Test_AddL3Table() + { + Console.WriteLine("Begin: Test_AddL3Table"); + + VpnRpcL3Table in_rpc_l3table = new VpnRpcL3Table() + { + Name_str = "L3SW1", + NetworkAddress_ip = "10.0.0.0", + SubnetMask_ip = "255.0.0.0", + GatewayAddress_ip = "192.168.7.1", + Metric_u32 = 10, + }; + VpnRpcL3Table out_rpc_l3table = api.AddL3Table(in_rpc_l3table); + + print_object(out_rpc_l3table); + + Console.WriteLine("End: Test_AddL3Table"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelL3Table', Delete routing table entry on virtual L3 switch + /// + public void Test_DelL3Table() + { + Console.WriteLine("Begin: Test_DelL3Table"); + + VpnRpcL3Table in_rpc_l3table = new VpnRpcL3Table() + { + Name_str = "L3SW1", + NetworkAddress_ip = "10.0.0.0", + SubnetMask_ip = "255.0.0.0", + GatewayAddress_ip = "192.168.7.1", + Metric_u32 = 10, + }; + VpnRpcL3Table out_rpc_l3table = api.DelL3Table(in_rpc_l3table); + + print_object(out_rpc_l3table); + + Console.WriteLine("End: Test_DelL3Table"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumL3Table', Get routing table on virtual L3 switch + /// + public void Test_EnumL3Table() + { + Console.WriteLine("Begin: Test_EnumL3Table"); + + VpnRpcEnumL3Table in_rpc_enum_l3table = new VpnRpcEnumL3Table() + { + Name_str = "L3SW1", + }; + VpnRpcEnumL3Table out_rpc_enum_l3table = api.EnumL3Table(in_rpc_enum_l3table); + + print_object(out_rpc_enum_l3table); + + Console.WriteLine("End: Test_EnumL3Table"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumCrl', Get CRL (Certificate Revocation List) index + /// + public VpnRpcEnumCrl Test_EnumCrl() + { + Console.WriteLine("Begin: Test_EnumCrl"); + + VpnRpcEnumCrl in_rpc_enum_crl = new VpnRpcEnumCrl() + { + HubName_str = hub_name, + }; + VpnRpcEnumCrl out_rpc_enum_crl = api.EnumCrl(in_rpc_enum_crl); + + print_object(out_rpc_enum_crl); + + Console.WriteLine("End: Test_EnumCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_crl; + } + + /// + /// API test for 'AddCrl', Add new CRL (Certificate Revocation List) entry + /// + public void Test_AddCrl() + { + Console.WriteLine("Begin: Test_AddCrl"); + + VpnRpcCrl in_rpc_crl = new VpnRpcCrl() + { + HubName_str = hub_name, + CommonName_utf = "CN", + Organization_utf = "Org", + Unit_utf = "ICSCOE", + Country_utf = "JP", + State_utf = "Ibaraki", + Local_utf = "Tsukuba", + Serial_bin = new byte[] { 1, 2, 3, 4, 5 }, + DigestMD5_bin = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + DigestSHA1_bin = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }, + }; + VpnRpcCrl out_rpc_crl = api.AddCrl(in_rpc_crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_AddCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelCrl', Delete CRL (Certificate Revocation List) entry + /// + public void Test_DelCrl(uint key) + { + Console.WriteLine("Begin: Test_DelCrl"); + + VpnRpcCrl in_rpc_crl = new VpnRpcCrl() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcCrl out_rpc_crl = api.DelCrl(in_rpc_crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_DelCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetCrl', Get CRL (Certificate Revocation List) entry + /// + public VpnRpcCrl Test_GetCrl(uint key) + { + Console.WriteLine("Begin: Test_GetCrl"); + + VpnRpcCrl in_rpc_crl = new VpnRpcCrl() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcCrl out_rpc_crl = api.GetCrl(in_rpc_crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_GetCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_crl; + } + + /// + /// API test for 'SetCrl', Set CRL (Certificate Revocation List) entry + /// + public void Test_SetCrl(VpnRpcCrl crl) + { + Console.WriteLine("Begin: Test_SetCrl"); + + VpnRpcCrl out_rpc_crl = api.SetCrl(crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_SetCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetAcList', Set access control list + /// + public void Test_SetAcList() + { + Console.WriteLine("Begin: Test_SetAcList"); + + VpnRpcAcList in_rpc_ac_list = new VpnRpcAcList() + { + HubName_str = hub_name, + + ACList = new VpnAc[] + { + new VpnAc() + { + Deny_bool = true, + IpAddress_ip = "192.168.0.0", + SubnetMask_ip = "255.255.0.0", + Masked_bool = true, + Priority_u32 = 123, + }, + new VpnAc() + { + Deny_bool = false, + IpAddress_ip = "fe80::", + SubnetMask_ip = "8", + Masked_bool = true, + Priority_u32 = 123, + }, + } + }; + VpnRpcAcList out_rpc_ac_list = api.SetAcList(in_rpc_ac_list); + + print_object(out_rpc_ac_list); + + Console.WriteLine("End: Test_SetAcList"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetAcList', Get access control list + /// + public void Test_GetAcList() + { + Console.WriteLine("Begin: Test_GetAcList"); + + VpnRpcAcList in_rpc_ac_list = new VpnRpcAcList() + { + HubName_str = hub_name, + }; + VpnRpcAcList out_rpc_ac_list = api.GetAcList(in_rpc_ac_list); + + print_object(out_rpc_ac_list); + + Console.WriteLine("End: Test_GetAcList"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumLogFile', Enumerate log files + /// + public VpnRpcEnumLogFile Test_EnumLogFile() + { + Console.WriteLine("Begin: Test_EnumLogFile"); + + VpnRpcEnumLogFile out_rpc_enum_log_file = api.EnumLogFile(); + + print_object(out_rpc_enum_log_file); + + Console.WriteLine("End: Test_EnumLogFile"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_log_file; + } + + /// + /// API test for 'ReadLogFile', Read a log file + /// + public void Test_ReadLogFile(string filename) + { + Console.WriteLine("Begin: Test_ReadLogFile"); + + VpnRpcReadLogFile in_rpc_read_log_file = new VpnRpcReadLogFile() + { + FilePath_str = filename, + }; + VpnRpcReadLogFile out_rpc_read_log_file = api.ReadLogFile(in_rpc_read_log_file); + + print_object(out_rpc_read_log_file); + + Console.WriteLine("End: Test_ReadLogFile"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetSysLog', Set syslog function setting + /// + public void Test_SetSysLog(bool flag) + { + Console.WriteLine("Begin: Test_SetSysLog"); + + VpnSyslogSetting in_syslog_setting = new VpnSyslogSetting() + { + SaveType_u32 = flag ? VpnSyslogSaveType.ServerAndHubAllLog : VpnSyslogSaveType.None, + Hostname_str = "1.2.3.4", + Port_u32 = 123, + }; + VpnSyslogSetting out_syslog_setting = api.SetSysLog(in_syslog_setting); + + print_object(out_syslog_setting); + + Console.WriteLine("End: Test_SetSysLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSysLog', Get syslog function setting + /// + public void Test_GetSysLog() + { + Console.WriteLine("Begin: Test_GetSysLog"); + + VpnSyslogSetting in_syslog_setting = new VpnSyslogSetting() + { + }; + VpnSyslogSetting out_syslog_setting = api.GetSysLog(in_syslog_setting); + + print_object(out_syslog_setting); + + Console.WriteLine("End: Test_GetSysLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubMsg', Set message of today on hub + /// + public void Test_SetHubMsg() + { + Console.WriteLine("Begin: Test_SetHubMsg"); + + VpnRpcMsg in_rpc_msg = new VpnRpcMsg() + { + HubName_str = hub_name, + Msg_bin = new byte[] + { +0x57,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,0x4d,0x65,0x6e,0x20,0x6f,0x66,0x20,0x41, +0x6c,0x6c,0x20,0x43,0x6f,0x75,0x6e,0x74,0x72,0x69,0x65,0x73,0x2c,0x20,0x55,0x6e, +0x69,0x74,0x65,0x21,0x20,0xe4,0xb8,0x87,0xe5,0x9b,0xbd,0xe3,0x81,0xae,0xe5,0x8a, +0xb4,0xe5,0x83,0x8d,0xe8,0x80,0x85,0xe3,0x82,0x88,0xe3,0x80,0x81,0xe5,0x9b,0xa3, +0xe7,0xb5,0x90,0xe3,0x81,0x9b,0xe3,0x82,0x88,0x21,0x20,0xd7,0x92,0xd7,0x91,0xd7, +0xa8,0xd7,0x99,0xd7,0x9d,0x20,0xd7,0xa2,0xd7,0x95,0xd7,0x91,0xd7,0x93,0xd7,0x99, +0xd7,0x9d,0x20,0xd7,0xa9,0xd7,0x9c,0x20,0xd7,0x9b,0xd7,0x9c,0x20,0xd7,0x94,0xd7, +0x9e,0xd7,0x93,0xd7,0x99,0xd7,0xa0,0xd7,0x95,0xd7,0xaa,0x2c,0x20,0xd7,0x94,0xd7, +0xaa,0xd7,0x90,0xd7,0x97,0xd7,0x93,0xd7,0x95,0x21 + }, + }; + VpnRpcMsg out_rpc_msg = api.SetHubMsg(in_rpc_msg); + + print_object(out_rpc_msg); + + Console.WriteLine("End: Test_SetHubMsg"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubMsg', Get message of today on hub + /// + public void Test_GetHubMsg() + { + Console.WriteLine("Begin: Test_GetHubMsg"); + + VpnRpcMsg in_rpc_msg = new VpnRpcMsg() + { + HubName_str = hub_name, + }; + VpnRpcMsg out_rpc_msg = api.GetHubMsg(in_rpc_msg); + + print_object(out_rpc_msg); + + Console.WriteLine("End: Test_GetHubMsg"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'Crash', Do Crash + /// + public void Test_Crash() + { + Console.WriteLine("Begin: Test_Crash"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + }; + VpnRpcTest out_rpc_test = api.Crash(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_Crash"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetAdminMsg', Get message for administrators + /// + public void Test_GetAdminMsg() + { + Console.WriteLine("Begin: Test_GetAdminMsg"); + + VpnRpcMsg out_rpc_msg = api.GetAdminMsg(); + + print_object(out_rpc_msg); + + Console.WriteLine("End: Test_GetAdminMsg"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'Flush', Flush configuration file + /// + public void Test_Flush() + { + Console.WriteLine("Begin: Test_Flush"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + }; + VpnRpcTest out_rpc_test = api.Flush(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_Flush"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetIPsecServices', Set IPsec service configuration + /// + public void Test_SetIPsecServices() + { + Console.WriteLine("Begin: Test_SetIPsecServices"); + + VpnIPsecServices in_ipsec_services = new VpnIPsecServices() + { + L2TP_Raw_bool = false, + L2TP_IPsec_bool = false, + EtherIP_IPsec_bool = false, + IPsec_Secret_str = "vpn", + L2TP_DefaultHub_str = "HUB_ABC", + }; + VpnIPsecServices out_ipsec_services = api.SetIPsecServices(in_ipsec_services); + + print_object(out_ipsec_services); + + Console.WriteLine("End: Test_SetIPsecServices"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetIPsecServices', Get IPsec service configuration + /// + public void Test_GetIPsecServices() + { + Console.WriteLine("Begin: Test_GetIPsecServices"); + + VpnIPsecServices out_ipsec_services = api.GetIPsecServices(); + + print_object(out_ipsec_services); + + Console.WriteLine("End: Test_GetIPsecServices"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddEtherIpId', Add EtherIP ID setting + /// + public void Test_AddEtherIpId() + { + Console.WriteLine("Begin: Test_AddEtherIpId"); + + VpnEtherIpId in_etherip_id = new VpnEtherIpId() + { + Id_str = "testid", + HubName_str = hub_name, + UserName_str = "nekosan", + Password_str = "torisan", + }; + VpnEtherIpId out_etherip_id = api.AddEtherIpId(in_etherip_id); + + print_object(out_etherip_id); + + Console.WriteLine("End: Test_AddEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetEtherIpId', Get EtherIP ID setting + /// + public void Test_GetEtherIpId(string id) + { + Console.WriteLine("Begin: Test_GetEtherIpId"); + + VpnEtherIpId in_etherip_id = new VpnEtherIpId() + { + Id_str = id, + }; + VpnEtherIpId out_etherip_id = api.GetEtherIpId(in_etherip_id); + + print_object(out_etherip_id); + + Console.WriteLine("End: Test_GetEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteEtherIpId', Delete EtherIP ID setting + /// + public void Test_DeleteEtherIpId(string id) + { + Console.WriteLine("Begin: Test_DeleteEtherIpId"); + + VpnEtherIpId in_etherip_id = new VpnEtherIpId() + { + Id_str = id, + }; + VpnEtherIpId out_etherip_id = api.DeleteEtherIpId(in_etherip_id); + + print_object(out_etherip_id); + + Console.WriteLine("End: Test_DeleteEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumEtherIpId', Enumerate EtherIP ID settings + /// + public VpnRpcEnumEtherIpId Test_EnumEtherIpId() + { + Console.WriteLine("Begin: Test_EnumEtherIpId"); + + VpnRpcEnumEtherIpId out_rpc_enum_etherip_id = api.EnumEtherIpId(); + + print_object(out_rpc_enum_etherip_id); + + Console.WriteLine("End: Test_EnumEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_etherip_id; + } + + /// + /// API test for 'SetOpenVpnSstpConfig', Set configurations for OpenVPN and SSTP + /// + public void Test_SetOpenVpnSstpConfig() + { + Console.WriteLine("Begin: Test_SetOpenVpnSstpConfig"); + + VpnOpenVpnSstpConfig in_openvpn_sstp_config = new VpnOpenVpnSstpConfig() + { + EnableOpenVPN_bool = true, + OpenVPNPortList_str = "1 2 3 4 5", + EnableSSTP_bool = true, + }; + VpnOpenVpnSstpConfig out_openvpn_sstp_config = api.SetOpenVpnSstpConfig(in_openvpn_sstp_config); + + print_object(out_openvpn_sstp_config); + + Console.WriteLine("End: Test_SetOpenVpnSstpConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetOpenVpnSstpConfig', Get configurations for OpenVPN and SSTP + /// + public void Test_GetOpenVpnSstpConfig() + { + Console.WriteLine("Begin: Test_GetOpenVpnSstpConfig"); + + VpnOpenVpnSstpConfig out_openvpn_sstp_config = api.GetOpenVpnSstpConfig(); + + print_object(out_openvpn_sstp_config); + + Console.WriteLine("End: Test_GetOpenVpnSstpConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetDDnsClientStatus', Get status of DDNS client + /// + public void Test_GetDDnsClientStatus() + { + Console.WriteLine("Begin: Test_GetDDnsClientStatus"); + + VpnDDnsClientStatus out_ddns_client_status = api.GetDDnsClientStatus(); + + print_object(out_ddns_client_status); + + Console.WriteLine("End: Test_GetDDnsClientStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'ChangeDDnsClientHostname', Change host-name for DDNS client + /// + public void Test_ChangeDDnsClientHostname() + { + Console.WriteLine("Begin: Test_ChangeDDnsClientHostname"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + StrValue_str = "nekotest" + rand.Next(1000000000, 2100000000), + }; + VpnRpcTest out_rpc_test = api.ChangeDDnsClientHostname(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_ChangeDDnsClientHostname"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'RegenerateServerCert', Regenerate server certification + /// + public void Test_RegenerateServerCert() + { + Console.WriteLine("Begin: Test_RegenerateServerCert"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + StrValue_str = "abc.example.org", + }; + + VpnRpcTest out_rpc_test = api.RegenerateServerCert(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_RegenerateServerCert"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'MakeOpenVpnConfigFile', Generate OpenVPN configuration files + /// + public void Test_MakeOpenVpnConfigFile() + { + Console.WriteLine("Begin: Test_MakeOpenVpnConfigFile"); + + VpnRpcReadLogFile out_rpc_read_log_file = api.MakeOpenVpnConfigFile(); + + print_object(out_rpc_read_log_file); + + Console.WriteLine("End: Test_MakeOpenVpnConfigFile"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetSpecialListener', Set special listener status + /// + public void Test_SetSpecialListener() + { + Console.WriteLine("Begin: Test_SetSpecialListener"); + + VpnRpcSpecialListener in_rpc_special_listener = new VpnRpcSpecialListener() + { + VpnOverDnsListener_bool = true, + VpnOverIcmpListener_bool = true, + }; + VpnRpcSpecialListener out_rpc_special_listener = api.SetSpecialListener(in_rpc_special_listener); + + print_object(out_rpc_special_listener); + + Console.WriteLine("End: Test_SetSpecialListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSpecialListener', Get special listener status + /// + public void Test_GetSpecialListener() + { + Console.WriteLine("Begin: Test_GetSpecialListener"); + + VpnRpcSpecialListener out_rpc_special_listener = api.GetSpecialListener(); + + print_object(out_rpc_special_listener); + + Console.WriteLine("End: Test_GetSpecialListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetAzureStatus', Get Azure status + /// + public void Test_GetAzureStatus() + { + Console.WriteLine("Begin: Test_GetAzureStatus"); + + VpnRpcAzureStatus out_rpc_azure_status = api.GetAzureStatus(); + + print_object(out_rpc_azure_status); + + Console.WriteLine("End: Test_GetAzureStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetAzureStatus', Set Azure status + /// + public void Test_SetAzureStatus() + { + Console.WriteLine("Begin: Test_SetAzureStatus"); + + VpnRpcAzureStatus in_rpc_azure_status = new VpnRpcAzureStatus() + { + IsEnabled_bool = true, + }; + VpnRpcAzureStatus out_rpc_azure_status = api.SetAzureStatus(in_rpc_azure_status); + + print_object(out_rpc_azure_status); + + Console.WriteLine("End: Test_SetAzureStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetDDnsInternetSettng', Get DDNS proxy configuration + /// + public void Test_GetDDnsInternetSettng() + { + Console.WriteLine("Begin: Test_GetDDnsInternetSettng"); + + VpnInternetSetting out_internet_setting = api.GetDDnsInternetSettng(); + + print_object(out_internet_setting); + + Console.WriteLine("End: Test_GetDDnsInternetSettng"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetDDnsInternetSettng', Set DDNS proxy configuration + /// + public void Test_SetDDnsInternetSettng() + { + Console.WriteLine("Begin: Test_SetDDnsInternetSettng"); + + VpnInternetSetting in_internet_setting = new VpnInternetSetting() + { + ProxyType_u32 = VpnRpcProxyType.Direct, + ProxyHostName_str = "1.2.3.4", + ProxyPort_u32 = 1234, + ProxyUsername_str = "neko", + ProxyPassword_str = "dog", + }; + VpnInternetSetting out_internet_setting = api.SetDDnsInternetSettng(in_internet_setting); + + print_object(out_internet_setting); + + Console.WriteLine("End: Test_SetDDnsInternetSettng"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetVgsConfig', Setting VPN Gate Server Configuration + /// + public void Test_SetVgsConfig() + { + Console.WriteLine("Begin: Test_SetVgsConfig"); + + VpnVgsConfig in_vgs_config = new VpnVgsConfig() + { + IsEnabled_bool = false, + Message_utf = "Neko san!!!", + Owner_utf = "Go go go!!!", + Abuse_utf = "da.test@softether.co.jp", + NoLog_bool = false, + LogPermanent_bool = true, + EnableL2TP_bool = true, + }; + VpnVgsConfig out_vgs_config = api.SetVgsConfig(in_vgs_config); + + print_object(out_vgs_config); + + Console.WriteLine("End: Test_SetVgsConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetVgsConfig', Get VPN Gate configuration + /// + public void Test_GetVgsConfig() + { + Console.WriteLine("Begin: Test_GetVgsConfig"); + + VpnVgsConfig out_vgs_config = api.GetVgsConfig(); + + print_object(out_vgs_config); + + Console.WriteLine("End: Test_GetVgsConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + + void print_object(object obj) + { + var setting = new Newtonsoft.Json.JsonSerializerSettings() + { + NullValueHandling = Newtonsoft.Json.NullValueHandling.Include, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Error, + }; + string str = Newtonsoft.Json.JsonConvert.SerializeObject(obj, Newtonsoft.Json.Formatting.Indented, setting); + Console.WriteLine(str); + } +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/vpnserver-jsonrpc-client-csharp.csproj b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/vpnserver-jsonrpc-client-csharp.csproj new file mode 100644 index 00000000..6d97ba0c --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/vpnserver-jsonrpc-client-csharp.csproj @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp2.1 + SoftEther.VPNServerRpc + + + + + + + + diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/vpnserver-jsonrpc-client-csharp.sln b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/vpnserver-jsonrpc-client-csharp.sln new file mode 100644 index 00000000..819e7f03 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/vpnserver-jsonrpc-client-csharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2041 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vpnserver-jsonrpc-client-csharp", "vpnserver-jsonrpc-client-csharp.csproj", "{81CA3EC4-026E-4D37-9889-828186BBB8C0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D87E5CF1-9A10-431C-AC42-F1041470AEE8} + EndGlobalSection +EndGlobal diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/.gitignore b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/.gitignore new file mode 100644 index 00000000..ed0d3c87 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/.gitignore @@ -0,0 +1,88 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/LICENSE b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/Note_HowToPublish.txt b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/Note_HowToPublish.txt new file mode 100644 index 00000000..c8263903 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/Note_HowToPublish.txt @@ -0,0 +1,5 @@ +npm install + +npm run build + +npm publish diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.d.ts b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.d.ts new file mode 100644 index 00000000..54381739 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=sample.d.ts.map \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.d.ts.map b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.d.ts.map new file mode 100644 index 00000000..307a8761 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../src/sample.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js new file mode 100644 index 00000000..dd3db357 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js @@ -0,0 +1,4146 @@ +"use strict"; +// Test sample code for SoftEther VPN Server JSON-RPC Stub +// Runs on both web browsers and Node.js +// +// sample.ts +// Automatically generated at 2019-05-29 18:21:39 by vpnserver-jsonrpc-codegen +// +// This sample code shows how to call all available RPC functions. +// You can copy and paste test code to write your own web browser TypeScript / JavaScript codes. +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +exports.__esModule = true; +// On the web browser uncomment below imports as necessary to support old browsers. +// import "core-js/es6/promise"; +// import "core-js/es6/string"; +// import "whatwg-fetch"; +// Import the vpnrpc.ts RPC stub. +var VPN = __importStar(require("./vpnrpc")); +// Output JSON-RPC request / reply strings to the debug console. +VPN.VpnServerRpc.SetDebugMode(true); +var api; +// Creating the VpnServerRpc class instance here. +if (VPN.VpnServerRpc.IsNodeJS() === false) // // Determine if this JavaScript environment is on the Node.js or not + { + // On the web browser. We do not need to specify any hostname, port or credential as the web browser already knows it. + api = new VPN.VpnServerRpc(); +} +else { + // On the Node.js. We need to specify the target VPN Server's hostname, port and credential. + api = new VPN.VpnServerRpc("127.0.0.1", 443, "", "PASSWORD_HERE", false); +} +// A variable for test +var hub_name = "test"; +// Call the Test_All() function to test almost all VPN APIs. +Test_All(); +/** Tests all VPN APIs */ +function Test_All() { + return __awaiter(this, void 0, void 0, function () { + var new_listener_port, farm_members, _i, _a, farm_member, enum_connection, _b, _c, connecton, hub_log_settings, enum_ca, _d, _e, ca, enum_link, _f, _g, link, enum_session, _h, _j, session, enum_mac, _k, _l, mac, enum_ip, _m, _o, ip, enum_crl, _p, _q, crl, got_crl, _r, _s, crl, enum_log_file, _t, _u, log, enum_etherip_id, _v, _w, etherip_id; + return __generator(this, function (_x) { + switch (_x.label) { + case 0: + hub_name = "TEST"; + return [4 /*yield*/, Test_Test()]; + case 1: + _x.sent(); + return [4 /*yield*/, Test_GetServerInfo()]; + case 2: + _x.sent(); + return [4 /*yield*/, Test_GetServerStatus()]; + case 3: + _x.sent(); + return [4 /*yield*/, Test_CreateListener()]; + case 4: + new_listener_port = _x.sent(); + return [4 /*yield*/, Test_EnableListener(new_listener_port, false)]; + case 5: + _x.sent(); + return [4 /*yield*/, Test_EnumListener()]; + case 6: + _x.sent(); + return [4 /*yield*/, Test_EnableListener(new_listener_port, true)]; + case 7: + _x.sent(); + return [4 /*yield*/, Test_EnumListener()]; + case 8: + _x.sent(); + return [4 /*yield*/, Test_DeleteListener(new_listener_port)]; + case 9: + _x.sent(); + return [4 /*yield*/, Test_SetServerPassword()]; + case 10: + _x.sent(); + return [4 /*yield*/, Test_GetFarmSetting()]; + case 11: + _x.sent(); + if (!false) return [3 /*break*/, 19]; + return [4 /*yield*/, Test_SetFarmSetting()]; + case 12: + _x.sent(); + return [4 /*yield*/, Test_EnumFarmMember()]; + case 13: + farm_members = _x.sent(); + _i = 0, _a = farm_members.FarmMemberList; + _x.label = 14; + case 14: + if (!(_i < _a.length)) return [3 /*break*/, 17]; + farm_member = _a[_i]; + return [4 /*yield*/, Test_GetFarmInfo(farm_member.Id_u32)]; + case 15: + _x.sent(); + _x.label = 16; + case 16: + _i++; + return [3 /*break*/, 14]; + case 17: return [4 /*yield*/, Test_GetFarmConnectionStatus()]; + case 18: + _x.sent(); + return [3 /*break*/, 20]; + case 19: + if (false) { + console.log("abc"); + } + else { + console.log("def"); + } + _x.label = 20; + case 20: return [4 /*yield*/, Test_GetServerCert()]; + case 21: + _x.sent(); + return [4 /*yield*/, Test_SetServerCert()]; + case 22: + _x.sent(); + return [4 /*yield*/, Test_GetServerCipher()]; + case 23: + _x.sent(); + return [4 /*yield*/, Test_SetServerCipher()]; + case 24: + _x.sent(); + return [4 /*yield*/, Test_EnumConnection()]; + case 25: + enum_connection = _x.sent(); + _b = 0, _c = enum_connection.ConnectionList; + _x.label = 26; + case 26: + if (!(_b < _c.length)) return [3 /*break*/, 29]; + connecton = _c[_b]; + return [4 /*yield*/, Test_GetConnectionInfo(connecton.Name_str)]; + case 27: + _x.sent(); + _x.label = 28; + case 28: + _b++; + return [3 /*break*/, 26]; + case 29: return [4 /*yield*/, Test_CreateHub()]; + case 30: + hub_name = _x.sent(); + return [4 /*yield*/, Test_SetHub()]; + case 31: + _x.sent(); + return [4 /*yield*/, Test_GetHub()]; + case 32: + _x.sent(); + return [4 /*yield*/, Test_EnumHub()]; + case 33: + _x.sent(); + return [4 /*yield*/, Test_SetHubRadius()]; + case 34: + _x.sent(); + return [4 /*yield*/, Test_GetHubRadius()]; + case 35: + _x.sent(); + return [4 /*yield*/, Test_SetHubOnline()]; + case 36: + _x.sent(); + return [4 /*yield*/, Test_GetHubStatus()]; + case 37: + _x.sent(); + return [4 /*yield*/, Test_GetHubLog()]; + case 38: + hub_log_settings = _x.sent(); + return [4 /*yield*/, Test_SetHubLog(hub_log_settings)]; + case 39: + _x.sent(); + return [4 /*yield*/, Test_AddCa()]; + case 40: + _x.sent(); + return [4 /*yield*/, Test_EnumCa()]; + case 41: + enum_ca = _x.sent(); + _d = 0, _e = enum_ca.CAList; + _x.label = 42; + case 42: + if (!(_d < _e.length)) return [3 /*break*/, 46]; + ca = _e[_d]; + return [4 /*yield*/, Test_GetCa(ca.Key_u32)]; + case 43: + _x.sent(); + return [4 /*yield*/, Test_DeleteCa(ca.Key_u32)]; + case 44: + _x.sent(); + _x.label = 45; + case 45: + _d++; + return [3 /*break*/, 42]; + case 46: return [4 /*yield*/, Test_CreateLink()]; + case 47: + _x.sent(); + return [4 /*yield*/, Test_GetLink()]; + case 48: + _x.sent(); + return [4 /*yield*/, Test_SetLink()]; + case 49: + _x.sent(); + return [4 /*yield*/, Test_SetLinkOffline()]; + case 50: + _x.sent(); + return [4 /*yield*/, Test_SetLinkOnline()]; + case 51: + _x.sent(); + return [4 /*yield*/, Test_EnumLink()]; + case 52: + enum_link = _x.sent(); + _f = 0, _g = enum_link.LinkList; + _x.label = 53; + case 53: + if (!(_f < _g.length)) return [3 /*break*/, 56]; + link = _g[_f]; + return [4 /*yield*/, Test_GetLinkStatus(link.AccountName_utf)]; + case 54: + _x.sent(); + _x.label = 55; + case 55: + _f++; + return [3 /*break*/, 53]; + case 56: return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, 3000); })]; + case 57: + _x.sent(); + return [4 /*yield*/, Test_RenameLink()]; + case 58: + _x.sent(); + return [4 /*yield*/, Test_DeleteLink()]; + case 59: + _x.sent(); + return [4 /*yield*/, Test_AddAccess()]; + case 60: + _x.sent(); + return [4 /*yield*/, Test_EnumAccess()]; + case 61: + _x.sent(); + return [4 /*yield*/, Test_DeleteAccess()]; + case 62: + _x.sent(); + return [4 /*yield*/, Test_SetAccessList()]; + case 63: + _x.sent(); + return [4 /*yield*/, Test_CreateGroup()]; + case 64: + _x.sent(); + return [4 /*yield*/, Test_SetGroup()]; + case 65: + _x.sent(); + return [4 /*yield*/, Test_GetGroup()]; + case 66: + _x.sent(); + return [4 /*yield*/, Test_CreateUser()]; + case 67: + _x.sent(); + return [4 /*yield*/, Test_SetUser()]; + case 68: + _x.sent(); + return [4 /*yield*/, Test_GetUser()]; + case 69: + _x.sent(); + return [4 /*yield*/, Test_EnumUser()]; + case 70: + _x.sent(); + return [4 /*yield*/, Test_EnumGroup()]; + case 71: + _x.sent(); + return [4 /*yield*/, Test_DeleteUser()]; + case 72: + _x.sent(); + return [4 /*yield*/, Test_DeleteGroup()]; + case 73: + _x.sent(); + return [4 /*yield*/, Test_EnumSession()]; + case 74: + enum_session = _x.sent(); + _h = 0, _j = enum_session.SessionList; + _x.label = 75; + case 75: + if (!(_h < _j.length)) return [3 /*break*/, 79]; + session = _j[_h]; + return [4 /*yield*/, Test_GetSessionStatus(session.Name_str)]; + case 76: + _x.sent(); + return [4 /*yield*/, Test_DeleteSession(session.Name_str)]; + case 77: + _x.sent(); + _x.label = 78; + case 78: + _h++; + return [3 /*break*/, 75]; + case 79: return [4 /*yield*/, Test_EnumMacTable()]; + case 80: + enum_mac = _x.sent(); + _k = 0, _l = enum_mac.MacTable; + _x.label = 81; + case 81: + if (!(_k < _l.length)) return [3 /*break*/, 84]; + mac = _l[_k]; + return [4 /*yield*/, Test_DeleteMacTable(mac.Key_u32)]; + case 82: + _x.sent(); + _x.label = 83; + case 83: + _k++; + return [3 /*break*/, 81]; + case 84: return [4 /*yield*/, Test_EnumIpTable()]; + case 85: + enum_ip = _x.sent(); + _m = 0, _o = enum_ip.IpTable; + _x.label = 86; + case 86: + if (!(_m < _o.length)) return [3 /*break*/, 89]; + ip = _o[_m]; + return [4 /*yield*/, Test_DeleteIpTable(ip.Key_u32)]; + case 87: + _x.sent(); + _x.label = 88; + case 88: + _m++; + return [3 /*break*/, 86]; + case 89: return [4 /*yield*/, Test_SetKeep()]; + case 90: + _x.sent(); + return [4 /*yield*/, Test_GetKeep()]; + case 91: + _x.sent(); + return [4 /*yield*/, Test_EnableSecureNAT()]; + case 92: + _x.sent(); + return [4 /*yield*/, Test_GetSecureNATOption()]; + case 93: + _x.sent(); + return [4 /*yield*/, Test_SetSecureNATOption()]; + case 94: + _x.sent(); + return [4 /*yield*/, Test_EnumNAT()]; + case 95: + _x.sent(); + return [4 /*yield*/, Test_EnumDHCP()]; + case 96: + _x.sent(); + return [4 /*yield*/, Test_GetSecureNATStatus()]; + case 97: + _x.sent(); + return [4 /*yield*/, Test_DisableSecureNAT()]; + case 98: + _x.sent(); + return [4 /*yield*/, Test_EnumEthernet()]; + case 99: + _x.sent(); + return [4 /*yield*/, Test_EnumLocalBridge()]; + case 100: + _x.sent(); + return [4 /*yield*/, Test_GetBridgeSupport()]; + case 101: + _x.sent(); + return [4 /*yield*/, Test_GetCaps()]; + case 102: + _x.sent(); + return [4 /*yield*/, Test_GetConfig()]; + case 103: + _x.sent(); + return [4 /*yield*/, Test_GetDefaultHubAdminOptions()]; + case 104: + _x.sent(); + return [4 /*yield*/, Test_GetHubAdminOptions()]; + case 105: + _x.sent(); + return [4 /*yield*/, Test_SetHubAdminOptions()]; + case 106: + _x.sent(); + return [4 /*yield*/, Test_GetHubExtOptions()]; + case 107: + _x.sent(); + return [4 /*yield*/, Test_SetHubExtOptions()]; + case 108: + _x.sent(); + return [4 /*yield*/, Test_AddL3Switch()]; + case 109: + _x.sent(); + return [4 /*yield*/, Test_AddL3If()]; + case 110: + _x.sent(); + return [4 /*yield*/, Test_EnumL3Switch()]; + case 111: + _x.sent(); + return [4 /*yield*/, Test_EnumL3If()]; + case 112: + _x.sent(); + return [4 /*yield*/, Test_AddL3Table()]; + case 113: + _x.sent(); + return [4 /*yield*/, Test_EnumL3Table()]; + case 114: + _x.sent(); + return [4 /*yield*/, Test_DelL3Table()]; + case 115: + _x.sent(); + return [4 /*yield*/, Test_StartL3Switch()]; + case 116: + _x.sent(); + return [4 /*yield*/, Test_StopL3Switch()]; + case 117: + _x.sent(); + return [4 /*yield*/, Test_DelL3If()]; + case 118: + _x.sent(); + return [4 /*yield*/, Test_DelL3Switch()]; + case 119: + _x.sent(); + return [4 /*yield*/, Test_AddCrl()]; + case 120: + _x.sent(); + return [4 /*yield*/, Test_EnumCrl()]; + case 121: + enum_crl = _x.sent(); + _p = 0, _q = enum_crl.CRLList; + _x.label = 122; + case 122: + if (!(_p < _q.length)) return [3 /*break*/, 126]; + crl = _q[_p]; + return [4 /*yield*/, Test_GetCrl(crl.Key_u32)]; + case 123: + got_crl = _x.sent(); + got_crl.CommonName_utf = got_crl.CommonName_utf + "_a"; + return [4 /*yield*/, Test_SetCrl(got_crl)]; + case 124: + _x.sent(); + _x.label = 125; + case 125: + _p++; + return [3 /*break*/, 122]; + case 126: return [4 /*yield*/, Test_EnumCrl()]; + case 127: + enum_crl = _x.sent(); + _r = 0, _s = enum_crl.CRLList; + _x.label = 128; + case 128: + if (!(_r < _s.length)) return [3 /*break*/, 131]; + crl = _s[_r]; + return [4 /*yield*/, Test_DelCrl(crl.Key_u32)]; + case 129: + _x.sent(); + _x.label = 130; + case 130: + _r++; + return [3 /*break*/, 128]; + case 131: return [4 /*yield*/, Test_SetAcList()]; + case 132: + _x.sent(); + return [4 /*yield*/, Test_GetAcList()]; + case 133: + _x.sent(); + return [4 /*yield*/, Test_EnumLogFile()]; + case 134: + enum_log_file = _x.sent(); + _t = 0, _u = enum_log_file.LogFiles; + _x.label = 135; + case 135: + if (!(_t < _u.length)) return [3 /*break*/, 138]; + log = _u[_t]; + return [4 /*yield*/, Test_ReadLogFile(log.FilePath_str)]; + case 136: + _x.sent(); + return [3 /*break*/, 138]; + case 137: + _t++; + return [3 /*break*/, 135]; + case 138: return [4 /*yield*/, Test_SetSysLog(true)]; + case 139: + _x.sent(); + return [4 /*yield*/, Test_GetSysLog()]; + case 140: + _x.sent(); + return [4 /*yield*/, Test_SetSysLog(false)]; + case 141: + _x.sent(); + return [4 /*yield*/, Test_SetHubMsg()]; + case 142: + _x.sent(); + return [4 /*yield*/, Test_GetHubMsg()]; + case 143: + _x.sent(); + return [4 /*yield*/, Test_GetAdminMsg()]; + case 144: + _x.sent(); + return [4 /*yield*/, Test_Flush()]; + case 145: + _x.sent(); + return [4 /*yield*/, Test_SetIPsecServices()]; + case 146: + _x.sent(); + return [4 /*yield*/, Test_GetIPsecServices()]; + case 147: + _x.sent(); + return [4 /*yield*/, Test_AddEtherIpId()]; + case 148: + _x.sent(); + return [4 /*yield*/, Test_EnumEtherIpId()]; + case 149: + enum_etherip_id = _x.sent(); + _v = 0, _w = enum_etherip_id.Settings; + _x.label = 150; + case 150: + if (!(_v < _w.length)) return [3 /*break*/, 154]; + etherip_id = _w[_v]; + return [4 /*yield*/, Test_GetEtherIpId(etherip_id.Id_str)]; + case 151: + _x.sent(); + return [4 /*yield*/, Test_DeleteEtherIpId(etherip_id.Id_str)]; + case 152: + _x.sent(); + _x.label = 153; + case 153: + _v++; + return [3 /*break*/, 150]; + case 154: return [4 /*yield*/, Test_SetOpenVpnSstpConfig()]; + case 155: + _x.sent(); + return [4 /*yield*/, Test_GetOpenVpnSstpConfig()]; + case 156: + _x.sent(); + return [4 /*yield*/, Test_GetDDnsClientStatus()]; + case 157: + _x.sent(); + return [4 /*yield*/, Test_SetDDnsInternetSettng()]; + case 158: + _x.sent(); + return [4 /*yield*/, Test_GetDDnsInternetSettng()]; + case 159: + _x.sent(); + return [4 /*yield*/, Test_ChangeDDnsClientHostname()]; + case 160: + _x.sent(); + return [4 /*yield*/, Test_RegenerateServerCert()]; + case 161: + _x.sent(); + return [4 /*yield*/, Test_MakeOpenVpnConfigFile()]; + case 162: + _x.sent(); + return [4 /*yield*/, Test_SetSpecialListener()]; + case 163: + _x.sent(); + return [4 /*yield*/, Test_GetSpecialListener()]; + case 164: + _x.sent(); + return [4 /*yield*/, Test_GetAzureStatus()]; + case 165: + _x.sent(); + return [4 /*yield*/, Test_SetAzureStatus()]; + case 166: + _x.sent(); + return [4 /*yield*/, Test_SetVgsConfig()]; + case 167: + _x.sent(); + return [4 /*yield*/, Test_GetVgsConfig()]; + case 168: + _x.sent(); + return [4 /*yield*/, Test_DeleteHub()]; + case 169: + _x.sent(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'Test', test RPC function */ +function Test_Test() { + return __awaiter(this, void 0, void 0, function () { + var a, b; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_Test"); + a = new VPN.VpnRpcTest({ + IntValue_u32: 12345 + }); + return [4 /*yield*/, api.Test(a)]; + case 1: + b = _a.sent(); + console.log(b); + console.log("End: Test_Test"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetServerInfo', Get server information */ +function Test_GetServerInfo() { + return __awaiter(this, void 0, void 0, function () { + var info; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetServerInfo"); + return [4 /*yield*/, api.GetServerInfo()]; + case 1: + info = _a.sent(); + console.log(info); + console.log("End: Test_GetServerInfo"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetServerStatus', Get server status */ +function Test_GetServerStatus() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_server_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetServerStatus"); + return [4 /*yield*/, api.GetServerStatus()]; + case 1: + out_rpc_server_status = _a.sent(); + console.log(out_rpc_server_status); + console.log("End: Test_GetServerStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'CreateListener', Create a listener */ +function Test_CreateListener() { + return __awaiter(this, void 0, void 0, function () { + var port, in_rpc_listener, out_rpc_listener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_CreateListener"); + port = Math.floor((Math.random() * (65534 - 1025)) + 1025); + console.log("Creating a new listener port: Port " + port); + in_rpc_listener = new VPN.VpnRpcListener({ + Enable_bool: true, + Port_u32: port + }); + return [4 /*yield*/, api.CreateListener(in_rpc_listener)]; + case 1: + out_rpc_listener = _a.sent(); + console.log("Done."); + console.log("End: Test_CreateListener"); + console.log("-----"); + console.log(); + return [2 /*return*/, port]; + } + }); + }); +} +/** API test for 'EnumListener', Enumerating listeners */ +function Test_EnumListener() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_listener_list; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumListener"); + return [4 /*yield*/, api.EnumListener()]; + case 1: + out_rpc_listener_list = _a.sent(); + console.log(out_rpc_listener_list); + console.log("End: Test_EnumListener"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteListener', Delete a listener */ +function Test_DeleteListener(port) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_listener, out_rpc_listener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteListener"); + console.log("Deleting a new listener port: Port" + port); + in_rpc_listener = new VPN.VpnRpcListener({ + Port_u32: port + }); + return [4 /*yield*/, api.DeleteListener(in_rpc_listener)]; + case 1: + out_rpc_listener = _a.sent(); + console.log("Done."); + console.log("End: Test_DeleteListener"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnableListener', Enable / Disable listener */ +function Test_EnableListener(port, enabled) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_listener, out_rpc_listener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnableListener"); + if (enabled) { + console.log("Enabling listener port = " + port); + } + else { + console.log("Disabling listener port = " + port); + } + in_rpc_listener = new VPN.VpnRpcListener({ + Port_u32: port, + Enable_bool: enabled + }); + return [4 /*yield*/, api.EnableListener(in_rpc_listener)]; + case 1: + out_rpc_listener = _a.sent(); + console.log("Done."); + console.log("End: Test_EnableListener"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetServerPassword', Set server password */ +function Test_SetServerPassword() { + return __awaiter(this, void 0, void 0, function () { + var password, in_rpc_set_password, out_rpc_set_password; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + password = "microsoft"; + console.log("Begin: Test_SetServerPassword"); + console.log("Set the server administrator password to '" + password + "'."); + in_rpc_set_password = new VPN.VpnRpcSetPassword({ + PlainTextPassword_str: password + }); + return [4 /*yield*/, api.SetServerPassword(in_rpc_set_password)]; + case 1: + out_rpc_set_password = _a.sent(); + console.log("Done."); + console.log("End: Test_SetServerPassword"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetFarmSetting', Set clustering configuration */ +function Test_SetFarmSetting() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_farm, out_rpc_farm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetFarmSetting"); + in_rpc_farm = new VPN.VpnRpcFarm({ + ServerType_u32: VPN.VpnRpcServerType.FarmController, + NumPort_u32: 2, + Ports_u32: [443, 444, 445,], + PublicIp_ip: "1.2.3.4", + ControllerName_str: "controller", + MemberPasswordPlaintext_str: "microsoft", + ControllerPort_u32: 443, + Weight_u32: 100, + ControllerOnly_bool: false + }); + return [4 /*yield*/, api.SetFarmSetting(in_rpc_farm)]; + case 1: + out_rpc_farm = _a.sent(); + console.log("End: Test_SetFarmSetting"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetFarmSetting', Get clustering configuration */ +function Test_GetFarmSetting() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_farm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetFarmSetting"); + return [4 /*yield*/, api.GetFarmSetting()]; + case 1: + out_rpc_farm = _a.sent(); + console.log(out_rpc_farm); + console.log("End: Test_GetFarmSetting"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetFarmInfo', Get cluster member information */ +function Test_GetFarmInfo(id) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_farm_info, out_rpc_farm_info; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetFarmInfo"); + in_rpc_farm_info = new VPN.VpnRpcFarmInfo({ + Id_u32: id + }); + return [4 /*yield*/, api.GetFarmInfo(in_rpc_farm_info)]; + case 1: + out_rpc_farm_info = _a.sent(); + console.log(out_rpc_farm_info); + console.log("End: Test_GetFarmInfo"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumFarmMember', Enumerate cluster members */ +function Test_EnumFarmMember() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_farm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumFarmMember"); + return [4 /*yield*/, api.EnumFarmMember()]; + case 1: + out_rpc_enum_farm = _a.sent(); + console.log(out_rpc_enum_farm); + console.log("End: Test_EnumFarmMember"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_farm]; + } + }); + }); +} +/** API test for 'GetFarmConnectionStatus', Get status of connection to cluster controller */ +function Test_GetFarmConnectionStatus() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_farm_connection_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetFarmConnectionStatus"); + return [4 /*yield*/, api.GetFarmConnectionStatus()]; + case 1: + out_rpc_farm_connection_status = _a.sent(); + console.log(out_rpc_farm_connection_status); + console.log("End: Test_GetFarmConnectionStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetServerCert', Set the server certification */ +function Test_SetServerCert() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_key_pair, out_rpc_key_pair; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetServerCert"); + in_rpc_key_pair = new VPN.VpnRpcKeyPair({ + Cert_bin: new Uint8Array([0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,]), + Key_bin: new Uint8Array([0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x45, 0x76, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, 0x42, 0x4b, 0x67, 0x77, 0x67, 0x67, 0x53, 0x6b, 0x41, 0x67, 0x45, 0x41, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x0a, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x0a, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x0a, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x0a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x0a, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x0a, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x45, 0x43, 0x67, 0x67, 0x45, 0x41, 0x54, 0x77, 0x34, 0x52, 0x6f, 0x52, 0x4c, 0x6a, 0x73, 0x68, 0x72, 0x42, 0x56, 0x6f, 0x59, 0x69, 0x78, 0x4f, 0x4a, 0x2b, 0x57, 0x4c, 0x6d, 0x2f, 0x45, 0x51, 0x57, 0x65, 0x37, 0x6f, 0x6a, 0x38, 0x31, 0x51, 0x50, 0x73, 0x39, 0x56, 0x45, 0x49, 0x32, 0x62, 0x53, 0x4f, 0x0a, 0x34, 0x4a, 0x51, 0x42, 0x55, 0x42, 0x53, 0x6b, 0x70, 0x64, 0x48, 0x34, 0x57, 0x32, 0x77, 0x51, 0x75, 0x2f, 0x61, 0x58, 0x57, 0x38, 0x75, 0x75, 0x53, 0x39, 0x45, 0x43, 0x6d, 0x6d, 0x41, 0x41, 0x75, 0x45, 0x79, 0x4a, 0x54, 0x56, 0x7a, 0x75, 0x31, 0x32, 0x35, 0x58, 0x73, 0x65, 0x63, 0x6c, 0x44, 0x41, 0x55, 0x38, 0x49, 0x55, 0x70, 0x54, 0x2b, 0x70, 0x4c, 0x35, 0x79, 0x70, 0x37, 0x34, 0x0a, 0x45, 0x62, 0x76, 0x4e, 0x48, 0x48, 0x33, 0x67, 0x65, 0x72, 0x4f, 0x67, 0x78, 0x76, 0x49, 0x6a, 0x50, 0x64, 0x67, 0x77, 0x62, 0x66, 0x6d, 0x4d, 0x49, 0x59, 0x48, 0x62, 0x56, 0x70, 0x6e, 0x49, 0x30, 0x77, 0x32, 0x42, 0x43, 0x44, 0x51, 0x76, 0x74, 0x64, 0x64, 0x57, 0x6f, 0x42, 0x74, 0x41, 0x33, 0x43, 0x54, 0x6a, 0x63, 0x2f, 0x43, 0x56, 0x67, 0x73, 0x47, 0x77, 0x33, 0x43, 0x4e, 0x72, 0x0a, 0x46, 0x78, 0x41, 0x46, 0x35, 0x73, 0x4a, 0x34, 0x63, 0x5a, 0x4c, 0x6e, 0x5a, 0x31, 0x45, 0x36, 0x69, 0x74, 0x4c, 0x54, 0x50, 0x69, 0x6f, 0x6a, 0x74, 0x76, 0x48, 0x48, 0x34, 0x61, 0x64, 0x6d, 0x68, 0x68, 0x43, 0x61, 0x42, 0x49, 0x78, 0x76, 0x47, 0x2f, 0x53, 0x6e, 0x59, 0x77, 0x4e, 0x35, 0x38, 0x37, 0x55, 0x5a, 0x6d, 0x37, 0x4c, 0x57, 0x50, 0x61, 0x67, 0x4c, 0x41, 0x33, 0x67, 0x69, 0x0a, 0x48, 0x4b, 0x4f, 0x2b, 0x4b, 0x79, 0x42, 0x51, 0x39, 0x33, 0x31, 0x4e, 0x4d, 0x61, 0x65, 0x6a, 0x36, 0x6d, 0x75, 0x75, 0x46, 0x32, 0x30, 0x32, 0x76, 0x34, 0x37, 0x6c, 0x57, 0x6b, 0x64, 0x50, 0x4f, 0x6e, 0x52, 0x43, 0x69, 0x6f, 0x4d, 0x58, 0x30, 0x63, 0x31, 0x6a, 0x36, 0x76, 0x32, 0x61, 0x59, 0x34, 0x34, 0x77, 0x55, 0x4b, 0x71, 0x39, 0x4d, 0x52, 0x67, 0x6f, 0x52, 0x76, 0x4a, 0x37, 0x0a, 0x41, 0x39, 0x77, 0x65, 0x72, 0x4c, 0x6b, 0x68, 0x35, 0x78, 0x78, 0x35, 0x35, 0x32, 0x4f, 0x74, 0x71, 0x50, 0x36, 0x73, 0x61, 0x6d, 0x75, 0x47, 0x44, 0x52, 0x78, 0x31, 0x42, 0x70, 0x36, 0x53, 0x4f, 0x70, 0x68, 0x43, 0x45, 0x50, 0x48, 0x59, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x36, 0x33, 0x65, 0x2b, 0x52, 0x75, 0x6c, 0x36, 0x46, 0x78, 0x47, 0x43, 0x76, 0x67, 0x70, 0x6b, 0x33, 0x0a, 0x57, 0x67, 0x2f, 0x54, 0x31, 0x77, 0x2f, 0x59, 0x4b, 0x6b, 0x79, 0x4f, 0x49, 0x46, 0x4c, 0x63, 0x46, 0x4c, 0x57, 0x71, 0x42, 0x44, 0x71, 0x6c, 0x6e, 0x58, 0x65, 0x63, 0x6c, 0x6b, 0x50, 0x4b, 0x6a, 0x57, 0x4e, 0x2f, 0x32, 0x70, 0x4a, 0x6d, 0x4f, 0x31, 0x63, 0x46, 0x63, 0x44, 0x4a, 0x46, 0x59, 0x64, 0x32, 0x45, 0x49, 0x45, 0x72, 0x76, 0x42, 0x57, 0x54, 0x34, 0x51, 0x39, 0x4d, 0x42, 0x0a, 0x4e, 0x35, 0x6c, 0x44, 0x6b, 0x47, 0x75, 0x6a, 0x34, 0x2f, 0x6b, 0x68, 0x56, 0x6c, 0x79, 0x6e, 0x77, 0x62, 0x64, 0x42, 0x6e, 0x47, 0x43, 0x34, 0x61, 0x34, 0x48, 0x4a, 0x49, 0x4a, 0x76, 0x61, 0x35, 0x63, 0x70, 0x49, 0x63, 0x57, 0x65, 0x4a, 0x72, 0x35, 0x61, 0x57, 0x33, 0x69, 0x44, 0x36, 0x68, 0x53, 0x73, 0x61, 0x6c, 0x79, 0x55, 0x76, 0x4a, 0x4d, 0x6d, 0x64, 0x4d, 0x42, 0x6e, 0x47, 0x0a, 0x37, 0x2b, 0x50, 0x65, 0x53, 0x2b, 0x4e, 0x73, 0x4b, 0x30, 0x61, 0x63, 0x31, 0x67, 0x33, 0x4d, 0x6c, 0x56, 0x35, 0x42, 0x41, 0x32, 0x70, 0x55, 0x54, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x62, 0x65, 0x46, 0x6d, 0x2b, 0x46, 0x46, 0x35, 0x62, 0x76, 0x6f, 0x4b, 0x7a, 0x49, 0x4c, 0x6c, 0x31, 0x62, 0x79, 0x6b, 0x6c, 0x52, 0x6b, 0x69, 0x76, 0x7a, 0x6b, 0x62, 0x7a, 0x49, 0x6b, 0x41, 0x78, 0x0a, 0x35, 0x56, 0x6b, 0x74, 0x67, 0x36, 0x4a, 0x35, 0x63, 0x76, 0x38, 0x44, 0x35, 0x2b, 0x72, 0x71, 0x50, 0x75, 0x6a, 0x4f, 0x66, 0x39, 0x67, 0x42, 0x6a, 0x4e, 0x37, 0x70, 0x64, 0x78, 0x39, 0x39, 0x35, 0x6b, 0x47, 0x49, 0x78, 0x5a, 0x39, 0x6d, 0x31, 0x68, 0x57, 0x69, 0x78, 0x55, 0x55, 0x31, 0x55, 0x6f, 0x38, 0x72, 0x70, 0x39, 0x4a, 0x69, 0x47, 0x4f, 0x36, 0x72, 0x65, 0x31, 0x77, 0x69, 0x0a, 0x6a, 0x56, 0x2f, 0x4c, 0x31, 0x64, 0x37, 0x55, 0x66, 0x39, 0x48, 0x6a, 0x65, 0x61, 0x70, 0x4f, 0x46, 0x62, 0x34, 0x6b, 0x72, 0x71, 0x52, 0x58, 0x54, 0x65, 0x75, 0x4d, 0x6e, 0x35, 0x35, 0x44, 0x33, 0x64, 0x70, 0x79, 0x6a, 0x51, 0x4e, 0x43, 0x30, 0x5a, 0x50, 0x72, 0x61, 0x6d, 0x58, 0x64, 0x38, 0x31, 0x57, 0x6f, 0x6f, 0x56, 0x77, 0x58, 0x59, 0x41, 0x66, 0x69, 0x46, 0x76, 0x4c, 0x49, 0x0a, 0x6f, 0x66, 0x31, 0x37, 0x51, 0x67, 0x67, 0x49, 0x59, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x59, 0x55, 0x67, 0x67, 0x43, 0x34, 0x58, 0x49, 0x67, 0x5a, 0x76, 0x58, 0x34, 0x59, 0x65, 0x55, 0x38, 0x6c, 0x61, 0x79, 0x51, 0x50, 0x79, 0x4b, 0x71, 0x67, 0x38, 0x37, 0x2f, 0x76, 0x31, 0x2b, 0x7a, 0x35, 0x79, 0x65, 0x2f, 0x4d, 0x32, 0x5a, 0x65, 0x36, 0x53, 0x6e, 0x37, 0x48, 0x4a, 0x66, 0x59, 0x0a, 0x55, 0x5a, 0x4d, 0x36, 0x37, 0x48, 0x37, 0x52, 0x4b, 0x4e, 0x6f, 0x68, 0x46, 0x6c, 0x35, 0x43, 0x39, 0x65, 0x44, 0x4e, 0x7a, 0x67, 0x72, 0x50, 0x6b, 0x52, 0x63, 0x2f, 0x2f, 0x54, 0x77, 0x32, 0x45, 0x48, 0x74, 0x59, 0x68, 0x33, 0x42, 0x4b, 0x49, 0x6f, 0x72, 0x77, 0x39, 0x45, 0x64, 0x78, 0x59, 0x4e, 0x6c, 0x6b, 0x2b, 0x6a, 0x4e, 0x73, 0x30, 0x30, 0x64, 0x57, 0x35, 0x34, 0x64, 0x39, 0x0a, 0x65, 0x69, 0x69, 0x7a, 0x7a, 0x78, 0x59, 0x34, 0x34, 0x2f, 0x41, 0x32, 0x70, 0x39, 0x52, 0x49, 0x4d, 0x67, 0x79, 0x35, 0x49, 0x52, 0x77, 0x76, 0x53, 0x73, 0x6d, 0x50, 0x67, 0x61, 0x71, 0x34, 0x6f, 0x4b, 0x4d, 0x64, 0x54, 0x4e, 0x4d, 0x4f, 0x73, 0x30, 0x4a, 0x77, 0x65, 0x79, 0x50, 0x72, 0x42, 0x65, 0x49, 0x41, 0x72, 0x62, 0x46, 0x43, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x71, 0x0a, 0x57, 0x30, 0x34, 0x56, 0x33, 0x49, 0x75, 0x74, 0x33, 0x55, 0x42, 0x6f, 0x75, 0x50, 0x4d, 0x63, 0x63, 0x38, 0x2f, 0x56, 0x62, 0x69, 0x77, 0x48, 0x77, 0x79, 0x2b, 0x52, 0x6c, 0x4c, 0x6d, 0x4e, 0x77, 0x59, 0x41, 0x71, 0x63, 0x79, 0x35, 0x50, 0x35, 0x58, 0x4b, 0x4c, 0x33, 0x70, 0x36, 0x62, 0x65, 0x33, 0x2b, 0x4d, 0x6f, 0x76, 0x48, 0x52, 0x71, 0x6a, 0x35, 0x78, 0x72, 0x4a, 0x54, 0x57, 0x0a, 0x54, 0x6a, 0x2f, 0x36, 0x59, 0x61, 0x51, 0x73, 0x31, 0x2b, 0x72, 0x74, 0x63, 0x51, 0x45, 0x61, 0x74, 0x64, 0x34, 0x4b, 0x50, 0x66, 0x64, 0x78, 0x53, 0x2f, 0x63, 0x66, 0x52, 0x74, 0x38, 0x71, 0x74, 0x75, 0x42, 0x77, 0x51, 0x61, 0x2f, 0x34, 0x39, 0x4d, 0x72, 0x41, 0x4c, 0x76, 0x57, 0x43, 0x4c, 0x53, 0x42, 0x75, 0x4b, 0x74, 0x33, 0x49, 0x49, 0x75, 0x53, 0x2f, 0x51, 0x44, 0x74, 0x43, 0x0a, 0x5a, 0x4e, 0x67, 0x6d, 0x36, 0x4d, 0x78, 0x71, 0x4e, 0x6e, 0x49, 0x43, 0x58, 0x35, 0x46, 0x34, 0x36, 0x6d, 0x52, 0x49, 0x52, 0x42, 0x42, 0x4f, 0x32, 0x4b, 0x7a, 0x6c, 0x30, 0x33, 0x68, 0x62, 0x51, 0x6c, 0x71, 0x58, 0x4c, 0x5a, 0x63, 0x38, 0x6f, 0x51, 0x4b, 0x42, 0x67, 0x43, 0x53, 0x77, 0x66, 0x46, 0x7a, 0x68, 0x48, 0x76, 0x78, 0x36, 0x68, 0x69, 0x64, 0x57, 0x67, 0x48, 0x4a, 0x63, 0x0a, 0x77, 0x79, 0x76, 0x64, 0x6e, 0x70, 0x58, 0x78, 0x36, 0x5a, 0x4c, 0x6e, 0x6f, 0x61, 0x7a, 0x61, 0x6f, 0x48, 0x47, 0x74, 0x4d, 0x47, 0x43, 0x45, 0x5a, 0x49, 0x50, 0x66, 0x6a, 0x4c, 0x42, 0x63, 0x30, 0x4d, 0x74, 0x79, 0x45, 0x64, 0x53, 0x4c, 0x78, 0x54, 0x6c, 0x35, 0x59, 0x70, 0x78, 0x6f, 0x6d, 0x43, 0x46, 0x55, 0x4d, 0x33, 0x55, 0x63, 0x59, 0x4e, 0x2f, 0x50, 0x5a, 0x66, 0x58, 0x41, 0x0a, 0x6d, 0x36, 0x31, 0x45, 0x6d, 0x71, 0x53, 0x53, 0x4d, 0x56, 0x63, 0x47, 0x50, 0x67, 0x65, 0x2f, 0x43, 0x34, 0x44, 0x42, 0x5a, 0x59, 0x6a, 0x53, 0x45, 0x71, 0x62, 0x67, 0x37, 0x6d, 0x73, 0x52, 0x30, 0x33, 0x37, 0x42, 0x58, 0x54, 0x48, 0x6b, 0x78, 0x44, 0x62, 0x33, 0x71, 0x48, 0x46, 0x54, 0x6f, 0x30, 0x6b, 0x48, 0x57, 0x4a, 0x66, 0x34, 0x39, 0x59, 0x77, 0x32, 0x73, 0x77, 0x6a, 0x54, 0x0a, 0x72, 0x4f, 0x38, 0x46, 0x46, 0x44, 0x52, 0x56, 0x50, 0x44, 0x4c, 0x5a, 0x61, 0x37, 0x36, 0x47, 0x67, 0x79, 0x41, 0x55, 0x4a, 0x38, 0x55, 0x63, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,]) + }); + return [4 /*yield*/, api.SetServerCert(in_rpc_key_pair)]; + case 1: + out_rpc_key_pair = _a.sent(); + console.log(out_rpc_key_pair); + console.log("End: Test_SetServerCert"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetServerCert', Get the server certification */ +function Test_GetServerCert() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_key_pair; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetServerCert"); + return [4 /*yield*/, api.GetServerCert()]; + case 1: + out_rpc_key_pair = _a.sent(); + console.log(out_rpc_key_pair); + console.log("End: Test_GetServerCert"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetServerCipher', Get cipher for SSL */ +function Test_GetServerCipher() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_str; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetServerCipher"); + return [4 /*yield*/, api.GetServerCipher()]; + case 1: + out_rpc_str = _a.sent(); + console.log(out_rpc_str); + console.log("End: Test_GetServerCipher"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetServerCipher', Set cipher for SSL to the server */ +function Test_SetServerCipher() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_str, out_rpc_str; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetServerCipher"); + in_rpc_str = new VPN.VpnRpcStr({ + String_str: "RC4-MD5" + }); + return [4 /*yield*/, api.SetServerCipher(in_rpc_str)]; + case 1: + out_rpc_str = _a.sent(); + console.log(out_rpc_str); + console.log("End: Test_SetServerCipher"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'CreateHub', Create a hub */ +function Test_CreateHub() { + return __awaiter(this, void 0, void 0, function () { + var hub_name, in_rpc_create_hub, out_rpc_create_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + hub_name = "Test_" + Math.floor((Math.random() * (999999 - 100000)) + 100000); + console.log("Begin: Test_CreateHub"); + in_rpc_create_hub = new VPN.VpnRpcCreateHub({ + HubName_str: hub_name, + HubType_u32: VPN.VpnRpcHubType.Standalone, + Online_bool: true, + AdminPasswordPlainText_str: "microsoft", + MaxSession_u32: 123, + NoEnum_bool: false + }); + return [4 /*yield*/, api.CreateHub(in_rpc_create_hub)]; + case 1: + out_rpc_create_hub = _a.sent(); + console.log(out_rpc_create_hub); + console.log("End: Test_CreateHub"); + console.log("-----"); + console.log(); + return [2 /*return*/, hub_name]; + } + }); + }); +} +/** API test for 'SetHub', Set hub configuration */ +function Test_SetHub() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_create_hub, out_rpc_create_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHub"); + in_rpc_create_hub = new VPN.VpnRpcCreateHub({ + HubName_str: hub_name, + AdminPasswordPlainText_str: "aho", + HubType_u32: VPN.VpnRpcHubType.Standalone, + NoEnum_bool: false, + MaxSession_u32: 128, + Online_bool: true + }); + return [4 /*yield*/, api.SetHub(in_rpc_create_hub)]; + case 1: + out_rpc_create_hub = _a.sent(); + console.log(out_rpc_create_hub); + console.log("End: Test_SetHub"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHub', Get hub configuration */ +function Test_GetHub() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_create_hub, out_rpc_create_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHub"); + in_rpc_create_hub = new VPN.VpnRpcCreateHub({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHub(in_rpc_create_hub)]; + case 1: + out_rpc_create_hub = _a.sent(); + console.log(out_rpc_create_hub); + console.log("End: Test_GetHub"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumHub', Enumerate hubs */ +function Test_EnumHub() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumHub"); + return [4 /*yield*/, api.EnumHub()]; + case 1: + out_rpc_enum_hub = _a.sent(); + console.log(out_rpc_enum_hub); + console.log("End: Test_EnumHub"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteHub', Delete a hub */ +function Test_DeleteHub() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_hub, out_rpc_delete_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteHub"); + in_rpc_delete_hub = new VPN.VpnRpcDeleteHub({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.DeleteHub(in_rpc_delete_hub)]; + case 1: + out_rpc_delete_hub = _a.sent(); + console.log(out_rpc_delete_hub); + console.log("End: Test_DeleteHub"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHubRadius', Get Radius options of the hub */ +function Test_GetHubRadius() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_radius, out_rpc_radius; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHubRadius"); + in_rpc_radius = new VPN.VpnRpcRadius({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHubRadius(in_rpc_radius)]; + case 1: + out_rpc_radius = _a.sent(); + console.log(out_rpc_radius); + console.log("End: Test_GetHubRadius"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetHubRadius', Set Radius options of the hub */ +function Test_SetHubRadius() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_radius, out_rpc_radius; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHubRadius"); + in_rpc_radius = new VPN.VpnRpcRadius({ + HubName_str: hub_name, + RadiusServerName_str: "1.2.3.4", + RadiusPort_u32: 1234, + RadiusSecret_str: "microsoft", + RadiusRetryInterval_u32: 1000 + }); + return [4 /*yield*/, api.SetHubRadius(in_rpc_radius)]; + case 1: + out_rpc_radius = _a.sent(); + console.log(out_rpc_radius); + console.log("End: Test_SetHubRadius"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumConnection', Enumerate connections */ +function Test_EnumConnection() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_connection; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumConnection"); + return [4 /*yield*/, api.EnumConnection()]; + case 1: + out_rpc_enum_connection = _a.sent(); + console.log(out_rpc_enum_connection); + console.log("End: Test_EnumConnection"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_connection]; + } + }); + }); +} +/** API test for 'DisconnectConnection', Disconnect a connection */ +function Test_DisconnectConnection(connection_id) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_disconnect_connection, out_rpc_disconnect_connection; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DisconnectConnection"); + in_rpc_disconnect_connection = new VPN.VpnRpcDisconnectConnection({ + Name_str: connection_id + }); + return [4 /*yield*/, api.DisconnectConnection(in_rpc_disconnect_connection)]; + case 1: + out_rpc_disconnect_connection = _a.sent(); + console.log(out_rpc_disconnect_connection); + console.log("End: Test_DisconnectConnection"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetConnectionInfo', Get connection information */ +function Test_GetConnectionInfo(name) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_connection_info, out_rpc_connection_info; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetConnectionInfo"); + in_rpc_connection_info = new VPN.VpnRpcConnectionInfo({ + Name_str: name + }); + return [4 /*yield*/, api.GetConnectionInfo(in_rpc_connection_info)]; + case 1: + out_rpc_connection_info = _a.sent(); + console.log(out_rpc_connection_info); + console.log("End: Test_GetConnectionInfo"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetHubOnline', Make a hub on-line or off-line */ +function Test_SetHubOnline() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_set_hub_online, out_rpc_set_hub_online; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHubOnline"); + in_rpc_set_hub_online = new VPN.VpnRpcSetHubOnline({ + HubName_str: hub_name, + Online_bool: true + }); + return [4 /*yield*/, api.SetHubOnline(in_rpc_set_hub_online)]; + case 1: + out_rpc_set_hub_online = _a.sent(); + console.log(out_rpc_set_hub_online); + console.log("End: Test_SetHubOnline"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHubStatus', Get hub status */ +function Test_GetHubStatus() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub_status, out_rpc_hub_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHubStatus"); + in_rpc_hub_status = new VPN.VpnRpcHubStatus({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHubStatus(in_rpc_hub_status)]; + case 1: + out_rpc_hub_status = _a.sent(); + console.log(out_rpc_hub_status); + console.log("End: Test_GetHubStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetHubLog', Set logging configuration into the hub */ +function Test_SetHubLog(in_rpc_hub_log) { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_hub_log; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHubLog"); + return [4 /*yield*/, api.SetHubLog(in_rpc_hub_log)]; + case 1: + out_rpc_hub_log = _a.sent(); + console.log(out_rpc_hub_log); + console.log("End: Test_SetHubLog"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHubLog', Get logging configuration of the hub */ +function Test_GetHubLog() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub_log, out_rpc_hub_log; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHubLog"); + in_rpc_hub_log = new VPN.VpnRpcHubLog({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHubLog(in_rpc_hub_log)]; + case 1: + out_rpc_hub_log = _a.sent(); + console.log(out_rpc_hub_log); + console.log("End: Test_GetHubLog"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_hub_log]; + } + }); + }); +} +/** API test for 'AddCa', Add CA(Certificate Authority) into the hub */ +function Test_AddCa() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub_add_ca, out_rpc_hub_add_ca; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddCa"); + in_rpc_hub_add_ca = new VPN.VpnRpcHubAddCA({ + HubName_str: hub_name, + Cert_bin: new Uint8Array([0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,]) + }); + return [4 /*yield*/, api.AddCa(in_rpc_hub_add_ca)]; + case 1: + out_rpc_hub_add_ca = _a.sent(); + console.log(out_rpc_hub_add_ca); + console.log("End: Test_AddCa"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumCa', Enumerate CA(Certificate Authority) in the hub */ +function Test_EnumCa() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub_enum_ca, out_rpc_hub_enum_ca; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumCa"); + in_rpc_hub_enum_ca = new VPN.VpnRpcHubEnumCA({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumCa(in_rpc_hub_enum_ca)]; + case 1: + out_rpc_hub_enum_ca = _a.sent(); + console.log(out_rpc_hub_enum_ca); + console.log("End: Test_EnumCa"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_hub_enum_ca]; + } + }); + }); +} +/** API test for 'GetCa', Get CA(Certificate Authority) setting from the hub */ +function Test_GetCa(key) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub_get_ca, out_rpc_hub_get_ca; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetCa"); + in_rpc_hub_get_ca = new VPN.VpnRpcHubGetCA({ + HubName_str: hub_name, + Key_u32: key + }); + return [4 /*yield*/, api.GetCa(in_rpc_hub_get_ca)]; + case 1: + out_rpc_hub_get_ca = _a.sent(); + console.log(out_rpc_hub_get_ca); + console.log("End: Test_GetCa"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteCa', Delete a CA(Certificate Authority) setting from the hub */ +function Test_DeleteCa(key) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub_delete_ca, out_rpc_hub_delete_ca; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteCa"); + in_rpc_hub_delete_ca = new VPN.VpnRpcHubDeleteCA({ + HubName_str: hub_name, + Key_u32: key + }); + return [4 /*yield*/, api.DeleteCa(in_rpc_hub_delete_ca)]; + case 1: + out_rpc_hub_delete_ca = _a.sent(); + console.log(out_rpc_hub_delete_ca); + console.log("End: Test_DeleteCa"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetLinkOnline', Make a link into on-line */ +function Test_SetLinkOnline() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_link, out_rpc_link; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetLinkOnline"); + in_rpc_link = new VPN.VpnRpcLink({ + HubName_str: hub_name, + AccountName_utf: "linktest" + }); + return [4 /*yield*/, api.SetLinkOnline(in_rpc_link)]; + case 1: + out_rpc_link = _a.sent(); + console.log(out_rpc_link); + console.log("End: Test_SetLinkOnline"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetLinkOffline', Make a link into off-line */ +function Test_SetLinkOffline() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_link, out_rpc_link; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetLinkOffline"); + in_rpc_link = new VPN.VpnRpcLink({ + HubName_str: hub_name, + AccountName_utf: "linktest" + }); + return [4 /*yield*/, api.SetLinkOffline(in_rpc_link)]; + case 1: + out_rpc_link = _a.sent(); + console.log(out_rpc_link); + console.log("End: Test_SetLinkOffline"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteLink', Delete a link */ +function Test_DeleteLink() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_link, out_rpc_link; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteLink"); + in_rpc_link = new VPN.VpnRpcLink({ + HubName_str: hub_name, + AccountName_utf: "linktest2" + }); + return [4 /*yield*/, api.DeleteLink(in_rpc_link)]; + case 1: + out_rpc_link = _a.sent(); + console.log(out_rpc_link); + console.log("End: Test_DeleteLink"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'RenameLink', Rename link (cascade connection) */ +function Test_RenameLink() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_rename_link, out_rpc_rename_link; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_RenameLink"); + in_rpc_rename_link = new VPN.VpnRpcRenameLink({ + HubName_str: hub_name, + OldAccountName_utf: "linktest", + NewAccountName_utf: "linktest2" + }); + return [4 /*yield*/, api.RenameLink(in_rpc_rename_link)]; + case 1: + out_rpc_rename_link = _a.sent(); + console.log(out_rpc_rename_link); + console.log("End: Test_RenameLink"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'CreateLink', Create a new link(cascade) */ +function Test_CreateLink() { + return __awaiter(this, void 0, void 0, function () { + var _a, in_rpc_create_link, out_rpc_create_link; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + console.log("Begin: Test_CreateLink"); + in_rpc_create_link = new VPN.VpnRpcCreateLink((_a = { + HubName_Ex_str: hub_name, + CheckServerCert_bool: false, + AccountName_utf: "linktest", + Hostname_str: "1.2.3.4", + Port_u32: 443, + ProxyType_u32: 0, + HubName_str: "ABC", + MaxConnection_u32: 16, + UseEncrypt_bool: true, + UseCompress_bool: false, + HalfConnection_bool: true, + AdditionalConnectionInterval_u32: 2, + ConnectionDisconnectSpan_u32: 24, + AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword, + Username_str: "181012", + PlainPassword_str: "microsoft", + HashedPassword_bin: new Uint8Array([]), + ClientX_bin: new Uint8Array([]), + ClientK_bin: new Uint8Array([]) + }, + _a["policy:DHCPFilter_bool"] = true, + _a["policy:DHCPNoServer_bool"] = true, + _a["policy:DHCPForce_bool"] = true, + _a.SecPol_CheckMac_bool = true, + _a.SecPol_CheckIP_bool = true, + _a["policy:ArpDhcpOnly_bool"] = true, + _a["policy:PrivacyFilter_bool"] = true, + _a["policy:NoServer_bool"] = true, + _a["policy:NoBroadcastLimiter_bool"] = true, + _a["policy:MaxMac_u32"] = 32, + _a["policy:MaxIP_u32"] = 64, + _a["policy:MaxUpload_u32"] = 960000, + _a["policy:MaxDownload_u32"] = 1280000, + _a["policy:RSandRAFilter_bool"] = true, + _a.SecPol_RAFilter_bool = true, + _a["policy:DHCPv6Filter_bool"] = true, + _a["policy:DHCPv6NoServer_bool"] = true, + _a.SecPol_CheckIPv6_bool = true, + _a["policy:NoServerV6_bool"] = true, + _a["policy:MaxIPv6_u32"] = 127, + _a["policy:FilterIPv4_bool"] = true, + _a["policy:FilterIPv6_bool"] = true, + _a["policy:FilterNonIP_bool"] = true, + _a["policy:NoIPv6DefaultRouterInRA_bool"] = true, + _a["policy:VLanId_u32"] = 123, + _a["policy:Ver3_bool"] = true, + _a)); + return [4 /*yield*/, api.CreateLink(in_rpc_create_link)]; + case 1: + out_rpc_create_link = _b.sent(); + console.log(out_rpc_create_link); + console.log("End: Test_CreateLink"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetLink', Get link configuration */ +function Test_GetLink() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_create_link, out_rpc_create_link; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetLink"); + in_rpc_create_link = new VPN.VpnRpcCreateLink({ + HubName_Ex_str: hub_name, + AccountName_utf: "linktest" + }); + return [4 /*yield*/, api.GetLink(in_rpc_create_link)]; + case 1: + out_rpc_create_link = _a.sent(); + console.log(out_rpc_create_link); + console.log("End: Test_GetLink"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetLink', Set link configuration */ +function Test_SetLink() { + return __awaiter(this, void 0, void 0, function () { + var _a, in_rpc_create_link, out_rpc_create_link; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + console.log("Begin: Test_SetLink"); + in_rpc_create_link = new VPN.VpnRpcCreateLink((_a = { + HubName_Ex_str: hub_name, + CheckServerCert_bool: false, + AccountName_utf: "linktest", + Hostname_str: "1.2.3.4", + Port_u32: 443, + ProxyType_u32: 0, + HubName_str: "ABC", + MaxConnection_u32: 16, + UseEncrypt_bool: true, + UseCompress_bool: false, + HalfConnection_bool: true, + AdditionalConnectionInterval_u32: 2, + ConnectionDisconnectSpan_u32: 24, + AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword, + Username_str: "181012", + PlainPassword_str: "microsoft", + HashedPassword_bin: new Uint8Array([]), + ClientX_bin: new Uint8Array([]), + ClientK_bin: new Uint8Array([]) + }, + _a["policy:DHCPFilter_bool"] = true, + _a["policy:DHCPNoServer_bool"] = true, + _a["policy:DHCPForce_bool"] = true, + _a.SecPol_CheckMac_bool = true, + _a.SecPol_CheckIP_bool = true, + _a["policy:ArpDhcpOnly_bool"] = true, + _a["policy:PrivacyFilter_bool"] = true, + _a["policy:NoServer_bool"] = true, + _a["policy:NoBroadcastLimiter_bool"] = true, + _a["policy:MaxMac_u32"] = 32, + _a["policy:MaxIP_u32"] = 64, + _a["policy:MaxUpload_u32"] = 960000, + _a["policy:MaxDownload_u32"] = 1280000, + _a["policy:RSandRAFilter_bool"] = true, + _a.SecPol_RAFilter_bool = true, + _a["policy:DHCPv6Filter_bool"] = true, + _a["policy:DHCPv6NoServer_bool"] = true, + _a.SecPol_CheckIPv6_bool = true, + _a["policy:NoServerV6_bool"] = true, + _a["policy:MaxIPv6_u32"] = 127, + _a["policy:FilterIPv4_bool"] = true, + _a["policy:FilterIPv6_bool"] = true, + _a["policy:FilterNonIP_bool"] = true, + _a["policy:NoIPv6DefaultRouterInRA_bool"] = true, + _a["policy:VLanId_u32"] = 123, + _a["policy:Ver3_bool"] = true, + _a)); + return [4 /*yield*/, api.SetLink(in_rpc_create_link)]; + case 1: + out_rpc_create_link = _b.sent(); + console.log(out_rpc_create_link); + console.log("End: Test_SetLink"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumLink', Enumerate links */ +function Test_EnumLink() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_link, out_rpc_enum_link; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumLink"); + in_rpc_enum_link = new VPN.VpnRpcEnumLink({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumLink(in_rpc_enum_link)]; + case 1: + out_rpc_enum_link = _a.sent(); + console.log(out_rpc_enum_link); + console.log("End: Test_EnumLink"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_link]; + } + }); + }); +} +/** API test for 'GetLinkStatus', Get link status */ +function Test_GetLinkStatus(name) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_link_status, out_rpc_link_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetLinkStatus"); + in_rpc_link_status = new VPN.VpnRpcLinkStatus({ + HubName_Ex_str: hub_name, + AccountName_utf: name + }); + return [4 /*yield*/, api.GetLinkStatus(in_rpc_link_status)]; + case 1: + out_rpc_link_status = _a.sent(); + console.log(out_rpc_link_status); + console.log("End: Test_GetLinkStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'AddAccess', Add access list entry */ +function Test_AddAccess() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_add_access_ipv4, out_rpc_add_access_ipv4, in_rpc_add_access_ipv6, out_rpc_add_access_ipv6; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddAccess"); + in_rpc_add_access_ipv4 = new VPN.VpnRpcAddAccess({ + HubName_str: hub_name, + AccessListSingle: [new VPN.VpnAccess({ + Note_utf: "IPv4 Test", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: false, + SrcIpAddress_ip: "192.168.0.0", + SrcSubnetMask_ip: "255.255.255.0", + DestIpAddress_ip: "10.0.0.0", + DestSubnetMask_ip: "255.255.0.0", + Protocol_u32: VPN.VpnIpProtocolNumber.TCP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]), + SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho" + }),] + }); + return [4 /*yield*/, api.AddAccess(in_rpc_add_access_ipv4)]; + case 1: + out_rpc_add_access_ipv4 = _a.sent(); + in_rpc_add_access_ipv6 = new VPN.VpnRpcAddAccess({ + HubName_str: hub_name, + AccessListSingle: [new VPN.VpnAccess({ + Note_utf: "IPv6 Test", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: true, + SrcIpAddress6_bin: new Uint8Array([0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]), + SrcSubnetMask6_bin: new Uint8Array([0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]), + Protocol_u32: VPN.VpnIpProtocolNumber.UDP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]), + SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho" + }),] + }); + return [4 /*yield*/, api.AddAccess(in_rpc_add_access_ipv6)]; + case 2: + out_rpc_add_access_ipv6 = _a.sent(); + console.log("End: Test_AddAccess"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteAccess', Delete access list entry */ +function Test_DeleteAccess() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_access, out_rpc_delete_access; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteAccess"); + in_rpc_delete_access = new VPN.VpnRpcDeleteAccess({ + HubName_str: hub_name, + Id_u32: 1 + }); + return [4 /*yield*/, api.DeleteAccess(in_rpc_delete_access)]; + case 1: + out_rpc_delete_access = _a.sent(); + console.log(out_rpc_delete_access); + console.log("End: Test_DeleteAccess"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumAccess', Get access list */ +function Test_EnumAccess() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_access_list, out_rpc_enum_access_list; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumAccess"); + in_rpc_enum_access_list = new VPN.VpnRpcEnumAccessList({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumAccess(in_rpc_enum_access_list)]; + case 1: + out_rpc_enum_access_list = _a.sent(); + console.log(out_rpc_enum_access_list); + console.log("End: Test_EnumAccess"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetAccessList', Set access list */ +function Test_SetAccessList() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_access_list, out_rpc_enum_access_list; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetAccessList"); + in_rpc_enum_access_list = new VPN.VpnRpcEnumAccessList({ + HubName_str: hub_name, + AccessList: [new VPN.VpnAccess({ + Note_utf: "IPv4 Test 2", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: false, + SrcIpAddress_ip: "192.168.0.0", + SrcSubnetMask_ip: "255.255.255.0", + DestIpAddress_ip: "10.0.0.0", + DestSubnetMask_ip: "255.255.0.0", + Protocol_u32: VPN.VpnIpProtocolNumber.TCP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]), + SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho" + }), new VPN.VpnAccess({ + Note_utf: "IPv6 Test 2", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: true, + SrcIpAddress6_bin: new Uint8Array([0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]), + SrcSubnetMask6_bin: new Uint8Array([0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]), + Protocol_u32: VPN.VpnIpProtocolNumber.UDP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]), + SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho" + }),] + }); + return [4 /*yield*/, api.SetAccessList(in_rpc_enum_access_list)]; + case 1: + out_rpc_enum_access_list = _a.sent(); + console.log(out_rpc_enum_access_list); + console.log("End: Test_SetAccessList"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'CreateUser', Create a user */ +function Test_CreateUser() { + return __awaiter(this, void 0, void 0, function () { + var _a, in_rpc_set_user, out_rpc_set_user; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + console.log("Begin: Test_CreateUser"); + in_rpc_set_user = new VPN.VpnRpcSetUser((_a = { + HubName_str: hub_name, + Name_str: "test1", + Realname_utf: "Cat man", + Note_utf: "Hey!!!", + AuthType_u32: VPN.VpnRpcUserAuthType.Password, + Auth_Password_str: "microsoft", + UserX_bin: new Uint8Array([]), + Serial_bin: new Uint8Array([]), + CommonName_utf: "", + RadiusUsername_utf: "", + NtUsername_utf: "", + ExpireTime_dt: new Date(2019, 1, 1), + UsePolicy_bool: true + }, + _a["policy:Access_bool"] = true, + _a["policy:DHCPFilter_bool"] = false, + _a["policy:DHCPNoServer_bool"] = true, + _a["policy:DHCPForce_bool"] = false, + _a["policy:NoBridge_bool"] = false, + _a["policy:NoRouting_bool"] = false, + _a["policy:CheckMac_bool"] = false, + _a["policy:CheckIP_bool"] = false, + _a["policy:ArpDhcpOnly_bool"] = false, + _a["policy:PrivacyFilter_bool"] = false, + _a["policy:NoServer_bool"] = false, + _a["policy:NoBroadcastLimiter_bool"] = false, + _a["policy:MonitorPort_bool"] = false, + _a["policy:MaxConnection_u32"] = 32, + _a["policy:TimeOut_u32"] = 15, + _a["policy:MaxMac_u32"] = 1000, + _a["policy:MaxIP_u32"] = 1000, + _a["policy:MaxUpload_u32"] = 1000000000, + _a["policy:MaxDownload_u32"] = 1000000000, + _a["policy:FixPassword_bool"] = false, + _a["policy:MultiLogins_u32"] = 1000, + _a["policy:NoQoS_bool"] = false, + _a["policy:RSandRAFilter_bool"] = false, + _a["policy:RAFilter_bool"] = false, + _a["policy:DHCPv6Filter_bool"] = false, + _a["policy:DHCPv6NoServer_bool"] = false, + _a["policy:NoRoutingV6_bool"] = false, + _a["policy:CheckIPv6_bool"] = false, + _a["policy:NoServerV6_bool"] = false, + _a["policy:MaxIPv6_u32"] = 1234, + _a["policy:NoSavePassword_bool"] = false, + _a["policy:AutoDisconnect_u32"] = 0, + _a["policy:FilterIPv4_bool"] = false, + _a["policy:FilterIPv6_bool"] = false, + _a["policy:FilterNonIP_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRA_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false, + _a["policy:VLanId_u32"] = 0, + _a["policy:Ver3_bool"] = true, + _a)); + return [4 /*yield*/, api.CreateUser(in_rpc_set_user)]; + case 1: + out_rpc_set_user = _b.sent(); + console.log("End: Test_CreateUser"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetUser', Set user setting */ +function Test_SetUser() { + return __awaiter(this, void 0, void 0, function () { + var _a, in_rpc_set_user, out_rpc_set_user; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + console.log("Begin: Test_SetUser"); + in_rpc_set_user = new VPN.VpnRpcSetUser((_a = { + HubName_str: hub_name, + Name_str: "test1", + Realname_utf: "Cat man", + Note_utf: "Hey!!!", + GroupName_str: "group1", + AuthType_u32: VPN.VpnRpcUserAuthType.Anonymous, + Auth_Password_str: "", + UserX_bin: new Uint8Array([]), + Serial_bin: new Uint8Array([]), + CommonName_utf: "", + RadiusUsername_utf: "", + NtUsername_utf: "", + ExpireTime_dt: new Date(2019, 1, 1), + UsePolicy_bool: true + }, + _a["policy:Access_bool"] = true, + _a["policy:DHCPFilter_bool"] = false, + _a["policy:DHCPNoServer_bool"] = true, + _a["policy:DHCPForce_bool"] = false, + _a["policy:NoBridge_bool"] = false, + _a["policy:NoRouting_bool"] = false, + _a["policy:CheckMac_bool"] = false, + _a["policy:CheckIP_bool"] = false, + _a["policy:ArpDhcpOnly_bool"] = false, + _a["policy:PrivacyFilter_bool"] = false, + _a["policy:NoServer_bool"] = false, + _a["policy:NoBroadcastLimiter_bool"] = false, + _a["policy:MonitorPort_bool"] = false, + _a["policy:MaxConnection_u32"] = 32, + _a["policy:TimeOut_u32"] = 15, + _a["policy:MaxMac_u32"] = 1000, + _a["policy:MaxIP_u32"] = 1000, + _a["policy:MaxUpload_u32"] = 1000000000, + _a["policy:MaxDownload_u32"] = 1000000000, + _a["policy:FixPassword_bool"] = false, + _a["policy:MultiLogins_u32"] = 1000, + _a["policy:NoQoS_bool"] = false, + _a["policy:RSandRAFilter_bool"] = false, + _a["policy:RAFilter_bool"] = false, + _a["policy:DHCPv6Filter_bool"] = false, + _a["policy:DHCPv6NoServer_bool"] = false, + _a["policy:NoRoutingV6_bool"] = false, + _a["policy:CheckIPv6_bool"] = false, + _a["policy:NoServerV6_bool"] = false, + _a["policy:MaxIPv6_u32"] = 1234, + _a["policy:NoSavePassword_bool"] = false, + _a["policy:AutoDisconnect_u32"] = 0, + _a["policy:FilterIPv4_bool"] = false, + _a["policy:FilterIPv6_bool"] = false, + _a["policy:FilterNonIP_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRA_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false, + _a["policy:VLanId_u32"] = 0, + _a["policy:Ver3_bool"] = true, + _a)); + return [4 /*yield*/, api.SetUser(in_rpc_set_user)]; + case 1: + out_rpc_set_user = _b.sent(); + console.log("End: Test_SetUser"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetUser', Get user setting */ +function Test_GetUser() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_set_user, out_rpc_set_user; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetUser"); + in_rpc_set_user = new VPN.VpnRpcSetUser({ + HubName_str: hub_name, + Name_str: "test1" + }); + return [4 /*yield*/, api.GetUser(in_rpc_set_user)]; + case 1: + out_rpc_set_user = _a.sent(); + console.log(out_rpc_set_user); + console.log("End: Test_GetUser"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteUser', Delete a user */ +function Test_DeleteUser() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_user, out_rpc_delete_user; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteUser"); + in_rpc_delete_user = new VPN.VpnRpcDeleteUser({ + HubName_str: hub_name, + Name_str: "test1" + }); + return [4 /*yield*/, api.DeleteUser(in_rpc_delete_user)]; + case 1: + out_rpc_delete_user = _a.sent(); + console.log("End: Test_DeleteUser"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumUser', Enumerate users */ +function Test_EnumUser() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_user, out_rpc_enum_user; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumUser"); + in_rpc_enum_user = new VPN.VpnRpcEnumUser({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumUser(in_rpc_enum_user)]; + case 1: + out_rpc_enum_user = _a.sent(); + console.log(out_rpc_enum_user); + console.log("End: Test_EnumUser"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'CreateGroup', Create a group */ +function Test_CreateGroup() { + return __awaiter(this, void 0, void 0, function () { + var _a, in_rpc_set_group, out_rpc_set_group; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + console.log("Begin: Test_CreateGroup"); + in_rpc_set_group = new VPN.VpnRpcSetGroup((_a = { + HubName_str: hub_name, + Name_str: "group1", + Realname_utf: "Cat group", + Note_utf: "This is it! This is it!!", + UsePolicy_bool: true + }, + _a["policy:Access_bool"] = true, + _a["policy:DHCPFilter_bool"] = false, + _a["policy:DHCPNoServer_bool"] = true, + _a["policy:DHCPForce_bool"] = false, + _a["policy:NoBridge_bool"] = false, + _a["policy:NoRouting_bool"] = false, + _a["policy:CheckMac_bool"] = false, + _a["policy:CheckIP_bool"] = false, + _a["policy:ArpDhcpOnly_bool"] = false, + _a["policy:PrivacyFilter_bool"] = false, + _a["policy:NoServer_bool"] = false, + _a["policy:NoBroadcastLimiter_bool"] = false, + _a["policy:MonitorPort_bool"] = false, + _a["policy:MaxConnection_u32"] = 32, + _a["policy:TimeOut_u32"] = 15, + _a["policy:MaxMac_u32"] = 1000, + _a["policy:MaxIP_u32"] = 1000, + _a["policy:MaxUpload_u32"] = 1000000000, + _a["policy:MaxDownload_u32"] = 1000000000, + _a["policy:FixPassword_bool"] = false, + _a["policy:MultiLogins_u32"] = 1000, + _a["policy:NoQoS_bool"] = false, + _a["policy:RSandRAFilter_bool"] = false, + _a["policy:RAFilter_bool"] = false, + _a["policy:DHCPv6Filter_bool"] = false, + _a["policy:DHCPv6NoServer_bool"] = false, + _a["policy:NoRoutingV6_bool"] = false, + _a["policy:CheckIPv6_bool"] = false, + _a["policy:NoServerV6_bool"] = false, + _a["policy:MaxIPv6_u32"] = 1234, + _a["policy:NoSavePassword_bool"] = false, + _a["policy:AutoDisconnect_u32"] = 0, + _a["policy:FilterIPv4_bool"] = false, + _a["policy:FilterIPv6_bool"] = false, + _a["policy:FilterNonIP_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRA_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false, + _a["policy:VLanId_u32"] = 0, + _a["policy:Ver3_bool"] = true, + _a)); + return [4 /*yield*/, api.CreateGroup(in_rpc_set_group)]; + case 1: + out_rpc_set_group = _b.sent(); + console.log(out_rpc_set_group); + console.log("End: Test_CreateGroup"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetGroup', Set group setting */ +function Test_SetGroup() { + return __awaiter(this, void 0, void 0, function () { + var _a, in_rpc_set_group, out_rpc_set_group; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + console.log("Begin: Test_SetGroup"); + in_rpc_set_group = new VPN.VpnRpcSetGroup((_a = { + HubName_str: hub_name, + Name_str: "group1", + Realname_utf: "Cat group 2", + Note_utf: "This is it! This is it!! 2", + UsePolicy_bool: true + }, + _a["policy:Access_bool"] = true, + _a["policy:DHCPFilter_bool"] = false, + _a["policy:DHCPNoServer_bool"] = true, + _a["policy:DHCPForce_bool"] = false, + _a["policy:NoBridge_bool"] = false, + _a["policy:NoRouting_bool"] = false, + _a["policy:CheckMac_bool"] = false, + _a["policy:CheckIP_bool"] = false, + _a["policy:ArpDhcpOnly_bool"] = false, + _a["policy:PrivacyFilter_bool"] = false, + _a["policy:NoServer_bool"] = false, + _a["policy:NoBroadcastLimiter_bool"] = false, + _a["policy:MonitorPort_bool"] = false, + _a["policy:MaxConnection_u32"] = 32, + _a["policy:TimeOut_u32"] = 15, + _a["policy:MaxMac_u32"] = 1000, + _a["policy:MaxIP_u32"] = 1000, + _a["policy:MaxUpload_u32"] = 1000000000, + _a["policy:MaxDownload_u32"] = 1000000000, + _a["policy:FixPassword_bool"] = false, + _a["policy:MultiLogins_u32"] = 1000, + _a["policy:NoQoS_bool"] = false, + _a["policy:RSandRAFilter_bool"] = false, + _a["policy:RAFilter_bool"] = false, + _a["policy:DHCPv6Filter_bool"] = false, + _a["policy:DHCPv6NoServer_bool"] = false, + _a["policy:NoRoutingV6_bool"] = false, + _a["policy:CheckIPv6_bool"] = false, + _a["policy:NoServerV6_bool"] = false, + _a["policy:MaxIPv6_u32"] = 1234, + _a["policy:NoSavePassword_bool"] = false, + _a["policy:AutoDisconnect_u32"] = 0, + _a["policy:FilterIPv4_bool"] = false, + _a["policy:FilterIPv6_bool"] = false, + _a["policy:FilterNonIP_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRA_bool"] = false, + _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false, + _a["policy:VLanId_u32"] = 0, + _a["policy:Ver3_bool"] = true, + _a)); + return [4 /*yield*/, api.SetGroup(in_rpc_set_group)]; + case 1: + out_rpc_set_group = _b.sent(); + console.log(out_rpc_set_group); + console.log("End: Test_SetGroup"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetGroup', Get group information */ +function Test_GetGroup() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_set_group, out_rpc_set_group; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetGroup"); + in_rpc_set_group = new VPN.VpnRpcSetGroup({ + HubName_str: hub_name, + Name_str: "group1" + }); + return [4 /*yield*/, api.GetGroup(in_rpc_set_group)]; + case 1: + out_rpc_set_group = _a.sent(); + console.log(out_rpc_set_group); + console.log("End: Test_GetGroup"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteGroup', Delete a group */ +function Test_DeleteGroup() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_user, out_rpc_delete_user; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteGroup"); + in_rpc_delete_user = new VPN.VpnRpcDeleteUser({ + HubName_str: hub_name, + Name_str: "group1" + }); + return [4 /*yield*/, api.DeleteGroup(in_rpc_delete_user)]; + case 1: + out_rpc_delete_user = _a.sent(); + console.log(out_rpc_delete_user); + console.log("End: Test_DeleteGroup"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumGroup', Enumerate groups */ +function Test_EnumGroup() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_group, out_rpc_enum_group; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumGroup"); + in_rpc_enum_group = new VPN.VpnRpcEnumGroup({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumGroup(in_rpc_enum_group)]; + case 1: + out_rpc_enum_group = _a.sent(); + console.log(out_rpc_enum_group); + console.log("End: Test_EnumGroup"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumSession', Enumerate sessions */ +function Test_EnumSession() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_session, out_rpc_enum_session; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumSession"); + in_rpc_enum_session = new VPN.VpnRpcEnumSession({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumSession(in_rpc_enum_session)]; + case 1: + out_rpc_enum_session = _a.sent(); + console.log(out_rpc_enum_session); + console.log("End: Test_EnumSession"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_session]; + } + }); + }); +} +/** API test for 'GetSessionStatus', Get session status */ +function Test_GetSessionStatus(session_name) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_session_status, out_rpc_session_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetSessionStatus"); + in_rpc_session_status = new VPN.VpnRpcSessionStatus({ + HubName_str: hub_name, + Name_str: session_name + }); + return [4 /*yield*/, api.GetSessionStatus(in_rpc_session_status)]; + case 1: + out_rpc_session_status = _a.sent(); + console.log(out_rpc_session_status); + console.log("End: Test_GetSessionStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteSession', Delete a session */ +function Test_DeleteSession(session_id) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_session, out_rpc_delete_session; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteSession"); + in_rpc_delete_session = new VPN.VpnRpcDeleteSession({ + HubName_str: hub_name, + Name_str: session_id + }); + return [4 /*yield*/, api.DeleteSession(in_rpc_delete_session)]; + case 1: + out_rpc_delete_session = _a.sent(); + console.log(out_rpc_delete_session); + console.log("End: Test_DeleteSession"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumMacTable', Get MAC address table */ +function Test_EnumMacTable() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_mac_table, out_rpc_enum_mac_table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumMacTable"); + in_rpc_enum_mac_table = new VPN.VpnRpcEnumMacTable({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumMacTable(in_rpc_enum_mac_table)]; + case 1: + out_rpc_enum_mac_table = _a.sent(); + console.log(out_rpc_enum_mac_table); + console.log("End: Test_EnumMacTable"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_mac_table]; + } + }); + }); +} +/** API test for 'DeleteMacTable', Delete MAC address table entry */ +function Test_DeleteMacTable(key32) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_table, out_rpc_delete_table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteMacTable"); + in_rpc_delete_table = new VPN.VpnRpcDeleteTable({ + HubName_str: hub_name, + Key_u32: key32 + }); + return [4 /*yield*/, api.DeleteMacTable(in_rpc_delete_table)]; + case 1: + out_rpc_delete_table = _a.sent(); + console.log("End: Test_DeleteMacTable"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumIpTable', Get IP address table */ +function Test_EnumIpTable() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_ip_table, out_rpc_enum_ip_table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumIpTable"); + in_rpc_enum_ip_table = new VPN.VpnRpcEnumIpTable({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumIpTable(in_rpc_enum_ip_table)]; + case 1: + out_rpc_enum_ip_table = _a.sent(); + console.log(out_rpc_enum_ip_table); + console.log("End: Test_EnumIpTable"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_ip_table]; + } + }); + }); +} +/** API test for 'DeleteIpTable', Delete IP address table entry */ +function Test_DeleteIpTable(key32) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_delete_table, out_rpc_delete_table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteIpTable"); + in_rpc_delete_table = new VPN.VpnRpcDeleteTable({ + HubName_str: hub_name, + Key_u32: key32 + }); + return [4 /*yield*/, api.DeleteIpTable(in_rpc_delete_table)]; + case 1: + out_rpc_delete_table = _a.sent(); + console.log(out_rpc_delete_table); + console.log("End: Test_DeleteIpTable"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetKeep', Set keep-alive function setting */ +function Test_SetKeep() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_keep, out_rpc_keep; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetKeep"); + in_rpc_keep = new VPN.VpnRpcKeep({ + UseKeepConnect_bool: true, + KeepConnectHost_str: "www.softether.org", + KeepConnectPort_u32: 123, + KeepConnectProtocol_u32: VPN.VpnRpcKeepAliveProtocol.UDP, + KeepConnectInterval_u32: 1 + }); + return [4 /*yield*/, api.SetKeep(in_rpc_keep)]; + case 1: + out_rpc_keep = _a.sent(); + console.log(out_rpc_keep); + console.log("End: Test_SetKeep"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetKeep', Get keep-alive function setting */ +function Test_GetKeep() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_keep, out_rpc_keep; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetKeep"); + in_rpc_keep = new VPN.VpnRpcKeep({}); + return [4 /*yield*/, api.GetKeep(in_rpc_keep)]; + case 1: + out_rpc_keep = _a.sent(); + console.log(out_rpc_keep); + console.log("End: Test_GetKeep"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnableSecureNAT', Enable SecureNAT function of the hub */ +function Test_EnableSecureNAT() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub, out_rpc_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnableSecureNAT"); + in_rpc_hub = new VPN.VpnRpcHub({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnableSecureNAT(in_rpc_hub)]; + case 1: + out_rpc_hub = _a.sent(); + console.log(out_rpc_hub); + console.log("End: Test_EnableSecureNAT"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DisableSecureNAT', Disable the SecureNAT function of the hub */ +function Test_DisableSecureNAT() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_hub, out_rpc_hub; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DisableSecureNAT"); + in_rpc_hub = new VPN.VpnRpcHub({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.DisableSecureNAT(in_rpc_hub)]; + case 1: + out_rpc_hub = _a.sent(); + console.log(out_rpc_hub); + console.log("End: Test_DisableSecureNAT"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetSecureNATOption', Set SecureNAT options */ +function Test_SetSecureNATOption() { + return __awaiter(this, void 0, void 0, function () { + var in_vh_option, out_vh_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetSecureNATOption"); + in_vh_option = new VPN.VpnVhOption({ + RpcHubName_str: hub_name, + MacAddress_bin: new Uint8Array([0x00, 0xAC, 0x00, 0x11, 0x22, 0x33,]), + Ip_ip: "10.0.0.254", + Mask_ip: "255.255.255.0", + UseNat_bool: true, + Mtu_u32: 1200, + NatTcpTimeout_u32: 100, + NatUdpTimeout_u32: 50, + UseDhcp_bool: true, + DhcpLeaseIPStart_ip: "10.0.0.101", + DhcpLeaseIPEnd_ip: "10.0.0.199", + DhcpSubnetMask_ip: "255.255.255.0", + DhcpExpireTimeSpan_u32: 3600, + DhcpGatewayAddress_ip: "10.0.0.254", + DhcpDnsServerAddress_ip: "10.0.0.254", + DhcpDnsServerAddress2_ip: "8.8.8.8", + DhcpDomainName_str: "lab.coe.ad.jp", + SaveLog_bool: true, + ApplyDhcpPushRoutes_bool: false, + DhcpPushRoutes_str: "" + }); + return [4 /*yield*/, api.SetSecureNATOption(in_vh_option)]; + case 1: + out_vh_option = _a.sent(); + console.log(out_vh_option); + console.log("End: Test_SetSecureNATOption"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetSecureNATOption', Get SecureNAT options */ +function Test_GetSecureNATOption() { + return __awaiter(this, void 0, void 0, function () { + var in_vh_option, out_vh_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetSecureNATOption"); + in_vh_option = new VPN.VpnVhOption({ + RpcHubName_str: hub_name + }); + return [4 /*yield*/, api.GetSecureNATOption(in_vh_option)]; + case 1: + out_vh_option = _a.sent(); + console.log(out_vh_option); + console.log("End: Test_GetSecureNATOption"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumNAT', Enumerate NAT entries of the SecureNAT */ +function Test_EnumNAT() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_nat, out_rpc_enum_nat; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumNAT"); + in_rpc_enum_nat = new VPN.VpnRpcEnumNat({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumNAT(in_rpc_enum_nat)]; + case 1: + out_rpc_enum_nat = _a.sent(); + console.log(out_rpc_enum_nat); + console.log("End: Test_EnumNAT"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumDHCP', Enumerate DHCP entries */ +function Test_EnumDHCP() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_dhcp, out_rpc_enum_dhcp; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumDHCP"); + in_rpc_enum_dhcp = new VPN.VpnRpcEnumDhcp({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumDHCP(in_rpc_enum_dhcp)]; + case 1: + out_rpc_enum_dhcp = _a.sent(); + console.log(out_rpc_enum_dhcp); + console.log("End: Test_EnumDHCP"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetSecureNATStatus', Get status of the SecureNAT */ +function Test_GetSecureNATStatus() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_nat_status, out_rpc_nat_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetSecureNATStatus"); + in_rpc_nat_status = new VPN.VpnRpcNatStatus({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetSecureNATStatus(in_rpc_nat_status)]; + case 1: + out_rpc_nat_status = _a.sent(); + console.log(out_rpc_nat_status); + console.log("End: Test_GetSecureNATStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumEthernet', Enumerate Ethernet devices */ +function Test_EnumEthernet() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_eth; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumEthernet"); + return [4 /*yield*/, api.EnumEthernet()]; + case 1: + out_rpc_enum_eth = _a.sent(); + console.log(out_rpc_enum_eth); + console.log("End: Test_EnumEthernet"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'AddLocalBridge', Add a new local bridge */ +function Test_AddLocalBridge() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_localbridge, out_rpc_localbridge; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddLocalBridge"); + in_rpc_localbridge = new VPN.VpnRpcLocalBridge({ + DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str: hub_name + }); + return [4 /*yield*/, api.AddLocalBridge(in_rpc_localbridge)]; + case 1: + out_rpc_localbridge = _a.sent(); + console.log(out_rpc_localbridge); + console.log("End: Test_AddLocalBridge"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteLocalBridge', Delete a local bridge */ +function Test_DeleteLocalBridge() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_localbridge, out_rpc_localbridge; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteLocalBridge"); + in_rpc_localbridge = new VPN.VpnRpcLocalBridge({ + DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str: hub_name + }); + return [4 /*yield*/, api.DeleteLocalBridge(in_rpc_localbridge)]; + case 1: + out_rpc_localbridge = _a.sent(); + console.log(out_rpc_localbridge); + console.log("End: Test_DeleteLocalBridge"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumLocalBridge', Enumerate local bridges */ +function Test_EnumLocalBridge() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_localbridge; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumLocalBridge"); + return [4 /*yield*/, api.EnumLocalBridge()]; + case 1: + out_rpc_enum_localbridge = _a.sent(); + console.log(out_rpc_enum_localbridge); + console.log("End: Test_EnumLocalBridge"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetBridgeSupport', Get availability to localbridge function */ +function Test_GetBridgeSupport() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_bridge_support; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetBridgeSupport"); + return [4 /*yield*/, api.GetBridgeSupport()]; + case 1: + out_rpc_bridge_support = _a.sent(); + console.log(out_rpc_bridge_support); + console.log("End: Test_GetBridgeSupport"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'RebootServer', Reboot server itself */ +function Test_RebootServer() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_test, out_rpc_test; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_RebootServer"); + in_rpc_test = new VPN.VpnRpcTest({}); + return [4 /*yield*/, api.RebootServer(in_rpc_test)]; + case 1: + out_rpc_test = _a.sent(); + console.log(out_rpc_test); + console.log("End: Test_RebootServer"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetCaps', Get capabilities */ +function Test_GetCaps() { + return __awaiter(this, void 0, void 0, function () { + var out_capslist; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetCaps"); + return [4 /*yield*/, api.GetCaps()]; + case 1: + out_capslist = _a.sent(); + console.log(out_capslist); + console.log("End: Test_GetCaps"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetConfig', Get configuration file stream */ +function Test_GetConfig() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetConfig"); + return [4 /*yield*/, api.GetConfig()]; + case 1: + out_rpc_config = _a.sent(); + console.log(out_rpc_config); + console.log("End: Test_GetConfig"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetConfig', Overwrite configuration file by specified data */ +function Test_SetConfig() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_config, out_rpc_config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetConfig"); + in_rpc_config = new VPN.VpnRpcConfig({ + FileData_bin: new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,]) + }); + return [4 /*yield*/, api.SetConfig(in_rpc_config)]; + case 1: + out_rpc_config = _a.sent(); + console.log("End: Test_SetConfig"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetDefaultHubAdminOptions', Get default hub administration options */ +function Test_GetDefaultHubAdminOptions() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_admin_option, out_rpc_admin_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetDefaultHubAdminOptions"); + in_rpc_admin_option = new VPN.VpnRpcAdminOption({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetDefaultHubAdminOptions(in_rpc_admin_option)]; + case 1: + out_rpc_admin_option = _a.sent(); + console.log(out_rpc_admin_option); + console.log("End: Test_GetDefaultHubAdminOptions"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHubAdminOptions', Get hub administration options */ +function Test_GetHubAdminOptions() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_admin_option, out_rpc_admin_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHubAdminOptions"); + in_rpc_admin_option = new VPN.VpnRpcAdminOption({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHubAdminOptions(in_rpc_admin_option)]; + case 1: + out_rpc_admin_option = _a.sent(); + console.log(out_rpc_admin_option); + console.log("End: Test_GetHubAdminOptions"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetHubAdminOptions', Set hub administration options */ +function Test_SetHubAdminOptions() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_admin_option, out_rpc_admin_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHubAdminOptions"); + in_rpc_admin_option = new VPN.VpnRpcAdminOption({ + HubName_str: hub_name, + AdminOptionList: [new VPN.VpnAdminOption({ + Name_str: "no_securenat_enablenat", + Value_u32: 1 + }),] + }); + return [4 /*yield*/, api.SetHubAdminOptions(in_rpc_admin_option)]; + case 1: + out_rpc_admin_option = _a.sent(); + console.log(out_rpc_admin_option); + console.log("End: Test_SetHubAdminOptions"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHubExtOptions', Get hub extended options */ +function Test_GetHubExtOptions() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_admin_option, out_rpc_admin_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHubExtOptions"); + in_rpc_admin_option = new VPN.VpnRpcAdminOption({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHubExtOptions(in_rpc_admin_option)]; + case 1: + out_rpc_admin_option = _a.sent(); + console.log(out_rpc_admin_option); + console.log("End: Test_GetHubExtOptions"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetHubExtOptions', Set hub extended options */ +function Test_SetHubExtOptions() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_admin_option, out_rpc_admin_option; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHubExtOptions"); + in_rpc_admin_option = new VPN.VpnRpcAdminOption({ + HubName_str: hub_name, + AdminOptionList: [new VPN.VpnAdminOption({ + Name_str: "SecureNAT_RandomizeAssignIp", + Value_u32: 1 + }),] + }); + return [4 /*yield*/, api.SetHubExtOptions(in_rpc_admin_option)]; + case 1: + out_rpc_admin_option = _a.sent(); + console.log(out_rpc_admin_option); + console.log("End: Test_SetHubExtOptions"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'AddL3Switch', Add a new virtual layer-3 switch */ +function Test_AddL3Switch() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3sw, out_rpc_l3sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddL3Switch"); + in_rpc_l3sw = new VPN.VpnRpcL3Sw({ + Name_str: "L3SW1" + }); + return [4 /*yield*/, api.AddL3Switch(in_rpc_l3sw)]; + case 1: + out_rpc_l3sw = _a.sent(); + console.log(out_rpc_l3sw); + console.log("End: Test_AddL3Switch"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DelL3Switch', Delete a virtual layer-3 switch */ +function Test_DelL3Switch() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3sw, out_rpc_l3sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DelL3Switch"); + in_rpc_l3sw = new VPN.VpnRpcL3Sw({ + Name_str: "L3SW1" + }); + return [4 /*yield*/, api.DelL3Switch(in_rpc_l3sw)]; + case 1: + out_rpc_l3sw = _a.sent(); + console.log(out_rpc_l3sw); + console.log("End: Test_DelL3Switch"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumL3Switch', Enumerate virtual layer-3 switches */ +function Test_EnumL3Switch() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_l3sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumL3Switch"); + return [4 /*yield*/, api.EnumL3Switch()]; + case 1: + out_rpc_enum_l3sw = _a.sent(); + console.log(out_rpc_enum_l3sw); + console.log("End: Test_EnumL3Switch"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'StartL3Switch', Start a virtual layer-3 switch */ +function Test_StartL3Switch() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3sw, out_rpc_l3sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_StartL3Switch"); + in_rpc_l3sw = new VPN.VpnRpcL3Sw({ + Name_str: "L3SW1" + }); + return [4 /*yield*/, api.StartL3Switch(in_rpc_l3sw)]; + case 1: + out_rpc_l3sw = _a.sent(); + console.log(out_rpc_l3sw); + console.log("End: Test_StartL3Switch"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'StopL3Switch', Stop a virtual layer-3 switch */ +function Test_StopL3Switch() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3sw, out_rpc_l3sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_StopL3Switch"); + in_rpc_l3sw = new VPN.VpnRpcL3Sw({ + Name_str: "L3SW1" + }); + return [4 /*yield*/, api.StopL3Switch(in_rpc_l3sw)]; + case 1: + out_rpc_l3sw = _a.sent(); + console.log(out_rpc_l3sw); + console.log("End: Test_StopL3Switch"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'AddL3If', Add new virtual interface on virtual L3 switch */ +function Test_AddL3If() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3if, out_rpc_l3if; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddL3If"); + in_rpc_l3if = new VPN.VpnRpcL3If({ + Name_str: "L3SW1", + HubName_str: hub_name, + IpAddress_ip: "192.168.0.1", + SubnetMask_ip: "255.255.255.0" + }); + return [4 /*yield*/, api.AddL3If(in_rpc_l3if)]; + case 1: + out_rpc_l3if = _a.sent(); + console.log(out_rpc_l3if); + console.log("End: Test_AddL3If"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DelL3If', Delete a virtual interface on virtual L3 switch */ +function Test_DelL3If() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3if, out_rpc_l3if; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DelL3If"); + in_rpc_l3if = new VPN.VpnRpcL3If({ + Name_str: "L3SW1", + HubName_str: hub_name + }); + return [4 /*yield*/, api.DelL3If(in_rpc_l3if)]; + case 1: + out_rpc_l3if = _a.sent(); + console.log(out_rpc_l3if); + console.log("End: Test_DelL3If"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumL3If', Enumerate virtual interfaces on virtual L3 switch */ +function Test_EnumL3If() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_l3if, out_rpc_enum_l3if; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumL3If"); + in_rpc_enum_l3if = new VPN.VpnRpcEnumL3If({ + Name_str: "L3SW1" + }); + return [4 /*yield*/, api.EnumL3If(in_rpc_enum_l3if)]; + case 1: + out_rpc_enum_l3if = _a.sent(); + console.log(out_rpc_enum_l3if); + console.log("End: Test_EnumL3If"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'AddL3Table', Add new routing table entry on virtual L3 switch */ +function Test_AddL3Table() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3table, out_rpc_l3table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddL3Table"); + in_rpc_l3table = new VPN.VpnRpcL3Table({ + Name_str: "L3SW1", + NetworkAddress_ip: "10.0.0.0", + SubnetMask_ip: "255.0.0.0", + GatewayAddress_ip: "192.168.7.1", + Metric_u32: 10 + }); + return [4 /*yield*/, api.AddL3Table(in_rpc_l3table)]; + case 1: + out_rpc_l3table = _a.sent(); + console.log(out_rpc_l3table); + console.log("End: Test_AddL3Table"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DelL3Table', Delete routing table entry on virtual L3 switch */ +function Test_DelL3Table() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_l3table, out_rpc_l3table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DelL3Table"); + in_rpc_l3table = new VPN.VpnRpcL3Table({ + Name_str: "L3SW1", + NetworkAddress_ip: "10.0.0.0", + SubnetMask_ip: "255.0.0.0", + GatewayAddress_ip: "192.168.7.1", + Metric_u32: 10 + }); + return [4 /*yield*/, api.DelL3Table(in_rpc_l3table)]; + case 1: + out_rpc_l3table = _a.sent(); + console.log(out_rpc_l3table); + console.log("End: Test_DelL3Table"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumL3Table', Get routing table on virtual L3 switch */ +function Test_EnumL3Table() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_l3table, out_rpc_enum_l3table; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumL3Table"); + in_rpc_enum_l3table = new VPN.VpnRpcEnumL3Table({ + Name_str: "L3SW1" + }); + return [4 /*yield*/, api.EnumL3Table(in_rpc_enum_l3table)]; + case 1: + out_rpc_enum_l3table = _a.sent(); + console.log(out_rpc_enum_l3table); + console.log("End: Test_EnumL3Table"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumCrl', Get CRL (Certificate Revocation List) index */ +function Test_EnumCrl() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_enum_crl, out_rpc_enum_crl; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumCrl"); + in_rpc_enum_crl = new VPN.VpnRpcEnumCrl({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.EnumCrl(in_rpc_enum_crl)]; + case 1: + out_rpc_enum_crl = _a.sent(); + console.log(out_rpc_enum_crl); + console.log("End: Test_EnumCrl"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_crl]; + } + }); + }); +} +/** API test for 'AddCrl', Add new CRL (Certificate Revocation List) entry */ +function Test_AddCrl() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_crl, out_rpc_crl; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddCrl"); + in_rpc_crl = new VPN.VpnRpcCrl({ + HubName_str: hub_name, + CommonName_utf: "CN", + Organization_utf: "Org", + Unit_utf: "ICSCOE", + Country_utf: "JP", + State_utf: "Ibaraki", + Local_utf: "Tsukuba", + Serial_bin: new Uint8Array([1, 2, 3, 4, 5,]), + DigestMD5_bin: new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,]), + DigestSHA1_bin: new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,]) + }); + return [4 /*yield*/, api.AddCrl(in_rpc_crl)]; + case 1: + out_rpc_crl = _a.sent(); + console.log(out_rpc_crl); + console.log("End: Test_AddCrl"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DelCrl', Delete CRL (Certificate Revocation List) entry */ +function Test_DelCrl(key) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_crl, out_rpc_crl; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DelCrl"); + in_rpc_crl = new VPN.VpnRpcCrl({ + HubName_str: hub_name, + Key_u32: key + }); + return [4 /*yield*/, api.DelCrl(in_rpc_crl)]; + case 1: + out_rpc_crl = _a.sent(); + console.log(out_rpc_crl); + console.log("End: Test_DelCrl"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetCrl', Get CRL (Certificate Revocation List) entry */ +function Test_GetCrl(key) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_crl, out_rpc_crl; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetCrl"); + in_rpc_crl = new VPN.VpnRpcCrl({ + HubName_str: hub_name, + Key_u32: key + }); + return [4 /*yield*/, api.GetCrl(in_rpc_crl)]; + case 1: + out_rpc_crl = _a.sent(); + console.log(out_rpc_crl); + console.log("End: Test_GetCrl"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_crl]; + } + }); + }); +} +/** API test for 'SetCrl', Set CRL (Certificate Revocation List) entry */ +function Test_SetCrl(crl) { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_crl; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetCrl"); + return [4 /*yield*/, api.SetCrl(crl)]; + case 1: + out_rpc_crl = _a.sent(); + console.log(out_rpc_crl); + console.log("End: Test_SetCrl"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetAcList', Set access control list */ +function Test_SetAcList() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_ac_list, out_rpc_ac_list; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetAcList"); + in_rpc_ac_list = new VPN.VpnRpcAcList({ + HubName_str: hub_name, + ACList: [new VPN.VpnAc({ + Deny_bool: true, + IpAddress_ip: "192.168.0.0", + SubnetMask_ip: "255.255.0.0", + Masked_bool: true, + Priority_u32: 123 + }), new VPN.VpnAc({ + Deny_bool: false, + IpAddress_ip: "fe80::", + SubnetMask_ip: "8", + Masked_bool: true, + Priority_u32: 123 + }),] + }); + return [4 /*yield*/, api.SetAcList(in_rpc_ac_list)]; + case 1: + out_rpc_ac_list = _a.sent(); + console.log(out_rpc_ac_list); + console.log("End: Test_SetAcList"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetAcList', Get access control list */ +function Test_GetAcList() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_ac_list, out_rpc_ac_list; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetAcList"); + in_rpc_ac_list = new VPN.VpnRpcAcList({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetAcList(in_rpc_ac_list)]; + case 1: + out_rpc_ac_list = _a.sent(); + console.log(out_rpc_ac_list); + console.log("End: Test_GetAcList"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumLogFile', Enumerate log files */ +function Test_EnumLogFile() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_log_file; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumLogFile"); + return [4 /*yield*/, api.EnumLogFile()]; + case 1: + out_rpc_enum_log_file = _a.sent(); + console.log(out_rpc_enum_log_file); + console.log("End: Test_EnumLogFile"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_log_file]; + } + }); + }); +} +/** API test for 'ReadLogFile', Read a log file */ +function Test_ReadLogFile(filename) { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_read_log_file, out_rpc_read_log_file; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_ReadLogFile"); + in_rpc_read_log_file = new VPN.VpnRpcReadLogFile({ + FilePath_str: filename + }); + return [4 /*yield*/, api.ReadLogFile(in_rpc_read_log_file)]; + case 1: + out_rpc_read_log_file = _a.sent(); + console.log(out_rpc_read_log_file); + console.log("End: Test_ReadLogFile"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetSysLog', Set syslog function setting */ +function Test_SetSysLog(flag) { + return __awaiter(this, void 0, void 0, function () { + var in_syslog_setting, out_syslog_setting; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetSysLog"); + in_syslog_setting = new VPN.VpnSyslogSetting({ + SaveType_u32: flag ? VPN.VpnSyslogSaveType.ServerAndHubAllLog : VPN.VpnSyslogSaveType.None, + Hostname_str: "1.2.3.4", + Port_u32: 123 + }); + return [4 /*yield*/, api.SetSysLog(in_syslog_setting)]; + case 1: + out_syslog_setting = _a.sent(); + console.log(out_syslog_setting); + console.log("End: Test_SetSysLog"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetSysLog', Get syslog function setting */ +function Test_GetSysLog() { + return __awaiter(this, void 0, void 0, function () { + var in_syslog_setting, out_syslog_setting; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetSysLog"); + in_syslog_setting = new VPN.VpnSyslogSetting({}); + return [4 /*yield*/, api.GetSysLog(in_syslog_setting)]; + case 1: + out_syslog_setting = _a.sent(); + console.log(out_syslog_setting); + console.log("End: Test_GetSysLog"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetHubMsg', Set message of today on hub */ +function Test_SetHubMsg() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_msg, out_rpc_msg; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetHubMsg"); + in_rpc_msg = new VPN.VpnRpcMsg({ + HubName_str: hub_name, + Msg_bin: new Uint8Array([0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x21, 0x20, 0xe4, 0xb8, 0x87, 0xe5, 0x9b, 0xbd, 0xe3, 0x81, 0xae, 0xe5, 0x8a, 0xb4, 0xe5, 0x83, 0x8d, 0xe8, 0x80, 0x85, 0xe3, 0x82, 0x88, 0xe3, 0x80, 0x81, 0xe5, 0x9b, 0xa3, 0xe7, 0xb5, 0x90, 0xe3, 0x81, 0x9b, 0xe3, 0x82, 0x88, 0x21, 0x20, 0xd7, 0x92, 0xd7, 0x91, 0xd7, 0xa8, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa2, 0xd7, 0x95, 0xd7, 0x91, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa9, 0xd7, 0x9c, 0x20, 0xd7, 0x9b, 0xd7, 0x9c, 0x20, 0xd7, 0x94, 0xd7, 0x9e, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0xa0, 0xd7, 0x95, 0xd7, 0xaa, 0x2c, 0x20, 0xd7, 0x94, 0xd7, 0xaa, 0xd7, 0x90, 0xd7, 0x97, 0xd7, 0x93, 0xd7, 0x95, 0x21,]) + }); + return [4 /*yield*/, api.SetHubMsg(in_rpc_msg)]; + case 1: + out_rpc_msg = _a.sent(); + console.log(out_rpc_msg); + console.log("End: Test_SetHubMsg"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetHubMsg', Get message of today on hub */ +function Test_GetHubMsg() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_msg, out_rpc_msg; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetHubMsg"); + in_rpc_msg = new VPN.VpnRpcMsg({ + HubName_str: hub_name + }); + return [4 /*yield*/, api.GetHubMsg(in_rpc_msg)]; + case 1: + out_rpc_msg = _a.sent(); + console.log(out_rpc_msg); + console.log("End: Test_GetHubMsg"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'Crash', Do Crash */ +function Test_Crash() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_test, out_rpc_test; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_Crash"); + in_rpc_test = new VPN.VpnRpcTest({}); + return [4 /*yield*/, api.Crash(in_rpc_test)]; + case 1: + out_rpc_test = _a.sent(); + console.log(out_rpc_test); + console.log("End: Test_Crash"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetAdminMsg', Get message for administrators */ +function Test_GetAdminMsg() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_msg; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetAdminMsg"); + return [4 /*yield*/, api.GetAdminMsg()]; + case 1: + out_rpc_msg = _a.sent(); + console.log(out_rpc_msg); + console.log("End: Test_GetAdminMsg"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'Flush', Flush configuration file */ +function Test_Flush() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_test, out_rpc_test; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_Flush"); + in_rpc_test = new VPN.VpnRpcTest({}); + return [4 /*yield*/, api.Flush(in_rpc_test)]; + case 1: + out_rpc_test = _a.sent(); + console.log(out_rpc_test); + console.log("End: Test_Flush"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetIPsecServices', Set IPsec service configuration */ +function Test_SetIPsecServices() { + return __awaiter(this, void 0, void 0, function () { + var in_ipsec_services, out_ipsec_services; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetIPsecServices"); + in_ipsec_services = new VPN.VpnIPsecServices({ + L2TP_Raw_bool: false, + L2TP_IPsec_bool: false, + EtherIP_IPsec_bool: false, + IPsec_Secret_str: "vpn", + L2TP_DefaultHub_str: "HUB_ABC" + }); + return [4 /*yield*/, api.SetIPsecServices(in_ipsec_services)]; + case 1: + out_ipsec_services = _a.sent(); + console.log(out_ipsec_services); + console.log("End: Test_SetIPsecServices"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetIPsecServices', Get IPsec service configuration */ +function Test_GetIPsecServices() { + return __awaiter(this, void 0, void 0, function () { + var out_ipsec_services; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetIPsecServices"); + return [4 /*yield*/, api.GetIPsecServices()]; + case 1: + out_ipsec_services = _a.sent(); + console.log(out_ipsec_services); + console.log("End: Test_GetIPsecServices"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'AddEtherIpId', Add EtherIP ID setting */ +function Test_AddEtherIpId() { + return __awaiter(this, void 0, void 0, function () { + var in_etherip_id, out_etherip_id; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_AddEtherIpId"); + in_etherip_id = new VPN.VpnEtherIpId({ + Id_str: "testid", + HubName_str: hub_name, + UserName_str: "nekosan", + Password_str: "torisan" + }); + return [4 /*yield*/, api.AddEtherIpId(in_etherip_id)]; + case 1: + out_etherip_id = _a.sent(); + console.log(out_etherip_id); + console.log("End: Test_AddEtherIpId"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetEtherIpId', Get EtherIP ID setting */ +function Test_GetEtherIpId(id) { + return __awaiter(this, void 0, void 0, function () { + var in_etherip_id, out_etherip_id; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetEtherIpId"); + in_etherip_id = new VPN.VpnEtherIpId({ + Id_str: id + }); + return [4 /*yield*/, api.GetEtherIpId(in_etherip_id)]; + case 1: + out_etherip_id = _a.sent(); + console.log(out_etherip_id); + console.log("End: Test_GetEtherIpId"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'DeleteEtherIpId', Delete EtherIP ID setting */ +function Test_DeleteEtherIpId(id) { + return __awaiter(this, void 0, void 0, function () { + var in_etherip_id, out_etherip_id; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_DeleteEtherIpId"); + in_etherip_id = new VPN.VpnEtherIpId({ + Id_str: id + }); + return [4 /*yield*/, api.DeleteEtherIpId(in_etherip_id)]; + case 1: + out_etherip_id = _a.sent(); + console.log(out_etherip_id); + console.log("End: Test_DeleteEtherIpId"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'EnumEtherIpId', Enumerate EtherIP ID settings */ +function Test_EnumEtherIpId() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_enum_etherip_id; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_EnumEtherIpId"); + return [4 /*yield*/, api.EnumEtherIpId()]; + case 1: + out_rpc_enum_etherip_id = _a.sent(); + console.log(out_rpc_enum_etherip_id); + console.log("End: Test_EnumEtherIpId"); + console.log("-----"); + console.log(); + return [2 /*return*/, out_rpc_enum_etherip_id]; + } + }); + }); +} +/** API test for 'SetOpenVpnSstpConfig', Set configurations for OpenVPN and SSTP */ +function Test_SetOpenVpnSstpConfig() { + return __awaiter(this, void 0, void 0, function () { + var in_openvpn_sstp_config, out_openvpn_sstp_config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetOpenVpnSstpConfig"); + in_openvpn_sstp_config = new VPN.VpnOpenVpnSstpConfig({ + EnableOpenVPN_bool: true, + OpenVPNPortList_str: "1 2 3 4 5", + EnableSSTP_bool: true + }); + return [4 /*yield*/, api.SetOpenVpnSstpConfig(in_openvpn_sstp_config)]; + case 1: + out_openvpn_sstp_config = _a.sent(); + console.log(out_openvpn_sstp_config); + console.log("End: Test_SetOpenVpnSstpConfig"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetOpenVpnSstpConfig', Get configurations for OpenVPN and SSTP */ +function Test_GetOpenVpnSstpConfig() { + return __awaiter(this, void 0, void 0, function () { + var out_openvpn_sstp_config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetOpenVpnSstpConfig"); + return [4 /*yield*/, api.GetOpenVpnSstpConfig()]; + case 1: + out_openvpn_sstp_config = _a.sent(); + console.log(out_openvpn_sstp_config); + console.log("End: Test_GetOpenVpnSstpConfig"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetDDnsClientStatus', Get status of DDNS client */ +function Test_GetDDnsClientStatus() { + return __awaiter(this, void 0, void 0, function () { + var out_ddns_client_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetDDnsClientStatus"); + return [4 /*yield*/, api.GetDDnsClientStatus()]; + case 1: + out_ddns_client_status = _a.sent(); + console.log(out_ddns_client_status); + console.log("End: Test_GetDDnsClientStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'ChangeDDnsClientHostname', Change host-name for DDNS client */ +function Test_ChangeDDnsClientHostname() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_test, out_rpc_test; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_ChangeDDnsClientHostname"); + in_rpc_test = new VPN.VpnRpcTest({ + StrValue_str: "nekotest" + Math.floor((Math.random() * (2100000000 - 1000000000)) + 1000000000) + }); + return [4 /*yield*/, api.ChangeDDnsClientHostname(in_rpc_test)]; + case 1: + out_rpc_test = _a.sent(); + console.log(out_rpc_test); + console.log("End: Test_ChangeDDnsClientHostname"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'RegenerateServerCert', Regenerate server certification */ +function Test_RegenerateServerCert() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_test, out_rpc_test; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_RegenerateServerCert"); + in_rpc_test = new VPN.VpnRpcTest({ + StrValue_str: "abc.example.org" + }); + return [4 /*yield*/, api.RegenerateServerCert(in_rpc_test)]; + case 1: + out_rpc_test = _a.sent(); + console.log(out_rpc_test); + console.log("End: Test_RegenerateServerCert"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'MakeOpenVpnConfigFile', Generate OpenVPN configuration files */ +function Test_MakeOpenVpnConfigFile() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_read_log_file; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_MakeOpenVpnConfigFile"); + return [4 /*yield*/, api.MakeOpenVpnConfigFile()]; + case 1: + out_rpc_read_log_file = _a.sent(); + console.log(out_rpc_read_log_file); + console.log("End: Test_MakeOpenVpnConfigFile"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetSpecialListener', Set special listener status */ +function Test_SetSpecialListener() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_special_listener, out_rpc_special_listener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetSpecialListener"); + in_rpc_special_listener = new VPN.VpnRpcSpecialListener({ + VpnOverDnsListener_bool: true, + VpnOverIcmpListener_bool: true + }); + return [4 /*yield*/, api.SetSpecialListener(in_rpc_special_listener)]; + case 1: + out_rpc_special_listener = _a.sent(); + console.log(out_rpc_special_listener); + console.log("End: Test_SetSpecialListener"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetSpecialListener', Get special listener status */ +function Test_GetSpecialListener() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_special_listener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetSpecialListener"); + return [4 /*yield*/, api.GetSpecialListener()]; + case 1: + out_rpc_special_listener = _a.sent(); + console.log(out_rpc_special_listener); + console.log("End: Test_GetSpecialListener"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetAzureStatus', Get Azure status */ +function Test_GetAzureStatus() { + return __awaiter(this, void 0, void 0, function () { + var out_rpc_azure_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetAzureStatus"); + return [4 /*yield*/, api.GetAzureStatus()]; + case 1: + out_rpc_azure_status = _a.sent(); + console.log(out_rpc_azure_status); + console.log("End: Test_GetAzureStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetAzureStatus', Set Azure status */ +function Test_SetAzureStatus() { + return __awaiter(this, void 0, void 0, function () { + var in_rpc_azure_status, out_rpc_azure_status; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetAzureStatus"); + in_rpc_azure_status = new VPN.VpnRpcAzureStatus({ + IsEnabled_bool: true + }); + return [4 /*yield*/, api.SetAzureStatus(in_rpc_azure_status)]; + case 1: + out_rpc_azure_status = _a.sent(); + console.log(out_rpc_azure_status); + console.log("End: Test_SetAzureStatus"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetDDnsInternetSettng', Get DDNS proxy configuration */ +function Test_GetDDnsInternetSettng() { + return __awaiter(this, void 0, void 0, function () { + var out_internet_setting; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetDDnsInternetSettng"); + return [4 /*yield*/, api.GetDDnsInternetSettng()]; + case 1: + out_internet_setting = _a.sent(); + console.log(out_internet_setting); + console.log("End: Test_GetDDnsInternetSettng"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetDDnsInternetSettng', Set DDNS proxy configuration */ +function Test_SetDDnsInternetSettng() { + return __awaiter(this, void 0, void 0, function () { + var in_internet_setting, out_internet_setting; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetDDnsInternetSettng"); + in_internet_setting = new VPN.VpnInternetSetting({ + ProxyType_u32: VPN.VpnRpcProxyType.Direct, + ProxyHostName_str: "1.2.3.4", + ProxyPort_u32: 1234, + ProxyUsername_str: "neko", + ProxyPassword_str: "dog" + }); + return [4 /*yield*/, api.SetDDnsInternetSettng(in_internet_setting)]; + case 1: + out_internet_setting = _a.sent(); + console.log(out_internet_setting); + console.log("End: Test_SetDDnsInternetSettng"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'SetVgsConfig', Setting VPN Gate Server Configuration */ +function Test_SetVgsConfig() { + return __awaiter(this, void 0, void 0, function () { + var in_vgs_config, out_vgs_config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_SetVgsConfig"); + in_vgs_config = new VPN.VpnVgsConfig({ + IsEnabled_bool: false, + Message_utf: "Neko san!!!", + Owner_utf: "Go go go!!!", + Abuse_utf: "da.test@softether.co.jp", + NoLog_bool: false, + LogPermanent_bool: true, + EnableL2TP_bool: true + }); + return [4 /*yield*/, api.SetVgsConfig(in_vgs_config)]; + case 1: + out_vgs_config = _a.sent(); + console.log(out_vgs_config); + console.log("End: Test_SetVgsConfig"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +/** API test for 'GetVgsConfig', Get VPN Gate configuration */ +function Test_GetVgsConfig() { + return __awaiter(this, void 0, void 0, function () { + var out_vgs_config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("Begin: Test_GetVgsConfig"); + return [4 /*yield*/, api.GetVgsConfig()]; + case 1: + out_vgs_config = _a.sent(); + console.log(out_vgs_config); + console.log("End: Test_GetVgsConfig"); + console.log("-----"); + console.log(); + return [2 /*return*/]; + } + }); + }); +} +//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js.map b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js.map new file mode 100644 index 00000000..50310cab --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample.js","sourceRoot":"","sources":["../src/sample.ts"],"names":[],"mappings":";AAAA,0DAA0D;AAC1D,wCAAwC;AACxC,GAAG;AACH,YAAY;AACZ,8EAA8E;AAC9E,GAAG;AACH,kEAAkE;AAClE,gGAAgG;AAChG,EAAE;AACF,wCAAwC;AACxC,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,mFAAmF;AACnF,gCAAgC;AAChC,+BAA+B;AAC/B,yBAAyB;AAGzB,iCAAiC;AACjC,4CAAgC;AAEhC,gEAAgE;AAChE,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AAEpC,IAAI,GAAqB,CAAC;AAC1B,iDAAiD;AACjD,IAAI,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,KAAK,EAAE,uEAAuE;CAClH;IACI,sHAAsH;IACtH,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,EAAE,CAAC;CAChC;KAED;IACI,4FAA4F;IAC5F,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;CAC5E;AAED,sBAAsB;AACtB,IAAI,QAAQ,GAAG,MAAM,CAAC;AAEtB,4DAA4D;AAC5D,QAAQ,EAAE,CAAC;AAKX,yBAAyB;AACzB,SAAe,QAAQ;;;;;;oBAEnB,QAAQ,GAAG,MAAM,CAAC;oBAClB,qBAAM,SAAS,EAAE,EAAA;;oBAAjB,SAAiB,CAAC;oBAClB,qBAAM,kBAAkB,EAAE,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,oBAAoB,EAAE,EAAA;;oBAA5B,SAA4B,CAAC;oBACG,qBAAM,mBAAmB,EAAE,EAAA;;oBAAvD,iBAAiB,GAAW,SAA2B;oBAC3D,qBAAM,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAA;;oBAAnD,SAAmD,CAAC;oBACpD,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,mBAAmB,CAAC,iBAAiB,EAAE,IAAI,CAAC,EAAA;;oBAAlD,SAAkD,CAAC;oBACnD,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,mBAAmB,CAAC,iBAAiB,CAAC,EAAA;;oBAA5C,SAA4C,CAAC;oBAC7C,qBAAM,sBAAsB,EAAE,EAAA;;oBAA9B,SAA8B,CAAC;oBAC/B,qBAAM,mBAAmB,EAAE,EAAA;;oBAA3B,SAA2B,CAAC;yBACxB,KAAK,EAAL,yBAAK;oBAEL,qBAAM,mBAAmB,EAAE,EAAA;;oBAA3B,SAA2B,CAAC;oBACW,qBAAM,mBAAmB,EAAE,EAAA;;oBAA9D,YAAY,GAAuB,SAA2B;0BACf,EAA3B,KAAA,YAAY,CAAC,cAAc;;;yBAA3B,CAAA,cAA2B,CAAA;oBAA1C,WAAW;oBAEhB,qBAAM,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,EAAA;;oBAA1C,SAA0C,CAAC;;;oBAFvB,IAA2B,CAAA;;yBAInD,qBAAM,4BAA4B,EAAE,EAAA;;oBAApC,SAAoC,CAAC;;;oBAEpC,IAAI,KAAK,EACd;wBACI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;qBACtB;yBAED;wBACI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;qBACtB;;yBACD,qBAAM,kBAAkB,EAAE,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,kBAAkB,EAAE,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,oBAAoB,EAAE,EAAA;;oBAA5B,SAA4B,CAAC;oBAC7B,qBAAM,oBAAoB,EAAE,EAAA;;oBAA5B,SAA4B,CAAC;oBACmB,qBAAM,mBAAmB,EAAE,EAAA;;oBAAvE,eAAe,GAA6B,SAA2B;0BACvB,EAA9B,KAAA,eAAe,CAAC,cAAc;;;yBAA9B,CAAA,cAA8B,CAAA;oBAA3C,SAAS;oBAEd,qBAAM,sBAAsB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAA;;oBAAhD,SAAgD,CAAC;;;oBAF/B,IAA8B,CAAA;;yBAIzC,qBAAM,cAAc,EAAE,EAAA;;oBAAjC,QAAQ,GAAG,SAAsB,CAAC;oBAClC,qBAAM,WAAW,EAAE,EAAA;;oBAAnB,SAAmB,CAAC;oBACpB,qBAAM,WAAW,EAAE,EAAA;;oBAAnB,SAAmB,CAAC;oBACpB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBACe,qBAAM,cAAc,EAAE,EAAA;;oBAA3D,gBAAgB,GAAqB,SAAsB;oBAC/D,qBAAM,cAAc,CAAC,gBAAgB,CAAC,EAAA;;oBAAtC,SAAsC,CAAC;oBACvC,qBAAM,UAAU,EAAE,EAAA;;oBAAlB,SAAkB,CAAC;oBACgB,qBAAM,WAAW,EAAE,EAAA;;oBAAlD,OAAO,GAAwB,SAAmB;0BACzB,EAAd,KAAA,OAAO,CAAC,MAAM;;;yBAAd,CAAA,cAAc,CAAA;oBAApB,EAAE;oBAEP,qBAAM,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAA;;oBAA5B,SAA4B,CAAC;oBAC7B,qBAAM,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,EAAA;;oBAA/B,SAA+B,CAAC;;;oBAHrB,IAAc,CAAA;;yBAK7B,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,mBAAmB,EAAE,EAAA;;oBAA3B,SAA2B,CAAC;oBAC5B,qBAAM,kBAAkB,EAAE,EAAA;;oBAA1B,SAA0B,CAAC;oBACS,qBAAM,aAAa,EAAE,EAAA;;oBAArD,SAAS,GAAuB,SAAqB;0BACtB,EAAlB,KAAA,SAAS,CAAC,QAAQ;;;yBAAlB,CAAA,cAAkB,CAAA;oBAA1B,IAAI;oBAET,qBAAM,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAA;;oBAA9C,SAA8C,CAAC;;;oBAFlC,IAAkB,CAAA;;yBAInC,qBAAM,IAAI,OAAO,CAAC,UAAC,CAAC,IAAK,OAAA,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,EAAnB,CAAmB,CAAC,EAAA;;oBAA7C,SAA6C,CAAC;oBAC9C,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,kBAAkB,EAAE,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxB,SAAwB,CAAC;oBACzB,qBAAM,aAAa,EAAE,EAAA;;oBAArB,SAAqB,CAAC;oBACtB,qBAAM,aAAa,EAAE,EAAA;;oBAArB,SAAqB,CAAC;oBACtB,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,aAAa,EAAE,EAAA;;oBAArB,SAAqB,CAAC;oBACtB,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxB,SAAwB,CAAC;oBACiB,qBAAM,gBAAgB,EAAE,EAAA;;oBAA9D,YAAY,GAA0B,SAAwB;0BACtB,EAAxB,KAAA,YAAY,CAAC,WAAW;;;yBAAxB,CAAA,cAAwB,CAAA;oBAAnC,OAAO;oBAEZ,qBAAM,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAA;;oBAA7C,SAA6C,CAAC;oBAC9C,qBAAM,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAA;;oBAA1C,SAA0C,CAAC;;;oBAH3B,IAAwB,CAAA;;yBAKL,qBAAM,iBAAiB,EAAE,EAAA;;oBAA5D,QAAQ,GAA2B,SAAyB;0BAC/B,EAAjB,KAAA,QAAQ,CAAC,QAAQ;;;yBAAjB,CAAA,cAAiB,CAAA;oBAAxB,GAAG;oBAER,qBAAM,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAA;;oBAAtC,SAAsC,CAAC;;;oBAF3B,IAAiB,CAAA;;yBAII,qBAAM,gBAAgB,EAAE,EAAA;;oBAAzD,OAAO,GAA0B,SAAwB;0BAC/B,EAAf,KAAA,OAAO,CAAC,OAAO;;;yBAAf,CAAA,cAAe,CAAA;oBAArB,EAAE;oBAEP,qBAAM,kBAAkB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAA;;oBAApC,SAAoC,CAAC;;;oBAF1B,IAAe,CAAA;;yBAI9B,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,oBAAoB,EAAE,EAAA;;oBAA5B,SAA4B,CAAC;oBAC7B,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,aAAa,EAAE,EAAA;;oBAArB,SAAqB,CAAC;oBACtB,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,qBAAqB,EAAE,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,oBAAoB,EAAE,EAAA;;oBAA5B,SAA4B,CAAC;oBAC7B,qBAAM,qBAAqB,EAAE,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,8BAA8B,EAAE,EAAA;;oBAAtC,SAAsC,CAAC;oBACvC,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,qBAAqB,EAAE,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,qBAAqB,EAAE,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxB,SAAwB,CAAC;oBACzB,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,aAAa,EAAE,EAAA;;oBAArB,SAAqB,CAAC;oBACtB,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxB,SAAwB,CAAC;oBACzB,qBAAM,eAAe,EAAE,EAAA;;oBAAvB,SAAuB,CAAC;oBACxB,qBAAM,kBAAkB,EAAE,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxB,SAAwB,CAAC;oBACzB,qBAAM,WAAW,EAAE,EAAA;;oBAAnB,SAAmB,CAAC;oBACc,qBAAM,YAAY,EAAE,EAAA;;oBAAlD,QAAQ,GAAsB,SAAoB;0BACtB,EAAhB,KAAA,QAAQ,CAAC,OAAO;;;yBAAhB,CAAA,cAAgB,CAAA;oBAAvB,GAAG;oBAEqB,qBAAM,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAA;;oBAAvD,OAAO,GAAkB,SAA8B;oBAC3D,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;oBACvD,qBAAM,WAAW,CAAC,OAAO,CAAC,EAAA;;oBAA1B,SAA0B,CAAC;;;oBAJf,IAAgB,CAAA;;0BAMrB,qBAAM,YAAY,EAAE,EAAA;;oBAA/B,QAAQ,GAAG,SAAoB,CAAC;0BACA,EAAhB,KAAA,QAAQ,CAAC,OAAO;;;yBAAhB,CAAA,cAAgB,CAAA;oBAAvB,GAAG;oBAER,qBAAM,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAA;;oBAA9B,SAA8B,CAAC;;;oBAFnB,IAAgB,CAAA;;0BAIhC,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACoB,qBAAM,gBAAgB,EAAE,EAAA;;oBAA/D,aAAa,GAA0B,SAAwB;0BAC7B,EAAtB,KAAA,aAAa,CAAC,QAAQ;;;yBAAtB,CAAA,cAAsB,CAAA;oBAA7B,GAAG;oBAER,qBAAM,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAA;;oBAAxC,SAAwC,CAAC;oBACzC,0BAAM;;oBAHM,IAAsB,CAAA;;0BAKtC,qBAAM,cAAc,CAAC,IAAI,CAAC,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,cAAc,CAAC,KAAK,CAAC,EAAA;;oBAA3B,SAA2B,CAAC;oBAC5B,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxB,SAAwB,CAAC;oBACzB,qBAAM,UAAU,EAAE,EAAA;;oBAAlB,SAAkB,CAAC;oBACnB,qBAAM,qBAAqB,EAAE,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,qBAAqB,EAAE,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBACqB,qBAAM,kBAAkB,EAAE,EAAA;;oBAArE,eAAe,GAA4B,SAA0B;0BAC1B,EAAxB,KAAA,eAAe,CAAC,QAAQ;;;yBAAxB,CAAA,cAAwB,CAAA;oBAAtC,UAAU;oBAEf,qBAAM,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,EAAA;;oBAA1C,SAA0C,CAAC;oBAC3C,qBAAM,oBAAoB,CAAC,UAAU,CAAC,MAAM,CAAC,EAAA;;oBAA7C,SAA6C,CAAC;;;oBAH3B,IAAwB,CAAA;;0BAK/C,qBAAM,yBAAyB,EAAE,EAAA;;oBAAjC,SAAiC,CAAC;oBAClC,qBAAM,yBAAyB,EAAE,EAAA;;oBAAjC,SAAiC,CAAC;oBAClC,qBAAM,wBAAwB,EAAE,EAAA;;oBAAhC,SAAgC,CAAC;oBACjC,qBAAM,0BAA0B,EAAE,EAAA;;oBAAlC,SAAkC,CAAC;oBACnC,qBAAM,0BAA0B,EAAE,EAAA;;oBAAlC,SAAkC,CAAC;oBACnC,qBAAM,6BAA6B,EAAE,EAAA;;oBAArC,SAAqC,CAAC;oBACtC,qBAAM,yBAAyB,EAAE,EAAA;;oBAAjC,SAAiC,CAAC;oBAClC,qBAAM,0BAA0B,EAAE,EAAA;;oBAAlC,SAAkC,CAAC;oBACnC,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,uBAAuB,EAAE,EAAA;;oBAA/B,SAA+B,CAAC;oBAChC,qBAAM,mBAAmB,EAAE,EAAA;;oBAA3B,SAA2B,CAAC;oBAC5B,qBAAM,mBAAmB,EAAE,EAAA;;oBAA3B,SAA2B,CAAC;oBAC5B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,iBAAiB,EAAE,EAAA;;oBAAzB,SAAyB,CAAC;oBAC1B,qBAAM,cAAc,EAAE,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,sBAAO;;;;CACV;AAED,6CAA6C;AAC7C,SAAe,SAAS;;;;;;oBAEpB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAC5B,CAAC,GAAmB,IAAI,GAAG,CAAC,UAAU,CAC1C;wBACI,YAAY,EAAE,KAAK;qBACtB,CAAC,CAAC;oBACqB,qBAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAA;;oBAArC,CAAC,GAAmB,SAAiB;oBACzC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBACf,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,2DAA2D;AAC3D,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACR,qBAAM,GAAG,CAAC,aAAa,EAAE,EAAA;;oBAAtD,IAAI,GAAyB,SAAyB;oBAC1D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,wDAAwD;AACxD,SAAe,oBAAoB;;;;;;oBAE/B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBACS,qBAAM,GAAG,CAAC,eAAe,EAAE,EAAA;;oBAA3E,qBAAqB,GAA2B,SAA2B;oBAC/E,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uDAAuD;AACvD,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACtC,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;oBACvE,OAAO,CAAC,GAAG,CAAC,qCAAqC,GAAG,IAAI,CAAC,CAAC;oBACtD,eAAe,GAAuB,IAAI,GAAG,CAAC,cAAc,CAChE;wBACI,WAAW,EAAE,IAAI;wBACjB,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;oBACwC,qBAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,EAAA;;oBAAhF,gBAAgB,GAAuB,SAAyC;oBACpF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,IAAI,EAAC;;;;CACf;AAED,yDAAyD;AACzD,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACY,qBAAM,GAAG,CAAC,YAAY,EAAE,EAAA;;oBAAxE,qBAAqB,GAA2B,SAAwB;oBAC5E,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uDAAuD;AACvD,SAAe,mBAAmB,CAAC,IAAY;;;;;;oBAE3C,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,oCAAoC,GAAG,IAAI,CAAC,CAAC;oBACrD,eAAe,GAAuB,IAAI,GAAG,CAAC,cAAc,CAChE;wBACI,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;oBACwC,qBAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,EAAA;;oBAAhF,gBAAgB,GAAuB,SAAyC;oBACpF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+DAA+D;AAC/D,SAAe,mBAAmB,CAAC,IAAY,EAAE,OAAgB;;;;;;oBAE7D,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,IAAI,OAAO,EACX;wBACI,OAAO,CAAC,GAAG,CAAC,2BAA2B,GAAG,IAAI,CAAC,CAAC;qBACnD;yBAED;wBACI,OAAO,CAAC,GAAG,CAAC,4BAA4B,GAAG,IAAI,CAAC,CAAC;qBACpD;oBACG,eAAe,GAAuB,IAAI,GAAG,CAAC,cAAc,CAChE;wBACI,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,OAAO;qBACvB,CAAC,CAAC;oBACwC,qBAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,EAAA;;oBAAhF,gBAAgB,GAAuB,SAAyC;oBACpF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,sBAAsB;;;;;;oBAE7B,QAAQ,GAAW,WAAW,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;oBAC7C,OAAO,CAAC,GAAG,CAAC,4CAA4C,GAAG,QAAQ,GAAG,IAAI,CAAC,CAAC;oBACxE,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,qBAAqB,EAAE,QAAQ;qBAClC,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAA;;oBAA9F,oBAAoB,GAA0B,SAAgD;oBAClG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBAC3C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kEAAkE;AAClE,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACtC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC,cAAc;wBACnD,WAAW,EAAE,CAAC;wBACd,SAAS,EAAG,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAI;wBAC/B,WAAW,EAAE,SAAS;wBACtB,kBAAkB,EAAE,YAAY;wBAChC,2BAA2B,EAAE,WAAW;wBACxC,kBAAkB,EAAE,GAAG;wBACvB,UAAU,EAAE,GAAG;wBACf,mBAAmB,EAAE,KAAK;qBAC7B,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAA;;oBAApE,YAAY,GAAmB,SAAqC;oBACxE,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kEAAkE;AAClE,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACP,qBAAM,GAAG,CAAC,cAAc,EAAE,EAAA;;oBAAzD,YAAY,GAAmB,SAA0B;oBAC7D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,gBAAgB,CAAC,EAAU;;;;;;oBAEtC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc,CACjE;wBACI,MAAM,EAAE,EAAE;qBACb,CAAC,CAAC;oBACyC,qBAAM,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAA;;oBAA/E,iBAAiB,GAAuB,SAAuC;oBACnF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+DAA+D;AAC/D,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACE,qBAAM,GAAG,CAAC,cAAc,EAAE,EAAA;;oBAAlE,iBAAiB,GAAuB,SAA0B;oBACtE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,iBAAiB,EAAC;;;;CAC5B;AAED,6FAA6F;AAC7F,SAAe,4BAA4B;;;;;;oBAEvC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;oBACkB,qBAAM,GAAG,CAAC,uBAAuB,EAAE,EAAA;;oBAApG,8BAA8B,GAAmC,SAAmC;oBACxG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;oBACjD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,eAAe,GAAsB,IAAI,GAAG,CAAC,aAAa,CAC9D;wBACI,QAAQ,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAI,CAAC;wBAC33P,OAAO,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAI,CAAC;qBACjhU,CAAC,CAAC;oBACuC,qBAAM,GAAG,CAAC,aAAa,CAAC,eAAe,CAAC,EAAA;;oBAA9E,gBAAgB,GAAsB,SAAwC;oBAClF,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACC,qBAAM,GAAG,CAAC,aAAa,EAAE,EAAA;;oBAA/D,gBAAgB,GAAsB,SAAyB;oBACnE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yDAAyD;AACzD,SAAe,oBAAoB;;;;;;oBAE/B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBACV,qBAAM,GAAG,CAAC,eAAe,EAAE,EAAA;;oBAAxD,WAAW,GAAkB,SAA2B;oBAC5D,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uEAAuE;AACvE,SAAe,oBAAoB;;;;;;oBAE/B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBACvC,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,UAAU,EAAE,SAAS;qBACxB,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,EAAA;;oBAAlE,WAAW,GAAkB,SAAqC;oBACtE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,6CAA6C;AAC7C,SAAe,cAAc;;;;;;oBAErB,QAAQ,GAAW,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;oBAC1F,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;wBACrB,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC,UAAU;wBACzC,WAAW,EAAE,IAAI;wBACjB,0BAA0B,EAAE,WAAW;wBACvC,cAAc,EAAE,GAAG;wBACnB,WAAW,EAAE,KAAK;qBACrB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA;;oBAAhF,kBAAkB,GAAwB,SAAsC;oBACpF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,QAAQ,EAAC;;;;CACnB;AAED,mDAAmD;AACnD,SAAe,WAAW;;;;;;oBAEtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAC9B,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;wBACrB,0BAA0B,EAAE,KAAK;wBACjC,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC,UAAU;wBACzC,WAAW,EAAE,KAAK;wBAClB,cAAc,EAAE,GAAG;wBACnB,WAAW,EAAE,IAAI;qBACpB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAA;;oBAA7E,kBAAkB,GAAwB,SAAmC;oBACjF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,mDAAmD;AACnD,SAAe,WAAW;;;;;;oBAEtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAC9B,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAA;;oBAA7E,kBAAkB,GAAwB,SAAmC;oBACjF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,6CAA6C;AAC7C,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACO,qBAAM,GAAG,CAAC,OAAO,EAAE,EAAA;;oBAAzD,gBAAgB,GAAsB,SAAmB;oBAC7D,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,6CAA6C;AAC7C,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA;;oBAAhF,kBAAkB,GAAwB,SAAsC;oBACpF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,EAAA;;oBAAxE,cAAc,GAAqB,SAAqC;oBAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,WAAW,EAAE,QAAQ;wBACrB,oBAAoB,EAAE,SAAS;wBAC/B,cAAc,EAAE,IAAI;wBACpB,gBAAgB,EAAE,WAAW;wBAC7B,uBAAuB,EAAE,IAAI;qBAChC,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,EAAA;;oBAAxE,cAAc,GAAqB,SAAqC;oBAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,2DAA2D;AAC3D,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACc,qBAAM,GAAG,CAAC,cAAc,EAAE,EAAA;;oBAA9E,uBAAuB,GAA6B,SAA0B;oBAClF,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,uBAAuB,EAAC;;;;CAClC;AAED,mEAAmE;AACnE,SAAe,yBAAyB,CAAC,aAAqB;;;;;;oBAE1D,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;oBAC5C,4BAA4B,GAAmC,IAAI,GAAG,CAAC,0BAA0B,CACrG;wBACI,QAAQ,EAAE,aAAa;qBAC1B,CAAC,CAAC;oBACiE,qBAAM,GAAG,CAAC,oBAAoB,CAAC,4BAA4B,CAAC,EAAA;;oBAA5H,6BAA6B,GAAmC,SAA4D;oBAChI,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBAC3C,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,mEAAmE;AACnE,SAAe,sBAAsB,CAAC,IAAY;;;;;;oBAE9C,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;oBACzC,sBAAsB,GAA6B,IAAI,GAAG,CAAC,oBAAoB,CACnF;wBACI,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;oBACqD,qBAAM,GAAG,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,EAAA;;oBAAvG,uBAAuB,GAA6B,SAAmD;oBAC3G,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBAC3C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kEAAkE;AAClE,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,qBAAqB,GAA2B,IAAI,GAAG,CAAC,kBAAkB,CAC9E;wBACI,WAAW,EAAE,QAAQ;wBACrB,WAAW,EAAE,IAAI;qBACpB,CAAC,CAAC;oBACkD,qBAAM,GAAG,CAAC,YAAY,CAAC,qBAAqB,CAAC,EAAA;;oBAA9F,sBAAsB,GAA2B,SAA6C;oBAClG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kDAAkD;AAClD,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAA;;oBAAnF,kBAAkB,GAAwB,SAAyC;oBACvF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uEAAuE;AACvE,SAAe,cAAc,CAAC,cAAgC;;;;;;oBAE1D,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACG,qBAAM,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,EAAA;;oBAAvE,eAAe,GAAqB,SAAmC;oBAC3E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;oBAC7B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qEAAqE;AACrE,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,cAAc,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC3D;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACqC,qBAAM,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,EAAA;;oBAAvE,eAAe,GAAqB,SAAmC;oBAC3E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;oBAC7B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,eAAe,EAAC;;;;CAC1B;AAED,uEAAuE;AACvE,SAAe,UAAU;;;;;;oBAErB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBAC7B,iBAAiB,GAAuB,IAAI,GAAG,CAAC,cAAc,CAClE;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAI,CAAC;qBAC93P,CAAC,CAAC;oBAC0C,qBAAM,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAA;;oBAA3E,kBAAkB,GAAuB,SAAkC;oBAC/E,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4EAA4E;AAC5E,SAAe,WAAW;;;;;;oBAEtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAC9B,kBAAkB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACrE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC4C,qBAAM,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAA;;oBAA/E,mBAAmB,GAAwB,SAAoC;oBACnF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,mBAAmB,EAAC;;;;CAC9B;AAED,+EAA+E;AAC/E,SAAe,UAAU,CAAC,GAAW;;;;;;oBAEjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBAC7B,iBAAiB,GAAuB,IAAI,GAAG,CAAC,cAAc,CAClE;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAE,GAAG;qBACf,CAAC,CAAC;oBAC0C,qBAAM,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAA;;oBAA3E,kBAAkB,GAAuB,SAAkC;oBAC/E,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uFAAuF;AACvF,SAAe,aAAa,CAAC,GAAW;;;;;;oBAEpC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,oBAAoB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC3E;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAE,GAAG;qBACf,CAAC,CAAC;oBACgD,qBAAM,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAA;;oBAAvF,qBAAqB,GAA0B,SAAwC;oBAC3F,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,6DAA6D;AAC7D,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,WAAW,EAAE,QAAQ;wBACrB,eAAe,EAAE,UAAU;qBAC9B,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,EAAA;;oBAAnE,YAAY,GAAmB,SAAoC;oBACvE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+DAA+D;AAC/D,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACtC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,WAAW,EAAE,QAAQ;wBACrB,eAAe,EAAE,UAAU;qBAC9B,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAA;;oBAApE,YAAY,GAAmB,SAAqC;oBACxE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,WAAW,EAAE,QAAQ;wBACrB,eAAe,EAAE,WAAW;qBAC/B,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAA;;oBAAhE,YAAY,GAAmB,SAAiC;oBACpE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kEAAkE;AAClE,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACvE;wBACI,WAAW,EAAE,QAAQ;wBACrB,kBAAkB,EAAE,UAAU;wBAC9B,kBAAkB,EAAE,WAAW;qBAClC,CAAC,CAAC;oBAC6C,qBAAM,GAAG,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAA;;oBAApF,mBAAmB,GAAyB,SAAwC;oBACxF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB;4BAEnE,cAAc,EAAE,QAAQ;4BACxB,oBAAoB,EAAE,KAAK;4BAC3B,eAAe,EAAE,UAAU;4BAC3B,YAAY,EAAE,SAAS;4BACvB,QAAQ,EAAE,GAAG;4BACb,aAAa,EAAE,CAAC;4BAChB,WAAW,EAAE,KAAK;4BAClB,iBAAiB,EAAE,EAAE;4BACrB,eAAe,EAAE,IAAI;4BACrB,gBAAgB,EAAE,KAAK;4BACvB,mBAAmB,EAAE,IAAI;4BACzB,gCAAgC,EAAE,CAAC;4BACnC,4BAA4B,EAAE,EAAE;4BAChC,YAAY,EAAE,GAAG,CAAC,oBAAoB,CAAC,aAAa;4BACpD,YAAY,EAAE,QAAQ;4BACtB,iBAAiB,EAAE,WAAW;4BAC9B,kBAAkB,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BACzC,WAAW,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BAClC,WAAW,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;;wBAClC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,uBAAuB,IAAG,IAAI;wBAC/B,uBAAoB,GAAE,IAAI;wBAC1B,sBAAmB,GAAE,IAAI;wBACzB,GAAC,yBAAyB,IAAG,IAAI;wBACjC,GAAC,2BAA2B,IAAG,IAAI;wBACnC,GAAC,sBAAsB,IAAG,IAAI;wBAC9B,GAAC,gCAAgC,IAAG,IAAI;wBACxC,GAAC,mBAAmB,IAAG,EAAE;wBACzB,GAAC,kBAAkB,IAAG,EAAE;wBACxB,GAAC,sBAAsB,IAAG,MAAM;wBAChC,GAAC,wBAAwB,IAAG,OAAO;wBACnC,GAAC,2BAA2B,IAAG,IAAI;wBACnC,uBAAoB,GAAE,IAAI;wBAC1B,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,4BAA4B,IAAG,IAAI;wBACpC,wBAAqB,GAAE,IAAI;wBAC3B,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,oBAAoB,IAAG,GAAG;wBAC3B,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,yBAAyB,IAAG,IAAI;wBACjC,GAAC,qCAAqC,IAAG,IAAI;wBAC7C,GAAC,mBAAmB,IAAG,GAAG;wBAC1B,GAAC,kBAAkB,IAAG,IAAI;4BAC5B,CAAC;oBAC6C,qBAAM,GAAG,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAA;;oBAApF,mBAAmB,GAAyB,SAAwC;oBACxF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qDAAqD;AACrD,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACvE;wBACI,cAAc,EAAE,QAAQ;wBACxB,eAAe,EAAE,UAAU;qBAC9B,CAAC,CAAC;oBAC6C,qBAAM,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAA;;oBAAjF,mBAAmB,GAAyB,SAAqC;oBACrF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qDAAqD;AACrD,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB;4BAEnE,cAAc,EAAE,QAAQ;4BACxB,oBAAoB,EAAE,KAAK;4BAC3B,eAAe,EAAE,UAAU;4BAC3B,YAAY,EAAE,SAAS;4BACvB,QAAQ,EAAE,GAAG;4BACb,aAAa,EAAE,CAAC;4BAChB,WAAW,EAAE,KAAK;4BAClB,iBAAiB,EAAE,EAAE;4BACrB,eAAe,EAAE,IAAI;4BACrB,gBAAgB,EAAE,KAAK;4BACvB,mBAAmB,EAAE,IAAI;4BACzB,gCAAgC,EAAE,CAAC;4BACnC,4BAA4B,EAAE,EAAE;4BAChC,YAAY,EAAE,GAAG,CAAC,oBAAoB,CAAC,aAAa;4BACpD,YAAY,EAAE,QAAQ;4BACtB,iBAAiB,EAAE,WAAW;4BAC9B,kBAAkB,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BACzC,WAAW,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BAClC,WAAW,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;;wBAClC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,uBAAuB,IAAG,IAAI;wBAC/B,uBAAoB,GAAE,IAAI;wBAC1B,sBAAmB,GAAE,IAAI;wBACzB,GAAC,yBAAyB,IAAG,IAAI;wBACjC,GAAC,2BAA2B,IAAG,IAAI;wBACnC,GAAC,sBAAsB,IAAG,IAAI;wBAC9B,GAAC,gCAAgC,IAAG,IAAI;wBACxC,GAAC,mBAAmB,IAAG,EAAE;wBACzB,GAAC,kBAAkB,IAAG,EAAE;wBACxB,GAAC,sBAAsB,IAAG,MAAM;wBAChC,GAAC,wBAAwB,IAAG,OAAO;wBACnC,GAAC,2BAA2B,IAAG,IAAI;wBACnC,uBAAoB,GAAE,IAAI;wBAC1B,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,4BAA4B,IAAG,IAAI;wBACpC,wBAAqB,GAAE,IAAI;wBAC3B,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,oBAAoB,IAAG,GAAG;wBAC3B,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,yBAAyB,IAAG,IAAI;wBACjC,GAAC,qCAAqC,IAAG,IAAI;wBAC7C,GAAC,mBAAmB,IAAG,GAAG;wBAC1B,GAAC,kBAAkB,IAAG,IAAI;4BAC5B,CAAC;oBAC6C,qBAAM,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAA;;oBAAjF,mBAAmB,GAAyB,SAAqC;oBACrF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,aAAa;;;;;;oBAExB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc,CACjE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACyC,qBAAM,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAA;;oBAA5E,iBAAiB,GAAuB,SAAoC;oBAChF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,iBAAiB,EAAC;;;;CAC5B;AAED,oDAAoD;AACpD,SAAe,kBAAkB,CAAC,IAAY;;;;;;oBAE1C,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACvE;wBACI,cAAc,EAAE,QAAQ;wBACxB,eAAe,EAAE,IAAI;qBACxB,CAAC,CAAC;oBAC6C,qBAAM,GAAG,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAA;;oBAAvF,mBAAmB,GAAyB,SAA2C;oBAC3F,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,sDAAsD;AACtD,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,sBAAsB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACzE;wBACI,WAAW,EAAE,QAAQ;wBACrB,gBAAgB,EAAG,CAAE,IAAI,GAAG,CAAC,SAAS,CAClC;gCACI,QAAQ,EAAE,WAAW;gCACrB,WAAW,EAAE,IAAI;gCACjB,YAAY,EAAE,GAAG;gCACjB,YAAY,EAAE,IAAI;gCAClB,WAAW,EAAE,KAAK;gCAClB,eAAe,EAAE,aAAa;gCAC9B,gBAAgB,EAAE,eAAe;gCACjC,gBAAgB,EAAE,UAAU;gCAC5B,iBAAiB,EAAE,aAAa;gCAChC,YAAY,EAAE,GAAG,CAAC,mBAAmB,CAAC,GAAG;gCACzC,gBAAgB,EAAE,GAAG;gCACrB,cAAc,EAAE,GAAG;gCACnB,iBAAiB,EAAE,GAAG;gCACtB,eAAe,EAAE,GAAG;gCACpB,eAAe,EAAE,SAAS;gCAC1B,gBAAgB,EAAE,SAAS;gCAC3B,gBAAgB,EAAE,IAAI;gCACtB,iBAAiB,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC1D,cAAc,EAAG,IAAI,UAAU,CAAC,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC7D,kBAAkB,EAAE,IAAI;gCACxB,gBAAgB,EAAE,IAAI;gCACtB,SAAS,EAAE,EAAE;gCACb,UAAU,EAAE,EAAE;gCACd,QAAQ,EAAE,EAAE;gCACZ,eAAe,EAAE,KAAK;6BACzB,CAAC,EAAI;qBACb,CAAC,CAAC;oBACgD,qBAAM,GAAG,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAAA;;oBAA1F,uBAAuB,GAAwB,SAA2C;oBAC1F,sBAAsB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACzE;wBACI,WAAW,EAAE,QAAQ;wBACrB,gBAAgB,EAAG,CAAE,IAAI,GAAG,CAAC,SAAS,CAClC;gCACI,QAAQ,EAAE,WAAW;gCACrB,WAAW,EAAE,IAAI;gCACjB,YAAY,EAAE,GAAG;gCACjB,YAAY,EAAE,IAAI;gCAClB,WAAW,EAAE,IAAI;gCACjB,iBAAiB,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC9F,kBAAkB,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC/F,YAAY,EAAE,GAAG,CAAC,mBAAmB,CAAC,GAAG;gCACzC,gBAAgB,EAAE,GAAG;gCACrB,cAAc,EAAE,GAAG;gCACnB,iBAAiB,EAAE,GAAG;gCACtB,eAAe,EAAE,GAAG;gCACpB,eAAe,EAAE,SAAS;gCAC1B,gBAAgB,EAAE,SAAS;gCAC3B,gBAAgB,EAAE,IAAI;gCACtB,iBAAiB,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC1D,cAAc,EAAG,IAAI,UAAU,CAAC,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC7D,kBAAkB,EAAE,IAAI;gCACxB,gBAAgB,EAAE,IAAI;gCACtB,SAAS,EAAE,EAAE;gCACb,UAAU,EAAE,EAAE;gCACd,QAAQ,EAAE,EAAE;gCACZ,eAAe,EAAE,KAAK;6BACzB,CAAC,EAAI;qBACb,CAAC,CAAC;oBACgD,qBAAM,GAAG,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAAA;;oBAA1F,uBAAuB,GAAwB,SAA2C;oBAC9F,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,oBAAoB,GAA2B,IAAI,GAAG,CAAC,kBAAkB,CAC7E;wBACI,WAAW,EAAE,QAAQ;wBACrB,MAAM,EAAE,CAAC;qBACZ,CAAC,CAAC;oBACiD,qBAAM,GAAG,CAAC,YAAY,CAAC,oBAAoB,CAAC,EAAA;;oBAA5F,qBAAqB,GAA2B,SAA4C;oBAChG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iDAAiD;AACjD,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,uBAAuB,GAA6B,IAAI,GAAG,CAAC,oBAAoB,CACpF;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACsD,qBAAM,GAAG,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAA;;oBAAlG,wBAAwB,GAA6B,SAA6C;oBACtG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,oDAAoD;AACpD,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,uBAAuB,GAA6B,IAAI,GAAG,CAAC,oBAAoB,CACpF;wBACI,WAAW,EAAE,QAAQ;wBACrB,UAAU,EAAG,CAAE,IAAI,GAAG,CAAC,SAAS,CAC5B;gCACI,QAAQ,EAAE,aAAa;gCACvB,WAAW,EAAE,IAAI;gCACjB,YAAY,EAAE,GAAG;gCACjB,YAAY,EAAE,IAAI;gCAClB,WAAW,EAAE,KAAK;gCAClB,eAAe,EAAE,aAAa;gCAC9B,gBAAgB,EAAE,eAAe;gCACjC,gBAAgB,EAAE,UAAU;gCAC5B,iBAAiB,EAAE,aAAa;gCAChC,YAAY,EAAE,GAAG,CAAC,mBAAmB,CAAC,GAAG;gCACzC,gBAAgB,EAAE,GAAG;gCACrB,cAAc,EAAE,GAAG;gCACnB,iBAAiB,EAAE,GAAG;gCACtB,eAAe,EAAE,GAAG;gCACpB,eAAe,EAAE,SAAS;gCAC1B,gBAAgB,EAAE,SAAS;gCAC3B,gBAAgB,EAAE,IAAI;gCACtB,iBAAiB,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC1D,cAAc,EAAG,IAAI,UAAU,CAAC,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC7D,kBAAkB,EAAE,IAAI;gCACxB,gBAAgB,EAAE,IAAI;gCACtB,SAAS,EAAE,EAAE;gCACb,UAAU,EAAE,EAAE;gCACd,QAAQ,EAAE,EAAE;gCACZ,eAAe,EAAE,KAAK;6BACzB,CAAC,EAAE,IAAI,GAAG,CAAC,SAAS,CACrB;gCACI,QAAQ,EAAE,aAAa;gCACvB,WAAW,EAAE,IAAI;gCACjB,YAAY,EAAE,GAAG;gCACjB,YAAY,EAAE,IAAI;gCAClB,WAAW,EAAE,IAAI;gCACjB,iBAAiB,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC9F,kBAAkB,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC/F,YAAY,EAAE,GAAG,CAAC,mBAAmB,CAAC,GAAG;gCACzC,gBAAgB,EAAE,GAAG;gCACrB,cAAc,EAAE,GAAG;gCACnB,iBAAiB,EAAE,GAAG;gCACtB,eAAe,EAAE,GAAG;gCACpB,eAAe,EAAE,SAAS;gCAC1B,gBAAgB,EAAE,SAAS;gCAC3B,gBAAgB,EAAE,IAAI;gCACtB,iBAAiB,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC1D,cAAc,EAAG,IAAI,UAAU,CAAC,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;gCAC7D,kBAAkB,EAAE,IAAI;gCACxB,gBAAgB,EAAE,IAAI;gCACtB,SAAS,EAAE,EAAE;gCACb,UAAU,EAAE,EAAE;gCACd,QAAQ,EAAE,EAAE;gCACZ,eAAe,EAAE,KAAK;6BACzB,CAAC,EAAI;qBACb,CAAC,CAAC;oBACsD,qBAAM,GAAG,CAAC,aAAa,CAAC,uBAAuB,CAAC,EAAA;;oBAArG,wBAAwB,GAA6B,SAAgD;oBACzG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,eAAe,GAAsB,IAAI,GAAG,CAAC,aAAa;4BAE1D,WAAW,EAAE,QAAQ;4BACrB,QAAQ,EAAE,OAAO;4BACjB,YAAY,EAAE,SAAS;4BACvB,QAAQ,EAAE,QAAQ;4BAClB,YAAY,EAAE,GAAG,CAAC,kBAAkB,CAAC,QAAQ;4BAC7C,iBAAiB,EAAE,WAAW;4BAC9B,SAAS,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BAChC,UAAU,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BACjC,cAAc,EAAE,EAAE;4BAClB,kBAAkB,EAAE,EAAE;4BACtB,cAAc,EAAE,EAAE;4BAClB,aAAa,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;4BACnC,cAAc,EAAE,IAAI;;wBACpB,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,qBAAqB,IAAG,KAAK;wBAC9B,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,gCAAgC,IAAG,KAAK;wBACzC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,0BAA0B,IAAG,EAAE;wBAChC,GAAC,oBAAoB,IAAG,EAAE;wBAC1B,GAAC,mBAAmB,IAAG,IAAI;wBAC3B,GAAC,kBAAkB,IAAG,IAAI;wBAC1B,GAAC,sBAAsB,IAAG,UAAU;wBACpC,GAAC,wBAAwB,IAAG,UAAU;wBACtC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,mBAAmB,IAAG,KAAK;wBAC5B,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,0BAA0B,IAAG,KAAK;wBACnC,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,2BAA2B,IAAG,CAAC;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,qCAAqC,IAAG,KAAK;wBAC9C,GAAC,6CAA6C,IAAG,KAAK;wBACtD,GAAC,mBAAmB,IAAG,CAAC;wBACxB,GAAC,kBAAkB,IAAG,IAAI;4BAC5B,CAAC;oBACuC,qBAAM,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,EAAA;;oBAA3E,gBAAgB,GAAsB,SAAqC;oBAC/E,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,eAAe,GAAsB,IAAI,GAAG,CAAC,aAAa;4BAE1D,WAAW,EAAE,QAAQ;4BACrB,QAAQ,EAAE,OAAO;4BACjB,YAAY,EAAE,SAAS;4BACvB,QAAQ,EAAE,QAAQ;4BAClB,aAAa,EAAE,QAAQ;4BACvB,YAAY,EAAE,GAAG,CAAC,kBAAkB,CAAC,SAAS;4BAC9C,iBAAiB,EAAE,EAAE;4BACrB,SAAS,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BAChC,UAAU,EAAG,IAAI,UAAU,CAAC,EAAI,CAAC;4BACjC,cAAc,EAAE,EAAE;4BAClB,kBAAkB,EAAE,EAAE;4BACtB,cAAc,EAAE,EAAE;4BAClB,aAAa,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;4BACnC,cAAc,EAAE,IAAI;;wBACpB,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,qBAAqB,IAAG,KAAK;wBAC9B,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,gCAAgC,IAAG,KAAK;wBACzC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,0BAA0B,IAAG,EAAE;wBAChC,GAAC,oBAAoB,IAAG,EAAE;wBAC1B,GAAC,mBAAmB,IAAG,IAAI;wBAC3B,GAAC,kBAAkB,IAAG,IAAI;wBAC1B,GAAC,sBAAsB,IAAG,UAAU;wBACpC,GAAC,wBAAwB,IAAG,UAAU;wBACtC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,mBAAmB,IAAG,KAAK;wBAC5B,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,0BAA0B,IAAG,KAAK;wBACnC,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,2BAA2B,IAAG,CAAC;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,qCAAqC,IAAG,KAAK;wBAC9C,GAAC,6CAA6C,IAAG,KAAK;wBACtD,GAAC,mBAAmB,IAAG,CAAC;wBACxB,GAAC,kBAAkB,IAAG,IAAI;4BAC5B,CAAC;oBACuC,qBAAM,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;;oBAAxE,gBAAgB,GAAsB,SAAkC;oBAC5E,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,eAAe,GAAsB,IAAI,GAAG,CAAC,aAAa,CAC9D;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBACuC,qBAAM,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;;oBAAxE,gBAAgB,GAAsB,SAAkC;oBAC5E,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACvE;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBAC6C,qBAAM,GAAG,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAA;;oBAApF,mBAAmB,GAAyB,SAAwC;oBACxF,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,aAAa;;;;;;oBAExB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc,CACjE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACyC,qBAAM,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAA;;oBAA5E,iBAAiB,GAAuB,SAAoC;oBAChF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iDAAiD;AACjD,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc;4BAE7D,WAAW,EAAE,QAAQ;4BACrB,QAAQ,EAAE,QAAQ;4BAClB,YAAY,EAAE,WAAW;4BACzB,QAAQ,EAAE,0BAA0B;4BACpC,cAAc,EAAE,IAAI;;wBACpB,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,qBAAqB,IAAG,KAAK;wBAC9B,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,gCAAgC,IAAG,KAAK;wBACzC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,0BAA0B,IAAG,EAAE;wBAChC,GAAC,oBAAoB,IAAG,EAAE;wBAC1B,GAAC,mBAAmB,IAAG,IAAI;wBAC3B,GAAC,kBAAkB,IAAG,IAAI;wBAC1B,GAAC,sBAAsB,IAAG,UAAU;wBACpC,GAAC,wBAAwB,IAAG,UAAU;wBACtC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,mBAAmB,IAAG,KAAK;wBAC5B,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,0BAA0B,IAAG,KAAK;wBACnC,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,2BAA2B,IAAG,CAAC;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,qCAAqC,IAAG,KAAK;wBAC9C,GAAC,6CAA6C,IAAG,KAAK;wBACtD,GAAC,mBAAmB,IAAG,CAAC;wBACxB,GAAC,kBAAkB,IAAG,IAAI;4BAC5B,CAAC;oBACyC,qBAAM,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAA;;oBAA/E,iBAAiB,GAAuB,SAAuC;oBACnF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iDAAiD;AACjD,SAAe,aAAa;;;;;;oBAExB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc;4BAE7D,WAAW,EAAE,QAAQ;4BACrB,QAAQ,EAAE,QAAQ;4BAClB,YAAY,EAAE,aAAa;4BAC3B,QAAQ,EAAE,4BAA4B;4BACtC,cAAc,EAAE,IAAI;;wBACpB,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,0BAA0B,IAAG,IAAI;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,qBAAqB,IAAG,KAAK;wBAC9B,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,gCAAgC,IAAG,KAAK;wBACzC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,0BAA0B,IAAG,EAAE;wBAChC,GAAC,oBAAoB,IAAG,EAAE;wBAC1B,GAAC,mBAAmB,IAAG,IAAI;wBAC3B,GAAC,kBAAkB,IAAG,IAAI;wBAC1B,GAAC,sBAAsB,IAAG,UAAU;wBACpC,GAAC,wBAAwB,IAAG,UAAU;wBACtC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,wBAAwB,IAAG,IAAI;wBAChC,GAAC,mBAAmB,IAAG,KAAK;wBAC5B,GAAC,2BAA2B,IAAG,KAAK;wBACpC,GAAC,sBAAsB,IAAG,KAAK;wBAC/B,GAAC,0BAA0B,IAAG,KAAK;wBACnC,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,uBAAuB,IAAG,KAAK;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,oBAAoB,IAAG,IAAI;wBAC5B,GAAC,4BAA4B,IAAG,KAAK;wBACrC,GAAC,2BAA2B,IAAG,CAAC;wBAChC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,wBAAwB,IAAG,KAAK;wBACjC,GAAC,yBAAyB,IAAG,KAAK;wBAClC,GAAC,qCAAqC,IAAG,KAAK;wBAC9C,GAAC,6CAA6C,IAAG,KAAK;wBACtD,GAAC,mBAAmB,IAAG,CAAC;wBACxB,GAAC,kBAAkB,IAAG,IAAI;4BAC5B,CAAC;oBACyC,qBAAM,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAA;;oBAA5E,iBAAiB,GAAuB,SAAoC;oBAChF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qDAAqD;AACrD,SAAe,aAAa;;;;;;oBAExB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc,CACjE;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,QAAQ;qBACrB,CAAC,CAAC;oBACyC,qBAAM,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAA;;oBAA5E,iBAAiB,GAAuB,SAAoC;oBAChF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iDAAiD;AACjD,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,kBAAkB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACvE;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,QAAQ;qBACrB,CAAC,CAAC;oBAC6C,qBAAM,GAAG,CAAC,WAAW,CAAC,kBAAkB,CAAC,EAAA;;oBAArF,mBAAmB,GAAyB,SAAyC;oBACzF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iDAAiD;AACjD,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA;;oBAAhF,kBAAkB,GAAwB,SAAsC;oBACpF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qDAAqD;AACrD,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAA;;oBAAxF,oBAAoB,GAA0B,SAA0C;oBAC5F,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,oBAAoB,EAAC;;;;CAC/B;AAED,0DAA0D;AAC1D,SAAe,qBAAqB,CAAC,YAAoB;;;;;;oBAErD,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACxC,qBAAqB,GAA4B,IAAI,GAAG,CAAC,mBAAmB,CAChF;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,YAAY;qBACzB,CAAC,CAAC;oBACmD,qBAAM,GAAG,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,EAAA;;oBAAnG,sBAAsB,GAA4B,SAAiD;oBACvG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qDAAqD;AACrD,SAAe,kBAAkB,CAAC,UAAkB;;;;;;oBAEhD,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,qBAAqB,GAA4B,IAAI,GAAG,CAAC,mBAAmB,CAChF;wBACI,WAAW,EAAE,QAAQ;wBACrB,QAAQ,EAAE,UAAU;qBACvB,CAAC,CAAC;oBACmD,qBAAM,GAAG,CAAC,aAAa,CAAC,qBAAqB,CAAC,EAAA;;oBAAhG,sBAAsB,GAA4B,SAA8C;oBACpG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yDAAyD;AACzD,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,qBAAqB,GAA2B,IAAI,GAAG,CAAC,kBAAkB,CAC9E;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACkD,qBAAM,GAAG,CAAC,YAAY,CAAC,qBAAqB,CAAC,EAAA;;oBAA9F,sBAAsB,GAA2B,SAA6C;oBAClG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,sBAAsB,EAAC;;;;CACjC;AAED,oEAAoE;AACpE,SAAe,mBAAmB,CAAC,KAAa;;;;;;oBAE5C,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACtC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAE,KAAK;qBACjB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAA;;oBAA3F,oBAAoB,GAA0B,SAA6C;oBAC/F,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uDAAuD;AACvD,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,oBAAoB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC3E;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACgD,qBAAM,GAAG,CAAC,WAAW,CAAC,oBAAoB,CAAC,EAAA;;oBAA1F,qBAAqB,GAA0B,SAA2C;oBAC9F,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,qBAAqB,EAAC;;;;CAChC;AAED,kEAAkE;AAClE,SAAe,kBAAkB,CAAC,KAAa;;;;;;oBAE3C,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAE,KAAK;qBACjB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,aAAa,CAAC,mBAAmB,CAAC,EAAA;;oBAA1F,oBAAoB,GAA0B,SAA4C;oBAC9F,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,mBAAmB,EAAE,IAAI;wBACzB,mBAAmB,EAAE,mBAAmB;wBACxC,mBAAmB,EAAE,GAAG;wBACxB,uBAAuB,EAAE,GAAG,CAAC,uBAAuB,CAAC,GAAG;wBACxD,uBAAuB,EAAE,CAAC;qBAC7B,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAA;;oBAA7D,YAAY,GAAmB,SAA8B;oBACjE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD,EACC,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAA;;oBAA7D,YAAY,GAAmB,SAA8B;oBACjE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,2EAA2E;AAC3E,SAAe,oBAAoB;;;;;;oBAE/B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBACvC,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,EAAA;;oBAAlE,WAAW,GAAkB,SAAqC;oBACtE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iFAAiF;AACjF,SAAe,qBAAqB;;;;;;oBAEhC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACxC,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAA;;oBAAnE,WAAW,GAAkB,SAAsC;oBACvE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+DAA+D;AAC/D,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC1C,YAAY,GAAoB,IAAI,GAAG,CAAC,WAAW,CACvD;wBACI,cAAc,EAAE,QAAQ;wBACxB,cAAc,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAI,CAAC;wBACzE,KAAK,EAAE,YAAY;wBACnB,OAAO,EAAE,eAAe;wBACxB,WAAW,EAAE,IAAI;wBACjB,OAAO,EAAE,IAAI;wBACb,iBAAiB,EAAE,GAAG;wBACtB,iBAAiB,EAAE,EAAE;wBACrB,YAAY,EAAE,IAAI;wBAClB,mBAAmB,EAAE,YAAY;wBACjC,iBAAiB,EAAE,YAAY;wBAC/B,iBAAiB,EAAE,eAAe;wBAClC,sBAAsB,EAAE,IAAI;wBAC5B,qBAAqB,EAAE,YAAY;wBACnC,uBAAuB,EAAE,YAAY;wBACrC,wBAAwB,EAAE,SAAS;wBACnC,kBAAkB,EAAE,eAAe;wBACnC,YAAY,EAAE,IAAI;wBAClB,wBAAwB,EAAE,KAAK;wBAC/B,kBAAkB,EAAE,EAAE;qBACzB,CAAC,CAAC;oBACkC,qBAAM,GAAG,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAA;;oBAA3E,aAAa,GAAoB,SAA0C;oBAC/E,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;oBAC3B,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+DAA+D;AAC/D,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC1C,YAAY,GAAoB,IAAI,GAAG,CAAC,WAAW,CACvD;wBACI,cAAc,EAAE,QAAQ;qBAC3B,CAAC,CAAC;oBACkC,qBAAM,GAAG,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAA;;oBAA3E,aAAa,GAAoB,SAA0C;oBAC/E,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;oBAC3B,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qEAAqE;AACrE,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,eAAe,GAAsB,IAAI,GAAG,CAAC,aAAa,CAC9D;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACuC,qBAAM,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;;oBAAxE,gBAAgB,GAAsB,SAAkC;oBAC5E,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,sDAAsD;AACtD,SAAe,aAAa;;;;;;oBAExB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc,CACjE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACyC,qBAAM,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAA;;oBAA5E,iBAAiB,GAAuB,SAAoC;oBAChF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qEAAqE;AACrE,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC1C,iBAAiB,GAAwB,IAAI,GAAG,CAAC,eAAe,CACpE;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC2C,qBAAM,GAAG,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,EAAA;;oBAAzF,kBAAkB,GAAwB,SAA+C;oBAC7F,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACE,qBAAM,GAAG,CAAC,YAAY,EAAE,EAAA;;oBAA9D,gBAAgB,GAAsB,SAAwB;oBAClE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACtC,kBAAkB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CACzE;wBACI,cAAc,EAAE,yDAAyD;wBACzE,aAAa,EAAE,QAAQ;qBAC1B,CAAC,CAAC;oBAC8C,qBAAM,GAAG,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAA;;oBAAzF,mBAAmB,GAA0B,SAA4C;oBAC7F,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,sBAAsB;;;;;;oBAEjC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;oBACzC,kBAAkB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CACzE;wBACI,cAAc,EAAE,yDAAyD;wBACzE,aAAa,EAAE,QAAQ;qBAC1B,CAAC,CAAC;oBAC8C,qBAAM,GAAG,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAAA;;oBAA5F,mBAAmB,GAA0B,SAA+C;oBAChG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBAC3C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,oBAAoB;;;;;;oBAE/B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBACe,qBAAM,GAAG,CAAC,eAAe,EAAE,EAAA;;oBAAjF,wBAAwB,GAA8B,SAA2B;oBACrF,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,gFAAgF;AAChF,SAAe,qBAAqB;;;;;;oBAEhC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACU,qBAAM,GAAG,CAAC,gBAAgB,EAAE,EAAA;;oBAA9E,sBAAsB,GAA4B,SAA4B;oBAClF,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,wDAAwD;AACxD,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD,EACC,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,EAAA;;oBAAlE,YAAY,GAAmB,SAAmC;oBACtE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+CAA+C;AAC/C,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACC,qBAAM,GAAG,CAAC,OAAO,EAAE,EAAA;;oBAAnD,YAAY,GAAoB,SAAmB;oBACvD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACE,qBAAM,GAAG,CAAC,SAAS,EAAE,EAAA;;oBAAxD,cAAc,GAAqB,SAAqB;oBAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,+EAA+E;AAC/E,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,YAAY,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAI,CAAC;qBACtF,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,EAAA;;oBAArE,cAAc,GAAqB,SAAkC;oBACzE,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uFAAuF;AACvF,SAAe,8BAA8B;;;;;;oBAEzC,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;oBACjD,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,EAAA;;oBAAtG,oBAAoB,GAA0B,SAAwD;oBAC1G,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;oBACnD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,wEAAwE;AACxE,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC1C,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,EAAA;;oBAA/F,oBAAoB,GAA0B,SAAiD;oBACnG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,wEAAwE;AACxE,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC1C,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;wBACrB,eAAe,EAAG,CAAE,IAAI,GAAG,CAAC,cAAc,CACtC;gCACI,QAAQ,EAAE,wBAAwB;gCAClC,SAAS,EAAE,CAAC;6BACf,CAAC,EAAI;qBACb,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,EAAA;;oBAA/F,oBAAoB,GAA0B,SAAiD;oBACnG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,gEAAgE;AAChE,SAAe,qBAAqB;;;;;;oBAEhC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACxC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAA;;oBAA7F,oBAAoB,GAA0B,SAA+C;oBACjG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,gEAAgE;AAChE,SAAe,qBAAqB;;;;;;oBAEhC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACxC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,WAAW,EAAE,QAAQ;wBACrB,eAAe,EAAG,CAAE,IAAI,GAAG,CAAC,cAAc,CACtC;gCACI,QAAQ,EAAE,6BAA6B;gCACvC,SAAS,EAAE,CAAC;6BACf,CAAC,EAAI;qBACb,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAA;;oBAA7F,oBAAoB,GAA0B,SAA+C;oBACjG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,mEAAmE;AACnE,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,EAAA;;oBAAjE,YAAY,GAAmB,SAAkC;oBACrE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kEAAkE;AAClE,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,EAAA;;oBAAjE,YAAY,GAAmB,SAAkC;oBACrE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,sEAAsE;AACtE,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACI,qBAAM,GAAG,CAAC,YAAY,EAAE,EAAA;;oBAAhE,iBAAiB,GAAuB,SAAwB;oBACpE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,mEAAmE;AACnE,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACrC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,EAAA;;oBAAnE,YAAY,GAAmB,SAAoC;oBACvE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,EAAA;;oBAAlE,YAAY,GAAmB,SAAmC;oBACtE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,6EAA6E;AAC7E,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,QAAQ,EAAE,OAAO;wBACjB,WAAW,EAAE,QAAQ;wBACrB,YAAY,EAAE,aAAa;wBAC3B,aAAa,EAAE,eAAe;qBACjC,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAA;;oBAA7D,YAAY,GAAmB,SAA8B;oBACjE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8EAA8E;AAC9E,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,QAAQ,EAAE,OAAO;wBACjB,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAA;;oBAA7D,YAAY,GAAmB,SAA8B;oBACjE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iFAAiF;AACjF,SAAe,aAAa;;;;;;oBAExB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBAChC,gBAAgB,GAAuB,IAAI,GAAG,CAAC,cAAc,CACjE;wBACI,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBACyC,qBAAM,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAA;;oBAA5E,iBAAiB,GAAuB,SAAoC;oBAChF,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kFAAkF;AAClF,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,cAAc,GAAsB,IAAI,GAAG,CAAC,aAAa,CAC7D;wBACI,QAAQ,EAAE,OAAO;wBACjB,iBAAiB,EAAE,UAAU;wBAC7B,aAAa,EAAE,WAAW;wBAC1B,iBAAiB,EAAE,aAAa;wBAChC,UAAU,EAAE,EAAE;qBACjB,CAAC,CAAC;oBACsC,qBAAM,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,EAAA;;oBAAzE,eAAe,GAAsB,SAAoC;oBAC7E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;oBAC7B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iFAAiF;AACjF,SAAe,eAAe;;;;;;oBAE1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBAClC,cAAc,GAAsB,IAAI,GAAG,CAAC,aAAa,CAC7D;wBACI,QAAQ,EAAE,OAAO;wBACjB,iBAAiB,EAAE,UAAU;wBAC7B,aAAa,EAAE,WAAW;wBAC1B,iBAAiB,EAAE,aAAa;wBAChC,UAAU,EAAE,EAAE;qBACjB,CAAC,CAAC;oBACsC,qBAAM,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,EAAA;;oBAAzE,eAAe,GAAsB,SAAoC;oBAC7E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;oBAC7B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yEAAyE;AACzE,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,QAAQ,EAAE,OAAO;qBACpB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAA;;oBAAxF,oBAAoB,GAA0B,SAA0C;oBAC5F,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,0EAA0E;AAC1E,SAAe,YAAY;;;;;;oBAEvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAC/B,eAAe,GAAsB,IAAI,GAAG,CAAC,aAAa,CAC9D;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACuC,qBAAM,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;;oBAAxE,gBAAgB,GAAsB,SAAkC;oBAC5E,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,gBAAgB,EAAC;;;;CAC3B;AAED,6EAA6E;AAC7E,SAAe,WAAW;;;;;;oBAEtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAC9B,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;wBACrB,cAAc,EAAE,IAAI;wBACpB,gBAAgB,EAAE,KAAK;wBACvB,QAAQ,EAAE,QAAQ;wBAClB,WAAW,EAAE,IAAI;wBACjB,SAAS,EAAE,SAAS;wBACpB,SAAS,EAAE,SAAS;wBACpB,UAAU,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAI,CAAC;wBAChD,aAAa,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAI,CAAC;wBAC1F,cAAc,EAAG,IAAI,UAAU,CAAC,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAI,CAAC;qBAC9G,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAA;;oBAAzD,WAAW,GAAkB,SAA4B;oBAC7D,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4EAA4E;AAC5E,SAAe,WAAW,CAAC,GAAW;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAC9B,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAE,GAAG;qBACf,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAA;;oBAAzD,WAAW,GAAkB,SAA4B;oBAC7D,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yEAAyE;AACzE,SAAe,WAAW,CAAC,GAAW;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAC9B,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAE,GAAG;qBACf,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAA;;oBAAzD,WAAW,GAAkB,SAA4B;oBAC7D,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,WAAW,EAAC;;;;CACtB;AAED,yEAAyE;AACzE,SAAe,WAAW,CAAC,GAAkB;;;;;;oBAEzC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBACD,qBAAM,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;;oBAAlD,WAAW,GAAkB,SAAqB;oBACtD,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,wDAAwD;AACxD,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,cAAc,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC3D;wBACI,WAAW,EAAE,QAAQ;wBACrB,MAAM,EAAG,CAAE,IAAI,GAAG,CAAC,KAAK,CACpB;gCACI,SAAS,EAAE,IAAI;gCACf,YAAY,EAAE,aAAa;gCAC3B,aAAa,EAAE,aAAa;gCAC5B,WAAW,EAAE,IAAI;gCACjB,YAAY,EAAE,GAAG;6BACpB,CAAC,EAAE,IAAI,GAAG,CAAC,KAAK,CACjB;gCACI,SAAS,EAAE,KAAK;gCAChB,YAAY,EAAE,QAAQ;gCACtB,aAAa,EAAE,GAAG;gCAClB,WAAW,EAAE,IAAI;gCACjB,YAAY,EAAE,GAAG;6BACpB,CAAC,EAAI;qBACb,CAAC,CAAC;oBACqC,qBAAM,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,EAAA;;oBAAvE,eAAe,GAAqB,SAAmC;oBAC3E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;oBAC7B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,wDAAwD;AACxD,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,cAAc,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC3D;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBACqC,qBAAM,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,EAAA;;oBAAvE,eAAe,GAAqB,SAAmC;oBAC3E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;oBAC7B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,sDAAsD;AACtD,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACY,qBAAM,GAAG,CAAC,WAAW,EAAE,EAAA;;oBAAtE,qBAAqB,GAA0B,SAAuB;oBAC1E,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,qBAAqB,EAAC;;;;CAChC;AAED,kDAAkD;AAClD,SAAe,gBAAgB,CAAC,QAAgB;;;;;;oBAE5C,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACnC,oBAAoB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC3E;wBACI,YAAY,EAAE,QAAQ;qBACzB,CAAC,CAAC;oBACgD,qBAAM,GAAG,CAAC,WAAW,CAAC,oBAAoB,CAAC,EAAA;;oBAA1F,qBAAqB,GAA0B,SAA2C;oBAC9F,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,cAAc,CAAC,IAAa;;;;;;oBAEvC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,iBAAiB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACtE;wBACI,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI;wBAC1F,YAAY,EAAE,SAAS;wBACvB,QAAQ,EAAE,GAAG;qBAChB,CAAC,CAAC;oBAC4C,qBAAM,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA;;oBAAjF,kBAAkB,GAAyB,SAAsC;oBACrF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,iBAAiB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACtE,EACC,CAAC,CAAC;oBAC4C,qBAAM,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA;;oBAAjF,kBAAkB,GAAyB,SAAsC;oBACrF,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;wBACrB,OAAO,EAAG,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAI,CAAC;qBAC71B,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,EAAA;;oBAA5D,WAAW,GAAkB,SAA+B;oBAChE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,4DAA4D;AAC5D,SAAe,cAAc;;;;;;oBAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACjC,UAAU,GAAkB,IAAI,GAAG,CAAC,SAAS,CACjD;wBACI,WAAW,EAAE,QAAQ;qBACxB,CAAC,CAAC;oBAC8B,qBAAM,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,EAAA;;oBAA5D,WAAW,GAAkB,SAA+B;oBAChE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qCAAqC;AACrC,SAAe,UAAU;;;;;;oBAErB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBAC7B,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD,EACC,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,EAAA;;oBAA3D,YAAY,GAAmB,SAA4B;oBAC/D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iEAAiE;AACjE,SAAe,gBAAgB;;;;;;oBAE3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACN,qBAAM,GAAG,CAAC,WAAW,EAAE,EAAA;;oBAApD,WAAW,GAAkB,SAAuB;oBACxD,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qDAAqD;AACrD,SAAe,UAAU;;;;;;oBAErB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;oBAC7B,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD,EACC,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,EAAA;;oBAA3D,YAAY,GAAmB,SAA4B;oBAC/D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uEAAuE;AACvE,SAAe,qBAAqB;;;;;;oBAEhC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACxC,iBAAiB,GAAyB,IAAI,GAAG,CAAC,gBAAgB,CACtE;wBACI,aAAa,EAAE,KAAK;wBACpB,eAAe,EAAE,KAAK;wBACtB,kBAAkB,EAAE,KAAK;wBACzB,gBAAgB,EAAE,KAAK;wBACvB,mBAAmB,EAAE,SAAS;qBACjC,CAAC,CAAC;oBAC4C,qBAAM,GAAG,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,EAAA;;oBAAxF,kBAAkB,GAAyB,SAA6C;oBAC5F,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,uEAAuE;AACvE,SAAe,qBAAqB;;;;;;oBAEhC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBACG,qBAAM,GAAG,CAAC,gBAAgB,EAAE,EAAA;;oBAAvE,kBAAkB,GAAyB,SAA4B;oBAC3E,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,0DAA0D;AAC1D,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,MAAM,EAAE,QAAQ;wBAChB,WAAW,EAAE,QAAQ;wBACrB,YAAY,EAAE,SAAS;wBACvB,YAAY,EAAE,SAAS;qBAC1B,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,EAAA;;oBAAxE,cAAc,GAAqB,SAAqC;oBAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,0DAA0D;AAC1D,SAAe,iBAAiB,CAAC,EAAU;;;;;;oBAEvC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,MAAM,EAAE,EAAE;qBACb,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,EAAA;;oBAAxE,cAAc,GAAqB,SAAqC;oBAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,gEAAgE;AAChE,SAAe,oBAAoB,CAAC,EAAU;;;;;;oBAE1C,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;oBACvC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,MAAM,EAAE,EAAE;qBACb,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,eAAe,CAAC,aAAa,CAAC,EAAA;;oBAA3E,cAAc,GAAqB,SAAwC;oBAC/E,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,kEAAkE;AAClE,SAAe,kBAAkB;;;;;;oBAE7B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;oBACc,qBAAM,GAAG,CAAC,aAAa,EAAE,EAAA;;oBAA5E,uBAAuB,GAA4B,SAAyB;oBAChF,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;oBACd,sBAAO,uBAAuB,EAAC;;;;CAClC;AAED,mFAAmF;AACnF,SAAe,yBAAyB;;;;;;oBAEpC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;oBAC5C,sBAAsB,GAA6B,IAAI,GAAG,CAAC,oBAAoB,CACnF;wBACI,kBAAkB,EAAE,IAAI;wBACxB,mBAAmB,EAAE,WAAW;wBAChC,eAAe,EAAE,IAAI;qBACxB,CAAC,CAAC;oBACqD,qBAAM,GAAG,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,EAAA;;oBAA1G,uBAAuB,GAA6B,SAAsD;oBAC9G,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,mFAAmF;AACnF,SAAe,yBAAyB;;;;;;oBAEpC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;oBACQ,qBAAM,GAAG,CAAC,oBAAoB,EAAE,EAAA;;oBAApF,uBAAuB,GAA6B,SAAgC;oBACxF,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,oEAAoE;AACpE,SAAe,wBAAwB;;;;;;oBAEnC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;oBACO,qBAAM,GAAG,CAAC,mBAAmB,EAAE,EAAA;;oBAAjF,sBAAsB,GAA4B,SAA+B;oBACrF,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;oBACpC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;oBAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,gFAAgF;AAChF,SAAe,6BAA6B;;;;;;oBAExC,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;oBAChD,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,YAAY,EAAE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC;qBAClG,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,wBAAwB,CAAC,WAAW,CAAC,EAAA;;oBAA9E,YAAY,GAAmB,SAA+C;oBAClF,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;oBAClD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,2EAA2E;AAC3E,SAAe,yBAAyB;;;;;;oBAEpC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;oBAC5C,WAAW,GAAmB,IAAI,GAAG,CAAC,UAAU,CACpD;wBACI,YAAY,EAAE,iBAAiB;qBAClC,CAAC,CAAC;oBACgC,qBAAM,GAAG,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAA;;oBAA1E,YAAY,GAAmB,SAA2C;oBAC9E,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,iFAAiF;AACjF,SAAe,0BAA0B;;;;;;oBAErC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;oBACE,qBAAM,GAAG,CAAC,qBAAqB,EAAE,EAAA;;oBAAhF,qBAAqB,GAA0B,SAAiC;oBACpF,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACnC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;oBAC/C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qEAAqE;AACrE,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBAC1C,uBAAuB,GAA8B,IAAI,GAAG,CAAC,qBAAqB,CACtF;wBACI,uBAAuB,EAAE,IAAI;wBAC7B,wBAAwB,EAAE,IAAI;qBACjC,CAAC,CAAC;oBACuD,qBAAM,GAAG,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,EAAA;;oBAA3G,wBAAwB,GAA8B,SAAqD;oBAC/G,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,qEAAqE;AACrE,SAAe,uBAAuB;;;;;;oBAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;oBACY,qBAAM,GAAG,CAAC,kBAAkB,EAAE,EAAA;;oBAApF,wBAAwB,GAA8B,SAA8B;oBACxF,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,sDAAsD;AACtD,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACQ,qBAAM,GAAG,CAAC,cAAc,EAAE,EAAA;;oBAAxE,oBAAoB,GAA0B,SAA0B;oBAC5E,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,sDAAsD;AACtD,SAAe,mBAAmB;;;;;;oBAE9B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBACtC,mBAAmB,GAA0B,IAAI,GAAG,CAAC,iBAAiB,CAC1E;wBACI,cAAc,EAAE,IAAI;qBACvB,CAAC,CAAC;oBAC+C,qBAAM,GAAG,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAA;;oBAA3F,oBAAoB,GAA0B,SAA6C;oBAC/F,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yEAAyE;AACzE,SAAe,0BAA0B;;;;;;oBAErC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;oBACE,qBAAM,GAAG,CAAC,qBAAqB,EAAE,EAAA;;oBAAhF,oBAAoB,GAA2B,SAAiC;oBACpF,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;oBAC/C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yEAAyE;AACzE,SAAe,0BAA0B;;;;;;oBAErC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;oBAC7C,mBAAmB,GAA2B,IAAI,GAAG,CAAC,kBAAkB,CAC5E;wBACI,aAAa,EAAE,GAAG,CAAC,eAAe,CAAC,MAAM;wBACzC,iBAAiB,EAAE,SAAS;wBAC5B,aAAa,EAAE,IAAI;wBACnB,iBAAiB,EAAE,MAAM;wBACzB,iBAAiB,EAAE,KAAK;qBAC3B,CAAC,CAAC;oBACgD,qBAAM,GAAG,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,EAAA;;oBAAnG,oBAAoB,GAA2B,SAAoD;oBACvG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;oBAC/C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,yEAAyE;AACzE,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACpC,aAAa,GAAqB,IAAI,GAAG,CAAC,YAAY,CAC1D;wBACI,cAAc,EAAE,KAAK;wBACrB,WAAW,EAAE,aAAa;wBAC1B,SAAS,EAAE,aAAa;wBACxB,SAAS,EAAE,yBAAyB;wBACpC,UAAU,EAAE,KAAK;wBACjB,iBAAiB,EAAE,IAAI;wBACvB,eAAe,EAAE,IAAI;qBACxB,CAAC,CAAC;oBACoC,qBAAM,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,EAAA;;oBAAxE,cAAc,GAAqB,SAAqC;oBAC5E,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB;AAED,8DAA8D;AAC9D,SAAe,iBAAiB;;;;;;oBAE5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBACD,qBAAM,GAAG,CAAC,YAAY,EAAE,EAAA;;oBAA3D,cAAc,GAAqB,SAAwB;oBAC/D,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;CACjB"} \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts new file mode 100644 index 00000000..6b839ce9 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts @@ -0,0 +1,2721 @@ +/** VPN Server RPC Stubs */ +export declare class VpnServerRpc { + /** Determine if this JavaScript environment is on the Node.js or not. */ + static IsNodeJS(): boolean; + /** Set the debug mode flag */ + static SetDebugMode(flag: boolean): void; + private rpc_url; + private rpc_client; + /** + * Constructor of the VpnServerRpc class + * @param vpnserver_hostname The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param vpnserver_port The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param hubname The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + * @param password Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + * @param nodejs_https_client_reject_untrusted_server_cert In Node.js set this true to check the SSL server certificate on the destination VPN Server. Set this false to ignore the SSL server certification. + */ + constructor(vpnserver_hostname?: string, vpnserver_port?: number, hubname?: string, password?: string, nodejs_https_client_reject_untrusted_server_cert?: boolean); + /** Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. */ + Test: (in_param: VpnRpcTest) => Promise; + /** Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. */ + GetServerInfo: () => Promise; + /** Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. */ + GetServerStatus: () => Promise; + /** Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. */ + CreateListener: (in_param: VpnRpcListener) => Promise; + /** Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. */ + EnumListener: () => Promise; + /** Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + DeleteListener: (in_param: VpnRpcListener) => Promise; + /** Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + EnableListener: (in_param: VpnRpcListener) => Promise; + /** Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. */ + SetServerPassword: (in_param: VpnRpcSetPassword) => Promise; + /** Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. */ + SetFarmSetting: (in_param: VpnRpcFarm) => Promise; + /** Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. */ + GetFarmSetting: () => Promise; + /** Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. */ + GetFarmInfo: (in_param: VpnRpcFarmInfo) => Promise; + /** Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. */ + EnumFarmMember: () => Promise; + /** Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. */ + GetFarmConnectionStatus: () => Promise; + /** Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. */ + SetServerCert: (in_param: VpnRpcKeyPair) => Promise; + /** Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. */ + GetServerCert: () => Promise; + /** Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. */ + GetServerCipher: () => Promise; + /** Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. */ + SetServerCipher: (in_param: VpnRpcStr) => Promise; + /** Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + CreateHub: (in_param: VpnRpcCreateHub) => Promise; + /** Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. */ + SetHub: (in_param: VpnRpcCreateHub) => Promise; + /** Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. */ + GetHub: (in_param: VpnRpcCreateHub) => Promise; + /** Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. */ + EnumHub: () => Promise; + /** Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + DeleteHub: (in_param: VpnRpcDeleteHub) => Promise; + /** Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetHubRadius: (in_param: VpnRpcRadius) => Promise; + /** Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetHubRadius: (in_param: VpnRpcRadius) => Promise; + /** Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. */ + EnumConnection: () => Promise; + /** Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. */ + DisconnectConnection: (in_param: VpnRpcDisconnectConnection) => Promise; + /** Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. */ + GetConnectionInfo: (in_param: VpnRpcConnectionInfo) => Promise; + /** Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetHubOnline: (in_param: VpnRpcSetHubOnline) => Promise; + /** Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. */ + GetHubStatus: (in_param: VpnRpcHubStatus) => Promise; + /** Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. */ + SetHubLog: (in_param: VpnRpcHubLog) => Promise; + /** Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. */ + GetHubLog: (in_param: VpnRpcHubLog) => Promise; + /** Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + AddCa: (in_param: VpnRpcHubAddCA) => Promise; + /** Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + EnumCa: (in_param: VpnRpcHubEnumCA) => Promise; + /** Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + GetCa: (in_param: VpnRpcHubGetCA) => Promise; + /** Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + DeleteCa: (in_param: VpnRpcHubDeleteCA) => Promise; + /** Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + CreateLink: (in_param: VpnRpcCreateLink) => Promise; + /** Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetLink: (in_param: VpnRpcCreateLink) => Promise; + /** Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. */ + SetLink: (in_param: VpnRpcCreateLink) => Promise; + /** Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + EnumLink: (in_param: VpnRpcEnumLink) => Promise; + /** Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetLinkOnline: (in_param: VpnRpcLink) => Promise; + /** Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetLinkOffline: (in_param: VpnRpcLink) => Promise; + /** Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + DeleteLink: (in_param: VpnRpcLink) => Promise; + /** Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + RenameLink: (in_param: VpnRpcRenameLink) => Promise; + /** Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetLinkStatus: (in_param: VpnRpcLinkStatus) => Promise; + /** Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + AddAccess: (in_param: VpnRpcAddAccess) => Promise; + /** Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + DeleteAccess: (in_param: VpnRpcDeleteAccess) => Promise; + /** Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + EnumAccess: (in_param: VpnRpcEnumAccessList) => Promise; + /** Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. */ + SetAccessList: (in_param: VpnRpcEnumAccessList) => Promise; + /** Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + CreateUser: (in_param: VpnRpcSetUser) => Promise; + /** Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + SetUser: (in_param: VpnRpcSetUser) => Promise; + /** Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + GetUser: (in_param: VpnRpcSetUser) => Promise; + /** Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + DeleteUser: (in_param: VpnRpcDeleteUser) => Promise; + /** Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + EnumUser: (in_param: VpnRpcEnumUser) => Promise; + /** Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + CreateGroup: (in_param: VpnRpcSetGroup) => Promise; + /** Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + SetGroup: (in_param: VpnRpcSetGroup) => Promise; + /** Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + GetGroup: (in_param: VpnRpcSetGroup) => Promise; + /** Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + DeleteGroup: (in_param: VpnRpcDeleteUser) => Promise; + /** Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + EnumGroup: (in_param: VpnRpcEnumGroup) => Promise; + /** Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. */ + EnumSession: (in_param: VpnRpcEnumSession) => Promise; + /** Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. */ + GetSessionStatus: (in_param: VpnRpcSessionStatus) => Promise; + /** Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. */ + DeleteSession: (in_param: VpnRpcDeleteSession) => Promise; + /** Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. */ + EnumMacTable: (in_param: VpnRpcEnumMacTable) => Promise; + /** Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. */ + DeleteMacTable: (in_param: VpnRpcDeleteTable) => Promise; + /** Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. */ + EnumIpTable: (in_param: VpnRpcEnumIpTable) => Promise; + /** Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. */ + DeleteIpTable: (in_param: VpnRpcDeleteTable) => Promise; + /** Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. */ + SetKeep: (in_param: VpnRpcKeep) => Promise; + /** Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. */ + GetKeep: (in_param: VpnRpcKeep) => Promise; + /** Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + EnableSecureNAT: (in_param: VpnRpcHub) => Promise; + /** Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + DisableSecureNAT: (in_param: VpnRpcHub) => Promise; + /** Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetSecureNATOption: (in_param: VpnVhOption) => Promise; + /** Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. */ + GetSecureNATOption: (in_param: VpnVhOption) => Promise; + /** Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + EnumNAT: (in_param: VpnRpcEnumNat) => Promise; + /** Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + EnumDHCP: (in_param: VpnRpcEnumDhcp) => Promise; + /** Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetSecureNATStatus: (in_param: VpnRpcNatStatus) => Promise; + /** Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + EnumEthernet: () => Promise; + /** Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. */ + AddLocalBridge: (in_param: VpnRpcLocalBridge) => Promise; + /** Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + DeleteLocalBridge: (in_param: VpnRpcLocalBridge) => Promise; + /** Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. */ + EnumLocalBridge: () => Promise; + /** Get whether the localbridge function is supported on the current system. */ + GetBridgeSupport: () => Promise; + /** Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. */ + RebootServer: (in_param: VpnRpcTest) => Promise; + /** Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. */ + GetCaps: () => Promise; + /** Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. */ + GetConfig: () => Promise; + /** Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. */ + SetConfig: (in_param: VpnRpcConfig) => Promise; + /** Get Virtual Hub Administration Option default values. */ + GetDefaultHubAdminOptions: (in_param: VpnRpcAdminOption) => Promise; + /** Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + GetHubAdminOptions: (in_param: VpnRpcAdminOption) => Promise; + /** Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + SetHubAdminOptions: (in_param: VpnRpcAdminOption) => Promise; + /** Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + GetHubExtOptions: (in_param: VpnRpcAdminOption) => Promise; + /** Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + SetHubExtOptions: (in_param: VpnRpcAdminOption) => Promise; + /** Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + AddL3Switch: (in_param: VpnRpcL3Sw) => Promise; + /** Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + DelL3Switch: (in_param: VpnRpcL3Sw) => Promise; + /** Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + EnumL3Switch: () => Promise; + /** Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + StartL3Switch: (in_param: VpnRpcL3Sw) => Promise; + /** Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. */ + StopL3Switch: (in_param: VpnRpcL3Sw) => Promise; + /** Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + AddL3If: (in_param: VpnRpcL3If) => Promise; + /** Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + DelL3If: (in_param: VpnRpcL3If) => Promise; + /** Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + EnumL3If: (in_param: VpnRpcEnumL3If) => Promise; + /** Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + AddL3Table: (in_param: VpnRpcL3Table) => Promise; + /** Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + DelL3Table: (in_param: VpnRpcL3Table) => Promise; + /** Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + EnumL3Table: (in_param: VpnRpcEnumL3Table) => Promise; + /** Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + EnumCrl: (in_param: VpnRpcEnumCrl) => Promise; + /** Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + AddCrl: (in_param: VpnRpcCrl) => Promise; + /** Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + DelCrl: (in_param: VpnRpcCrl) => Promise; + /** Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetCrl: (in_param: VpnRpcCrl) => Promise; + /** Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetCrl: (in_param: VpnRpcCrl) => Promise; + /** Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetAcList: (in_param: VpnRpcAcList) => Promise; + /** Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetAcList: (in_param: VpnRpcAcList) => Promise; + /** Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + EnumLogFile: () => Promise; + /** Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + ReadLogFile: (in_param: VpnRpcReadLogFile) => Promise; + /** Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use. */ + SetSysLog: (in_param: VpnSyslogSetting) => Promise; + /** Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. */ + GetSysLog: (in_param: VpnSyslogSetting) => Promise; + /** Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + SetHubMsg: (in_param: VpnRpcMsg) => Promise; + /** Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + GetHubMsg: (in_param: VpnRpcMsg) => Promise; + /** Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + Crash: (in_param: VpnRpcTest) => Promise; + /** Get the message for administrators. */ + GetAdminMsg: () => Promise; + /** Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + Flush: (in_param: VpnRpcTest) => Promise; + /** Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetIPsecServices: (in_param: VpnIPsecServices) => Promise; + /** Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetIPsecServices: () => Promise; + /** Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + AddEtherIpId: (in_param: VpnEtherIpId) => Promise; + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetEtherIpId: (in_param: VpnEtherIpId) => Promise; + /** Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + DeleteEtherIpId: (in_param: VpnEtherIpId) => Promise; + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + EnumEtherIpId: () => Promise; + /** Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetOpenVpnSstpConfig: (in_param: VpnOpenVpnSstpConfig) => Promise; + /** Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetOpenVpnSstpConfig: () => Promise; + /** Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + GetDDnsClientStatus: () => Promise; + /** Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + ChangeDDnsClientHostname: (in_param: VpnRpcTest) => Promise; + /** Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + RegenerateServerCert: (in_param: VpnRpcTest) => Promise; + /** Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + MakeOpenVpnConfigFile: () => Promise; + /** Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + SetSpecialListener: (in_param: VpnRpcSpecialListener) => Promise; + /** Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + GetSpecialListener: () => Promise; + /** Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + GetAzureStatus: () => Promise; + /** Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + SetAzureStatus: (in_param: VpnRpcAzureStatus) => Promise; + /** Get the Proxy Settings for Connecting to the DDNS server. */ + GetDDnsInternetSettng: () => Promise; + /** Set the Proxy Settings for Connecting to the DDNS server. */ + SetDDnsInternetSettng: (in_param: VpnInternetSetting) => Promise; + /** Set the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + SetVgsConfig: (in_param: VpnVgsConfig) => Promise; + /** Get the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + GetVgsConfig: () => Promise; + /** Call a RPC procedure */ + CallAsync(method_name: string, request: T): Promise; +} +/** IP Protocol Numbers */ +export declare enum VpnIpProtocolNumber { + /** ICMP for IPv4 */ + ICMPv4 = 1, + /** TCP */ + TCP = 6, + /** UDP */ + UDP = 17, + /** ICMP for IPv6 */ + ICMPv6 = 58 +} +/** The body of the Access list */ +export declare class VpnAccess { + /** ID */ + Id_u32: number; + /** Specify a description (note) for this rule */ + Note_utf: string; + /** Enabled flag (true: enabled, false: disabled) */ + Active_bool: boolean; + /** Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. */ + Priority_u32: number; + /** The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. */ + Discard_bool: boolean; + /** The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. */ + IsIPv6_bool: boolean; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. */ + SrcIpAddress_ip: string; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + SrcSubnetMask_ip: string; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. */ + DestIpAddress_ip: string; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + DestSubnetMask_ip: string; + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. */ + SrcIpAddress6_bin: Uint8Array; + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + SrcSubnetMask6_bin: Uint8Array; + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. */ + DestIpAddress6_bin: Uint8Array; + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + DestSubnetMask6_bin: Uint8Array; + /** The IP protocol number */ + Protocol_u32: VpnIpProtocolNumber; + /** The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + SrcPortStart_u32: number; + /** The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + SrcPortEnd_u32: number; + /** The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + DestPortStart_u32: number; + /** The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + DestPortEnd_u32: number; + /** Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + SrcUsername_str: string; + /** Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + DestUsername_str: string; + /** Specify true if you want to check the source MAC address. */ + CheckSrcMac_bool: boolean; + /** Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + SrcMacAddress_bin: Uint8Array; + /** Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + SrcMacMask_bin: Uint8Array; + /** Specify true if you want to check the destination MAC address. */ + CheckDstMac_bool: boolean; + /** Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + DstMacAddress_bin: Uint8Array; + /** Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + DstMacMask_bin: Uint8Array; + /** Specify true if you want to check the state of the TCP connection. */ + CheckTcpState_bool: boolean; + /** Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. */ + Established_bool: boolean; + /** Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. */ + Delay_u32: number; + /** Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. */ + Jitter_u32: number; + /** Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. */ + Loss_u32: number; + /** The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. */ + RedirectUrl_str: string; + /** Constructor for the 'VpnAccess' class: The body of the Access list */ + constructor(init?: Partial); +} +/** Add an item to Access List */ +export declare class VpnRpcAddAccess { + /** The Virtual Hub name */ + HubName_str: string; + /** Access list (Must be a single item) */ + AccessListSingle: VpnAccess[]; + /** Constructor for the 'VpnRpcAddAccess' class: Add an item to Access List */ + constructor(init?: Partial); +} +/** Add CA to HUB */ +export declare class VpnRpcHubAddCA { + /** The Virtual Hub name */ + HubName_str: string; + /** The body of the X.509 certificate */ + Cert_bin: Uint8Array; + /** Constructor for the 'VpnRpcHubAddCA' class: Add CA to HUB */ + constructor(init?: Partial); +} +/** CRL entry */ +export declare class VpnRpcCrl { + /** The Virtual Hub name */ + HubName_str: string; + /** Key ID */ + Key_u32: number; + /** CN, optional */ + CommonName_utf: string; + /** O, optional */ + Organization_utf: string; + /** OU, optional */ + Unit_utf: string; + /** C, optional */ + Country_utf: string; + /** ST, optional */ + State_utf: string; + /** L, optional */ + Local_utf: string; + /** Serial, optional */ + Serial_bin: Uint8Array; + /** MD5 Digest, optional */ + DigestMD5_bin: Uint8Array; + /** SHA1 Digest, optional */ + DigestSHA1_bin: Uint8Array; + /** Constructor for the 'VpnRpcCrl' class: CRL entry */ + constructor(init?: Partial); +} +/** EtherIP key list entry */ +export declare class VpnEtherIpId { + /** Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. */ + Id_str: string; + /** Specify the name of the Virtual Hub to connect. */ + HubName_str: string; + /** Specify the username to login to the destination Virtual Hub. */ + UserName_str: string; + /** Specify the password to login to the destination Virtual Hub. */ + Password_str: string; + /** Constructor for the 'VpnEtherIpId' class: EtherIP key list entry */ + constructor(init?: Partial); +} +/** Layer-3 virtual interface */ +export declare class VpnRpcL3If { + /** L3 switch name */ + Name_str: string; + /** Virtual HUB name */ + HubName_str: string; + /** IP address */ + IpAddress_ip: string; + /** Subnet mask */ + SubnetMask_ip: string; + /** Constructor for the 'VpnRpcL3If' class: Layer-3 virtual interface */ + constructor(init?: Partial); +} +/** Layer-3 switch */ +export declare class VpnRpcL3Sw { + /** Layer-3 Switch name */ + Name_str: string; + /** Constructor for the 'VpnRpcL3Sw' class: Layer-3 switch */ + constructor(init?: Partial); +} +/** Routing table */ +export declare class VpnRpcL3Table { + /** L3 switch name */ + Name_str: string; + /** Network address */ + NetworkAddress_ip: string; + /** Subnet mask */ + SubnetMask_ip: string; + /** Gateway address */ + GatewayAddress_ip: string; + /** Metric */ + Metric_u32: number; + /** Constructor for the 'VpnRpcL3Table' class: Routing table */ + constructor(init?: Partial); +} +/** Generic parameter to contain u32, u64, ascii_string and unicode string */ +export declare class VpnRpcTest { + /** A 32-bit integer field */ + IntValue_u32: number; + /** A 64-bit integer field */ + Int64Value_u64: number; + /** An Ascii string field */ + StrValue_str: string; + /** An UTF-8 string field */ + UniStrValue_utf: string; + /** Constructor for the 'VpnRpcTest' class: Generic parameter to contain u32, u64, ascii_string and unicode string */ + constructor(init?: Partial); +} +/** Local Bridge list item */ +export declare class VpnRpcLocalBridge { + /** Physical Ethernet device name */ + DeviceName_str: string; + /** The Virtual Hub name */ + HubNameLB_str: string; + /** Online flag */ + Online_bool: boolean; + /** Running flag */ + Active_bool: boolean; + /** Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). */ + TapMode_bool: boolean; + /** Constructor for the 'VpnRpcLocalBridge' class: Local Bridge list item */ + constructor(init?: Partial); +} +/** Create, configure, and get the group */ +export declare class VpnRpcSetGroup { + /** The Virtual Hub name */ + HubName_str: string; + /** The group name */ + Name_str: string; + /** Optional real name (full name) of the group, allow using any Unicode characters */ + Realname_utf: string; + /** Optional, specify a description of the group */ + Note_utf: string; + /** Number of broadcast packets (Recv) */ + ["Recv.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Recv) */ + ["Recv.BroadcastCount_u64"]: number; + /** Unicast count (Recv) */ + ["Recv.UnicastBytes_u64"]: number; + /** Unicast bytes (Recv) */ + ["Recv.UnicastCount_u64"]: number; + /** Number of broadcast packets (Send) */ + ["Send.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Send) */ + ["Send.BroadcastCount_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastBytes_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastCount_u64"]: number; + /** The flag whether to use security policy */ + UsePolicy_bool: boolean; + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + ["policy:Access_bool"]: boolean; + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + ["policy:DHCPFilter_bool"]: boolean; + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + ["policy:DHCPNoServer_bool"]: boolean; + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + ["policy:DHCPForce_bool"]: boolean; + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + ["policy:NoBridge_bool"]: boolean; + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + ["policy:NoRouting_bool"]: boolean; + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + ["policy:CheckMac_bool"]: boolean; + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + ["policy:CheckIP_bool"]: boolean; + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + ["policy:ArpDhcpOnly_bool"]: boolean; + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + ["policy:PrivacyFilter_bool"]: boolean; + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + ["policy:NoServer_bool"]: boolean; + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + ["policy:NoBroadcastLimiter_bool"]: boolean; + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + ["policy:MonitorPort_bool"]: boolean; + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + ["policy:MaxConnection_u32"]: number; + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + ["policy:TimeOut_u32"]: number; + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + ["policy:MaxMac_u32"]: number; + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + ["policy:MaxIP_u32"]: number; + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + ["policy:MaxUpload_u32"]: number; + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + ["policy:MaxDownload_u32"]: number; + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + ["policy:FixPassword_bool"]: boolean; + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + ["policy:MultiLogins_u32"]: number; + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + ["policy:NoQoS_bool"]: boolean; + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + ["policy:RSandRAFilter_bool"]: boolean; + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + ["policy:RAFilter_bool"]: boolean; + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + ["policy:DHCPv6Filter_bool"]: boolean; + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + ["policy:DHCPv6NoServer_bool"]: boolean; + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + ["policy:NoRoutingV6_bool"]: boolean; + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + ["policy:CheckIPv6_bool"]: boolean; + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + ["policy:NoServerV6_bool"]: boolean; + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + ["policy:MaxIPv6_u32"]: number; + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + ["policy:NoSavePassword_bool"]: boolean; + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + ["policy:AutoDisconnect_u32"]: number; + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + ["policy:FilterIPv4_bool"]: boolean; + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + ["policy:FilterIPv6_bool"]: boolean; + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + ["policy:FilterNonIP_bool"]: boolean; + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean; + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: boolean; + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + ["policy:VLanId_u32"]: number; + /** Security policy: Whether version 3.0 (must be true) */ + ["policy:Ver3_bool"]: boolean; + /** Constructor for the 'VpnRpcSetGroup' class: Create, configure, and get the group */ + constructor(init?: Partial); +} +/** Hub types */ +export declare enum VpnRpcHubType { + /** Stand-alone HUB */ + Standalone = 0, + /** Static HUB */ + FarmStatic = 1, + /** Dynamic HUB */ + FarmDynamic = 2 +} +/** Create a HUB */ +export declare class VpnRpcCreateHub { + /** Specify the name of the Virtual Hub to create / update. */ + HubName_str: string; + /** Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. */ + AdminPasswordPlainText_str: string; + /** Online flag */ + Online_bool: boolean; + /** Maximum number of VPN sessions */ + MaxSession_u32: number; + /** No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. */ + NoEnum_bool: boolean; + /** Type of the Virtual Hub (Valid only for Clustered VPN Servers) */ + HubType_u32: VpnRpcHubType; + /** Constructor for the 'VpnRpcCreateHub' class: Create a HUB */ + constructor(init?: Partial); +} +export declare enum VpnRpcClientAuthType { + /** Anonymous authentication */ + Anonymous = 0, + /** SHA-0 hashed password authentication */ + SHA0_Hashed_Password = 1, + /** Plain password authentication */ + PlainPassword = 2, + /** Certificate authentication */ + Cert = 3 +} +/** Create and set of link */ +export declare class VpnRpcCreateLink { + /** The Virtual Hub name */ + HubName_Ex_str: string; + /** Online flag */ + Online_bool: boolean; + /** The flag to enable validation for the server certificate */ + CheckServerCert_bool: boolean; + /** The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. */ + ServerCert_bin: Uint8Array; + /** Client Option Parameters: Specify the name of the Cascade Connection */ + AccountName_utf: string; + /** Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. */ + Hostname_str: string; + /** Client Option Parameters: Specify the port number of the destination VPN Server. */ + Port_u32: number; + /** Client Option Parameters: The type of the proxy server */ + ProxyType_u32: VpnRpcProxyType; + /** Client Option Parameters: The hostname or IP address of the proxy server name */ + ProxyName_str: string; + /** Client Option Parameters: The port number of the proxy server */ + ProxyPort_u32: number; + /** Client Option Parameters: The username to connect to the proxy server */ + ProxyUsername_str: string; + /** Client Option Parameters: The password to connect to the proxy server */ + ProxyPassword_str: string; + /** Client Option Parameters: The Virtual Hub on the destination VPN Server */ + HubName_str: string; + /** Client Option Parameters: Number of TCP Connections to Use in VPN Communication */ + MaxConnection_u32: number; + /** Client Option Parameters: The flag to enable the encryption on the communication */ + UseEncrypt_bool: boolean; + /** Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection */ + UseCompress_bool: boolean; + /** Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. */ + HalfConnection_bool: boolean; + /** Client Option Parameters: Connection attempt interval when additional connection will be established */ + AdditionalConnectionInterval_u32: number; + /** Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) */ + ConnectionDisconnectSpan_u32: number; + /** Client Option Parameters: Disable QoS Control Function if the value is true */ + DisableQoS_bool: boolean; + /** Client Option Parameters: Do not use TLS 1.x of the value is true */ + NoTls1_bool: boolean; + /** Client Option Parameters: Do not use UDP acceleration mode if the value is true */ + NoUdpAcceleration_bool: boolean; + /** Authentication type */ + AuthType_u32: VpnRpcClientAuthType; + /** User name */ + Username_str: string; + /** SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). */ + HashedPassword_bin: Uint8Array; + /** Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). */ + PlainPassword_str: string; + /** Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + ClientX_bin: Uint8Array; + /** Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + ClientK_bin: Uint8Array; + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + ["policy:DHCPFilter_bool"]: boolean; + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + ["policy:DHCPNoServer_bool"]: boolean; + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + ["policy:DHCPForce_bool"]: boolean; + /** Security policy: Prohibit the duplicate MAC address */ + SecPol_CheckMac_bool: boolean; + /** Security policy: Prohibit a duplicate IP address (IPv4) */ + SecPol_CheckIP_bool: boolean; + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + ["policy:ArpDhcpOnly_bool"]: boolean; + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + ["policy:PrivacyFilter_bool"]: boolean; + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + ["policy:NoServer_bool"]: boolean; + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + ["policy:NoBroadcastLimiter_bool"]: boolean; + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + ["policy:MaxMac_u32"]: number; + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + ["policy:MaxIP_u32"]: number; + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + ["policy:MaxUpload_u32"]: number; + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + ["policy:MaxDownload_u32"]: number; + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + ["policy:RSandRAFilter_bool"]: boolean; + /** Security policy: Filter the router advertisement packet (IPv6) */ + SecPol_RAFilter_bool: boolean; + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + ["policy:DHCPv6Filter_bool"]: boolean; + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + ["policy:DHCPv6NoServer_bool"]: boolean; + /** Security policy: Prohibit the duplicate IP address (IPv6) */ + SecPol_CheckIPv6_bool: boolean; + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + ["policy:NoServerV6_bool"]: boolean; + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + ["policy:MaxIPv6_u32"]: number; + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + ["policy:FilterIPv4_bool"]: boolean; + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + ["policy:FilterIPv6_bool"]: boolean; + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + ["policy:FilterNonIP_bool"]: boolean; + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean; + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + ["policy:VLanId_u32"]: number; + /** Security policy: Whether version 3.0 (must be true) */ + ["policy:Ver3_bool"]: boolean; + /** Constructor for the 'VpnRpcCreateLink' class: Create and set of link */ + constructor(init?: Partial); +} +/** Listener */ +export declare class VpnRpcListener { + /** Port number (Range: 1 - 65535) */ + Port_u32: number; + /** Active state */ + Enable_bool: boolean; + /** Constructor for the 'VpnRpcListener' class: Listener */ + constructor(init?: Partial); +} +/** User authentication type (server side) */ +export declare enum VpnRpcUserAuthType { + /** Anonymous authentication */ + Anonymous = 0, + /** Password authentication */ + Password = 1, + /** User certificate authentication */ + UserCert = 2, + /** Root certificate which is issued by trusted Certificate Authority */ + RootCert = 3, + /** Radius authentication */ + Radius = 4, + /** Windows NT authentication */ + NTDomain = 5 +} +/** Create, configure, and get the user */ +export declare class VpnRpcSetUser { + /** The Virtual Hub name */ + HubName_str: string; + /** Specify the user name of the user */ + Name_str: string; + /** Assigned group name for the user */ + GroupName_str: string; + /** Optional real name (full name) of the user, allow using any Unicode characters */ + Realname_utf: string; + /** Optional User Description */ + Note_utf: string; + /** Creation date and time */ + CreatedTime_dt: Date; + /** Last modified date and time */ + UpdatedTime_dt: Date; + /** Expiration date and time */ + ExpireTime_dt: Date; + /** Authentication method of the user */ + AuthType_u32: VpnRpcUserAuthType; + /** User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. */ + Auth_Password_str: string; + /** User certificate, valid only if AuthType_u32 == UserCert(2). */ + UserX_bin: Uint8Array; + /** Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). */ + Serial_bin: Uint8Array; + /** Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). */ + CommonName_utf: string; + /** Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). */ + RadiusUsername_utf: string; + /** Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). */ + NtUsername_utf: string; + /** Number of total logins of the user */ + NumLogin_u32: number; + /** Number of broadcast packets (Recv) */ + ["Recv.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Recv) */ + ["Recv.BroadcastCount_u64"]: number; + /** Unicast count (Recv) */ + ["Recv.UnicastBytes_u64"]: number; + /** Unicast bytes (Recv) */ + ["Recv.UnicastCount_u64"]: number; + /** Number of broadcast packets (Send) */ + ["Send.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Send) */ + ["Send.BroadcastCount_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastBytes_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastCount_u64"]: number; + /** The flag whether to use security policy */ + UsePolicy_bool: boolean; + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + ["policy:Access_bool"]: boolean; + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + ["policy:DHCPFilter_bool"]: boolean; + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + ["policy:DHCPNoServer_bool"]: boolean; + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + ["policy:DHCPForce_bool"]: boolean; + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + ["policy:NoBridge_bool"]: boolean; + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + ["policy:NoRouting_bool"]: boolean; + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + ["policy:CheckMac_bool"]: boolean; + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + ["policy:CheckIP_bool"]: boolean; + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + ["policy:ArpDhcpOnly_bool"]: boolean; + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + ["policy:PrivacyFilter_bool"]: boolean; + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + ["policy:NoServer_bool"]: boolean; + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + ["policy:NoBroadcastLimiter_bool"]: boolean; + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + ["policy:MonitorPort_bool"]: boolean; + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + ["policy:MaxConnection_u32"]: number; + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + ["policy:TimeOut_u32"]: number; + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + ["policy:MaxMac_u32"]: number; + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + ["policy:MaxIP_u32"]: number; + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + ["policy:MaxUpload_u32"]: number; + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + ["policy:MaxDownload_u32"]: number; + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + ["policy:FixPassword_bool"]: boolean; + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + ["policy:MultiLogins_u32"]: number; + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + ["policy:NoQoS_bool"]: boolean; + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + ["policy:RSandRAFilter_bool"]: boolean; + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + ["policy:RAFilter_bool"]: boolean; + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + ["policy:DHCPv6Filter_bool"]: boolean; + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + ["policy:DHCPv6NoServer_bool"]: boolean; + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + ["policy:NoRoutingV6_bool"]: boolean; + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + ["policy:CheckIPv6_bool"]: boolean; + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + ["policy:NoServerV6_bool"]: boolean; + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + ["policy:MaxIPv6_u32"]: number; + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + ["policy:NoSavePassword_bool"]: boolean; + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + ["policy:AutoDisconnect_u32"]: number; + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + ["policy:FilterIPv4_bool"]: boolean; + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + ["policy:FilterIPv6_bool"]: boolean; + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + ["policy:FilterNonIP_bool"]: boolean; + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean; + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: boolean; + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + ["policy:VLanId_u32"]: number; + /** Security policy: Whether version 3.0 (must be true) */ + ["policy:Ver3_bool"]: boolean; + /** Constructor for the 'VpnRpcSetUser' class: Create, configure, and get the user */ + constructor(init?: Partial); +} +/** Delete the access list */ +export declare class VpnRpcDeleteAccess { + /** The Virtual Hub name */ + HubName_str: string; + /** ID */ + Id_u32: number; + /** Constructor for the 'VpnRpcDeleteAccess' class: Delete the access list */ + constructor(init?: Partial); +} +/** Delete the CA of HUB */ +export declare class VpnRpcHubDeleteCA { + /** The Virtual Hub name */ + HubName_str: string; + /** Certificate key id to be deleted */ + Key_u32: number; + /** Constructor for the 'VpnRpcHubDeleteCA' class: Delete the CA of HUB */ + constructor(init?: Partial); +} +/** Deleting a user or group */ +export declare class VpnRpcDeleteUser { + /** The Virtual Hub name */ + HubName_str: string; + /** User or group name */ + Name_str: string; + /** Constructor for the 'VpnRpcDeleteUser' class: Deleting a user or group */ + constructor(init?: Partial); +} +/** Delete the HUB */ +export declare class VpnRpcDeleteHub { + /** The Virtual Hub name */ + HubName_str: string; + /** Constructor for the 'VpnRpcDeleteHub' class: Delete the HUB */ + constructor(init?: Partial); +} +/** Delete the table */ +export declare class VpnRpcDeleteTable { + /** The Virtual Hub name */ + HubName_str: string; + /** Key ID */ + Key_u32: number; + /** Constructor for the 'VpnRpcDeleteTable' class: Delete the table */ + constructor(init?: Partial); +} +/** Specify the Link */ +export declare class VpnRpcLink { + /** The Virtual Hub name */ + HubName_str: string; + /** The name of the cascade connection */ + AccountName_utf: string; + /** Constructor for the 'VpnRpcLink' class: Specify the Link */ + constructor(init?: Partial); +} +/** Disconnect the session */ +export declare class VpnRpcDeleteSession { + /** The Virtual Hub name */ + HubName_str: string; + /** Session name */ + Name_str: string; + /** Constructor for the 'VpnRpcDeleteSession' class: Disconnect the session */ + constructor(init?: Partial); +} +/** Specify the HUB */ +export declare class VpnRpcHub { + /** The Virtual Hub name */ + HubName_str: string; + /** Constructor for the 'VpnRpcHub' class: Specify the HUB */ + constructor(init?: Partial); +} +/** Disconnect a connection */ +export declare class VpnRpcDisconnectConnection { + /** Connection name */ + Name_str: string; + /** Constructor for the 'VpnRpcDisconnectConnection' class: Disconnect a connection */ + constructor(init?: Partial); +} +/** Enumeration of the access list */ +export declare class VpnRpcEnumAccessList { + /** The Virtual Hub name */ + HubName_str: string; + /** Access list */ + AccessList: VpnAccess[]; + /** Constructor for the 'VpnRpcEnumAccessList' class: Enumeration of the access list */ + constructor(init?: Partial); +} +/** CA enumeration items of HUB */ +export declare class VpnRpcHubEnumCAItem { + /** The key id of the item */ + Key_u32: number; + /** Subject */ + SubjectName_utf: string; + /** Issuer */ + IssuerName_utf: string; + /** Expiration date */ + Expires_dt: Date; + /** Constructor for the 'VpnRpcHubEnumCAItem' class: CA enumeration items of HUB */ + constructor(init?: Partial); +} +/** CA enumeration of HUB */ +export declare class VpnRpcHubEnumCA { + /** The Virtual Hub name */ + HubName_str: string; + /** The list of CA */ + CAList: VpnRpcHubEnumCAItem[]; + /** Constructor for the 'VpnRpcHubEnumCA' class: CA enumeration of HUB */ + constructor(init?: Partial); +} +/** Type of connection */ +export declare enum VpnRpcConnectionType { + /** VPN Client */ + Client = 0, + /** During initialization */ + Init = 1, + /** Login connection */ + Login = 2, + /** Additional connection */ + Additional = 3, + /** RPC for server farm */ + FarmRpc = 4, + /** RPC for Management */ + AdminRpc = 5, + /** HUB enumeration */ + EnumHub = 6, + /** Password change */ + Password = 7, + /** SSTP */ + SSTP = 8, + /** OpenVPN */ + OpenVPN = 9 +} +/** Connection enumeration items */ +export declare class VpnRpcEnumConnectionItem { + /** Connection name */ + Name_str: string; + /** Host name */ + Hostname_str: string; + /** IP address */ + Ip_ip: string; + /** Port number */ + Port_u32: number; + /** Connected time */ + ConnectedTime_dt: Date; + /** Connection type */ + Type_u32: VpnRpcConnectionType; + /** Constructor for the 'VpnRpcEnumConnectionItem' class: Connection enumeration items */ + constructor(init?: Partial); +} +/** Connection enumeration */ +export declare class VpnRpcEnumConnection { + /** Number of connections */ + NumConnection_u32: number; + /** Connection list */ + ConnectionList: VpnRpcEnumConnectionItem[]; + /** Constructor for the 'VpnRpcEnumConnection' class: Connection enumeration */ + constructor(init?: Partial); +} +/** Enum CRL Item */ +export declare class VpnRpcEnumCrlItem { + /** Key ID */ + Key_u32: number; + /** The contents of the CRL item */ + CrlInfo_utf: string; + /** Constructor for the 'VpnRpcEnumCrlItem' class: Enum CRL Item */ + constructor(init?: Partial); +} +/** Enum CRL */ +export declare class VpnRpcEnumCrl { + /** The Virtual Hub name */ + HubName_str: string; + /** CRL list */ + CRLList: VpnRpcEnumCrlItem[]; + /** Constructor for the 'VpnRpcEnumCrl' class: Enum CRL */ + constructor(init?: Partial); +} +/** RPC_ENUM_DHCP_ITEM */ +export declare class VpnRpcEnumDhcpItem { + /** ID */ + Id_u32: number; + /** Lease time */ + LeasedTime_dt: Date; + /** Expiration date */ + ExpireTime_dt: Date; + /** MAC address */ + MacAddress_bin: Uint8Array; + /** IP address */ + IpAddress_ip: string; + /** Subnet mask */ + Mask_u32: number; + /** Host name */ + Hostname_str: string; + /** Constructor for the 'VpnRpcEnumDhcpItem' class: RPC_ENUM_DHCP_ITEM */ + constructor(init?: Partial); +} +/** RPC_ENUM_DHCP */ +export declare class VpnRpcEnumDhcp { + /** Virtual Hub Name */ + HubName_str: string; + /** DHCP Item */ + DhcpTable: VpnRpcEnumDhcpItem[]; + /** Constructor for the 'VpnRpcEnumDhcp' class: RPC_ENUM_DHCP */ + constructor(init?: Partial); +} +/** EtherIP setting list */ +export declare class VpnRpcEnumEtherIpId { + /** Setting list */ + Settings: VpnEtherIpId[]; + /** Constructor for the 'VpnRpcEnumEtherIpId' class: EtherIP setting list */ + constructor(init?: Partial); +} +/** Ethernet Network Adapters list item */ +export declare class VpnRpcEnumEthItem { + /** Device name */ + DeviceName_str: string; + /** Network connection name (description) */ + NetworkConnectionName_utf: string; + /** Constructor for the 'VpnRpcEnumEthItem' class: Ethernet Network Adapters list item */ + constructor(init?: Partial); +} +/** Ethernet Network Adapters list */ +export declare class VpnRpcEnumEth { + /** Ethernet Network Adapters list */ + EthList: VpnRpcEnumEthItem[]; + /** Constructor for the 'VpnRpcEnumEth' class: Ethernet Network Adapters list */ + constructor(init?: Partial); +} +/** Server farm members enumeration items */ +export declare class VpnRpcEnumFarmItem { + /** ID */ + Id_u32: number; + /** Controller */ + Controller_bool: boolean; + /** Connection time */ + ConnectedTime_dt: Date; + /** IP address */ + Ip_ip: string; + /** Host name */ + Hostname_str: string; + /** Point */ + Point_u32: number; + /** Number of sessions */ + NumSessions_u32: number; + /** Number of TCP connections */ + NumTcpConnections_u32: number; + /** Number of HUBs */ + NumHubs_u32: number; + /** Number of assigned client licenses */ + AssignedClientLicense_u32: number; + /** Number of assigned bridge licenses */ + AssignedBridgeLicense_u32: number; + /** Constructor for the 'VpnRpcEnumFarmItem' class: Server farm members enumeration items */ + constructor(init?: Partial); +} +/** Server farm member enumeration */ +export declare class VpnRpcEnumFarm { + /** Number of Cluster Members */ + NumFarm_u32: number; + /** Cluster Members list */ + FarmMemberList: VpnRpcEnumFarmItem[]; + /** Constructor for the 'VpnRpcEnumFarm' class: Server farm member enumeration */ + constructor(init?: Partial); +} +/** Enumeration items in the group */ +export declare class VpnRpcEnumGroupItem { + /** User name */ + Name_str: string; + /** Real name */ + Realname_utf: string; + /** Note */ + Note_utf: string; + /** Number of users */ + NumUsers_u32: number; + /** Access denied */ + DenyAccess_bool: boolean; + /** Constructor for the 'VpnRpcEnumGroupItem' class: Enumeration items in the group */ + constructor(init?: Partial); +} +/** Group enumeration */ +export declare class VpnRpcEnumGroup { + /** The Virtual Hub name */ + HubName_str: string; + /** Group list */ + GroupList: VpnRpcEnumGroupItem[]; + /** Constructor for the 'VpnRpcEnumGroup' class: Group enumeration */ + constructor(init?: Partial); +} +/** Enumeration items of HUB */ +export declare class VpnRpcEnumHubItem { + /** The name of the Virtual Hub */ + HubName_str: string; + /** Online state */ + Online_bool: boolean; + /** Type of HUB (Valid only for Clustered VPN Servers) */ + HubType_u32: VpnRpcHubType; + /** Number of users */ + NumUsers_u32: number; + /** Number of registered groups */ + NumGroups_u32: number; + /** Number of registered sessions */ + NumSessions_u32: number; + /** Number of current MAC table entries */ + NumMacTables_u32: number; + /** Number of current IP table entries */ + NumIpTables_u32: number; + /** Last communication date and time */ + LastCommTime_dt: Date; + /** Last login date and time */ + LastLoginTime_dt: Date; + /** Creation date and time */ + CreatedTime_dt: Date; + /** Number of accumulated logins */ + NumLogin_u32: number; + /** Whether the traffic information is provided */ + IsTrafficFilled_bool: boolean; + /** Number of broadcast packets (Recv) */ + ["Ex.Recv.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Recv) */ + ["Ex.Recv.BroadcastCount_u64"]: number; + /** Unicast count (Recv) */ + ["Ex.Recv.UnicastBytes_u64"]: number; + /** Unicast bytes (Recv) */ + ["Ex.Recv.UnicastCount_u64"]: number; + /** Number of broadcast packets (Send) */ + ["Ex.Send.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Send) */ + ["Ex.Send.BroadcastCount_u64"]: number; + /** Unicast bytes (Send) */ + ["Ex.Send.UnicastBytes_u64"]: number; + /** Unicast bytes (Send) */ + ["Ex.Send.UnicastCount_u64"]: number; + /** Constructor for the 'VpnRpcEnumHubItem' class: Enumeration items of HUB */ + constructor(init?: Partial); +} +/** Enumeration of HUB */ +export declare class VpnRpcEnumHub { + /** Number of Virtual Hubs */ + NumHub_u32: number; + /** Virtual Hubs */ + HubList: VpnRpcEnumHubItem[]; + /** Constructor for the 'VpnRpcEnumHub' class: Enumeration of HUB */ + constructor(init?: Partial); +} +/** Enumeration items of IP table */ +export declare class VpnRpcEnumIpTableItem { + /** Key ID */ + Key_u32: number; + /** Session name */ + SessionName_str: string; + /** IP address */ + IpAddress_ip: string; + /** Assigned by the DHCP */ + DhcpAllocated_bool: boolean; + /** Creation date and time */ + CreatedTime_dt: Date; + /** Updating date */ + UpdatedTime_dt: Date; + /** Remote items */ + RemoteItem_bool: boolean; + /** Remote host name */ + RemoteHostname_str: string; + /** Constructor for the 'VpnRpcEnumIpTableItem' class: Enumeration items of IP table */ + constructor(init?: Partial); +} +/** Enumeration of IP table */ +export declare class VpnRpcEnumIpTable { + /** The Virtual Hub name */ + HubName_str: string; + /** MAC table */ + IpTable: VpnRpcEnumIpTableItem[]; + /** Constructor for the 'VpnRpcEnumIpTable' class: Enumeration of IP table */ + constructor(init?: Partial); +} +/** Layer-3 interface enumeration */ +export declare class VpnRpcEnumL3If { + /** Layer-3 switch name */ + Name_str: string; + /** Layer-3 interface list */ + L3IFList: VpnRpcL3If[]; + /** Constructor for the 'VpnRpcEnumL3If' class: Layer-3 interface enumeration */ + constructor(init?: Partial); +} +/** Layer-3 switch enumeration item */ +export declare class VpnRpcEnumL3SwItem { + /** Name of the layer-3 switch */ + Name_str: string; + /** Number of layer-3 switch virtual interfaces */ + NumInterfaces_u32: number; + /** Number of routing tables */ + NumTables_u32: number; + /** Activated flag */ + Active_bool: boolean; + /** Online flag */ + Online_bool: boolean; + /** Constructor for the 'VpnRpcEnumL3SwItem' class: Layer-3 switch enumeration item */ + constructor(init?: Partial); +} +/** Layer-3 switch enumeration */ +export declare class VpnRpcEnumL3Sw { + /** Layer-3 switch list */ + L3SWList: VpnRpcEnumL3SwItem[]; + /** Constructor for the 'VpnRpcEnumL3Sw' class: Layer-3 switch enumeration */ + constructor(init?: Partial); +} +/** Routing table enumeration */ +export declare class VpnRpcEnumL3Table { + /** L3 switch name */ + Name_str: string; + /** Routing table item list */ + L3Table: VpnRpcL3Table[]; + /** Constructor for the 'VpnRpcEnumL3Table' class: Routing table enumeration */ + constructor(init?: Partial); +} +/** Cascade Connection Enumeration */ +export declare class VpnRpcEnumLinkItem { + /** The name of cascade connection */ + AccountName_utf: string; + /** Online flag */ + Online_bool: boolean; + /** The flag indicates whether the cascade connection is established */ + Connected_bool: boolean; + /** The error last occurred if the cascade connection is in the fail state */ + LastError_u32: number; + /** Connection completion time */ + ConnectedTime_dt: Date; + /** Host name of the destination VPN server */ + Hostname_str: string; + /** The Virtual Hub name */ + TargetHubName_str: string; + /** Constructor for the 'VpnRpcEnumLinkItem' class: Cascade Connection Enumeration */ + constructor(init?: Partial); +} +/** Enumeration of the link */ +export declare class VpnRpcEnumLink { + /** The Virtual Hub name */ + HubName_str: string; + /** Number of cascade connections */ + NumLink_u32: number; + /** The list of cascade connections */ + LinkList: VpnRpcEnumLinkItem[]; + /** Constructor for the 'VpnRpcEnumLink' class: Enumeration of the link */ + constructor(init?: Partial); +} +/** List of listeners item */ +export declare class VpnRpcListenerListItem { + /** TCP port number (range: 1 - 65535) */ + Ports_u32: number; + /** Active state */ + Enables_bool: boolean; + /** The flag to indicate if the error occurred on the listener port */ + Errors_bool: boolean; + /** Constructor for the 'VpnRpcListenerListItem' class: List of listeners item */ + constructor(init?: Partial); +} +/** List of listeners */ +export declare class VpnRpcListenerList { + /** List of listener items */ + ListenerList: VpnRpcListenerListItem[]; + /** Constructor for the 'VpnRpcListenerList' class: List of listeners */ + constructor(init?: Partial); +} +/** Local Bridge enumeration */ +export declare class VpnRpcEnumLocalBridge { + /** Local Bridge list */ + LocalBridgeList: VpnRpcLocalBridge[]; + /** Constructor for the 'VpnRpcEnumLocalBridge' class: Local Bridge enumeration */ + constructor(init?: Partial); +} +/** Log file enumeration */ +export declare class VpnRpcEnumLogFileItem { + /** Server name */ + ServerName_str: string; + /** File path */ + FilePath_str: string; + /** File size */ + FileSize_u32: number; + /** Last write date */ + UpdatedTime_dt: Date; + /** Constructor for the 'VpnRpcEnumLogFileItem' class: Log file enumeration */ + constructor(init?: Partial); +} +/** Log file enumeration */ +export declare class VpnRpcEnumLogFile { + /** Log file list */ + LogFiles: VpnRpcEnumLogFileItem[]; + /** Constructor for the 'VpnRpcEnumLogFile' class: Log file enumeration */ + constructor(init?: Partial); +} +/** Enumeration items of the MAC table */ +export declare class VpnRpcEnumMacTableItem { + /** Key ID */ + Key_u32: number; + /** Session name */ + SessionName_str: string; + /** MAC address */ + MacAddress_bin: Uint8Array; + /** Creation date and time */ + CreatedTime_dt: Date; + /** Updating date */ + UpdatedTime_dt: Date; + /** Remote items */ + RemoteItem_bool: boolean; + /** Remote host name */ + RemoteHostname_str: string; + /** VLAN ID */ + VlanId_u32: number; + /** Constructor for the 'VpnRpcEnumMacTableItem' class: Enumeration items of the MAC table */ + constructor(init?: Partial); +} +/** Enumeration of the MAC table */ +export declare class VpnRpcEnumMacTable { + /** The Virtual Hub name */ + HubName_str: string; + /** MAC table */ + MacTable: VpnRpcEnumMacTableItem[]; + /** Constructor for the 'VpnRpcEnumMacTable' class: Enumeration of the MAC table */ + constructor(init?: Partial); +} +/** NAT Entry Protocol Number */ +export declare enum VpnRpcNatProtocol { + /** TCP */ + TCP = 0, + /** UDP */ + UDP = 1, + /** DNS */ + DNS = 2, + /** ICMP */ + ICMP = 3 +} +/** State of NAT session (TCP) */ +export declare enum VpnRpcNatTcpState { + /** Connecting */ + Connecting = 0, + /** Send the RST (Connection failure or disconnected) */ + SendReset = 1, + /** Connection complete */ + Connected = 2, + /** Connection established */ + Established = 3, + /** Wait for socket disconnection */ + WaitDisconnect = 4 +} +/** VpnRpcEnumNat List Item */ +export declare class VpnRpcEnumNatItem { + /** ID */ + Id_u32: number; + /** Protocol */ + Protocol_u32: VpnRpcNatProtocol; + /** Source IP address */ + SrcIp_ip: string; + /** Source host name */ + SrcHost_str: string; + /** Source port number */ + SrcPort_u32: number; + /** Destination IP address */ + DestIp_ip: string; + /** Destination host name */ + DestHost_str: string; + /** Destination port number */ + DestPort_u32: number; + /** Connection time */ + CreatedTime_dt: Date; + /** Last communication time */ + LastCommTime_dt: Date; + /** Transmission size */ + SendSize_u64: number; + /** Receive size */ + RecvSize_u64: number; + /** TCP state */ + TcpStatus_u32: VpnRpcNatTcpState; + /** Constructor for the 'VpnRpcEnumNatItem' class: VpnRpcEnumNat List Item */ + constructor(init?: Partial); +} +/** RPC_ENUM_NAT */ +export declare class VpnRpcEnumNat { + /** Virtual Hub Name */ + HubName_str: string; + /** NAT item */ + NatTable: VpnRpcEnumNatItem[]; + /** Constructor for the 'VpnRpcEnumNat' class: RPC_ENUM_NAT */ + constructor(init?: Partial); +} +/** Enumeration item of VPN session */ +export declare class VpnRpcEnumSessionItem { + /** Session name */ + Name_str: string; + /** Remote session */ + RemoteSession_bool: boolean; + /** Remote server name */ + RemoteHostname_str: string; + /** User name */ + Username_str: string; + /** IP address */ + ClientIP_ip: string; + /** Host name */ + Hostname_str: string; + /** Maximum number of underlying TCP connections */ + MaxNumTcp_u32: number; + /** Number of current underlying TCP connections */ + CurrentNumTcp_u32: number; + /** Packet size transmitted */ + PacketSize_u64: number; + /** Number of packets transmitted */ + PacketNum_u64: number; + /** Is a Cascade VPN session */ + LinkMode_bool: boolean; + /** Is a SecureNAT VPN session */ + SecureNATMode_bool: boolean; + /** Is the VPN session for Local Bridge */ + BridgeMode_bool: boolean; + /** Is a Layer-3 Switch VPN session */ + Layer3Mode_bool: boolean; + /** Is in Bridge Mode */ + Client_BridgeMode_bool: boolean; + /** Is in Monitor Mode */ + Client_MonitorMode_bool: boolean; + /** VLAN ID */ + VLanId_u32: number; + /** Unique ID of the VPN Session */ + UniqueId_bin: Uint8Array; + /** Creation date and time */ + CreatedTime_dt: Date; + /** Last communication date and time */ + LastCommTime_dt: Date; + /** Constructor for the 'VpnRpcEnumSessionItem' class: Enumeration item of VPN session */ + constructor(init?: Partial); +} +/** Enumerate VPN sessions */ +export declare class VpnRpcEnumSession { + /** The Virtual Hub name */ + HubName_str: string; + /** VPN sessions list */ + SessionList: VpnRpcEnumSessionItem[]; + /** Constructor for the 'VpnRpcEnumSession' class: Enumerate VPN sessions */ + constructor(init?: Partial); +} +/** Enumeration item of user */ +export declare class VpnRpcEnumUserItem { + /** User name */ + Name_str: string; + /** Group name */ + GroupName_str: string; + /** Real name */ + Realname_utf: string; + /** Note */ + Note_utf: string; + /** Authentication method */ + AuthType_u32: VpnRpcUserAuthType; + /** Number of logins */ + NumLogin_u32: number; + /** Last login date and time */ + LastLoginTime_dt: Date; + /** Access denied */ + DenyAccess_bool: boolean; + /** Flag of whether the traffic variable is set */ + IsTrafficFilled_bool: boolean; + /** Flag of whether expiration date variable is set */ + IsExpiresFilled_bool: boolean; + /** Expiration date */ + Expires_dt: Date; + /** Number of broadcast packets (Recv) */ + ["Ex.Recv.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Recv) */ + ["Ex.Recv.BroadcastCount_u64"]: number; + /** Unicast count (Recv) */ + ["Ex.Recv.UnicastBytes_u64"]: number; + /** Unicast bytes (Recv) */ + ["Ex.Recv.UnicastCount_u64"]: number; + /** Number of broadcast packets (Send) */ + ["Ex.Send.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Send) */ + ["Ex.Send.BroadcastCount_u64"]: number; + /** Unicast bytes (Send) */ + ["Ex.Send.UnicastBytes_u64"]: number; + /** Unicast bytes (Send) */ + ["Ex.Send.UnicastCount_u64"]: number; + /** Constructor for the 'VpnRpcEnumUserItem' class: Enumeration item of user */ + constructor(init?: Partial); +} +/** Enumeration of user */ +export declare class VpnRpcEnumUser { + /** The Virtual Hub name */ + HubName_str: string; + /** User list */ + UserList: VpnRpcEnumUserItem[]; + /** Constructor for the 'VpnRpcEnumUser' class: Enumeration of user */ + constructor(init?: Partial); +} +/** Source IP Address Limit List Item */ +export declare class VpnAc { + /** ID */ + Id_u32: number; + /** Priority */ + Priority_u32: number; + /** Deny access */ + Deny_bool: boolean; + /** Set true if you want to specify the SubnetMask_ip item. */ + Masked_bool: boolean; + /** IP address */ + IpAddress_ip: string; + /** Subnet mask, valid only if Masked_bool == true */ + SubnetMask_ip: string; + /** Constructor for the 'VpnAc' class: Source IP Address Limit List Item */ + constructor(init?: Partial); +} +/** Source IP Address Limit List */ +export declare class VpnRpcAcList { + /** The Virtual Hub name */ + HubName_str: string; + /** Source IP Address Limit List */ + ACList: VpnAc[]; + /** Constructor for the 'VpnRpcAcList' class: Source IP Address Limit List */ + constructor(init?: Partial); +} +/** Message */ +export declare class VpnRpcMsg { + /** The Virtual Hub name */ + HubName_str: string; + /** Message (Unicode strings acceptable) */ + Msg_bin: Uint8Array; + /** Constructor for the 'VpnRpcMsg' class: Message */ + constructor(init?: Partial); +} +/** Get / Set the Azure state */ +export declare class VpnRpcAzureStatus { + /** Whether VPN Azure Function is Enabled */ + IsEnabled_bool: boolean; + /** Whether connection to VPN Azure Cloud Server is established */ + IsConnected_bool: boolean; + /** Constructor for the 'VpnRpcAzureStatus' class: Get / Set the Azure state */ + constructor(init?: Partial); +} +/** Local Bridge support information */ +export declare class VpnRpcBridgeSupport { + /** Whether the OS supports the Local Bridge function */ + IsBridgeSupportedOs_bool: boolean; + /** Whether WinPcap is necessary to install */ + IsWinPcapNeeded_bool: boolean; + /** Constructor for the 'VpnRpcBridgeSupport' class: Local Bridge support information */ + constructor(init?: Partial); +} +/** Get the CA of HUB */ +export declare class VpnRpcHubGetCA { + /** The Virtual Hub name */ + HubName_str: string; + /** The key id of the certificate */ + Key_u32: number; + /** The body of the X.509 certificate */ + Cert_bin: Uint8Array; + /** Constructor for the 'VpnRpcHubGetCA' class: Get the CA of HUB */ + constructor(init?: Partial); +} +/** Caps item of the VPN Server */ +export declare class VpnCaps { + /** Name */ + CapsName_str: string; + /** Value */ + CapsValue_u32: number; + /** Descrption */ + CapsDescrption_utf: string; + /** Constructor for the 'VpnCaps' class: Caps item of the VPN Server */ + constructor(init?: Partial); +} +/** Caps list of the VPN Server */ +export declare class VpnCapslist { + /** Caps list of the VPN Server */ + CapsList: VpnCaps[]; + /** Constructor for the 'VpnCapslist' class: Caps list of the VPN Server */ + constructor(init?: Partial); +} +/** Config operation */ +export declare class VpnRpcConfig { + /** File name (valid only for returning from the server) */ + FileName_str: string; + /** File data */ + FileData_bin: Uint8Array; + /** Constructor for the 'VpnRpcConfig' class: Config operation */ + constructor(init?: Partial); +} +/** Connection information */ +export declare class VpnRpcConnectionInfo { + /** Connection name */ + Name_str: string; + /** Type */ + Type_u32: VpnRpcConnectionType; + /** Host name */ + Hostname_str: string; + /** IP address */ + Ip_ip: string; + /** Port number */ + Port_u32: number; + /** Connected time */ + ConnectedTime_dt: Date; + /** Server string */ + ServerStr_str: string; + /** Server version */ + ServerVer_u32: number; + /** Server build number */ + ServerBuild_u32: number; + /** Client string */ + ClientStr_str: string; + /** Client version */ + ClientVer_u32: number; + /** Client build number */ + ClientBuild_u32: number; + /** Constructor for the 'VpnRpcConnectionInfo' class: Connection information */ + constructor(init?: Partial); +} +/** Proxy type */ +export declare enum VpnRpcProxyType { + /** Direct TCP connection */ + Direct = 0, + /** Connection via HTTP proxy server */ + HTTP = 1, + /** Connection via SOCKS proxy server */ + SOCKS = 2 +} +/** The current status of the DDNS */ +export declare class VpnDDnsClientStatus { + /** Last error code (IPv4) */ + Err_IPv4_u32: number; + /** Last error string (IPv4) */ + ErrStr_IPv4_utf: string; + /** Last error code (IPv6) */ + Err_IPv6_u32: number; + /** Last error string (IPv6) */ + ErrStr_IPv6_utf: string; + /** Current DDNS host name */ + CurrentHostName_str: string; + /** Current FQDN of the DDNS hostname */ + CurrentFqdn_str: string; + /** DDNS suffix */ + DnsSuffix_str: string; + /** Current IPv4 address of the VPN Server */ + CurrentIPv4_str: string; + /** Current IPv6 address of the VPN Server */ + CurrentIPv6_str: string; + /** Constructor for the 'VpnDDnsClientStatus' class: The current status of the DDNS */ + constructor(init?: Partial); +} +/** Internet connection settings */ +export declare class VpnInternetSetting { + /** Type of proxy server */ + ProxyType_u32: VpnRpcProxyType; + /** Proxy server host name */ + ProxyHostName_str: string; + /** Proxy server port number */ + ProxyPort_u32: number; + /** Proxy server user name */ + ProxyUsername_str: string; + /** Proxy server password */ + ProxyPassword_str: string; + /** Constructor for the 'VpnInternetSetting' class: Internet connection settings */ + constructor(init?: Partial); +} +/** Administration options */ +export declare class VpnAdminOption { + /** Name */ + Name_str: string; + /** Data */ + Value_u32: number; + /** Descrption */ + Descrption_utf: string; + /** Constructor for the 'VpnAdminOption' class: Administration options */ + constructor(init?: Partial); +} +/** Administration options list */ +export declare class VpnRpcAdminOption { + /** Virtual HUB name */ + HubName_str: string; + /** List data */ + AdminOptionList: VpnAdminOption[]; + /** Constructor for the 'VpnRpcAdminOption' class: Administration options list */ + constructor(init?: Partial); +} +/** Connection state to the controller */ +export declare class VpnRpcFarmConnectionStatus { + /** IP address */ + Ip_ip: string; + /** Port number */ + Port_u32: number; + /** Online state */ + Online_bool: boolean; + /** Last error code */ + LastError_u32: number; + /** Connection start time */ + StartedTime_dt: Date; + /** First connection time */ + FirstConnectedTime_dt: Date; + /** Connection time of this time */ + CurrentConnectedTime_dt: Date; + /** Number of retries */ + NumTry_u32: number; + /** Number of connection count */ + NumConnected_u32: number; + /** Connection failure count */ + NumFailed_u32: number; + /** Constructor for the 'VpnRpcFarmConnectionStatus' class: Connection state to the controller */ + constructor(init?: Partial); +} +/** HUB item of each farm member */ +export declare class VpnRpcFarmHub { + /** The Virtual Hub name */ + HubName_str: string; + /** Dynamic HUB */ + DynamicHub_bool: boolean; + /** Constructor for the 'VpnRpcFarmHub' class: HUB item of each farm member */ + constructor(init?: Partial); +} +/** Server farm member information acquisition */ +export declare class VpnRpcFarmInfo { + /** ID */ + Id_u32: number; + /** The flag if the server is Cluster Controller (false: Cluster Member servers) */ + Controller_bool: boolean; + /** Connection Established Time */ + ConnectedTime_dt: Date; + /** IP address */ + Ip_ip: string; + /** Host name */ + Hostname_str: string; + /** Point */ + Point_u32: number; + /** Number of Public Ports */ + NumPort_u32: number; + /** Public Ports */ + Ports_u32: number[]; + /** Server certificate */ + ServerCert_bin: Uint8Array; + /** Number of farm HUB */ + NumFarmHub_u32: number; + /** The hosted Virtual Hub list */ + HubsList: VpnRpcFarmHub[]; + /** Number of hosted VPN sessions */ + NumSessions_u32: number; + /** Number of TCP connections */ + NumTcpConnections_u32: number; + /** Performance Standard Ratio */ + Weight_u32: number; + /** Constructor for the 'VpnRpcFarmInfo' class: Server farm member information acquisition */ + constructor(init?: Partial); +} +/** Server farm configuration */ +export declare class VpnRpcFarm { + /** Type of server */ + ServerType_u32: VpnRpcServerType; + /** Valid only for Cluster Member servers. Number of the Ports_u32 element. */ + NumPort_u32: number; + /** Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. */ + Ports_u32: number[]; + /** Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. */ + PublicIp_ip: string; + /** Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. */ + ControllerName_str: string; + /** Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. */ + ControllerPort_u32: number; + /** Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. */ + MemberPasswordPlaintext_str: string; + /** This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. */ + Weight_u32: number; + /** Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. */ + ControllerOnly_bool: boolean; + /** Constructor for the 'VpnRpcFarm' class: Server farm configuration */ + constructor(init?: Partial); +} +/** Log switch type */ +export declare enum VpnRpcLogSwitchType { + /** No switching */ + No = 0, + /** Secondly basis */ + Second = 1, + /** Minutely basis */ + Minute = 2, + /** Hourly basis */ + Hour = 3, + /** Daily basis */ + Day = 4, + /** Monthly basis */ + Month = 5 +} +/** Packet log settings */ +export declare enum VpnRpcPacketLogSetting { + /** Not save */ + None = 0, + /** Only header */ + Header = 1, + /** All payloads */ + All = 2 +} +/** Packet log settings array index */ +export declare enum VpnRpcPacketLogSettingIndex { + /** TCP connection log */ + TcpConnection = 0, + /** TCP packet log */ + TcpAll = 1, + /** DHCP Log */ + Dhcp = 2, + /** UDP log */ + Udp = 3, + /** ICMP log */ + Icmp = 4, + /** IP log */ + Ip = 5, + /** ARP log */ + Arp = 6, + /** Ethernet log */ + Ethernet = 7 +} +/** HUB log settings */ +export declare class VpnRpcHubLog { + /** The Virtual Hub name */ + HubName_str: string; + /** The flag to enable / disable saving the security log */ + SaveSecurityLog_bool: boolean; + /** The log filename switching setting of the security log */ + SecurityLogSwitchType_u32: VpnRpcLogSwitchType; + /** The flag to enable / disable saving the security log */ + SavePacketLog_bool: boolean; + /** The log filename switching settings of the packet logs */ + PacketLogSwitchType_u32: VpnRpcLogSwitchType; + /** Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7. */ + PacketLogConfig_u32: VpnRpcPacketLogSetting[]; + /** Constructor for the 'VpnRpcHubLog' class: HUB log settings */ + constructor(init?: Partial); +} +/** RADIUS server options */ +export declare class VpnRpcRadius { + /** The Virtual Hub name */ + HubName_str: string; + /** RADIUS server name */ + RadiusServerName_str: string; + /** RADIUS port number */ + RadiusPort_u32: number; + /** Secret key */ + RadiusSecret_str: string; + /** Radius retry interval */ + RadiusRetryInterval_u32: number; + /** Constructor for the 'VpnRpcRadius' class: RADIUS server options */ + constructor(init?: Partial); +} +/** Get the state HUB */ +export declare class VpnRpcHubStatus { + /** The Virtual Hub name */ + HubName_str: string; + /** Online */ + Online_bool: boolean; + /** Type of HUB */ + HubType_u32: VpnRpcHubType; + /** Number of sessions */ + NumSessions_u32: number; + /** Number of sessions (client mode) */ + NumSessionsClient_u32: number; + /** Number of sessions (bridge mode) */ + NumSessionsBridge_u32: number; + /** Number of Access list entries */ + NumAccessLists_u32: number; + /** Number of users */ + NumUsers_u32: number; + /** Number of groups */ + NumGroups_u32: number; + /** Number of MAC table entries */ + NumMacTables_u32: number; + /** Number of IP table entries */ + NumIpTables_u32: number; + /** Number of broadcast packets (Recv) */ + ["Recv.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Recv) */ + ["Recv.BroadcastCount_u64"]: number; + /** Unicast count (Recv) */ + ["Recv.UnicastBytes_u64"]: number; + /** Unicast bytes (Recv) */ + ["Recv.UnicastCount_u64"]: number; + /** Number of broadcast packets (Send) */ + ["Send.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Send) */ + ["Send.BroadcastCount_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastBytes_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastCount_u64"]: number; + /** Whether SecureNAT is enabled */ + SecureNATEnabled_bool: boolean; + /** Last communication date and time */ + LastCommTime_dt: Date; + /** Last login date and time */ + LastLoginTime_dt: Date; + /** Creation date and time */ + CreatedTime_dt: Date; + /** Number of logins */ + NumLogin_u32: number; + /** Constructor for the 'VpnRpcHubStatus' class: Get the state HUB */ + constructor(init?: Partial); +} +/** List of services provided by IPsec server */ +export declare class VpnIPsecServices { + /** Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. */ + L2TP_Raw_bool: boolean; + /** Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. */ + L2TP_IPsec_bool: boolean; + /** Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. */ + EtherIP_IPsec_bool: boolean; + /** Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. */ + IPsec_Secret_str: string; + /** Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. */ + L2TP_DefaultHub_str: string; + /** Constructor for the 'VpnIPsecServices' class: List of services provided by IPsec server */ + constructor(init?: Partial); +} +/** Keep alive protocol */ +export declare enum VpnRpcKeepAliveProtocol { + /** TCP */ + TCP = 0, + /** UDP */ + UDP = 1 +} +/** Keep Alive settings */ +export declare class VpnRpcKeep { + /** The flag to enable keep-alive to the Internet */ + UseKeepConnect_bool: boolean; + /** Specify the host name or IP address of the destination */ + KeepConnectHost_str: string; + /** Specify the port number of the destination */ + KeepConnectPort_u32: number; + /** Protocol type */ + KeepConnectProtocol_u32: VpnRpcKeepAliveProtocol; + /** Interval Between Packets Sends (Seconds) */ + KeepConnectInterval_u32: number; + /** Constructor for the 'VpnRpcKeep' class: Keep Alive settings */ + constructor(init?: Partial); +} +/** State of the client session */ +export declare enum VpnRpcClientSessionStatus { + /** Connecting */ + Connecting = 0, + /** Negotiating */ + Negotiation = 1, + /** During user authentication */ + Auth = 2, + /** Connection complete */ + Established = 3, + /** Wait to retry */ + Retry = 4, + /** Idle state */ + Idle = 5 +} +/** Get the link state */ +export declare class VpnRpcLinkStatus { + /** The Virtual Hub name */ + HubName_Ex_str: string; + /** The name of the cascade connection */ + AccountName_utf: string; + /** The flag whether the cascade connection is enabled */ + Active_bool: boolean; + /** The flag whether the cascade connection is established */ + Connected_bool: boolean; + /** The session status */ + SessionStatus_u32: VpnRpcClientSessionStatus; + /** The destination VPN server name */ + ServerName_str: string; + /** The port number of the server */ + ServerPort_u32: number; + /** Server product name */ + ServerProductName_str: string; + /** Server product version */ + ServerProductVer_u32: number; + /** Server product build number */ + ServerProductBuild_u32: number; + /** Server's X.509 certificate */ + ServerX_bin: Uint8Array; + /** Client certificate */ + ClientX_bin: Uint8Array; + /** Connection start time */ + StartTime_dt: Date; + /** Connection completion time of the first connection */ + FirstConnectionEstablisiedTime_dt: Date; + /** Connection completion time of this connection */ + CurrentConnectionEstablishTime_dt: Date; + /** Number of connections have been established so far */ + NumConnectionsEatablished_u32: number; + /** Half-connection */ + HalfConnection_bool: boolean; + /** VoIP / QoS */ + QoS_bool: boolean; + /** Maximum number of the underlying TCP connections */ + MaxTcpConnections_u32: number; + /** Number of current underlying TCP connections */ + NumTcpConnections_u32: number; + /** Number of underlying inbound TCP connections */ + NumTcpConnectionsUpload_u32: number; + /** Number of underlying outbound TCP connections */ + NumTcpConnectionsDownload_u32: number; + /** Use of encryption */ + UseEncrypt_bool: boolean; + /** Cipher algorithm name */ + CipherName_str: string; + /** Use of compression */ + UseCompress_bool: boolean; + /** The flag whether this is a R-UDP session */ + IsRUDPSession_bool: boolean; + /** Underlying physical communication protocol */ + UnderlayProtocol_str: string; + /** The UDP acceleration is enabled */ + IsUdpAccelerationEnabled_bool: boolean; + /** The UDP acceleration is being actually used */ + IsUsingUdpAcceleration_bool: boolean; + /** Session name */ + SessionName_str: string; + /** Connection name */ + ConnectionName_str: string; + /** Session key */ + SessionKey_bin: Uint8Array; + /** Total transmitted data size */ + TotalSendSize_u64: number; + /** Total received data size */ + TotalRecvSize_u64: number; + /** Total transmitted data size (no compression) */ + TotalSendSizeReal_u64: number; + /** Total received data size (no compression) */ + TotalRecvSizeReal_u64: number; + /** The flag whether the VPN session is Bridge Mode */ + IsBridgeMode_bool: boolean; + /** The flag whether the VPN session is Monitor mode */ + IsMonitorMode_bool: boolean; + /** VLAN ID */ + VLanId_u32: number; + /** Constructor for the 'VpnRpcLinkStatus' class: Get the link state */ + constructor(init?: Partial); +} +/** Setting of SSTP and OpenVPN */ +export declare class VpnOpenVpnSstpConfig { + /** Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. */ + EnableOpenVPN_bool: boolean; + /** Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. */ + OpenVPNPortList_str: string; + /** pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. */ + EnableSSTP_bool: boolean; + /** Constructor for the 'VpnOpenVpnSstpConfig' class: Setting of SSTP and OpenVPN */ + constructor(init?: Partial); +} +/** Virtual host option */ +export declare class VpnVhOption { + /** Target Virtual HUB name */ + RpcHubName_str: string; + /** MAC address */ + MacAddress_bin: Uint8Array; + /** IP address */ + Ip_ip: string; + /** Subnet mask */ + Mask_ip: string; + /** Use flag of the Virtual NAT function */ + UseNat_bool: boolean; + /** MTU value (Standard: 1500) */ + Mtu_u32: number; + /** NAT TCP timeout in seconds */ + NatTcpTimeout_u32: number; + /** NAT UDP timeout in seconds */ + NatUdpTimeout_u32: number; + /** Using flag of DHCP function */ + UseDhcp_bool: boolean; + /** Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) */ + DhcpLeaseIPStart_ip: string; + /** Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) */ + DhcpLeaseIPEnd_ip: string; + /** Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) */ + DhcpSubnetMask_ip: string; + /** Specify the expiration date in second units for leasing an IP address to a client. */ + DhcpExpireTimeSpan_u32: number; + /** Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. */ + DhcpGatewayAddress_ip: string; + /** Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + DhcpDnsServerAddress_ip: string; + /** Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + DhcpDnsServerAddress2_ip: string; + /** Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. */ + DhcpDomainName_str: string; + /** Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. */ + SaveLog_bool: boolean; + /** The flag to enable the DhcpPushRoutes_str field. */ + ApplyDhcpPushRoutes_bool: boolean; + /** Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. */ + DhcpPushRoutes_str: string; + /** Constructor for the 'VpnVhOption' class: Virtual host option */ + constructor(init?: Partial); +} +/** RPC_NAT_STATUS */ +export declare class VpnRpcNatStatus { + /** Virtual Hub Name */ + HubName_str: string; + /** Number of TCP sessions */ + NumTcpSessions_u32: number; + /** Ntmber of UDP sessions */ + NumUdpSessions_u32: number; + /** Nymber of ICMP sessions */ + NumIcmpSessions_u32: number; + /** Number of DNS sessions */ + NumDnsSessions_u32: number; + /** Number of DHCP clients */ + NumDhcpClients_u32: number; + /** Whether the NAT is operating in the Kernel Mode */ + IsKernelMode_bool: boolean; + /** Whether the NAT is operating in the Raw IP Mode */ + IsRawIpMode_bool: boolean; + /** Constructor for the 'VpnRpcNatStatus' class: RPC_NAT_STATUS */ + constructor(init?: Partial); +} +/** Key pair */ +export declare class VpnRpcKeyPair { + /** The body of the certificate */ + Cert_bin: Uint8Array; + /** The body of the private key */ + Key_bin: Uint8Array; + /** Constructor for the 'VpnRpcKeyPair' class: Key pair */ + constructor(init?: Partial); +} +/** Single string value */ +export declare class VpnRpcStr { + /** A string value */ + String_str: string; + /** Constructor for the 'VpnRpcStr' class: Single string value */ + constructor(init?: Partial); +} +/** Type of VPN Server */ +export declare enum VpnRpcServerType { + /** Stand-alone server */ + Standalone = 0, + /** Farm controller server */ + FarmController = 1, + /** Farm member server */ + FarmMember = 2 +} +/** Operating system type */ +export declare enum VpnRpcOsType { + /** Windows 95 */ + WINDOWS_95 = 1100, + /** Windows 98 */ + WINDOWS_98 = 1200, + /** Windows Me */ + WINDOWS_ME = 1300, + /** Windows (unknown) */ + WINDOWS_UNKNOWN = 1400, + /** Windows NT 4.0 Workstation */ + WINDOWS_NT_4_WORKSTATION = 2100, + /** Windows NT 4.0 Server */ + WINDOWS_NT_4_SERVER = 2110, + /** Windows NT 4.0 Server, Enterprise Edition */ + WINDOWS_NT_4_SERVER_ENTERPRISE = 2111, + /** Windows NT 4.0 Terminal Server */ + WINDOWS_NT_4_TERMINAL_SERVER = 2112, + /** BackOffice Server 4.5 */ + WINDOWS_NT_4_BACKOFFICE = 2113, + /** Small Business Server 4.5 */ + WINDOWS_NT_4_SMS = 2114, + /** Windows 2000 Professional */ + WINDOWS_2000_PROFESSIONAL = 2200, + /** Windows 2000 Server */ + WINDOWS_2000_SERVER = 2211, + /** Windows 2000 Advanced Server */ + WINDOWS_2000_ADVANCED_SERVER = 2212, + /** Windows 2000 Datacenter Server */ + WINDOWS_2000_DATACENTER_SERVER = 2213, + /** BackOffice Server 2000 */ + WINDOWS_2000_BACKOFFICE = 2214, + /** Small Business Server 2000 */ + WINDOWS_2000_SBS = 2215, + /** Windows XP Home Edition */ + WINDOWS_XP_HOME = 2300, + /** Windows XP Professional */ + WINDOWS_XP_PROFESSIONAL = 2301, + /** Windows Server 2003 Web Edition */ + WINDOWS_2003_WEB = 2410, + /** Windows Server 2003 Standard Edition */ + WINDOWS_2003_STANDARD = 2411, + /** Windows Server 2003 Enterprise Edition */ + WINDOWS_2003_ENTERPRISE = 2412, + /** Windows Server 2003 DataCenter Edition */ + WINDOWS_2003_DATACENTER = 2413, + /** BackOffice Server 2003 */ + WINDOWS_2003_BACKOFFICE = 2414, + /** Small Business Server 2003 */ + WINDOWS_2003_SBS = 2415, + /** Windows Vista */ + WINDOWS_LONGHORN_PROFESSIONAL = 2500, + /** Windows Server 2008 */ + WINDOWS_LONGHORN_SERVER = 2510, + /** Windows 7 */ + WINDOWS_7 = 2600, + /** Windows Server 2008 R2 */ + WINDOWS_SERVER_2008_R2 = 2610, + /** Windows 8 */ + WINDOWS_8 = 2700, + /** Windows Server 2012 */ + WINDOWS_SERVER_8 = 2710, + /** Windows 8.1 */ + WINDOWS_81 = 2701, + /** Windows Server 2012 R2 */ + WINDOWS_SERVER_81 = 2711, + /** Windows 10 */ + WINDOWS_10 = 2702, + /** Windows Server 10 */ + WINDOWS_SERVER_10 = 2712, + /** Windows 11 or later */ + WINDOWS_11 = 2800, + /** Windows Server 11 or later */ + WINDOWS_SERVER_11 = 2810, + /** Unknown UNIX */ + UNIX_UNKNOWN = 3000, + /** Linux */ + LINUX = 3100, + /** Solaris */ + SOLARIS = 3200, + /** Cygwin */ + CYGWIN = 3300, + /** BSD */ + BSD = 3400, + /** MacOS X */ + MACOS_X = 3500 +} +/** VPN Server Information */ +export declare class VpnRpcServerInfo { + /** Server product name */ + ServerProductName_str: string; + /** Server version string */ + ServerVersionString_str: string; + /** Server build information string */ + ServerBuildInfoString_str: string; + /** Server version integer value */ + ServerVerInt_u32: number; + /** Server build number integer value */ + ServerBuildInt_u32: number; + /** Server host name */ + ServerHostName_str: string; + /** Type of server */ + ServerType_u32: VpnRpcServerType; + /** Build date and time of the server */ + ServerBuildDate_dt: Date; + /** Family name */ + ServerFamilyName_str: string; + /** OS type */ + OsType_u32: VpnRpcOsType; + /** Service pack number */ + OsServicePack_u32: number; + /** OS system name */ + OsSystemName_str: string; + /** OS product name */ + OsProductName_str: string; + /** OS vendor name */ + OsVendorName_str: string; + /** OS version */ + OsVersion_str: string; + /** Kernel name */ + KernelName_str: string; + /** Kernel version */ + KernelVersion_str: string; + /** Constructor for the 'VpnRpcServerInfo' class: VPN Server Information */ + constructor(init?: Partial); +} +/** Server status */ +export declare class VpnRpcServerStatus { + /** Type of server */ + ServerType_u32: VpnRpcServerType; + /** Total number of TCP connections */ + NumTcpConnections_u32: number; + /** Number of Local TCP connections */ + NumTcpConnectionsLocal_u32: number; + /** Number of remote TCP connections */ + NumTcpConnectionsRemote_u32: number; + /** Total number of HUBs */ + NumHubTotal_u32: number; + /** Nymber of stand-alone HUB */ + NumHubStandalone_u32: number; + /** Number of static HUBs */ + NumHubStatic_u32: number; + /** Number of Dynamic HUBs */ + NumHubDynamic_u32: number; + /** Total number of sessions */ + NumSessionsTotal_u32: number; + /** Number of local VPN sessions */ + NumSessionsLocal_u32: number; + /** The number of remote sessions */ + NumSessionsRemote_u32: number; + /** Number of MAC table entries (total sum of all Virtual Hubs) */ + NumMacTables_u32: number; + /** Number of IP table entries (total sum of all Virtual Hubs) */ + NumIpTables_u32: number; + /** Number of users (total sum of all Virtual Hubs) */ + NumUsers_u32: number; + /** Number of groups (total sum of all Virtual Hubs) */ + NumGroups_u32: number; + /** Number of assigned bridge licenses (Useful to make a commercial version) */ + AssignedBridgeLicenses_u32: number; + /** Number of assigned client licenses (Useful to make a commercial version) */ + AssignedClientLicenses_u32: number; + /** Number of Assigned bridge license (cluster-wide), useful to make a commercial version */ + AssignedBridgeLicensesTotal_u32: number; + /** Number of assigned client licenses (cluster-wide), useful to make a commercial version */ + AssignedClientLicensesTotal_u32: number; + /** Number of broadcast packets (Recv) */ + ["Recv.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Recv) */ + ["Recv.BroadcastCount_u64"]: number; + /** Unicast count (Recv) */ + ["Recv.UnicastBytes_u64"]: number; + /** Unicast bytes (Recv) */ + ["Recv.UnicastCount_u64"]: number; + /** Number of broadcast packets (Send) */ + ["Send.BroadcastBytes_u64"]: number; + /** Broadcast bytes (Send) */ + ["Send.BroadcastCount_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastBytes_u64"]: number; + /** Unicast bytes (Send) */ + ["Send.UnicastCount_u64"]: number; + /** Current time */ + CurrentTime_dt: Date; + /** 64 bit High-Precision Logical System Clock */ + CurrentTick_u64: number; + /** VPN Server Start-up time */ + StartTime_dt: Date; + /** Memory information: Total Memory */ + TotalMemory_u64: number; + /** Memory information: Used Memory */ + UsedMemory_u64: number; + /** Memory information: Free Memory */ + FreeMemory_u64: number; + /** Memory information: Total Phys */ + TotalPhys_u64: number; + /** Memory information: Used Phys */ + UsedPhys_u64: number; + /** Memory information: Free Phys */ + FreePhys_u64: number; + /** Constructor for the 'VpnRpcServerStatus' class: Server status */ + constructor(init?: Partial); +} +/** VPN Session status */ +export declare class VpnRpcSessionStatus { + /** The Virtual Hub name */ + HubName_str: string; + /** VPN session name */ + Name_str: string; + /** User name */ + Username_str: string; + /** Real user name which was used for the authentication */ + RealUsername_str: string; + /** Group name */ + GroupName_str: string; + /** Is Cascade Session */ + LinkMode_bool: boolean; + /** Client IP address */ + Client_Ip_Address_ip: string; + /** Client host name */ + SessionStatus_ClientHostName_str: string; + /** Operation flag */ + Active_bool: boolean; + /** Connected flag */ + Connected_bool: boolean; + /** State of the client session */ + SessionStatus_u32: VpnRpcClientSessionStatus; + /** Server name */ + ServerName_str: string; + /** Port number of the server */ + ServerPort_u32: number; + /** Server product name */ + ServerProductName_str: string; + /** Server product version */ + ServerProductVer_u32: number; + /** Server product build number */ + ServerProductBuild_u32: number; + /** Connection start time */ + StartTime_dt: Date; + /** Connection completion time of the first connection */ + FirstConnectionEstablisiedTime_dt: Date; + /** Connection completion time of this connection */ + CurrentConnectionEstablishTime_dt: Date; + /** Number of connections have been established so far */ + NumConnectionsEatablished_u32: number; + /** Half-connection */ + HalfConnection_bool: boolean; + /** VoIP / QoS */ + QoS_bool: boolean; + /** Maximum number of the underlying TCP connections */ + MaxTcpConnections_u32: number; + /** Number of current underlying TCP connections */ + NumTcpConnections_u32: number; + /** Number of inbound underlying connections */ + NumTcpConnectionsUpload_u32: number; + /** Number of outbound underlying connections */ + NumTcpConnectionsDownload_u32: number; + /** Use of encryption */ + UseEncrypt_bool: boolean; + /** Cipher algorithm name */ + CipherName_str: string; + /** Use of compression */ + UseCompress_bool: boolean; + /** Is R-UDP session */ + IsRUDPSession_bool: boolean; + /** Physical underlying communication protocol */ + UnderlayProtocol_str: string; + /** The UDP acceleration is enabled */ + IsUdpAccelerationEnabled_bool: boolean; + /** Using the UDP acceleration function */ + IsUsingUdpAcceleration_bool: boolean; + /** VPN session name */ + SessionName_str: string; + /** Connection name */ + ConnectionName_str: string; + /** Session key */ + SessionKey_bin: Uint8Array; + /** Total transmitted data size */ + TotalSendSize_u64: number; + /** Total received data size */ + TotalRecvSize_u64: number; + /** Total transmitted data size (no compression) */ + TotalSendSizeReal_u64: number; + /** Total received data size (no compression) */ + TotalRecvSizeReal_u64: number; + /** Is Bridge Mode */ + IsBridgeMode_bool: boolean; + /** Is Monitor mode */ + IsMonitorMode_bool: boolean; + /** VLAN ID */ + VLanId_u32: number; + /** Client product name */ + ClientProductName_str: string; + /** Client version */ + ClientProductVer_u32: number; + /** Client build number */ + ClientProductBuild_u32: number; + /** Client OS name */ + ClientOsName_str: string; + /** Client OS version */ + ClientOsVer_str: string; + /** Client OS Product ID */ + ClientOsProductId_str: string; + /** Client host name */ + ClientHostname_str: string; + /** Unique ID */ + UniqueId_bin: Uint8Array; + /** Constructor for the 'VpnRpcSessionStatus' class: VPN Session status */ + constructor(init?: Partial); +} +/** Set the special listener */ +export declare class VpnRpcSpecialListener { + /** The flag to activate the VPN over ICMP server function */ + VpnOverIcmpListener_bool: boolean; + /** The flag to activate the VPN over DNS function */ + VpnOverDnsListener_bool: boolean; + /** Constructor for the 'VpnRpcSpecialListener' class: Set the special listener */ + constructor(init?: Partial); +} +/** Syslog configuration */ +export declare enum VpnSyslogSaveType { + /** Do not use syslog */ + None = 0, + /** Only server log */ + ServerLog = 1, + /** Server and Virtual HUB security log */ + ServerAndHubSecurityLog = 2, + /** Server, Virtual HUB security, and packet log */ + ServerAndHubAllLog = 3 +} +/** Syslog configuration */ +export declare class VpnSyslogSetting { + /** The behavior of the syslog function */ + SaveType_u32: VpnSyslogSaveType; + /** Specify the host name or IP address of the syslog server */ + Hostname_str: string; + /** Specify the port number of the syslog server */ + Port_u32: number; + /** Constructor for the 'VpnSyslogSetting' class: Syslog configuration */ + constructor(init?: Partial); +} +/** VPN Gate Server Config */ +export declare class VpnVgsConfig { + /** Active flag */ + IsEnabled_bool: boolean; + /** Message */ + Message_utf: string; + /** Owner name */ + Owner_utf: string; + /** Abuse email */ + Abuse_utf: string; + /** Log save flag */ + NoLog_bool: boolean; + /** Save log permanently */ + LogPermanent_bool: boolean; + /** Enable the L2TP VPN function */ + EnableL2TP_bool: boolean; + /** Constructor for the 'VpnVgsConfig' class: VPN Gate Server Config */ + constructor(init?: Partial); +} +/** Read a Log file */ +export declare class VpnRpcReadLogFile { + /** Server name */ + ServerName_str: string; + /** File Path */ + FilePath_str: string; + /** Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. */ + Offset_u32: number; + /** Received buffer */ + Buffer_bin: Uint8Array; + /** Constructor for the 'VpnRpcReadLogFile' class: Read a Log file */ + constructor(init?: Partial); +} +/** Rename link */ +export declare class VpnRpcRenameLink { + /** The Virtual Hub name */ + HubName_str: string; + /** The old name of the cascade connection */ + OldAccountName_utf: string; + /** The new name of the cascade connection */ + NewAccountName_utf: string; + /** Constructor for the 'VpnRpcRenameLink' class: Rename link */ + constructor(init?: Partial); +} +/** Online or offline the HUB */ +export declare class VpnRpcSetHubOnline { + /** The Virtual Hub name */ + HubName_str: string; + /** Online / offline flag */ + Online_bool: boolean; + /** Constructor for the 'VpnRpcSetHubOnline' class: Online or offline the HUB */ + constructor(init?: Partial); +} +/** Set Password */ +export declare class VpnRpcSetPassword { + /** The plaintext password */ + PlainTextPassword_str: string; + /** Constructor for the 'VpnRpcSetPassword' class: Set Password */ + constructor(init?: Partial); +} +/** JSON-RPC request class. See https://www.jsonrpc.org/specification */ +export declare class JsonRpcRequest { + jsonrpc: string; + method: string; + params: any; + id: string; + constructor(method?: string, param?: any, id?: string); +} +/** JSON-RPC error class. See https://www.jsonrpc.org/specification */ +export declare class JsonRpcError { + code: number; + message: string; + data: any; + constructor(code?: number, message?: string, data?: any); +} +/** JSON-RPC response class with generics */ +export declare class JsonRpcResponse { + jsonrpc: string; + result: TResult; + error: JsonRpcError; + id: string; +} +/** JSON-RPC client class. See https://www.jsonrpc.org/specification */ +export declare class JsonRpcClient { + /** A utility function to convert any object to JSON string */ + static ObjectToJson(obj: any): string; + /** A utility function to convert JSON string to object */ + static JsonToObject(str: string): any; + /** Base URL */ + BaseUrl: string; + /** The instance of HTTP client */ + private client; + /** Additional HTTP headers */ + private headers; + /** + * JSON-RPC client class constructor + * @param url The URL + * @param headers Additional HTTP headers + * @param send_credential Set true to use the same credential with the browsing web site. Valid only if the code is running on the web browser. + */ + constructor(url: string, headers: { + [name: string]: string; + }, send_credential: boolean, nodejs_https_client_reject_untrusted_server_cert: boolean); + /** + * Call a single RPC call (without error check). You can wait for the response with Promise or await statement. + * @param method_name The name of RPC method + * @param param The parameters + */ + CallInternalAsync(method_name: string, param: any): Promise; + /** + * Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + * @param method_name The name of RPC method + * @param param The parameters + */ + CallAsync(method_name: string, param: any): Promise; +} +/** JSON-RPC exception class */ +export declare class JsonRpcException extends Error { + Error: JsonRpcError; + constructor(error: JsonRpcError); +} +/** HTTP client exception class */ +export declare class HttpClientException extends Error { + constructor(message: string); +} +/** HTTP client response class */ +export declare class HttpClientResponse { + Body: string; +} +/** An HTTP client which can be used in both web browsers and Node.js */ +export declare class HttpClient { + TimeoutMsecs: number; + SendCredential: boolean; + NodeJS_HTTPS_Client_Reject_Unauthorized: boolean; + /** Post method. In web browsers this function will process the request by itself. In Node.js this function will call PostAsync_NodeJS() instead. */ + PostAsync(url: string, headers: { + [name: string]: string; + }, req_body: string, req_media_type: string): Promise; + /** Post method for Node.js. */ + PostAsync_NodeJS(url: string, headers: { + [name: string]: string; + }, req_body: string, req_media_type: string): Promise; +} +export declare function Util_Base64_Decode(b64: any): Uint8Array; +export declare function Util_Base64_Encode(uint8: any): string; +//# sourceMappingURL=vpnrpc.d.ts.map \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts.map b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts.map new file mode 100644 index 00000000..0be9a0ad --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"vpnrpc.d.ts","sourceRoot":"","sources":["../src/vpnrpc.ts"],"names":[],"mappings":"AAiBA,2BAA2B;AAC3B,qBAAa,YAAY;IAErB,yEAAyE;WAC3D,QAAQ,IAAI,OAAO;IAKjC,8BAA8B;WAChB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAK/C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAgB;IAElC;;;;;;;OAOG;gBACS,kBAAkB,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,gDAAgD,CAAC,EAAE,OAAO;IA4BjK,qLAAqL;IAC9K,IAAI,gDAGV;IAED,iXAAiX;IAC1W,aAAa,kCAGnB;IAED,6WAA6W;IACtW,eAAe,oCAGrB;IAED,2cAA2c;IACpc,cAAc,wDAGpB;IAED,4RAA4R;IACrR,YAAY,oCAGlB;IAED,8XAA8X;IACvX,cAAc,wDAGpB;IAED,6RAA6R;IACtR,cAAc,wDAGpB;IAED,gNAAgN;IACzM,iBAAiB,8DAGvB;IAED,qiCAAqiC;IAC9hC,cAAc,gDAGpB;IAED,mNAAmN;IAC5M,cAAc,4BAGpB;IAED,qhBAAqhB;IAC9gB,WAAW,wDAGjB;IAED,wfAAwf;IACjf,cAAc,gCAGpB;IAED,0fAA0f;IACnf,uBAAuB,4CAG7B;IAED,yVAAyV;IAClV,aAAa,sDAGnB;IAED,oOAAoO;IAC7N,aAAa,+BAGnB;IAED,sUAAsU;IAC/T,eAAe,2BAGrB;IAED,meAAme;IAC5d,eAAe,8CAGrB;IAED,unBAAunB;IAChnB,SAAS,0DAGf;IAED,sfAAsf;IAC/e,MAAM,0DAGZ;IAED,mMAAmM;IAC5L,MAAM,0DAGZ;IAED,g+BAAg+B;IACz9B,OAAO,+BAGb;IAED,gmBAAgmB;IACzlB,SAAS,0DAGf;IAED,kWAAkW;IAC3V,YAAY,oDAGlB;IAED,ulBAAulB;IAChlB,YAAY,oDAGlB;IAED,ogBAAogB;IAC7f,cAAc,sCAGpB;IAED,yOAAyO;IAClO,oBAAoB,gFAG1B;IAED,wgBAAwgB;IACjgB,iBAAiB,oEAGvB;IAED,gdAAgd;IACzc,YAAY,gEAGlB;IAED,0TAA0T;IACnT,YAAY,0DAGlB;IAED,2wBAA2wB;IACpwB,SAAS,oDAGf;IAED,+aAA+a;IACxa,SAAS,oDAGf;IAED,klBAAklB;IAC3kB,KAAK,wDAGX;IAED,2dAA2d;IACpd,MAAM,0DAGZ;IAED,gVAAgV;IACzU,KAAK,wDAGX;IAED,sXAAsX;IAC/W,QAAQ,8DAGd;IAED,6rCAA6rC;IACtrC,UAAU,4DAGhB;IAED,4YAA4Y;IACrY,OAAO,4DAGb;IAED,gJAAgJ;IACzI,OAAO,4DAGb;IAED,guBAAguB;IACztB,QAAQ,wDAGd;IAED,onBAAonB;IAC7mB,aAAa,gDAGnB;IAED,mcAAmc;IAC5b,cAAc,gDAGpB;IAED,8XAA8X;IACvX,UAAU,gDAGhB;IAED,6QAA6Q;IACtQ,UAAU,4DAGhB;IAED,sUAAsU;IAC/T,aAAa,4DAGnB;IAED,mzBAAmzB;IAC5yB,SAAS,0DAGf;IAED,2hBAA2hB;IACphB,YAAY,gEAGlB;IAED,0wBAA0wB;IACnwB,UAAU,oEAGhB;IAED,oMAAoM;IAC7L,aAAa,oEAGnB;IAED,w/BAAw/B;IACj/B,UAAU,sDAGhB;IAED,siBAAsiB;IAC/hB,OAAO,sDAGb;IAED,kmBAAkmB;IAC3lB,OAAO,sDAGb;IAED,mlBAAmlB;IAC5kB,UAAU,4DAGhB;IAED,qSAAqS;IAC9R,QAAQ,wDAGd;IAED,yWAAyW;IAClW,WAAW,wDAGjB;IAED,2WAA2W;IACpW,QAAQ,wDAGd;IAED,8XAA8X;IACvX,QAAQ,wDAGd;IAED,ocAAoc;IAC7b,WAAW,4DAGjB;IAED,uSAAuS;IAChS,SAAS,0DAGf;IAED,yrBAAyrB;IAClrB,WAAW,8DAGjB;IAED,seAAse;IAC/d,gBAAgB,kEAGtB;IAED,ibAAib;IAC1a,aAAa,kEAGnB;IAED,mfAAmf;IAC5e,YAAY,gEAGlB;IAED,iSAAiS;IAC1R,cAAc,8DAGpB;IAED,shBAAshB;IAC/gB,WAAW,8DAGjB;IAED,4RAA4R;IACrR,aAAa,8DAGnB;IAED,m7BAAm7B;IAC56B,OAAO,gDAGb;IAED,mVAAmV;IAC5U,OAAO,gDAGb;IAED,mwCAAmwC;IAC5vC,eAAe,8CAGrB;IAED,gcAAgc;IACzb,gBAAgB,8CAGtB;IAED,0yCAA0yC;IACnyC,kBAAkB,kDAGxB;IAED,sJAAsJ;IAC/I,kBAAkB,kDAGxB;IAED,4VAA4V;IACrV,OAAO,sDAGb;IAED,uWAAuW;IAChW,QAAQ,wDAGd;IAED,sVAAsV;IAC/U,kBAAkB,0DAGxB;IAED,4YAA4Y;IACrY,YAAY,+BAGlB;IAED,6vBAA6vB;IACtvB,cAAc,8DAGpB;IAED,kPAAkP;IAC3O,iBAAiB,8DAGvB;IAED,qSAAqS;IAC9R,eAAe,uCAGrB;IAED,+EAA+E;IACxE,gBAAgB,qCAGtB;IAED,suBAAsuB;IAC/tB,YAAY,gDAGlB;IAED,wWAAwW;IACjW,OAAO,6BAGb;IAED,wcAAwc;IACjc,SAAS,8BAGf;IAED,shCAAshC;IAC/gC,SAAS,oDAGf;IAED,4DAA4D;IACrD,yBAAyB,8DAG/B;IAED,07BAA07B;IACn7B,kBAAkB,8DAGxB;IAED,m8BAAm8B;IAC57B,kBAAkB,8DAGxB;IAED,isBAAisB;IAC1rB,gBAAgB,8DAGtB;IAED,itBAAitB;IAC1sB,gBAAgB,8DAGtB;IAED,64BAA64B;IACt4B,WAAW,gDAGjB;IAED,gbAAgb;IACza,WAAW,gDAGjB;IAED,g5BAAg5B;IACz4B,YAAY,gCAGlB;IAED,miCAAmiC;IAC5hC,aAAa,gDAGnB;IAED,uUAAuU;IAChU,YAAY,gDAGlB;IAED,y8CAAy8C;IACl8C,OAAO,gDAGb;IAED,4gBAA4gB;IACrgB,OAAO,gDAGb;IAED,wuBAAwuB;IACjuB,QAAQ,wDAGd;IAED,k5BAAk5B;IAC34B,UAAU,sDAGhB;IAED,mhBAAmhB;IAC5gB,UAAU,sDAGhB;IAED,ugBAAugB;IAChgB,WAAW,8DAGjB;IAED,izBAAizB;IAC1yB,OAAO,sDAGb;IAED,8rCAA8rC;IACvrC,MAAM,8CAGZ;IAED,uZAAuZ;IAChZ,MAAM,8CAGZ;IAED,kaAAka;IAC3Z,MAAM,8CAGZ;IAED,ouCAAouC;IAC7tC,MAAM,8CAGZ;IAED,4gCAA4gC;IACrgC,SAAS,oDAGf;IAED,mqBAAmqB;IAC5pB,SAAS,oDAGf;IAED,snBAAsnB;IAC/mB,WAAW,mCAGjB;IAED,slBAAslB;IAC/kB,WAAW,8DAGjB;IAED,kHAAkH;IAC3G,SAAS,4DAGf;IAED,qOAAqO;IAC9N,SAAS,4DAGf;IAED,qJAAqJ;IAC9I,SAAS,8CAGf;IAED,qJAAqJ;IAC9I,SAAS,8CAGf;IAED,u2BAAu2B;IACh2B,KAAK,gDAGX;IAED,0CAA0C;IACnC,WAAW,2BAGjB;IAED,g/BAAg/B;IACz+B,KAAK,gDAGX;IAED,iqBAAiqB;IAC1pB,gBAAgB,4DAGtB;IAED,0TAA0T;IACnT,gBAAgB,kCAGtB;IAED,8lCAA8lC;IACvlC,YAAY,oDAGlB;IAED,8XAA8X;IACvX,YAAY,oDAGlB;IAED,wVAAwV;IACjV,eAAe,oDAGrB;IAED,8XAA8X;IACvX,aAAa,qCAGnB;IAED,kkBAAkkB;IAC3jB,oBAAoB,oEAG1B;IAED,wUAAwU;IACjU,oBAAoB,sCAG1B;IAED,ykCAAykC;IAClkC,mBAAmB,qCAGzB;IAED,stCAAstC;IAC/sC,wBAAwB,gDAG9B;IAED,k7BAAk7B;IAC36B,oBAAoB,gDAG1B;IAED,wfAAwf;IACjf,qBAAqB,mCAG3B;IAED,ujBAAujB;IAChjB,kBAAkB,sEAGxB;IAED,8PAA8P;IACvP,kBAAkB,uCAGxB;IAED,8lCAA8lC;IACvlC,cAAc,mCAGpB;IAED,mkCAAmkC;IAC5jC,cAAc,8DAGpB;IAED,gEAAgE;IACzD,qBAAqB,oCAG3B;IAED,gEAAgE;IACzD,qBAAqB,gEAG3B;IAED,4IAA4I;IACrI,YAAY,oDAGlB;IAED,4IAA4I;IACrI,YAAY,8BAGlB;IAKD,2BAA2B;IACd,SAAS,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAMzE;AAMD,0BAA0B;AAC1B,oBAAY,mBAAmB;IAE3B,oBAAoB;IACpB,MAAM,IAAI;IAEV,UAAU;IACV,GAAG,IAAI;IAEP,UAAU;IACV,GAAG,KAAK;IAER,oBAAoB;IACpB,MAAM,KAAK;CAEd;AAED,kCAAkC;AAClC,qBAAa,SAAS;IAElB,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,iDAAiD;IAC1C,QAAQ,EAAE,MAAM,CAAM;IAE7B,oDAAoD;IAC7C,WAAW,EAAE,OAAO,CAAS;IAEpC,gJAAgJ;IACzI,YAAY,EAAE,MAAM,CAAK;IAEhC,wPAAwP;IACjP,YAAY,EAAE,OAAO,CAAS;IAErC,0FAA0F;IACnF,WAAW,EAAE,OAAO,CAAS;IAEpC,uKAAuK;IAChK,eAAe,EAAE,MAAM,CAAM;IAEpC,6LAA6L;IACtL,gBAAgB,EAAE,MAAM,CAAM;IAErC,6KAA6K;IACtK,gBAAgB,EAAE,MAAM,CAAM;IAErC,kMAAkM;IAC3L,iBAAiB,EAAE,MAAM,CAAM;IAEtC,0QAA0Q;IACnQ,iBAAiB,EAAE,UAAU,CAAsB;IAE1D,8NAA8N;IACvN,kBAAkB,EAAE,UAAU,CAAsB;IAE3D,gRAAgR;IACzQ,kBAAkB,EAAE,UAAU,CAAsB;IAE3D,mOAAmO;IAC5N,mBAAmB,EAAE,UAAU,CAAsB;IAE5D,6BAA6B;IACtB,YAAY,EAAE,mBAAmB,CAAK;IAE7C,uRAAuR;IAChR,gBAAgB,EAAE,MAAM,CAAK;IAEpC,qRAAqR;IAC9Q,cAAc,EAAE,MAAM,CAAK;IAElC,iSAAiS;IAC1R,iBAAiB,EAAE,MAAM,CAAK;IAErC,+RAA+R;IACxR,eAAe,EAAE,MAAM,CAAK;IAEnC,4LAA4L;IACrL,eAAe,EAAE,MAAM,CAAM;IAEpC,qMAAqM;IAC9L,gBAAgB,EAAE,MAAM,CAAM;IAErC,gEAAgE;IACzD,gBAAgB,EAAE,OAAO,CAAS;IAEzC,4EAA4E;IACrE,iBAAiB,EAAE,UAAU,CAAsB;IAE1D,iFAAiF;IAC1E,cAAc,EAAE,UAAU,CAAsB;IAEvD,qEAAqE;IAC9D,gBAAgB,EAAE,OAAO,CAAS;IAEzC,iFAAiF;IAC1E,iBAAiB,EAAE,UAAU,CAAsB;IAE1D,sFAAsF;IAC/E,cAAc,EAAE,UAAU,CAAsB;IAEvD,yEAAyE;IAClE,kBAAkB,EAAE,OAAO,CAAS;IAE3C,2KAA2K;IACpK,gBAAgB,EAAE,OAAO,CAAS;IAEzC,iMAAiM;IAC1L,SAAS,EAAE,MAAM,CAAK;IAE7B,+KAA+K;IACxK,UAAU,EAAE,MAAM,CAAK;IAE9B,kLAAkL;IAC3K,QAAQ,EAAE,MAAM,CAAK;IAE5B,4WAA4W;IACrW,eAAe,EAAE,MAAM,CAAM;IAEpC,yEAAyE;gBACtD,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAI/C;AAED,iCAAiC;AACjC,qBAAa,eAAe;IAExB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,0CAA0C;IACnC,gBAAgB,EAAE,SAAS,EAAE,CAAM;IAE1C,8EAA8E;gBAC3D,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,oBAAoB;AACpB,qBAAa,cAAc;IAEvB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,wCAAwC;IACjC,QAAQ,EAAE,UAAU,CAAsB;IAEjD,gEAAgE;gBAC7C,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,gBAAgB;AAChB,qBAAa,SAAS;IAElB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,aAAa;IACN,OAAO,EAAE,MAAM,CAAK;IAE3B,mBAAmB;IACZ,cAAc,EAAE,MAAM,CAAM;IAEnC,kBAAkB;IACX,gBAAgB,EAAE,MAAM,CAAM;IAErC,mBAAmB;IACZ,QAAQ,EAAE,MAAM,CAAM;IAE7B,kBAAkB;IACX,WAAW,EAAE,MAAM,CAAM;IAEhC,mBAAmB;IACZ,SAAS,EAAE,MAAM,CAAM;IAE9B,kBAAkB;IACX,SAAS,EAAE,MAAM,CAAM;IAE9B,uBAAuB;IAChB,UAAU,EAAE,UAAU,CAAsB;IAEnD,2BAA2B;IACpB,aAAa,EAAE,UAAU,CAAsB;IAEtD,4BAA4B;IACrB,cAAc,EAAE,UAAU,CAAsB;IAEvD,uDAAuD;gBACpC,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAI/C;AAED,6BAA6B;AAC7B,qBAAa,YAAY;IAErB,8VAA8V;IACvV,MAAM,EAAE,MAAM,CAAM;IAE3B,sDAAsD;IAC/C,WAAW,EAAE,MAAM,CAAM;IAEhC,oEAAoE;IAC7D,YAAY,EAAE,MAAM,CAAM;IAEjC,oEAAoE;IAC7D,YAAY,EAAE,MAAM,CAAM;IAEjC,uEAAuE;gBACpD,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CAIlD;AAED,gCAAgC;AAChC,qBAAa,UAAU;IAEnB,qBAAqB;IACd,QAAQ,EAAE,MAAM,CAAM;IAE7B,uBAAuB;IAChB,WAAW,EAAE,MAAM,CAAM;IAEhC,iBAAiB;IACV,YAAY,EAAE,MAAM,CAAM;IAEjC,kBAAkB;IACX,aAAa,EAAE,MAAM,CAAM;IAElC,wEAAwE;gBACrD,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAIhD;AAED,qBAAqB;AACrB,qBAAa,UAAU;IAEnB,0BAA0B;IACnB,QAAQ,EAAE,MAAM,CAAM;IAE7B,6DAA6D;gBAC1C,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAIhD;AAED,oBAAoB;AACpB,qBAAa,aAAa;IAEtB,qBAAqB;IACd,QAAQ,EAAE,MAAM,CAAM;IAE7B,sBAAsB;IACf,iBAAiB,EAAE,MAAM,CAAM;IAEtC,kBAAkB;IACX,aAAa,EAAE,MAAM,CAAM;IAElC,sBAAsB;IACf,iBAAiB,EAAE,MAAM,CAAM;IAEtC,aAAa;IACN,UAAU,EAAE,MAAM,CAAK;IAE9B,+DAA+D;gBAC5C,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,6EAA6E;AAC7E,qBAAa,UAAU;IAEnB,6BAA6B;IACtB,YAAY,EAAE,MAAM,CAAK;IAEhC,6BAA6B;IACtB,cAAc,EAAE,MAAM,CAAK;IAElC,4BAA4B;IACrB,YAAY,EAAE,MAAM,CAAM;IAEjC,4BAA4B;IACrB,eAAe,EAAE,MAAM,CAAM;IAEpC,qHAAqH;gBAClG,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAIhD;AAED,6BAA6B;AAC7B,qBAAa,iBAAiB;IAE1B,oCAAoC;IAC7B,cAAc,EAAE,MAAM,CAAM;IAEnC,2BAA2B;IACpB,aAAa,EAAE,MAAM,CAAM;IAElC,kBAAkB;IACX,WAAW,EAAE,OAAO,CAAS;IAEpC,mBAAmB;IACZ,WAAW,EAAE,OAAO,CAAS;IAEpC,+IAA+I;IACxI,YAAY,EAAE,OAAO,CAAS;IAErC,4EAA4E;gBACzD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,2CAA2C;AAC3C,qBAAa,cAAc;IAEvB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,qBAAqB;IACd,QAAQ,EAAE,MAAM,CAAM;IAE7B,sFAAsF;IAC/E,YAAY,EAAE,MAAM,CAAM;IAEjC,mDAAmD;IAC5C,QAAQ,EAAE,MAAM,CAAM;IAE7B,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,8CAA8C;IACvC,cAAc,EAAE,OAAO,CAAS;IAEvC,uIAAuI;IAChI,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAS;IAE/C,2HAA2H;IACpH,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,uNAAuN;IAChN,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAS;IAErD,uNAAuN;IAChN,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,+OAA+O;IACxO,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,6OAA6O;IACtO,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,oMAAoM;IAC7L,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,yMAAyM;IAClM,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAS;IAEhD,6PAA6P;IACtP,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,oJAAoJ;IAC7I,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAS;IAEtD,kKAAkK;IAC3J,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,kQAAkQ;IAC3P,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAS;IAE3D,kPAAkP;IAC3O,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,8LAA8L;IACvL,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,wOAAwO;IACjO,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAK;IAE1C,oJAAoJ;IAC7I,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAK;IAEzC,8LAA8L;IACvL,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAK;IAExC,2LAA2L;IACpL,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAK;IAE5C,8MAA8M;IACvM,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAK;IAE9C,yMAAyM;IAClM,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,8MAA8M;IACvM,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAK;IAE9C,oJAAoJ;IAC7I,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAS;IAE9C,2UAA2U;IACpU,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAS;IAEtD,ySAAyS;IAClS,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,2HAA2H;IACpH,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAS;IAErD,uNAAuN;IAChN,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAS;IAEvD,6OAA6O;IACtO,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,yMAAyM;IAClM,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,kKAAkK;IAC3J,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,8LAA8L;IACvL,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAK;IAE1C,kZAAkZ;IAC3Y,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAS;IAEvD,mXAAmX;IAC5W,CAAC,2BAA2B,CAAC,EAAE,MAAM,CAAK;IAEjD,2HAA2H;IACpH,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,mHAAmH;IAC5G,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,sQAAsQ;IAC/P,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,sYAAsY;IAC/X,CAAC,qCAAqC,CAAC,EAAE,OAAO,CAAS;IAEhE,6fAA6f;IACtf,CAAC,6CAA6C,CAAC,EAAE,OAAO,CAAS;IAExE,k3BAAk3B;IAC32B,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAK;IAEzC,0DAA0D;IACnD,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAS;IAE7C,uFAAuF;gBACpE,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,gBAAgB;AAChB,oBAAY,aAAa;IAErB,sBAAsB;IACtB,UAAU,IAAI;IAEd,iBAAiB;IACjB,UAAU,IAAI;IAEd,kBAAkB;IAClB,WAAW,IAAI;CAElB;AAED,mBAAmB;AACnB,qBAAa,eAAe;IAExB,8DAA8D;IACvD,WAAW,EAAE,MAAM,CAAM;IAEhC,kMAAkM;IAC3L,0BAA0B,EAAE,MAAM,CAAM;IAE/C,kBAAkB;IACX,WAAW,EAAE,OAAO,CAAS;IAEpC,qCAAqC;IAC9B,cAAc,EAAE,MAAM,CAAK;IAElC,qLAAqL;IAC9K,WAAW,EAAE,OAAO,CAAS;IAEpC,qEAAqE;IAC9D,WAAW,EAAE,aAAa,CAAK;IAEtC,gEAAgE;gBAC7C,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,oBAAY,oBAAoB;IAE5B,+BAA+B;IAC/B,SAAS,IAAI;IAEb,2CAA2C;IAC3C,oBAAoB,IAAI;IAExB,oCAAoC;IACpC,aAAa,IAAI;IAEjB,iCAAiC;IACjC,IAAI,IAAI;CAEX;AAED,6BAA6B;AAC7B,qBAAa,gBAAgB;IAEzB,2BAA2B;IACpB,cAAc,EAAE,MAAM,CAAM;IAEnC,kBAAkB;IACX,WAAW,EAAE,OAAO,CAAS;IAEpC,+DAA+D;IACxD,oBAAoB,EAAE,OAAO,CAAS;IAE7C,4GAA4G;IACrG,cAAc,EAAE,UAAU,CAAsB;IAEvD,2EAA2E;IACpE,eAAe,EAAE,MAAM,CAAM;IAEpC,wHAAwH;IACjH,YAAY,EAAE,MAAM,CAAM;IAEjC,uFAAuF;IAChF,QAAQ,EAAE,MAAM,CAAK;IAE5B,6DAA6D;IACtD,aAAa,EAAE,eAAe,CAAK;IAE1C,oFAAoF;IAC7E,aAAa,EAAE,MAAM,CAAM;IAElC,oEAAoE;IAC7D,aAAa,EAAE,MAAM,CAAK;IAEjC,4EAA4E;IACrE,iBAAiB,EAAE,MAAM,CAAM;IAEtC,4EAA4E;IACrE,iBAAiB,EAAE,MAAM,CAAM;IAEtC,8EAA8E;IACvE,WAAW,EAAE,MAAM,CAAM;IAEhC,sFAAsF;IAC/E,iBAAiB,EAAE,MAAM,CAAK;IAErC,uFAAuF;IAChF,eAAe,EAAE,OAAO,CAAS;IAExC,2GAA2G;IACpG,gBAAgB,EAAE,OAAO,CAAS;IAEzC,okBAAokB;IAC7jB,mBAAmB,EAAE,OAAO,CAAS;IAE5C,2GAA2G;IACpG,gCAAgC,EAAE,MAAM,CAAK;IAEpD,6FAA6F;IACtF,4BAA4B,EAAE,MAAM,CAAK;IAEhD,kFAAkF;IAC3E,eAAe,EAAE,OAAO,CAAS;IAExC,wEAAwE;IACjE,WAAW,EAAE,OAAO,CAAS;IAEpC,sFAAsF;IAC/E,sBAAsB,EAAE,OAAO,CAAS;IAE/C,0BAA0B;IACnB,YAAY,EAAE,oBAAoB,CAAK;IAE9C,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,oNAAoN;IAC7M,kBAAkB,EAAE,UAAU,CAAsB;IAE3D,sFAAsF;IAC/E,iBAAiB,EAAE,MAAM,CAAM;IAEtC,6EAA6E;IACtE,WAAW,EAAE,UAAU,CAAsB;IAEpD,gGAAgG;IACzF,WAAW,EAAE,UAAU,CAAsB;IAEpD,2HAA2H;IACpH,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,uNAAuN;IAChN,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAS;IAErD,uNAAuN;IAChN,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,0DAA0D;IACnD,oBAAoB,EAAE,OAAO,CAAS;IAE7C,8DAA8D;IACvD,mBAAmB,EAAE,OAAO,CAAS;IAE5C,6PAA6P;IACtP,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,oJAAoJ;IAC7I,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAS;IAEtD,kKAAkK;IAC3J,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,kQAAkQ;IAC3P,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAS;IAE3D,oJAAoJ;IAC7I,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAK;IAEzC,8LAA8L;IACvL,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAK;IAExC,2LAA2L;IACpL,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAK;IAE5C,8MAA8M;IACvM,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAK;IAE9C,2UAA2U;IACpU,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAS;IAEtD,qEAAqE;IAC9D,oBAAoB,EAAE,OAAO,CAAS;IAE7C,2HAA2H;IACpH,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAS;IAErD,uNAAuN;IAChN,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAS;IAEvD,gEAAgE;IACzD,qBAAqB,EAAE,OAAO,CAAS;IAE9C,kKAAkK;IAC3J,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,8LAA8L;IACvL,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAK;IAE1C,2HAA2H;IACpH,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,mHAAmH;IAC5G,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,sQAAsQ;IAC/P,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,sYAAsY;IAC/X,CAAC,qCAAqC,CAAC,EAAE,OAAO,CAAS;IAEhE,k3BAAk3B;IAC32B,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAK;IAEzC,0DAA0D;IACnD,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAS;IAE7C,2EAA2E;gBACxD,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,eAAe;AACf,qBAAa,cAAc;IAEvB,qCAAqC;IAC9B,QAAQ,EAAE,MAAM,CAAK;IAE5B,mBAAmB;IACZ,WAAW,EAAE,OAAO,CAAS;IAEpC,2DAA2D;gBACxC,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,6CAA6C;AAC7C,oBAAY,kBAAkB;IAE1B,+BAA+B;IAC/B,SAAS,IAAI;IAEb,8BAA8B;IAC9B,QAAQ,IAAI;IAEZ,sCAAsC;IACtC,QAAQ,IAAI;IAEZ,wEAAwE;IACxE,QAAQ,IAAI;IAEZ,4BAA4B;IAC5B,MAAM,IAAI;IAEV,gCAAgC;IAChC,QAAQ,IAAI;CAEf;AAED,0CAA0C;AAC1C,qBAAa,aAAa;IAEtB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,wCAAwC;IACjC,QAAQ,EAAE,MAAM,CAAM;IAE7B,uCAAuC;IAChC,aAAa,EAAE,MAAM,CAAM;IAElC,qFAAqF;IAC9E,YAAY,EAAE,MAAM,CAAM;IAEjC,gCAAgC;IACzB,QAAQ,EAAE,MAAM,CAAM;IAE7B,6BAA6B;IACtB,cAAc,EAAE,IAAI,CAAc;IAEzC,kCAAkC;IAC3B,cAAc,EAAE,IAAI,CAAc;IAEzC,+BAA+B;IACxB,aAAa,EAAE,IAAI,CAAc;IAExC,wCAAwC;IACjC,YAAY,EAAE,kBAAkB,CAAK;IAE5C,wGAAwG;IACjG,iBAAiB,EAAE,MAAM,CAAM;IAEtC,mEAAmE;IAC5D,SAAS,EAAE,UAAU,CAAsB;IAElD,sFAAsF;IAC/E,UAAU,EAAE,UAAU,CAAsB;IAEnD,oFAAoF;IAC7E,cAAc,EAAE,MAAM,CAAM;IAEnC,oFAAoF;IAC7E,kBAAkB,EAAE,MAAM,CAAM;IAEvC,mFAAmF;IAC5E,cAAc,EAAE,MAAM,CAAM;IAEnC,yCAAyC;IAClC,YAAY,EAAE,MAAM,CAAK;IAEhC,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,8CAA8C;IACvC,cAAc,EAAE,OAAO,CAAS;IAEvC,uIAAuI;IAChI,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAS;IAE/C,2HAA2H;IACpH,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,uNAAuN;IAChN,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAS;IAErD,uNAAuN;IAChN,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,+OAA+O;IACxO,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,6OAA6O;IACtO,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,oMAAoM;IAC7L,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,yMAAyM;IAClM,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAS;IAEhD,6PAA6P;IACtP,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,oJAAoJ;IAC7I,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAS;IAEtD,kKAAkK;IAC3J,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,kQAAkQ;IAC3P,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAS;IAE3D,kPAAkP;IAC3O,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,8LAA8L;IACvL,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,wOAAwO;IACjO,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAK;IAE1C,oJAAoJ;IAC7I,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAK;IAEzC,8LAA8L;IACvL,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAK;IAExC,2LAA2L;IACpL,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAK;IAE5C,8MAA8M;IACvM,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAK;IAE9C,yMAAyM;IAClM,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,8MAA8M;IACvM,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAK;IAE9C,oJAAoJ;IAC7I,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAS;IAE9C,2UAA2U;IACpU,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAS;IAEtD,ySAAyS;IAClS,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAS;IAEjD,2HAA2H;IACpH,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAS;IAErD,uNAAuN;IAChN,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAS;IAEvD,6OAA6O;IACtO,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,yMAAyM;IAClM,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAElD,kKAAkK;IAC3J,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,8LAA8L;IACvL,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAK;IAE1C,kZAAkZ;IAC3Y,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAS;IAEvD,mXAAmX;IAC5W,CAAC,2BAA2B,CAAC,EAAE,MAAM,CAAK;IAEjD,2HAA2H;IACpH,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,mHAAmH;IAC5G,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAEnD,sQAAsQ;IAC/P,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAS;IAEpD,sYAAsY;IAC/X,CAAC,qCAAqC,CAAC,EAAE,OAAO,CAAS;IAEhE,6fAA6f;IACtf,CAAC,6CAA6C,CAAC,EAAE,OAAO,CAAS;IAExE,k3BAAk3B;IAC32B,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAK;IAEzC,0DAA0D;IACnD,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAS;IAE7C,qFAAqF;gBAClE,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,6BAA6B;AAC7B,qBAAa,kBAAkB;IAE3B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,6EAA6E;gBAC1D,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,2BAA2B;AAC3B,qBAAa,iBAAiB;IAE1B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,uCAAuC;IAChC,OAAO,EAAE,MAAM,CAAK;IAE3B,0EAA0E;gBACvD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,+BAA+B;AAC/B,qBAAa,gBAAgB;IAEzB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,yBAAyB;IAClB,QAAQ,EAAE,MAAM,CAAM;IAE7B,6EAA6E;gBAC1D,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,qBAAqB;AACrB,qBAAa,eAAe;IAExB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,kEAAkE;gBAC/C,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,uBAAuB;AACvB,qBAAa,iBAAiB;IAE1B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,aAAa;IACN,OAAO,EAAE,MAAM,CAAK;IAE3B,sEAAsE;gBACnD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,uBAAuB;AACvB,qBAAa,UAAU;IAEnB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,yCAAyC;IAClC,eAAe,EAAE,MAAM,CAAM;IAEpC,+DAA+D;gBAC5C,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAIhD;AAED,6BAA6B;AAC7B,qBAAa,mBAAmB;IAE5B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,mBAAmB;IACZ,QAAQ,EAAE,MAAM,CAAM;IAE7B,8EAA8E;gBAC3D,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,sBAAsB;AACtB,qBAAa,SAAS;IAElB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,6DAA6D;gBAC1C,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAI/C;AAED,8BAA8B;AAC9B,qBAAa,0BAA0B;IAEnC,sBAAsB;IACf,QAAQ,EAAE,MAAM,CAAM;IAE7B,sFAAsF;gBACnE,IAAI,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC;CAIhE;AAED,qCAAqC;AACrC,qBAAa,oBAAoB;IAE7B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,kBAAkB;IACX,UAAU,EAAE,SAAS,EAAE,CAAM;IAEpC,uFAAuF;gBACpE,IAAI,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;CAI1D;AAED,kCAAkC;AAClC,qBAAa,mBAAmB;IAE5B,6BAA6B;IACtB,OAAO,EAAE,MAAM,CAAK;IAE3B,cAAc;IACP,eAAe,EAAE,MAAM,CAAM;IAEpC,aAAa;IACN,cAAc,EAAE,MAAM,CAAM;IAEnC,sBAAsB;IACf,UAAU,EAAE,IAAI,CAAc;IAErC,mFAAmF;gBAChE,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,4BAA4B;AAC5B,qBAAa,eAAe;IAExB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,qBAAqB;IACd,MAAM,EAAE,mBAAmB,EAAE,CAAM;IAE1C,yEAAyE;gBACtD,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,yBAAyB;AACzB,oBAAY,oBAAoB;IAE5B,iBAAiB;IACjB,MAAM,IAAI;IAEV,4BAA4B;IAC5B,IAAI,IAAI;IAER,uBAAuB;IACvB,KAAK,IAAI;IAET,4BAA4B;IAC5B,UAAU,IAAI;IAEd,0BAA0B;IAC1B,OAAO,IAAI;IAEX,yBAAyB;IACzB,QAAQ,IAAI;IAEZ,sBAAsB;IACtB,OAAO,IAAI;IAEX,sBAAsB;IACtB,QAAQ,IAAI;IAEZ,WAAW;IACX,IAAI,IAAI;IAER,cAAc;IACd,OAAO,IAAI;CAEd;AAED,mCAAmC;AACnC,qBAAa,wBAAwB;IAEjC,sBAAsB;IACf,QAAQ,EAAE,MAAM,CAAM;IAE7B,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,iBAAiB;IACV,KAAK,EAAE,MAAM,CAAM;IAE1B,kBAAkB;IACX,QAAQ,EAAE,MAAM,CAAK;IAE5B,qBAAqB;IACd,gBAAgB,EAAE,IAAI,CAAc;IAE3C,sBAAsB;IACf,QAAQ,EAAE,oBAAoB,CAAK;IAE1C,yFAAyF;gBACtE,IAAI,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC;CAI9D;AAED,6BAA6B;AAC7B,qBAAa,oBAAoB;IAE7B,4BAA4B;IACrB,iBAAiB,EAAE,MAAM,CAAK;IAErC,sBAAsB;IACf,cAAc,EAAE,wBAAwB,EAAE,CAAM;IAEvD,+EAA+E;gBAC5D,IAAI,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;CAI1D;AAED,oBAAoB;AACpB,qBAAa,iBAAiB;IAE1B,aAAa;IACN,OAAO,EAAE,MAAM,CAAK;IAE3B,mCAAmC;IAC5B,WAAW,EAAE,MAAM,CAAM;IAEhC,mEAAmE;gBAChD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,eAAe;AACf,qBAAa,aAAa;IAEtB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,eAAe;IACR,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAEzC,0DAA0D;gBACvC,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,yBAAyB;AACzB,qBAAa,kBAAkB;IAE3B,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,iBAAiB;IACV,aAAa,EAAE,IAAI,CAAc;IAExC,sBAAsB;IACf,aAAa,EAAE,IAAI,CAAc;IAExC,kBAAkB;IACX,cAAc,EAAE,UAAU,CAAsB;IAEvD,iBAAiB;IACV,YAAY,EAAE,MAAM,CAAM;IAEjC,kBAAkB;IACX,QAAQ,EAAE,MAAM,CAAK;IAE5B,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,yEAAyE;gBACtD,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,oBAAoB;AACpB,qBAAa,cAAc;IAEvB,uBAAuB;IAChB,WAAW,EAAE,MAAM,CAAM;IAEhC,gBAAgB;IACT,SAAS,EAAE,kBAAkB,EAAE,CAAM;IAE5C,gEAAgE;gBAC7C,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,2BAA2B;AAC3B,qBAAa,mBAAmB;IAE5B,mBAAmB;IACZ,QAAQ,EAAE,YAAY,EAAE,CAAM;IAErC,4EAA4E;gBACzD,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,0CAA0C;AAC1C,qBAAa,iBAAiB;IAE1B,kBAAkB;IACX,cAAc,EAAE,MAAM,CAAM;IAEnC,4CAA4C;IACrC,yBAAyB,EAAE,MAAM,CAAM;IAE9C,yFAAyF;gBACtE,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,qCAAqC;AACrC,qBAAa,aAAa;IAEtB,qCAAqC;IAC9B,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAEzC,gFAAgF;gBAC7D,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,4CAA4C;AAC5C,qBAAa,kBAAkB;IAE3B,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,iBAAiB;IACV,eAAe,EAAE,OAAO,CAAS;IAExC,sBAAsB;IACf,gBAAgB,EAAE,IAAI,CAAc;IAE3C,iBAAiB;IACV,KAAK,EAAE,MAAM,CAAM;IAE1B,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,YAAY;IACL,SAAS,EAAE,MAAM,CAAK;IAE7B,yBAAyB;IAClB,eAAe,EAAE,MAAM,CAAK;IAEnC,gCAAgC;IACzB,qBAAqB,EAAE,MAAM,CAAK;IAEzC,qBAAqB;IACd,WAAW,EAAE,MAAM,CAAK;IAE/B,yCAAyC;IAClC,yBAAyB,EAAE,MAAM,CAAK;IAE7C,yCAAyC;IAClC,yBAAyB,EAAE,MAAM,CAAK;IAE7C,4FAA4F;gBACzE,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,qCAAqC;AACrC,qBAAa,cAAc;IAEvB,gCAAgC;IACzB,WAAW,EAAE,MAAM,CAAK;IAE/B,2BAA2B;IACpB,cAAc,EAAE,kBAAkB,EAAE,CAAM;IAEjD,iFAAiF;gBAC9D,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,qCAAqC;AACrC,qBAAa,mBAAmB;IAE5B,gBAAgB;IACT,QAAQ,EAAE,MAAM,CAAM;IAE7B,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,WAAW;IACJ,QAAQ,EAAE,MAAM,CAAM;IAE7B,sBAAsB;IACf,YAAY,EAAE,MAAM,CAAK;IAEhC,oBAAoB;IACb,eAAe,EAAE,OAAO,CAAS;IAExC,sFAAsF;gBACnE,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,wBAAwB;AACxB,qBAAa,eAAe;IAExB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,iBAAiB;IACV,SAAS,EAAE,mBAAmB,EAAE,CAAM;IAE7C,qEAAqE;gBAClD,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,+BAA+B;AAC/B,qBAAa,iBAAiB;IAE1B,kCAAkC;IAC3B,WAAW,EAAE,MAAM,CAAM;IAEhC,mBAAmB;IACZ,WAAW,EAAE,OAAO,CAAS;IAEpC,yDAAyD;IAClD,WAAW,EAAE,aAAa,CAAK;IAEtC,sBAAsB;IACf,YAAY,EAAE,MAAM,CAAK;IAEhC,kCAAkC;IAC3B,aAAa,EAAE,MAAM,CAAK;IAEjC,oCAAoC;IAC7B,eAAe,EAAE,MAAM,CAAK;IAEnC,0CAA0C;IACnC,gBAAgB,EAAE,MAAM,CAAK;IAEpC,yCAAyC;IAClC,eAAe,EAAE,MAAM,CAAK;IAEnC,uCAAuC;IAChC,eAAe,EAAE,IAAI,CAAc;IAE1C,+BAA+B;IACxB,gBAAgB,EAAE,IAAI,CAAc;IAE3C,6BAA6B;IACtB,cAAc,EAAE,IAAI,CAAc;IAEzC,mCAAmC;IAC5B,YAAY,EAAE,MAAM,CAAK;IAEhC,kDAAkD;IAC3C,oBAAoB,EAAE,OAAO,CAAS;IAE7C,yCAAyC;IAClC,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,6BAA6B;IACtB,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,yCAAyC;IAClC,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,6BAA6B;IACtB,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,8EAA8E;gBAC3D,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,yBAAyB;AACzB,qBAAa,aAAa;IAEtB,6BAA6B;IACtB,UAAU,EAAE,MAAM,CAAK;IAE9B,mBAAmB;IACZ,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAEzC,oEAAoE;gBACjD,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,oCAAoC;AACpC,qBAAa,qBAAqB;IAE9B,aAAa;IACN,OAAO,EAAE,MAAM,CAAK;IAE3B,mBAAmB;IACZ,eAAe,EAAE,MAAM,CAAM;IAEpC,iBAAiB;IACV,YAAY,EAAE,MAAM,CAAM;IAEjC,2BAA2B;IACpB,kBAAkB,EAAE,OAAO,CAAS;IAE3C,6BAA6B;IACtB,cAAc,EAAE,IAAI,CAAc;IAEzC,oBAAoB;IACb,cAAc,EAAE,IAAI,CAAc;IAEzC,mBAAmB;IACZ,eAAe,EAAE,OAAO,CAAS;IAExC,uBAAuB;IAChB,kBAAkB,EAAE,MAAM,CAAM;IAEvC,uFAAuF;gBACpE,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;CAI3D;AAED,8BAA8B;AAC9B,qBAAa,iBAAiB;IAE1B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,gBAAgB;IACT,OAAO,EAAE,qBAAqB,EAAE,CAAM;IAE7C,6EAA6E;gBAC1D,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,oCAAoC;AACpC,qBAAa,cAAc;IAEvB,0BAA0B;IACnB,QAAQ,EAAE,MAAM,CAAM;IAE7B,6BAA6B;IACtB,QAAQ,EAAE,UAAU,EAAE,CAAM;IAEnC,gFAAgF;gBAC7D,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,sCAAsC;AACtC,qBAAa,kBAAkB;IAE3B,iCAAiC;IAC1B,QAAQ,EAAE,MAAM,CAAM;IAE7B,kDAAkD;IAC3C,iBAAiB,EAAE,MAAM,CAAK;IAErC,+BAA+B;IACxB,aAAa,EAAE,MAAM,CAAK;IAEjC,qBAAqB;IACd,WAAW,EAAE,OAAO,CAAS;IAEpC,kBAAkB;IACX,WAAW,EAAE,OAAO,CAAS;IAEpC,sFAAsF;gBACnE,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,iCAAiC;AACjC,qBAAa,cAAc;IAEvB,0BAA0B;IACnB,QAAQ,EAAE,kBAAkB,EAAE,CAAM;IAE3C,6EAA6E;gBAC1D,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,gCAAgC;AAChC,qBAAa,iBAAiB;IAE1B,qBAAqB;IACd,QAAQ,EAAE,MAAM,CAAM;IAE7B,8BAA8B;IACvB,OAAO,EAAE,aAAa,EAAE,CAAM;IAErC,+EAA+E;gBAC5D,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,qCAAqC;AACrC,qBAAa,kBAAkB;IAE3B,qCAAqC;IAC9B,eAAe,EAAE,MAAM,CAAM;IAEpC,kBAAkB;IACX,WAAW,EAAE,OAAO,CAAS;IAEpC,uEAAuE;IAChE,cAAc,EAAE,OAAO,CAAS;IAEvC,6EAA6E;IACtE,aAAa,EAAE,MAAM,CAAK;IAEjC,iCAAiC;IAC1B,gBAAgB,EAAE,IAAI,CAAc;IAE3C,8CAA8C;IACvC,YAAY,EAAE,MAAM,CAAM;IAEjC,2BAA2B;IACpB,iBAAiB,EAAE,MAAM,CAAM;IAEtC,qFAAqF;gBAClE,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,8BAA8B;AAC9B,qBAAa,cAAc;IAEvB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,oCAAoC;IAC7B,WAAW,EAAE,MAAM,CAAK;IAE/B,sCAAsC;IAC/B,QAAQ,EAAE,kBAAkB,EAAE,CAAM;IAE3C,0EAA0E;gBACvD,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,6BAA6B;AAC7B,qBAAa,sBAAsB;IAE/B,yCAAyC;IAClC,SAAS,EAAE,MAAM,CAAK;IAE7B,mBAAmB;IACZ,YAAY,EAAE,OAAO,CAAS;IAErC,sEAAsE;IAC/D,WAAW,EAAE,OAAO,CAAS;IAEpC,iFAAiF;gBAC9D,IAAI,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC;CAI5D;AAED,wBAAwB;AACxB,qBAAa,kBAAkB;IAE3B,6BAA6B;IACtB,YAAY,EAAE,sBAAsB,EAAE,CAAM;IAEnD,wEAAwE;gBACrD,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,+BAA+B;AAC/B,qBAAa,qBAAqB;IAE9B,wBAAwB;IACjB,eAAe,EAAE,iBAAiB,EAAE,CAAM;IAEjD,kFAAkF;gBAC/D,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;CAI3D;AAED,2BAA2B;AAC3B,qBAAa,qBAAqB;IAE9B,kBAAkB;IACX,cAAc,EAAE,MAAM,CAAM;IAEnC,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAK;IAEhC,sBAAsB;IACf,cAAc,EAAE,IAAI,CAAc;IAEzC,8EAA8E;gBAC3D,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;CAI3D;AAED,2BAA2B;AAC3B,qBAAa,iBAAiB;IAE1B,oBAAoB;IACb,QAAQ,EAAE,qBAAqB,EAAE,CAAM;IAE9C,0EAA0E;gBACvD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,yCAAyC;AACzC,qBAAa,sBAAsB;IAE/B,aAAa;IACN,OAAO,EAAE,MAAM,CAAK;IAE3B,mBAAmB;IACZ,eAAe,EAAE,MAAM,CAAM;IAEpC,kBAAkB;IACX,cAAc,EAAE,UAAU,CAAsB;IAEvD,6BAA6B;IACtB,cAAc,EAAE,IAAI,CAAc;IAEzC,oBAAoB;IACb,cAAc,EAAE,IAAI,CAAc;IAEzC,mBAAmB;IACZ,eAAe,EAAE,OAAO,CAAS;IAExC,uBAAuB;IAChB,kBAAkB,EAAE,MAAM,CAAM;IAEvC,cAAc;IACP,UAAU,EAAE,MAAM,CAAK;IAE9B,6FAA6F;gBAC1E,IAAI,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC;CAI5D;AAED,mCAAmC;AACnC,qBAAa,kBAAkB;IAE3B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,gBAAgB;IACT,QAAQ,EAAE,sBAAsB,EAAE,CAAM;IAE/C,mFAAmF;gBAChE,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,gCAAgC;AAChC,oBAAY,iBAAiB;IAEzB,UAAU;IACV,GAAG,IAAI;IAEP,UAAU;IACV,GAAG,IAAI;IAEP,UAAU;IACV,GAAG,IAAI;IAEP,WAAW;IACX,IAAI,IAAI;CAEX;AAED,iCAAiC;AACjC,oBAAY,iBAAiB;IAEzB,iBAAiB;IACjB,UAAU,IAAI;IAEd,wDAAwD;IACxD,SAAS,IAAI;IAEb,0BAA0B;IAC1B,SAAS,IAAI;IAEb,6BAA6B;IAC7B,WAAW,IAAI;IAEf,oCAAoC;IACpC,cAAc,IAAI;CAErB;AAED,8BAA8B;AAC9B,qBAAa,iBAAiB;IAE1B,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,eAAe;IACR,YAAY,EAAE,iBAAiB,CAAK;IAE3C,wBAAwB;IACjB,QAAQ,EAAE,MAAM,CAAM;IAE7B,uBAAuB;IAChB,WAAW,EAAE,MAAM,CAAM;IAEhC,yBAAyB;IAClB,WAAW,EAAE,MAAM,CAAK;IAE/B,6BAA6B;IACtB,SAAS,EAAE,MAAM,CAAM;IAE9B,4BAA4B;IACrB,YAAY,EAAE,MAAM,CAAM;IAEjC,8BAA8B;IACvB,YAAY,EAAE,MAAM,CAAK;IAEhC,sBAAsB;IACf,cAAc,EAAE,IAAI,CAAc;IAEzC,8BAA8B;IACvB,eAAe,EAAE,IAAI,CAAc;IAE1C,wBAAwB;IACjB,YAAY,EAAE,MAAM,CAAK;IAEhC,mBAAmB;IACZ,YAAY,EAAE,MAAM,CAAK;IAEhC,gBAAgB;IACT,aAAa,EAAE,iBAAiB,CAAK;IAE5C,6EAA6E;gBAC1D,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,mBAAmB;AACnB,qBAAa,aAAa;IAEtB,uBAAuB;IAChB,WAAW,EAAE,MAAM,CAAM;IAEhC,eAAe;IACR,QAAQ,EAAE,iBAAiB,EAAE,CAAM;IAE1C,8DAA8D;gBAC3C,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,sCAAsC;AACtC,qBAAa,qBAAqB;IAE9B,mBAAmB;IACZ,QAAQ,EAAE,MAAM,CAAM;IAE7B,qBAAqB;IACd,kBAAkB,EAAE,OAAO,CAAS;IAE3C,yBAAyB;IAClB,kBAAkB,EAAE,MAAM,CAAM;IAEvC,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,iBAAiB;IACV,WAAW,EAAE,MAAM,CAAM;IAEhC,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,mDAAmD;IAC5C,aAAa,EAAE,MAAM,CAAK;IAEjC,mDAAmD;IAC5C,iBAAiB,EAAE,MAAM,CAAK;IAErC,8BAA8B;IACvB,cAAc,EAAE,MAAM,CAAK;IAElC,oCAAoC;IAC7B,aAAa,EAAE,MAAM,CAAK;IAEjC,+BAA+B;IACxB,aAAa,EAAE,OAAO,CAAS;IAEtC,iCAAiC;IAC1B,kBAAkB,EAAE,OAAO,CAAS;IAE3C,0CAA0C;IACnC,eAAe,EAAE,OAAO,CAAS;IAExC,sCAAsC;IAC/B,eAAe,EAAE,OAAO,CAAS;IAExC,wBAAwB;IACjB,sBAAsB,EAAE,OAAO,CAAS;IAE/C,yBAAyB;IAClB,uBAAuB,EAAE,OAAO,CAAS;IAEhD,cAAc;IACP,UAAU,EAAE,MAAM,CAAK;IAE9B,mCAAmC;IAC5B,YAAY,EAAE,UAAU,CAAsB;IAErD,6BAA6B;IACtB,cAAc,EAAE,IAAI,CAAc;IAEzC,uCAAuC;IAChC,eAAe,EAAE,IAAI,CAAc;IAE1C,yFAAyF;gBACtE,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;CAI3D;AAED,6BAA6B;AAC7B,qBAAa,iBAAiB;IAE1B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,wBAAwB;IACjB,WAAW,EAAE,qBAAqB,EAAE,CAAM;IAEjD,4EAA4E;gBACzD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,+BAA+B;AAC/B,qBAAa,kBAAkB;IAE3B,gBAAgB;IACT,QAAQ,EAAE,MAAM,CAAM;IAE7B,iBAAiB;IACV,aAAa,EAAE,MAAM,CAAM;IAElC,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,WAAW;IACJ,QAAQ,EAAE,MAAM,CAAM;IAE7B,4BAA4B;IACrB,YAAY,EAAE,kBAAkB,CAAK;IAE5C,uBAAuB;IAChB,YAAY,EAAE,MAAM,CAAK;IAEhC,+BAA+B;IACxB,gBAAgB,EAAE,IAAI,CAAc;IAE3C,oBAAoB;IACb,eAAe,EAAE,OAAO,CAAS;IAExC,kDAAkD;IAC3C,oBAAoB,EAAE,OAAO,CAAS;IAE7C,sDAAsD;IAC/C,oBAAoB,EAAE,OAAO,CAAS;IAE7C,sBAAsB;IACf,UAAU,EAAE,IAAI,CAAc;IAErC,yCAAyC;IAClC,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,6BAA6B;IACtB,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,yCAAyC;IAClC,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,6BAA6B;IACtB,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAK;IAElD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,2BAA2B;IACpB,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAK;IAEhD,+EAA+E;gBAC5D,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,0BAA0B;AAC1B,qBAAa,cAAc;IAEvB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,gBAAgB;IACT,QAAQ,EAAE,kBAAkB,EAAE,CAAM;IAE3C,sEAAsE;gBACnD,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,wCAAwC;AACxC,qBAAa,KAAK;IAEd,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,eAAe;IACR,YAAY,EAAE,MAAM,CAAK;IAEhC,kBAAkB;IACX,SAAS,EAAE,OAAO,CAAS;IAElC,8DAA8D;IACvD,WAAW,EAAE,OAAO,CAAS;IAEpC,iBAAiB;IACV,YAAY,EAAE,MAAM,CAAM;IAEjC,qDAAqD;IAC9C,aAAa,EAAE,MAAM,CAAM;IAElC,2EAA2E;gBACxD,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;CAI3C;AAED,mCAAmC;AACnC,qBAAa,YAAY;IAErB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,mCAAmC;IAC5B,MAAM,EAAE,KAAK,EAAE,CAAM;IAE5B,6EAA6E;gBAC1D,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CAIlD;AAED,cAAc;AACd,qBAAa,SAAS;IAElB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,2CAA2C;IACpC,OAAO,EAAE,UAAU,CAAsB;IAEhD,qDAAqD;gBAClC,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAI/C;AAED,gCAAgC;AAChC,qBAAa,iBAAiB;IAE1B,4CAA4C;IACrC,cAAc,EAAE,OAAO,CAAS;IAEvC,kEAAkE;IAC3D,gBAAgB,EAAE,OAAO,CAAS;IAEzC,+EAA+E;gBAC5D,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,uCAAuC;AACvC,qBAAa,mBAAmB;IAE5B,wDAAwD;IACjD,wBAAwB,EAAE,OAAO,CAAS;IAEjD,8CAA8C;IACvC,oBAAoB,EAAE,OAAO,CAAS;IAE7C,wFAAwF;gBACrE,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,wBAAwB;AACxB,qBAAa,cAAc;IAEvB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,oCAAoC;IAC7B,OAAO,EAAE,MAAM,CAAK;IAE3B,wCAAwC;IACjC,QAAQ,EAAE,UAAU,CAAsB;IAEjD,oEAAoE;gBACjD,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,kCAAkC;AAClC,qBAAa,OAAO;IAEhB,WAAW;IACJ,YAAY,EAAE,MAAM,CAAM;IAEjC,YAAY;IACL,aAAa,EAAE,MAAM,CAAK;IAEjC,iBAAiB;IACV,kBAAkB,EAAE,MAAM,CAAM;IAEvC,uEAAuE;gBACpD,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;CAI7C;AAED,kCAAkC;AAClC,qBAAa,WAAW;IAEpB,kCAAkC;IAC3B,QAAQ,EAAE,OAAO,EAAE,CAAM;IAEhC,2EAA2E;gBACxD,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;CAIjD;AAED,uBAAuB;AACvB,qBAAa,YAAY;IAErB,2DAA2D;IACpD,YAAY,EAAE,MAAM,CAAM;IAEjC,gBAAgB;IACT,YAAY,EAAE,UAAU,CAAsB;IAErD,iEAAiE;gBAC9C,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CAIlD;AAED,6BAA6B;AAC7B,qBAAa,oBAAoB;IAE7B,sBAAsB;IACf,QAAQ,EAAE,MAAM,CAAM;IAE7B,WAAW;IACJ,QAAQ,EAAE,oBAAoB,CAAK;IAE1C,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,iBAAiB;IACV,KAAK,EAAE,MAAM,CAAM;IAE1B,kBAAkB;IACX,QAAQ,EAAE,MAAM,CAAK;IAE5B,qBAAqB;IACd,gBAAgB,EAAE,IAAI,CAAc;IAE3C,oBAAoB;IACb,aAAa,EAAE,MAAM,CAAM;IAElC,qBAAqB;IACd,aAAa,EAAE,MAAM,CAAK;IAEjC,0BAA0B;IACnB,eAAe,EAAE,MAAM,CAAK;IAEnC,oBAAoB;IACb,aAAa,EAAE,MAAM,CAAM;IAElC,qBAAqB;IACd,aAAa,EAAE,MAAM,CAAK;IAEjC,0BAA0B;IACnB,eAAe,EAAE,MAAM,CAAK;IAEnC,+EAA+E;gBAC5D,IAAI,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;CAI1D;AAED,iBAAiB;AACjB,oBAAY,eAAe;IAEvB,4BAA4B;IAC5B,MAAM,IAAI;IAEV,uCAAuC;IACvC,IAAI,IAAI;IAER,wCAAwC;IACxC,KAAK,IAAI;CAEZ;AAED,qCAAqC;AACrC,qBAAa,mBAAmB;IAE5B,6BAA6B;IACtB,YAAY,EAAE,MAAM,CAAK;IAEhC,+BAA+B;IACxB,eAAe,EAAE,MAAM,CAAM;IAEpC,6BAA6B;IACtB,YAAY,EAAE,MAAM,CAAK;IAEhC,+BAA+B;IACxB,eAAe,EAAE,MAAM,CAAM;IAEpC,6BAA6B;IACtB,mBAAmB,EAAE,MAAM,CAAM;IAExC,wCAAwC;IACjC,eAAe,EAAE,MAAM,CAAM;IAEpC,kBAAkB;IACX,aAAa,EAAE,MAAM,CAAM;IAElC,6CAA6C;IACtC,eAAe,EAAE,MAAM,CAAM;IAEpC,6CAA6C;IACtC,eAAe,EAAE,MAAM,CAAM;IAEpC,sFAAsF;gBACnE,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,mCAAmC;AACnC,qBAAa,kBAAkB;IAE3B,2BAA2B;IACpB,aAAa,EAAE,eAAe,CAAK;IAE1C,6BAA6B;IACtB,iBAAiB,EAAE,MAAM,CAAM;IAEtC,+BAA+B;IACxB,aAAa,EAAE,MAAM,CAAK;IAEjC,6BAA6B;IACtB,iBAAiB,EAAE,MAAM,CAAM;IAEtC,4BAA4B;IACrB,iBAAiB,EAAE,MAAM,CAAM;IAEtC,mFAAmF;gBAChE,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,6BAA6B;AAC7B,qBAAa,cAAc;IAEvB,WAAW;IACJ,QAAQ,EAAE,MAAM,CAAM;IAE7B,WAAW;IACJ,SAAS,EAAE,MAAM,CAAK;IAE7B,iBAAiB;IACV,cAAc,EAAE,MAAM,CAAM;IAEnC,yEAAyE;gBACtD,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,kCAAkC;AAClC,qBAAa,iBAAiB;IAE1B,uBAAuB;IAChB,WAAW,EAAE,MAAM,CAAM;IAEhC,gBAAgB;IACT,eAAe,EAAE,cAAc,EAAE,CAAM;IAE9C,iFAAiF;gBAC9D,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,yCAAyC;AACzC,qBAAa,0BAA0B;IAEnC,iBAAiB;IACV,KAAK,EAAE,MAAM,CAAM;IAE1B,kBAAkB;IACX,QAAQ,EAAE,MAAM,CAAK;IAE5B,mBAAmB;IACZ,WAAW,EAAE,OAAO,CAAS;IAEpC,sBAAsB;IACf,aAAa,EAAE,MAAM,CAAK;IAEjC,4BAA4B;IACrB,cAAc,EAAE,IAAI,CAAc;IAEzC,4BAA4B;IACrB,qBAAqB,EAAE,IAAI,CAAc;IAEhD,mCAAmC;IAC5B,uBAAuB,EAAE,IAAI,CAAc;IAElD,wBAAwB;IACjB,UAAU,EAAE,MAAM,CAAK;IAE9B,iCAAiC;IAC1B,gBAAgB,EAAE,MAAM,CAAK;IAEpC,+BAA+B;IACxB,aAAa,EAAE,MAAM,CAAK;IAEjC,iGAAiG;gBAC9E,IAAI,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC;CAIhE;AAED,mCAAmC;AACnC,qBAAa,aAAa;IAEtB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,kBAAkB;IACX,eAAe,EAAE,OAAO,CAAS;IAExC,8EAA8E;gBAC3D,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,iDAAiD;AACjD,qBAAa,cAAc;IAEvB,SAAS;IACF,MAAM,EAAE,MAAM,CAAK;IAE1B,mFAAmF;IAC5E,eAAe,EAAE,OAAO,CAAS;IAExC,kCAAkC;IAC3B,gBAAgB,EAAE,IAAI,CAAc;IAE3C,iBAAiB;IACV,KAAK,EAAE,MAAM,CAAM;IAE1B,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,YAAY;IACL,SAAS,EAAE,MAAM,CAAK;IAE7B,6BAA6B;IACtB,WAAW,EAAE,MAAM,CAAK;IAE/B,mBAAmB;IACZ,SAAS,EAAE,MAAM,EAAE,CAAM;IAEhC,yBAAyB;IAClB,cAAc,EAAE,UAAU,CAAsB;IAEvD,yBAAyB;IAClB,cAAc,EAAE,MAAM,CAAK;IAElC,kCAAkC;IAC3B,QAAQ,EAAE,aAAa,EAAE,CAAM;IAEtC,oCAAoC;IAC7B,eAAe,EAAE,MAAM,CAAK;IAEnC,gCAAgC;IACzB,qBAAqB,EAAE,MAAM,CAAK;IAEzC,iCAAiC;IAC1B,UAAU,EAAE,MAAM,CAAK;IAE9B,6FAA6F;gBAC1E,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAIpD;AAED,gCAAgC;AAChC,qBAAa,UAAU;IAEnB,qBAAqB;IACd,cAAc,EAAE,gBAAgB,CAAK;IAE5C,8EAA8E;IACvE,WAAW,EAAE,MAAM,CAAK;IAE/B,0NAA0N;IACnN,SAAS,EAAE,MAAM,EAAE,CAAM;IAEhC,uUAAuU;IAChU,WAAW,EAAE,MAAM,CAAM;IAEhC,wHAAwH;IACjH,kBAAkB,EAAE,MAAM,CAAM;IAEvC,gHAAgH;IACzG,kBAAkB,EAAE,MAAM,CAAK;IAEtC,yMAAyM;IAClM,2BAA2B,EAAE,MAAM,CAAM;IAEhD,waAAwa;IACja,UAAU,EAAE,MAAM,CAAK;IAE9B,gRAAgR;IACzQ,mBAAmB,EAAE,OAAO,CAAS;IAE5C,wEAAwE;gBACrD,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAIhD;AAED,sBAAsB;AACtB,oBAAY,mBAAmB;IAE3B,mBAAmB;IACnB,EAAE,IAAI;IAEN,qBAAqB;IACrB,MAAM,IAAI;IAEV,qBAAqB;IACrB,MAAM,IAAI;IAEV,mBAAmB;IACnB,IAAI,IAAI;IAER,kBAAkB;IAClB,GAAG,IAAI;IAEP,oBAAoB;IACpB,KAAK,IAAI;CAEZ;AAED,0BAA0B;AAC1B,oBAAY,sBAAsB;IAE9B,eAAe;IACf,IAAI,IAAI;IAER,kBAAkB;IAClB,MAAM,IAAI;IAEV,mBAAmB;IACnB,GAAG,IAAI;CAEV;AAED,sCAAsC;AACtC,oBAAY,2BAA2B;IAEnC,yBAAyB;IACzB,aAAa,IAAI;IAEjB,qBAAqB;IACrB,MAAM,IAAI;IAEV,eAAe;IACf,IAAI,IAAI;IAER,cAAc;IACd,GAAG,IAAI;IAEP,eAAe;IACf,IAAI,IAAI;IAER,aAAa;IACb,EAAE,IAAI;IAEN,cAAc;IACd,GAAG,IAAI;IAEP,mBAAmB;IACnB,QAAQ,IAAI;CAEf;AAED,uBAAuB;AACvB,qBAAa,YAAY;IAErB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,2DAA2D;IACpD,oBAAoB,EAAE,OAAO,CAAS;IAE7C,6DAA6D;IACtD,yBAAyB,EAAE,mBAAmB,CAAK;IAE1D,2DAA2D;IACpD,kBAAkB,EAAE,OAAO,CAAS;IAE3C,6DAA6D;IACtD,uBAAuB,EAAE,mBAAmB,CAAK;IAExD,oLAAoL;IAC7K,mBAAmB,EAAE,sBAAsB,EAAE,CAAM;IAE1D,iEAAiE;gBAC9C,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CAIlD;AAED,4BAA4B;AAC5B,qBAAa,YAAY;IAErB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,yBAAyB;IAClB,oBAAoB,EAAE,MAAM,CAAM;IAEzC,yBAAyB;IAClB,cAAc,EAAE,MAAM,CAAK;IAElC,iBAAiB;IACV,gBAAgB,EAAE,MAAM,CAAM;IAErC,4BAA4B;IACrB,uBAAuB,EAAE,MAAM,CAAK;IAE3C,sEAAsE;gBACnD,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CAIlD;AAED,wBAAwB;AACxB,qBAAa,eAAe;IAExB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,aAAa;IACN,WAAW,EAAE,OAAO,CAAS;IAEpC,kBAAkB;IACX,WAAW,EAAE,aAAa,CAAK;IAEtC,yBAAyB;IAClB,eAAe,EAAE,MAAM,CAAK;IAEnC,uCAAuC;IAChC,qBAAqB,EAAE,MAAM,CAAK;IAEzC,uCAAuC;IAChC,qBAAqB,EAAE,MAAM,CAAK;IAEzC,oCAAoC;IAC7B,kBAAkB,EAAE,MAAM,CAAK;IAEtC,sBAAsB;IACf,YAAY,EAAE,MAAM,CAAK;IAEhC,uBAAuB;IAChB,aAAa,EAAE,MAAM,CAAK;IAEjC,kCAAkC;IAC3B,gBAAgB,EAAE,MAAM,CAAK;IAEpC,iCAAiC;IAC1B,eAAe,EAAE,MAAM,CAAK;IAEnC,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,mCAAmC;IAC5B,qBAAqB,EAAE,OAAO,CAAS;IAE9C,uCAAuC;IAChC,eAAe,EAAE,IAAI,CAAc;IAE1C,+BAA+B;IACxB,gBAAgB,EAAE,IAAI,CAAc;IAE3C,6BAA6B;IACtB,cAAc,EAAE,IAAI,CAAc;IAEzC,uBAAuB;IAChB,YAAY,EAAE,MAAM,CAAK;IAEhC,qEAAqE;gBAClD,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,gDAAgD;AAChD,qBAAa,gBAAgB;IAEzB,oIAAoI;IAC7H,aAAa,EAAE,OAAO,CAAS;IAEtC,4JAA4J;IACrJ,eAAe,EAAE,OAAO,CAAS;IAExC,sQAAsQ;IAC/P,kBAAkB,EAAE,OAAO,CAAS;IAE3C,2ZAA2Z;IACpZ,gBAAgB,EAAE,MAAM,CAAM;IAErC,qSAAqS;IAC9R,mBAAmB,EAAE,MAAM,CAAM;IAExC,8FAA8F;gBAC3E,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,0BAA0B;AAC1B,oBAAY,uBAAuB;IAE/B,UAAU;IACV,GAAG,IAAI;IAEP,UAAU;IACV,GAAG,IAAI;CAEV;AAED,0BAA0B;AAC1B,qBAAa,UAAU;IAEnB,oDAAoD;IAC7C,mBAAmB,EAAE,OAAO,CAAS;IAE5C,6DAA6D;IACtD,mBAAmB,EAAE,MAAM,CAAM;IAExC,iDAAiD;IAC1C,mBAAmB,EAAE,MAAM,CAAK;IAEvC,oBAAoB;IACb,uBAAuB,EAAE,uBAAuB,CAAK;IAE5D,+CAA+C;IACxC,uBAAuB,EAAE,MAAM,CAAK;IAE3C,kEAAkE;gBAC/C,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAIhD;AAED,kCAAkC;AAClC,oBAAY,yBAAyB;IAEjC,iBAAiB;IACjB,UAAU,IAAI;IAEd,kBAAkB;IAClB,WAAW,IAAI;IAEf,iCAAiC;IACjC,IAAI,IAAI;IAER,0BAA0B;IAC1B,WAAW,IAAI;IAEf,oBAAoB;IACpB,KAAK,IAAI;IAET,iBAAiB;IACjB,IAAI,IAAI;CAEX;AAED,yBAAyB;AACzB,qBAAa,gBAAgB;IAEzB,2BAA2B;IACpB,cAAc,EAAE,MAAM,CAAM;IAEnC,yCAAyC;IAClC,eAAe,EAAE,MAAM,CAAM;IAEpC,yDAAyD;IAClD,WAAW,EAAE,OAAO,CAAS;IAEpC,6DAA6D;IACtD,cAAc,EAAE,OAAO,CAAS;IAEvC,yBAAyB;IAClB,iBAAiB,EAAE,yBAAyB,CAAK;IAExD,sCAAsC;IAC/B,cAAc,EAAE,MAAM,CAAM;IAEnC,oCAAoC;IAC7B,cAAc,EAAE,MAAM,CAAK;IAElC,0BAA0B;IACnB,qBAAqB,EAAE,MAAM,CAAM;IAE1C,6BAA6B;IACtB,oBAAoB,EAAE,MAAM,CAAK;IAExC,kCAAkC;IAC3B,sBAAsB,EAAE,MAAM,CAAK;IAE1C,iCAAiC;IAC1B,WAAW,EAAE,UAAU,CAAsB;IAEpD,yBAAyB;IAClB,WAAW,EAAE,UAAU,CAAsB;IAEpD,4BAA4B;IACrB,YAAY,EAAE,IAAI,CAAc;IAEvC,yDAAyD;IAClD,iCAAiC,EAAE,IAAI,CAAc;IAE5D,oDAAoD;IAC7C,iCAAiC,EAAE,IAAI,CAAc;IAE5D,yDAAyD;IAClD,6BAA6B,EAAE,MAAM,CAAK;IAEjD,sBAAsB;IACf,mBAAmB,EAAE,OAAO,CAAS;IAE5C,iBAAiB;IACV,QAAQ,EAAE,OAAO,CAAS;IAEjC,uDAAuD;IAChD,qBAAqB,EAAE,MAAM,CAAK;IAEzC,mDAAmD;IAC5C,qBAAqB,EAAE,MAAM,CAAK;IAEzC,mDAAmD;IAC5C,2BAA2B,EAAE,MAAM,CAAK;IAE/C,oDAAoD;IAC7C,6BAA6B,EAAE,MAAM,CAAK;IAEjD,wBAAwB;IACjB,eAAe,EAAE,OAAO,CAAS;IAExC,4BAA4B;IACrB,cAAc,EAAE,MAAM,CAAM;IAEnC,yBAAyB;IAClB,gBAAgB,EAAE,OAAO,CAAS;IAEzC,+CAA+C;IACxC,kBAAkB,EAAE,OAAO,CAAS;IAE3C,iDAAiD;IAC1C,oBAAoB,EAAE,MAAM,CAAM;IAEzC,sCAAsC;IAC/B,6BAA6B,EAAE,OAAO,CAAS;IAEtD,kDAAkD;IAC3C,2BAA2B,EAAE,OAAO,CAAS;IAEpD,mBAAmB;IACZ,eAAe,EAAE,MAAM,CAAM;IAEpC,sBAAsB;IACf,kBAAkB,EAAE,MAAM,CAAM;IAEvC,kBAAkB;IACX,cAAc,EAAE,UAAU,CAAsB;IAEvD,kCAAkC;IAC3B,iBAAiB,EAAE,MAAM,CAAK;IAErC,+BAA+B;IACxB,iBAAiB,EAAE,MAAM,CAAK;IAErC,mDAAmD;IAC5C,qBAAqB,EAAE,MAAM,CAAK;IAEzC,gDAAgD;IACzC,qBAAqB,EAAE,MAAM,CAAK;IAEzC,sDAAsD;IAC/C,iBAAiB,EAAE,OAAO,CAAS;IAE1C,uDAAuD;IAChD,kBAAkB,EAAE,OAAO,CAAS;IAE3C,cAAc;IACP,UAAU,EAAE,MAAM,CAAK;IAE9B,uEAAuE;gBACpD,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,kCAAkC;AAClC,qBAAa,oBAAoB;IAE7B,0FAA0F;IACnF,kBAAkB,EAAE,OAAO,CAAS;IAE3C,mPAAmP;IAC5O,mBAAmB,EAAE,MAAM,CAAM;IAExC,oGAAoG;IAC7F,eAAe,EAAE,OAAO,CAAS;IAExC,oFAAoF;gBACjE,IAAI,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;CAI1D;AAED,0BAA0B;AAC1B,qBAAa,WAAW;IAEpB,8BAA8B;IACvB,cAAc,EAAE,MAAM,CAAM;IAEnC,kBAAkB;IACX,cAAc,EAAE,UAAU,CAAsB;IAEvD,iBAAiB;IACV,KAAK,EAAE,MAAM,CAAM;IAE1B,kBAAkB;IACX,OAAO,EAAE,MAAM,CAAM;IAE5B,2CAA2C;IACpC,WAAW,EAAE,OAAO,CAAS;IAEpC,iCAAiC;IAC1B,OAAO,EAAE,MAAM,CAAK;IAE3B,iCAAiC;IAC1B,iBAAiB,EAAE,MAAM,CAAK;IAErC,iCAAiC;IAC1B,iBAAiB,EAAE,MAAM,CAAK;IAErC,kCAAkC;IAC3B,YAAY,EAAE,OAAO,CAAS;IAErC,4GAA4G;IACrG,mBAAmB,EAAE,MAAM,CAAM;IAExC,2GAA2G;IACpG,iBAAiB,EAAE,MAAM,CAAM;IAEtC,uFAAuF;IAChF,iBAAiB,EAAE,MAAM,CAAM;IAEtC,yFAAyF;IAClF,sBAAsB,EAAE,MAAM,CAAK;IAE1C,kUAAkU;IAC3T,qBAAqB,EAAE,MAAM,CAAM;IAE1C,oUAAoU;IAC7T,uBAAuB,EAAE,MAAM,CAAM;IAE5C,sUAAsU;IAC/T,wBAAwB,EAAE,MAAM,CAAM;IAE7C,0IAA0I;IACnI,kBAAkB,EAAE,MAAM,CAAM;IAEvC,2MAA2M;IACpM,YAAY,EAAE,OAAO,CAAS;IAErC,uDAAuD;IAChD,wBAAwB,EAAE,OAAO,CAAS;IAEjD,+uCAA+uC;IACxuC,kBAAkB,EAAE,MAAM,CAAM;IAEvC,mEAAmE;gBAChD,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;CAIjD;AAED,qBAAqB;AACrB,qBAAa,eAAe;IAExB,uBAAuB;IAChB,WAAW,EAAE,MAAM,CAAM;IAEhC,6BAA6B;IACtB,kBAAkB,EAAE,MAAM,CAAK;IAEtC,6BAA6B;IACtB,kBAAkB,EAAE,MAAM,CAAK;IAEtC,8BAA8B;IACvB,mBAAmB,EAAE,MAAM,CAAK;IAEvC,6BAA6B;IACtB,kBAAkB,EAAE,MAAM,CAAK;IAEtC,6BAA6B;IACtB,kBAAkB,EAAE,MAAM,CAAK;IAEtC,sDAAsD;IAC/C,iBAAiB,EAAE,OAAO,CAAS;IAE1C,sDAAsD;IAC/C,gBAAgB,EAAE,OAAO,CAAS;IAEzC,kEAAkE;gBAC/C,IAAI,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAIrD;AAED,eAAe;AACf,qBAAa,aAAa;IAEtB,kCAAkC;IAC3B,QAAQ,EAAE,UAAU,CAAsB;IAEjD,kCAAkC;IAC3B,OAAO,EAAE,UAAU,CAAsB;IAEhD,0DAA0D;gBACvC,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAInD;AAED,0BAA0B;AAC1B,qBAAa,SAAS;IAElB,qBAAqB;IACd,UAAU,EAAE,MAAM,CAAM;IAE/B,iEAAiE;gBAC9C,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAI/C;AAED,yBAAyB;AACzB,oBAAY,gBAAgB;IAExB,yBAAyB;IACzB,UAAU,IAAI;IAEd,6BAA6B;IAC7B,cAAc,IAAI;IAElB,yBAAyB;IACzB,UAAU,IAAI;CAEjB;AAED,4BAA4B;AAC5B,oBAAY,YAAY;IAEpB,iBAAiB;IACjB,UAAU,OAAO;IAEjB,iBAAiB;IACjB,UAAU,OAAO;IAEjB,iBAAiB;IACjB,UAAU,OAAO;IAEjB,wBAAwB;IACxB,eAAe,OAAO;IAEtB,iCAAiC;IACjC,wBAAwB,OAAO;IAE/B,4BAA4B;IAC5B,mBAAmB,OAAO;IAE1B,gDAAgD;IAChD,8BAA8B,OAAO;IAErC,qCAAqC;IACrC,4BAA4B,OAAO;IAEnC,4BAA4B;IAC5B,uBAAuB,OAAO;IAE9B,gCAAgC;IAChC,gBAAgB,OAAO;IAEvB,gCAAgC;IAChC,yBAAyB,OAAO;IAEhC,0BAA0B;IAC1B,mBAAmB,OAAO;IAE1B,mCAAmC;IACnC,4BAA4B,OAAO;IAEnC,qCAAqC;IACrC,8BAA8B,OAAO;IAErC,6BAA6B;IAC7B,uBAAuB,OAAO;IAE9B,iCAAiC;IACjC,gBAAgB,OAAO;IAEvB,8BAA8B;IAC9B,eAAe,OAAO;IAEtB,8BAA8B;IAC9B,uBAAuB,OAAO;IAE9B,sCAAsC;IACtC,gBAAgB,OAAO;IAEvB,2CAA2C;IAC3C,qBAAqB,OAAO;IAE5B,6CAA6C;IAC7C,uBAAuB,OAAO;IAE9B,6CAA6C;IAC7C,uBAAuB,OAAO;IAE9B,6BAA6B;IAC7B,uBAAuB,OAAO;IAE9B,iCAAiC;IACjC,gBAAgB,OAAO;IAEvB,oBAAoB;IACpB,6BAA6B,OAAO;IAEpC,0BAA0B;IAC1B,uBAAuB,OAAO;IAE9B,gBAAgB;IAChB,SAAS,OAAO;IAEhB,6BAA6B;IAC7B,sBAAsB,OAAO;IAE7B,gBAAgB;IAChB,SAAS,OAAO;IAEhB,0BAA0B;IAC1B,gBAAgB,OAAO;IAEvB,kBAAkB;IAClB,UAAU,OAAO;IAEjB,6BAA6B;IAC7B,iBAAiB,OAAO;IAExB,iBAAiB;IACjB,UAAU,OAAO;IAEjB,wBAAwB;IACxB,iBAAiB,OAAO;IAExB,0BAA0B;IAC1B,UAAU,OAAO;IAEjB,iCAAiC;IACjC,iBAAiB,OAAO;IAExB,mBAAmB;IACnB,YAAY,OAAO;IAEnB,YAAY;IACZ,KAAK,OAAO;IAEZ,cAAc;IACd,OAAO,OAAO;IAEd,aAAa;IACb,MAAM,OAAO;IAEb,UAAU;IACV,GAAG,OAAO;IAEV,cAAc;IACd,OAAO,OAAO;CAEjB;AAED,6BAA6B;AAC7B,qBAAa,gBAAgB;IAEzB,0BAA0B;IACnB,qBAAqB,EAAE,MAAM,CAAM;IAE1C,4BAA4B;IACrB,uBAAuB,EAAE,MAAM,CAAM;IAE5C,sCAAsC;IAC/B,yBAAyB,EAAE,MAAM,CAAM;IAE9C,mCAAmC;IAC5B,gBAAgB,EAAE,MAAM,CAAK;IAEpC,wCAAwC;IACjC,kBAAkB,EAAE,MAAM,CAAK;IAEtC,uBAAuB;IAChB,kBAAkB,EAAE,MAAM,CAAM;IAEvC,qBAAqB;IACd,cAAc,EAAE,gBAAgB,CAAK;IAE5C,wCAAwC;IACjC,kBAAkB,EAAE,IAAI,CAAc;IAE7C,kBAAkB;IACX,oBAAoB,EAAE,MAAM,CAAM;IAEzC,cAAc;IACP,UAAU,EAAE,YAAY,CAAK;IAEpC,0BAA0B;IACnB,iBAAiB,EAAE,MAAM,CAAK;IAErC,qBAAqB;IACd,gBAAgB,EAAE,MAAM,CAAM;IAErC,sBAAsB;IACf,iBAAiB,EAAE,MAAM,CAAM;IAEtC,qBAAqB;IACd,gBAAgB,EAAE,MAAM,CAAM;IAErC,iBAAiB;IACV,aAAa,EAAE,MAAM,CAAM;IAElC,kBAAkB;IACX,cAAc,EAAE,MAAM,CAAM;IAEnC,qBAAqB;IACd,iBAAiB,EAAE,MAAM,CAAM;IAEtC,2EAA2E;gBACxD,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,oBAAoB;AACpB,qBAAa,kBAAkB;IAE3B,qBAAqB;IACd,cAAc,EAAE,gBAAgB,CAAK;IAE5C,sCAAsC;IAC/B,qBAAqB,EAAE,MAAM,CAAK;IAEzC,sCAAsC;IAC/B,0BAA0B,EAAE,MAAM,CAAK;IAE9C,uCAAuC;IAChC,2BAA2B,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,eAAe,EAAE,MAAM,CAAK;IAEnC,gCAAgC;IACzB,oBAAoB,EAAE,MAAM,CAAK;IAExC,4BAA4B;IACrB,gBAAgB,EAAE,MAAM,CAAK;IAEpC,6BAA6B;IACtB,iBAAiB,EAAE,MAAM,CAAK;IAErC,+BAA+B;IACxB,oBAAoB,EAAE,MAAM,CAAK;IAExC,mCAAmC;IAC5B,oBAAoB,EAAE,MAAM,CAAK;IAExC,oCAAoC;IAC7B,qBAAqB,EAAE,MAAM,CAAK;IAEzC,kEAAkE;IAC3D,gBAAgB,EAAE,MAAM,CAAK;IAEpC,iEAAiE;IAC1D,eAAe,EAAE,MAAM,CAAK;IAEnC,sDAAsD;IAC/C,YAAY,EAAE,MAAM,CAAK;IAEhC,uDAAuD;IAChD,aAAa,EAAE,MAAM,CAAK;IAEjC,+EAA+E;IACxE,0BAA0B,EAAE,MAAM,CAAK;IAE9C,+EAA+E;IACxE,0BAA0B,EAAE,MAAM,CAAK;IAE9C,4FAA4F;IACrF,+BAA+B,EAAE,MAAM,CAAK;IAEnD,6FAA6F;IACtF,+BAA+B,EAAE,MAAM,CAAK;IAEnD,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,yCAAyC;IAClC,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,6BAA6B;IACtB,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAK;IAE/C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,2BAA2B;IACpB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAK;IAE7C,mBAAmB;IACZ,cAAc,EAAE,IAAI,CAAc;IAEzC,iDAAiD;IAC1C,eAAe,EAAE,MAAM,CAAK;IAEnC,+BAA+B;IACxB,YAAY,EAAE,IAAI,CAAc;IAEvC,uCAAuC;IAChC,eAAe,EAAE,MAAM,CAAK;IAEnC,sCAAsC;IAC/B,cAAc,EAAE,MAAM,CAAK;IAElC,sCAAsC;IAC/B,cAAc,EAAE,MAAM,CAAK;IAElC,qCAAqC;IAC9B,aAAa,EAAE,MAAM,CAAK;IAEjC,oCAAoC;IAC7B,YAAY,EAAE,MAAM,CAAK;IAEhC,oCAAoC;IAC7B,YAAY,EAAE,MAAM,CAAK;IAEhC,oEAAoE;gBACjD,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,yBAAyB;AACzB,qBAAa,mBAAmB;IAE5B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,uBAAuB;IAChB,QAAQ,EAAE,MAAM,CAAM;IAE7B,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,2DAA2D;IACpD,gBAAgB,EAAE,MAAM,CAAM;IAErC,iBAAiB;IACV,aAAa,EAAE,MAAM,CAAM;IAElC,yBAAyB;IAClB,aAAa,EAAE,OAAO,CAAS;IAEtC,wBAAwB;IACjB,oBAAoB,EAAE,MAAM,CAAM;IAEzC,uBAAuB;IAChB,gCAAgC,EAAE,MAAM,CAAM;IAErD,qBAAqB;IACd,WAAW,EAAE,OAAO,CAAS;IAEpC,qBAAqB;IACd,cAAc,EAAE,OAAO,CAAS;IAEvC,kCAAkC;IAC3B,iBAAiB,EAAE,yBAAyB,CAAK;IAExD,kBAAkB;IACX,cAAc,EAAE,MAAM,CAAM;IAEnC,gCAAgC;IACzB,cAAc,EAAE,MAAM,CAAK;IAElC,0BAA0B;IACnB,qBAAqB,EAAE,MAAM,CAAM;IAE1C,6BAA6B;IACtB,oBAAoB,EAAE,MAAM,CAAK;IAExC,kCAAkC;IAC3B,sBAAsB,EAAE,MAAM,CAAK;IAE1C,4BAA4B;IACrB,YAAY,EAAE,IAAI,CAAc;IAEvC,yDAAyD;IAClD,iCAAiC,EAAE,IAAI,CAAc;IAE5D,oDAAoD;IAC7C,iCAAiC,EAAE,IAAI,CAAc;IAE5D,yDAAyD;IAClD,6BAA6B,EAAE,MAAM,CAAK;IAEjD,sBAAsB;IACf,mBAAmB,EAAE,OAAO,CAAS;IAE5C,iBAAiB;IACV,QAAQ,EAAE,OAAO,CAAS;IAEjC,uDAAuD;IAChD,qBAAqB,EAAE,MAAM,CAAK;IAEzC,mDAAmD;IAC5C,qBAAqB,EAAE,MAAM,CAAK;IAEzC,+CAA+C;IACxC,2BAA2B,EAAE,MAAM,CAAK;IAE/C,gDAAgD;IACzC,6BAA6B,EAAE,MAAM,CAAK;IAEjD,wBAAwB;IACjB,eAAe,EAAE,OAAO,CAAS;IAExC,4BAA4B;IACrB,cAAc,EAAE,MAAM,CAAM;IAEnC,yBAAyB;IAClB,gBAAgB,EAAE,OAAO,CAAS;IAEzC,uBAAuB;IAChB,kBAAkB,EAAE,OAAO,CAAS;IAE3C,iDAAiD;IAC1C,oBAAoB,EAAE,MAAM,CAAM;IAEzC,sCAAsC;IAC/B,6BAA6B,EAAE,OAAO,CAAS;IAEtD,0CAA0C;IACnC,2BAA2B,EAAE,OAAO,CAAS;IAEpD,uBAAuB;IAChB,eAAe,EAAE,MAAM,CAAM;IAEpC,sBAAsB;IACf,kBAAkB,EAAE,MAAM,CAAM;IAEvC,kBAAkB;IACX,cAAc,EAAE,UAAU,CAAsB;IAEvD,kCAAkC;IAC3B,iBAAiB,EAAE,MAAM,CAAK;IAErC,+BAA+B;IACxB,iBAAiB,EAAE,MAAM,CAAK;IAErC,mDAAmD;IAC5C,qBAAqB,EAAE,MAAM,CAAK;IAEzC,gDAAgD;IACzC,qBAAqB,EAAE,MAAM,CAAK;IAEzC,qBAAqB;IACd,iBAAiB,EAAE,OAAO,CAAS;IAE1C,sBAAsB;IACf,kBAAkB,EAAE,OAAO,CAAS;IAE3C,cAAc;IACP,UAAU,EAAE,MAAM,CAAK;IAE9B,0BAA0B;IACnB,qBAAqB,EAAE,MAAM,CAAM;IAE1C,qBAAqB;IACd,oBAAoB,EAAE,MAAM,CAAK;IAExC,0BAA0B;IACnB,sBAAsB,EAAE,MAAM,CAAK;IAE1C,qBAAqB;IACd,gBAAgB,EAAE,MAAM,CAAM;IAErC,wBAAwB;IACjB,eAAe,EAAE,MAAM,CAAM;IAEpC,2BAA2B;IACpB,qBAAqB,EAAE,MAAM,CAAM;IAE1C,uBAAuB;IAChB,kBAAkB,EAAE,MAAM,CAAM;IAEvC,gBAAgB;IACT,YAAY,EAAE,UAAU,CAAsB;IAErD,0EAA0E;gBACvD,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;CAIzD;AAED,+BAA+B;AAC/B,qBAAa,qBAAqB;IAE9B,6DAA6D;IACtD,wBAAwB,EAAE,OAAO,CAAS;IAEjD,qDAAqD;IAC9C,uBAAuB,EAAE,OAAO,CAAS;IAEhD,kFAAkF;gBAC/D,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;CAI3D;AAED,2BAA2B;AAC3B,oBAAY,iBAAiB;IAEzB,wBAAwB;IACxB,IAAI,IAAI;IAER,sBAAsB;IACtB,SAAS,IAAI;IAEb,0CAA0C;IAC1C,uBAAuB,IAAI;IAE3B,mDAAmD;IACnD,kBAAkB,IAAI;CAEzB;AAED,2BAA2B;AAC3B,qBAAa,gBAAgB;IAEzB,0CAA0C;IACnC,YAAY,EAAE,iBAAiB,CAAK;IAE3C,+DAA+D;IACxD,YAAY,EAAE,MAAM,CAAM;IAEjC,mDAAmD;IAC5C,QAAQ,EAAE,MAAM,CAAK;IAE5B,yEAAyE;gBACtD,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,6BAA6B;AAC7B,qBAAa,YAAY;IAErB,kBAAkB;IACX,cAAc,EAAE,OAAO,CAAS;IAEvC,cAAc;IACP,WAAW,EAAE,MAAM,CAAM;IAEhC,iBAAiB;IACV,SAAS,EAAE,MAAM,CAAM;IAE9B,kBAAkB;IACX,SAAS,EAAE,MAAM,CAAM;IAE9B,oBAAoB;IACb,UAAU,EAAE,OAAO,CAAS;IAEnC,2BAA2B;IACpB,iBAAiB,EAAE,OAAO,CAAS;IAE1C,mCAAmC;IAC5B,eAAe,EAAE,OAAO,CAAS;IAExC,uEAAuE;gBACpD,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CAIlD;AAED,sBAAsB;AACtB,qBAAa,iBAAiB;IAE1B,kBAAkB;IACX,cAAc,EAAE,MAAM,CAAM;IAEnC,gBAAgB;IACT,YAAY,EAAE,MAAM,CAAM;IAEjC,qLAAqL;IAC9K,UAAU,EAAE,MAAM,CAAK;IAE9B,sBAAsB;IACf,UAAU,EAAE,UAAU,CAAsB;IAEnD,qEAAqE;gBAClD,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAED,kBAAkB;AAClB,qBAAa,gBAAgB;IAEzB,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,6CAA6C;IACtC,kBAAkB,EAAE,MAAM,CAAM;IAEvC,6CAA6C;IACtC,kBAAkB,EAAE,MAAM,CAAM;IAEvC,gEAAgE;gBAC7C,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAItD;AAED,gCAAgC;AAChC,qBAAa,kBAAkB;IAE3B,2BAA2B;IACpB,WAAW,EAAE,MAAM,CAAM;IAEhC,4BAA4B;IACrB,WAAW,EAAE,OAAO,CAAS;IAEpC,gFAAgF;gBAC7D,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAIxD;AAED,mBAAmB;AACnB,qBAAa,iBAAiB;IAE1B,6BAA6B;IACtB,qBAAqB,EAAE,MAAM,CAAM;IAE1C,kEAAkE;gBAC/C,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAIvD;AAQD,wEAAwE;AACxE,qBAAa,cAAc;IAEhB,OAAO,EAAE,MAAM,CAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;gBAEN,MAAM,GAAE,MAAW,EAAE,KAAK,GAAE,GAAU,EAAE,EAAE,GAAE,MAAW;CAMtE;AAED,sEAAsE;AACtE,qBAAa,YAAY;IAEd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC;gBAEL,IAAI,GAAE,MAAU,EAAE,OAAO,GAAE,MAAW,EAAE,IAAI,GAAE,GAAU;CAMvE;AAED,4CAA4C;AAC5C,qBAAa,eAAe,CAAC,OAAO;IAEzB,OAAO,EAAE,MAAM,CAAS;IACxB,MAAM,EAAE,OAAO,CAAS;IACxB,KAAK,EAAE,YAAY,CAAS;IAC5B,EAAE,EAAE,MAAM,CAAM;CAC1B;AAED,uEAAuE;AACvE,qBAAa,aAAa;IAEtB,8DAA8D;WAChD,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;IAc5C,0DAA0D;WAC5C,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAiB5C,eAAe;IACR,OAAO,EAAE,MAAM,CAAC;IAEvB,kCAAkC;IAClC,OAAO,CAAC,MAAM,CAAa;IAE3B,8BAA8B;IAC9B,OAAO,CAAC,OAAO,CAA6B;IAE5C;;;;;OAKG;gBACS,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EAAE,eAAe,EAAE,OAAO,EAAE,gDAAgD,EAAE,OAAO;IAUjJ;;;;OAIG;IACU,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IA8BhF;;;;OAIG;IACU,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;CAarF;AAED,+BAA+B;AAC/B,qBAAa,gBAAiB,SAAQ,KAAK;IAEhC,KAAK,EAAE,YAAY,CAAC;gBAEf,KAAK,EAAE,YAAY;CAKlC;AAED,kCAAkC;AAClC,qBAAa,mBAAoB,SAAQ,KAAK;gBAE9B,OAAO,EAAE,MAAM;CAI9B;AAED,iCAAiC;AACjC,qBAAa,kBAAkB;IAEpB,IAAI,EAAE,MAAM,CAAM;CAC5B;AAED,wEAAwE;AACxE,qBAAa,UAAU;IAEZ,YAAY,EAAE,MAAM,CAAiB;IACrC,cAAc,EAAE,OAAO,CAAQ;IAC/B,uCAAuC,EAAE,OAAO,CAAS;IAEhE,oJAAoJ;IACvI,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EACnE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAwC1E,+BAA+B;IACxB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EACpE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA6D7E;AA0ED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,cA+C1C;AAyBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,UAqC5C"} \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js new file mode 100644 index 00000000..eac8ab09 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js @@ -0,0 +1,3825 @@ +"use strict"; +// SoftEther VPN Server JSON-RPC Stub code for TypeScript +// +// vpnrpc.ts +// Automatically generated at 2019-05-29 18:21:39 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +exports.__esModule = true; +// Trivial utility codes +var is_node_js = (typeof navigator === "undefined") || navigator.userAgent.indexOf("Node.js") !== -1 || navigator.userAgent.indexOf("jsdom") !== -1; +function is_null(obj) { + return (typeof obj === "undefined") || (obj === null); +} +var debug_mode = false; +/** VPN Server RPC Stubs */ +var VpnServerRpc = /** @class */ (function () { + /** + * Constructor of the VpnServerRpc class + * @param vpnserver_hostname The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param vpnserver_port The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param hubname The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + * @param password Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + * @param nodejs_https_client_reject_untrusted_server_cert In Node.js set this true to check the SSL server certificate on the destination VPN Server. Set this false to ignore the SSL server certification. + */ + function VpnServerRpc(vpnserver_hostname, vpnserver_port, hubname, password, nodejs_https_client_reject_untrusted_server_cert) { + var _this = this; + // --- Stubs --- + /** Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. */ + this.Test = function (in_param) { + return _this.CallAsync("Test", in_param); + }; + /** Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. */ + this.GetServerInfo = function () { + return _this.CallAsync("GetServerInfo", new VpnRpcServerInfo()); + }; + /** Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. */ + this.GetServerStatus = function () { + return _this.CallAsync("GetServerStatus", new VpnRpcServerStatus()); + }; + /** Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. */ + this.CreateListener = function (in_param) { + return _this.CallAsync("CreateListener", in_param); + }; + /** Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. */ + this.EnumListener = function () { + return _this.CallAsync("EnumListener", new VpnRpcListenerList()); + }; + /** Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + this.DeleteListener = function (in_param) { + return _this.CallAsync("DeleteListener", in_param); + }; + /** Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + this.EnableListener = function (in_param) { + return _this.CallAsync("EnableListener", in_param); + }; + /** Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. */ + this.SetServerPassword = function (in_param) { + return _this.CallAsync("SetServerPassword", in_param); + }; + /** Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. */ + this.SetFarmSetting = function (in_param) { + return _this.CallAsync("SetFarmSetting", in_param); + }; + /** Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. */ + this.GetFarmSetting = function () { + return _this.CallAsync("GetFarmSetting", new VpnRpcFarm()); + }; + /** Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. */ + this.GetFarmInfo = function (in_param) { + return _this.CallAsync("GetFarmInfo", in_param); + }; + /** Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. */ + this.EnumFarmMember = function () { + return _this.CallAsync("EnumFarmMember", new VpnRpcEnumFarm()); + }; + /** Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. */ + this.GetFarmConnectionStatus = function () { + return _this.CallAsync("GetFarmConnectionStatus", new VpnRpcFarmConnectionStatus()); + }; + /** Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. */ + this.SetServerCert = function (in_param) { + return _this.CallAsync("SetServerCert", in_param); + }; + /** Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. */ + this.GetServerCert = function () { + return _this.CallAsync("GetServerCert", new VpnRpcKeyPair()); + }; + /** Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. */ + this.GetServerCipher = function () { + return _this.CallAsync("GetServerCipher", new VpnRpcStr()); + }; + /** Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. */ + this.SetServerCipher = function (in_param) { + return _this.CallAsync("SetServerCipher", in_param); + }; + /** Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + this.CreateHub = function (in_param) { + return _this.CallAsync("CreateHub", in_param); + }; + /** Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. */ + this.SetHub = function (in_param) { + return _this.CallAsync("SetHub", in_param); + }; + /** Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. */ + this.GetHub = function (in_param) { + return _this.CallAsync("GetHub", in_param); + }; + /** Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. */ + this.EnumHub = function () { + return _this.CallAsync("EnumHub", new VpnRpcEnumHub()); + }; + /** Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + this.DeleteHub = function (in_param) { + return _this.CallAsync("DeleteHub", in_param); + }; + /** Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetHubRadius = function (in_param) { + return _this.CallAsync("GetHubRadius", in_param); + }; + /** Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetHubRadius = function (in_param) { + return _this.CallAsync("SetHubRadius", in_param); + }; + /** Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. */ + this.EnumConnection = function () { + return _this.CallAsync("EnumConnection", new VpnRpcEnumConnection()); + }; + /** Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. */ + this.DisconnectConnection = function (in_param) { + return _this.CallAsync("DisconnectConnection", in_param); + }; + /** Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. */ + this.GetConnectionInfo = function (in_param) { + return _this.CallAsync("GetConnectionInfo", in_param); + }; + /** Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetHubOnline = function (in_param) { + return _this.CallAsync("SetHubOnline", in_param); + }; + /** Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. */ + this.GetHubStatus = function (in_param) { + return _this.CallAsync("GetHubStatus", in_param); + }; + /** Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. */ + this.SetHubLog = function (in_param) { + return _this.CallAsync("SetHubLog", in_param); + }; + /** Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. */ + this.GetHubLog = function (in_param) { + return _this.CallAsync("GetHubLog", in_param); + }; + /** Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.AddCa = function (in_param) { + return _this.CallAsync("AddCa", in_param); + }; + /** Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.EnumCa = function (in_param) { + return _this.CallAsync("EnumCa", in_param); + }; + /** Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.GetCa = function (in_param) { + return _this.CallAsync("GetCa", in_param); + }; + /** Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.DeleteCa = function (in_param) { + return _this.CallAsync("DeleteCa", in_param); + }; + /** Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.CreateLink = function (in_param) { + return _this.CallAsync("CreateLink", in_param); + }; + /** Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetLink = function (in_param) { + return _this.CallAsync("GetLink", in_param); + }; + /** Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. */ + this.SetLink = function (in_param) { + return _this.CallAsync("SetLink", in_param); + }; + /** Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.EnumLink = function (in_param) { + return _this.CallAsync("EnumLink", in_param); + }; + /** Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetLinkOnline = function (in_param) { + return _this.CallAsync("SetLinkOnline", in_param); + }; + /** Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetLinkOffline = function (in_param) { + return _this.CallAsync("SetLinkOffline", in_param); + }; + /** Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.DeleteLink = function (in_param) { + return _this.CallAsync("DeleteLink", in_param); + }; + /** Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.RenameLink = function (in_param) { + return _this.CallAsync("RenameLink", in_param); + }; + /** Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetLinkStatus = function (in_param) { + return _this.CallAsync("GetLinkStatus", in_param); + }; + /** Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.AddAccess = function (in_param) { + return _this.CallAsync("AddAccess", in_param); + }; + /** Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.DeleteAccess = function (in_param) { + return _this.CallAsync("DeleteAccess", in_param); + }; + /** Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.EnumAccess = function (in_param) { + return _this.CallAsync("EnumAccess", in_param); + }; + /** Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. */ + this.SetAccessList = function (in_param) { + return _this.CallAsync("SetAccessList", in_param); + }; + /** Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.CreateUser = function (in_param) { + return _this.CallAsync("CreateUser", in_param); + }; + /** Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.SetUser = function (in_param) { + return _this.CallAsync("SetUser", in_param); + }; + /** Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.GetUser = function (in_param) { + return _this.CallAsync("GetUser", in_param); + }; + /** Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.DeleteUser = function (in_param) { + return _this.CallAsync("DeleteUser", in_param); + }; + /** Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.EnumUser = function (in_param) { + return _this.CallAsync("EnumUser", in_param); + }; + /** Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.CreateGroup = function (in_param) { + return _this.CallAsync("CreateGroup", in_param); + }; + /** Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.SetGroup = function (in_param) { + return _this.CallAsync("SetGroup", in_param); + }; + /** Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.GetGroup = function (in_param) { + return _this.CallAsync("GetGroup", in_param); + }; + /** Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.DeleteGroup = function (in_param) { + return _this.CallAsync("DeleteGroup", in_param); + }; + /** Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + this.EnumGroup = function (in_param) { + return _this.CallAsync("EnumGroup", in_param); + }; + /** Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. */ + this.EnumSession = function (in_param) { + return _this.CallAsync("EnumSession", in_param); + }; + /** Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. */ + this.GetSessionStatus = function (in_param) { + return _this.CallAsync("GetSessionStatus", in_param); + }; + /** Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. */ + this.DeleteSession = function (in_param) { + return _this.CallAsync("DeleteSession", in_param); + }; + /** Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. */ + this.EnumMacTable = function (in_param) { + return _this.CallAsync("EnumMacTable", in_param); + }; + /** Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. */ + this.DeleteMacTable = function (in_param) { + return _this.CallAsync("DeleteMacTable", in_param); + }; + /** Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. */ + this.EnumIpTable = function (in_param) { + return _this.CallAsync("EnumIpTable", in_param); + }; + /** Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. */ + this.DeleteIpTable = function (in_param) { + return _this.CallAsync("DeleteIpTable", in_param); + }; + /** Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. */ + this.SetKeep = function (in_param) { + return _this.CallAsync("SetKeep", in_param); + }; + /** Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. */ + this.GetKeep = function (in_param) { + return _this.CallAsync("GetKeep", in_param); + }; + /** Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.EnableSecureNAT = function (in_param) { + return _this.CallAsync("EnableSecureNAT", in_param); + }; + /** Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.DisableSecureNAT = function (in_param) { + return _this.CallAsync("DisableSecureNAT", in_param); + }; + /** Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetSecureNATOption = function (in_param) { + return _this.CallAsync("SetSecureNATOption", in_param); + }; + /** Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. */ + this.GetSecureNATOption = function (in_param) { + return _this.CallAsync("GetSecureNATOption", in_param); + }; + /** Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.EnumNAT = function (in_param) { + return _this.CallAsync("EnumNAT", in_param); + }; + /** Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.EnumDHCP = function (in_param) { + return _this.CallAsync("EnumDHCP", in_param); + }; + /** Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetSecureNATStatus = function (in_param) { + return _this.CallAsync("GetSecureNATStatus", in_param); + }; + /** Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + this.EnumEthernet = function () { + return _this.CallAsync("EnumEthernet", new VpnRpcEnumEth()); + }; + /** Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. */ + this.AddLocalBridge = function (in_param) { + return _this.CallAsync("AddLocalBridge", in_param); + }; + /** Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + this.DeleteLocalBridge = function (in_param) { + return _this.CallAsync("DeleteLocalBridge", in_param); + }; + /** Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. */ + this.EnumLocalBridge = function () { + return _this.CallAsync("EnumLocalBridge", new VpnRpcEnumLocalBridge()); + }; + /** Get whether the localbridge function is supported on the current system. */ + this.GetBridgeSupport = function () { + return _this.CallAsync("GetBridgeSupport", new VpnRpcBridgeSupport()); + }; + /** Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. */ + this.RebootServer = function (in_param) { + return _this.CallAsync("RebootServer", in_param); + }; + /** Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. */ + this.GetCaps = function () { + return _this.CallAsync("GetCaps", new VpnCapslist()); + }; + /** Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. */ + this.GetConfig = function () { + return _this.CallAsync("GetConfig", new VpnRpcConfig()); + }; + /** Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. */ + this.SetConfig = function (in_param) { + return _this.CallAsync("SetConfig", in_param); + }; + /** Get Virtual Hub Administration Option default values. */ + this.GetDefaultHubAdminOptions = function (in_param) { + return _this.CallAsync("GetDefaultHubAdminOptions", in_param); + }; + /** Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + this.GetHubAdminOptions = function (in_param) { + return _this.CallAsync("GetHubAdminOptions", in_param); + }; + /** Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + this.SetHubAdminOptions = function (in_param) { + return _this.CallAsync("SetHubAdminOptions", in_param); + }; + /** Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + this.GetHubExtOptions = function (in_param) { + return _this.CallAsync("GetHubExtOptions", in_param); + }; + /** Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + this.SetHubExtOptions = function (in_param) { + return _this.CallAsync("SetHubExtOptions", in_param); + }; + /** Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + this.AddL3Switch = function (in_param) { + return _this.CallAsync("AddL3Switch", in_param); + }; + /** Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + this.DelL3Switch = function (in_param) { + return _this.CallAsync("DelL3Switch", in_param); + }; + /** Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + this.EnumL3Switch = function () { + return _this.CallAsync("EnumL3Switch", new VpnRpcEnumL3Sw()); + }; + /** Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + this.StartL3Switch = function (in_param) { + return _this.CallAsync("StartL3Switch", in_param); + }; + /** Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. */ + this.StopL3Switch = function (in_param) { + return _this.CallAsync("StopL3Switch", in_param); + }; + /** Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + this.AddL3If = function (in_param) { + return _this.CallAsync("AddL3If", in_param); + }; + /** Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + this.DelL3If = function (in_param) { + return _this.CallAsync("DelL3If", in_param); + }; + /** Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + this.EnumL3If = function (in_param) { + return _this.CallAsync("EnumL3If", in_param); + }; + /** Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + this.AddL3Table = function (in_param) { + return _this.CallAsync("AddL3Table", in_param); + }; + /** Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + this.DelL3Table = function (in_param) { + return _this.CallAsync("DelL3Table", in_param); + }; + /** Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + this.EnumL3Table = function (in_param) { + return _this.CallAsync("EnumL3Table", in_param); + }; + /** Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.EnumCrl = function (in_param) { + return _this.CallAsync("EnumCrl", in_param); + }; + /** Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.AddCrl = function (in_param) { + return _this.CallAsync("AddCrl", in_param); + }; + /** Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.DelCrl = function (in_param) { + return _this.CallAsync("DelCrl", in_param); + }; + /** Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetCrl = function (in_param) { + return _this.CallAsync("GetCrl", in_param); + }; + /** Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetCrl = function (in_param) { + return _this.CallAsync("SetCrl", in_param); + }; + /** Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetAcList = function (in_param) { + return _this.CallAsync("SetAcList", in_param); + }; + /** Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetAcList = function (in_param) { + return _this.CallAsync("GetAcList", in_param); + }; + /** Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + this.EnumLogFile = function () { + return _this.CallAsync("EnumLogFile", new VpnRpcEnumLogFile()); + }; + /** Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + this.ReadLogFile = function (in_param) { + return _this.CallAsync("ReadLogFile", in_param); + }; + /** Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use. */ + this.SetSysLog = function (in_param) { + return _this.CallAsync("SetSysLog", in_param); + }; + /** Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. */ + this.GetSysLog = function (in_param) { + return _this.CallAsync("GetSysLog", in_param); + }; + /** Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + this.SetHubMsg = function (in_param) { + return _this.CallAsync("SetHubMsg", in_param); + }; + /** Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + this.GetHubMsg = function (in_param) { + return _this.CallAsync("GetHubMsg", in_param); + }; + /** Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + this.Crash = function (in_param) { + return _this.CallAsync("Crash", in_param); + }; + /** Get the message for administrators. */ + this.GetAdminMsg = function () { + return _this.CallAsync("GetAdminMsg", new VpnRpcMsg()); + }; + /** Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + this.Flush = function (in_param) { + return _this.CallAsync("Flush", in_param); + }; + /** Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetIPsecServices = function (in_param) { + return _this.CallAsync("SetIPsecServices", in_param); + }; + /** Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetIPsecServices = function () { + return _this.CallAsync("GetIPsecServices", new VpnIPsecServices()); + }; + /** Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.AddEtherIpId = function (in_param) { + return _this.CallAsync("AddEtherIpId", in_param); + }; + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetEtherIpId = function (in_param) { + return _this.CallAsync("GetEtherIpId", in_param); + }; + /** Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.DeleteEtherIpId = function (in_param) { + return _this.CallAsync("DeleteEtherIpId", in_param); + }; + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.EnumEtherIpId = function () { + return _this.CallAsync("EnumEtherIpId", new VpnRpcEnumEtherIpId()); + }; + /** Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetOpenVpnSstpConfig = function (in_param) { + return _this.CallAsync("SetOpenVpnSstpConfig", in_param); + }; + /** Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetOpenVpnSstpConfig = function () { + return _this.CallAsync("GetOpenVpnSstpConfig", new VpnOpenVpnSstpConfig()); + }; + /** Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + this.GetDDnsClientStatus = function () { + return _this.CallAsync("GetDDnsClientStatus", new VpnDDnsClientStatus()); + }; + /** Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + this.ChangeDDnsClientHostname = function (in_param) { + return _this.CallAsync("ChangeDDnsClientHostname", in_param); + }; + /** Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.RegenerateServerCert = function (in_param) { + return _this.CallAsync("RegenerateServerCert", in_param); + }; + /** Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.MakeOpenVpnConfigFile = function () { + return _this.CallAsync("MakeOpenVpnConfigFile", new VpnRpcReadLogFile()); + }; + /** Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + this.SetSpecialListener = function (in_param) { + return _this.CallAsync("SetSpecialListener", in_param); + }; + /** Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + this.GetSpecialListener = function () { + return _this.CallAsync("GetSpecialListener", new VpnRpcSpecialListener()); + }; + /** Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.GetAzureStatus = function () { + return _this.CallAsync("GetAzureStatus", new VpnRpcAzureStatus()); + }; + /** Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + this.SetAzureStatus = function (in_param) { + return _this.CallAsync("SetAzureStatus", in_param); + }; + /** Get the Proxy Settings for Connecting to the DDNS server. */ + this.GetDDnsInternetSettng = function () { + return _this.CallAsync("GetDDnsInternetSettng", new VpnInternetSetting()); + }; + /** Set the Proxy Settings for Connecting to the DDNS server. */ + this.SetDDnsInternetSettng = function (in_param) { + return _this.CallAsync("SetDDnsInternetSettng", in_param); + }; + /** Set the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + this.SetVgsConfig = function (in_param) { + return _this.CallAsync("SetVgsConfig", in_param); + }; + /** Get the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + this.GetVgsConfig = function () { + return _this.CallAsync("GetVgsConfig", new VpnVgsConfig()); + }; + var headers = {}; + var send_credentials = false; + nodejs_https_client_reject_untrusted_server_cert = is_null(nodejs_https_client_reject_untrusted_server_cert) ? false : nodejs_https_client_reject_untrusted_server_cert; + if (is_null(vpnserver_hostname)) { + this.rpc_url = "/api/"; + send_credentials = true; + } + else { + if (is_null(vpnserver_port)) + vpnserver_port = 443; + this.rpc_url = "https://" + vpnserver_hostname + ":" + vpnserver_port + "/api/"; + headers["X-VPNADMIN-HUBNAME"] = is_null(hubname) ? "" : hubname; + headers["X-VPNADMIN-PASSWORD"] = is_null(password) ? "" : password; + } + if (is_null(nodejs_https_client_reject_untrusted_server_cert)) + nodejs_https_client_reject_untrusted_server_cert = false; + this.rpc_client = new JsonRpcClient(this.rpc_url, headers, send_credentials, nodejs_https_client_reject_untrusted_server_cert); + } + /** Determine if this JavaScript environment is on the Node.js or not. */ + VpnServerRpc.IsNodeJS = function () { + return is_node_js; + }; + /** Set the debug mode flag */ + VpnServerRpc.SetDebugMode = function (flag) { + debug_mode = flag; + }; + // -- Utility functions -- + /** Call a RPC procedure */ + VpnServerRpc.prototype.CallAsync = function (method_name, request) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.rpc_client.CallAsync(method_name, request)]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); + }); + }; + return VpnServerRpc; +}()); +exports.VpnServerRpc = VpnServerRpc; +// --- Types --- +/** IP Protocol Numbers */ +var VpnIpProtocolNumber; +(function (VpnIpProtocolNumber) { + /** ICMP for IPv4 */ + VpnIpProtocolNumber[VpnIpProtocolNumber["ICMPv4"] = 1] = "ICMPv4"; + /** TCP */ + VpnIpProtocolNumber[VpnIpProtocolNumber["TCP"] = 6] = "TCP"; + /** UDP */ + VpnIpProtocolNumber[VpnIpProtocolNumber["UDP"] = 17] = "UDP"; + /** ICMP for IPv6 */ + VpnIpProtocolNumber[VpnIpProtocolNumber["ICMPv6"] = 58] = "ICMPv6"; +})(VpnIpProtocolNumber = exports.VpnIpProtocolNumber || (exports.VpnIpProtocolNumber = {})); +/** The body of the Access list */ +var VpnAccess = /** @class */ (function () { + /** Constructor for the 'VpnAccess' class: The body of the Access list */ + function VpnAccess(init) { + /** ID */ + this.Id_u32 = 0; + /** Specify a description (note) for this rule */ + this.Note_utf = ""; + /** Enabled flag (true: enabled, false: disabled) */ + this.Active_bool = false; + /** Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. */ + this.Priority_u32 = 0; + /** The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. */ + this.Discard_bool = false; + /** The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. */ + this.IsIPv6_bool = false; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. */ + this.SrcIpAddress_ip = ""; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + this.SrcSubnetMask_ip = ""; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. */ + this.DestIpAddress_ip = ""; + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + this.DestSubnetMask_ip = ""; + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. */ + this.SrcIpAddress6_bin = new Uint8Array([]); + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + this.SrcSubnetMask6_bin = new Uint8Array([]); + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. */ + this.DestIpAddress6_bin = new Uint8Array([]); + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + this.DestSubnetMask6_bin = new Uint8Array([]); + /** The IP protocol number */ + this.Protocol_u32 = 0; + /** The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + this.SrcPortStart_u32 = 0; + /** The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + this.SrcPortEnd_u32 = 0; + /** The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + this.DestPortStart_u32 = 0; + /** The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + this.DestPortEnd_u32 = 0; + /** Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + this.SrcUsername_str = ""; + /** Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + this.DestUsername_str = ""; + /** Specify true if you want to check the source MAC address. */ + this.CheckSrcMac_bool = false; + /** Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + this.SrcMacAddress_bin = new Uint8Array([]); + /** Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + this.SrcMacMask_bin = new Uint8Array([]); + /** Specify true if you want to check the destination MAC address. */ + this.CheckDstMac_bool = false; + /** Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + this.DstMacAddress_bin = new Uint8Array([]); + /** Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + this.DstMacMask_bin = new Uint8Array([]); + /** Specify true if you want to check the state of the TCP connection. */ + this.CheckTcpState_bool = false; + /** Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. */ + this.Established_bool = false; + /** Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. */ + this.Delay_u32 = 0; + /** Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. */ + this.Jitter_u32 = 0; + /** Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. */ + this.Loss_u32 = 0; + /** The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. */ + this.RedirectUrl_str = ""; + Object.assign(this, init); + } + return VpnAccess; +}()); +exports.VpnAccess = VpnAccess; +/** Add an item to Access List */ +var VpnRpcAddAccess = /** @class */ (function () { + /** Constructor for the 'VpnRpcAddAccess' class: Add an item to Access List */ + function VpnRpcAddAccess(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Access list (Must be a single item) */ + this.AccessListSingle = []; + Object.assign(this, init); + } + return VpnRpcAddAccess; +}()); +exports.VpnRpcAddAccess = VpnRpcAddAccess; +/** Add CA to HUB */ +var VpnRpcHubAddCA = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubAddCA' class: Add CA to HUB */ + function VpnRpcHubAddCA(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The body of the X.509 certificate */ + this.Cert_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcHubAddCA; +}()); +exports.VpnRpcHubAddCA = VpnRpcHubAddCA; +/** CRL entry */ +var VpnRpcCrl = /** @class */ (function () { + /** Constructor for the 'VpnRpcCrl' class: CRL entry */ + function VpnRpcCrl(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Key ID */ + this.Key_u32 = 0; + /** CN, optional */ + this.CommonName_utf = ""; + /** O, optional */ + this.Organization_utf = ""; + /** OU, optional */ + this.Unit_utf = ""; + /** C, optional */ + this.Country_utf = ""; + /** ST, optional */ + this.State_utf = ""; + /** L, optional */ + this.Local_utf = ""; + /** Serial, optional */ + this.Serial_bin = new Uint8Array([]); + /** MD5 Digest, optional */ + this.DigestMD5_bin = new Uint8Array([]); + /** SHA1 Digest, optional */ + this.DigestSHA1_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcCrl; +}()); +exports.VpnRpcCrl = VpnRpcCrl; +/** EtherIP key list entry */ +var VpnEtherIpId = /** @class */ (function () { + /** Constructor for the 'VpnEtherIpId' class: EtherIP key list entry */ + function VpnEtherIpId(init) { + /** Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. */ + this.Id_str = ""; + /** Specify the name of the Virtual Hub to connect. */ + this.HubName_str = ""; + /** Specify the username to login to the destination Virtual Hub. */ + this.UserName_str = ""; + /** Specify the password to login to the destination Virtual Hub. */ + this.Password_str = ""; + Object.assign(this, init); + } + return VpnEtherIpId; +}()); +exports.VpnEtherIpId = VpnEtherIpId; +/** Layer-3 virtual interface */ +var VpnRpcL3If = /** @class */ (function () { + /** Constructor for the 'VpnRpcL3If' class: Layer-3 virtual interface */ + function VpnRpcL3If(init) { + /** L3 switch name */ + this.Name_str = ""; + /** Virtual HUB name */ + this.HubName_str = ""; + /** IP address */ + this.IpAddress_ip = ""; + /** Subnet mask */ + this.SubnetMask_ip = ""; + Object.assign(this, init); + } + return VpnRpcL3If; +}()); +exports.VpnRpcL3If = VpnRpcL3If; +/** Layer-3 switch */ +var VpnRpcL3Sw = /** @class */ (function () { + /** Constructor for the 'VpnRpcL3Sw' class: Layer-3 switch */ + function VpnRpcL3Sw(init) { + /** Layer-3 Switch name */ + this.Name_str = ""; + Object.assign(this, init); + } + return VpnRpcL3Sw; +}()); +exports.VpnRpcL3Sw = VpnRpcL3Sw; +/** Routing table */ +var VpnRpcL3Table = /** @class */ (function () { + /** Constructor for the 'VpnRpcL3Table' class: Routing table */ + function VpnRpcL3Table(init) { + /** L3 switch name */ + this.Name_str = ""; + /** Network address */ + this.NetworkAddress_ip = ""; + /** Subnet mask */ + this.SubnetMask_ip = ""; + /** Gateway address */ + this.GatewayAddress_ip = ""; + /** Metric */ + this.Metric_u32 = 0; + Object.assign(this, init); + } + return VpnRpcL3Table; +}()); +exports.VpnRpcL3Table = VpnRpcL3Table; +/** Generic parameter to contain u32, u64, ascii_string and unicode string */ +var VpnRpcTest = /** @class */ (function () { + /** Constructor for the 'VpnRpcTest' class: Generic parameter to contain u32, u64, ascii_string and unicode string */ + function VpnRpcTest(init) { + /** A 32-bit integer field */ + this.IntValue_u32 = 0; + /** A 64-bit integer field */ + this.Int64Value_u64 = 0; + /** An Ascii string field */ + this.StrValue_str = ""; + /** An UTF-8 string field */ + this.UniStrValue_utf = ""; + Object.assign(this, init); + } + return VpnRpcTest; +}()); +exports.VpnRpcTest = VpnRpcTest; +/** Local Bridge list item */ +var VpnRpcLocalBridge = /** @class */ (function () { + /** Constructor for the 'VpnRpcLocalBridge' class: Local Bridge list item */ + function VpnRpcLocalBridge(init) { + /** Physical Ethernet device name */ + this.DeviceName_str = ""; + /** The Virtual Hub name */ + this.HubNameLB_str = ""; + /** Online flag */ + this.Online_bool = false; + /** Running flag */ + this.Active_bool = false; + /** Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). */ + this.TapMode_bool = false; + Object.assign(this, init); + } + return VpnRpcLocalBridge; +}()); +exports.VpnRpcLocalBridge = VpnRpcLocalBridge; +/** Create, configure, and get the group */ +var VpnRpcSetGroup = /** @class */ (function () { + /** Constructor for the 'VpnRpcSetGroup' class: Create, configure, and get the group */ + function VpnRpcSetGroup(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The group name */ + this.Name_str = ""; + /** Optional real name (full name) of the group, allow using any Unicode characters */ + this.Realname_utf = ""; + /** Optional, specify a description of the group */ + this.Note_utf = ""; + /** Number of broadcast packets (Recv) */ + this["Recv.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Recv) */ + this["Recv.BroadcastCount_u64"] = 0; + /** Unicast count (Recv) */ + this["Recv.UnicastBytes_u64"] = 0; + /** Unicast bytes (Recv) */ + this["Recv.UnicastCount_u64"] = 0; + /** Number of broadcast packets (Send) */ + this["Send.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Send) */ + this["Send.BroadcastCount_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastBytes_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastCount_u64"] = 0; + /** The flag whether to use security policy */ + this.UsePolicy_bool = false; + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + this["policy:Access_bool"] = false; + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + this["policy:DHCPFilter_bool"] = false; + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + this["policy:DHCPNoServer_bool"] = false; + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + this["policy:DHCPForce_bool"] = false; + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + this["policy:NoBridge_bool"] = false; + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + this["policy:NoRouting_bool"] = false; + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + this["policy:CheckMac_bool"] = false; + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + this["policy:CheckIP_bool"] = false; + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + this["policy:ArpDhcpOnly_bool"] = false; + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + this["policy:PrivacyFilter_bool"] = false; + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + this["policy:NoServer_bool"] = false; + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + this["policy:NoBroadcastLimiter_bool"] = false; + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + this["policy:MonitorPort_bool"] = false; + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + this["policy:MaxConnection_u32"] = 0; + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + this["policy:TimeOut_u32"] = 0; + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + this["policy:MaxMac_u32"] = 0; + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + this["policy:MaxIP_u32"] = 0; + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + this["policy:MaxUpload_u32"] = 0; + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + this["policy:MaxDownload_u32"] = 0; + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + this["policy:FixPassword_bool"] = false; + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + this["policy:MultiLogins_u32"] = 0; + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + this["policy:NoQoS_bool"] = false; + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + this["policy:RSandRAFilter_bool"] = false; + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + this["policy:RAFilter_bool"] = false; + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + this["policy:DHCPv6Filter_bool"] = false; + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + this["policy:DHCPv6NoServer_bool"] = false; + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + this["policy:NoRoutingV6_bool"] = false; + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + this["policy:CheckIPv6_bool"] = false; + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + this["policy:NoServerV6_bool"] = false; + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + this["policy:MaxIPv6_u32"] = 0; + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + this["policy:NoSavePassword_bool"] = false; + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + this["policy:AutoDisconnect_u32"] = 0; + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + this["policy:FilterIPv4_bool"] = false; + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + this["policy:FilterIPv6_bool"] = false; + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + this["policy:FilterNonIP_bool"] = false; + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + this["policy:NoIPv6DefaultRouterInRA_bool"] = false; + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + this["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false; + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + this["policy:VLanId_u32"] = 0; + /** Security policy: Whether version 3.0 (must be true) */ + this["policy:Ver3_bool"] = false; + Object.assign(this, init); + } + return VpnRpcSetGroup; +}()); +exports.VpnRpcSetGroup = VpnRpcSetGroup; +/** Hub types */ +var VpnRpcHubType; +(function (VpnRpcHubType) { + /** Stand-alone HUB */ + VpnRpcHubType[VpnRpcHubType["Standalone"] = 0] = "Standalone"; + /** Static HUB */ + VpnRpcHubType[VpnRpcHubType["FarmStatic"] = 1] = "FarmStatic"; + /** Dynamic HUB */ + VpnRpcHubType[VpnRpcHubType["FarmDynamic"] = 2] = "FarmDynamic"; +})(VpnRpcHubType = exports.VpnRpcHubType || (exports.VpnRpcHubType = {})); +/** Create a HUB */ +var VpnRpcCreateHub = /** @class */ (function () { + /** Constructor for the 'VpnRpcCreateHub' class: Create a HUB */ + function VpnRpcCreateHub(init) { + /** Specify the name of the Virtual Hub to create / update. */ + this.HubName_str = ""; + /** Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. */ + this.AdminPasswordPlainText_str = ""; + /** Online flag */ + this.Online_bool = false; + /** Maximum number of VPN sessions */ + this.MaxSession_u32 = 0; + /** No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. */ + this.NoEnum_bool = false; + /** Type of the Virtual Hub (Valid only for Clustered VPN Servers) */ + this.HubType_u32 = 0; + Object.assign(this, init); + } + return VpnRpcCreateHub; +}()); +exports.VpnRpcCreateHub = VpnRpcCreateHub; +var VpnRpcClientAuthType; +(function (VpnRpcClientAuthType) { + /** Anonymous authentication */ + VpnRpcClientAuthType[VpnRpcClientAuthType["Anonymous"] = 0] = "Anonymous"; + /** SHA-0 hashed password authentication */ + VpnRpcClientAuthType[VpnRpcClientAuthType["SHA0_Hashed_Password"] = 1] = "SHA0_Hashed_Password"; + /** Plain password authentication */ + VpnRpcClientAuthType[VpnRpcClientAuthType["PlainPassword"] = 2] = "PlainPassword"; + /** Certificate authentication */ + VpnRpcClientAuthType[VpnRpcClientAuthType["Cert"] = 3] = "Cert"; +})(VpnRpcClientAuthType = exports.VpnRpcClientAuthType || (exports.VpnRpcClientAuthType = {})); +/** Create and set of link */ +var VpnRpcCreateLink = /** @class */ (function () { + /** Constructor for the 'VpnRpcCreateLink' class: Create and set of link */ + function VpnRpcCreateLink(init) { + /** The Virtual Hub name */ + this.HubName_Ex_str = ""; + /** Online flag */ + this.Online_bool = false; + /** The flag to enable validation for the server certificate */ + this.CheckServerCert_bool = false; + /** The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. */ + this.ServerCert_bin = new Uint8Array([]); + /** Client Option Parameters: Specify the name of the Cascade Connection */ + this.AccountName_utf = ""; + /** Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. */ + this.Hostname_str = ""; + /** Client Option Parameters: Specify the port number of the destination VPN Server. */ + this.Port_u32 = 0; + /** Client Option Parameters: The type of the proxy server */ + this.ProxyType_u32 = 0; + /** Client Option Parameters: The hostname or IP address of the proxy server name */ + this.ProxyName_str = ""; + /** Client Option Parameters: The port number of the proxy server */ + this.ProxyPort_u32 = 0; + /** Client Option Parameters: The username to connect to the proxy server */ + this.ProxyUsername_str = ""; + /** Client Option Parameters: The password to connect to the proxy server */ + this.ProxyPassword_str = ""; + /** Client Option Parameters: The Virtual Hub on the destination VPN Server */ + this.HubName_str = ""; + /** Client Option Parameters: Number of TCP Connections to Use in VPN Communication */ + this.MaxConnection_u32 = 0; + /** Client Option Parameters: The flag to enable the encryption on the communication */ + this.UseEncrypt_bool = false; + /** Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection */ + this.UseCompress_bool = false; + /** Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. */ + this.HalfConnection_bool = false; + /** Client Option Parameters: Connection attempt interval when additional connection will be established */ + this.AdditionalConnectionInterval_u32 = 0; + /** Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) */ + this.ConnectionDisconnectSpan_u32 = 0; + /** Client Option Parameters: Disable QoS Control Function if the value is true */ + this.DisableQoS_bool = false; + /** Client Option Parameters: Do not use TLS 1.x of the value is true */ + this.NoTls1_bool = false; + /** Client Option Parameters: Do not use UDP acceleration mode if the value is true */ + this.NoUdpAcceleration_bool = false; + /** Authentication type */ + this.AuthType_u32 = 0; + /** User name */ + this.Username_str = ""; + /** SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). */ + this.HashedPassword_bin = new Uint8Array([]); + /** Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). */ + this.PlainPassword_str = ""; + /** Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + this.ClientX_bin = new Uint8Array([]); + /** Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + this.ClientK_bin = new Uint8Array([]); + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + this["policy:DHCPFilter_bool"] = false; + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + this["policy:DHCPNoServer_bool"] = false; + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + this["policy:DHCPForce_bool"] = false; + /** Security policy: Prohibit the duplicate MAC address */ + this.SecPol_CheckMac_bool = false; + /** Security policy: Prohibit a duplicate IP address (IPv4) */ + this.SecPol_CheckIP_bool = false; + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + this["policy:ArpDhcpOnly_bool"] = false; + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + this["policy:PrivacyFilter_bool"] = false; + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + this["policy:NoServer_bool"] = false; + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + this["policy:NoBroadcastLimiter_bool"] = false; + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + this["policy:MaxMac_u32"] = 0; + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + this["policy:MaxIP_u32"] = 0; + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + this["policy:MaxUpload_u32"] = 0; + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + this["policy:MaxDownload_u32"] = 0; + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + this["policy:RSandRAFilter_bool"] = false; + /** Security policy: Filter the router advertisement packet (IPv6) */ + this.SecPol_RAFilter_bool = false; + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + this["policy:DHCPv6Filter_bool"] = false; + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + this["policy:DHCPv6NoServer_bool"] = false; + /** Security policy: Prohibit the duplicate IP address (IPv6) */ + this.SecPol_CheckIPv6_bool = false; + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + this["policy:NoServerV6_bool"] = false; + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + this["policy:MaxIPv6_u32"] = 0; + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + this["policy:FilterIPv4_bool"] = false; + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + this["policy:FilterIPv6_bool"] = false; + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + this["policy:FilterNonIP_bool"] = false; + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + this["policy:NoIPv6DefaultRouterInRA_bool"] = false; + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + this["policy:VLanId_u32"] = 0; + /** Security policy: Whether version 3.0 (must be true) */ + this["policy:Ver3_bool"] = false; + Object.assign(this, init); + } + return VpnRpcCreateLink; +}()); +exports.VpnRpcCreateLink = VpnRpcCreateLink; +/** Listener */ +var VpnRpcListener = /** @class */ (function () { + /** Constructor for the 'VpnRpcListener' class: Listener */ + function VpnRpcListener(init) { + /** Port number (Range: 1 - 65535) */ + this.Port_u32 = 0; + /** Active state */ + this.Enable_bool = false; + Object.assign(this, init); + } + return VpnRpcListener; +}()); +exports.VpnRpcListener = VpnRpcListener; +/** User authentication type (server side) */ +var VpnRpcUserAuthType; +(function (VpnRpcUserAuthType) { + /** Anonymous authentication */ + VpnRpcUserAuthType[VpnRpcUserAuthType["Anonymous"] = 0] = "Anonymous"; + /** Password authentication */ + VpnRpcUserAuthType[VpnRpcUserAuthType["Password"] = 1] = "Password"; + /** User certificate authentication */ + VpnRpcUserAuthType[VpnRpcUserAuthType["UserCert"] = 2] = "UserCert"; + /** Root certificate which is issued by trusted Certificate Authority */ + VpnRpcUserAuthType[VpnRpcUserAuthType["RootCert"] = 3] = "RootCert"; + /** Radius authentication */ + VpnRpcUserAuthType[VpnRpcUserAuthType["Radius"] = 4] = "Radius"; + /** Windows NT authentication */ + VpnRpcUserAuthType[VpnRpcUserAuthType["NTDomain"] = 5] = "NTDomain"; +})(VpnRpcUserAuthType = exports.VpnRpcUserAuthType || (exports.VpnRpcUserAuthType = {})); +/** Create, configure, and get the user */ +var VpnRpcSetUser = /** @class */ (function () { + /** Constructor for the 'VpnRpcSetUser' class: Create, configure, and get the user */ + function VpnRpcSetUser(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Specify the user name of the user */ + this.Name_str = ""; + /** Assigned group name for the user */ + this.GroupName_str = ""; + /** Optional real name (full name) of the user, allow using any Unicode characters */ + this.Realname_utf = ""; + /** Optional User Description */ + this.Note_utf = ""; + /** Creation date and time */ + this.CreatedTime_dt = new Date(); + /** Last modified date and time */ + this.UpdatedTime_dt = new Date(); + /** Expiration date and time */ + this.ExpireTime_dt = new Date(); + /** Authentication method of the user */ + this.AuthType_u32 = 0; + /** User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. */ + this.Auth_Password_str = ""; + /** User certificate, valid only if AuthType_u32 == UserCert(2). */ + this.UserX_bin = new Uint8Array([]); + /** Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). */ + this.Serial_bin = new Uint8Array([]); + /** Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). */ + this.CommonName_utf = ""; + /** Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). */ + this.RadiusUsername_utf = ""; + /** Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). */ + this.NtUsername_utf = ""; + /** Number of total logins of the user */ + this.NumLogin_u32 = 0; + /** Number of broadcast packets (Recv) */ + this["Recv.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Recv) */ + this["Recv.BroadcastCount_u64"] = 0; + /** Unicast count (Recv) */ + this["Recv.UnicastBytes_u64"] = 0; + /** Unicast bytes (Recv) */ + this["Recv.UnicastCount_u64"] = 0; + /** Number of broadcast packets (Send) */ + this["Send.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Send) */ + this["Send.BroadcastCount_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastBytes_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastCount_u64"] = 0; + /** The flag whether to use security policy */ + this.UsePolicy_bool = false; + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + this["policy:Access_bool"] = false; + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + this["policy:DHCPFilter_bool"] = false; + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + this["policy:DHCPNoServer_bool"] = false; + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + this["policy:DHCPForce_bool"] = false; + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + this["policy:NoBridge_bool"] = false; + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + this["policy:NoRouting_bool"] = false; + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + this["policy:CheckMac_bool"] = false; + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + this["policy:CheckIP_bool"] = false; + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + this["policy:ArpDhcpOnly_bool"] = false; + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + this["policy:PrivacyFilter_bool"] = false; + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + this["policy:NoServer_bool"] = false; + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + this["policy:NoBroadcastLimiter_bool"] = false; + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + this["policy:MonitorPort_bool"] = false; + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + this["policy:MaxConnection_u32"] = 0; + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + this["policy:TimeOut_u32"] = 0; + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + this["policy:MaxMac_u32"] = 0; + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + this["policy:MaxIP_u32"] = 0; + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + this["policy:MaxUpload_u32"] = 0; + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + this["policy:MaxDownload_u32"] = 0; + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + this["policy:FixPassword_bool"] = false; + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + this["policy:MultiLogins_u32"] = 0; + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + this["policy:NoQoS_bool"] = false; + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + this["policy:RSandRAFilter_bool"] = false; + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + this["policy:RAFilter_bool"] = false; + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + this["policy:DHCPv6Filter_bool"] = false; + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + this["policy:DHCPv6NoServer_bool"] = false; + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + this["policy:NoRoutingV6_bool"] = false; + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + this["policy:CheckIPv6_bool"] = false; + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + this["policy:NoServerV6_bool"] = false; + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + this["policy:MaxIPv6_u32"] = 0; + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + this["policy:NoSavePassword_bool"] = false; + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + this["policy:AutoDisconnect_u32"] = 0; + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + this["policy:FilterIPv4_bool"] = false; + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + this["policy:FilterIPv6_bool"] = false; + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + this["policy:FilterNonIP_bool"] = false; + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + this["policy:NoIPv6DefaultRouterInRA_bool"] = false; + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + this["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false; + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + this["policy:VLanId_u32"] = 0; + /** Security policy: Whether version 3.0 (must be true) */ + this["policy:Ver3_bool"] = false; + Object.assign(this, init); + } + return VpnRpcSetUser; +}()); +exports.VpnRpcSetUser = VpnRpcSetUser; +/** Delete the access list */ +var VpnRpcDeleteAccess = /** @class */ (function () { + /** Constructor for the 'VpnRpcDeleteAccess' class: Delete the access list */ + function VpnRpcDeleteAccess(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** ID */ + this.Id_u32 = 0; + Object.assign(this, init); + } + return VpnRpcDeleteAccess; +}()); +exports.VpnRpcDeleteAccess = VpnRpcDeleteAccess; +/** Delete the CA of HUB */ +var VpnRpcHubDeleteCA = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubDeleteCA' class: Delete the CA of HUB */ + function VpnRpcHubDeleteCA(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Certificate key id to be deleted */ + this.Key_u32 = 0; + Object.assign(this, init); + } + return VpnRpcHubDeleteCA; +}()); +exports.VpnRpcHubDeleteCA = VpnRpcHubDeleteCA; +/** Deleting a user or group */ +var VpnRpcDeleteUser = /** @class */ (function () { + /** Constructor for the 'VpnRpcDeleteUser' class: Deleting a user or group */ + function VpnRpcDeleteUser(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** User or group name */ + this.Name_str = ""; + Object.assign(this, init); + } + return VpnRpcDeleteUser; +}()); +exports.VpnRpcDeleteUser = VpnRpcDeleteUser; +/** Delete the HUB */ +var VpnRpcDeleteHub = /** @class */ (function () { + /** Constructor for the 'VpnRpcDeleteHub' class: Delete the HUB */ + function VpnRpcDeleteHub(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + Object.assign(this, init); + } + return VpnRpcDeleteHub; +}()); +exports.VpnRpcDeleteHub = VpnRpcDeleteHub; +/** Delete the table */ +var VpnRpcDeleteTable = /** @class */ (function () { + /** Constructor for the 'VpnRpcDeleteTable' class: Delete the table */ + function VpnRpcDeleteTable(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Key ID */ + this.Key_u32 = 0; + Object.assign(this, init); + } + return VpnRpcDeleteTable; +}()); +exports.VpnRpcDeleteTable = VpnRpcDeleteTable; +/** Specify the Link */ +var VpnRpcLink = /** @class */ (function () { + /** Constructor for the 'VpnRpcLink' class: Specify the Link */ + function VpnRpcLink(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The name of the cascade connection */ + this.AccountName_utf = ""; + Object.assign(this, init); + } + return VpnRpcLink; +}()); +exports.VpnRpcLink = VpnRpcLink; +/** Disconnect the session */ +var VpnRpcDeleteSession = /** @class */ (function () { + /** Constructor for the 'VpnRpcDeleteSession' class: Disconnect the session */ + function VpnRpcDeleteSession(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Session name */ + this.Name_str = ""; + Object.assign(this, init); + } + return VpnRpcDeleteSession; +}()); +exports.VpnRpcDeleteSession = VpnRpcDeleteSession; +/** Specify the HUB */ +var VpnRpcHub = /** @class */ (function () { + /** Constructor for the 'VpnRpcHub' class: Specify the HUB */ + function VpnRpcHub(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + Object.assign(this, init); + } + return VpnRpcHub; +}()); +exports.VpnRpcHub = VpnRpcHub; +/** Disconnect a connection */ +var VpnRpcDisconnectConnection = /** @class */ (function () { + /** Constructor for the 'VpnRpcDisconnectConnection' class: Disconnect a connection */ + function VpnRpcDisconnectConnection(init) { + /** Connection name */ + this.Name_str = ""; + Object.assign(this, init); + } + return VpnRpcDisconnectConnection; +}()); +exports.VpnRpcDisconnectConnection = VpnRpcDisconnectConnection; +/** Enumeration of the access list */ +var VpnRpcEnumAccessList = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumAccessList' class: Enumeration of the access list */ + function VpnRpcEnumAccessList(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Access list */ + this.AccessList = []; + Object.assign(this, init); + } + return VpnRpcEnumAccessList; +}()); +exports.VpnRpcEnumAccessList = VpnRpcEnumAccessList; +/** CA enumeration items of HUB */ +var VpnRpcHubEnumCAItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubEnumCAItem' class: CA enumeration items of HUB */ + function VpnRpcHubEnumCAItem(init) { + /** The key id of the item */ + this.Key_u32 = 0; + /** Subject */ + this.SubjectName_utf = ""; + /** Issuer */ + this.IssuerName_utf = ""; + /** Expiration date */ + this.Expires_dt = new Date(); + Object.assign(this, init); + } + return VpnRpcHubEnumCAItem; +}()); +exports.VpnRpcHubEnumCAItem = VpnRpcHubEnumCAItem; +/** CA enumeration of HUB */ +var VpnRpcHubEnumCA = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubEnumCA' class: CA enumeration of HUB */ + function VpnRpcHubEnumCA(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The list of CA */ + this.CAList = []; + Object.assign(this, init); + } + return VpnRpcHubEnumCA; +}()); +exports.VpnRpcHubEnumCA = VpnRpcHubEnumCA; +/** Type of connection */ +var VpnRpcConnectionType; +(function (VpnRpcConnectionType) { + /** VPN Client */ + VpnRpcConnectionType[VpnRpcConnectionType["Client"] = 0] = "Client"; + /** During initialization */ + VpnRpcConnectionType[VpnRpcConnectionType["Init"] = 1] = "Init"; + /** Login connection */ + VpnRpcConnectionType[VpnRpcConnectionType["Login"] = 2] = "Login"; + /** Additional connection */ + VpnRpcConnectionType[VpnRpcConnectionType["Additional"] = 3] = "Additional"; + /** RPC for server farm */ + VpnRpcConnectionType[VpnRpcConnectionType["FarmRpc"] = 4] = "FarmRpc"; + /** RPC for Management */ + VpnRpcConnectionType[VpnRpcConnectionType["AdminRpc"] = 5] = "AdminRpc"; + /** HUB enumeration */ + VpnRpcConnectionType[VpnRpcConnectionType["EnumHub"] = 6] = "EnumHub"; + /** Password change */ + VpnRpcConnectionType[VpnRpcConnectionType["Password"] = 7] = "Password"; + /** SSTP */ + VpnRpcConnectionType[VpnRpcConnectionType["SSTP"] = 8] = "SSTP"; + /** OpenVPN */ + VpnRpcConnectionType[VpnRpcConnectionType["OpenVPN"] = 9] = "OpenVPN"; +})(VpnRpcConnectionType = exports.VpnRpcConnectionType || (exports.VpnRpcConnectionType = {})); +/** Connection enumeration items */ +var VpnRpcEnumConnectionItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumConnectionItem' class: Connection enumeration items */ + function VpnRpcEnumConnectionItem(init) { + /** Connection name */ + this.Name_str = ""; + /** Host name */ + this.Hostname_str = ""; + /** IP address */ + this.Ip_ip = ""; + /** Port number */ + this.Port_u32 = 0; + /** Connected time */ + this.ConnectedTime_dt = new Date(); + /** Connection type */ + this.Type_u32 = 0; + Object.assign(this, init); + } + return VpnRpcEnumConnectionItem; +}()); +exports.VpnRpcEnumConnectionItem = VpnRpcEnumConnectionItem; +/** Connection enumeration */ +var VpnRpcEnumConnection = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumConnection' class: Connection enumeration */ + function VpnRpcEnumConnection(init) { + /** Number of connections */ + this.NumConnection_u32 = 0; + /** Connection list */ + this.ConnectionList = []; + Object.assign(this, init); + } + return VpnRpcEnumConnection; +}()); +exports.VpnRpcEnumConnection = VpnRpcEnumConnection; +/** Enum CRL Item */ +var VpnRpcEnumCrlItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumCrlItem' class: Enum CRL Item */ + function VpnRpcEnumCrlItem(init) { + /** Key ID */ + this.Key_u32 = 0; + /** The contents of the CRL item */ + this.CrlInfo_utf = ""; + Object.assign(this, init); + } + return VpnRpcEnumCrlItem; +}()); +exports.VpnRpcEnumCrlItem = VpnRpcEnumCrlItem; +/** Enum CRL */ +var VpnRpcEnumCrl = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumCrl' class: Enum CRL */ + function VpnRpcEnumCrl(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** CRL list */ + this.CRLList = []; + Object.assign(this, init); + } + return VpnRpcEnumCrl; +}()); +exports.VpnRpcEnumCrl = VpnRpcEnumCrl; +/** RPC_ENUM_DHCP_ITEM */ +var VpnRpcEnumDhcpItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumDhcpItem' class: RPC_ENUM_DHCP_ITEM */ + function VpnRpcEnumDhcpItem(init) { + /** ID */ + this.Id_u32 = 0; + /** Lease time */ + this.LeasedTime_dt = new Date(); + /** Expiration date */ + this.ExpireTime_dt = new Date(); + /** MAC address */ + this.MacAddress_bin = new Uint8Array([]); + /** IP address */ + this.IpAddress_ip = ""; + /** Subnet mask */ + this.Mask_u32 = 0; + /** Host name */ + this.Hostname_str = ""; + Object.assign(this, init); + } + return VpnRpcEnumDhcpItem; +}()); +exports.VpnRpcEnumDhcpItem = VpnRpcEnumDhcpItem; +/** RPC_ENUM_DHCP */ +var VpnRpcEnumDhcp = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumDhcp' class: RPC_ENUM_DHCP */ + function VpnRpcEnumDhcp(init) { + /** Virtual Hub Name */ + this.HubName_str = ""; + /** DHCP Item */ + this.DhcpTable = []; + Object.assign(this, init); + } + return VpnRpcEnumDhcp; +}()); +exports.VpnRpcEnumDhcp = VpnRpcEnumDhcp; +/** EtherIP setting list */ +var VpnRpcEnumEtherIpId = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumEtherIpId' class: EtherIP setting list */ + function VpnRpcEnumEtherIpId(init) { + /** Setting list */ + this.Settings = []; + Object.assign(this, init); + } + return VpnRpcEnumEtherIpId; +}()); +exports.VpnRpcEnumEtherIpId = VpnRpcEnumEtherIpId; +/** Ethernet Network Adapters list item */ +var VpnRpcEnumEthItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumEthItem' class: Ethernet Network Adapters list item */ + function VpnRpcEnumEthItem(init) { + /** Device name */ + this.DeviceName_str = ""; + /** Network connection name (description) */ + this.NetworkConnectionName_utf = ""; + Object.assign(this, init); + } + return VpnRpcEnumEthItem; +}()); +exports.VpnRpcEnumEthItem = VpnRpcEnumEthItem; +/** Ethernet Network Adapters list */ +var VpnRpcEnumEth = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumEth' class: Ethernet Network Adapters list */ + function VpnRpcEnumEth(init) { + /** Ethernet Network Adapters list */ + this.EthList = []; + Object.assign(this, init); + } + return VpnRpcEnumEth; +}()); +exports.VpnRpcEnumEth = VpnRpcEnumEth; +/** Server farm members enumeration items */ +var VpnRpcEnumFarmItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumFarmItem' class: Server farm members enumeration items */ + function VpnRpcEnumFarmItem(init) { + /** ID */ + this.Id_u32 = 0; + /** Controller */ + this.Controller_bool = false; + /** Connection time */ + this.ConnectedTime_dt = new Date(); + /** IP address */ + this.Ip_ip = ""; + /** Host name */ + this.Hostname_str = ""; + /** Point */ + this.Point_u32 = 0; + /** Number of sessions */ + this.NumSessions_u32 = 0; + /** Number of TCP connections */ + this.NumTcpConnections_u32 = 0; + /** Number of HUBs */ + this.NumHubs_u32 = 0; + /** Number of assigned client licenses */ + this.AssignedClientLicense_u32 = 0; + /** Number of assigned bridge licenses */ + this.AssignedBridgeLicense_u32 = 0; + Object.assign(this, init); + } + return VpnRpcEnumFarmItem; +}()); +exports.VpnRpcEnumFarmItem = VpnRpcEnumFarmItem; +/** Server farm member enumeration */ +var VpnRpcEnumFarm = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumFarm' class: Server farm member enumeration */ + function VpnRpcEnumFarm(init) { + /** Number of Cluster Members */ + this.NumFarm_u32 = 0; + /** Cluster Members list */ + this.FarmMemberList = []; + Object.assign(this, init); + } + return VpnRpcEnumFarm; +}()); +exports.VpnRpcEnumFarm = VpnRpcEnumFarm; +/** Enumeration items in the group */ +var VpnRpcEnumGroupItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumGroupItem' class: Enumeration items in the group */ + function VpnRpcEnumGroupItem(init) { + /** User name */ + this.Name_str = ""; + /** Real name */ + this.Realname_utf = ""; + /** Note */ + this.Note_utf = ""; + /** Number of users */ + this.NumUsers_u32 = 0; + /** Access denied */ + this.DenyAccess_bool = false; + Object.assign(this, init); + } + return VpnRpcEnumGroupItem; +}()); +exports.VpnRpcEnumGroupItem = VpnRpcEnumGroupItem; +/** Group enumeration */ +var VpnRpcEnumGroup = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumGroup' class: Group enumeration */ + function VpnRpcEnumGroup(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Group list */ + this.GroupList = []; + Object.assign(this, init); + } + return VpnRpcEnumGroup; +}()); +exports.VpnRpcEnumGroup = VpnRpcEnumGroup; +/** Enumeration items of HUB */ +var VpnRpcEnumHubItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumHubItem' class: Enumeration items of HUB */ + function VpnRpcEnumHubItem(init) { + /** The name of the Virtual Hub */ + this.HubName_str = ""; + /** Online state */ + this.Online_bool = false; + /** Type of HUB (Valid only for Clustered VPN Servers) */ + this.HubType_u32 = 0; + /** Number of users */ + this.NumUsers_u32 = 0; + /** Number of registered groups */ + this.NumGroups_u32 = 0; + /** Number of registered sessions */ + this.NumSessions_u32 = 0; + /** Number of current MAC table entries */ + this.NumMacTables_u32 = 0; + /** Number of current IP table entries */ + this.NumIpTables_u32 = 0; + /** Last communication date and time */ + this.LastCommTime_dt = new Date(); + /** Last login date and time */ + this.LastLoginTime_dt = new Date(); + /** Creation date and time */ + this.CreatedTime_dt = new Date(); + /** Number of accumulated logins */ + this.NumLogin_u32 = 0; + /** Whether the traffic information is provided */ + this.IsTrafficFilled_bool = false; + /** Number of broadcast packets (Recv) */ + this["Ex.Recv.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Recv) */ + this["Ex.Recv.BroadcastCount_u64"] = 0; + /** Unicast count (Recv) */ + this["Ex.Recv.UnicastBytes_u64"] = 0; + /** Unicast bytes (Recv) */ + this["Ex.Recv.UnicastCount_u64"] = 0; + /** Number of broadcast packets (Send) */ + this["Ex.Send.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Send) */ + this["Ex.Send.BroadcastCount_u64"] = 0; + /** Unicast bytes (Send) */ + this["Ex.Send.UnicastBytes_u64"] = 0; + /** Unicast bytes (Send) */ + this["Ex.Send.UnicastCount_u64"] = 0; + Object.assign(this, init); + } + return VpnRpcEnumHubItem; +}()); +exports.VpnRpcEnumHubItem = VpnRpcEnumHubItem; +/** Enumeration of HUB */ +var VpnRpcEnumHub = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumHub' class: Enumeration of HUB */ + function VpnRpcEnumHub(init) { + /** Number of Virtual Hubs */ + this.NumHub_u32 = 0; + /** Virtual Hubs */ + this.HubList = []; + Object.assign(this, init); + } + return VpnRpcEnumHub; +}()); +exports.VpnRpcEnumHub = VpnRpcEnumHub; +/** Enumeration items of IP table */ +var VpnRpcEnumIpTableItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumIpTableItem' class: Enumeration items of IP table */ + function VpnRpcEnumIpTableItem(init) { + /** Key ID */ + this.Key_u32 = 0; + /** Session name */ + this.SessionName_str = ""; + /** IP address */ + this.IpAddress_ip = ""; + /** Assigned by the DHCP */ + this.DhcpAllocated_bool = false; + /** Creation date and time */ + this.CreatedTime_dt = new Date(); + /** Updating date */ + this.UpdatedTime_dt = new Date(); + /** Remote items */ + this.RemoteItem_bool = false; + /** Remote host name */ + this.RemoteHostname_str = ""; + Object.assign(this, init); + } + return VpnRpcEnumIpTableItem; +}()); +exports.VpnRpcEnumIpTableItem = VpnRpcEnumIpTableItem; +/** Enumeration of IP table */ +var VpnRpcEnumIpTable = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumIpTable' class: Enumeration of IP table */ + function VpnRpcEnumIpTable(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** MAC table */ + this.IpTable = []; + Object.assign(this, init); + } + return VpnRpcEnumIpTable; +}()); +exports.VpnRpcEnumIpTable = VpnRpcEnumIpTable; +/** Layer-3 interface enumeration */ +var VpnRpcEnumL3If = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumL3If' class: Layer-3 interface enumeration */ + function VpnRpcEnumL3If(init) { + /** Layer-3 switch name */ + this.Name_str = ""; + /** Layer-3 interface list */ + this.L3IFList = []; + Object.assign(this, init); + } + return VpnRpcEnumL3If; +}()); +exports.VpnRpcEnumL3If = VpnRpcEnumL3If; +/** Layer-3 switch enumeration item */ +var VpnRpcEnumL3SwItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumL3SwItem' class: Layer-3 switch enumeration item */ + function VpnRpcEnumL3SwItem(init) { + /** Name of the layer-3 switch */ + this.Name_str = ""; + /** Number of layer-3 switch virtual interfaces */ + this.NumInterfaces_u32 = 0; + /** Number of routing tables */ + this.NumTables_u32 = 0; + /** Activated flag */ + this.Active_bool = false; + /** Online flag */ + this.Online_bool = false; + Object.assign(this, init); + } + return VpnRpcEnumL3SwItem; +}()); +exports.VpnRpcEnumL3SwItem = VpnRpcEnumL3SwItem; +/** Layer-3 switch enumeration */ +var VpnRpcEnumL3Sw = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumL3Sw' class: Layer-3 switch enumeration */ + function VpnRpcEnumL3Sw(init) { + /** Layer-3 switch list */ + this.L3SWList = []; + Object.assign(this, init); + } + return VpnRpcEnumL3Sw; +}()); +exports.VpnRpcEnumL3Sw = VpnRpcEnumL3Sw; +/** Routing table enumeration */ +var VpnRpcEnumL3Table = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumL3Table' class: Routing table enumeration */ + function VpnRpcEnumL3Table(init) { + /** L3 switch name */ + this.Name_str = ""; + /** Routing table item list */ + this.L3Table = []; + Object.assign(this, init); + } + return VpnRpcEnumL3Table; +}()); +exports.VpnRpcEnumL3Table = VpnRpcEnumL3Table; +/** Cascade Connection Enumeration */ +var VpnRpcEnumLinkItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumLinkItem' class: Cascade Connection Enumeration */ + function VpnRpcEnumLinkItem(init) { + /** The name of cascade connection */ + this.AccountName_utf = ""; + /** Online flag */ + this.Online_bool = false; + /** The flag indicates whether the cascade connection is established */ + this.Connected_bool = false; + /** The error last occurred if the cascade connection is in the fail state */ + this.LastError_u32 = 0; + /** Connection completion time */ + this.ConnectedTime_dt = new Date(); + /** Host name of the destination VPN server */ + this.Hostname_str = ""; + /** The Virtual Hub name */ + this.TargetHubName_str = ""; + Object.assign(this, init); + } + return VpnRpcEnumLinkItem; +}()); +exports.VpnRpcEnumLinkItem = VpnRpcEnumLinkItem; +/** Enumeration of the link */ +var VpnRpcEnumLink = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumLink' class: Enumeration of the link */ + function VpnRpcEnumLink(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Number of cascade connections */ + this.NumLink_u32 = 0; + /** The list of cascade connections */ + this.LinkList = []; + Object.assign(this, init); + } + return VpnRpcEnumLink; +}()); +exports.VpnRpcEnumLink = VpnRpcEnumLink; +/** List of listeners item */ +var VpnRpcListenerListItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcListenerListItem' class: List of listeners item */ + function VpnRpcListenerListItem(init) { + /** TCP port number (range: 1 - 65535) */ + this.Ports_u32 = 0; + /** Active state */ + this.Enables_bool = false; + /** The flag to indicate if the error occurred on the listener port */ + this.Errors_bool = false; + Object.assign(this, init); + } + return VpnRpcListenerListItem; +}()); +exports.VpnRpcListenerListItem = VpnRpcListenerListItem; +/** List of listeners */ +var VpnRpcListenerList = /** @class */ (function () { + /** Constructor for the 'VpnRpcListenerList' class: List of listeners */ + function VpnRpcListenerList(init) { + /** List of listener items */ + this.ListenerList = []; + Object.assign(this, init); + } + return VpnRpcListenerList; +}()); +exports.VpnRpcListenerList = VpnRpcListenerList; +/** Local Bridge enumeration */ +var VpnRpcEnumLocalBridge = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumLocalBridge' class: Local Bridge enumeration */ + function VpnRpcEnumLocalBridge(init) { + /** Local Bridge list */ + this.LocalBridgeList = []; + Object.assign(this, init); + } + return VpnRpcEnumLocalBridge; +}()); +exports.VpnRpcEnumLocalBridge = VpnRpcEnumLocalBridge; +/** Log file enumeration */ +var VpnRpcEnumLogFileItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumLogFileItem' class: Log file enumeration */ + function VpnRpcEnumLogFileItem(init) { + /** Server name */ + this.ServerName_str = ""; + /** File path */ + this.FilePath_str = ""; + /** File size */ + this.FileSize_u32 = 0; + /** Last write date */ + this.UpdatedTime_dt = new Date(); + Object.assign(this, init); + } + return VpnRpcEnumLogFileItem; +}()); +exports.VpnRpcEnumLogFileItem = VpnRpcEnumLogFileItem; +/** Log file enumeration */ +var VpnRpcEnumLogFile = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumLogFile' class: Log file enumeration */ + function VpnRpcEnumLogFile(init) { + /** Log file list */ + this.LogFiles = []; + Object.assign(this, init); + } + return VpnRpcEnumLogFile; +}()); +exports.VpnRpcEnumLogFile = VpnRpcEnumLogFile; +/** Enumeration items of the MAC table */ +var VpnRpcEnumMacTableItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumMacTableItem' class: Enumeration items of the MAC table */ + function VpnRpcEnumMacTableItem(init) { + /** Key ID */ + this.Key_u32 = 0; + /** Session name */ + this.SessionName_str = ""; + /** MAC address */ + this.MacAddress_bin = new Uint8Array([]); + /** Creation date and time */ + this.CreatedTime_dt = new Date(); + /** Updating date */ + this.UpdatedTime_dt = new Date(); + /** Remote items */ + this.RemoteItem_bool = false; + /** Remote host name */ + this.RemoteHostname_str = ""; + /** VLAN ID */ + this.VlanId_u32 = 0; + Object.assign(this, init); + } + return VpnRpcEnumMacTableItem; +}()); +exports.VpnRpcEnumMacTableItem = VpnRpcEnumMacTableItem; +/** Enumeration of the MAC table */ +var VpnRpcEnumMacTable = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumMacTable' class: Enumeration of the MAC table */ + function VpnRpcEnumMacTable(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** MAC table */ + this.MacTable = []; + Object.assign(this, init); + } + return VpnRpcEnumMacTable; +}()); +exports.VpnRpcEnumMacTable = VpnRpcEnumMacTable; +/** NAT Entry Protocol Number */ +var VpnRpcNatProtocol; +(function (VpnRpcNatProtocol) { + /** TCP */ + VpnRpcNatProtocol[VpnRpcNatProtocol["TCP"] = 0] = "TCP"; + /** UDP */ + VpnRpcNatProtocol[VpnRpcNatProtocol["UDP"] = 1] = "UDP"; + /** DNS */ + VpnRpcNatProtocol[VpnRpcNatProtocol["DNS"] = 2] = "DNS"; + /** ICMP */ + VpnRpcNatProtocol[VpnRpcNatProtocol["ICMP"] = 3] = "ICMP"; +})(VpnRpcNatProtocol = exports.VpnRpcNatProtocol || (exports.VpnRpcNatProtocol = {})); +/** State of NAT session (TCP) */ +var VpnRpcNatTcpState; +(function (VpnRpcNatTcpState) { + /** Connecting */ + VpnRpcNatTcpState[VpnRpcNatTcpState["Connecting"] = 0] = "Connecting"; + /** Send the RST (Connection failure or disconnected) */ + VpnRpcNatTcpState[VpnRpcNatTcpState["SendReset"] = 1] = "SendReset"; + /** Connection complete */ + VpnRpcNatTcpState[VpnRpcNatTcpState["Connected"] = 2] = "Connected"; + /** Connection established */ + VpnRpcNatTcpState[VpnRpcNatTcpState["Established"] = 3] = "Established"; + /** Wait for socket disconnection */ + VpnRpcNatTcpState[VpnRpcNatTcpState["WaitDisconnect"] = 4] = "WaitDisconnect"; +})(VpnRpcNatTcpState = exports.VpnRpcNatTcpState || (exports.VpnRpcNatTcpState = {})); +/** VpnRpcEnumNat List Item */ +var VpnRpcEnumNatItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumNatItem' class: VpnRpcEnumNat List Item */ + function VpnRpcEnumNatItem(init) { + /** ID */ + this.Id_u32 = 0; + /** Protocol */ + this.Protocol_u32 = 0; + /** Source IP address */ + this.SrcIp_ip = ""; + /** Source host name */ + this.SrcHost_str = ""; + /** Source port number */ + this.SrcPort_u32 = 0; + /** Destination IP address */ + this.DestIp_ip = ""; + /** Destination host name */ + this.DestHost_str = ""; + /** Destination port number */ + this.DestPort_u32 = 0; + /** Connection time */ + this.CreatedTime_dt = new Date(); + /** Last communication time */ + this.LastCommTime_dt = new Date(); + /** Transmission size */ + this.SendSize_u64 = 0; + /** Receive size */ + this.RecvSize_u64 = 0; + /** TCP state */ + this.TcpStatus_u32 = 0; + Object.assign(this, init); + } + return VpnRpcEnumNatItem; +}()); +exports.VpnRpcEnumNatItem = VpnRpcEnumNatItem; +/** RPC_ENUM_NAT */ +var VpnRpcEnumNat = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumNat' class: RPC_ENUM_NAT */ + function VpnRpcEnumNat(init) { + /** Virtual Hub Name */ + this.HubName_str = ""; + /** NAT item */ + this.NatTable = []; + Object.assign(this, init); + } + return VpnRpcEnumNat; +}()); +exports.VpnRpcEnumNat = VpnRpcEnumNat; +/** Enumeration item of VPN session */ +var VpnRpcEnumSessionItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumSessionItem' class: Enumeration item of VPN session */ + function VpnRpcEnumSessionItem(init) { + /** Session name */ + this.Name_str = ""; + /** Remote session */ + this.RemoteSession_bool = false; + /** Remote server name */ + this.RemoteHostname_str = ""; + /** User name */ + this.Username_str = ""; + /** IP address */ + this.ClientIP_ip = ""; + /** Host name */ + this.Hostname_str = ""; + /** Maximum number of underlying TCP connections */ + this.MaxNumTcp_u32 = 0; + /** Number of current underlying TCP connections */ + this.CurrentNumTcp_u32 = 0; + /** Packet size transmitted */ + this.PacketSize_u64 = 0; + /** Number of packets transmitted */ + this.PacketNum_u64 = 0; + /** Is a Cascade VPN session */ + this.LinkMode_bool = false; + /** Is a SecureNAT VPN session */ + this.SecureNATMode_bool = false; + /** Is the VPN session for Local Bridge */ + this.BridgeMode_bool = false; + /** Is a Layer-3 Switch VPN session */ + this.Layer3Mode_bool = false; + /** Is in Bridge Mode */ + this.Client_BridgeMode_bool = false; + /** Is in Monitor Mode */ + this.Client_MonitorMode_bool = false; + /** VLAN ID */ + this.VLanId_u32 = 0; + /** Unique ID of the VPN Session */ + this.UniqueId_bin = new Uint8Array([]); + /** Creation date and time */ + this.CreatedTime_dt = new Date(); + /** Last communication date and time */ + this.LastCommTime_dt = new Date(); + Object.assign(this, init); + } + return VpnRpcEnumSessionItem; +}()); +exports.VpnRpcEnumSessionItem = VpnRpcEnumSessionItem; +/** Enumerate VPN sessions */ +var VpnRpcEnumSession = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumSession' class: Enumerate VPN sessions */ + function VpnRpcEnumSession(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** VPN sessions list */ + this.SessionList = []; + Object.assign(this, init); + } + return VpnRpcEnumSession; +}()); +exports.VpnRpcEnumSession = VpnRpcEnumSession; +/** Enumeration item of user */ +var VpnRpcEnumUserItem = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumUserItem' class: Enumeration item of user */ + function VpnRpcEnumUserItem(init) { + /** User name */ + this.Name_str = ""; + /** Group name */ + this.GroupName_str = ""; + /** Real name */ + this.Realname_utf = ""; + /** Note */ + this.Note_utf = ""; + /** Authentication method */ + this.AuthType_u32 = 0; + /** Number of logins */ + this.NumLogin_u32 = 0; + /** Last login date and time */ + this.LastLoginTime_dt = new Date(); + /** Access denied */ + this.DenyAccess_bool = false; + /** Flag of whether the traffic variable is set */ + this.IsTrafficFilled_bool = false; + /** Flag of whether expiration date variable is set */ + this.IsExpiresFilled_bool = false; + /** Expiration date */ + this.Expires_dt = new Date(); + /** Number of broadcast packets (Recv) */ + this["Ex.Recv.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Recv) */ + this["Ex.Recv.BroadcastCount_u64"] = 0; + /** Unicast count (Recv) */ + this["Ex.Recv.UnicastBytes_u64"] = 0; + /** Unicast bytes (Recv) */ + this["Ex.Recv.UnicastCount_u64"] = 0; + /** Number of broadcast packets (Send) */ + this["Ex.Send.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Send) */ + this["Ex.Send.BroadcastCount_u64"] = 0; + /** Unicast bytes (Send) */ + this["Ex.Send.UnicastBytes_u64"] = 0; + /** Unicast bytes (Send) */ + this["Ex.Send.UnicastCount_u64"] = 0; + Object.assign(this, init); + } + return VpnRpcEnumUserItem; +}()); +exports.VpnRpcEnumUserItem = VpnRpcEnumUserItem; +/** Enumeration of user */ +var VpnRpcEnumUser = /** @class */ (function () { + /** Constructor for the 'VpnRpcEnumUser' class: Enumeration of user */ + function VpnRpcEnumUser(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** User list */ + this.UserList = []; + Object.assign(this, init); + } + return VpnRpcEnumUser; +}()); +exports.VpnRpcEnumUser = VpnRpcEnumUser; +/** Source IP Address Limit List Item */ +var VpnAc = /** @class */ (function () { + /** Constructor for the 'VpnAc' class: Source IP Address Limit List Item */ + function VpnAc(init) { + /** ID */ + this.Id_u32 = 0; + /** Priority */ + this.Priority_u32 = 0; + /** Deny access */ + this.Deny_bool = false; + /** Set true if you want to specify the SubnetMask_ip item. */ + this.Masked_bool = false; + /** IP address */ + this.IpAddress_ip = ""; + /** Subnet mask, valid only if Masked_bool == true */ + this.SubnetMask_ip = ""; + Object.assign(this, init); + } + return VpnAc; +}()); +exports.VpnAc = VpnAc; +/** Source IP Address Limit List */ +var VpnRpcAcList = /** @class */ (function () { + /** Constructor for the 'VpnRpcAcList' class: Source IP Address Limit List */ + function VpnRpcAcList(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Source IP Address Limit List */ + this.ACList = []; + Object.assign(this, init); + } + return VpnRpcAcList; +}()); +exports.VpnRpcAcList = VpnRpcAcList; +/** Message */ +var VpnRpcMsg = /** @class */ (function () { + /** Constructor for the 'VpnRpcMsg' class: Message */ + function VpnRpcMsg(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Message (Unicode strings acceptable) */ + this.Msg_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcMsg; +}()); +exports.VpnRpcMsg = VpnRpcMsg; +/** Get / Set the Azure state */ +var VpnRpcAzureStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcAzureStatus' class: Get / Set the Azure state */ + function VpnRpcAzureStatus(init) { + /** Whether VPN Azure Function is Enabled */ + this.IsEnabled_bool = false; + /** Whether connection to VPN Azure Cloud Server is established */ + this.IsConnected_bool = false; + Object.assign(this, init); + } + return VpnRpcAzureStatus; +}()); +exports.VpnRpcAzureStatus = VpnRpcAzureStatus; +/** Local Bridge support information */ +var VpnRpcBridgeSupport = /** @class */ (function () { + /** Constructor for the 'VpnRpcBridgeSupport' class: Local Bridge support information */ + function VpnRpcBridgeSupport(init) { + /** Whether the OS supports the Local Bridge function */ + this.IsBridgeSupportedOs_bool = false; + /** Whether WinPcap is necessary to install */ + this.IsWinPcapNeeded_bool = false; + Object.assign(this, init); + } + return VpnRpcBridgeSupport; +}()); +exports.VpnRpcBridgeSupport = VpnRpcBridgeSupport; +/** Get the CA of HUB */ +var VpnRpcHubGetCA = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubGetCA' class: Get the CA of HUB */ + function VpnRpcHubGetCA(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The key id of the certificate */ + this.Key_u32 = 0; + /** The body of the X.509 certificate */ + this.Cert_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcHubGetCA; +}()); +exports.VpnRpcHubGetCA = VpnRpcHubGetCA; +/** Caps item of the VPN Server */ +var VpnCaps = /** @class */ (function () { + /** Constructor for the 'VpnCaps' class: Caps item of the VPN Server */ + function VpnCaps(init) { + /** Name */ + this.CapsName_str = ""; + /** Value */ + this.CapsValue_u32 = 0; + /** Descrption */ + this.CapsDescrption_utf = ""; + Object.assign(this, init); + } + return VpnCaps; +}()); +exports.VpnCaps = VpnCaps; +/** Caps list of the VPN Server */ +var VpnCapslist = /** @class */ (function () { + /** Constructor for the 'VpnCapslist' class: Caps list of the VPN Server */ + function VpnCapslist(init) { + /** Caps list of the VPN Server */ + this.CapsList = []; + Object.assign(this, init); + } + return VpnCapslist; +}()); +exports.VpnCapslist = VpnCapslist; +/** Config operation */ +var VpnRpcConfig = /** @class */ (function () { + /** Constructor for the 'VpnRpcConfig' class: Config operation */ + function VpnRpcConfig(init) { + /** File name (valid only for returning from the server) */ + this.FileName_str = ""; + /** File data */ + this.FileData_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcConfig; +}()); +exports.VpnRpcConfig = VpnRpcConfig; +/** Connection information */ +var VpnRpcConnectionInfo = /** @class */ (function () { + /** Constructor for the 'VpnRpcConnectionInfo' class: Connection information */ + function VpnRpcConnectionInfo(init) { + /** Connection name */ + this.Name_str = ""; + /** Type */ + this.Type_u32 = 0; + /** Host name */ + this.Hostname_str = ""; + /** IP address */ + this.Ip_ip = ""; + /** Port number */ + this.Port_u32 = 0; + /** Connected time */ + this.ConnectedTime_dt = new Date(); + /** Server string */ + this.ServerStr_str = ""; + /** Server version */ + this.ServerVer_u32 = 0; + /** Server build number */ + this.ServerBuild_u32 = 0; + /** Client string */ + this.ClientStr_str = ""; + /** Client version */ + this.ClientVer_u32 = 0; + /** Client build number */ + this.ClientBuild_u32 = 0; + Object.assign(this, init); + } + return VpnRpcConnectionInfo; +}()); +exports.VpnRpcConnectionInfo = VpnRpcConnectionInfo; +/** Proxy type */ +var VpnRpcProxyType; +(function (VpnRpcProxyType) { + /** Direct TCP connection */ + VpnRpcProxyType[VpnRpcProxyType["Direct"] = 0] = "Direct"; + /** Connection via HTTP proxy server */ + VpnRpcProxyType[VpnRpcProxyType["HTTP"] = 1] = "HTTP"; + /** Connection via SOCKS proxy server */ + VpnRpcProxyType[VpnRpcProxyType["SOCKS"] = 2] = "SOCKS"; +})(VpnRpcProxyType = exports.VpnRpcProxyType || (exports.VpnRpcProxyType = {})); +/** The current status of the DDNS */ +var VpnDDnsClientStatus = /** @class */ (function () { + /** Constructor for the 'VpnDDnsClientStatus' class: The current status of the DDNS */ + function VpnDDnsClientStatus(init) { + /** Last error code (IPv4) */ + this.Err_IPv4_u32 = 0; + /** Last error string (IPv4) */ + this.ErrStr_IPv4_utf = ""; + /** Last error code (IPv6) */ + this.Err_IPv6_u32 = 0; + /** Last error string (IPv6) */ + this.ErrStr_IPv6_utf = ""; + /** Current DDNS host name */ + this.CurrentHostName_str = ""; + /** Current FQDN of the DDNS hostname */ + this.CurrentFqdn_str = ""; + /** DDNS suffix */ + this.DnsSuffix_str = ""; + /** Current IPv4 address of the VPN Server */ + this.CurrentIPv4_str = ""; + /** Current IPv6 address of the VPN Server */ + this.CurrentIPv6_str = ""; + Object.assign(this, init); + } + return VpnDDnsClientStatus; +}()); +exports.VpnDDnsClientStatus = VpnDDnsClientStatus; +/** Internet connection settings */ +var VpnInternetSetting = /** @class */ (function () { + /** Constructor for the 'VpnInternetSetting' class: Internet connection settings */ + function VpnInternetSetting(init) { + /** Type of proxy server */ + this.ProxyType_u32 = 0; + /** Proxy server host name */ + this.ProxyHostName_str = ""; + /** Proxy server port number */ + this.ProxyPort_u32 = 0; + /** Proxy server user name */ + this.ProxyUsername_str = ""; + /** Proxy server password */ + this.ProxyPassword_str = ""; + Object.assign(this, init); + } + return VpnInternetSetting; +}()); +exports.VpnInternetSetting = VpnInternetSetting; +/** Administration options */ +var VpnAdminOption = /** @class */ (function () { + /** Constructor for the 'VpnAdminOption' class: Administration options */ + function VpnAdminOption(init) { + /** Name */ + this.Name_str = ""; + /** Data */ + this.Value_u32 = 0; + /** Descrption */ + this.Descrption_utf = ""; + Object.assign(this, init); + } + return VpnAdminOption; +}()); +exports.VpnAdminOption = VpnAdminOption; +/** Administration options list */ +var VpnRpcAdminOption = /** @class */ (function () { + /** Constructor for the 'VpnRpcAdminOption' class: Administration options list */ + function VpnRpcAdminOption(init) { + /** Virtual HUB name */ + this.HubName_str = ""; + /** List data */ + this.AdminOptionList = []; + Object.assign(this, init); + } + return VpnRpcAdminOption; +}()); +exports.VpnRpcAdminOption = VpnRpcAdminOption; +/** Connection state to the controller */ +var VpnRpcFarmConnectionStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcFarmConnectionStatus' class: Connection state to the controller */ + function VpnRpcFarmConnectionStatus(init) { + /** IP address */ + this.Ip_ip = ""; + /** Port number */ + this.Port_u32 = 0; + /** Online state */ + this.Online_bool = false; + /** Last error code */ + this.LastError_u32 = 0; + /** Connection start time */ + this.StartedTime_dt = new Date(); + /** First connection time */ + this.FirstConnectedTime_dt = new Date(); + /** Connection time of this time */ + this.CurrentConnectedTime_dt = new Date(); + /** Number of retries */ + this.NumTry_u32 = 0; + /** Number of connection count */ + this.NumConnected_u32 = 0; + /** Connection failure count */ + this.NumFailed_u32 = 0; + Object.assign(this, init); + } + return VpnRpcFarmConnectionStatus; +}()); +exports.VpnRpcFarmConnectionStatus = VpnRpcFarmConnectionStatus; +/** HUB item of each farm member */ +var VpnRpcFarmHub = /** @class */ (function () { + /** Constructor for the 'VpnRpcFarmHub' class: HUB item of each farm member */ + function VpnRpcFarmHub(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Dynamic HUB */ + this.DynamicHub_bool = false; + Object.assign(this, init); + } + return VpnRpcFarmHub; +}()); +exports.VpnRpcFarmHub = VpnRpcFarmHub; +/** Server farm member information acquisition */ +var VpnRpcFarmInfo = /** @class */ (function () { + /** Constructor for the 'VpnRpcFarmInfo' class: Server farm member information acquisition */ + function VpnRpcFarmInfo(init) { + /** ID */ + this.Id_u32 = 0; + /** The flag if the server is Cluster Controller (false: Cluster Member servers) */ + this.Controller_bool = false; + /** Connection Established Time */ + this.ConnectedTime_dt = new Date(); + /** IP address */ + this.Ip_ip = ""; + /** Host name */ + this.Hostname_str = ""; + /** Point */ + this.Point_u32 = 0; + /** Number of Public Ports */ + this.NumPort_u32 = 0; + /** Public Ports */ + this.Ports_u32 = []; + /** Server certificate */ + this.ServerCert_bin = new Uint8Array([]); + /** Number of farm HUB */ + this.NumFarmHub_u32 = 0; + /** The hosted Virtual Hub list */ + this.HubsList = []; + /** Number of hosted VPN sessions */ + this.NumSessions_u32 = 0; + /** Number of TCP connections */ + this.NumTcpConnections_u32 = 0; + /** Performance Standard Ratio */ + this.Weight_u32 = 0; + Object.assign(this, init); + } + return VpnRpcFarmInfo; +}()); +exports.VpnRpcFarmInfo = VpnRpcFarmInfo; +/** Server farm configuration */ +var VpnRpcFarm = /** @class */ (function () { + /** Constructor for the 'VpnRpcFarm' class: Server farm configuration */ + function VpnRpcFarm(init) { + /** Type of server */ + this.ServerType_u32 = 0; + /** Valid only for Cluster Member servers. Number of the Ports_u32 element. */ + this.NumPort_u32 = 0; + /** Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. */ + this.Ports_u32 = []; + /** Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. */ + this.PublicIp_ip = ""; + /** Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. */ + this.ControllerName_str = ""; + /** Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. */ + this.ControllerPort_u32 = 0; + /** Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. */ + this.MemberPasswordPlaintext_str = ""; + /** This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. */ + this.Weight_u32 = 0; + /** Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. */ + this.ControllerOnly_bool = false; + Object.assign(this, init); + } + return VpnRpcFarm; +}()); +exports.VpnRpcFarm = VpnRpcFarm; +/** Log switch type */ +var VpnRpcLogSwitchType; +(function (VpnRpcLogSwitchType) { + /** No switching */ + VpnRpcLogSwitchType[VpnRpcLogSwitchType["No"] = 0] = "No"; + /** Secondly basis */ + VpnRpcLogSwitchType[VpnRpcLogSwitchType["Second"] = 1] = "Second"; + /** Minutely basis */ + VpnRpcLogSwitchType[VpnRpcLogSwitchType["Minute"] = 2] = "Minute"; + /** Hourly basis */ + VpnRpcLogSwitchType[VpnRpcLogSwitchType["Hour"] = 3] = "Hour"; + /** Daily basis */ + VpnRpcLogSwitchType[VpnRpcLogSwitchType["Day"] = 4] = "Day"; + /** Monthly basis */ + VpnRpcLogSwitchType[VpnRpcLogSwitchType["Month"] = 5] = "Month"; +})(VpnRpcLogSwitchType = exports.VpnRpcLogSwitchType || (exports.VpnRpcLogSwitchType = {})); +/** Packet log settings */ +var VpnRpcPacketLogSetting; +(function (VpnRpcPacketLogSetting) { + /** Not save */ + VpnRpcPacketLogSetting[VpnRpcPacketLogSetting["None"] = 0] = "None"; + /** Only header */ + VpnRpcPacketLogSetting[VpnRpcPacketLogSetting["Header"] = 1] = "Header"; + /** All payloads */ + VpnRpcPacketLogSetting[VpnRpcPacketLogSetting["All"] = 2] = "All"; +})(VpnRpcPacketLogSetting = exports.VpnRpcPacketLogSetting || (exports.VpnRpcPacketLogSetting = {})); +/** Packet log settings array index */ +var VpnRpcPacketLogSettingIndex; +(function (VpnRpcPacketLogSettingIndex) { + /** TCP connection log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["TcpConnection"] = 0] = "TcpConnection"; + /** TCP packet log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["TcpAll"] = 1] = "TcpAll"; + /** DHCP Log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["Dhcp"] = 2] = "Dhcp"; + /** UDP log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["Udp"] = 3] = "Udp"; + /** ICMP log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["Icmp"] = 4] = "Icmp"; + /** IP log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["Ip"] = 5] = "Ip"; + /** ARP log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["Arp"] = 6] = "Arp"; + /** Ethernet log */ + VpnRpcPacketLogSettingIndex[VpnRpcPacketLogSettingIndex["Ethernet"] = 7] = "Ethernet"; +})(VpnRpcPacketLogSettingIndex = exports.VpnRpcPacketLogSettingIndex || (exports.VpnRpcPacketLogSettingIndex = {})); +/** HUB log settings */ +var VpnRpcHubLog = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubLog' class: HUB log settings */ + function VpnRpcHubLog(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The flag to enable / disable saving the security log */ + this.SaveSecurityLog_bool = false; + /** The log filename switching setting of the security log */ + this.SecurityLogSwitchType_u32 = 0; + /** The flag to enable / disable saving the security log */ + this.SavePacketLog_bool = false; + /** The log filename switching settings of the packet logs */ + this.PacketLogSwitchType_u32 = 0; + /** Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7. */ + this.PacketLogConfig_u32 = []; + Object.assign(this, init); + } + return VpnRpcHubLog; +}()); +exports.VpnRpcHubLog = VpnRpcHubLog; +/** RADIUS server options */ +var VpnRpcRadius = /** @class */ (function () { + /** Constructor for the 'VpnRpcRadius' class: RADIUS server options */ + function VpnRpcRadius(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** RADIUS server name */ + this.RadiusServerName_str = ""; + /** RADIUS port number */ + this.RadiusPort_u32 = 0; + /** Secret key */ + this.RadiusSecret_str = ""; + /** Radius retry interval */ + this.RadiusRetryInterval_u32 = 0; + Object.assign(this, init); + } + return VpnRpcRadius; +}()); +exports.VpnRpcRadius = VpnRpcRadius; +/** Get the state HUB */ +var VpnRpcHubStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcHubStatus' class: Get the state HUB */ + function VpnRpcHubStatus(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Online */ + this.Online_bool = false; + /** Type of HUB */ + this.HubType_u32 = 0; + /** Number of sessions */ + this.NumSessions_u32 = 0; + /** Number of sessions (client mode) */ + this.NumSessionsClient_u32 = 0; + /** Number of sessions (bridge mode) */ + this.NumSessionsBridge_u32 = 0; + /** Number of Access list entries */ + this.NumAccessLists_u32 = 0; + /** Number of users */ + this.NumUsers_u32 = 0; + /** Number of groups */ + this.NumGroups_u32 = 0; + /** Number of MAC table entries */ + this.NumMacTables_u32 = 0; + /** Number of IP table entries */ + this.NumIpTables_u32 = 0; + /** Number of broadcast packets (Recv) */ + this["Recv.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Recv) */ + this["Recv.BroadcastCount_u64"] = 0; + /** Unicast count (Recv) */ + this["Recv.UnicastBytes_u64"] = 0; + /** Unicast bytes (Recv) */ + this["Recv.UnicastCount_u64"] = 0; + /** Number of broadcast packets (Send) */ + this["Send.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Send) */ + this["Send.BroadcastCount_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastBytes_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastCount_u64"] = 0; + /** Whether SecureNAT is enabled */ + this.SecureNATEnabled_bool = false; + /** Last communication date and time */ + this.LastCommTime_dt = new Date(); + /** Last login date and time */ + this.LastLoginTime_dt = new Date(); + /** Creation date and time */ + this.CreatedTime_dt = new Date(); + /** Number of logins */ + this.NumLogin_u32 = 0; + Object.assign(this, init); + } + return VpnRpcHubStatus; +}()); +exports.VpnRpcHubStatus = VpnRpcHubStatus; +/** List of services provided by IPsec server */ +var VpnIPsecServices = /** @class */ (function () { + /** Constructor for the 'VpnIPsecServices' class: List of services provided by IPsec server */ + function VpnIPsecServices(init) { + /** Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. */ + this.L2TP_Raw_bool = false; + /** Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. */ + this.L2TP_IPsec_bool = false; + /** Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. */ + this.EtherIP_IPsec_bool = false; + /** Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. */ + this.IPsec_Secret_str = ""; + /** Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. */ + this.L2TP_DefaultHub_str = ""; + Object.assign(this, init); + } + return VpnIPsecServices; +}()); +exports.VpnIPsecServices = VpnIPsecServices; +/** Keep alive protocol */ +var VpnRpcKeepAliveProtocol; +(function (VpnRpcKeepAliveProtocol) { + /** TCP */ + VpnRpcKeepAliveProtocol[VpnRpcKeepAliveProtocol["TCP"] = 0] = "TCP"; + /** UDP */ + VpnRpcKeepAliveProtocol[VpnRpcKeepAliveProtocol["UDP"] = 1] = "UDP"; +})(VpnRpcKeepAliveProtocol = exports.VpnRpcKeepAliveProtocol || (exports.VpnRpcKeepAliveProtocol = {})); +/** Keep Alive settings */ +var VpnRpcKeep = /** @class */ (function () { + /** Constructor for the 'VpnRpcKeep' class: Keep Alive settings */ + function VpnRpcKeep(init) { + /** The flag to enable keep-alive to the Internet */ + this.UseKeepConnect_bool = false; + /** Specify the host name or IP address of the destination */ + this.KeepConnectHost_str = ""; + /** Specify the port number of the destination */ + this.KeepConnectPort_u32 = 0; + /** Protocol type */ + this.KeepConnectProtocol_u32 = 0; + /** Interval Between Packets Sends (Seconds) */ + this.KeepConnectInterval_u32 = 0; + Object.assign(this, init); + } + return VpnRpcKeep; +}()); +exports.VpnRpcKeep = VpnRpcKeep; +/** State of the client session */ +var VpnRpcClientSessionStatus; +(function (VpnRpcClientSessionStatus) { + /** Connecting */ + VpnRpcClientSessionStatus[VpnRpcClientSessionStatus["Connecting"] = 0] = "Connecting"; + /** Negotiating */ + VpnRpcClientSessionStatus[VpnRpcClientSessionStatus["Negotiation"] = 1] = "Negotiation"; + /** During user authentication */ + VpnRpcClientSessionStatus[VpnRpcClientSessionStatus["Auth"] = 2] = "Auth"; + /** Connection complete */ + VpnRpcClientSessionStatus[VpnRpcClientSessionStatus["Established"] = 3] = "Established"; + /** Wait to retry */ + VpnRpcClientSessionStatus[VpnRpcClientSessionStatus["Retry"] = 4] = "Retry"; + /** Idle state */ + VpnRpcClientSessionStatus[VpnRpcClientSessionStatus["Idle"] = 5] = "Idle"; +})(VpnRpcClientSessionStatus = exports.VpnRpcClientSessionStatus || (exports.VpnRpcClientSessionStatus = {})); +/** Get the link state */ +var VpnRpcLinkStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcLinkStatus' class: Get the link state */ + function VpnRpcLinkStatus(init) { + /** The Virtual Hub name */ + this.HubName_Ex_str = ""; + /** The name of the cascade connection */ + this.AccountName_utf = ""; + /** The flag whether the cascade connection is enabled */ + this.Active_bool = false; + /** The flag whether the cascade connection is established */ + this.Connected_bool = false; + /** The session status */ + this.SessionStatus_u32 = 0; + /** The destination VPN server name */ + this.ServerName_str = ""; + /** The port number of the server */ + this.ServerPort_u32 = 0; + /** Server product name */ + this.ServerProductName_str = ""; + /** Server product version */ + this.ServerProductVer_u32 = 0; + /** Server product build number */ + this.ServerProductBuild_u32 = 0; + /** Server's X.509 certificate */ + this.ServerX_bin = new Uint8Array([]); + /** Client certificate */ + this.ClientX_bin = new Uint8Array([]); + /** Connection start time */ + this.StartTime_dt = new Date(); + /** Connection completion time of the first connection */ + this.FirstConnectionEstablisiedTime_dt = new Date(); + /** Connection completion time of this connection */ + this.CurrentConnectionEstablishTime_dt = new Date(); + /** Number of connections have been established so far */ + this.NumConnectionsEatablished_u32 = 0; + /** Half-connection */ + this.HalfConnection_bool = false; + /** VoIP / QoS */ + this.QoS_bool = false; + /** Maximum number of the underlying TCP connections */ + this.MaxTcpConnections_u32 = 0; + /** Number of current underlying TCP connections */ + this.NumTcpConnections_u32 = 0; + /** Number of underlying inbound TCP connections */ + this.NumTcpConnectionsUpload_u32 = 0; + /** Number of underlying outbound TCP connections */ + this.NumTcpConnectionsDownload_u32 = 0; + /** Use of encryption */ + this.UseEncrypt_bool = false; + /** Cipher algorithm name */ + this.CipherName_str = ""; + /** Use of compression */ + this.UseCompress_bool = false; + /** The flag whether this is a R-UDP session */ + this.IsRUDPSession_bool = false; + /** Underlying physical communication protocol */ + this.UnderlayProtocol_str = ""; + /** The UDP acceleration is enabled */ + this.IsUdpAccelerationEnabled_bool = false; + /** The UDP acceleration is being actually used */ + this.IsUsingUdpAcceleration_bool = false; + /** Session name */ + this.SessionName_str = ""; + /** Connection name */ + this.ConnectionName_str = ""; + /** Session key */ + this.SessionKey_bin = new Uint8Array([]); + /** Total transmitted data size */ + this.TotalSendSize_u64 = 0; + /** Total received data size */ + this.TotalRecvSize_u64 = 0; + /** Total transmitted data size (no compression) */ + this.TotalSendSizeReal_u64 = 0; + /** Total received data size (no compression) */ + this.TotalRecvSizeReal_u64 = 0; + /** The flag whether the VPN session is Bridge Mode */ + this.IsBridgeMode_bool = false; + /** The flag whether the VPN session is Monitor mode */ + this.IsMonitorMode_bool = false; + /** VLAN ID */ + this.VLanId_u32 = 0; + Object.assign(this, init); + } + return VpnRpcLinkStatus; +}()); +exports.VpnRpcLinkStatus = VpnRpcLinkStatus; +/** Setting of SSTP and OpenVPN */ +var VpnOpenVpnSstpConfig = /** @class */ (function () { + /** Constructor for the 'VpnOpenVpnSstpConfig' class: Setting of SSTP and OpenVPN */ + function VpnOpenVpnSstpConfig(init) { + /** Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. */ + this.EnableOpenVPN_bool = false; + /** Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. */ + this.OpenVPNPortList_str = ""; + /** pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. */ + this.EnableSSTP_bool = false; + Object.assign(this, init); + } + return VpnOpenVpnSstpConfig; +}()); +exports.VpnOpenVpnSstpConfig = VpnOpenVpnSstpConfig; +/** Virtual host option */ +var VpnVhOption = /** @class */ (function () { + /** Constructor for the 'VpnVhOption' class: Virtual host option */ + function VpnVhOption(init) { + /** Target Virtual HUB name */ + this.RpcHubName_str = ""; + /** MAC address */ + this.MacAddress_bin = new Uint8Array([]); + /** IP address */ + this.Ip_ip = ""; + /** Subnet mask */ + this.Mask_ip = ""; + /** Use flag of the Virtual NAT function */ + this.UseNat_bool = false; + /** MTU value (Standard: 1500) */ + this.Mtu_u32 = 0; + /** NAT TCP timeout in seconds */ + this.NatTcpTimeout_u32 = 0; + /** NAT UDP timeout in seconds */ + this.NatUdpTimeout_u32 = 0; + /** Using flag of DHCP function */ + this.UseDhcp_bool = false; + /** Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) */ + this.DhcpLeaseIPStart_ip = ""; + /** Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) */ + this.DhcpLeaseIPEnd_ip = ""; + /** Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) */ + this.DhcpSubnetMask_ip = ""; + /** Specify the expiration date in second units for leasing an IP address to a client. */ + this.DhcpExpireTimeSpan_u32 = 0; + /** Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. */ + this.DhcpGatewayAddress_ip = ""; + /** Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + this.DhcpDnsServerAddress_ip = ""; + /** Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + this.DhcpDnsServerAddress2_ip = ""; + /** Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. */ + this.DhcpDomainName_str = ""; + /** Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. */ + this.SaveLog_bool = false; + /** The flag to enable the DhcpPushRoutes_str field. */ + this.ApplyDhcpPushRoutes_bool = false; + /** Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. */ + this.DhcpPushRoutes_str = ""; + Object.assign(this, init); + } + return VpnVhOption; +}()); +exports.VpnVhOption = VpnVhOption; +/** RPC_NAT_STATUS */ +var VpnRpcNatStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcNatStatus' class: RPC_NAT_STATUS */ + function VpnRpcNatStatus(init) { + /** Virtual Hub Name */ + this.HubName_str = ""; + /** Number of TCP sessions */ + this.NumTcpSessions_u32 = 0; + /** Ntmber of UDP sessions */ + this.NumUdpSessions_u32 = 0; + /** Nymber of ICMP sessions */ + this.NumIcmpSessions_u32 = 0; + /** Number of DNS sessions */ + this.NumDnsSessions_u32 = 0; + /** Number of DHCP clients */ + this.NumDhcpClients_u32 = 0; + /** Whether the NAT is operating in the Kernel Mode */ + this.IsKernelMode_bool = false; + /** Whether the NAT is operating in the Raw IP Mode */ + this.IsRawIpMode_bool = false; + Object.assign(this, init); + } + return VpnRpcNatStatus; +}()); +exports.VpnRpcNatStatus = VpnRpcNatStatus; +/** Key pair */ +var VpnRpcKeyPair = /** @class */ (function () { + /** Constructor for the 'VpnRpcKeyPair' class: Key pair */ + function VpnRpcKeyPair(init) { + /** The body of the certificate */ + this.Cert_bin = new Uint8Array([]); + /** The body of the private key */ + this.Key_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcKeyPair; +}()); +exports.VpnRpcKeyPair = VpnRpcKeyPair; +/** Single string value */ +var VpnRpcStr = /** @class */ (function () { + /** Constructor for the 'VpnRpcStr' class: Single string value */ + function VpnRpcStr(init) { + /** A string value */ + this.String_str = ""; + Object.assign(this, init); + } + return VpnRpcStr; +}()); +exports.VpnRpcStr = VpnRpcStr; +/** Type of VPN Server */ +var VpnRpcServerType; +(function (VpnRpcServerType) { + /** Stand-alone server */ + VpnRpcServerType[VpnRpcServerType["Standalone"] = 0] = "Standalone"; + /** Farm controller server */ + VpnRpcServerType[VpnRpcServerType["FarmController"] = 1] = "FarmController"; + /** Farm member server */ + VpnRpcServerType[VpnRpcServerType["FarmMember"] = 2] = "FarmMember"; +})(VpnRpcServerType = exports.VpnRpcServerType || (exports.VpnRpcServerType = {})); +/** Operating system type */ +var VpnRpcOsType; +(function (VpnRpcOsType) { + /** Windows 95 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_95"] = 1100] = "WINDOWS_95"; + /** Windows 98 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_98"] = 1200] = "WINDOWS_98"; + /** Windows Me */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_ME"] = 1300] = "WINDOWS_ME"; + /** Windows (unknown) */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_UNKNOWN"] = 1400] = "WINDOWS_UNKNOWN"; + /** Windows NT 4.0 Workstation */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_NT_4_WORKSTATION"] = 2100] = "WINDOWS_NT_4_WORKSTATION"; + /** Windows NT 4.0 Server */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_NT_4_SERVER"] = 2110] = "WINDOWS_NT_4_SERVER"; + /** Windows NT 4.0 Server, Enterprise Edition */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_NT_4_SERVER_ENTERPRISE"] = 2111] = "WINDOWS_NT_4_SERVER_ENTERPRISE"; + /** Windows NT 4.0 Terminal Server */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_NT_4_TERMINAL_SERVER"] = 2112] = "WINDOWS_NT_4_TERMINAL_SERVER"; + /** BackOffice Server 4.5 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_NT_4_BACKOFFICE"] = 2113] = "WINDOWS_NT_4_BACKOFFICE"; + /** Small Business Server 4.5 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_NT_4_SMS"] = 2114] = "WINDOWS_NT_4_SMS"; + /** Windows 2000 Professional */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2000_PROFESSIONAL"] = 2200] = "WINDOWS_2000_PROFESSIONAL"; + /** Windows 2000 Server */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2000_SERVER"] = 2211] = "WINDOWS_2000_SERVER"; + /** Windows 2000 Advanced Server */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2000_ADVANCED_SERVER"] = 2212] = "WINDOWS_2000_ADVANCED_SERVER"; + /** Windows 2000 Datacenter Server */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2000_DATACENTER_SERVER"] = 2213] = "WINDOWS_2000_DATACENTER_SERVER"; + /** BackOffice Server 2000 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2000_BACKOFFICE"] = 2214] = "WINDOWS_2000_BACKOFFICE"; + /** Small Business Server 2000 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2000_SBS"] = 2215] = "WINDOWS_2000_SBS"; + /** Windows XP Home Edition */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_XP_HOME"] = 2300] = "WINDOWS_XP_HOME"; + /** Windows XP Professional */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_XP_PROFESSIONAL"] = 2301] = "WINDOWS_XP_PROFESSIONAL"; + /** Windows Server 2003 Web Edition */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2003_WEB"] = 2410] = "WINDOWS_2003_WEB"; + /** Windows Server 2003 Standard Edition */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2003_STANDARD"] = 2411] = "WINDOWS_2003_STANDARD"; + /** Windows Server 2003 Enterprise Edition */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2003_ENTERPRISE"] = 2412] = "WINDOWS_2003_ENTERPRISE"; + /** Windows Server 2003 DataCenter Edition */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2003_DATACENTER"] = 2413] = "WINDOWS_2003_DATACENTER"; + /** BackOffice Server 2003 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2003_BACKOFFICE"] = 2414] = "WINDOWS_2003_BACKOFFICE"; + /** Small Business Server 2003 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_2003_SBS"] = 2415] = "WINDOWS_2003_SBS"; + /** Windows Vista */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_LONGHORN_PROFESSIONAL"] = 2500] = "WINDOWS_LONGHORN_PROFESSIONAL"; + /** Windows Server 2008 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_LONGHORN_SERVER"] = 2510] = "WINDOWS_LONGHORN_SERVER"; + /** Windows 7 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_7"] = 2600] = "WINDOWS_7"; + /** Windows Server 2008 R2 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_SERVER_2008_R2"] = 2610] = "WINDOWS_SERVER_2008_R2"; + /** Windows 8 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_8"] = 2700] = "WINDOWS_8"; + /** Windows Server 2012 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_SERVER_8"] = 2710] = "WINDOWS_SERVER_8"; + /** Windows 8.1 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_81"] = 2701] = "WINDOWS_81"; + /** Windows Server 2012 R2 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_SERVER_81"] = 2711] = "WINDOWS_SERVER_81"; + /** Windows 10 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_10"] = 2702] = "WINDOWS_10"; + /** Windows Server 10 */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_SERVER_10"] = 2712] = "WINDOWS_SERVER_10"; + /** Windows 11 or later */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_11"] = 2800] = "WINDOWS_11"; + /** Windows Server 11 or later */ + VpnRpcOsType[VpnRpcOsType["WINDOWS_SERVER_11"] = 2810] = "WINDOWS_SERVER_11"; + /** Unknown UNIX */ + VpnRpcOsType[VpnRpcOsType["UNIX_UNKNOWN"] = 3000] = "UNIX_UNKNOWN"; + /** Linux */ + VpnRpcOsType[VpnRpcOsType["LINUX"] = 3100] = "LINUX"; + /** Solaris */ + VpnRpcOsType[VpnRpcOsType["SOLARIS"] = 3200] = "SOLARIS"; + /** Cygwin */ + VpnRpcOsType[VpnRpcOsType["CYGWIN"] = 3300] = "CYGWIN"; + /** BSD */ + VpnRpcOsType[VpnRpcOsType["BSD"] = 3400] = "BSD"; + /** MacOS X */ + VpnRpcOsType[VpnRpcOsType["MACOS_X"] = 3500] = "MACOS_X"; +})(VpnRpcOsType = exports.VpnRpcOsType || (exports.VpnRpcOsType = {})); +/** VPN Server Information */ +var VpnRpcServerInfo = /** @class */ (function () { + /** Constructor for the 'VpnRpcServerInfo' class: VPN Server Information */ + function VpnRpcServerInfo(init) { + /** Server product name */ + this.ServerProductName_str = ""; + /** Server version string */ + this.ServerVersionString_str = ""; + /** Server build information string */ + this.ServerBuildInfoString_str = ""; + /** Server version integer value */ + this.ServerVerInt_u32 = 0; + /** Server build number integer value */ + this.ServerBuildInt_u32 = 0; + /** Server host name */ + this.ServerHostName_str = ""; + /** Type of server */ + this.ServerType_u32 = 0; + /** Build date and time of the server */ + this.ServerBuildDate_dt = new Date(); + /** Family name */ + this.ServerFamilyName_str = ""; + /** OS type */ + this.OsType_u32 = 0; + /** Service pack number */ + this.OsServicePack_u32 = 0; + /** OS system name */ + this.OsSystemName_str = ""; + /** OS product name */ + this.OsProductName_str = ""; + /** OS vendor name */ + this.OsVendorName_str = ""; + /** OS version */ + this.OsVersion_str = ""; + /** Kernel name */ + this.KernelName_str = ""; + /** Kernel version */ + this.KernelVersion_str = ""; + Object.assign(this, init); + } + return VpnRpcServerInfo; +}()); +exports.VpnRpcServerInfo = VpnRpcServerInfo; +/** Server status */ +var VpnRpcServerStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcServerStatus' class: Server status */ + function VpnRpcServerStatus(init) { + /** Type of server */ + this.ServerType_u32 = 0; + /** Total number of TCP connections */ + this.NumTcpConnections_u32 = 0; + /** Number of Local TCP connections */ + this.NumTcpConnectionsLocal_u32 = 0; + /** Number of remote TCP connections */ + this.NumTcpConnectionsRemote_u32 = 0; + /** Total number of HUBs */ + this.NumHubTotal_u32 = 0; + /** Nymber of stand-alone HUB */ + this.NumHubStandalone_u32 = 0; + /** Number of static HUBs */ + this.NumHubStatic_u32 = 0; + /** Number of Dynamic HUBs */ + this.NumHubDynamic_u32 = 0; + /** Total number of sessions */ + this.NumSessionsTotal_u32 = 0; + /** Number of local VPN sessions */ + this.NumSessionsLocal_u32 = 0; + /** The number of remote sessions */ + this.NumSessionsRemote_u32 = 0; + /** Number of MAC table entries (total sum of all Virtual Hubs) */ + this.NumMacTables_u32 = 0; + /** Number of IP table entries (total sum of all Virtual Hubs) */ + this.NumIpTables_u32 = 0; + /** Number of users (total sum of all Virtual Hubs) */ + this.NumUsers_u32 = 0; + /** Number of groups (total sum of all Virtual Hubs) */ + this.NumGroups_u32 = 0; + /** Number of assigned bridge licenses (Useful to make a commercial version) */ + this.AssignedBridgeLicenses_u32 = 0; + /** Number of assigned client licenses (Useful to make a commercial version) */ + this.AssignedClientLicenses_u32 = 0; + /** Number of Assigned bridge license (cluster-wide), useful to make a commercial version */ + this.AssignedBridgeLicensesTotal_u32 = 0; + /** Number of assigned client licenses (cluster-wide), useful to make a commercial version */ + this.AssignedClientLicensesTotal_u32 = 0; + /** Number of broadcast packets (Recv) */ + this["Recv.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Recv) */ + this["Recv.BroadcastCount_u64"] = 0; + /** Unicast count (Recv) */ + this["Recv.UnicastBytes_u64"] = 0; + /** Unicast bytes (Recv) */ + this["Recv.UnicastCount_u64"] = 0; + /** Number of broadcast packets (Send) */ + this["Send.BroadcastBytes_u64"] = 0; + /** Broadcast bytes (Send) */ + this["Send.BroadcastCount_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastBytes_u64"] = 0; + /** Unicast bytes (Send) */ + this["Send.UnicastCount_u64"] = 0; + /** Current time */ + this.CurrentTime_dt = new Date(); + /** 64 bit High-Precision Logical System Clock */ + this.CurrentTick_u64 = 0; + /** VPN Server Start-up time */ + this.StartTime_dt = new Date(); + /** Memory information: Total Memory */ + this.TotalMemory_u64 = 0; + /** Memory information: Used Memory */ + this.UsedMemory_u64 = 0; + /** Memory information: Free Memory */ + this.FreeMemory_u64 = 0; + /** Memory information: Total Phys */ + this.TotalPhys_u64 = 0; + /** Memory information: Used Phys */ + this.UsedPhys_u64 = 0; + /** Memory information: Free Phys */ + this.FreePhys_u64 = 0; + Object.assign(this, init); + } + return VpnRpcServerStatus; +}()); +exports.VpnRpcServerStatus = VpnRpcServerStatus; +/** VPN Session status */ +var VpnRpcSessionStatus = /** @class */ (function () { + /** Constructor for the 'VpnRpcSessionStatus' class: VPN Session status */ + function VpnRpcSessionStatus(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** VPN session name */ + this.Name_str = ""; + /** User name */ + this.Username_str = ""; + /** Real user name which was used for the authentication */ + this.RealUsername_str = ""; + /** Group name */ + this.GroupName_str = ""; + /** Is Cascade Session */ + this.LinkMode_bool = false; + /** Client IP address */ + this.Client_Ip_Address_ip = ""; + /** Client host name */ + this.SessionStatus_ClientHostName_str = ""; + /** Operation flag */ + this.Active_bool = false; + /** Connected flag */ + this.Connected_bool = false; + /** State of the client session */ + this.SessionStatus_u32 = 0; + /** Server name */ + this.ServerName_str = ""; + /** Port number of the server */ + this.ServerPort_u32 = 0; + /** Server product name */ + this.ServerProductName_str = ""; + /** Server product version */ + this.ServerProductVer_u32 = 0; + /** Server product build number */ + this.ServerProductBuild_u32 = 0; + /** Connection start time */ + this.StartTime_dt = new Date(); + /** Connection completion time of the first connection */ + this.FirstConnectionEstablisiedTime_dt = new Date(); + /** Connection completion time of this connection */ + this.CurrentConnectionEstablishTime_dt = new Date(); + /** Number of connections have been established so far */ + this.NumConnectionsEatablished_u32 = 0; + /** Half-connection */ + this.HalfConnection_bool = false; + /** VoIP / QoS */ + this.QoS_bool = false; + /** Maximum number of the underlying TCP connections */ + this.MaxTcpConnections_u32 = 0; + /** Number of current underlying TCP connections */ + this.NumTcpConnections_u32 = 0; + /** Number of inbound underlying connections */ + this.NumTcpConnectionsUpload_u32 = 0; + /** Number of outbound underlying connections */ + this.NumTcpConnectionsDownload_u32 = 0; + /** Use of encryption */ + this.UseEncrypt_bool = false; + /** Cipher algorithm name */ + this.CipherName_str = ""; + /** Use of compression */ + this.UseCompress_bool = false; + /** Is R-UDP session */ + this.IsRUDPSession_bool = false; + /** Physical underlying communication protocol */ + this.UnderlayProtocol_str = ""; + /** The UDP acceleration is enabled */ + this.IsUdpAccelerationEnabled_bool = false; + /** Using the UDP acceleration function */ + this.IsUsingUdpAcceleration_bool = false; + /** VPN session name */ + this.SessionName_str = ""; + /** Connection name */ + this.ConnectionName_str = ""; + /** Session key */ + this.SessionKey_bin = new Uint8Array([]); + /** Total transmitted data size */ + this.TotalSendSize_u64 = 0; + /** Total received data size */ + this.TotalRecvSize_u64 = 0; + /** Total transmitted data size (no compression) */ + this.TotalSendSizeReal_u64 = 0; + /** Total received data size (no compression) */ + this.TotalRecvSizeReal_u64 = 0; + /** Is Bridge Mode */ + this.IsBridgeMode_bool = false; + /** Is Monitor mode */ + this.IsMonitorMode_bool = false; + /** VLAN ID */ + this.VLanId_u32 = 0; + /** Client product name */ + this.ClientProductName_str = ""; + /** Client version */ + this.ClientProductVer_u32 = 0; + /** Client build number */ + this.ClientProductBuild_u32 = 0; + /** Client OS name */ + this.ClientOsName_str = ""; + /** Client OS version */ + this.ClientOsVer_str = ""; + /** Client OS Product ID */ + this.ClientOsProductId_str = ""; + /** Client host name */ + this.ClientHostname_str = ""; + /** Unique ID */ + this.UniqueId_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcSessionStatus; +}()); +exports.VpnRpcSessionStatus = VpnRpcSessionStatus; +/** Set the special listener */ +var VpnRpcSpecialListener = /** @class */ (function () { + /** Constructor for the 'VpnRpcSpecialListener' class: Set the special listener */ + function VpnRpcSpecialListener(init) { + /** The flag to activate the VPN over ICMP server function */ + this.VpnOverIcmpListener_bool = false; + /** The flag to activate the VPN over DNS function */ + this.VpnOverDnsListener_bool = false; + Object.assign(this, init); + } + return VpnRpcSpecialListener; +}()); +exports.VpnRpcSpecialListener = VpnRpcSpecialListener; +/** Syslog configuration */ +var VpnSyslogSaveType; +(function (VpnSyslogSaveType) { + /** Do not use syslog */ + VpnSyslogSaveType[VpnSyslogSaveType["None"] = 0] = "None"; + /** Only server log */ + VpnSyslogSaveType[VpnSyslogSaveType["ServerLog"] = 1] = "ServerLog"; + /** Server and Virtual HUB security log */ + VpnSyslogSaveType[VpnSyslogSaveType["ServerAndHubSecurityLog"] = 2] = "ServerAndHubSecurityLog"; + /** Server, Virtual HUB security, and packet log */ + VpnSyslogSaveType[VpnSyslogSaveType["ServerAndHubAllLog"] = 3] = "ServerAndHubAllLog"; +})(VpnSyslogSaveType = exports.VpnSyslogSaveType || (exports.VpnSyslogSaveType = {})); +/** Syslog configuration */ +var VpnSyslogSetting = /** @class */ (function () { + /** Constructor for the 'VpnSyslogSetting' class: Syslog configuration */ + function VpnSyslogSetting(init) { + /** The behavior of the syslog function */ + this.SaveType_u32 = 0; + /** Specify the host name or IP address of the syslog server */ + this.Hostname_str = ""; + /** Specify the port number of the syslog server */ + this.Port_u32 = 0; + Object.assign(this, init); + } + return VpnSyslogSetting; +}()); +exports.VpnSyslogSetting = VpnSyslogSetting; +/** VPN Gate Server Config */ +var VpnVgsConfig = /** @class */ (function () { + /** Constructor for the 'VpnVgsConfig' class: VPN Gate Server Config */ + function VpnVgsConfig(init) { + /** Active flag */ + this.IsEnabled_bool = false; + /** Message */ + this.Message_utf = ""; + /** Owner name */ + this.Owner_utf = ""; + /** Abuse email */ + this.Abuse_utf = ""; + /** Log save flag */ + this.NoLog_bool = false; + /** Save log permanently */ + this.LogPermanent_bool = false; + /** Enable the L2TP VPN function */ + this.EnableL2TP_bool = false; + Object.assign(this, init); + } + return VpnVgsConfig; +}()); +exports.VpnVgsConfig = VpnVgsConfig; +/** Read a Log file */ +var VpnRpcReadLogFile = /** @class */ (function () { + /** Constructor for the 'VpnRpcReadLogFile' class: Read a Log file */ + function VpnRpcReadLogFile(init) { + /** Server name */ + this.ServerName_str = ""; + /** File Path */ + this.FilePath_str = ""; + /** Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. */ + this.Offset_u32 = 0; + /** Received buffer */ + this.Buffer_bin = new Uint8Array([]); + Object.assign(this, init); + } + return VpnRpcReadLogFile; +}()); +exports.VpnRpcReadLogFile = VpnRpcReadLogFile; +/** Rename link */ +var VpnRpcRenameLink = /** @class */ (function () { + /** Constructor for the 'VpnRpcRenameLink' class: Rename link */ + function VpnRpcRenameLink(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** The old name of the cascade connection */ + this.OldAccountName_utf = ""; + /** The new name of the cascade connection */ + this.NewAccountName_utf = ""; + Object.assign(this, init); + } + return VpnRpcRenameLink; +}()); +exports.VpnRpcRenameLink = VpnRpcRenameLink; +/** Online or offline the HUB */ +var VpnRpcSetHubOnline = /** @class */ (function () { + /** Constructor for the 'VpnRpcSetHubOnline' class: Online or offline the HUB */ + function VpnRpcSetHubOnline(init) { + /** The Virtual Hub name */ + this.HubName_str = ""; + /** Online / offline flag */ + this.Online_bool = false; + Object.assign(this, init); + } + return VpnRpcSetHubOnline; +}()); +exports.VpnRpcSetHubOnline = VpnRpcSetHubOnline; +/** Set Password */ +var VpnRpcSetPassword = /** @class */ (function () { + /** Constructor for the 'VpnRpcSetPassword' class: Set Password */ + function VpnRpcSetPassword(init) { + /** The plaintext password */ + this.PlainTextPassword_str = ""; + Object.assign(this, init); + } + return VpnRpcSetPassword; +}()); +exports.VpnRpcSetPassword = VpnRpcSetPassword; +// --- Utility codes --- +/** JSON-RPC request class. See https://www.jsonrpc.org/specification */ +var JsonRpcRequest = /** @class */ (function () { + function JsonRpcRequest(method, param, id) { + if (method === void 0) { method = ""; } + if (param === void 0) { param = null; } + if (id === void 0) { id = ""; } + this.jsonrpc = "2.0"; + this.method = method; + this.params = param; + this.id = id; + } + return JsonRpcRequest; +}()); +exports.JsonRpcRequest = JsonRpcRequest; +/** JSON-RPC error class. See https://www.jsonrpc.org/specification */ +var JsonRpcError = /** @class */ (function () { + function JsonRpcError(code, message, data) { + if (code === void 0) { code = 0; } + if (message === void 0) { message = ""; } + if (data === void 0) { data = null; } + this.code = code; + this.message = message; + this.data = data; + } + return JsonRpcError; +}()); +exports.JsonRpcError = JsonRpcError; +/** JSON-RPC response class with generics */ +var JsonRpcResponse = /** @class */ (function () { + function JsonRpcResponse() { + this.jsonrpc = "2.0"; + this.result = null; + this.error = null; + this.id = ""; + } + return JsonRpcResponse; +}()); +exports.JsonRpcResponse = JsonRpcResponse; +/** JSON-RPC client class. See https://www.jsonrpc.org/specification */ +var JsonRpcClient = /** @class */ (function () { + /** + * JSON-RPC client class constructor + * @param url The URL + * @param headers Additional HTTP headers + * @param send_credential Set true to use the same credential with the browsing web site. Valid only if the code is running on the web browser. + */ + function JsonRpcClient(url, headers, send_credential, nodejs_https_client_reject_untrusted_server_cert) { + this.BaseUrl = url; + this.headers = headers; + this.client = new HttpClient(); + this.client.SendCredential = send_credential; + this.client.NodeJS_HTTPS_Client_Reject_Unauthorized = nodejs_https_client_reject_untrusted_server_cert; + } + /** A utility function to convert any object to JSON string */ + JsonRpcClient.ObjectToJson = function (obj) { + return JSON.stringify(obj, function (key, value) { + if (key.endsWith("_bin")) { + return Util_Base64_Encode(value); + } + return value; + }, 4); + }; + /** A utility function to convert JSON string to object */ + JsonRpcClient.JsonToObject = function (str) { + return JSON.parse(str, function (key, value) { + if (key.endsWith("_bin")) { + return Util_Base64_Decode(value); + } + else if (key.endsWith("_dt")) { + return new Date(value); + } + return value; + }); + }; + /** + * Call a single RPC call (without error check). You can wait for the response with Promise or await statement. + * @param method_name The name of RPC method + * @param param The parameters + */ + JsonRpcClient.prototype.CallInternalAsync = function (method_name, param) { + return __awaiter(this, void 0, void 0, function () { + var id, req, req_string, http_response, ret_string; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + id = "1"; + req = new JsonRpcRequest(method_name, param, id); + req_string = JsonRpcClient.ObjectToJson(req); + if (debug_mode) { + console.log("--- RPC Request Body ---"); + console.log(req_string); + console.log("------------------------"); + } + return [4 /*yield*/, this.client.PostAsync(this.BaseUrl, this.headers, req_string, "application/json")]; + case 1: + http_response = _a.sent(); + ret_string = http_response.Body; + if (debug_mode) { + console.log("--- RPC Response Body ---"); + console.log(ret_string); + console.log("-------------------------"); + } + return [2 /*return*/, ret_string]; + } + }); + }); + }; + /** + * Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + * @param method_name The name of RPC method + * @param param The parameters + */ + JsonRpcClient.prototype.CallAsync = function (method_name, param) { + return __awaiter(this, void 0, void 0, function () { + var ret_string, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.CallInternalAsync(method_name, param)]; + case 1: + ret_string = _a.sent(); + ret = JSON.parse(ret_string); + if (is_null(ret.error) === false) { + throw new JsonRpcException(ret.error); + } + return [2 /*return*/, ret.result]; + } + }); + }); + }; + return JsonRpcClient; +}()); +exports.JsonRpcClient = JsonRpcClient; +/** JSON-RPC exception class */ +var JsonRpcException = /** @class */ (function (_super) { + __extends(JsonRpcException, _super); + function JsonRpcException(error) { + var _this = _super.call(this, "Code=" + error.code + ", Message=" + error.message) || this; + _this.Error = error; + return _this; + } + return JsonRpcException; +}(Error)); +exports.JsonRpcException = JsonRpcException; +/** HTTP client exception class */ +var HttpClientException = /** @class */ (function (_super) { + __extends(HttpClientException, _super); + function HttpClientException(message) { + return _super.call(this, message) || this; + } + return HttpClientException; +}(Error)); +exports.HttpClientException = HttpClientException; +/** HTTP client response class */ +var HttpClientResponse = /** @class */ (function () { + function HttpClientResponse() { + this.Body = ""; + } + return HttpClientResponse; +}()); +exports.HttpClientResponse = HttpClientResponse; +/** An HTTP client which can be used in both web browsers and Node.js */ +var HttpClient = /** @class */ (function () { + function HttpClient() { + this.TimeoutMsecs = 60 * 5 * 1000; + this.SendCredential = true; + this.NodeJS_HTTPS_Client_Reject_Unauthorized = false; + } + /** Post method. In web browsers this function will process the request by itself. In Node.js this function will call PostAsync_NodeJS() instead. */ + HttpClient.prototype.PostAsync = function (url, headers, req_body, req_media_type) { + return __awaiter(this, void 0, void 0, function () { + var fetch_header_list, _i, _a, name_1, fetch_init, fetch_response, ret, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + if (is_node_js) { + return [2 /*return*/, this.PostAsync_NodeJS(url, headers, req_body, req_media_type)]; + } + fetch_header_list = new Headers(); + for (_i = 0, _a = Object.keys(headers); _i < _a.length; _i++) { + name_1 = _a[_i]; + fetch_header_list.append(name_1, headers[name_1]); + } + fetch_init = { + mode: "cors", + headers: fetch_header_list, + credentials: (this.SendCredential ? "include" : "omit"), + method: "POST", + cache: "no-cache", + keepalive: true, + redirect: "follow", + body: req_body + }; + return [4 /*yield*/, fetch(url, fetch_init)]; + case 1: + fetch_response = _c.sent(); + if (fetch_response.ok === false) { + throw new HttpClientException("HTTP Error: " + fetch_response.status + " " + fetch_response.statusText); + } + ret = new HttpClientResponse(); + _b = ret; + return [4 /*yield*/, fetch_response.text()]; + case 2: + _b.Body = _c.sent(); + return [2 /*return*/, ret]; + } + }); + }); + }; + /** Post method for Node.js. */ + HttpClient.prototype.PostAsync_NodeJS = function (url, headers, req_body, req_media_type) { + var https = require("https"); + var keepAliveAgent = new https.Agent({ keepAlive: true }); + var urlparse = require("url"); + var urlobj = urlparse.parse(url); + if (is_null(urlobj.host)) + throw new Error("URL is invalid."); + var options = { + host: urlobj.hostname, + port: urlobj.port, + path: urlobj.path, + rejectUnauthorized: this.NodeJS_HTTPS_Client_Reject_Unauthorized, + method: "POST", + timeout: this.TimeoutMsecs, + agent: keepAliveAgent + }; + return new Promise(function (resolve, reject) { + var req = https.request(options, function (res) { + if (res.statusCode !== 200) { + reject(new HttpClientException("HTTP Error: " + res.statusCode + " " + res.statusMessage)); + } + var recv_str = ""; + res.on("data", function (body) { + recv_str += body; + }); + res.on("end", function () { + var ret = new HttpClientResponse(); + ret.Body = recv_str; + resolve(ret); + }); + }).on("error", function (err) { + throw err; + }); + for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) { + var name_2 = _a[_i]; + req.setHeader(name_2, !is_null(headers[name_2]) ? headers[name_2] : ""); + } + req.setHeader("Content-Type", req_media_type); + req.setHeader("Content-Length", Buffer.byteLength(req_body)); + req.write(req_body); + req.end(); + }); + }; + return HttpClient; +}()); +exports.HttpClient = HttpClient; +//////// BEGIN: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js +// The MIT License(MIT) +// Copyright(c) 2014 +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +var lookup = []; +var revLookup = []; +var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; +} +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup["-".charCodeAt(0)] = 62; +revLookup["_".charCodeAt(0)] = 63; +function getLens(b64) { + var len = b64.length; + if (len % 4 > 0) { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf("="); + if (validLen === -1) + validLen = len; + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4); + return [validLen, placeHoldersLen]; +} +// base64 is 4/3 + up to two characters of the original data +function byteLength(b64) { + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} +function _byteLength(b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} +function Util_Base64_Decode(b64) { + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + var arr = new Uint8Array(_byteLength(b64, validLen, placeHoldersLen)); + var curByte = 0; + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen; + for (var i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)]; + arr[curByte++] = (tmp >> 16) & 0xFF; + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[curByte++] = tmp & 0xFF; + } + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + return arr; +} +exports.Util_Base64_Decode = Util_Base64_Decode; +function tripletToBase64(num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F]; +} +function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF); + output.push(tripletToBase64(tmp)); + } + return output.join(""); +} +function Util_Base64_Encode(uint8) { + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); + } + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + parts.push(lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + "=="); + } + else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + parts.push(lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + "="); + } + return parts.join(""); +} +exports.Util_Base64_Encode = Util_Base64_Encode; +//////// END: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js +//# sourceMappingURL=vpnrpc.js.map \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js.map b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js.map new file mode 100644 index 00000000..74237509 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vpnrpc.js","sourceRoot":"","sources":["../src/vpnrpc.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,GAAG;AACH,YAAY;AACZ,8EAA8E;AAC9E,EAAE;AACF,wCAAwC;AACxC,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGhD,wBAAwB;AACxB,IAAI,UAAU,GAAG,CAAC,OAAO,SAAS,KAAK,WAAW,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACpJ,SAAS,OAAO,CAAC,GAAQ;IAEvB,OAAO,CAAC,OAAO,GAAG,KAAK,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;AACxD,CAAC;AACD,IAAI,UAAU,GAAY,KAAK,CAAC;AAEhC,2BAA2B;AAC3B;IAiBI;;;;;;;OAOG;IACH,sBAAY,kBAA2B,EAAE,cAAuB,EAAE,OAAgB,EAAE,QAAiB,EAAE,gDAA0D;QAAjK,iBAyBC;QAED,gBAAgB;QAChB,qLAAqL;QAC9K,SAAI,GAAG,UAAC,QAAoB;YAE/B,OAAO,KAAI,CAAC,SAAS,CAAa,MAAM,EAAE,QAAQ,CAAC,CAAC;QACxD,CAAC,CAAA;QAED,iXAAiX;QAC1W,kBAAa,GAAG;YAEnB,OAAO,KAAI,CAAC,SAAS,CAAmB,eAAe,EAAE,IAAI,gBAAgB,EAAE,CAAC,CAAC;QACrF,CAAC,CAAA;QAED,6WAA6W;QACtW,oBAAe,GAAG;YAErB,OAAO,KAAI,CAAC,SAAS,CAAqB,iBAAiB,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAC;QAC3F,CAAC,CAAA;QAED,2cAA2c;QACpc,mBAAc,GAAG,UAAC,QAAwB;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAiB,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,4RAA4R;QACrR,iBAAY,GAAG;YAElB,OAAO,KAAI,CAAC,SAAS,CAAqB,cAAc,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAC;QACxF,CAAC,CAAA;QAED,8XAA8X;QACvX,mBAAc,GAAG,UAAC,QAAwB;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAiB,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,6RAA6R;QACtR,mBAAc,GAAG,UAAC,QAAwB;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAiB,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,gNAAgN;QACzM,sBAAiB,GAAG,UAAC,QAA2B;YAEnD,OAAO,KAAI,CAAC,SAAS,CAAoB,mBAAmB,EAAE,QAAQ,CAAC,CAAC;QAC5E,CAAC,CAAA;QAED,qiCAAqiC;QAC9hC,mBAAc,GAAG,UAAC,QAAoB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAa,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,mNAAmN;QAC5M,mBAAc,GAAG;YAEpB,OAAO,KAAI,CAAC,SAAS,CAAa,gBAAgB,EAAE,IAAI,UAAU,EAAE,CAAC,CAAC;QAC1E,CAAC,CAAA;QAED,qhBAAqhB;QAC9gB,gBAAW,GAAG,UAAC,QAAwB;YAE1C,OAAO,KAAI,CAAC,SAAS,CAAiB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACnE,CAAC,CAAA;QAED,wfAAwf;QACjf,mBAAc,GAAG;YAEpB,OAAO,KAAI,CAAC,SAAS,CAAiB,gBAAgB,EAAE,IAAI,cAAc,EAAE,CAAC,CAAC;QAClF,CAAC,CAAA;QAED,0fAA0f;QACnf,4BAAuB,GAAG;YAE7B,OAAO,KAAI,CAAC,SAAS,CAA6B,yBAAyB,EAAE,IAAI,0BAA0B,EAAE,CAAC,CAAC;QACnH,CAAC,CAAA;QAED,yVAAyV;QAClV,kBAAa,GAAG,UAAC,QAAuB;YAE3C,OAAO,KAAI,CAAC,SAAS,CAAgB,eAAe,EAAE,QAAQ,CAAC,CAAC;QACpE,CAAC,CAAA;QAED,oOAAoO;QAC7N,kBAAa,GAAG;YAEnB,OAAO,KAAI,CAAC,SAAS,CAAgB,eAAe,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;QAC/E,CAAC,CAAA;QAED,sUAAsU;QAC/T,oBAAe,GAAG;YAErB,OAAO,KAAI,CAAC,SAAS,CAAY,iBAAiB,EAAE,IAAI,SAAS,EAAE,CAAC,CAAC;QACzE,CAAC,CAAA;QAED,meAAme;QAC5d,oBAAe,GAAG,UAAC,QAAmB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAY,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,unBAAunB;QAChnB,cAAS,GAAG,UAAC,QAAyB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAkB,WAAW,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,sfAAsf;QAC/e,WAAM,GAAG,UAAC,QAAyB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAkB,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,mMAAmM;QAC5L,WAAM,GAAG,UAAC,QAAyB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAkB,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,g+BAAg+B;QACz9B,YAAO,GAAG;YAEb,OAAO,KAAI,CAAC,SAAS,CAAgB,SAAS,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;QACzE,CAAC,CAAA;QAED,gmBAAgmB;QACzlB,cAAS,GAAG,UAAC,QAAyB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAkB,WAAW,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,kWAAkW;QAC3V,iBAAY,GAAG,UAAC,QAAsB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAe,cAAc,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,ulBAAulB;QAChlB,iBAAY,GAAG,UAAC,QAAsB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAe,cAAc,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,ogBAAogB;QAC7f,mBAAc,GAAG;YAEpB,OAAO,KAAI,CAAC,SAAS,CAAuB,gBAAgB,EAAE,IAAI,oBAAoB,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAA;QAED,yOAAyO;QAClO,yBAAoB,GAAG,UAAC,QAAoC;YAE/D,OAAO,KAAI,CAAC,SAAS,CAA6B,sBAAsB,EAAE,QAAQ,CAAC,CAAC;QACxF,CAAC,CAAA;QAED,wgBAAwgB;QACjgB,sBAAiB,GAAG,UAAC,QAA8B;YAEtD,OAAO,KAAI,CAAC,SAAS,CAAuB,mBAAmB,EAAE,QAAQ,CAAC,CAAC;QAC/E,CAAC,CAAA;QAED,gdAAgd;QACzc,iBAAY,GAAG,UAAC,QAA4B;YAE/C,OAAO,KAAI,CAAC,SAAS,CAAqB,cAAc,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC,CAAA;QAED,0TAA0T;QACnT,iBAAY,GAAG,UAAC,QAAyB;YAE5C,OAAO,KAAI,CAAC,SAAS,CAAkB,cAAc,EAAE,QAAQ,CAAC,CAAC;QACrE,CAAC,CAAA;QAED,2wBAA2wB;QACpwB,cAAS,GAAG,UAAC,QAAsB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAe,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,+aAA+a;QACxa,cAAS,GAAG,UAAC,QAAsB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAe,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,klBAAklB;QAC3kB,UAAK,GAAG,UAAC,QAAwB;YAEpC,OAAO,KAAI,CAAC,SAAS,CAAiB,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7D,CAAC,CAAA;QAED,2dAA2d;QACpd,WAAM,GAAG,UAAC,QAAyB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAkB,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,gVAAgV;QACzU,UAAK,GAAG,UAAC,QAAwB;YAEpC,OAAO,KAAI,CAAC,SAAS,CAAiB,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7D,CAAC,CAAA;QAED,sXAAsX;QAC/W,aAAQ,GAAG,UAAC,QAA2B;YAE1C,OAAO,KAAI,CAAC,SAAS,CAAoB,UAAU,EAAE,QAAQ,CAAC,CAAC;QACnE,CAAC,CAAA;QAED,6rCAA6rC;QACtrC,eAAU,GAAG,UAAC,QAA0B;YAE3C,OAAO,KAAI,CAAC,SAAS,CAAmB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACpE,CAAC,CAAA;QAED,4YAA4Y;QACrY,YAAO,GAAG,UAAC,QAA0B;YAExC,OAAO,KAAI,CAAC,SAAS,CAAmB,SAAS,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,gJAAgJ;QACzI,YAAO,GAAG,UAAC,QAA0B;YAExC,OAAO,KAAI,CAAC,SAAS,CAAmB,SAAS,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,guBAAguB;QACztB,aAAQ,GAAG,UAAC,QAAwB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAiB,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,onBAAonB;QAC7mB,kBAAa,GAAG,UAAC,QAAoB;YAExC,OAAO,KAAI,CAAC,SAAS,CAAa,eAAe,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,mcAAmc;QAC5b,mBAAc,GAAG,UAAC,QAAoB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAa,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,8XAA8X;QACvX,eAAU,GAAG,UAAC,QAAoB;YAErC,OAAO,KAAI,CAAC,SAAS,CAAa,YAAY,EAAE,QAAQ,CAAC,CAAC;QAC9D,CAAC,CAAA;QAED,6QAA6Q;QACtQ,eAAU,GAAG,UAAC,QAA0B;YAE3C,OAAO,KAAI,CAAC,SAAS,CAAmB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACpE,CAAC,CAAA;QAED,sUAAsU;QAC/T,kBAAa,GAAG,UAAC,QAA0B;YAE9C,OAAO,KAAI,CAAC,SAAS,CAAmB,eAAe,EAAE,QAAQ,CAAC,CAAC;QACvE,CAAC,CAAA;QAED,mzBAAmzB;QAC5yB,cAAS,GAAG,UAAC,QAAyB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAkB,WAAW,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,2hBAA2hB;QACphB,iBAAY,GAAG,UAAC,QAA4B;YAE/C,OAAO,KAAI,CAAC,SAAS,CAAqB,cAAc,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC,CAAA;QAED,0wBAA0wB;QACnwB,eAAU,GAAG,UAAC,QAA8B;YAE/C,OAAO,KAAI,CAAC,SAAS,CAAuB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC,CAAA;QAED,oMAAoM;QAC7L,kBAAa,GAAG,UAAC,QAA8B;YAElD,OAAO,KAAI,CAAC,SAAS,CAAuB,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAA;QAED,w/BAAw/B;QACj/B,eAAU,GAAG,UAAC,QAAuB;YAExC,OAAO,KAAI,CAAC,SAAS,CAAgB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,siBAAsiB;QAC/hB,YAAO,GAAG,UAAC,QAAuB;YAErC,OAAO,KAAI,CAAC,SAAS,CAAgB,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9D,CAAC,CAAA;QAED,kmBAAkmB;QAC3lB,YAAO,GAAG,UAAC,QAAuB;YAErC,OAAO,KAAI,CAAC,SAAS,CAAgB,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9D,CAAC,CAAA;QAED,mlBAAmlB;QAC5kB,eAAU,GAAG,UAAC,QAA0B;YAE3C,OAAO,KAAI,CAAC,SAAS,CAAmB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACpE,CAAC,CAAA;QAED,qSAAqS;QAC9R,aAAQ,GAAG,UAAC,QAAwB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAiB,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,yWAAyW;QAClW,gBAAW,GAAG,UAAC,QAAwB;YAE1C,OAAO,KAAI,CAAC,SAAS,CAAiB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACnE,CAAC,CAAA;QAED,2WAA2W;QACpW,aAAQ,GAAG,UAAC,QAAwB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAiB,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,8XAA8X;QACvX,aAAQ,GAAG,UAAC,QAAwB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAiB,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,ocAAoc;QAC7b,gBAAW,GAAG,UAAC,QAA0B;YAE5C,OAAO,KAAI,CAAC,SAAS,CAAmB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACrE,CAAC,CAAA;QAED,uSAAuS;QAChS,cAAS,GAAG,UAAC,QAAyB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAkB,WAAW,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,yrBAAyrB;QAClrB,gBAAW,GAAG,UAAC,QAA2B;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAoB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,seAAse;QAC/d,qBAAgB,GAAG,UAAC,QAA6B;YAEpD,OAAO,KAAI,CAAC,SAAS,CAAsB,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAC7E,CAAC,CAAA;QAED,ibAAib;QAC1a,kBAAa,GAAG,UAAC,QAA6B;YAEjD,OAAO,KAAI,CAAC,SAAS,CAAsB,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC1E,CAAC,CAAA;QAED,mfAAmf;QAC5e,iBAAY,GAAG,UAAC,QAA4B;YAE/C,OAAO,KAAI,CAAC,SAAS,CAAqB,cAAc,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC,CAAA;QAED,iSAAiS;QAC1R,mBAAc,GAAG,UAAC,QAA2B;YAEhD,OAAO,KAAI,CAAC,SAAS,CAAoB,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACzE,CAAC,CAAA;QAED,shBAAshB;QAC/gB,gBAAW,GAAG,UAAC,QAA2B;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAoB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,4RAA4R;QACrR,kBAAa,GAAG,UAAC,QAA2B;YAE/C,OAAO,KAAI,CAAC,SAAS,CAAoB,eAAe,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC,CAAA;QAED,m7BAAm7B;QAC56B,YAAO,GAAG,UAAC,QAAoB;YAElC,OAAO,KAAI,CAAC,SAAS,CAAa,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC3D,CAAC,CAAA;QAED,mVAAmV;QAC5U,YAAO,GAAG,UAAC,QAAoB;YAElC,OAAO,KAAI,CAAC,SAAS,CAAa,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC3D,CAAC,CAAA;QAED,mwCAAmwC;QAC5vC,oBAAe,GAAG,UAAC,QAAmB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAY,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,gcAAgc;QACzb,qBAAgB,GAAG,UAAC,QAAmB;YAE1C,OAAO,KAAI,CAAC,SAAS,CAAY,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QACnE,CAAC,CAAA;QAED,0yCAA0yC;QACnyC,uBAAkB,GAAG,UAAC,QAAqB;YAE9C,OAAO,KAAI,CAAC,SAAS,CAAc,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QACvE,CAAC,CAAA;QAED,sJAAsJ;QAC/I,uBAAkB,GAAG,UAAC,QAAqB;YAE9C,OAAO,KAAI,CAAC,SAAS,CAAc,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QACvE,CAAC,CAAA;QAED,4VAA4V;QACrV,YAAO,GAAG,UAAC,QAAuB;YAErC,OAAO,KAAI,CAAC,SAAS,CAAgB,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9D,CAAC,CAAA;QAED,uWAAuW;QAChW,aAAQ,GAAG,UAAC,QAAwB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAiB,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,sVAAsV;QAC/U,uBAAkB,GAAG,UAAC,QAAyB;YAElD,OAAO,KAAI,CAAC,SAAS,CAAkB,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAA;QAED,4YAA4Y;QACrY,iBAAY,GAAG;YAElB,OAAO,KAAI,CAAC,SAAS,CAAgB,cAAc,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;QAC9E,CAAC,CAAA;QAED,6vBAA6vB;QACtvB,mBAAc,GAAG,UAAC,QAA2B;YAEhD,OAAO,KAAI,CAAC,SAAS,CAAoB,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACzE,CAAC,CAAA;QAED,kPAAkP;QAC3O,sBAAiB,GAAG,UAAC,QAA2B;YAEnD,OAAO,KAAI,CAAC,SAAS,CAAoB,mBAAmB,EAAE,QAAQ,CAAC,CAAC;QAC5E,CAAC,CAAA;QAED,qSAAqS;QAC9R,oBAAe,GAAG;YAErB,OAAO,KAAI,CAAC,SAAS,CAAwB,iBAAiB,EAAE,IAAI,qBAAqB,EAAE,CAAC,CAAC;QACjG,CAAC,CAAA;QAED,+EAA+E;QACxE,qBAAgB,GAAG;YAEtB,OAAO,KAAI,CAAC,SAAS,CAAsB,kBAAkB,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAA;QAED,suBAAsuB;QAC/tB,iBAAY,GAAG,UAAC,QAAoB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAa,cAAc,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,wWAAwW;QACjW,YAAO,GAAG;YAEb,OAAO,KAAI,CAAC,SAAS,CAAc,SAAS,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC;QACrE,CAAC,CAAA;QAED,wcAAwc;QACjc,cAAS,GAAG;YAEf,OAAO,KAAI,CAAC,SAAS,CAAe,WAAW,EAAE,IAAI,YAAY,EAAE,CAAC,CAAC;QACzE,CAAC,CAAA;QAED,shCAAshC;QAC/gC,cAAS,GAAG,UAAC,QAAsB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAe,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,4DAA4D;QACrD,8BAAyB,GAAG,UAAC,QAA2B;YAE3D,OAAO,KAAI,CAAC,SAAS,CAAoB,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACpF,CAAC,CAAA;QAED,07BAA07B;QACn7B,uBAAkB,GAAG,UAAC,QAA2B;YAEpD,OAAO,KAAI,CAAC,SAAS,CAAoB,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC7E,CAAC,CAAA;QAED,m8BAAm8B;QAC57B,uBAAkB,GAAG,UAAC,QAA2B;YAEpD,OAAO,KAAI,CAAC,SAAS,CAAoB,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC7E,CAAC,CAAA;QAED,isBAAisB;QAC1rB,qBAAgB,GAAG,UAAC,QAA2B;YAElD,OAAO,KAAI,CAAC,SAAS,CAAoB,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAA;QAED,itBAAitB;QAC1sB,qBAAgB,GAAG,UAAC,QAA2B;YAElD,OAAO,KAAI,CAAC,SAAS,CAAoB,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAA;QAED,64BAA64B;QACt4B,gBAAW,GAAG,UAAC,QAAoB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAa,aAAa,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,gbAAgb;QACza,gBAAW,GAAG,UAAC,QAAoB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAa,aAAa,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,g5BAAg5B;QACz4B,iBAAY,GAAG;YAElB,OAAO,KAAI,CAAC,SAAS,CAAiB,cAAc,EAAE,IAAI,cAAc,EAAE,CAAC,CAAC;QAChF,CAAC,CAAA;QAED,miCAAmiC;QAC5hC,kBAAa,GAAG,UAAC,QAAoB;YAExC,OAAO,KAAI,CAAC,SAAS,CAAa,eAAe,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,uUAAuU;QAChU,iBAAY,GAAG,UAAC,QAAoB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAa,cAAc,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,y8CAAy8C;QACl8C,YAAO,GAAG,UAAC,QAAoB;YAElC,OAAO,KAAI,CAAC,SAAS,CAAa,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC3D,CAAC,CAAA;QAED,4gBAA4gB;QACrgB,YAAO,GAAG,UAAC,QAAoB;YAElC,OAAO,KAAI,CAAC,SAAS,CAAa,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC3D,CAAC,CAAA;QAED,wuBAAwuB;QACjuB,aAAQ,GAAG,UAAC,QAAwB;YAEvC,OAAO,KAAI,CAAC,SAAS,CAAiB,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC,CAAA;QAED,k5BAAk5B;QAC34B,eAAU,GAAG,UAAC,QAAuB;YAExC,OAAO,KAAI,CAAC,SAAS,CAAgB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,mhBAAmhB;QAC5gB,eAAU,GAAG,UAAC,QAAuB;YAExC,OAAO,KAAI,CAAC,SAAS,CAAgB,YAAY,EAAE,QAAQ,CAAC,CAAC;QACjE,CAAC,CAAA;QAED,ugBAAugB;QAChgB,gBAAW,GAAG,UAAC,QAA2B;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAoB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,izBAAizB;QAC1yB,YAAO,GAAG,UAAC,QAAuB;YAErC,OAAO,KAAI,CAAC,SAAS,CAAgB,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9D,CAAC,CAAA;QAED,8rCAA8rC;QACvrC,WAAM,GAAG,UAAC,QAAmB;YAEhC,OAAO,KAAI,CAAC,SAAS,CAAY,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAA;QAED,uZAAuZ;QAChZ,WAAM,GAAG,UAAC,QAAmB;YAEhC,OAAO,KAAI,CAAC,SAAS,CAAY,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAA;QAED,kaAAka;QAC3Z,WAAM,GAAG,UAAC,QAAmB;YAEhC,OAAO,KAAI,CAAC,SAAS,CAAY,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAA;QAED,ouCAAouC;QAC7tC,WAAM,GAAG,UAAC,QAAmB;YAEhC,OAAO,KAAI,CAAC,SAAS,CAAY,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAA;QAED,4gCAA4gC;QACrgC,cAAS,GAAG,UAAC,QAAsB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAe,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,mqBAAmqB;QAC5pB,cAAS,GAAG,UAAC,QAAsB;YAEtC,OAAO,KAAI,CAAC,SAAS,CAAe,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC,CAAA;QAED,snBAAsnB;QAC/mB,gBAAW,GAAG;YAEjB,OAAO,KAAI,CAAC,SAAS,CAAoB,aAAa,EAAE,IAAI,iBAAiB,EAAE,CAAC,CAAC;QACrF,CAAC,CAAA;QAED,slBAAslB;QAC/kB,gBAAW,GAAG,UAAC,QAA2B;YAE7C,OAAO,KAAI,CAAC,SAAS,CAAoB,aAAa,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAA;QAED,kHAAkH;QAC3G,cAAS,GAAG,UAAC,QAA0B;YAE1C,OAAO,KAAI,CAAC,SAAS,CAAmB,WAAW,EAAE,QAAQ,CAAC,CAAC;QACnE,CAAC,CAAA;QAED,qOAAqO;QAC9N,cAAS,GAAG,UAAC,QAA0B;YAE1C,OAAO,KAAI,CAAC,SAAS,CAAmB,WAAW,EAAE,QAAQ,CAAC,CAAC;QACnE,CAAC,CAAA;QAED,qJAAqJ;QAC9I,cAAS,GAAG,UAAC,QAAmB;YAEnC,OAAO,KAAI,CAAC,SAAS,CAAY,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC5D,CAAC,CAAA;QAED,qJAAqJ;QAC9I,cAAS,GAAG,UAAC,QAAmB;YAEnC,OAAO,KAAI,CAAC,SAAS,CAAY,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC5D,CAAC,CAAA;QAED,u2BAAu2B;QACh2B,UAAK,GAAG,UAAC,QAAoB;YAEhC,OAAO,KAAI,CAAC,SAAS,CAAa,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAA;QAED,0CAA0C;QACnC,gBAAW,GAAG;YAEjB,OAAO,KAAI,CAAC,SAAS,CAAY,aAAa,EAAE,IAAI,SAAS,EAAE,CAAC,CAAC;QACrE,CAAC,CAAA;QAED,g/BAAg/B;QACz+B,UAAK,GAAG,UAAC,QAAoB;YAEhC,OAAO,KAAI,CAAC,SAAS,CAAa,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAA;QAED,iqBAAiqB;QAC1pB,qBAAgB,GAAG,UAAC,QAA0B;YAEjD,OAAO,KAAI,CAAC,SAAS,CAAmB,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAC1E,CAAC,CAAA;QAED,0TAA0T;QACnT,qBAAgB,GAAG;YAEtB,OAAO,KAAI,CAAC,SAAS,CAAmB,kBAAkB,EAAE,IAAI,gBAAgB,EAAE,CAAC,CAAC;QACxF,CAAC,CAAA;QAED,8lCAA8lC;QACvlC,iBAAY,GAAG,UAAC,QAAsB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAe,cAAc,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,8XAA8X;QACvX,iBAAY,GAAG,UAAC,QAAsB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAe,cAAc,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,wVAAwV;QACjV,oBAAe,GAAG,UAAC,QAAsB;YAE5C,OAAO,KAAI,CAAC,SAAS,CAAe,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QACrE,CAAC,CAAA;QAED,8XAA8X;QACvX,kBAAa,GAAG;YAEnB,OAAO,KAAI,CAAC,SAAS,CAAsB,eAAe,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;QAC3F,CAAC,CAAA;QAED,kkBAAkkB;QAC3jB,yBAAoB,GAAG,UAAC,QAA8B;YAEzD,OAAO,KAAI,CAAC,SAAS,CAAuB,sBAAsB,EAAE,QAAQ,CAAC,CAAC;QAClF,CAAC,CAAA;QAED,wUAAwU;QACjU,yBAAoB,GAAG;YAE1B,OAAO,KAAI,CAAC,SAAS,CAAuB,sBAAsB,EAAE,IAAI,oBAAoB,EAAE,CAAC,CAAC;QACpG,CAAC,CAAA;QAED,ykCAAykC;QAClkC,wBAAmB,GAAG;YAEzB,OAAO,KAAI,CAAC,SAAS,CAAsB,qBAAqB,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;QACjG,CAAC,CAAA;QAED,stCAAstC;QAC/sC,6BAAwB,GAAG,UAAC,QAAoB;YAEnD,OAAO,KAAI,CAAC,SAAS,CAAa,0BAA0B,EAAE,QAAQ,CAAC,CAAC;QAC5E,CAAC,CAAA;QAED,k7BAAk7B;QAC36B,yBAAoB,GAAG,UAAC,QAAoB;YAE/C,OAAO,KAAI,CAAC,SAAS,CAAa,sBAAsB,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC,CAAA;QAED,wfAAwf;QACjf,0BAAqB,GAAG;YAE3B,OAAO,KAAI,CAAC,SAAS,CAAoB,uBAAuB,EAAE,IAAI,iBAAiB,EAAE,CAAC,CAAC;QAC/F,CAAC,CAAA;QAED,ujBAAujB;QAChjB,uBAAkB,GAAG,UAAC,QAA+B;YAExD,OAAO,KAAI,CAAC,SAAS,CAAwB,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QACjF,CAAC,CAAA;QAED,8PAA8P;QACvP,uBAAkB,GAAG;YAExB,OAAO,KAAI,CAAC,SAAS,CAAwB,oBAAoB,EAAE,IAAI,qBAAqB,EAAE,CAAC,CAAC;QACpG,CAAC,CAAA;QAED,8lCAA8lC;QACvlC,mBAAc,GAAG;YAEpB,OAAO,KAAI,CAAC,SAAS,CAAoB,gBAAgB,EAAE,IAAI,iBAAiB,EAAE,CAAC,CAAC;QACxF,CAAC,CAAA;QAED,mkCAAmkC;QAC5jC,mBAAc,GAAG,UAAC,QAA2B;YAEhD,OAAO,KAAI,CAAC,SAAS,CAAoB,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACzE,CAAC,CAAA;QAED,gEAAgE;QACzD,0BAAqB,GAAG;YAE3B,OAAO,KAAI,CAAC,SAAS,CAAqB,uBAAuB,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAC;QACjG,CAAC,CAAA;QAED,gEAAgE;QACzD,0BAAqB,GAAG,UAAC,QAA4B;YAExD,OAAO,KAAI,CAAC,SAAS,CAAqB,uBAAuB,EAAE,QAAQ,CAAC,CAAC;QACjF,CAAC,CAAA;QAED,4IAA4I;QACrI,iBAAY,GAAG,UAAC,QAAsB;YAEzC,OAAO,KAAI,CAAC,SAAS,CAAe,cAAc,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC,CAAA;QAED,4IAA4I;QACrI,iBAAY,GAAG;YAElB,OAAO,KAAI,CAAC,SAAS,CAAe,cAAc,EAAE,IAAI,YAAY,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAA;QAl0BG,IAAI,OAAO,GAA+B,EAAE,CAAC;QAC7C,IAAI,gBAAgB,GAAY,KAAK,CAAC;QAEtC,gDAAgD,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,gDAAiD,CAAC;QAEzK,IAAI,OAAO,CAAC,kBAAkB,CAAC,EAC/B;YACI,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,gBAAgB,GAAG,IAAI,CAAC;SAC3B;aAED;YACI,IAAI,OAAO,CAAC,cAAc,CAAC;gBAAE,cAAc,GAAG,GAAG,CAAC;YAClD,IAAI,CAAC,OAAO,GAAG,aAAW,kBAAkB,SAAI,cAAc,UAAO,CAAC;YAGtE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAQ,CAAC;YACjE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAS,CAAC;SACvE;QAED,IAAI,OAAO,CAAC,gDAAgD,CAAC;YAAE,gDAAgD,GAAG,KAAK,CAAC;QAExH,IAAI,CAAC,UAAU,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,gDAAgD,CAAC,CAAC;IACnI,CAAC;IAhDD,yEAAyE;IAC3D,qBAAQ,GAAtB;QAEI,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,8BAA8B;IAChB,yBAAY,GAA1B,UAA2B,IAAa;QAEpC,UAAU,GAAG,IAAI,CAAC;IACtB,CAAC;IAq1BD,0BAA0B;IAC1B,2BAA2B;IACd,gCAAS,GAAtB,UAA0B,WAAmB,EAAE,OAAU;;;;;4BAEnC,qBAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAI,WAAW,EAAE,OAAO,CAAC,EAAA;;wBAAtE,QAAQ,GAAM,SAAwD;wBAE1E,sBAAO,QAAQ,EAAC;;;;KACnB;IACL,mBAAC;AAAD,CAAC,AAz2BD,IAy2BC;AAz2BY,oCAAY;AA82BzB,gBAAgB;AAChB,0BAA0B;AAC1B,IAAY,mBAcX;AAdD,WAAY,mBAAmB;IAE3B,oBAAoB;IACpB,iEAAU,CAAA;IAEV,UAAU;IACV,2DAAO,CAAA;IAEP,UAAU;IACV,4DAAQ,CAAA;IAER,oBAAoB;IACpB,kEAAW,CAAA;AAEf,CAAC,EAdW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAc9B;AAED,kCAAkC;AAClC;IAqGI,yEAAyE;IACzE,mBAAmB,IAAyB;QApG5C,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAE1B,iDAAiD;QAC1C,aAAQ,GAAW,EAAE,CAAC;QAE7B,oDAAoD;QAC7C,gBAAW,GAAY,KAAK,CAAC;QAEpC,gJAAgJ;QACzI,iBAAY,GAAW,CAAC,CAAC;QAEhC,wPAAwP;QACjP,iBAAY,GAAY,KAAK,CAAC;QAErC,0FAA0F;QACnF,gBAAW,GAAY,KAAK,CAAC;QAEpC,uKAAuK;QAChK,oBAAe,GAAW,EAAE,CAAC;QAEpC,6LAA6L;QACtL,qBAAgB,GAAW,EAAE,CAAC;QAErC,6KAA6K;QACtK,qBAAgB,GAAW,EAAE,CAAC;QAErC,kMAAkM;QAC3L,sBAAiB,GAAW,EAAE,CAAC;QAEtC,0QAA0Q;QACnQ,sBAAiB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE1D,8NAA8N;QACvN,uBAAkB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE3D,gRAAgR;QACzQ,uBAAkB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE3D,mOAAmO;QAC5N,wBAAmB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE5D,6BAA6B;QACtB,iBAAY,GAAwB,CAAC,CAAC;QAE7C,uRAAuR;QAChR,qBAAgB,GAAW,CAAC,CAAC;QAEpC,qRAAqR;QAC9Q,mBAAc,GAAW,CAAC,CAAC;QAElC,iSAAiS;QAC1R,sBAAiB,GAAW,CAAC,CAAC;QAErC,+RAA+R;QACxR,oBAAe,GAAW,CAAC,CAAC;QAEnC,4LAA4L;QACrL,oBAAe,GAAW,EAAE,CAAC;QAEpC,qMAAqM;QAC9L,qBAAgB,GAAW,EAAE,CAAC;QAErC,gEAAgE;QACzD,qBAAgB,GAAY,KAAK,CAAC;QAEzC,4EAA4E;QACrE,sBAAiB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE1D,iFAAiF;QAC1E,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,qEAAqE;QAC9D,qBAAgB,GAAY,KAAK,CAAC;QAEzC,iFAAiF;QAC1E,sBAAiB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE1D,sFAAsF;QAC/E,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,yEAAyE;QAClE,uBAAkB,GAAY,KAAK,CAAC;QAE3C,2KAA2K;QACpK,qBAAgB,GAAY,KAAK,CAAC;QAEzC,iMAAiM;QAC1L,cAAS,GAAW,CAAC,CAAC;QAE7B,+KAA+K;QACxK,eAAU,GAAW,CAAC,CAAC;QAE9B,kLAAkL;QAC3K,aAAQ,GAAW,CAAC,CAAC;QAE5B,4WAA4W;QACrW,oBAAe,GAAW,EAAE,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,gBAAC;AAAD,CAAC,AA1GD,IA0GC;AA1GY,8BAAS;AA4GtB,iCAAiC;AACjC;IAQI,8EAA8E;IAC9E,yBAAmB,IAA+B;QAPlD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,0CAA0C;QACnC,qBAAgB,GAAgB,EAAE,CAAC;QAKtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,0CAAe;AAe5B,oBAAoB;AACpB;IAQI,gEAAgE;IAChE,wBAAmB,IAA8B;QAPjD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,wCAAwC;QACjC,aAAQ,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAK7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,gBAAgB;AAChB;IAmCI,uDAAuD;IACvD,mBAAmB,IAAyB;QAlC5C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,aAAa;QACN,YAAO,GAAW,CAAC,CAAC;QAE3B,mBAAmB;QACZ,mBAAc,GAAW,EAAE,CAAC;QAEnC,kBAAkB;QACX,qBAAgB,GAAW,EAAE,CAAC;QAErC,mBAAmB;QACZ,aAAQ,GAAW,EAAE,CAAC;QAE7B,kBAAkB;QACX,gBAAW,GAAW,EAAE,CAAC;QAEhC,mBAAmB;QACZ,cAAS,GAAW,EAAE,CAAC;QAE9B,kBAAkB;QACX,cAAS,GAAW,EAAE,CAAC;QAE9B,uBAAuB;QAChB,eAAU,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEnD,2BAA2B;QACpB,kBAAa,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEtD,4BAA4B;QACrB,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAKnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,gBAAC;AAAD,CAAC,AAxCD,IAwCC;AAxCY,8BAAS;AA0CtB,6BAA6B;AAC7B;IAcI,uEAAuE;IACvE,sBAAmB,IAA4B;QAb/C,8VAA8V;QACvV,WAAM,GAAW,EAAE,CAAC;QAE3B,sDAAsD;QAC/C,gBAAW,GAAW,EAAE,CAAC;QAEhC,oEAAoE;QAC7D,iBAAY,GAAW,EAAE,CAAC;QAEjC,oEAAoE;QAC7D,iBAAY,GAAW,EAAE,CAAC;QAK7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,mBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,oCAAY;AAqBzB,gCAAgC;AAChC;IAcI,wEAAwE;IACxE,oBAAmB,IAA0B;QAb7C,qBAAqB;QACd,aAAQ,GAAW,EAAE,CAAC;QAE7B,uBAAuB;QAChB,gBAAW,GAAW,EAAE,CAAC;QAEhC,iBAAiB;QACV,iBAAY,GAAW,EAAE,CAAC;QAEjC,kBAAkB;QACX,kBAAa,GAAW,EAAE,CAAC;QAK9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,gCAAU;AAqBvB,qBAAqB;AACrB;IAKI,6DAA6D;IAC7D,oBAAmB,IAA0B;QAJ7C,0BAA0B;QACnB,aAAQ,GAAW,EAAE,CAAC;QAKzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,gCAAU;AAYvB,oBAAoB;AACpB;IAiBI,+DAA+D;IAC/D,uBAAmB,IAA6B;QAhBhD,qBAAqB;QACd,aAAQ,GAAW,EAAE,CAAC;QAE7B,sBAAsB;QACf,sBAAiB,GAAW,EAAE,CAAC;QAEtC,kBAAkB;QACX,kBAAa,GAAW,EAAE,CAAC;QAElC,sBAAsB;QACf,sBAAiB,GAAW,EAAE,CAAC;QAEtC,aAAa;QACN,eAAU,GAAW,CAAC,CAAC;QAK1B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,sCAAa;AAwB1B,6EAA6E;AAC7E;IAcI,qHAAqH;IACrH,oBAAmB,IAA0B;QAb7C,6BAA6B;QACtB,iBAAY,GAAW,CAAC,CAAC;QAEhC,6BAA6B;QACtB,mBAAc,GAAW,CAAC,CAAC;QAElC,4BAA4B;QACrB,iBAAY,GAAW,EAAE,CAAC;QAEjC,4BAA4B;QACrB,oBAAe,GAAW,EAAE,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,gCAAU;AAqBvB,6BAA6B;AAC7B;IAiBI,4EAA4E;IAC5E,2BAAmB,IAAiC;QAhBpD,oCAAoC;QAC7B,mBAAc,GAAW,EAAE,CAAC;QAEnC,2BAA2B;QACpB,kBAAa,GAAW,EAAE,CAAC;QAElC,kBAAkB;QACX,gBAAW,GAAY,KAAK,CAAC;QAEpC,mBAAmB;QACZ,gBAAW,GAAY,KAAK,CAAC;QAEpC,+IAA+I;QACxI,iBAAY,GAAY,KAAK,CAAC;QAKjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,8CAAiB;AAwB9B,2CAA2C;AAC3C;IA8JI,uFAAuF;IACvF,wBAAmB,IAA8B;QA7JjD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,qBAAqB;QACd,aAAQ,GAAW,EAAE,CAAC;QAE7B,sFAAsF;QAC/E,iBAAY,GAAW,EAAE,CAAC;QAEjC,mDAAmD;QAC5C,aAAQ,GAAW,EAAE,CAAC;QAE7B,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,8CAA8C;QACvC,mBAAc,GAAY,KAAK,CAAC;QAEvC,uIAAuI;QAChI,KAAC,oBAAoB,CAAC,GAAY,KAAK,CAAC;QAE/C,2HAA2H;QACpH,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,uNAAuN;QAChN,KAAC,0BAA0B,CAAC,GAAY,KAAK,CAAC;QAErD,uNAAuN;QAChN,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,+OAA+O;QACxO,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,6OAA6O;QACtO,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,oMAAoM;QAC7L,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,yMAAyM;QAClM,KAAC,qBAAqB,CAAC,GAAY,KAAK,CAAC;QAEhD,6PAA6P;QACtP,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,oJAAoJ;QAC7I,KAAC,2BAA2B,CAAC,GAAY,KAAK,CAAC;QAEtD,kKAAkK;QAC3J,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,kQAAkQ;QAC3P,KAAC,gCAAgC,CAAC,GAAY,KAAK,CAAC;QAE3D,kPAAkP;QAC3O,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,8LAA8L;QACvL,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,wOAAwO;QACjO,KAAC,oBAAoB,CAAC,GAAW,CAAC,CAAC;QAE1C,oJAAoJ;QAC7I,KAAC,mBAAmB,CAAC,GAAW,CAAC,CAAC;QAEzC,8LAA8L;QACvL,KAAC,kBAAkB,CAAC,GAAW,CAAC,CAAC;QAExC,2LAA2L;QACpL,KAAC,sBAAsB,CAAC,GAAW,CAAC,CAAC;QAE5C,8MAA8M;QACvM,KAAC,wBAAwB,CAAC,GAAW,CAAC,CAAC;QAE9C,yMAAyM;QAClM,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,8MAA8M;QACvM,KAAC,wBAAwB,CAAC,GAAW,CAAC,CAAC;QAE9C,oJAAoJ;QAC7I,KAAC,mBAAmB,CAAC,GAAY,KAAK,CAAC;QAE9C,2UAA2U;QACpU,KAAC,2BAA2B,CAAC,GAAY,KAAK,CAAC;QAEtD,ySAAyS;QAClS,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,2HAA2H;QACpH,KAAC,0BAA0B,CAAC,GAAY,KAAK,CAAC;QAErD,uNAAuN;QAChN,KAAC,4BAA4B,CAAC,GAAY,KAAK,CAAC;QAEvD,6OAA6O;QACtO,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,yMAAyM;QAClM,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,kKAAkK;QAC3J,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,8LAA8L;QACvL,KAAC,oBAAoB,CAAC,GAAW,CAAC,CAAC;QAE1C,kZAAkZ;QAC3Y,KAAC,4BAA4B,CAAC,GAAY,KAAK,CAAC;QAEvD,mXAAmX;QAC5W,KAAC,2BAA2B,CAAC,GAAW,CAAC,CAAC;QAEjD,2HAA2H;QACpH,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,mHAAmH;QAC5G,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,sQAAsQ;QAC/P,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,sYAAsY;QAC/X,KAAC,qCAAqC,CAAC,GAAY,KAAK,CAAC;QAEhE,6fAA6f;QACtf,KAAC,6CAA6C,CAAC,GAAY,KAAK,CAAC;QAExE,k3BAAk3B;QAC32B,KAAC,mBAAmB,CAAC,GAAW,CAAC,CAAC;QAEzC,0DAA0D;QACnD,KAAC,kBAAkB,CAAC,GAAY,KAAK,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAnKD,IAmKC;AAnKY,wCAAc;AAqK3B,gBAAgB;AAChB,IAAY,aAWX;AAXD,WAAY,aAAa;IAErB,sBAAsB;IACtB,6DAAc,CAAA;IAEd,iBAAiB;IACjB,6DAAc,CAAA;IAEd,kBAAkB;IAClB,+DAAe,CAAA;AAEnB,CAAC,EAXW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAWxB;AAED,mBAAmB;AACnB;IAoBI,gEAAgE;IAChE,yBAAmB,IAA+B;QAnBlD,8DAA8D;QACvD,gBAAW,GAAW,EAAE,CAAC;QAEhC,kMAAkM;QAC3L,+BAA0B,GAAW,EAAE,CAAC;QAE/C,kBAAkB;QACX,gBAAW,GAAY,KAAK,CAAC;QAEpC,qCAAqC;QAC9B,mBAAc,GAAW,CAAC,CAAC;QAElC,qLAAqL;QAC9K,gBAAW,GAAY,KAAK,CAAC;QAEpC,qEAAqE;QAC9D,gBAAW,GAAkB,CAAC,CAAC;QAKlC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,0CAAe;AA2B5B,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAE5B,+BAA+B;IAC/B,yEAAa,CAAA;IAEb,2CAA2C;IAC3C,+FAAwB,CAAA;IAExB,oCAAoC;IACpC,iFAAiB,CAAA;IAEjB,iCAAiC;IACjC,+DAAQ,CAAA;AAEZ,CAAC,EAdW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAc/B;AAED,6BAA6B;AAC7B;IAoKI,2EAA2E;IAC3E,0BAAmB,IAAgC;QAnKnD,2BAA2B;QACpB,mBAAc,GAAW,EAAE,CAAC;QAEnC,kBAAkB;QACX,gBAAW,GAAY,KAAK,CAAC;QAEpC,+DAA+D;QACxD,yBAAoB,GAAY,KAAK,CAAC;QAE7C,4GAA4G;QACrG,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,2EAA2E;QACpE,oBAAe,GAAW,EAAE,CAAC;QAEpC,wHAAwH;QACjH,iBAAY,GAAW,EAAE,CAAC;QAEjC,uFAAuF;QAChF,aAAQ,GAAW,CAAC,CAAC;QAE5B,6DAA6D;QACtD,kBAAa,GAAoB,CAAC,CAAC;QAE1C,oFAAoF;QAC7E,kBAAa,GAAW,EAAE,CAAC;QAElC,oEAAoE;QAC7D,kBAAa,GAAW,CAAC,CAAC;QAEjC,4EAA4E;QACrE,sBAAiB,GAAW,EAAE,CAAC;QAEtC,4EAA4E;QACrE,sBAAiB,GAAW,EAAE,CAAC;QAEtC,8EAA8E;QACvE,gBAAW,GAAW,EAAE,CAAC;QAEhC,sFAAsF;QAC/E,sBAAiB,GAAW,CAAC,CAAC;QAErC,uFAAuF;QAChF,oBAAe,GAAY,KAAK,CAAC;QAExC,2GAA2G;QACpG,qBAAgB,GAAY,KAAK,CAAC;QAEzC,okBAAokB;QAC7jB,wBAAmB,GAAY,KAAK,CAAC;QAE5C,2GAA2G;QACpG,qCAAgC,GAAW,CAAC,CAAC;QAEpD,6FAA6F;QACtF,iCAA4B,GAAW,CAAC,CAAC;QAEhD,kFAAkF;QAC3E,oBAAe,GAAY,KAAK,CAAC;QAExC,wEAAwE;QACjE,gBAAW,GAAY,KAAK,CAAC;QAEpC,sFAAsF;QAC/E,2BAAsB,GAAY,KAAK,CAAC;QAE/C,0BAA0B;QACnB,iBAAY,GAAyB,CAAC,CAAC;QAE9C,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,oNAAoN;QAC7M,uBAAkB,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAE3D,sFAAsF;QAC/E,sBAAiB,GAAW,EAAE,CAAC;QAEtC,6EAA6E;QACtE,gBAAW,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEpD,gGAAgG;QACzF,gBAAW,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEpD,2HAA2H;QACpH,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,uNAAuN;QAChN,KAAC,0BAA0B,CAAC,GAAY,KAAK,CAAC;QAErD,uNAAuN;QAChN,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,0DAA0D;QACnD,yBAAoB,GAAY,KAAK,CAAC;QAE7C,8DAA8D;QACvD,wBAAmB,GAAY,KAAK,CAAC;QAE5C,6PAA6P;QACtP,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,oJAAoJ;QAC7I,KAAC,2BAA2B,CAAC,GAAY,KAAK,CAAC;QAEtD,kKAAkK;QAC3J,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,kQAAkQ;QAC3P,KAAC,gCAAgC,CAAC,GAAY,KAAK,CAAC;QAE3D,oJAAoJ;QAC7I,KAAC,mBAAmB,CAAC,GAAW,CAAC,CAAC;QAEzC,8LAA8L;QACvL,KAAC,kBAAkB,CAAC,GAAW,CAAC,CAAC;QAExC,2LAA2L;QACpL,KAAC,sBAAsB,CAAC,GAAW,CAAC,CAAC;QAE5C,8MAA8M;QACvM,KAAC,wBAAwB,CAAC,GAAW,CAAC,CAAC;QAE9C,2UAA2U;QACpU,KAAC,2BAA2B,CAAC,GAAY,KAAK,CAAC;QAEtD,qEAAqE;QAC9D,yBAAoB,GAAY,KAAK,CAAC;QAE7C,2HAA2H;QACpH,KAAC,0BAA0B,CAAC,GAAY,KAAK,CAAC;QAErD,uNAAuN;QAChN,KAAC,4BAA4B,CAAC,GAAY,KAAK,CAAC;QAEvD,gEAAgE;QACzD,0BAAqB,GAAY,KAAK,CAAC;QAE9C,kKAAkK;QAC3J,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,8LAA8L;QACvL,KAAC,oBAAoB,CAAC,GAAW,CAAC,CAAC;QAE1C,2HAA2H;QACpH,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,mHAAmH;QAC5G,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,sQAAsQ;QAC/P,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,sYAAsY;QAC/X,KAAC,qCAAqC,CAAC,GAAY,KAAK,CAAC;QAEhE,k3BAAk3B;QAC32B,KAAC,mBAAmB,CAAC,GAAW,CAAC,CAAC;QAEzC,0DAA0D;QACnD,KAAC,kBAAkB,CAAC,GAAY,KAAK,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AAzKD,IAyKC;AAzKY,4CAAgB;AA2K7B,eAAe;AACf;IAQI,2DAA2D;IAC3D,wBAAmB,IAA8B;QAPjD,qCAAqC;QAC9B,aAAQ,GAAW,CAAC,CAAC;QAE5B,mBAAmB;QACZ,gBAAW,GAAY,KAAK,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,6CAA6C;AAC7C,IAAY,kBAoBX;AApBD,WAAY,kBAAkB;IAE1B,+BAA+B;IAC/B,qEAAa,CAAA;IAEb,8BAA8B;IAC9B,mEAAY,CAAA;IAEZ,sCAAsC;IACtC,mEAAY,CAAA;IAEZ,wEAAwE;IACxE,mEAAY,CAAA;IAEZ,4BAA4B;IAC5B,+DAAU,CAAA;IAEV,gCAAgC;IAChC,mEAAY,CAAA;AAEhB,CAAC,EApBW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAoB7B;AAED,0CAA0C;AAC1C;IAkMI,qFAAqF;IACrF,uBAAmB,IAA6B;QAjMhD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,wCAAwC;QACjC,aAAQ,GAAW,EAAE,CAAC;QAE7B,uCAAuC;QAChC,kBAAa,GAAW,EAAE,CAAC;QAElC,qFAAqF;QAC9E,iBAAY,GAAW,EAAE,CAAC;QAEjC,gCAAgC;QACzB,aAAQ,GAAW,EAAE,CAAC;QAE7B,6BAA6B;QACtB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,kCAAkC;QAC3B,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,+BAA+B;QACxB,kBAAa,GAAS,IAAI,IAAI,EAAE,CAAC;QAExC,wCAAwC;QACjC,iBAAY,GAAuB,CAAC,CAAC;QAE5C,wGAAwG;QACjG,sBAAiB,GAAW,EAAE,CAAC;QAEtC,mEAAmE;QAC5D,cAAS,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAElD,sFAAsF;QAC/E,eAAU,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEnD,oFAAoF;QAC7E,mBAAc,GAAW,EAAE,CAAC;QAEnC,oFAAoF;QAC7E,uBAAkB,GAAW,EAAE,CAAC;QAEvC,mFAAmF;QAC5E,mBAAc,GAAW,EAAE,CAAC;QAEnC,yCAAyC;QAClC,iBAAY,GAAW,CAAC,CAAC;QAEhC,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,8CAA8C;QACvC,mBAAc,GAAY,KAAK,CAAC;QAEvC,uIAAuI;QAChI,KAAC,oBAAoB,CAAC,GAAY,KAAK,CAAC;QAE/C,2HAA2H;QACpH,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,uNAAuN;QAChN,KAAC,0BAA0B,CAAC,GAAY,KAAK,CAAC;QAErD,uNAAuN;QAChN,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,+OAA+O;QACxO,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,6OAA6O;QACtO,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,oMAAoM;QAC7L,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,yMAAyM;QAClM,KAAC,qBAAqB,CAAC,GAAY,KAAK,CAAC;QAEhD,6PAA6P;QACtP,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,oJAAoJ;QAC7I,KAAC,2BAA2B,CAAC,GAAY,KAAK,CAAC;QAEtD,kKAAkK;QAC3J,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,kQAAkQ;QAC3P,KAAC,gCAAgC,CAAC,GAAY,KAAK,CAAC;QAE3D,kPAAkP;QAC3O,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,8LAA8L;QACvL,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,wOAAwO;QACjO,KAAC,oBAAoB,CAAC,GAAW,CAAC,CAAC;QAE1C,oJAAoJ;QAC7I,KAAC,mBAAmB,CAAC,GAAW,CAAC,CAAC;QAEzC,8LAA8L;QACvL,KAAC,kBAAkB,CAAC,GAAW,CAAC,CAAC;QAExC,2LAA2L;QACpL,KAAC,sBAAsB,CAAC,GAAW,CAAC,CAAC;QAE5C,8MAA8M;QACvM,KAAC,wBAAwB,CAAC,GAAW,CAAC,CAAC;QAE9C,yMAAyM;QAClM,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,8MAA8M;QACvM,KAAC,wBAAwB,CAAC,GAAW,CAAC,CAAC;QAE9C,oJAAoJ;QAC7I,KAAC,mBAAmB,CAAC,GAAY,KAAK,CAAC;QAE9C,2UAA2U;QACpU,KAAC,2BAA2B,CAAC,GAAY,KAAK,CAAC;QAEtD,ySAAyS;QAClS,KAAC,sBAAsB,CAAC,GAAY,KAAK,CAAC;QAEjD,2HAA2H;QACpH,KAAC,0BAA0B,CAAC,GAAY,KAAK,CAAC;QAErD,uNAAuN;QAChN,KAAC,4BAA4B,CAAC,GAAY,KAAK,CAAC;QAEvD,6OAA6O;QACtO,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,yMAAyM;QAClM,KAAC,uBAAuB,CAAC,GAAY,KAAK,CAAC;QAElD,kKAAkK;QAC3J,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,8LAA8L;QACvL,KAAC,oBAAoB,CAAC,GAAW,CAAC,CAAC;QAE1C,kZAAkZ;QAC3Y,KAAC,4BAA4B,CAAC,GAAY,KAAK,CAAC;QAEvD,mXAAmX;QAC5W,KAAC,2BAA2B,CAAC,GAAW,CAAC,CAAC;QAEjD,2HAA2H;QACpH,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,mHAAmH;QAC5G,KAAC,wBAAwB,CAAC,GAAY,KAAK,CAAC;QAEnD,sQAAsQ;QAC/P,KAAC,yBAAyB,CAAC,GAAY,KAAK,CAAC;QAEpD,sYAAsY;QAC/X,KAAC,qCAAqC,CAAC,GAAY,KAAK,CAAC;QAEhE,6fAA6f;QACtf,KAAC,6CAA6C,CAAC,GAAY,KAAK,CAAC;QAExE,k3BAAk3B;QAC32B,KAAC,mBAAmB,CAAC,GAAW,CAAC,CAAC;QAEzC,0DAA0D;QACnD,KAAC,kBAAkB,CAAC,GAAY,KAAK,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAvMD,IAuMC;AAvMY,sCAAa;AAyM1B,6BAA6B;AAC7B;IAQI,6EAA6E;IAC7E,4BAAmB,IAAkC;QAPrD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAKtB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,gDAAkB;AAe/B,2BAA2B;AAC3B;IAQI,0EAA0E;IAC1E,2BAAmB,IAAiC;QAPpD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,uCAAuC;QAChC,YAAO,GAAW,CAAC,CAAC;QAKvB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,+BAA+B;AAC/B;IAQI,6EAA6E;IAC7E,0BAAmB,IAAgC;QAPnD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,yBAAyB;QAClB,aAAQ,GAAW,EAAE,CAAC;QAKzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,4CAAgB;AAe7B,qBAAqB;AACrB;IAKI,kEAAkE;IAClE,yBAAmB,IAA+B;QAJlD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAK5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,0CAAe;AAY5B,uBAAuB;AACvB;IAQI,sEAAsE;IACtE,2BAAmB,IAAiC;QAPpD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,aAAa;QACN,YAAO,GAAW,CAAC,CAAC;QAKvB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,uBAAuB;AACvB;IAQI,+DAA+D;IAC/D,oBAAmB,IAA0B;QAP7C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,yCAAyC;QAClC,oBAAe,GAAW,EAAE,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,gCAAU;AAevB,6BAA6B;AAC7B;IAQI,8EAA8E;IAC9E,6BAAmB,IAAmC;QAPtD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,mBAAmB;QACZ,aAAQ,GAAW,EAAE,CAAC;QAKzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAbD,IAaC;AAbY,kDAAmB;AAehC,sBAAsB;AACtB;IAKI,6DAA6D;IAC7D,mBAAmB,IAAyB;QAJ5C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAK5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,gBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,8BAAS;AAYtB,8BAA8B;AAC9B;IAKI,sFAAsF;IACtF,oCAAmB,IAA0C;QAJ7D,sBAAsB;QACf,aAAQ,GAAW,EAAE,CAAC;QAKzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iCAAC;AAAD,CAAC,AAVD,IAUC;AAVY,gEAA0B;AAYvC,qCAAqC;AACrC;IAQI,uFAAuF;IACvF,8BAAmB,IAAoC;QAPvD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,kBAAkB;QACX,eAAU,GAAgB,EAAE,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,2BAAC;AAAD,CAAC,AAbD,IAaC;AAbY,oDAAoB;AAejC,kCAAkC;AAClC;IAcI,mFAAmF;IACnF,6BAAmB,IAAmC;QAbtD,6BAA6B;QACtB,YAAO,GAAW,CAAC,CAAC;QAE3B,cAAc;QACP,oBAAe,GAAW,EAAE,CAAC;QAEpC,aAAa;QACN,mBAAc,GAAW,EAAE,CAAC;QAEnC,sBAAsB;QACf,eAAU,GAAS,IAAI,IAAI,EAAE,CAAC;QAKjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,kDAAmB;AAqBhC,4BAA4B;AAC5B;IAQI,yEAAyE;IACzE,yBAAmB,IAA+B;QAPlD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,qBAAqB;QACd,WAAM,GAA0B,EAAE,CAAC;QAKtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,0CAAe;AAe5B,yBAAyB;AACzB,IAAY,oBAgCX;AAhCD,WAAY,oBAAoB;IAE5B,iBAAiB;IACjB,mEAAU,CAAA;IAEV,4BAA4B;IAC5B,+DAAQ,CAAA;IAER,uBAAuB;IACvB,iEAAS,CAAA;IAET,4BAA4B;IAC5B,2EAAc,CAAA;IAEd,0BAA0B;IAC1B,qEAAW,CAAA;IAEX,yBAAyB;IACzB,uEAAY,CAAA;IAEZ,sBAAsB;IACtB,qEAAW,CAAA;IAEX,sBAAsB;IACtB,uEAAY,CAAA;IAEZ,WAAW;IACX,+DAAQ,CAAA;IAER,cAAc;IACd,qEAAW,CAAA;AAEf,CAAC,EAhCW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAgC/B;AAED,mCAAmC;AACnC;IAoBI,yFAAyF;IACzF,kCAAmB,IAAwC;QAnB3D,sBAAsB;QACf,aAAQ,GAAW,EAAE,CAAC;QAE7B,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,iBAAiB;QACV,UAAK,GAAW,EAAE,CAAC;QAE1B,kBAAkB;QACX,aAAQ,GAAW,CAAC,CAAC;QAE5B,qBAAqB;QACd,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,sBAAsB;QACf,aAAQ,GAAyB,CAAC,CAAC;QAKtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,+BAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,4DAAwB;AA2BrC,6BAA6B;AAC7B;IAQI,+EAA+E;IAC/E,8BAAmB,IAAoC;QAPvD,4BAA4B;QACrB,sBAAiB,GAAW,CAAC,CAAC;QAErC,sBAAsB;QACf,mBAAc,GAA+B,EAAE,CAAC;QAKnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,2BAAC;AAAD,CAAC,AAbD,IAaC;AAbY,oDAAoB;AAejC,oBAAoB;AACpB;IAQI,mEAAmE;IACnE,2BAAmB,IAAiC;QAPpD,aAAa;QACN,YAAO,GAAW,CAAC,CAAC;QAE3B,mCAAmC;QAC5B,gBAAW,GAAW,EAAE,CAAC;QAK5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,eAAe;AACf;IAQI,0DAA0D;IAC1D,uBAAmB,IAA6B;QAPhD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,eAAe;QACR,YAAO,GAAwB,EAAE,CAAC;QAKrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa;AAe1B,yBAAyB;AACzB;IAuBI,yEAAyE;IACzE,4BAAmB,IAAkC;QAtBrD,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAE1B,iBAAiB;QACV,kBAAa,GAAS,IAAI,IAAI,EAAE,CAAC;QAExC,sBAAsB;QACf,kBAAa,GAAS,IAAI,IAAI,EAAE,CAAC;QAExC,kBAAkB;QACX,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,iBAAiB;QACV,iBAAY,GAAW,EAAE,CAAC;QAEjC,kBAAkB;QACX,aAAQ,GAAW,CAAC,CAAC;QAE5B,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAK7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,gDAAkB;AA8B/B,oBAAoB;AACpB;IAQI,gEAAgE;IAChE,wBAAmB,IAA8B;QAPjD,uBAAuB;QAChB,gBAAW,GAAW,EAAE,CAAC;QAEhC,gBAAgB;QACT,cAAS,GAAyB,EAAE,CAAC;QAKxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,2BAA2B;AAC3B;IAKI,4EAA4E;IAC5E,6BAAmB,IAAmC;QAJtD,mBAAmB;QACZ,aAAQ,GAAmB,EAAE,CAAC;QAKjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAVD,IAUC;AAVY,kDAAmB;AAYhC,0CAA0C;AAC1C;IAQI,yFAAyF;IACzF,2BAAmB,IAAiC;QAPpD,kBAAkB;QACX,mBAAc,GAAW,EAAE,CAAC;QAEnC,4CAA4C;QACrC,8BAAyB,GAAW,EAAE,CAAC;QAK1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,qCAAqC;AACrC;IAKI,gFAAgF;IAChF,uBAAmB,IAA6B;QAJhD,qCAAqC;QAC9B,YAAO,GAAwB,EAAE,CAAC;QAKrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,sCAAa;AAY1B,4CAA4C;AAC5C;IAmCI,4FAA4F;IAC5F,4BAAmB,IAAkC;QAlCrD,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAE1B,iBAAiB;QACV,oBAAe,GAAY,KAAK,CAAC;QAExC,sBAAsB;QACf,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,iBAAiB;QACV,UAAK,GAAW,EAAE,CAAC;QAE1B,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,YAAY;QACL,cAAS,GAAW,CAAC,CAAC;QAE7B,yBAAyB;QAClB,oBAAe,GAAW,CAAC,CAAC;QAEnC,gCAAgC;QACzB,0BAAqB,GAAW,CAAC,CAAC;QAEzC,qBAAqB;QACd,gBAAW,GAAW,CAAC,CAAC;QAE/B,yCAAyC;QAClC,8BAAyB,GAAW,CAAC,CAAC;QAE7C,yCAAyC;QAClC,8BAAyB,GAAW,CAAC,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAxCD,IAwCC;AAxCY,gDAAkB;AA0C/B,qCAAqC;AACrC;IAQI,iFAAiF;IACjF,wBAAmB,IAA8B;QAPjD,gCAAgC;QACzB,gBAAW,GAAW,CAAC,CAAC;QAE/B,2BAA2B;QACpB,mBAAc,GAAyB,EAAE,CAAC;QAK7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,qCAAqC;AACrC;IAiBI,sFAAsF;IACtF,6BAAmB,IAAmC;QAhBtD,gBAAgB;QACT,aAAQ,GAAW,EAAE,CAAC;QAE7B,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,WAAW;QACJ,aAAQ,GAAW,EAAE,CAAC;QAE7B,sBAAsB;QACf,iBAAY,GAAW,CAAC,CAAC;QAEhC,oBAAoB;QACb,oBAAe,GAAY,KAAK,CAAC;QAKpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,kDAAmB;AAwBhC,wBAAwB;AACxB;IAQI,qEAAqE;IACrE,yBAAmB,IAA+B;QAPlD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,iBAAiB;QACV,cAAS,GAA0B,EAAE,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,0CAAe;AAe5B,+BAA+B;AAC/B;IAiEI,8EAA8E;IAC9E,2BAAmB,IAAiC;QAhEpD,kCAAkC;QAC3B,gBAAW,GAAW,EAAE,CAAC;QAEhC,mBAAmB;QACZ,gBAAW,GAAY,KAAK,CAAC;QAEpC,yDAAyD;QAClD,gBAAW,GAAkB,CAAC,CAAC;QAEtC,sBAAsB;QACf,iBAAY,GAAW,CAAC,CAAC;QAEhC,kCAAkC;QAC3B,kBAAa,GAAW,CAAC,CAAC;QAEjC,oCAAoC;QAC7B,oBAAe,GAAW,CAAC,CAAC;QAEnC,0CAA0C;QACnC,qBAAgB,GAAW,CAAC,CAAC;QAEpC,yCAAyC;QAClC,oBAAe,GAAW,CAAC,CAAC;QAEnC,uCAAuC;QAChC,oBAAe,GAAS,IAAI,IAAI,EAAE,CAAC;QAE1C,+BAA+B;QACxB,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,6BAA6B;QACtB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,mCAAmC;QAC5B,iBAAY,GAAW,CAAC,CAAC;QAEhC,kDAAkD;QAC3C,yBAAoB,GAAY,KAAK,CAAC;QAE7C,yCAAyC;QAClC,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,6BAA6B;QACtB,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,yCAAyC;QAClC,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,6BAA6B;QACtB,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAK5C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAtED,IAsEC;AAtEY,8CAAiB;AAwE9B,yBAAyB;AACzB;IAQI,oEAAoE;IACpE,uBAAmB,IAA6B;QAPhD,6BAA6B;QACtB,eAAU,GAAW,CAAC,CAAC;QAE9B,mBAAmB;QACZ,YAAO,GAAwB,EAAE,CAAC;QAKrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa;AAe1B,oCAAoC;AACpC;IA0BI,uFAAuF;IACvF,+BAAmB,IAAqC;QAzBxD,aAAa;QACN,YAAO,GAAW,CAAC,CAAC;QAE3B,mBAAmB;QACZ,oBAAe,GAAW,EAAE,CAAC;QAEpC,iBAAiB;QACV,iBAAY,GAAW,EAAE,CAAC;QAEjC,2BAA2B;QACpB,uBAAkB,GAAY,KAAK,CAAC;QAE3C,6BAA6B;QACtB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,oBAAoB;QACb,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,mBAAmB;QACZ,oBAAe,GAAY,KAAK,CAAC;QAExC,uBAAuB;QAChB,uBAAkB,GAAW,EAAE,CAAC;QAKnC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,4BAAC;AAAD,CAAC,AA/BD,IA+BC;AA/BY,sDAAqB;AAiClC,8BAA8B;AAC9B;IAQI,6EAA6E;IAC7E,2BAAmB,IAAiC;QAPpD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,gBAAgB;QACT,YAAO,GAA4B,EAAE,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,oCAAoC;AACpC;IAQI,gFAAgF;IAChF,wBAAmB,IAA8B;QAPjD,0BAA0B;QACnB,aAAQ,GAAW,EAAE,CAAC;QAE7B,6BAA6B;QACtB,aAAQ,GAAiB,EAAE,CAAC;QAK/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,sCAAsC;AACtC;IAiBI,sFAAsF;IACtF,4BAAmB,IAAkC;QAhBrD,iCAAiC;QAC1B,aAAQ,GAAW,EAAE,CAAC;QAE7B,kDAAkD;QAC3C,sBAAiB,GAAW,CAAC,CAAC;QAErC,+BAA+B;QACxB,kBAAa,GAAW,CAAC,CAAC;QAEjC,qBAAqB;QACd,gBAAW,GAAY,KAAK,CAAC;QAEpC,kBAAkB;QACX,gBAAW,GAAY,KAAK,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,gDAAkB;AAwB/B,iCAAiC;AACjC;IAKI,6EAA6E;IAC7E,wBAAmB,IAA8B;QAJjD,0BAA0B;QACnB,aAAQ,GAAyB,EAAE,CAAC;QAKvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,wCAAc;AAY3B,gCAAgC;AAChC;IAQI,+EAA+E;IAC/E,2BAAmB,IAAiC;QAPpD,qBAAqB;QACd,aAAQ,GAAW,EAAE,CAAC;QAE7B,8BAA8B;QACvB,YAAO,GAAoB,EAAE,CAAC;QAKjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,qCAAqC;AACrC;IAuBI,qFAAqF;IACrF,4BAAmB,IAAkC;QAtBrD,qCAAqC;QAC9B,oBAAe,GAAW,EAAE,CAAC;QAEpC,kBAAkB;QACX,gBAAW,GAAY,KAAK,CAAC;QAEpC,uEAAuE;QAChE,mBAAc,GAAY,KAAK,CAAC;QAEvC,6EAA6E;QACtE,kBAAa,GAAW,CAAC,CAAC;QAEjC,iCAAiC;QAC1B,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,8CAA8C;QACvC,iBAAY,GAAW,EAAE,CAAC;QAEjC,2BAA2B;QACpB,sBAAiB,GAAW,EAAE,CAAC;QAKlC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,gDAAkB;AA8B/B,8BAA8B;AAC9B;IAWI,0EAA0E;IAC1E,wBAAmB,IAA8B;QAVjD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,oCAAoC;QAC7B,gBAAW,GAAW,CAAC,CAAC;QAE/B,sCAAsC;QAC/B,aAAQ,GAAyB,EAAE,CAAC;QAKvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,wCAAc;AAkB3B,6BAA6B;AAC7B;IAWI,iFAAiF;IACjF,gCAAmB,IAAsC;QAVzD,yCAAyC;QAClC,cAAS,GAAW,CAAC,CAAC;QAE7B,mBAAmB;QACZ,iBAAY,GAAY,KAAK,CAAC;QAErC,sEAAsE;QAC/D,gBAAW,GAAY,KAAK,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,6BAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,wDAAsB;AAkBnC,wBAAwB;AACxB;IAKI,wEAAwE;IACxE,4BAAmB,IAAkC;QAJrD,6BAA6B;QACtB,iBAAY,GAA6B,EAAE,CAAC;QAK/C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,gDAAkB;AAY/B,+BAA+B;AAC/B;IAKI,kFAAkF;IAClF,+BAAmB,IAAqC;QAJxD,wBAAwB;QACjB,oBAAe,GAAwB,EAAE,CAAC;QAK7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,4BAAC;AAAD,CAAC,AAVD,IAUC;AAVY,sDAAqB;AAYlC,2BAA2B;AAC3B;IAcI,8EAA8E;IAC9E,+BAAmB,IAAqC;QAbxD,kBAAkB;QACX,mBAAc,GAAW,EAAE,CAAC;QAEnC,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,gBAAgB;QACT,iBAAY,GAAW,CAAC,CAAC;QAEhC,sBAAsB;QACf,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAKrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,4BAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,sDAAqB;AAqBlC,2BAA2B;AAC3B;IAKI,0EAA0E;IAC1E,2BAAmB,IAAiC;QAJpD,oBAAoB;QACb,aAAQ,GAA4B,EAAE,CAAC;QAK1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,8CAAiB;AAY9B,yCAAyC;AACzC;IA0BI,6FAA6F;IAC7F,gCAAmB,IAAsC;QAzBzD,aAAa;QACN,YAAO,GAAW,CAAC,CAAC;QAE3B,mBAAmB;QACZ,oBAAe,GAAW,EAAE,CAAC;QAEpC,kBAAkB;QACX,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,6BAA6B;QACtB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,oBAAoB;QACb,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,mBAAmB;QACZ,oBAAe,GAAY,KAAK,CAAC;QAExC,uBAAuB;QAChB,uBAAkB,GAAW,EAAE,CAAC;QAEvC,cAAc;QACP,eAAU,GAAW,CAAC,CAAC;QAK1B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,6BAAC;AAAD,CAAC,AA/BD,IA+BC;AA/BY,wDAAsB;AAiCnC,mCAAmC;AACnC;IAQI,mFAAmF;IACnF,4BAAmB,IAAkC;QAPrD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,gBAAgB;QACT,aAAQ,GAA6B,EAAE,CAAC;QAK3C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,gDAAkB;AAe/B,gCAAgC;AAChC,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAEzB,UAAU;IACV,uDAAO,CAAA;IAEP,UAAU;IACV,uDAAO,CAAA;IAEP,UAAU;IACV,uDAAO,CAAA;IAEP,WAAW;IACX,yDAAQ,CAAA;AAEZ,CAAC,EAdW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAc5B;AAED,iCAAiC;AACjC,IAAY,iBAiBX;AAjBD,WAAY,iBAAiB;IAEzB,iBAAiB;IACjB,qEAAc,CAAA;IAEd,wDAAwD;IACxD,mEAAa,CAAA;IAEb,0BAA0B;IAC1B,mEAAa,CAAA;IAEb,6BAA6B;IAC7B,uEAAe,CAAA;IAEf,oCAAoC;IACpC,6EAAkB,CAAA;AAEtB,CAAC,EAjBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAiB5B;AAED,8BAA8B;AAC9B;IAyCI,6EAA6E;IAC7E,2BAAmB,IAAiC;QAxCpD,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAE1B,eAAe;QACR,iBAAY,GAAsB,CAAC,CAAC;QAE3C,wBAAwB;QACjB,aAAQ,GAAW,EAAE,CAAC;QAE7B,uBAAuB;QAChB,gBAAW,GAAW,EAAE,CAAC;QAEhC,yBAAyB;QAClB,gBAAW,GAAW,CAAC,CAAC;QAE/B,6BAA6B;QACtB,cAAS,GAAW,EAAE,CAAC;QAE9B,4BAA4B;QACrB,iBAAY,GAAW,EAAE,CAAC;QAEjC,8BAA8B;QACvB,iBAAY,GAAW,CAAC,CAAC;QAEhC,sBAAsB;QACf,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,8BAA8B;QACvB,oBAAe,GAAS,IAAI,IAAI,EAAE,CAAC;QAE1C,wBAAwB;QACjB,iBAAY,GAAW,CAAC,CAAC;QAEhC,mBAAmB;QACZ,iBAAY,GAAW,CAAC,CAAC;QAEhC,gBAAgB;QACT,kBAAa,GAAsB,CAAC,CAAC;QAKxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AA9CD,IA8CC;AA9CY,8CAAiB;AAgD9B,mBAAmB;AACnB;IAQI,8DAA8D;IAC9D,uBAAmB,IAA6B;QAPhD,uBAAuB;QAChB,gBAAW,GAAW,EAAE,CAAC;QAEhC,eAAe;QACR,aAAQ,GAAwB,EAAE,CAAC;QAKtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa;AAe1B,sCAAsC;AACtC;IA8DI,yFAAyF;IACzF,+BAAmB,IAAqC;QA7DxD,mBAAmB;QACZ,aAAQ,GAAW,EAAE,CAAC;QAE7B,qBAAqB;QACd,uBAAkB,GAAY,KAAK,CAAC;QAE3C,yBAAyB;QAClB,uBAAkB,GAAW,EAAE,CAAC;QAEvC,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,iBAAiB;QACV,gBAAW,GAAW,EAAE,CAAC;QAEhC,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,mDAAmD;QAC5C,kBAAa,GAAW,CAAC,CAAC;QAEjC,mDAAmD;QAC5C,sBAAiB,GAAW,CAAC,CAAC;QAErC,8BAA8B;QACvB,mBAAc,GAAW,CAAC,CAAC;QAElC,oCAAoC;QAC7B,kBAAa,GAAW,CAAC,CAAC;QAEjC,+BAA+B;QACxB,kBAAa,GAAY,KAAK,CAAC;QAEtC,iCAAiC;QAC1B,uBAAkB,GAAY,KAAK,CAAC;QAE3C,0CAA0C;QACnC,oBAAe,GAAY,KAAK,CAAC;QAExC,sCAAsC;QAC/B,oBAAe,GAAY,KAAK,CAAC;QAExC,wBAAwB;QACjB,2BAAsB,GAAY,KAAK,CAAC;QAE/C,yBAAyB;QAClB,4BAAuB,GAAY,KAAK,CAAC;QAEhD,cAAc;QACP,eAAU,GAAW,CAAC,CAAC;QAE9B,mCAAmC;QAC5B,iBAAY,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAErD,6BAA6B;QACtB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,uCAAuC;QAChC,oBAAe,GAAS,IAAI,IAAI,EAAE,CAAC;QAKtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,4BAAC;AAAD,CAAC,AAnED,IAmEC;AAnEY,sDAAqB;AAqElC,6BAA6B;AAC7B;IAQI,4EAA4E;IAC5E,2BAAmB,IAAiC;QAPpD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,wBAAwB;QACjB,gBAAW,GAA4B,EAAE,CAAC;QAK7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,+BAA+B;AAC/B;IA2DI,+EAA+E;IAC/E,4BAAmB,IAAkC;QA1DrD,gBAAgB;QACT,aAAQ,GAAW,EAAE,CAAC;QAE7B,iBAAiB;QACV,kBAAa,GAAW,EAAE,CAAC;QAElC,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,WAAW;QACJ,aAAQ,GAAW,EAAE,CAAC;QAE7B,4BAA4B;QACrB,iBAAY,GAAuB,CAAC,CAAC;QAE5C,uBAAuB;QAChB,iBAAY,GAAW,CAAC,CAAC;QAEhC,+BAA+B;QACxB,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,oBAAoB;QACb,oBAAe,GAAY,KAAK,CAAC;QAExC,kDAAkD;QAC3C,yBAAoB,GAAY,KAAK,CAAC;QAE7C,sDAAsD;QAC/C,yBAAoB,GAAY,KAAK,CAAC;QAE7C,sBAAsB;QACf,eAAU,GAAS,IAAI,IAAI,EAAE,CAAC;QAErC,yCAAyC;QAClC,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,6BAA6B;QACtB,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,yCAAyC;QAClC,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,6BAA6B;QACtB,KAAC,4BAA4B,CAAC,GAAW,CAAC,CAAC;QAElD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAEhD,2BAA2B;QACpB,KAAC,0BAA0B,CAAC,GAAW,CAAC,CAAC;QAK5C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAhED,IAgEC;AAhEY,gDAAkB;AAkE/B,0BAA0B;AAC1B;IAQI,sEAAsE;IACtE,wBAAmB,IAA8B;QAPjD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,gBAAgB;QACT,aAAQ,GAAyB,EAAE,CAAC;QAKvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,wCAAwC;AACxC;IAoBI,2EAA2E;IAC3E,eAAmB,IAAqB;QAnBxC,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAE1B,eAAe;QACR,iBAAY,GAAW,CAAC,CAAC;QAEhC,kBAAkB;QACX,cAAS,GAAY,KAAK,CAAC;QAElC,8DAA8D;QACvD,gBAAW,GAAY,KAAK,CAAC;QAEpC,iBAAiB;QACV,iBAAY,GAAW,EAAE,CAAC;QAEjC,qDAAqD;QAC9C,kBAAa,GAAW,EAAE,CAAC;QAK9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,YAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,sBAAK;AA2BlB,mCAAmC;AACnC;IAQI,6EAA6E;IAC7E,sBAAmB,IAA4B;QAP/C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,mCAAmC;QAC5B,WAAM,GAAY,EAAE,CAAC;QAKxB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,mBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,oCAAY;AAezB,cAAc;AACd;IAQI,qDAAqD;IACrD,mBAAmB,IAAyB;QAP5C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,2CAA2C;QACpC,YAAO,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAK5C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,gBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8BAAS;AAetB,gCAAgC;AAChC;IAQI,+EAA+E;IAC/E,2BAAmB,IAAiC;QAPpD,4CAA4C;QACrC,mBAAc,GAAY,KAAK,CAAC;QAEvC,kEAAkE;QAC3D,qBAAgB,GAAY,KAAK,CAAC;QAKrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,uCAAuC;AACvC;IAQI,wFAAwF;IACxF,6BAAmB,IAAmC;QAPtD,wDAAwD;QACjD,6BAAwB,GAAY,KAAK,CAAC;QAEjD,8CAA8C;QACvC,yBAAoB,GAAY,KAAK,CAAC;QAKzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAbD,IAaC;AAbY,kDAAmB;AAehC,wBAAwB;AACxB;IAWI,oEAAoE;IACpE,wBAAmB,IAA8B;QAVjD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,oCAAoC;QAC7B,YAAO,GAAW,CAAC,CAAC;QAE3B,wCAAwC;QACjC,aAAQ,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAK7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,wCAAc;AAkB3B,kCAAkC;AAClC;IAWI,uEAAuE;IACvE,iBAAmB,IAAuB;QAV1C,WAAW;QACJ,iBAAY,GAAW,EAAE,CAAC;QAEjC,YAAY;QACL,kBAAa,GAAW,CAAC,CAAC;QAEjC,iBAAiB;QACV,uBAAkB,GAAW,EAAE,CAAC;QAKnC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,cAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,0BAAO;AAkBpB,kCAAkC;AAClC;IAKI,2EAA2E;IAC3E,qBAAmB,IAA2B;QAJ9C,kCAAkC;QAC3B,aAAQ,GAAc,EAAE,CAAC;QAK5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,kBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,kCAAW;AAYxB,uBAAuB;AACvB;IAQI,iEAAiE;IACjE,sBAAmB,IAA4B;QAP/C,2DAA2D;QACpD,iBAAY,GAAW,EAAE,CAAC;QAEjC,gBAAgB;QACT,iBAAY,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAKjD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,mBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,oCAAY;AAezB,6BAA6B;AAC7B;IAsCI,+EAA+E;IAC/E,8BAAmB,IAAoC;QArCvD,sBAAsB;QACf,aAAQ,GAAW,EAAE,CAAC;QAE7B,WAAW;QACJ,aAAQ,GAAyB,CAAC,CAAC;QAE1C,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,iBAAiB;QACV,UAAK,GAAW,EAAE,CAAC;QAE1B,kBAAkB;QACX,aAAQ,GAAW,CAAC,CAAC;QAE5B,qBAAqB;QACd,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,oBAAoB;QACb,kBAAa,GAAW,EAAE,CAAC;QAElC,qBAAqB;QACd,kBAAa,GAAW,CAAC,CAAC;QAEjC,0BAA0B;QACnB,oBAAe,GAAW,CAAC,CAAC;QAEnC,oBAAoB;QACb,kBAAa,GAAW,EAAE,CAAC;QAElC,qBAAqB;QACd,kBAAa,GAAW,CAAC,CAAC;QAEjC,0BAA0B;QACnB,oBAAe,GAAW,CAAC,CAAC;QAK/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,2BAAC;AAAD,CAAC,AA3CD,IA2CC;AA3CY,oDAAoB;AA6CjC,iBAAiB;AACjB,IAAY,eAWX;AAXD,WAAY,eAAe;IAEvB,4BAA4B;IAC5B,yDAAU,CAAA;IAEV,uCAAuC;IACvC,qDAAQ,CAAA;IAER,wCAAwC;IACxC,uDAAS,CAAA;AAEb,CAAC,EAXW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAW1B;AAED,qCAAqC;AACrC;IA6BI,sFAAsF;IACtF,6BAAmB,IAAmC;QA5BtD,6BAA6B;QACtB,iBAAY,GAAW,CAAC,CAAC;QAEhC,+BAA+B;QACxB,oBAAe,GAAW,EAAE,CAAC;QAEpC,6BAA6B;QACtB,iBAAY,GAAW,CAAC,CAAC;QAEhC,+BAA+B;QACxB,oBAAe,GAAW,EAAE,CAAC;QAEpC,6BAA6B;QACtB,wBAAmB,GAAW,EAAE,CAAC;QAExC,wCAAwC;QACjC,oBAAe,GAAW,EAAE,CAAC;QAEpC,kBAAkB;QACX,kBAAa,GAAW,EAAE,CAAC;QAElC,6CAA6C;QACtC,oBAAe,GAAW,EAAE,CAAC;QAEpC,6CAA6C;QACtC,oBAAe,GAAW,EAAE,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,kDAAmB;AAoChC,mCAAmC;AACnC;IAiBI,mFAAmF;IACnF,4BAAmB,IAAkC;QAhBrD,2BAA2B;QACpB,kBAAa,GAAoB,CAAC,CAAC;QAE1C,6BAA6B;QACtB,sBAAiB,GAAW,EAAE,CAAC;QAEtC,+BAA+B;QACxB,kBAAa,GAAW,CAAC,CAAC;QAEjC,6BAA6B;QACtB,sBAAiB,GAAW,EAAE,CAAC;QAEtC,4BAA4B;QACrB,sBAAiB,GAAW,EAAE,CAAC;QAKlC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,gDAAkB;AAwB/B,6BAA6B;AAC7B;IAWI,yEAAyE;IACzE,wBAAmB,IAA8B;QAVjD,WAAW;QACJ,aAAQ,GAAW,EAAE,CAAC;QAE7B,WAAW;QACJ,cAAS,GAAW,CAAC,CAAC;QAE7B,iBAAiB;QACV,mBAAc,GAAW,EAAE,CAAC;QAK/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,wCAAc;AAkB3B,kCAAkC;AAClC;IAQI,iFAAiF;IACjF,2BAAmB,IAAiC;QAPpD,uBAAuB;QAChB,gBAAW,GAAW,EAAE,CAAC;QAEhC,gBAAgB;QACT,oBAAe,GAAqB,EAAE,CAAC;QAK1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,8CAAiB;AAe9B,yCAAyC;AACzC;IAgCI,iGAAiG;IACjG,oCAAmB,IAA0C;QA/B7D,iBAAiB;QACV,UAAK,GAAW,EAAE,CAAC;QAE1B,kBAAkB;QACX,aAAQ,GAAW,CAAC,CAAC;QAE5B,mBAAmB;QACZ,gBAAW,GAAY,KAAK,CAAC;QAEpC,sBAAsB;QACf,kBAAa,GAAW,CAAC,CAAC;QAEjC,4BAA4B;QACrB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,4BAA4B;QACrB,0BAAqB,GAAS,IAAI,IAAI,EAAE,CAAC;QAEhD,mCAAmC;QAC5B,4BAAuB,GAAS,IAAI,IAAI,EAAE,CAAC;QAElD,wBAAwB;QACjB,eAAU,GAAW,CAAC,CAAC;QAE9B,iCAAiC;QAC1B,qBAAgB,GAAW,CAAC,CAAC;QAEpC,+BAA+B;QACxB,kBAAa,GAAW,CAAC,CAAC;QAK7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iCAAC;AAAD,CAAC,AArCD,IAqCC;AArCY,gEAA0B;AAuCvC,mCAAmC;AACnC;IAQI,8EAA8E;IAC9E,uBAAmB,IAA6B;QAPhD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,kBAAkB;QACX,oBAAe,GAAY,KAAK,CAAC;QAKpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa;AAe1B,iDAAiD;AACjD;IA4CI,6FAA6F;IAC7F,wBAAmB,IAA8B;QA3CjD,SAAS;QACF,WAAM,GAAW,CAAC,CAAC;QAE1B,mFAAmF;QAC5E,oBAAe,GAAY,KAAK,CAAC;QAExC,kCAAkC;QAC3B,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,iBAAiB;QACV,UAAK,GAAW,EAAE,CAAC;QAE1B,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,YAAY;QACL,cAAS,GAAW,CAAC,CAAC;QAE7B,6BAA6B;QACtB,gBAAW,GAAW,CAAC,CAAC;QAE/B,mBAAmB;QACZ,cAAS,GAAa,EAAE,CAAC;QAEhC,yBAAyB;QAClB,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,yBAAyB;QAClB,mBAAc,GAAW,CAAC,CAAC;QAElC,kCAAkC;QAC3B,aAAQ,GAAoB,EAAE,CAAC;QAEtC,oCAAoC;QAC7B,oBAAe,GAAW,CAAC,CAAC;QAEnC,gCAAgC;QACzB,0BAAqB,GAAW,CAAC,CAAC;QAEzC,iCAAiC;QAC1B,eAAU,GAAW,CAAC,CAAC;QAK1B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAjDD,IAiDC;AAjDY,wCAAc;AAmD3B,gCAAgC;AAChC;IA6BI,wEAAwE;IACxE,oBAAmB,IAA0B;QA5B7C,qBAAqB;QACd,mBAAc,GAAqB,CAAC,CAAC;QAE5C,8EAA8E;QACvE,gBAAW,GAAW,CAAC,CAAC;QAE/B,0NAA0N;QACnN,cAAS,GAAa,EAAE,CAAC;QAEhC,uUAAuU;QAChU,gBAAW,GAAW,EAAE,CAAC;QAEhC,wHAAwH;QACjH,uBAAkB,GAAW,EAAE,CAAC;QAEvC,gHAAgH;QACzG,uBAAkB,GAAW,CAAC,CAAC;QAEtC,yMAAyM;QAClM,gCAA2B,GAAW,EAAE,CAAC;QAEhD,waAAwa;QACja,eAAU,GAAW,CAAC,CAAC;QAE9B,gRAAgR;QACzQ,wBAAmB,GAAY,KAAK,CAAC;QAKxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,gCAAU;AAoCvB,sBAAsB;AACtB,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAE3B,mBAAmB;IACnB,yDAAM,CAAA;IAEN,qBAAqB;IACrB,iEAAU,CAAA;IAEV,qBAAqB;IACrB,iEAAU,CAAA;IAEV,mBAAmB;IACnB,6DAAQ,CAAA;IAER,kBAAkB;IAClB,2DAAO,CAAA;IAEP,oBAAoB;IACpB,+DAAS,CAAA;AAEb,CAAC,EApBW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAoB9B;AAED,0BAA0B;AAC1B,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAE9B,eAAe;IACf,mEAAQ,CAAA;IAER,kBAAkB;IAClB,uEAAU,CAAA;IAEV,mBAAmB;IACnB,iEAAO,CAAA;AAEX,CAAC,EAXW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAWjC;AAED,sCAAsC;AACtC,IAAY,2BA0BX;AA1BD,WAAY,2BAA2B;IAEnC,yBAAyB;IACzB,+FAAiB,CAAA;IAEjB,qBAAqB;IACrB,iFAAU,CAAA;IAEV,eAAe;IACf,6EAAQ,CAAA;IAER,cAAc;IACd,2EAAO,CAAA;IAEP,eAAe;IACf,6EAAQ,CAAA;IAER,aAAa;IACb,yEAAM,CAAA;IAEN,cAAc;IACd,2EAAO,CAAA;IAEP,mBAAmB;IACnB,qFAAY,CAAA;AAEhB,CAAC,EA1BW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QA0BtC;AAED,uBAAuB;AACvB;IAoBI,iEAAiE;IACjE,sBAAmB,IAA4B;QAnB/C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,2DAA2D;QACpD,yBAAoB,GAAY,KAAK,CAAC;QAE7C,6DAA6D;QACtD,8BAAyB,GAAwB,CAAC,CAAC;QAE1D,2DAA2D;QACpD,uBAAkB,GAAY,KAAK,CAAC;QAE3C,6DAA6D;QACtD,4BAAuB,GAAwB,CAAC,CAAC;QAExD,oLAAoL;QAC7K,wBAAmB,GAA6B,EAAE,CAAC;QAKtD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,mBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,oCAAY;AA2BzB,4BAA4B;AAC5B;IAiBI,sEAAsE;IACtE,sBAAmB,IAA4B;QAhB/C,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,yBAAyB;QAClB,yBAAoB,GAAW,EAAE,CAAC;QAEzC,yBAAyB;QAClB,mBAAc,GAAW,CAAC,CAAC;QAElC,iBAAiB;QACV,qBAAgB,GAAW,EAAE,CAAC;QAErC,4BAA4B;QACrB,4BAAuB,GAAW,CAAC,CAAC;QAKvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,mBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,oCAAY;AAwBzB,wBAAwB;AACxB;IA0EI,qEAAqE;IACrE,yBAAmB,IAA+B;QAzElD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,aAAa;QACN,gBAAW,GAAY,KAAK,CAAC;QAEpC,kBAAkB;QACX,gBAAW,GAAkB,CAAC,CAAC;QAEtC,yBAAyB;QAClB,oBAAe,GAAW,CAAC,CAAC;QAEnC,uCAAuC;QAChC,0BAAqB,GAAW,CAAC,CAAC;QAEzC,uCAAuC;QAChC,0BAAqB,GAAW,CAAC,CAAC;QAEzC,oCAAoC;QAC7B,uBAAkB,GAAW,CAAC,CAAC;QAEtC,sBAAsB;QACf,iBAAY,GAAW,CAAC,CAAC;QAEhC,uBAAuB;QAChB,kBAAa,GAAW,CAAC,CAAC;QAEjC,kCAAkC;QAC3B,qBAAgB,GAAW,CAAC,CAAC;QAEpC,iCAAiC;QAC1B,oBAAe,GAAW,CAAC,CAAC;QAEnC,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,mCAAmC;QAC5B,0BAAqB,GAAY,KAAK,CAAC;QAE9C,uCAAuC;QAChC,oBAAe,GAAS,IAAI,IAAI,EAAE,CAAC;QAE1C,+BAA+B;QACxB,qBAAgB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE3C,6BAA6B;QACtB,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,uBAAuB;QAChB,iBAAY,GAAW,CAAC,CAAC;QAK5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AA/ED,IA+EC;AA/EY,0CAAe;AAiF5B,gDAAgD;AAChD;IAiBI,8FAA8F;IAC9F,0BAAmB,IAAgC;QAhBnD,oIAAoI;QAC7H,kBAAa,GAAY,KAAK,CAAC;QAEtC,4JAA4J;QACrJ,oBAAe,GAAY,KAAK,CAAC;QAExC,sQAAsQ;QAC/P,uBAAkB,GAAY,KAAK,CAAC;QAE3C,2ZAA2Z;QACpZ,qBAAgB,GAAW,EAAE,CAAC;QAErC,qSAAqS;QAC9R,wBAAmB,GAAW,EAAE,CAAC;QAKpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,4CAAgB;AAwB7B,0BAA0B;AAC1B,IAAY,uBAQX;AARD,WAAY,uBAAuB;IAE/B,UAAU;IACV,mEAAO,CAAA;IAEP,UAAU;IACV,mEAAO,CAAA;AAEX,CAAC,EARW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAQlC;AAED,0BAA0B;AAC1B;IAiBI,kEAAkE;IAClE,oBAAmB,IAA0B;QAhB7C,oDAAoD;QAC7C,wBAAmB,GAAY,KAAK,CAAC;QAE5C,6DAA6D;QACtD,wBAAmB,GAAW,EAAE,CAAC;QAExC,iDAAiD;QAC1C,wBAAmB,GAAW,CAAC,CAAC;QAEvC,oBAAoB;QACb,4BAAuB,GAA4B,CAAC,CAAC;QAE5D,+CAA+C;QACxC,4BAAuB,GAAW,CAAC,CAAC;QAKvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,gCAAU;AAwBvB,kCAAkC;AAClC,IAAY,yBAoBX;AApBD,WAAY,yBAAyB;IAEjC,iBAAiB;IACjB,qFAAc,CAAA;IAEd,kBAAkB;IAClB,uFAAe,CAAA;IAEf,iCAAiC;IACjC,yEAAQ,CAAA;IAER,0BAA0B;IAC1B,uFAAe,CAAA;IAEf,oBAAoB;IACpB,2EAAS,CAAA;IAET,iBAAiB;IACjB,yEAAQ,CAAA;AAEZ,CAAC,EApBW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAoBpC;AAED,yBAAyB;AACzB;IAuHI,uEAAuE;IACvE,0BAAmB,IAAgC;QAtHnD,2BAA2B;QACpB,mBAAc,GAAW,EAAE,CAAC;QAEnC,yCAAyC;QAClC,oBAAe,GAAW,EAAE,CAAC;QAEpC,yDAAyD;QAClD,gBAAW,GAAY,KAAK,CAAC;QAEpC,6DAA6D;QACtD,mBAAc,GAAY,KAAK,CAAC;QAEvC,yBAAyB;QAClB,sBAAiB,GAA8B,CAAC,CAAC;QAExD,sCAAsC;QAC/B,mBAAc,GAAW,EAAE,CAAC;QAEnC,oCAAoC;QAC7B,mBAAc,GAAW,CAAC,CAAC;QAElC,0BAA0B;QACnB,0BAAqB,GAAW,EAAE,CAAC;QAE1C,6BAA6B;QACtB,yBAAoB,GAAW,CAAC,CAAC;QAExC,kCAAkC;QAC3B,2BAAsB,GAAW,CAAC,CAAC;QAE1C,iCAAiC;QAC1B,gBAAW,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEpD,yBAAyB;QAClB,gBAAW,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEpD,4BAA4B;QACrB,iBAAY,GAAS,IAAI,IAAI,EAAE,CAAC;QAEvC,yDAAyD;QAClD,sCAAiC,GAAS,IAAI,IAAI,EAAE,CAAC;QAE5D,oDAAoD;QAC7C,sCAAiC,GAAS,IAAI,IAAI,EAAE,CAAC;QAE5D,yDAAyD;QAClD,kCAA6B,GAAW,CAAC,CAAC;QAEjD,sBAAsB;QACf,wBAAmB,GAAY,KAAK,CAAC;QAE5C,iBAAiB;QACV,aAAQ,GAAY,KAAK,CAAC;QAEjC,uDAAuD;QAChD,0BAAqB,GAAW,CAAC,CAAC;QAEzC,mDAAmD;QAC5C,0BAAqB,GAAW,CAAC,CAAC;QAEzC,mDAAmD;QAC5C,gCAA2B,GAAW,CAAC,CAAC;QAE/C,oDAAoD;QAC7C,kCAA6B,GAAW,CAAC,CAAC;QAEjD,wBAAwB;QACjB,oBAAe,GAAY,KAAK,CAAC;QAExC,4BAA4B;QACrB,mBAAc,GAAW,EAAE,CAAC;QAEnC,yBAAyB;QAClB,qBAAgB,GAAY,KAAK,CAAC;QAEzC,+CAA+C;QACxC,uBAAkB,GAAY,KAAK,CAAC;QAE3C,iDAAiD;QAC1C,yBAAoB,GAAW,EAAE,CAAC;QAEzC,sCAAsC;QAC/B,kCAA6B,GAAY,KAAK,CAAC;QAEtD,kDAAkD;QAC3C,gCAA2B,GAAY,KAAK,CAAC;QAEpD,mBAAmB;QACZ,oBAAe,GAAW,EAAE,CAAC;QAEpC,sBAAsB;QACf,uBAAkB,GAAW,EAAE,CAAC;QAEvC,kBAAkB;QACX,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,kCAAkC;QAC3B,sBAAiB,GAAW,CAAC,CAAC;QAErC,+BAA+B;QACxB,sBAAiB,GAAW,CAAC,CAAC;QAErC,mDAAmD;QAC5C,0BAAqB,GAAW,CAAC,CAAC;QAEzC,gDAAgD;QACzC,0BAAqB,GAAW,CAAC,CAAC;QAEzC,sDAAsD;QAC/C,sBAAiB,GAAY,KAAK,CAAC;QAE1C,uDAAuD;QAChD,uBAAkB,GAAY,KAAK,CAAC;QAE3C,cAAc;QACP,eAAU,GAAW,CAAC,CAAC;QAK1B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AA5HD,IA4HC;AA5HY,4CAAgB;AA8H7B,kCAAkC;AAClC;IAWI,oFAAoF;IACpF,8BAAmB,IAAoC;QAVvD,0FAA0F;QACnF,uBAAkB,GAAY,KAAK,CAAC;QAE3C,mPAAmP;QAC5O,wBAAmB,GAAW,EAAE,CAAC;QAExC,oGAAoG;QAC7F,oBAAe,GAAY,KAAK,CAAC;QAKpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,2BAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,oDAAoB;AAkBjC,0BAA0B;AAC1B;IA8DI,mEAAmE;IACnE,qBAAmB,IAA2B;QA7D9C,8BAA8B;QACvB,mBAAc,GAAW,EAAE,CAAC;QAEnC,kBAAkB;QACX,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,iBAAiB;QACV,UAAK,GAAW,EAAE,CAAC;QAE1B,kBAAkB;QACX,YAAO,GAAW,EAAE,CAAC;QAE5B,2CAA2C;QACpC,gBAAW,GAAY,KAAK,CAAC;QAEpC,iCAAiC;QAC1B,YAAO,GAAW,CAAC,CAAC;QAE3B,iCAAiC;QAC1B,sBAAiB,GAAW,CAAC,CAAC;QAErC,iCAAiC;QAC1B,sBAAiB,GAAW,CAAC,CAAC;QAErC,kCAAkC;QAC3B,iBAAY,GAAY,KAAK,CAAC;QAErC,4GAA4G;QACrG,wBAAmB,GAAW,EAAE,CAAC;QAExC,2GAA2G;QACpG,sBAAiB,GAAW,EAAE,CAAC;QAEtC,uFAAuF;QAChF,sBAAiB,GAAW,EAAE,CAAC;QAEtC,yFAAyF;QAClF,2BAAsB,GAAW,CAAC,CAAC;QAE1C,kUAAkU;QAC3T,0BAAqB,GAAW,EAAE,CAAC;QAE1C,oUAAoU;QAC7T,4BAAuB,GAAW,EAAE,CAAC;QAE5C,sUAAsU;QAC/T,6BAAwB,GAAW,EAAE,CAAC;QAE7C,0IAA0I;QACnI,uBAAkB,GAAW,EAAE,CAAC;QAEvC,2MAA2M;QACpM,iBAAY,GAAY,KAAK,CAAC;QAErC,uDAAuD;QAChD,6BAAwB,GAAY,KAAK,CAAC;QAEjD,+uCAA+uC;QACxuC,uBAAkB,GAAW,EAAE,CAAC;QAKnC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,kBAAC;AAAD,CAAC,AAnED,IAmEC;AAnEY,kCAAW;AAqExB,qBAAqB;AACrB;IA0BI,kEAAkE;IAClE,yBAAmB,IAA+B;QAzBlD,uBAAuB;QAChB,gBAAW,GAAW,EAAE,CAAC;QAEhC,6BAA6B;QACtB,uBAAkB,GAAW,CAAC,CAAC;QAEtC,6BAA6B;QACtB,uBAAkB,GAAW,CAAC,CAAC;QAEtC,8BAA8B;QACvB,wBAAmB,GAAW,CAAC,CAAC;QAEvC,6BAA6B;QACtB,uBAAkB,GAAW,CAAC,CAAC;QAEtC,6BAA6B;QACtB,uBAAkB,GAAW,CAAC,CAAC;QAEtC,sDAAsD;QAC/C,sBAAiB,GAAY,KAAK,CAAC;QAE1C,sDAAsD;QAC/C,qBAAgB,GAAY,KAAK,CAAC;QAKrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,sBAAC;AAAD,CAAC,AA/BD,IA+BC;AA/BY,0CAAe;AAiC5B,eAAe;AACf;IAQI,0DAA0D;IAC1D,uBAAmB,IAA6B;QAPhD,kCAAkC;QAC3B,aAAQ,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEjD,kCAAkC;QAC3B,YAAO,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAK5C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa;AAe1B,0BAA0B;AAC1B;IAKI,iEAAiE;IACjE,mBAAmB,IAAyB;QAJ5C,qBAAqB;QACd,eAAU,GAAW,EAAE,CAAC;QAK3B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,gBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,8BAAS;AAYtB,yBAAyB;AACzB,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAExB,yBAAyB;IACzB,mEAAc,CAAA;IAEd,6BAA6B;IAC7B,2EAAkB,CAAA;IAElB,yBAAyB;IACzB,mEAAc,CAAA;AAElB,CAAC,EAXW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAW3B;AAED,4BAA4B;AAC5B,IAAY,YAgIX;AAhID,WAAY,YAAY;IAEpB,iBAAiB;IACjB,8DAAiB,CAAA;IAEjB,iBAAiB;IACjB,8DAAiB,CAAA;IAEjB,iBAAiB;IACjB,8DAAiB,CAAA;IAEjB,wBAAwB;IACxB,wEAAsB,CAAA;IAEtB,iCAAiC;IACjC,0FAA+B,CAAA;IAE/B,4BAA4B;IAC5B,gFAA0B,CAAA;IAE1B,gDAAgD;IAChD,sGAAqC,CAAA;IAErC,qCAAqC;IACrC,kGAAmC,CAAA;IAEnC,4BAA4B;IAC5B,wFAA8B,CAAA;IAE9B,gCAAgC;IAChC,0EAAuB,CAAA;IAEvB,gCAAgC;IAChC,4FAAgC,CAAA;IAEhC,0BAA0B;IAC1B,gFAA0B,CAAA;IAE1B,mCAAmC;IACnC,kGAAmC,CAAA;IAEnC,qCAAqC;IACrC,sGAAqC,CAAA;IAErC,6BAA6B;IAC7B,wFAA8B,CAAA;IAE9B,iCAAiC;IACjC,0EAAuB,CAAA;IAEvB,8BAA8B;IAC9B,wEAAsB,CAAA;IAEtB,8BAA8B;IAC9B,wFAA8B,CAAA;IAE9B,sCAAsC;IACtC,0EAAuB,CAAA;IAEvB,2CAA2C;IAC3C,oFAA4B,CAAA;IAE5B,6CAA6C;IAC7C,wFAA8B,CAAA;IAE9B,6CAA6C;IAC7C,wFAA8B,CAAA;IAE9B,6BAA6B;IAC7B,wFAA8B,CAAA;IAE9B,iCAAiC;IACjC,0EAAuB,CAAA;IAEvB,oBAAoB;IACpB,oGAAoC,CAAA;IAEpC,0BAA0B;IAC1B,wFAA8B,CAAA;IAE9B,gBAAgB;IAChB,4DAAgB,CAAA;IAEhB,6BAA6B;IAC7B,sFAA6B,CAAA;IAE7B,gBAAgB;IAChB,4DAAgB,CAAA;IAEhB,0BAA0B;IAC1B,0EAAuB,CAAA;IAEvB,kBAAkB;IAClB,8DAAiB,CAAA;IAEjB,6BAA6B;IAC7B,4EAAwB,CAAA;IAExB,iBAAiB;IACjB,8DAAiB,CAAA;IAEjB,wBAAwB;IACxB,4EAAwB,CAAA;IAExB,0BAA0B;IAC1B,8DAAiB,CAAA;IAEjB,iCAAiC;IACjC,4EAAwB,CAAA;IAExB,mBAAmB;IACnB,kEAAmB,CAAA;IAEnB,YAAY;IACZ,oDAAY,CAAA;IAEZ,cAAc;IACd,wDAAc,CAAA;IAEd,aAAa;IACb,sDAAa,CAAA;IAEb,UAAU;IACV,gDAAU,CAAA;IAEV,cAAc;IACd,wDAAc,CAAA;AAElB,CAAC,EAhIW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAgIvB;AAED,6BAA6B;AAC7B;IAqDI,2EAA2E;IAC3E,0BAAmB,IAAgC;QApDnD,0BAA0B;QACnB,0BAAqB,GAAW,EAAE,CAAC;QAE1C,4BAA4B;QACrB,4BAAuB,GAAW,EAAE,CAAC;QAE5C,sCAAsC;QAC/B,8BAAyB,GAAW,EAAE,CAAC;QAE9C,mCAAmC;QAC5B,qBAAgB,GAAW,CAAC,CAAC;QAEpC,wCAAwC;QACjC,uBAAkB,GAAW,CAAC,CAAC;QAEtC,uBAAuB;QAChB,uBAAkB,GAAW,EAAE,CAAC;QAEvC,qBAAqB;QACd,mBAAc,GAAqB,CAAC,CAAC;QAE5C,wCAAwC;QACjC,uBAAkB,GAAS,IAAI,IAAI,EAAE,CAAC;QAE7C,kBAAkB;QACX,yBAAoB,GAAW,EAAE,CAAC;QAEzC,cAAc;QACP,eAAU,GAAiB,CAAC,CAAC;QAEpC,0BAA0B;QACnB,sBAAiB,GAAW,CAAC,CAAC;QAErC,qBAAqB;QACd,qBAAgB,GAAW,EAAE,CAAC;QAErC,sBAAsB;QACf,sBAAiB,GAAW,EAAE,CAAC;QAEtC,qBAAqB;QACd,qBAAgB,GAAW,EAAE,CAAC;QAErC,iBAAiB;QACV,kBAAa,GAAW,EAAE,CAAC;QAElC,kBAAkB;QACX,mBAAc,GAAW,EAAE,CAAC;QAEnC,qBAAqB;QACd,sBAAiB,GAAW,EAAE,CAAC;QAKlC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AA1DD,IA0DC;AA1DY,4CAAgB;AA4D7B,oBAAoB;AACpB;IA8GI,oEAAoE;IACpE,4BAAmB,IAAkC;QA7GrD,qBAAqB;QACd,mBAAc,GAAqB,CAAC,CAAC;QAE5C,sCAAsC;QAC/B,0BAAqB,GAAW,CAAC,CAAC;QAEzC,sCAAsC;QAC/B,+BAA0B,GAAW,CAAC,CAAC;QAE9C,uCAAuC;QAChC,gCAA2B,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,oBAAe,GAAW,CAAC,CAAC;QAEnC,gCAAgC;QACzB,yBAAoB,GAAW,CAAC,CAAC;QAExC,4BAA4B;QACrB,qBAAgB,GAAW,CAAC,CAAC;QAEpC,6BAA6B;QACtB,sBAAiB,GAAW,CAAC,CAAC;QAErC,+BAA+B;QACxB,yBAAoB,GAAW,CAAC,CAAC;QAExC,mCAAmC;QAC5B,yBAAoB,GAAW,CAAC,CAAC;QAExC,oCAAoC;QAC7B,0BAAqB,GAAW,CAAC,CAAC;QAEzC,kEAAkE;QAC3D,qBAAgB,GAAW,CAAC,CAAC;QAEpC,iEAAiE;QAC1D,oBAAe,GAAW,CAAC,CAAC;QAEnC,sDAAsD;QAC/C,iBAAY,GAAW,CAAC,CAAC;QAEhC,uDAAuD;QAChD,kBAAa,GAAW,CAAC,CAAC;QAEjC,+EAA+E;QACxE,+BAA0B,GAAW,CAAC,CAAC;QAE9C,+EAA+E;QACxE,+BAA0B,GAAW,CAAC,CAAC;QAE9C,4FAA4F;QACrF,oCAA+B,GAAW,CAAC,CAAC;QAEnD,6FAA6F;QACtF,oCAA+B,GAAW,CAAC,CAAC;QAEnD,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,yCAAyC;QAClC,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,6BAA6B;QACtB,KAAC,yBAAyB,CAAC,GAAW,CAAC,CAAC;QAE/C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,2BAA2B;QACpB,KAAC,uBAAuB,CAAC,GAAW,CAAC,CAAC;QAE7C,mBAAmB;QACZ,mBAAc,GAAS,IAAI,IAAI,EAAE,CAAC;QAEzC,iDAAiD;QAC1C,oBAAe,GAAW,CAAC,CAAC;QAEnC,+BAA+B;QACxB,iBAAY,GAAS,IAAI,IAAI,EAAE,CAAC;QAEvC,uCAAuC;QAChC,oBAAe,GAAW,CAAC,CAAC;QAEnC,sCAAsC;QAC/B,mBAAc,GAAW,CAAC,CAAC;QAElC,sCAAsC;QAC/B,mBAAc,GAAW,CAAC,CAAC;QAElC,qCAAqC;QAC9B,kBAAa,GAAW,CAAC,CAAC;QAEjC,oCAAoC;QAC7B,iBAAY,GAAW,CAAC,CAAC;QAEhC,oCAAoC;QAC7B,iBAAY,GAAW,CAAC,CAAC;QAK5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAnHD,IAmHC;AAnHY,gDAAkB;AAqH/B,yBAAyB;AACzB;IA2JI,0EAA0E;IAC1E,6BAAmB,IAAmC;QA1JtD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,uBAAuB;QAChB,aAAQ,GAAW,EAAE,CAAC;QAE7B,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,2DAA2D;QACpD,qBAAgB,GAAW,EAAE,CAAC;QAErC,iBAAiB;QACV,kBAAa,GAAW,EAAE,CAAC;QAElC,yBAAyB;QAClB,kBAAa,GAAY,KAAK,CAAC;QAEtC,wBAAwB;QACjB,yBAAoB,GAAW,EAAE,CAAC;QAEzC,uBAAuB;QAChB,qCAAgC,GAAW,EAAE,CAAC;QAErD,qBAAqB;QACd,gBAAW,GAAY,KAAK,CAAC;QAEpC,qBAAqB;QACd,mBAAc,GAAY,KAAK,CAAC;QAEvC,kCAAkC;QAC3B,sBAAiB,GAA8B,CAAC,CAAC;QAExD,kBAAkB;QACX,mBAAc,GAAW,EAAE,CAAC;QAEnC,gCAAgC;QACzB,mBAAc,GAAW,CAAC,CAAC;QAElC,0BAA0B;QACnB,0BAAqB,GAAW,EAAE,CAAC;QAE1C,6BAA6B;QACtB,yBAAoB,GAAW,CAAC,CAAC;QAExC,kCAAkC;QAC3B,2BAAsB,GAAW,CAAC,CAAC;QAE1C,4BAA4B;QACrB,iBAAY,GAAS,IAAI,IAAI,EAAE,CAAC;QAEvC,yDAAyD;QAClD,sCAAiC,GAAS,IAAI,IAAI,EAAE,CAAC;QAE5D,oDAAoD;QAC7C,sCAAiC,GAAS,IAAI,IAAI,EAAE,CAAC;QAE5D,yDAAyD;QAClD,kCAA6B,GAAW,CAAC,CAAC;QAEjD,sBAAsB;QACf,wBAAmB,GAAY,KAAK,CAAC;QAE5C,iBAAiB;QACV,aAAQ,GAAY,KAAK,CAAC;QAEjC,uDAAuD;QAChD,0BAAqB,GAAW,CAAC,CAAC;QAEzC,mDAAmD;QAC5C,0BAAqB,GAAW,CAAC,CAAC;QAEzC,+CAA+C;QACxC,gCAA2B,GAAW,CAAC,CAAC;QAE/C,gDAAgD;QACzC,kCAA6B,GAAW,CAAC,CAAC;QAEjD,wBAAwB;QACjB,oBAAe,GAAY,KAAK,CAAC;QAExC,4BAA4B;QACrB,mBAAc,GAAW,EAAE,CAAC;QAEnC,yBAAyB;QAClB,qBAAgB,GAAY,KAAK,CAAC;QAEzC,uBAAuB;QAChB,uBAAkB,GAAY,KAAK,CAAC;QAE3C,iDAAiD;QAC1C,yBAAoB,GAAW,EAAE,CAAC;QAEzC,sCAAsC;QAC/B,kCAA6B,GAAY,KAAK,CAAC;QAEtD,0CAA0C;QACnC,gCAA2B,GAAY,KAAK,CAAC;QAEpD,uBAAuB;QAChB,oBAAe,GAAW,EAAE,CAAC;QAEpC,sBAAsB;QACf,uBAAkB,GAAW,EAAE,CAAC;QAEvC,kBAAkB;QACX,mBAAc,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAEvD,kCAAkC;QAC3B,sBAAiB,GAAW,CAAC,CAAC;QAErC,+BAA+B;QACxB,sBAAiB,GAAW,CAAC,CAAC;QAErC,mDAAmD;QAC5C,0BAAqB,GAAW,CAAC,CAAC;QAEzC,gDAAgD;QACzC,0BAAqB,GAAW,CAAC,CAAC;QAEzC,qBAAqB;QACd,sBAAiB,GAAY,KAAK,CAAC;QAE1C,sBAAsB;QACf,uBAAkB,GAAY,KAAK,CAAC;QAE3C,cAAc;QACP,eAAU,GAAW,CAAC,CAAC;QAE9B,0BAA0B;QACnB,0BAAqB,GAAW,EAAE,CAAC;QAE1C,qBAAqB;QACd,yBAAoB,GAAW,CAAC,CAAC;QAExC,0BAA0B;QACnB,2BAAsB,GAAW,CAAC,CAAC;QAE1C,qBAAqB;QACd,qBAAgB,GAAW,EAAE,CAAC;QAErC,wBAAwB;QACjB,oBAAe,GAAW,EAAE,CAAC;QAEpC,2BAA2B;QACpB,0BAAqB,GAAW,EAAE,CAAC;QAE1C,uBAAuB;QAChB,uBAAkB,GAAW,EAAE,CAAC;QAEvC,gBAAgB;QACT,iBAAY,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAKjD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,0BAAC;AAAD,CAAC,AAhKD,IAgKC;AAhKY,kDAAmB;AAkKhC,+BAA+B;AAC/B;IAQI,kFAAkF;IAClF,+BAAmB,IAAqC;QAPxD,6DAA6D;QACtD,6BAAwB,GAAY,KAAK,CAAC;QAEjD,qDAAqD;QAC9C,4BAAuB,GAAY,KAAK,CAAC;QAK5C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,4BAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sDAAqB;AAelC,2BAA2B;AAC3B,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAEzB,wBAAwB;IACxB,yDAAQ,CAAA;IAER,sBAAsB;IACtB,mEAAa,CAAA;IAEb,0CAA0C;IAC1C,+FAA2B,CAAA;IAE3B,mDAAmD;IACnD,qFAAsB,CAAA;AAE1B,CAAC,EAdW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAc5B;AAED,2BAA2B;AAC3B;IAWI,yEAAyE;IACzE,0BAAmB,IAAgC;QAVnD,0CAA0C;QACnC,iBAAY,GAAsB,CAAC,CAAC;QAE3C,+DAA+D;QACxD,iBAAY,GAAW,EAAE,CAAC;QAEjC,mDAAmD;QAC5C,aAAQ,GAAW,CAAC,CAAC;QAKxB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,4CAAgB;AAkB7B,6BAA6B;AAC7B;IAuBI,uEAAuE;IACvE,sBAAmB,IAA4B;QAtB/C,kBAAkB;QACX,mBAAc,GAAY,KAAK,CAAC;QAEvC,cAAc;QACP,gBAAW,GAAW,EAAE,CAAC;QAEhC,iBAAiB;QACV,cAAS,GAAW,EAAE,CAAC;QAE9B,kBAAkB;QACX,cAAS,GAAW,EAAE,CAAC;QAE9B,oBAAoB;QACb,eAAU,GAAY,KAAK,CAAC;QAEnC,2BAA2B;QACpB,sBAAiB,GAAY,KAAK,CAAC;QAE1C,mCAAmC;QAC5B,oBAAe,GAAY,KAAK,CAAC;QAKpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,mBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,oCAAY;AA8BzB,sBAAsB;AACtB;IAcI,qEAAqE;IACrE,2BAAmB,IAAiC;QAbpD,kBAAkB;QACX,mBAAc,GAAW,EAAE,CAAC;QAEnC,gBAAgB;QACT,iBAAY,GAAW,EAAE,CAAC;QAEjC,qLAAqL;QAC9K,eAAU,GAAW,CAAC,CAAC;QAE9B,sBAAsB;QACf,eAAU,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAK/C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,8CAAiB;AAqB9B,kBAAkB;AAClB;IAWI,gEAAgE;IAChE,0BAAmB,IAAgC;QAVnD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,6CAA6C;QACtC,uBAAkB,GAAW,EAAE,CAAC;QAEvC,6CAA6C;QACtC,uBAAkB,GAAW,EAAE,CAAC;QAKnC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,uBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,4CAAgB;AAkB7B,gCAAgC;AAChC;IAQI,gFAAgF;IAChF,4BAAmB,IAAkC;QAPrD,2BAA2B;QACpB,gBAAW,GAAW,EAAE,CAAC;QAEhC,4BAA4B;QACrB,gBAAW,GAAY,KAAK,CAAC;QAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,yBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,gDAAkB;AAe/B,mBAAmB;AACnB;IAKI,kEAAkE;IAClE,2BAAmB,IAAiC;QAJpD,6BAA6B;QACtB,0BAAqB,GAAW,EAAE,CAAC;QAKtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACL,wBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,8CAAiB;AAgB9B,wBAAwB;AAExB,wEAAwE;AACxE;IAOI,wBAAY,MAAmB,EAAE,KAAiB,EAAE,EAAe;QAAvD,uBAAA,EAAA,WAAmB;QAAE,sBAAA,EAAA,YAAiB;QAAE,mBAAA,EAAA,OAAe;QAL5D,YAAO,GAAW,KAAK,CAAC;QAO3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,wCAAc;AAe3B,sEAAsE;AACtE;IAMI,sBAAY,IAAgB,EAAE,OAAoB,EAAE,IAAgB;QAAxD,qBAAA,EAAA,QAAgB;QAAE,wBAAA,EAAA,YAAoB;QAAE,qBAAA,EAAA,WAAgB;QAEhE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IACL,mBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,oCAAY;AAczB,4CAA4C;AAC5C;IAAA;QAEW,YAAO,GAAW,KAAK,CAAC;QACxB,WAAM,GAAY,IAAK,CAAC;QACxB,UAAK,GAAiB,IAAK,CAAC;QAC5B,OAAE,GAAW,EAAE,CAAC;IAC3B,CAAC;IAAD,sBAAC;AAAD,CAAC,AAND,IAMC;AANY,0CAAe;AAQ5B,uEAAuE;AACvE;IA4CI;;;;;OAKG;IACH,uBAAY,GAAW,EAAE,OAAmC,EAAE,eAAwB,EAAE,gDAAyD;QAE7I,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,eAAe,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,uCAAuC,GAAG,gDAAgD,CAAC;IAC3G,CAAC;IAxDD,8DAA8D;IAChD,0BAAY,GAA1B,UAA2B,GAAQ;QAE/B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EACrB,UAAC,GAAG,EAAE,KAAK;YAEP,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EACxB;gBACI,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;aACpC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC,EACC,CAAC,CAAC,CAAC;IACb,CAAC;IAED,0DAA0D;IAC5C,0BAAY,GAA1B,UAA2B,GAAW;QAElC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EACjB,UAAC,GAAG,EAAE,KAAK;YAEP,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EACxB;gBACI,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;aACpC;iBACI,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC5B;gBACI,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;aAC1B;YACD,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC,CAAC;IACX,CAAC;IA2BD;;;;OAIG;IACU,yCAAiB,GAA9B,UAA+B,WAAmB,EAAE,KAAU;;;;;;wBAEtD,EAAE,GAAG,GAAG,CAAC;wBAET,GAAG,GAAG,IAAI,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;wBAEjD,UAAU,GAAG,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;wBAEjD,IAAI,UAAU,EACd;4BACI,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;4BACxC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;4BACxB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;yBAC3C;wBAEmB,qBAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EACtE,UAAU,EAAE,kBAAkB,CAAC,EAAA;;wBAD/B,aAAa,GAAG,SACe;wBAE/B,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC;wBAEpC,IAAI,UAAU,EACd;4BACI,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;4BACzC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;4BACxB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;yBAC5C;wBAED,sBAAO,UAAU,EAAC;;;;KACrB;IAED;;;;OAIG;IACU,iCAAS,GAAtB,UAAgC,WAAmB,EAAE,KAAU;;;;;4BAE1C,qBAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,KAAK,CAAC,EAAA;;wBAA7D,UAAU,GAAG,SAAgD;wBAE7D,GAAG,GAA6B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;wBAE3D,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,EAChC;4BACI,MAAM,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;yBACzC;wBAED,sBAAO,GAAG,CAAC,MAAM,EAAC;;;;KACrB;IACL,oBAAC;AAAD,CAAC,AAjHD,IAiHC;AAjHY,sCAAa;AAmH1B,+BAA+B;AAC/B;IAAsC,oCAAK;IAIvC,0BAAY,KAAmB;QAA/B,YAEI,kBAAM,UAAQ,KAAK,CAAC,IAAI,kBAAa,KAAK,CAAC,OAAS,CAAC,SAExD;QADG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IACL,uBAAC;AAAD,CAAC,AATD,CAAsC,KAAK,GAS1C;AATY,4CAAgB;AAW7B,kCAAkC;AAClC;IAAyC,uCAAK;IAE1C,6BAAY,OAAe;eAEvB,kBAAM,OAAO,CAAC;IAClB,CAAC;IACL,0BAAC;AAAD,CAAC,AAND,CAAyC,KAAK,GAM7C;AANY,kDAAmB;AAQhC,iCAAiC;AACjC;IAAA;QAEW,SAAI,GAAW,EAAE,CAAC;IAC7B,CAAC;IAAD,yBAAC;AAAD,CAAC,AAHD,IAGC;AAHY,gDAAkB;AAK/B,wEAAwE;AACxE;IAAA;QAEW,iBAAY,GAAW,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;QACrC,mBAAc,GAAY,IAAI,CAAC;QAC/B,4CAAuC,GAAY,KAAK,CAAC;IA2GpE,CAAC;IAzGG,oJAAoJ;IACvI,8BAAS,GAAtB,UAAuB,GAAW,EAAE,OAAmC,EACnE,QAAgB,EAAE,cAAsB;;;;;;wBAExC,IAAI,UAAU,EACd;4BACI,sBAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAC;yBACxE;wBAEG,iBAAiB,GAAG,IAAI,OAAO,EAAE,CAAC;wBAEtC,WAAqC,EAApB,KAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAApB,cAAoB,EAApB,IAAoB,EACrC;4BADK;4BAED,iBAAiB,CAAC,MAAM,CAAC,MAAI,EAAE,OAAO,CAAC,MAAI,CAAC,CAAC,CAAC;yBACjD;wBAEG,UAAU,GACd;4BACI,IAAI,EAAE,MAAM;4BACZ,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;4BACvD,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAU;4BACjB,SAAS,EAAE,IAAI;4BACf,QAAQ,EAAE,QAAQ;4BAClB,IAAI,EAAE,QAAQ;yBACjB,CAAC;wBAEmB,qBAAM,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,EAAA;;wBAA7C,cAAc,GAAG,SAA4B;wBAEjD,IAAI,cAAc,CAAC,EAAE,KAAK,KAAK,EAC/B;4BACI,MAAM,IAAI,mBAAmB,CAAC,cAAc,GAAG,cAAc,CAAC,MAAM,GAAG,GAAG,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;yBAC3G;wBAEG,GAAG,GAAG,IAAI,kBAAkB,EAAE,CAAC;wBAEnC,KAAA,GAAG,CAAA;wBAAQ,qBAAM,cAAc,CAAC,IAAI,EAAE,EAAA;;wBAAtC,GAAI,IAAI,GAAG,SAA2B,CAAC;wBAEvC,sBAAO,GAAG,EAAC;;;;KACd;IAED,+BAA+B;IACxB,qCAAgB,GAAvB,UAAwB,GAAW,EAAE,OAAmC,EACpE,QAAgB,EAAE,cAAsB;QAExC,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAM,cAAc,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,IAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAEhC,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEnC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAE7D,IAAI,OAAO,GACX;YACI,IAAI,EAAE,MAAM,CAAC,QAAQ;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,kBAAkB,EAAE,IAAI,CAAC,uCAAuC;YAChE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,IAAI,CAAC,YAAY;YAC1B,KAAK,EAAE,cAAc;SACxB,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO,EAAE,MAAM;YAExC,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,UAAC,GAAQ;gBAEtC,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAC1B;oBACI,MAAM,CAAC,IAAI,mBAAmB,CAAC,cAAc,GAAG,GAAG,CAAC,UAAU,GAAG,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;iBAC9F;gBAED,IAAI,QAAQ,GAAW,EAAE,CAAC;gBAE1B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,UAAC,IAAS;oBAErB,QAAQ,IAAI,IAAI,CAAC;gBACrB,CAAC,CAAC,CAAC;gBAEH,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE;oBAEV,IAAI,GAAG,GAAG,IAAI,kBAAkB,EAAE,CAAC;oBAEnC,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC;oBAEpB,OAAO,CAAC,GAAG,CAAC,CAAC;gBACjB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,GAAQ;gBAEpB,MAAM,GAAG,CAAC;YACd,CAAC,CACA,CAAC;YAEF,KAAiB,UAAoB,EAApB,KAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAApB,cAAoB,EAApB,IAAoB,EACrC;gBADK,IAAI,MAAI,SAAA;gBAET,GAAG,CAAC,SAAS,CAAC,MAAI,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;aACrE;YACD,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;YAC9C,GAAG,CAAC,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC7D,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACpB,GAAG,CAAC,GAAG,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC;IACL,iBAAC;AAAD,CAAC,AA/GD,IA+GC;AA/GY,gCAAU;AAoHvB,qGAAqG;AACrG,uBAAuB;AACvB,oBAAoB;AACpB,+EAA+E;AAC/E,+EAA+E;AAC/E,mFAAmF;AACnF,8EAA8E;AAC9E,wEAAwE;AACxE,2DAA2D;AAC3D,6EAA6E;AAC7E,0DAA0D;AAC1D,6EAA6E;AAC7E,2EAA2E;AAC3E,iFAAiF;AACjF,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,gBAAgB;AAEhB,IAAI,MAAM,GAAQ,EAAE,CAAC;AACrB,IAAI,SAAS,GAAQ,EAAE,CAAC;AAExB,IAAI,IAAI,GAAG,kEAAkE,CAAC;AAC9E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,EAC/C;IACI,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrC;AAED,6DAA6D;AAC7D,6DAA6D;AAC7D,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAClC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAElC,SAAS,OAAO,CAAC,GAAQ;IAErB,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;IAErB,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,EACf;QACI,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACrE;IAED,yDAAyD;IACzD,yDAAyD;IACzD,IAAI,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,QAAQ,KAAK,CAAC,CAAC;QAAE,QAAQ,GAAG,GAAG,CAAC;IAEpC,IAAI,eAAe,GAAG,QAAQ,KAAK,GAAG;QAClC,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAEzB,OAAO,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AACvC,CAAC;AAED,4DAA4D;AAC5D,SAAS,UAAU,CAAC,GAAQ;IAExB,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,CAAC,CAAC,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;AACpE,CAAC;AAED,SAAS,WAAW,CAAC,GAAQ,EAAE,QAAa,EAAE,eAAoB;IAE9D,OAAO,CAAC,CAAC,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;AACpE,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAQ;IAEvC,IAAI,GAAG,CAAC;IACR,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAE9B,IAAI,GAAG,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAEtE,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,sEAAsE;IACtE,IAAI,GAAG,GAAG,eAAe,GAAG,CAAC;QACzB,CAAC,CAAC,QAAQ,GAAG,CAAC;QACd,CAAC,CAAC,QAAQ,CAAC;IAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAC/B;QACI,GAAG;YACC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACpC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACxC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBACvC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACrC,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;QACpC,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACnC,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;KAC/B;IAED,IAAI,eAAe,KAAK,CAAC,EACzB;QACI,GAAG;YACC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBACnC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5C,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;KAC/B;IAED,IAAI,eAAe,KAAK,CAAC,EACzB;QACI,GAAG;YACC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACpC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBACvC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5C,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QACnC,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;KAC/B;IAED,OAAO,GAAG,CAAC;AACf,CAAC;AA/CD,gDA+CC;AAED,SAAS,eAAe,CAAC,GAAQ;IAE7B,OAAO,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;QACvB,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,WAAW,CAAC,KAAU,EAAE,KAAU,EAAE,GAAQ;IAEjD,IAAI,GAAG,CAAC;IACR,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EACnC;QACI,GAAG;YACC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;gBAC7B,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;gBAC9B,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;KACrC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAU;IAEzC,IAAI,GAAG,CAAC;IACR,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IACvB,IAAI,UAAU,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,sCAAsC;IAChE,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,cAAc,GAAG,KAAK,CAAC,CAAC,wBAAwB;IAEpD,+EAA+E;IAC/E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,cAAc,EACtE;QACI,KAAK,CAAC,IAAI,CAAC,WAAW,CAClB,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CACtE,CAAC,CAAC;KACN;IAED,sEAAsE;IACtE,IAAI,UAAU,KAAK,CAAC,EACpB;QACI,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QACrB,KAAK,CAAC,IAAI,CACN,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;YAChB,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;YACzB,IAAI,CACP,CAAC;KACL;SAAM,IAAI,UAAU,KAAK,CAAC,EAC3B;QACI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC7C,KAAK,CAAC,IAAI,CACN,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;YACjB,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;YACzB,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;YACzB,GAAG,CACN,CAAC;KACL;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC;AArCD,gDAqCC;AACD,mGAAmG"} \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package-lock.json b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package-lock.json new file mode 100644 index 00000000..ed6b3887 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package-lock.json @@ -0,0 +1,529 @@ +{ + "name": "vpnrpc", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@types/node": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz", + "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "picomatch": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", + "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "resolve": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.0.tgz", + "integrity": "sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "ts-loader": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.1.tgz", + "integrity": "sha512-9H5ErTIw5t73sdSoFE0hX0RO45B7cdDA4pW1VIQ2wNFAhxSpZcAlv2fwMcfv6SAYLoI7uGwHuzC5dECzmzqtzA==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^4.0.0", + "semver": "^6.0.0" + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz", + "integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.13.0", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", + "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package.json b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package.json new file mode 100644 index 00000000..1c9b7113 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package.json @@ -0,0 +1,30 @@ +{ + "name": "vpnrpc", + "version": "1.0.1", + "description": "", + "main": "dist/vpnrpc.js", + "scripts": { + "prepare": "tsc", + "build": "tsc" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/SoftEtherVPN/SoftEtherVPN.git" + }, + "keywords": [ + "vpn", + "softether" + ], + "author": "", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/SoftEtherVPN/SoftEtherVPN/issues" + }, + "homepage": "https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/#readme", + "devDependencies": { + "@types/node": "^12.0.2", + "ts-loader": "^6.0.1", + "tslint": "^5.16.0", + "typescript": "^3.4.5" + } +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/src/sample.ts b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/src/sample.ts new file mode 100644 index 00000000..ddb69314 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/src/sample.ts @@ -0,0 +1,2690 @@ +// Test sample code for SoftEther VPN Server JSON-RPC Stub +// Runs on both web browsers and Node.js +// +// sample.ts +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// This sample code shows how to call all available RPC functions. +// You can copy and paste test code to write your own web browser TypeScript / JavaScript codes. +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +// On the web browser uncomment below imports as necessary to support old browsers. +// import "core-js/es6/promise"; +// import "core-js/es6/string"; +// import "whatwg-fetch"; + + +// Import the vpnrpc.ts RPC stub. +import * as VPN from "./vpnrpc"; + +// Output JSON-RPC request / reply strings to the debug console. +VPN.VpnServerRpc.SetDebugMode(true); + +let api: VPN.VpnServerRpc; +// Creating the VpnServerRpc class instance here. +if (VPN.VpnServerRpc.IsNodeJS() === false) // // Determine if this JavaScript environment is on the Node.js or not +{ + // On the web browser. We do not need to specify any hostname, port or credential as the web browser already knows it. + api = new VPN.VpnServerRpc(); +} +else +{ + // On the Node.js. We need to specify the target VPN Server's hostname, port and credential. + api = new VPN.VpnServerRpc("127.0.0.1", 443, "", "PASSWORD_HERE", false); +} + +// A variable for test +let hub_name = "test"; + +// Call the Test_All() function to test almost all VPN APIs. +Test_All(); + + + + +/** Tests all VPN APIs */ +async function Test_All(): Promise +{ + hub_name = "TEST"; + await Test_Test(); + await Test_GetServerInfo(); + await Test_GetServerStatus(); + let new_listener_port: number = await Test_CreateListener(); + await Test_EnableListener(new_listener_port, false); + await Test_EnumListener(); + await Test_EnableListener(new_listener_port, true); + await Test_EnumListener(); + await Test_DeleteListener(new_listener_port); + await Test_SetServerPassword(); + await Test_GetFarmSetting(); + if (false) + { + await Test_SetFarmSetting(); + let farm_members: VPN.VpnRpcEnumFarm = await Test_EnumFarmMember(); + for (let farm_member of farm_members.FarmMemberList) + { + await Test_GetFarmInfo(farm_member.Id_u32); + } + await Test_GetFarmConnectionStatus(); + } + else if (false) + { + console.log("abc"); + } + else + { + console.log("def"); + } + await Test_GetServerCert(); + await Test_SetServerCert(); + await Test_GetServerCipher(); + await Test_SetServerCipher(); + let enum_connection: VPN.VpnRpcEnumConnection = await Test_EnumConnection(); + for (let connecton of enum_connection.ConnectionList) + { + await Test_GetConnectionInfo(connecton.Name_str); + } + hub_name = await Test_CreateHub(); + await Test_SetHub(); + await Test_GetHub(); + await Test_EnumHub(); + await Test_SetHubRadius(); + await Test_GetHubRadius(); + await Test_SetHubOnline(); + await Test_GetHubStatus(); + let hub_log_settings: VPN.VpnRpcHubLog = await Test_GetHubLog(); + await Test_SetHubLog(hub_log_settings); + await Test_AddCa(); + let enum_ca: VPN.VpnRpcHubEnumCA = await Test_EnumCa(); + for (let ca of enum_ca.CAList) + { + await Test_GetCa(ca.Key_u32); + await Test_DeleteCa(ca.Key_u32); + } + await Test_CreateLink(); + await Test_GetLink(); + await Test_SetLink(); + await Test_SetLinkOffline(); + await Test_SetLinkOnline(); + let enum_link: VPN.VpnRpcEnumLink = await Test_EnumLink(); + for (let link of enum_link.LinkList) + { + await Test_GetLinkStatus(link.AccountName_utf); + } + await new Promise((r) => setTimeout(r, 3000)); + await Test_RenameLink(); + await Test_DeleteLink(); + await Test_AddAccess(); + await Test_EnumAccess(); + await Test_DeleteAccess(); + await Test_SetAccessList(); + await Test_CreateGroup(); + await Test_SetGroup(); + await Test_GetGroup(); + await Test_CreateUser(); + await Test_SetUser(); + await Test_GetUser(); + await Test_EnumUser(); + await Test_EnumGroup(); + await Test_DeleteUser(); + await Test_DeleteGroup(); + let enum_session: VPN.VpnRpcEnumSession = await Test_EnumSession(); + for (let session of enum_session.SessionList) + { + await Test_GetSessionStatus(session.Name_str); + await Test_DeleteSession(session.Name_str); + } + let enum_mac: VPN.VpnRpcEnumMacTable = await Test_EnumMacTable(); + for (let mac of enum_mac.MacTable) + { + await Test_DeleteMacTable(mac.Key_u32); + } + let enum_ip: VPN.VpnRpcEnumIpTable = await Test_EnumIpTable(); + for (let ip of enum_ip.IpTable) + { + await Test_DeleteIpTable(ip.Key_u32); + } + await Test_SetKeep(); + await Test_GetKeep(); + await Test_EnableSecureNAT(); + await Test_GetSecureNATOption(); + await Test_SetSecureNATOption(); + await Test_EnumNAT(); + await Test_EnumDHCP(); + await Test_GetSecureNATStatus(); + await Test_DisableSecureNAT(); + await Test_EnumEthernet(); + await Test_EnumLocalBridge(); + await Test_GetBridgeSupport(); + await Test_GetCaps(); + await Test_GetConfig(); + await Test_GetDefaultHubAdminOptions(); + await Test_GetHubAdminOptions(); + await Test_SetHubAdminOptions(); + await Test_GetHubExtOptions(); + await Test_SetHubExtOptions(); + await Test_AddL3Switch(); + await Test_AddL3If(); + await Test_EnumL3Switch(); + await Test_EnumL3If(); + await Test_AddL3Table(); + await Test_EnumL3Table(); + await Test_DelL3Table(); + await Test_StartL3Switch(); + await Test_StopL3Switch(); + await Test_DelL3If(); + await Test_DelL3Switch(); + await Test_AddCrl(); + let enum_crl: VPN.VpnRpcEnumCrl = await Test_EnumCrl(); + for (let crl of enum_crl.CRLList) + { + let got_crl: VPN.VpnRpcCrl = await Test_GetCrl(crl.Key_u32); + got_crl.CommonName_utf = got_crl.CommonName_utf + "_a"; + await Test_SetCrl(got_crl); + } + enum_crl = await Test_EnumCrl(); + for (let crl of enum_crl.CRLList) + { + await Test_DelCrl(crl.Key_u32); + } + await Test_SetAcList(); + await Test_GetAcList(); + let enum_log_file: VPN.VpnRpcEnumLogFile = await Test_EnumLogFile(); + for (let log of enum_log_file.LogFiles) + { + await Test_ReadLogFile(log.FilePath_str); + break; + } + await Test_SetSysLog(true); + await Test_GetSysLog(); + await Test_SetSysLog(false); + await Test_SetHubMsg(); + await Test_GetHubMsg(); + await Test_GetAdminMsg(); + await Test_Flush(); + await Test_SetIPsecServices(); + await Test_GetIPsecServices(); + await Test_AddEtherIpId(); + let enum_etherip_id: VPN.VpnRpcEnumEtherIpId = await Test_EnumEtherIpId(); + for (let etherip_id of enum_etherip_id.Settings) + { + await Test_GetEtherIpId(etherip_id.Id_str); + await Test_DeleteEtherIpId(etherip_id.Id_str); + } + await Test_SetOpenVpnSstpConfig(); + await Test_GetOpenVpnSstpConfig(); + await Test_GetDDnsClientStatus(); + await Test_SetDDnsInternetSettng(); + await Test_GetDDnsInternetSettng(); + await Test_ChangeDDnsClientHostname(); + await Test_RegenerateServerCert(); + await Test_MakeOpenVpnConfigFile(); + await Test_SetSpecialListener(); + await Test_GetSpecialListener(); + await Test_GetAzureStatus(); + await Test_SetAzureStatus(); + await Test_SetVgsConfig(); + await Test_GetVgsConfig(); + await Test_DeleteHub(); + return; +} + +/** API test for 'Test', test RPC function */ +async function Test_Test(): Promise +{ + console.log("Begin: Test_Test"); + let a: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + IntValue_u32: 12345, + }); + let b: VPN.VpnRpcTest = await api.Test(a); + console.log(b); + console.log("End: Test_Test"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerInfo', Get server information */ +async function Test_GetServerInfo(): Promise +{ + console.log("Begin: Test_GetServerInfo"); + let info: VPN.VpnRpcServerInfo = await api.GetServerInfo(); + console.log(info); + console.log("End: Test_GetServerInfo"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerStatus', Get server status */ +async function Test_GetServerStatus(): Promise +{ + console.log("Begin: Test_GetServerStatus"); + let out_rpc_server_status: VPN.VpnRpcServerStatus = await api.GetServerStatus(); + console.log(out_rpc_server_status); + console.log("End: Test_GetServerStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateListener', Create a listener */ +async function Test_CreateListener(): Promise +{ + console.log("Begin: Test_CreateListener"); + let port: number = Math.floor((Math.random() * (65534 - 1025)) + 1025); + console.log("Creating a new listener port: Port " + port); + let in_rpc_listener: VPN.VpnRpcListener = new VPN.VpnRpcListener( + { + Enable_bool: true, + Port_u32: port, + }); + let out_rpc_listener: VPN.VpnRpcListener = await api.CreateListener(in_rpc_listener); + console.log("Done."); + console.log("End: Test_CreateListener"); + console.log("-----"); + console.log(); + return port; +} + +/** API test for 'EnumListener', Enumerating listeners */ +async function Test_EnumListener(): Promise +{ + console.log("Begin: Test_EnumListener"); + let out_rpc_listener_list: VPN.VpnRpcListenerList = await api.EnumListener(); + console.log(out_rpc_listener_list); + console.log("End: Test_EnumListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteListener', Delete a listener */ +async function Test_DeleteListener(port: number): Promise +{ + console.log("Begin: Test_DeleteListener"); + console.log("Deleting a new listener port: Port" + port); + let in_rpc_listener: VPN.VpnRpcListener = new VPN.VpnRpcListener( + { + Port_u32: port, + }); + let out_rpc_listener: VPN.VpnRpcListener = await api.DeleteListener(in_rpc_listener); + console.log("Done."); + console.log("End: Test_DeleteListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnableListener', Enable / Disable listener */ +async function Test_EnableListener(port: number, enabled: boolean): Promise +{ + console.log("Begin: Test_EnableListener"); + if (enabled) + { + console.log("Enabling listener port = " + port); + } + else + { + console.log("Disabling listener port = " + port); + } + let in_rpc_listener: VPN.VpnRpcListener = new VPN.VpnRpcListener( + { + Port_u32: port, + Enable_bool: enabled, + }); + let out_rpc_listener: VPN.VpnRpcListener = await api.EnableListener(in_rpc_listener); + console.log("Done."); + console.log("End: Test_EnableListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetServerPassword', Set server password */ +async function Test_SetServerPassword(): Promise +{ + let password: string = "microsoft"; + console.log("Begin: Test_SetServerPassword"); + console.log("Set the server administrator password to '" + password + "'."); + let in_rpc_set_password: VPN.VpnRpcSetPassword = new VPN.VpnRpcSetPassword( + { + PlainTextPassword_str: password, + }); + let out_rpc_set_password: VPN.VpnRpcSetPassword = await api.SetServerPassword(in_rpc_set_password); + console.log("Done."); + console.log("End: Test_SetServerPassword"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetFarmSetting', Set clustering configuration */ +async function Test_SetFarmSetting(): Promise +{ + console.log("Begin: Test_SetFarmSetting"); + let in_rpc_farm: VPN.VpnRpcFarm = new VPN.VpnRpcFarm( + { + ServerType_u32: VPN.VpnRpcServerType.FarmController, + NumPort_u32: 2, + Ports_u32: [ 443, 444, 445, ], + PublicIp_ip: "1.2.3.4", + ControllerName_str: "controller", + MemberPasswordPlaintext_str: "microsoft", + ControllerPort_u32: 443, + Weight_u32: 100, + ControllerOnly_bool: false, + }); + let out_rpc_farm: VPN.VpnRpcFarm = await api.SetFarmSetting(in_rpc_farm); + console.log("End: Test_SetFarmSetting"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetFarmSetting', Get clustering configuration */ +async function Test_GetFarmSetting(): Promise +{ + console.log("Begin: Test_GetFarmSetting"); + let out_rpc_farm: VPN.VpnRpcFarm = await api.GetFarmSetting(); + console.log(out_rpc_farm); + console.log("End: Test_GetFarmSetting"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetFarmInfo', Get cluster member information */ +async function Test_GetFarmInfo(id: number): Promise +{ + console.log("Begin: Test_GetFarmInfo"); + let in_rpc_farm_info: VPN.VpnRpcFarmInfo = new VPN.VpnRpcFarmInfo( + { + Id_u32: id, + }); + let out_rpc_farm_info: VPN.VpnRpcFarmInfo = await api.GetFarmInfo(in_rpc_farm_info); + console.log(out_rpc_farm_info); + console.log("End: Test_GetFarmInfo"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumFarmMember', Enumerate cluster members */ +async function Test_EnumFarmMember(): Promise +{ + console.log("Begin: Test_EnumFarmMember"); + let out_rpc_enum_farm: VPN.VpnRpcEnumFarm = await api.EnumFarmMember(); + console.log(out_rpc_enum_farm); + console.log("End: Test_EnumFarmMember"); + console.log("-----"); + console.log(); + return out_rpc_enum_farm; +} + +/** API test for 'GetFarmConnectionStatus', Get status of connection to cluster controller */ +async function Test_GetFarmConnectionStatus(): Promise +{ + console.log("Begin: Test_GetFarmConnectionStatus"); + let out_rpc_farm_connection_status: VPN.VpnRpcFarmConnectionStatus = await api.GetFarmConnectionStatus(); + console.log(out_rpc_farm_connection_status); + console.log("End: Test_GetFarmConnectionStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetServerCert', Set the server certification */ +async function Test_SetServerCert(): Promise +{ + console.log("Begin: Test_SetServerCert"); + let in_rpc_key_pair: VPN.VpnRpcKeyPair = new VPN.VpnRpcKeyPair( + { + Cert_bin: new Uint8Array([ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, ]), + Key_bin: new Uint8Array([ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x45, 0x76, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, 0x42, 0x4b, 0x67, 0x77, 0x67, 0x67, 0x53, 0x6b, 0x41, 0x67, 0x45, 0x41, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x0a, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x0a, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x0a, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x0a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x0a, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x0a, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x45, 0x43, 0x67, 0x67, 0x45, 0x41, 0x54, 0x77, 0x34, 0x52, 0x6f, 0x52, 0x4c, 0x6a, 0x73, 0x68, 0x72, 0x42, 0x56, 0x6f, 0x59, 0x69, 0x78, 0x4f, 0x4a, 0x2b, 0x57, 0x4c, 0x6d, 0x2f, 0x45, 0x51, 0x57, 0x65, 0x37, 0x6f, 0x6a, 0x38, 0x31, 0x51, 0x50, 0x73, 0x39, 0x56, 0x45, 0x49, 0x32, 0x62, 0x53, 0x4f, 0x0a, 0x34, 0x4a, 0x51, 0x42, 0x55, 0x42, 0x53, 0x6b, 0x70, 0x64, 0x48, 0x34, 0x57, 0x32, 0x77, 0x51, 0x75, 0x2f, 0x61, 0x58, 0x57, 0x38, 0x75, 0x75, 0x53, 0x39, 0x45, 0x43, 0x6d, 0x6d, 0x41, 0x41, 0x75, 0x45, 0x79, 0x4a, 0x54, 0x56, 0x7a, 0x75, 0x31, 0x32, 0x35, 0x58, 0x73, 0x65, 0x63, 0x6c, 0x44, 0x41, 0x55, 0x38, 0x49, 0x55, 0x70, 0x54, 0x2b, 0x70, 0x4c, 0x35, 0x79, 0x70, 0x37, 0x34, 0x0a, 0x45, 0x62, 0x76, 0x4e, 0x48, 0x48, 0x33, 0x67, 0x65, 0x72, 0x4f, 0x67, 0x78, 0x76, 0x49, 0x6a, 0x50, 0x64, 0x67, 0x77, 0x62, 0x66, 0x6d, 0x4d, 0x49, 0x59, 0x48, 0x62, 0x56, 0x70, 0x6e, 0x49, 0x30, 0x77, 0x32, 0x42, 0x43, 0x44, 0x51, 0x76, 0x74, 0x64, 0x64, 0x57, 0x6f, 0x42, 0x74, 0x41, 0x33, 0x43, 0x54, 0x6a, 0x63, 0x2f, 0x43, 0x56, 0x67, 0x73, 0x47, 0x77, 0x33, 0x43, 0x4e, 0x72, 0x0a, 0x46, 0x78, 0x41, 0x46, 0x35, 0x73, 0x4a, 0x34, 0x63, 0x5a, 0x4c, 0x6e, 0x5a, 0x31, 0x45, 0x36, 0x69, 0x74, 0x4c, 0x54, 0x50, 0x69, 0x6f, 0x6a, 0x74, 0x76, 0x48, 0x48, 0x34, 0x61, 0x64, 0x6d, 0x68, 0x68, 0x43, 0x61, 0x42, 0x49, 0x78, 0x76, 0x47, 0x2f, 0x53, 0x6e, 0x59, 0x77, 0x4e, 0x35, 0x38, 0x37, 0x55, 0x5a, 0x6d, 0x37, 0x4c, 0x57, 0x50, 0x61, 0x67, 0x4c, 0x41, 0x33, 0x67, 0x69, 0x0a, 0x48, 0x4b, 0x4f, 0x2b, 0x4b, 0x79, 0x42, 0x51, 0x39, 0x33, 0x31, 0x4e, 0x4d, 0x61, 0x65, 0x6a, 0x36, 0x6d, 0x75, 0x75, 0x46, 0x32, 0x30, 0x32, 0x76, 0x34, 0x37, 0x6c, 0x57, 0x6b, 0x64, 0x50, 0x4f, 0x6e, 0x52, 0x43, 0x69, 0x6f, 0x4d, 0x58, 0x30, 0x63, 0x31, 0x6a, 0x36, 0x76, 0x32, 0x61, 0x59, 0x34, 0x34, 0x77, 0x55, 0x4b, 0x71, 0x39, 0x4d, 0x52, 0x67, 0x6f, 0x52, 0x76, 0x4a, 0x37, 0x0a, 0x41, 0x39, 0x77, 0x65, 0x72, 0x4c, 0x6b, 0x68, 0x35, 0x78, 0x78, 0x35, 0x35, 0x32, 0x4f, 0x74, 0x71, 0x50, 0x36, 0x73, 0x61, 0x6d, 0x75, 0x47, 0x44, 0x52, 0x78, 0x31, 0x42, 0x70, 0x36, 0x53, 0x4f, 0x70, 0x68, 0x43, 0x45, 0x50, 0x48, 0x59, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x36, 0x33, 0x65, 0x2b, 0x52, 0x75, 0x6c, 0x36, 0x46, 0x78, 0x47, 0x43, 0x76, 0x67, 0x70, 0x6b, 0x33, 0x0a, 0x57, 0x67, 0x2f, 0x54, 0x31, 0x77, 0x2f, 0x59, 0x4b, 0x6b, 0x79, 0x4f, 0x49, 0x46, 0x4c, 0x63, 0x46, 0x4c, 0x57, 0x71, 0x42, 0x44, 0x71, 0x6c, 0x6e, 0x58, 0x65, 0x63, 0x6c, 0x6b, 0x50, 0x4b, 0x6a, 0x57, 0x4e, 0x2f, 0x32, 0x70, 0x4a, 0x6d, 0x4f, 0x31, 0x63, 0x46, 0x63, 0x44, 0x4a, 0x46, 0x59, 0x64, 0x32, 0x45, 0x49, 0x45, 0x72, 0x76, 0x42, 0x57, 0x54, 0x34, 0x51, 0x39, 0x4d, 0x42, 0x0a, 0x4e, 0x35, 0x6c, 0x44, 0x6b, 0x47, 0x75, 0x6a, 0x34, 0x2f, 0x6b, 0x68, 0x56, 0x6c, 0x79, 0x6e, 0x77, 0x62, 0x64, 0x42, 0x6e, 0x47, 0x43, 0x34, 0x61, 0x34, 0x48, 0x4a, 0x49, 0x4a, 0x76, 0x61, 0x35, 0x63, 0x70, 0x49, 0x63, 0x57, 0x65, 0x4a, 0x72, 0x35, 0x61, 0x57, 0x33, 0x69, 0x44, 0x36, 0x68, 0x53, 0x73, 0x61, 0x6c, 0x79, 0x55, 0x76, 0x4a, 0x4d, 0x6d, 0x64, 0x4d, 0x42, 0x6e, 0x47, 0x0a, 0x37, 0x2b, 0x50, 0x65, 0x53, 0x2b, 0x4e, 0x73, 0x4b, 0x30, 0x61, 0x63, 0x31, 0x67, 0x33, 0x4d, 0x6c, 0x56, 0x35, 0x42, 0x41, 0x32, 0x70, 0x55, 0x54, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x62, 0x65, 0x46, 0x6d, 0x2b, 0x46, 0x46, 0x35, 0x62, 0x76, 0x6f, 0x4b, 0x7a, 0x49, 0x4c, 0x6c, 0x31, 0x62, 0x79, 0x6b, 0x6c, 0x52, 0x6b, 0x69, 0x76, 0x7a, 0x6b, 0x62, 0x7a, 0x49, 0x6b, 0x41, 0x78, 0x0a, 0x35, 0x56, 0x6b, 0x74, 0x67, 0x36, 0x4a, 0x35, 0x63, 0x76, 0x38, 0x44, 0x35, 0x2b, 0x72, 0x71, 0x50, 0x75, 0x6a, 0x4f, 0x66, 0x39, 0x67, 0x42, 0x6a, 0x4e, 0x37, 0x70, 0x64, 0x78, 0x39, 0x39, 0x35, 0x6b, 0x47, 0x49, 0x78, 0x5a, 0x39, 0x6d, 0x31, 0x68, 0x57, 0x69, 0x78, 0x55, 0x55, 0x31, 0x55, 0x6f, 0x38, 0x72, 0x70, 0x39, 0x4a, 0x69, 0x47, 0x4f, 0x36, 0x72, 0x65, 0x31, 0x77, 0x69, 0x0a, 0x6a, 0x56, 0x2f, 0x4c, 0x31, 0x64, 0x37, 0x55, 0x66, 0x39, 0x48, 0x6a, 0x65, 0x61, 0x70, 0x4f, 0x46, 0x62, 0x34, 0x6b, 0x72, 0x71, 0x52, 0x58, 0x54, 0x65, 0x75, 0x4d, 0x6e, 0x35, 0x35, 0x44, 0x33, 0x64, 0x70, 0x79, 0x6a, 0x51, 0x4e, 0x43, 0x30, 0x5a, 0x50, 0x72, 0x61, 0x6d, 0x58, 0x64, 0x38, 0x31, 0x57, 0x6f, 0x6f, 0x56, 0x77, 0x58, 0x59, 0x41, 0x66, 0x69, 0x46, 0x76, 0x4c, 0x49, 0x0a, 0x6f, 0x66, 0x31, 0x37, 0x51, 0x67, 0x67, 0x49, 0x59, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x59, 0x55, 0x67, 0x67, 0x43, 0x34, 0x58, 0x49, 0x67, 0x5a, 0x76, 0x58, 0x34, 0x59, 0x65, 0x55, 0x38, 0x6c, 0x61, 0x79, 0x51, 0x50, 0x79, 0x4b, 0x71, 0x67, 0x38, 0x37, 0x2f, 0x76, 0x31, 0x2b, 0x7a, 0x35, 0x79, 0x65, 0x2f, 0x4d, 0x32, 0x5a, 0x65, 0x36, 0x53, 0x6e, 0x37, 0x48, 0x4a, 0x66, 0x59, 0x0a, 0x55, 0x5a, 0x4d, 0x36, 0x37, 0x48, 0x37, 0x52, 0x4b, 0x4e, 0x6f, 0x68, 0x46, 0x6c, 0x35, 0x43, 0x39, 0x65, 0x44, 0x4e, 0x7a, 0x67, 0x72, 0x50, 0x6b, 0x52, 0x63, 0x2f, 0x2f, 0x54, 0x77, 0x32, 0x45, 0x48, 0x74, 0x59, 0x68, 0x33, 0x42, 0x4b, 0x49, 0x6f, 0x72, 0x77, 0x39, 0x45, 0x64, 0x78, 0x59, 0x4e, 0x6c, 0x6b, 0x2b, 0x6a, 0x4e, 0x73, 0x30, 0x30, 0x64, 0x57, 0x35, 0x34, 0x64, 0x39, 0x0a, 0x65, 0x69, 0x69, 0x7a, 0x7a, 0x78, 0x59, 0x34, 0x34, 0x2f, 0x41, 0x32, 0x70, 0x39, 0x52, 0x49, 0x4d, 0x67, 0x79, 0x35, 0x49, 0x52, 0x77, 0x76, 0x53, 0x73, 0x6d, 0x50, 0x67, 0x61, 0x71, 0x34, 0x6f, 0x4b, 0x4d, 0x64, 0x54, 0x4e, 0x4d, 0x4f, 0x73, 0x30, 0x4a, 0x77, 0x65, 0x79, 0x50, 0x72, 0x42, 0x65, 0x49, 0x41, 0x72, 0x62, 0x46, 0x43, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x71, 0x0a, 0x57, 0x30, 0x34, 0x56, 0x33, 0x49, 0x75, 0x74, 0x33, 0x55, 0x42, 0x6f, 0x75, 0x50, 0x4d, 0x63, 0x63, 0x38, 0x2f, 0x56, 0x62, 0x69, 0x77, 0x48, 0x77, 0x79, 0x2b, 0x52, 0x6c, 0x4c, 0x6d, 0x4e, 0x77, 0x59, 0x41, 0x71, 0x63, 0x79, 0x35, 0x50, 0x35, 0x58, 0x4b, 0x4c, 0x33, 0x70, 0x36, 0x62, 0x65, 0x33, 0x2b, 0x4d, 0x6f, 0x76, 0x48, 0x52, 0x71, 0x6a, 0x35, 0x78, 0x72, 0x4a, 0x54, 0x57, 0x0a, 0x54, 0x6a, 0x2f, 0x36, 0x59, 0x61, 0x51, 0x73, 0x31, 0x2b, 0x72, 0x74, 0x63, 0x51, 0x45, 0x61, 0x74, 0x64, 0x34, 0x4b, 0x50, 0x66, 0x64, 0x78, 0x53, 0x2f, 0x63, 0x66, 0x52, 0x74, 0x38, 0x71, 0x74, 0x75, 0x42, 0x77, 0x51, 0x61, 0x2f, 0x34, 0x39, 0x4d, 0x72, 0x41, 0x4c, 0x76, 0x57, 0x43, 0x4c, 0x53, 0x42, 0x75, 0x4b, 0x74, 0x33, 0x49, 0x49, 0x75, 0x53, 0x2f, 0x51, 0x44, 0x74, 0x43, 0x0a, 0x5a, 0x4e, 0x67, 0x6d, 0x36, 0x4d, 0x78, 0x71, 0x4e, 0x6e, 0x49, 0x43, 0x58, 0x35, 0x46, 0x34, 0x36, 0x6d, 0x52, 0x49, 0x52, 0x42, 0x42, 0x4f, 0x32, 0x4b, 0x7a, 0x6c, 0x30, 0x33, 0x68, 0x62, 0x51, 0x6c, 0x71, 0x58, 0x4c, 0x5a, 0x63, 0x38, 0x6f, 0x51, 0x4b, 0x42, 0x67, 0x43, 0x53, 0x77, 0x66, 0x46, 0x7a, 0x68, 0x48, 0x76, 0x78, 0x36, 0x68, 0x69, 0x64, 0x57, 0x67, 0x48, 0x4a, 0x63, 0x0a, 0x77, 0x79, 0x76, 0x64, 0x6e, 0x70, 0x58, 0x78, 0x36, 0x5a, 0x4c, 0x6e, 0x6f, 0x61, 0x7a, 0x61, 0x6f, 0x48, 0x47, 0x74, 0x4d, 0x47, 0x43, 0x45, 0x5a, 0x49, 0x50, 0x66, 0x6a, 0x4c, 0x42, 0x63, 0x30, 0x4d, 0x74, 0x79, 0x45, 0x64, 0x53, 0x4c, 0x78, 0x54, 0x6c, 0x35, 0x59, 0x70, 0x78, 0x6f, 0x6d, 0x43, 0x46, 0x55, 0x4d, 0x33, 0x55, 0x63, 0x59, 0x4e, 0x2f, 0x50, 0x5a, 0x66, 0x58, 0x41, 0x0a, 0x6d, 0x36, 0x31, 0x45, 0x6d, 0x71, 0x53, 0x53, 0x4d, 0x56, 0x63, 0x47, 0x50, 0x67, 0x65, 0x2f, 0x43, 0x34, 0x44, 0x42, 0x5a, 0x59, 0x6a, 0x53, 0x45, 0x71, 0x62, 0x67, 0x37, 0x6d, 0x73, 0x52, 0x30, 0x33, 0x37, 0x42, 0x58, 0x54, 0x48, 0x6b, 0x78, 0x44, 0x62, 0x33, 0x71, 0x48, 0x46, 0x54, 0x6f, 0x30, 0x6b, 0x48, 0x57, 0x4a, 0x66, 0x34, 0x39, 0x59, 0x77, 0x32, 0x73, 0x77, 0x6a, 0x54, 0x0a, 0x72, 0x4f, 0x38, 0x46, 0x46, 0x44, 0x52, 0x56, 0x50, 0x44, 0x4c, 0x5a, 0x61, 0x37, 0x36, 0x47, 0x67, 0x79, 0x41, 0x55, 0x4a, 0x38, 0x55, 0x63, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, ]), + }); + let out_rpc_key_pair: VPN.VpnRpcKeyPair = await api.SetServerCert(in_rpc_key_pair); + console.log(out_rpc_key_pair); + console.log("End: Test_SetServerCert"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerCert', Get the server certification */ +async function Test_GetServerCert(): Promise +{ + console.log("Begin: Test_GetServerCert"); + let out_rpc_key_pair: VPN.VpnRpcKeyPair = await api.GetServerCert(); + console.log(out_rpc_key_pair); + console.log("End: Test_GetServerCert"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerCipher', Get cipher for SSL */ +async function Test_GetServerCipher(): Promise +{ + console.log("Begin: Test_GetServerCipher"); + let out_rpc_str: VPN.VpnRpcStr = await api.GetServerCipher(); + console.log(out_rpc_str); + console.log("End: Test_GetServerCipher"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetServerCipher', Set cipher for SSL to the server */ +async function Test_SetServerCipher(): Promise +{ + console.log("Begin: Test_SetServerCipher"); + let in_rpc_str: VPN.VpnRpcStr = new VPN.VpnRpcStr( + { + String_str: "RC4-MD5", + }); + let out_rpc_str: VPN.VpnRpcStr = await api.SetServerCipher(in_rpc_str); + console.log(out_rpc_str); + console.log("End: Test_SetServerCipher"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateHub', Create a hub */ +async function Test_CreateHub(): Promise +{ + let hub_name: string = "Test_" + Math.floor((Math.random() * (999999 - 100000)) + 100000); + console.log("Begin: Test_CreateHub"); + let in_rpc_create_hub: VPN.VpnRpcCreateHub = new VPN.VpnRpcCreateHub( + { + HubName_str: hub_name, + HubType_u32: VPN.VpnRpcHubType.Standalone, + Online_bool: true, + AdminPasswordPlainText_str: "microsoft", + MaxSession_u32: 123, + NoEnum_bool: false, + }); + let out_rpc_create_hub: VPN.VpnRpcCreateHub = await api.CreateHub(in_rpc_create_hub); + console.log(out_rpc_create_hub); + console.log("End: Test_CreateHub"); + console.log("-----"); + console.log(); + return hub_name; +} + +/** API test for 'SetHub', Set hub configuration */ +async function Test_SetHub(): Promise +{ + console.log("Begin: Test_SetHub"); + let in_rpc_create_hub: VPN.VpnRpcCreateHub = new VPN.VpnRpcCreateHub( + { + HubName_str: hub_name, + AdminPasswordPlainText_str: "aho", + HubType_u32: VPN.VpnRpcHubType.Standalone, + NoEnum_bool: false, + MaxSession_u32: 128, + Online_bool: true, + }); + let out_rpc_create_hub: VPN.VpnRpcCreateHub = await api.SetHub(in_rpc_create_hub); + console.log(out_rpc_create_hub); + console.log("End: Test_SetHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHub', Get hub configuration */ +async function Test_GetHub(): Promise +{ + console.log("Begin: Test_GetHub"); + let in_rpc_create_hub: VPN.VpnRpcCreateHub = new VPN.VpnRpcCreateHub( + { + HubName_str: hub_name, + }); + let out_rpc_create_hub: VPN.VpnRpcCreateHub = await api.GetHub(in_rpc_create_hub); + console.log(out_rpc_create_hub); + console.log("End: Test_GetHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumHub', Enumerate hubs */ +async function Test_EnumHub(): Promise +{ + console.log("Begin: Test_EnumHub"); + let out_rpc_enum_hub: VPN.VpnRpcEnumHub = await api.EnumHub(); + console.log(out_rpc_enum_hub); + console.log("End: Test_EnumHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteHub', Delete a hub */ +async function Test_DeleteHub(): Promise +{ + console.log("Begin: Test_DeleteHub"); + let in_rpc_delete_hub: VPN.VpnRpcDeleteHub = new VPN.VpnRpcDeleteHub( + { + HubName_str: hub_name, + }); + let out_rpc_delete_hub: VPN.VpnRpcDeleteHub = await api.DeleteHub(in_rpc_delete_hub); + console.log(out_rpc_delete_hub); + console.log("End: Test_DeleteHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubRadius', Get Radius options of the hub */ +async function Test_GetHubRadius(): Promise +{ + console.log("Begin: Test_GetHubRadius"); + let in_rpc_radius: VPN.VpnRpcRadius = new VPN.VpnRpcRadius( + { + HubName_str: hub_name, + }); + let out_rpc_radius: VPN.VpnRpcRadius = await api.GetHubRadius(in_rpc_radius); + console.log(out_rpc_radius); + console.log("End: Test_GetHubRadius"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubRadius', Set Radius options of the hub */ +async function Test_SetHubRadius(): Promise +{ + console.log("Begin: Test_SetHubRadius"); + let in_rpc_radius: VPN.VpnRpcRadius = new VPN.VpnRpcRadius( + { + HubName_str: hub_name, + RadiusServerName_str: "1.2.3.4", + RadiusPort_u32: 1234, + RadiusSecret_str: "microsoft", + RadiusRetryInterval_u32: 1000, + }); + let out_rpc_radius: VPN.VpnRpcRadius = await api.SetHubRadius(in_rpc_radius); + console.log(out_rpc_radius); + console.log("End: Test_SetHubRadius"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumConnection', Enumerate connections */ +async function Test_EnumConnection(): Promise +{ + console.log("Begin: Test_EnumConnection"); + let out_rpc_enum_connection: VPN.VpnRpcEnumConnection = await api.EnumConnection(); + console.log(out_rpc_enum_connection); + console.log("End: Test_EnumConnection"); + console.log("-----"); + console.log(); + return out_rpc_enum_connection; +} + +/** API test for 'DisconnectConnection', Disconnect a connection */ +async function Test_DisconnectConnection(connection_id: string): Promise +{ + console.log("Begin: Test_DisconnectConnection"); + let in_rpc_disconnect_connection: VPN.VpnRpcDisconnectConnection = new VPN.VpnRpcDisconnectConnection( + { + Name_str: connection_id, + }); + let out_rpc_disconnect_connection: VPN.VpnRpcDisconnectConnection = await api.DisconnectConnection(in_rpc_disconnect_connection); + console.log(out_rpc_disconnect_connection); + console.log("End: Test_DisconnectConnection"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetConnectionInfo', Get connection information */ +async function Test_GetConnectionInfo(name: string): Promise +{ + console.log("Begin: Test_GetConnectionInfo"); + let in_rpc_connection_info: VPN.VpnRpcConnectionInfo = new VPN.VpnRpcConnectionInfo( + { + Name_str: name, + }); + let out_rpc_connection_info: VPN.VpnRpcConnectionInfo = await api.GetConnectionInfo(in_rpc_connection_info); + console.log(out_rpc_connection_info); + console.log("End: Test_GetConnectionInfo"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubOnline', Make a hub on-line or off-line */ +async function Test_SetHubOnline(): Promise +{ + console.log("Begin: Test_SetHubOnline"); + let in_rpc_set_hub_online: VPN.VpnRpcSetHubOnline = new VPN.VpnRpcSetHubOnline( + { + HubName_str: hub_name, + Online_bool: true, + }); + let out_rpc_set_hub_online: VPN.VpnRpcSetHubOnline = await api.SetHubOnline(in_rpc_set_hub_online); + console.log(out_rpc_set_hub_online); + console.log("End: Test_SetHubOnline"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubStatus', Get hub status */ +async function Test_GetHubStatus(): Promise +{ + console.log("Begin: Test_GetHubStatus"); + let in_rpc_hub_status: VPN.VpnRpcHubStatus = new VPN.VpnRpcHubStatus( + { + HubName_str: hub_name, + }); + let out_rpc_hub_status: VPN.VpnRpcHubStatus = await api.GetHubStatus(in_rpc_hub_status); + console.log(out_rpc_hub_status); + console.log("End: Test_GetHubStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubLog', Set logging configuration into the hub */ +async function Test_SetHubLog(in_rpc_hub_log: VPN.VpnRpcHubLog): Promise +{ + console.log("Begin: Test_SetHubLog"); + let out_rpc_hub_log: VPN.VpnRpcHubLog = await api.SetHubLog(in_rpc_hub_log); + console.log(out_rpc_hub_log); + console.log("End: Test_SetHubLog"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubLog', Get logging configuration of the hub */ +async function Test_GetHubLog(): Promise +{ + console.log("Begin: Test_GetHubLog"); + let in_rpc_hub_log: VPN.VpnRpcHubLog = new VPN.VpnRpcHubLog( + { + HubName_str: hub_name, + }); + let out_rpc_hub_log: VPN.VpnRpcHubLog = await api.GetHubLog(in_rpc_hub_log); + console.log(out_rpc_hub_log); + console.log("End: Test_GetHubLog"); + console.log("-----"); + console.log(); + return out_rpc_hub_log; +} + +/** API test for 'AddCa', Add CA(Certificate Authority) into the hub */ +async function Test_AddCa(): Promise +{ + console.log("Begin: Test_AddCa"); + let in_rpc_hub_add_ca: VPN.VpnRpcHubAddCA = new VPN.VpnRpcHubAddCA( + { + HubName_str: hub_name, + Cert_bin: new Uint8Array([ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, ]), + }); + let out_rpc_hub_add_ca: VPN.VpnRpcHubAddCA = await api.AddCa(in_rpc_hub_add_ca); + console.log(out_rpc_hub_add_ca); + console.log("End: Test_AddCa"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumCa', Enumerate CA(Certificate Authority) in the hub */ +async function Test_EnumCa(): Promise +{ + console.log("Begin: Test_EnumCa"); + let in_rpc_hub_enum_ca: VPN.VpnRpcHubEnumCA = new VPN.VpnRpcHubEnumCA( + { + HubName_str: hub_name, + }); + let out_rpc_hub_enum_ca: VPN.VpnRpcHubEnumCA = await api.EnumCa(in_rpc_hub_enum_ca); + console.log(out_rpc_hub_enum_ca); + console.log("End: Test_EnumCa"); + console.log("-----"); + console.log(); + return out_rpc_hub_enum_ca; +} + +/** API test for 'GetCa', Get CA(Certificate Authority) setting from the hub */ +async function Test_GetCa(key: number): Promise +{ + console.log("Begin: Test_GetCa"); + let in_rpc_hub_get_ca: VPN.VpnRpcHubGetCA = new VPN.VpnRpcHubGetCA( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_hub_get_ca: VPN.VpnRpcHubGetCA = await api.GetCa(in_rpc_hub_get_ca); + console.log(out_rpc_hub_get_ca); + console.log("End: Test_GetCa"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteCa', Delete a CA(Certificate Authority) setting from the hub */ +async function Test_DeleteCa(key: number): Promise +{ + console.log("Begin: Test_DeleteCa"); + let in_rpc_hub_delete_ca: VPN.VpnRpcHubDeleteCA = new VPN.VpnRpcHubDeleteCA( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_hub_delete_ca: VPN.VpnRpcHubDeleteCA = await api.DeleteCa(in_rpc_hub_delete_ca); + console.log(out_rpc_hub_delete_ca); + console.log("End: Test_DeleteCa"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetLinkOnline', Make a link into on-line */ +async function Test_SetLinkOnline(): Promise +{ + console.log("Begin: Test_SetLinkOnline"); + let in_rpc_link: VPN.VpnRpcLink = new VPN.VpnRpcLink( + { + HubName_str: hub_name, + AccountName_utf: "linktest", + }); + let out_rpc_link: VPN.VpnRpcLink = await api.SetLinkOnline(in_rpc_link); + console.log(out_rpc_link); + console.log("End: Test_SetLinkOnline"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetLinkOffline', Make a link into off-line */ +async function Test_SetLinkOffline(): Promise +{ + console.log("Begin: Test_SetLinkOffline"); + let in_rpc_link: VPN.VpnRpcLink = new VPN.VpnRpcLink( + { + HubName_str: hub_name, + AccountName_utf: "linktest", + }); + let out_rpc_link: VPN.VpnRpcLink = await api.SetLinkOffline(in_rpc_link); + console.log(out_rpc_link); + console.log("End: Test_SetLinkOffline"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteLink', Delete a link */ +async function Test_DeleteLink(): Promise +{ + console.log("Begin: Test_DeleteLink"); + let in_rpc_link: VPN.VpnRpcLink = new VPN.VpnRpcLink( + { + HubName_str: hub_name, + AccountName_utf: "linktest2", + }); + let out_rpc_link: VPN.VpnRpcLink = await api.DeleteLink(in_rpc_link); + console.log(out_rpc_link); + console.log("End: Test_DeleteLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'RenameLink', Rename link (cascade connection) */ +async function Test_RenameLink(): Promise +{ + console.log("Begin: Test_RenameLink"); + let in_rpc_rename_link: VPN.VpnRpcRenameLink = new VPN.VpnRpcRenameLink( + { + HubName_str: hub_name, + OldAccountName_utf: "linktest", + NewAccountName_utf: "linktest2", + }); + let out_rpc_rename_link: VPN.VpnRpcRenameLink = await api.RenameLink(in_rpc_rename_link); + console.log(out_rpc_rename_link); + console.log("End: Test_RenameLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateLink', Create a new link(cascade) */ +async function Test_CreateLink(): Promise +{ + console.log("Begin: Test_CreateLink"); + let in_rpc_create_link: VPN.VpnRpcCreateLink = new VPN.VpnRpcCreateLink( + { + HubName_Ex_str: hub_name, + CheckServerCert_bool: false, + AccountName_utf: "linktest", + Hostname_str: "1.2.3.4", + Port_u32: 443, + ProxyType_u32: 0, + HubName_str: "ABC", + MaxConnection_u32: 16, + UseEncrypt_bool: true, + UseCompress_bool: false, + HalfConnection_bool: true, + AdditionalConnectionInterval_u32: 2, + ConnectionDisconnectSpan_u32: 24, + AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword, + Username_str: "181012", + PlainPassword_str: "microsoft", + HashedPassword_bin: new Uint8Array([ ]), + ClientX_bin: new Uint8Array([ ]), + ClientK_bin: new Uint8Array([ ]), + ["policy:DHCPFilter_bool"]: true, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: true, + SecPol_CheckMac_bool: true, + SecPol_CheckIP_bool: true, + ["policy:ArpDhcpOnly_bool"]: true, + ["policy:PrivacyFilter_bool"]: true, + ["policy:NoServer_bool"]: true, + ["policy:NoBroadcastLimiter_bool"]: true, + ["policy:MaxMac_u32"]: 32, + ["policy:MaxIP_u32"]: 64, + ["policy:MaxUpload_u32"]: 960000, + ["policy:MaxDownload_u32"]: 1280000, + ["policy:RSandRAFilter_bool"]: true, + SecPol_RAFilter_bool: true, + ["policy:DHCPv6Filter_bool"]: true, + ["policy:DHCPv6NoServer_bool"]: true, + SecPol_CheckIPv6_bool: true, + ["policy:NoServerV6_bool"]: true, + ["policy:MaxIPv6_u32"]: 127, + ["policy:FilterIPv4_bool"]: true, + ["policy:FilterIPv6_bool"]: true, + ["policy:FilterNonIP_bool"]: true, + ["policy:NoIPv6DefaultRouterInRA_bool"]: true, + ["policy:VLanId_u32"]: 123, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_create_link: VPN.VpnRpcCreateLink = await api.CreateLink(in_rpc_create_link); + console.log(out_rpc_create_link); + console.log("End: Test_CreateLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetLink', Get link configuration */ +async function Test_GetLink(): Promise +{ + console.log("Begin: Test_GetLink"); + let in_rpc_create_link: VPN.VpnRpcCreateLink = new VPN.VpnRpcCreateLink( + { + HubName_Ex_str: hub_name, + AccountName_utf: "linktest", + }); + let out_rpc_create_link: VPN.VpnRpcCreateLink = await api.GetLink(in_rpc_create_link); + console.log(out_rpc_create_link); + console.log("End: Test_GetLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetLink', Set link configuration */ +async function Test_SetLink(): Promise +{ + console.log("Begin: Test_SetLink"); + let in_rpc_create_link: VPN.VpnRpcCreateLink = new VPN.VpnRpcCreateLink( + { + HubName_Ex_str: hub_name, + CheckServerCert_bool: false, + AccountName_utf: "linktest", + Hostname_str: "1.2.3.4", + Port_u32: 443, + ProxyType_u32: 0, + HubName_str: "ABC", + MaxConnection_u32: 16, + UseEncrypt_bool: true, + UseCompress_bool: false, + HalfConnection_bool: true, + AdditionalConnectionInterval_u32: 2, + ConnectionDisconnectSpan_u32: 24, + AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword, + Username_str: "181012", + PlainPassword_str: "microsoft", + HashedPassword_bin: new Uint8Array([ ]), + ClientX_bin: new Uint8Array([ ]), + ClientK_bin: new Uint8Array([ ]), + ["policy:DHCPFilter_bool"]: true, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: true, + SecPol_CheckMac_bool: true, + SecPol_CheckIP_bool: true, + ["policy:ArpDhcpOnly_bool"]: true, + ["policy:PrivacyFilter_bool"]: true, + ["policy:NoServer_bool"]: true, + ["policy:NoBroadcastLimiter_bool"]: true, + ["policy:MaxMac_u32"]: 32, + ["policy:MaxIP_u32"]: 64, + ["policy:MaxUpload_u32"]: 960000, + ["policy:MaxDownload_u32"]: 1280000, + ["policy:RSandRAFilter_bool"]: true, + SecPol_RAFilter_bool: true, + ["policy:DHCPv6Filter_bool"]: true, + ["policy:DHCPv6NoServer_bool"]: true, + SecPol_CheckIPv6_bool: true, + ["policy:NoServerV6_bool"]: true, + ["policy:MaxIPv6_u32"]: 127, + ["policy:FilterIPv4_bool"]: true, + ["policy:FilterIPv6_bool"]: true, + ["policy:FilterNonIP_bool"]: true, + ["policy:NoIPv6DefaultRouterInRA_bool"]: true, + ["policy:VLanId_u32"]: 123, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_create_link: VPN.VpnRpcCreateLink = await api.SetLink(in_rpc_create_link); + console.log(out_rpc_create_link); + console.log("End: Test_SetLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumLink', Enumerate links */ +async function Test_EnumLink(): Promise +{ + console.log("Begin: Test_EnumLink"); + let in_rpc_enum_link: VPN.VpnRpcEnumLink = new VPN.VpnRpcEnumLink( + { + HubName_str: hub_name, + }); + let out_rpc_enum_link: VPN.VpnRpcEnumLink = await api.EnumLink(in_rpc_enum_link); + console.log(out_rpc_enum_link); + console.log("End: Test_EnumLink"); + console.log("-----"); + console.log(); + return out_rpc_enum_link; +} + +/** API test for 'GetLinkStatus', Get link status */ +async function Test_GetLinkStatus(name: string): Promise +{ + console.log("Begin: Test_GetLinkStatus"); + let in_rpc_link_status: VPN.VpnRpcLinkStatus = new VPN.VpnRpcLinkStatus( + { + HubName_Ex_str: hub_name, + AccountName_utf: name, + }); + let out_rpc_link_status: VPN.VpnRpcLinkStatus = await api.GetLinkStatus(in_rpc_link_status); + console.log(out_rpc_link_status); + console.log("End: Test_GetLinkStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddAccess', Add access list entry */ +async function Test_AddAccess(): Promise +{ + console.log("Begin: Test_AddAccess"); + let in_rpc_add_access_ipv4: VPN.VpnRpcAddAccess = new VPN.VpnRpcAddAccess( + { + HubName_str: hub_name, + AccessListSingle: [ new VPN.VpnAccess( + { + Note_utf: "IPv4 Test", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: false, + SrcIpAddress_ip: "192.168.0.0", + SrcSubnetMask_ip: "255.255.255.0", + DestIpAddress_ip: "10.0.0.0", + DestSubnetMask_ip: "255.255.0.0", + Protocol_u32: VPN.VpnIpProtocolNumber.TCP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), ], + }); + let out_rpc_add_access_ipv4: VPN.VpnRpcAddAccess = await api.AddAccess(in_rpc_add_access_ipv4); + let in_rpc_add_access_ipv6: VPN.VpnRpcAddAccess = new VPN.VpnRpcAddAccess( + { + HubName_str: hub_name, + AccessListSingle: [ new VPN.VpnAccess( + { + Note_utf: "IPv6 Test", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: true, + SrcIpAddress6_bin: new Uint8Array([ 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + SrcSubnetMask6_bin: new Uint8Array([ 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + Protocol_u32: VPN.VpnIpProtocolNumber.UDP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), ], + }); + let out_rpc_add_access_ipv6: VPN.VpnRpcAddAccess = await api.AddAccess(in_rpc_add_access_ipv6); + console.log("End: Test_AddAccess"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteAccess', Delete access list entry */ +async function Test_DeleteAccess(): Promise +{ + console.log("Begin: Test_DeleteAccess"); + let in_rpc_delete_access: VPN.VpnRpcDeleteAccess = new VPN.VpnRpcDeleteAccess( + { + HubName_str: hub_name, + Id_u32: 1, + }); + let out_rpc_delete_access: VPN.VpnRpcDeleteAccess = await api.DeleteAccess(in_rpc_delete_access); + console.log(out_rpc_delete_access); + console.log("End: Test_DeleteAccess"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumAccess', Get access list */ +async function Test_EnumAccess(): Promise +{ + console.log("Begin: Test_EnumAccess"); + let in_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = new VPN.VpnRpcEnumAccessList( + { + HubName_str: hub_name, + }); + let out_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = await api.EnumAccess(in_rpc_enum_access_list); + console.log(out_rpc_enum_access_list); + console.log("End: Test_EnumAccess"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetAccessList', Set access list */ +async function Test_SetAccessList(): Promise +{ + console.log("Begin: Test_SetAccessList"); + let in_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = new VPN.VpnRpcEnumAccessList( + { + HubName_str: hub_name, + AccessList: [ new VPN.VpnAccess( + { + Note_utf: "IPv4 Test 2", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: false, + SrcIpAddress_ip: "192.168.0.0", + SrcSubnetMask_ip: "255.255.255.0", + DestIpAddress_ip: "10.0.0.0", + DestSubnetMask_ip: "255.255.0.0", + Protocol_u32: VPN.VpnIpProtocolNumber.TCP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), new VPN.VpnAccess( + { + Note_utf: "IPv6 Test 2", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: true, + SrcIpAddress6_bin: new Uint8Array([ 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + SrcSubnetMask6_bin: new Uint8Array([ 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + Protocol_u32: VPN.VpnIpProtocolNumber.UDP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), ], + }); + let out_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = await api.SetAccessList(in_rpc_enum_access_list); + console.log(out_rpc_enum_access_list); + console.log("End: Test_SetAccessList"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateUser', Create a user */ +async function Test_CreateUser(): Promise +{ + console.log("Begin: Test_CreateUser"); + let in_rpc_set_user: VPN.VpnRpcSetUser = new VPN.VpnRpcSetUser( + { + HubName_str: hub_name, + Name_str: "test1", + Realname_utf: "Cat man", + Note_utf: "Hey!!!", + AuthType_u32: VPN.VpnRpcUserAuthType.Password, + Auth_Password_str: "microsoft", + UserX_bin: new Uint8Array([ ]), + Serial_bin: new Uint8Array([ ]), + CommonName_utf: "", + RadiusUsername_utf: "", + NtUsername_utf: "", + ExpireTime_dt: new Date(2019, 1, 1), + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_user: VPN.VpnRpcSetUser = await api.CreateUser(in_rpc_set_user); + console.log("End: Test_CreateUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetUser', Set user setting */ +async function Test_SetUser(): Promise +{ + console.log("Begin: Test_SetUser"); + let in_rpc_set_user: VPN.VpnRpcSetUser = new VPN.VpnRpcSetUser( + { + HubName_str: hub_name, + Name_str: "test1", + Realname_utf: "Cat man", + Note_utf: "Hey!!!", + GroupName_str: "group1", + AuthType_u32: VPN.VpnRpcUserAuthType.Anonymous, + Auth_Password_str: "", + UserX_bin: new Uint8Array([ ]), + Serial_bin: new Uint8Array([ ]), + CommonName_utf: "", + RadiusUsername_utf: "", + NtUsername_utf: "", + ExpireTime_dt: new Date(2019, 1, 1), + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_user: VPN.VpnRpcSetUser = await api.SetUser(in_rpc_set_user); + console.log("End: Test_SetUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetUser', Get user setting */ +async function Test_GetUser(): Promise +{ + console.log("Begin: Test_GetUser"); + let in_rpc_set_user: VPN.VpnRpcSetUser = new VPN.VpnRpcSetUser( + { + HubName_str: hub_name, + Name_str: "test1", + }); + let out_rpc_set_user: VPN.VpnRpcSetUser = await api.GetUser(in_rpc_set_user); + console.log(out_rpc_set_user); + console.log("End: Test_GetUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteUser', Delete a user */ +async function Test_DeleteUser(): Promise +{ + console.log("Begin: Test_DeleteUser"); + let in_rpc_delete_user: VPN.VpnRpcDeleteUser = new VPN.VpnRpcDeleteUser( + { + HubName_str: hub_name, + Name_str: "test1", + }); + let out_rpc_delete_user: VPN.VpnRpcDeleteUser = await api.DeleteUser(in_rpc_delete_user); + console.log("End: Test_DeleteUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumUser', Enumerate users */ +async function Test_EnumUser(): Promise +{ + console.log("Begin: Test_EnumUser"); + let in_rpc_enum_user: VPN.VpnRpcEnumUser = new VPN.VpnRpcEnumUser( + { + HubName_str: hub_name, + }); + let out_rpc_enum_user: VPN.VpnRpcEnumUser = await api.EnumUser(in_rpc_enum_user); + console.log(out_rpc_enum_user); + console.log("End: Test_EnumUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateGroup', Create a group */ +async function Test_CreateGroup(): Promise +{ + console.log("Begin: Test_CreateGroup"); + let in_rpc_set_group: VPN.VpnRpcSetGroup = new VPN.VpnRpcSetGroup( + { + HubName_str: hub_name, + Name_str: "group1", + Realname_utf: "Cat group", + Note_utf: "This is it! This is it!!", + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_group: VPN.VpnRpcSetGroup = await api.CreateGroup(in_rpc_set_group); + console.log(out_rpc_set_group); + console.log("End: Test_CreateGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetGroup', Set group setting */ +async function Test_SetGroup(): Promise +{ + console.log("Begin: Test_SetGroup"); + let in_rpc_set_group: VPN.VpnRpcSetGroup = new VPN.VpnRpcSetGroup( + { + HubName_str: hub_name, + Name_str: "group1", + Realname_utf: "Cat group 2", + Note_utf: "This is it! This is it!! 2", + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_group: VPN.VpnRpcSetGroup = await api.SetGroup(in_rpc_set_group); + console.log(out_rpc_set_group); + console.log("End: Test_SetGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetGroup', Get group information */ +async function Test_GetGroup(): Promise +{ + console.log("Begin: Test_GetGroup"); + let in_rpc_set_group: VPN.VpnRpcSetGroup = new VPN.VpnRpcSetGroup( + { + HubName_str: hub_name, + Name_str: "group1", + }); + let out_rpc_set_group: VPN.VpnRpcSetGroup = await api.GetGroup(in_rpc_set_group); + console.log(out_rpc_set_group); + console.log("End: Test_GetGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteGroup', Delete a group */ +async function Test_DeleteGroup(): Promise +{ + console.log("Begin: Test_DeleteGroup"); + let in_rpc_delete_user: VPN.VpnRpcDeleteUser = new VPN.VpnRpcDeleteUser( + { + HubName_str: hub_name, + Name_str: "group1", + }); + let out_rpc_delete_user: VPN.VpnRpcDeleteUser = await api.DeleteGroup(in_rpc_delete_user); + console.log(out_rpc_delete_user); + console.log("End: Test_DeleteGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumGroup', Enumerate groups */ +async function Test_EnumGroup(): Promise +{ + console.log("Begin: Test_EnumGroup"); + let in_rpc_enum_group: VPN.VpnRpcEnumGroup = new VPN.VpnRpcEnumGroup( + { + HubName_str: hub_name, + }); + let out_rpc_enum_group: VPN.VpnRpcEnumGroup = await api.EnumGroup(in_rpc_enum_group); + console.log(out_rpc_enum_group); + console.log("End: Test_EnumGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumSession', Enumerate sessions */ +async function Test_EnumSession(): Promise +{ + console.log("Begin: Test_EnumSession"); + let in_rpc_enum_session: VPN.VpnRpcEnumSession = new VPN.VpnRpcEnumSession( + { + HubName_str: hub_name, + }); + let out_rpc_enum_session: VPN.VpnRpcEnumSession = await api.EnumSession(in_rpc_enum_session); + console.log(out_rpc_enum_session); + console.log("End: Test_EnumSession"); + console.log("-----"); + console.log(); + return out_rpc_enum_session; +} + +/** API test for 'GetSessionStatus', Get session status */ +async function Test_GetSessionStatus(session_name: string): Promise +{ + console.log("Begin: Test_GetSessionStatus"); + let in_rpc_session_status: VPN.VpnRpcSessionStatus = new VPN.VpnRpcSessionStatus( + { + HubName_str: hub_name, + Name_str: session_name, + }); + let out_rpc_session_status: VPN.VpnRpcSessionStatus = await api.GetSessionStatus(in_rpc_session_status); + console.log(out_rpc_session_status); + console.log("End: Test_GetSessionStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteSession', Delete a session */ +async function Test_DeleteSession(session_id: string): Promise +{ + console.log("Begin: Test_DeleteSession"); + let in_rpc_delete_session: VPN.VpnRpcDeleteSession = new VPN.VpnRpcDeleteSession( + { + HubName_str: hub_name, + Name_str: session_id, + }); + let out_rpc_delete_session: VPN.VpnRpcDeleteSession = await api.DeleteSession(in_rpc_delete_session); + console.log(out_rpc_delete_session); + console.log("End: Test_DeleteSession"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumMacTable', Get MAC address table */ +async function Test_EnumMacTable(): Promise +{ + console.log("Begin: Test_EnumMacTable"); + let in_rpc_enum_mac_table: VPN.VpnRpcEnumMacTable = new VPN.VpnRpcEnumMacTable( + { + HubName_str: hub_name, + }); + let out_rpc_enum_mac_table: VPN.VpnRpcEnumMacTable = await api.EnumMacTable(in_rpc_enum_mac_table); + console.log(out_rpc_enum_mac_table); + console.log("End: Test_EnumMacTable"); + console.log("-----"); + console.log(); + return out_rpc_enum_mac_table; +} + +/** API test for 'DeleteMacTable', Delete MAC address table entry */ +async function Test_DeleteMacTable(key32: number): Promise +{ + console.log("Begin: Test_DeleteMacTable"); + let in_rpc_delete_table: VPN.VpnRpcDeleteTable = new VPN.VpnRpcDeleteTable( + { + HubName_str: hub_name, + Key_u32: key32, + }); + let out_rpc_delete_table: VPN.VpnRpcDeleteTable = await api.DeleteMacTable(in_rpc_delete_table); + console.log("End: Test_DeleteMacTable"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumIpTable', Get IP address table */ +async function Test_EnumIpTable(): Promise +{ + console.log("Begin: Test_EnumIpTable"); + let in_rpc_enum_ip_table: VPN.VpnRpcEnumIpTable = new VPN.VpnRpcEnumIpTable( + { + HubName_str: hub_name, + }); + let out_rpc_enum_ip_table: VPN.VpnRpcEnumIpTable = await api.EnumIpTable(in_rpc_enum_ip_table); + console.log(out_rpc_enum_ip_table); + console.log("End: Test_EnumIpTable"); + console.log("-----"); + console.log(); + return out_rpc_enum_ip_table; +} + +/** API test for 'DeleteIpTable', Delete IP address table entry */ +async function Test_DeleteIpTable(key32: number): Promise +{ + console.log("Begin: Test_DeleteIpTable"); + let in_rpc_delete_table: VPN.VpnRpcDeleteTable = new VPN.VpnRpcDeleteTable( + { + HubName_str: hub_name, + Key_u32: key32, + }); + let out_rpc_delete_table: VPN.VpnRpcDeleteTable = await api.DeleteIpTable(in_rpc_delete_table); + console.log(out_rpc_delete_table); + console.log("End: Test_DeleteIpTable"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetKeep', Set keep-alive function setting */ +async function Test_SetKeep(): Promise +{ + console.log("Begin: Test_SetKeep"); + let in_rpc_keep: VPN.VpnRpcKeep = new VPN.VpnRpcKeep( + { + UseKeepConnect_bool: true, + KeepConnectHost_str: "www.softether.org", + KeepConnectPort_u32: 123, + KeepConnectProtocol_u32: VPN.VpnRpcKeepAliveProtocol.UDP, + KeepConnectInterval_u32: 1, + }); + let out_rpc_keep: VPN.VpnRpcKeep = await api.SetKeep(in_rpc_keep); + console.log(out_rpc_keep); + console.log("End: Test_SetKeep"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetKeep', Get keep-alive function setting */ +async function Test_GetKeep(): Promise +{ + console.log("Begin: Test_GetKeep"); + let in_rpc_keep: VPN.VpnRpcKeep = new VPN.VpnRpcKeep( + { + }); + let out_rpc_keep: VPN.VpnRpcKeep = await api.GetKeep(in_rpc_keep); + console.log(out_rpc_keep); + console.log("End: Test_GetKeep"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnableSecureNAT', Enable SecureNAT function of the hub */ +async function Test_EnableSecureNAT(): Promise +{ + console.log("Begin: Test_EnableSecureNAT"); + let in_rpc_hub: VPN.VpnRpcHub = new VPN.VpnRpcHub( + { + HubName_str: hub_name, + }); + let out_rpc_hub: VPN.VpnRpcHub = await api.EnableSecureNAT(in_rpc_hub); + console.log(out_rpc_hub); + console.log("End: Test_EnableSecureNAT"); + console.log("-----"); + console.log(); +} + +/** API test for 'DisableSecureNAT', Disable the SecureNAT function of the hub */ +async function Test_DisableSecureNAT(): Promise +{ + console.log("Begin: Test_DisableSecureNAT"); + let in_rpc_hub: VPN.VpnRpcHub = new VPN.VpnRpcHub( + { + HubName_str: hub_name, + }); + let out_rpc_hub: VPN.VpnRpcHub = await api.DisableSecureNAT(in_rpc_hub); + console.log(out_rpc_hub); + console.log("End: Test_DisableSecureNAT"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetSecureNATOption', Set SecureNAT options */ +async function Test_SetSecureNATOption(): Promise +{ + console.log("Begin: Test_SetSecureNATOption"); + let in_vh_option: VPN.VpnVhOption = new VPN.VpnVhOption( + { + RpcHubName_str: hub_name, + MacAddress_bin: new Uint8Array([ 0x00, 0xAC, 0x00, 0x11, 0x22, 0x33, ]), + Ip_ip: "10.0.0.254", + Mask_ip: "255.255.255.0", + UseNat_bool: true, + Mtu_u32: 1200, + NatTcpTimeout_u32: 100, + NatUdpTimeout_u32: 50, + UseDhcp_bool: true, + DhcpLeaseIPStart_ip: "10.0.0.101", + DhcpLeaseIPEnd_ip: "10.0.0.199", + DhcpSubnetMask_ip: "255.255.255.0", + DhcpExpireTimeSpan_u32: 3600, + DhcpGatewayAddress_ip: "10.0.0.254", + DhcpDnsServerAddress_ip: "10.0.0.254", + DhcpDnsServerAddress2_ip: "8.8.8.8", + DhcpDomainName_str: "lab.coe.ad.jp", + SaveLog_bool: true, + ApplyDhcpPushRoutes_bool: false, + DhcpPushRoutes_str: "", + }); + let out_vh_option: VPN.VpnVhOption = await api.SetSecureNATOption(in_vh_option); + console.log(out_vh_option); + console.log("End: Test_SetSecureNATOption"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSecureNATOption', Get SecureNAT options */ +async function Test_GetSecureNATOption(): Promise +{ + console.log("Begin: Test_GetSecureNATOption"); + let in_vh_option: VPN.VpnVhOption = new VPN.VpnVhOption( + { + RpcHubName_str: hub_name, + }); + let out_vh_option: VPN.VpnVhOption = await api.GetSecureNATOption(in_vh_option); + console.log(out_vh_option); + console.log("End: Test_GetSecureNATOption"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumNAT', Enumerate NAT entries of the SecureNAT */ +async function Test_EnumNAT(): Promise +{ + console.log("Begin: Test_EnumNAT"); + let in_rpc_enum_nat: VPN.VpnRpcEnumNat = new VPN.VpnRpcEnumNat( + { + HubName_str: hub_name, + }); + let out_rpc_enum_nat: VPN.VpnRpcEnumNat = await api.EnumNAT(in_rpc_enum_nat); + console.log(out_rpc_enum_nat); + console.log("End: Test_EnumNAT"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumDHCP', Enumerate DHCP entries */ +async function Test_EnumDHCP(): Promise +{ + console.log("Begin: Test_EnumDHCP"); + let in_rpc_enum_dhcp: VPN.VpnRpcEnumDhcp = new VPN.VpnRpcEnumDhcp( + { + HubName_str: hub_name, + }); + let out_rpc_enum_dhcp: VPN.VpnRpcEnumDhcp = await api.EnumDHCP(in_rpc_enum_dhcp); + console.log(out_rpc_enum_dhcp); + console.log("End: Test_EnumDHCP"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSecureNATStatus', Get status of the SecureNAT */ +async function Test_GetSecureNATStatus(): Promise +{ + console.log("Begin: Test_GetSecureNATStatus"); + let in_rpc_nat_status: VPN.VpnRpcNatStatus = new VPN.VpnRpcNatStatus( + { + HubName_str: hub_name, + }); + let out_rpc_nat_status: VPN.VpnRpcNatStatus = await api.GetSecureNATStatus(in_rpc_nat_status); + console.log(out_rpc_nat_status); + console.log("End: Test_GetSecureNATStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumEthernet', Enumerate Ethernet devices */ +async function Test_EnumEthernet(): Promise +{ + console.log("Begin: Test_EnumEthernet"); + let out_rpc_enum_eth: VPN.VpnRpcEnumEth = await api.EnumEthernet(); + console.log(out_rpc_enum_eth); + console.log("End: Test_EnumEthernet"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddLocalBridge', Add a new local bridge */ +async function Test_AddLocalBridge(): Promise +{ + console.log("Begin: Test_AddLocalBridge"); + let in_rpc_localbridge: VPN.VpnRpcLocalBridge = new VPN.VpnRpcLocalBridge( + { + DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str: hub_name, + }); + let out_rpc_localbridge: VPN.VpnRpcLocalBridge = await api.AddLocalBridge(in_rpc_localbridge); + console.log(out_rpc_localbridge); + console.log("End: Test_AddLocalBridge"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteLocalBridge', Delete a local bridge */ +async function Test_DeleteLocalBridge(): Promise +{ + console.log("Begin: Test_DeleteLocalBridge"); + let in_rpc_localbridge: VPN.VpnRpcLocalBridge = new VPN.VpnRpcLocalBridge( + { + DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str: hub_name, + }); + let out_rpc_localbridge: VPN.VpnRpcLocalBridge = await api.DeleteLocalBridge(in_rpc_localbridge); + console.log(out_rpc_localbridge); + console.log("End: Test_DeleteLocalBridge"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumLocalBridge', Enumerate local bridges */ +async function Test_EnumLocalBridge(): Promise +{ + console.log("Begin: Test_EnumLocalBridge"); + let out_rpc_enum_localbridge: VPN.VpnRpcEnumLocalBridge = await api.EnumLocalBridge(); + console.log(out_rpc_enum_localbridge); + console.log("End: Test_EnumLocalBridge"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetBridgeSupport', Get availability to localbridge function */ +async function Test_GetBridgeSupport(): Promise +{ + console.log("Begin: Test_GetBridgeSupport"); + let out_rpc_bridge_support: VPN.VpnRpcBridgeSupport = await api.GetBridgeSupport(); + console.log(out_rpc_bridge_support); + console.log("End: Test_GetBridgeSupport"); + console.log("-----"); + console.log(); +} + +/** API test for 'RebootServer', Reboot server itself */ +async function Test_RebootServer(): Promise +{ + console.log("Begin: Test_RebootServer"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + }); + let out_rpc_test: VPN.VpnRpcTest = await api.RebootServer(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_RebootServer"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetCaps', Get capabilities */ +async function Test_GetCaps(): Promise +{ + console.log("Begin: Test_GetCaps"); + let out_capslist: VPN.VpnCapslist = await api.GetCaps(); + console.log(out_capslist); + console.log("End: Test_GetCaps"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetConfig', Get configuration file stream */ +async function Test_GetConfig(): Promise +{ + console.log("Begin: Test_GetConfig"); + let out_rpc_config: VPN.VpnRpcConfig = await api.GetConfig(); + console.log(out_rpc_config); + console.log("End: Test_GetConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetConfig', Overwrite configuration file by specified data */ +async function Test_SetConfig(): Promise +{ + console.log("Begin: Test_SetConfig"); + let in_rpc_config: VPN.VpnRpcConfig = new VPN.VpnRpcConfig( + { + FileData_bin: new Uint8Array([ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, ]), + }); + let out_rpc_config: VPN.VpnRpcConfig = await api.SetConfig(in_rpc_config); + console.log("End: Test_SetConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetDefaultHubAdminOptions', Get default hub administration options */ +async function Test_GetDefaultHubAdminOptions(): Promise +{ + console.log("Begin: Test_GetDefaultHubAdminOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.GetDefaultHubAdminOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_GetDefaultHubAdminOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubAdminOptions', Get hub administration options */ +async function Test_GetHubAdminOptions(): Promise +{ + console.log("Begin: Test_GetHubAdminOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.GetHubAdminOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_GetHubAdminOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubAdminOptions', Set hub administration options */ +async function Test_SetHubAdminOptions(): Promise +{ + console.log("Begin: Test_SetHubAdminOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + AdminOptionList: [ new VPN.VpnAdminOption( + { + Name_str: "no_securenat_enablenat", + Value_u32: 1, + }), ], + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.SetHubAdminOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_SetHubAdminOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubExtOptions', Get hub extended options */ +async function Test_GetHubExtOptions(): Promise +{ + console.log("Begin: Test_GetHubExtOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.GetHubExtOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_GetHubExtOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubExtOptions', Set hub extended options */ +async function Test_SetHubExtOptions(): Promise +{ + console.log("Begin: Test_SetHubExtOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + AdminOptionList: [ new VPN.VpnAdminOption( + { + Name_str: "SecureNAT_RandomizeAssignIp", + Value_u32: 1, + }), ], + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.SetHubExtOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_SetHubExtOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddL3Switch', Add a new virtual layer-3 switch */ +async function Test_AddL3Switch(): Promise +{ + console.log("Begin: Test_AddL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.AddL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_AddL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelL3Switch', Delete a virtual layer-3 switch */ +async function Test_DelL3Switch(): Promise +{ + console.log("Begin: Test_DelL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.DelL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_DelL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumL3Switch', Enumerate virtual layer-3 switches */ +async function Test_EnumL3Switch(): Promise +{ + console.log("Begin: Test_EnumL3Switch"); + let out_rpc_enum_l3sw: VPN.VpnRpcEnumL3Sw = await api.EnumL3Switch(); + console.log(out_rpc_enum_l3sw); + console.log("End: Test_EnumL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'StartL3Switch', Start a virtual layer-3 switch */ +async function Test_StartL3Switch(): Promise +{ + console.log("Begin: Test_StartL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.StartL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_StartL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'StopL3Switch', Stop a virtual layer-3 switch */ +async function Test_StopL3Switch(): Promise +{ + console.log("Begin: Test_StopL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.StopL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_StopL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddL3If', Add new virtual interface on virtual L3 switch */ +async function Test_AddL3If(): Promise +{ + console.log("Begin: Test_AddL3If"); + let in_rpc_l3if: VPN.VpnRpcL3If = new VPN.VpnRpcL3If( + { + Name_str: "L3SW1", + HubName_str: hub_name, + IpAddress_ip: "192.168.0.1", + SubnetMask_ip: "255.255.255.0", + }); + let out_rpc_l3if: VPN.VpnRpcL3If = await api.AddL3If(in_rpc_l3if); + console.log(out_rpc_l3if); + console.log("End: Test_AddL3If"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelL3If', Delete a virtual interface on virtual L3 switch */ +async function Test_DelL3If(): Promise +{ + console.log("Begin: Test_DelL3If"); + let in_rpc_l3if: VPN.VpnRpcL3If = new VPN.VpnRpcL3If( + { + Name_str: "L3SW1", + HubName_str: hub_name, + }); + let out_rpc_l3if: VPN.VpnRpcL3If = await api.DelL3If(in_rpc_l3if); + console.log(out_rpc_l3if); + console.log("End: Test_DelL3If"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumL3If', Enumerate virtual interfaces on virtual L3 switch */ +async function Test_EnumL3If(): Promise +{ + console.log("Begin: Test_EnumL3If"); + let in_rpc_enum_l3if: VPN.VpnRpcEnumL3If = new VPN.VpnRpcEnumL3If( + { + Name_str: "L3SW1", + }); + let out_rpc_enum_l3if: VPN.VpnRpcEnumL3If = await api.EnumL3If(in_rpc_enum_l3if); + console.log(out_rpc_enum_l3if); + console.log("End: Test_EnumL3If"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddL3Table', Add new routing table entry on virtual L3 switch */ +async function Test_AddL3Table(): Promise +{ + console.log("Begin: Test_AddL3Table"); + let in_rpc_l3table: VPN.VpnRpcL3Table = new VPN.VpnRpcL3Table( + { + Name_str: "L3SW1", + NetworkAddress_ip: "10.0.0.0", + SubnetMask_ip: "255.0.0.0", + GatewayAddress_ip: "192.168.7.1", + Metric_u32: 10, + }); + let out_rpc_l3table: VPN.VpnRpcL3Table = await api.AddL3Table(in_rpc_l3table); + console.log(out_rpc_l3table); + console.log("End: Test_AddL3Table"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelL3Table', Delete routing table entry on virtual L3 switch */ +async function Test_DelL3Table(): Promise +{ + console.log("Begin: Test_DelL3Table"); + let in_rpc_l3table: VPN.VpnRpcL3Table = new VPN.VpnRpcL3Table( + { + Name_str: "L3SW1", + NetworkAddress_ip: "10.0.0.0", + SubnetMask_ip: "255.0.0.0", + GatewayAddress_ip: "192.168.7.1", + Metric_u32: 10, + }); + let out_rpc_l3table: VPN.VpnRpcL3Table = await api.DelL3Table(in_rpc_l3table); + console.log(out_rpc_l3table); + console.log("End: Test_DelL3Table"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumL3Table', Get routing table on virtual L3 switch */ +async function Test_EnumL3Table(): Promise +{ + console.log("Begin: Test_EnumL3Table"); + let in_rpc_enum_l3table: VPN.VpnRpcEnumL3Table = new VPN.VpnRpcEnumL3Table( + { + Name_str: "L3SW1", + }); + let out_rpc_enum_l3table: VPN.VpnRpcEnumL3Table = await api.EnumL3Table(in_rpc_enum_l3table); + console.log(out_rpc_enum_l3table); + console.log("End: Test_EnumL3Table"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumCrl', Get CRL (Certificate Revocation List) index */ +async function Test_EnumCrl(): Promise +{ + console.log("Begin: Test_EnumCrl"); + let in_rpc_enum_crl: VPN.VpnRpcEnumCrl = new VPN.VpnRpcEnumCrl( + { + HubName_str: hub_name, + }); + let out_rpc_enum_crl: VPN.VpnRpcEnumCrl = await api.EnumCrl(in_rpc_enum_crl); + console.log(out_rpc_enum_crl); + console.log("End: Test_EnumCrl"); + console.log("-----"); + console.log(); + return out_rpc_enum_crl; +} + +/** API test for 'AddCrl', Add new CRL (Certificate Revocation List) entry */ +async function Test_AddCrl(): Promise +{ + console.log("Begin: Test_AddCrl"); + let in_rpc_crl: VPN.VpnRpcCrl = new VPN.VpnRpcCrl( + { + HubName_str: hub_name, + CommonName_utf: "CN", + Organization_utf: "Org", + Unit_utf: "ICSCOE", + Country_utf: "JP", + State_utf: "Ibaraki", + Local_utf: "Tsukuba", + Serial_bin: new Uint8Array([ 1, 2, 3, 4, 5, ]), + DigestMD5_bin: new Uint8Array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ]), + DigestSHA1_bin: new Uint8Array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ]), + }); + let out_rpc_crl: VPN.VpnRpcCrl = await api.AddCrl(in_rpc_crl); + console.log(out_rpc_crl); + console.log("End: Test_AddCrl"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelCrl', Delete CRL (Certificate Revocation List) entry */ +async function Test_DelCrl(key: number): Promise +{ + console.log("Begin: Test_DelCrl"); + let in_rpc_crl: VPN.VpnRpcCrl = new VPN.VpnRpcCrl( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_crl: VPN.VpnRpcCrl = await api.DelCrl(in_rpc_crl); + console.log(out_rpc_crl); + console.log("End: Test_DelCrl"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetCrl', Get CRL (Certificate Revocation List) entry */ +async function Test_GetCrl(key: number): Promise +{ + console.log("Begin: Test_GetCrl"); + let in_rpc_crl: VPN.VpnRpcCrl = new VPN.VpnRpcCrl( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_crl: VPN.VpnRpcCrl = await api.GetCrl(in_rpc_crl); + console.log(out_rpc_crl); + console.log("End: Test_GetCrl"); + console.log("-----"); + console.log(); + return out_rpc_crl; +} + +/** API test for 'SetCrl', Set CRL (Certificate Revocation List) entry */ +async function Test_SetCrl(crl: VPN.VpnRpcCrl): Promise +{ + console.log("Begin: Test_SetCrl"); + let out_rpc_crl: VPN.VpnRpcCrl = await api.SetCrl(crl); + console.log(out_rpc_crl); + console.log("End: Test_SetCrl"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetAcList', Set access control list */ +async function Test_SetAcList(): Promise +{ + console.log("Begin: Test_SetAcList"); + let in_rpc_ac_list: VPN.VpnRpcAcList = new VPN.VpnRpcAcList( + { + HubName_str: hub_name, + ACList: [ new VPN.VpnAc( + { + Deny_bool: true, + IpAddress_ip: "192.168.0.0", + SubnetMask_ip: "255.255.0.0", + Masked_bool: true, + Priority_u32: 123, + }), new VPN.VpnAc( + { + Deny_bool: false, + IpAddress_ip: "fe80::", + SubnetMask_ip: "8", + Masked_bool: true, + Priority_u32: 123, + }), ], + }); + let out_rpc_ac_list: VPN.VpnRpcAcList = await api.SetAcList(in_rpc_ac_list); + console.log(out_rpc_ac_list); + console.log("End: Test_SetAcList"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetAcList', Get access control list */ +async function Test_GetAcList(): Promise +{ + console.log("Begin: Test_GetAcList"); + let in_rpc_ac_list: VPN.VpnRpcAcList = new VPN.VpnRpcAcList( + { + HubName_str: hub_name, + }); + let out_rpc_ac_list: VPN.VpnRpcAcList = await api.GetAcList(in_rpc_ac_list); + console.log(out_rpc_ac_list); + console.log("End: Test_GetAcList"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumLogFile', Enumerate log files */ +async function Test_EnumLogFile(): Promise +{ + console.log("Begin: Test_EnumLogFile"); + let out_rpc_enum_log_file: VPN.VpnRpcEnumLogFile = await api.EnumLogFile(); + console.log(out_rpc_enum_log_file); + console.log("End: Test_EnumLogFile"); + console.log("-----"); + console.log(); + return out_rpc_enum_log_file; +} + +/** API test for 'ReadLogFile', Read a log file */ +async function Test_ReadLogFile(filename: string): Promise +{ + console.log("Begin: Test_ReadLogFile"); + let in_rpc_read_log_file: VPN.VpnRpcReadLogFile = new VPN.VpnRpcReadLogFile( + { + FilePath_str: filename, + }); + let out_rpc_read_log_file: VPN.VpnRpcReadLogFile = await api.ReadLogFile(in_rpc_read_log_file); + console.log(out_rpc_read_log_file); + console.log("End: Test_ReadLogFile"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetSysLog', Set syslog function setting */ +async function Test_SetSysLog(flag: boolean): Promise +{ + console.log("Begin: Test_SetSysLog"); + let in_syslog_setting: VPN.VpnSyslogSetting = new VPN.VpnSyslogSetting( + { + SaveType_u32: flag ? VPN.VpnSyslogSaveType.ServerAndHubAllLog : VPN.VpnSyslogSaveType.None, + Hostname_str: "1.2.3.4", + Port_u32: 123, + }); + let out_syslog_setting: VPN.VpnSyslogSetting = await api.SetSysLog(in_syslog_setting); + console.log(out_syslog_setting); + console.log("End: Test_SetSysLog"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSysLog', Get syslog function setting */ +async function Test_GetSysLog(): Promise +{ + console.log("Begin: Test_GetSysLog"); + let in_syslog_setting: VPN.VpnSyslogSetting = new VPN.VpnSyslogSetting( + { + }); + let out_syslog_setting: VPN.VpnSyslogSetting = await api.GetSysLog(in_syslog_setting); + console.log(out_syslog_setting); + console.log("End: Test_GetSysLog"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubMsg', Set message of today on hub */ +async function Test_SetHubMsg(): Promise +{ + console.log("Begin: Test_SetHubMsg"); + let in_rpc_msg: VPN.VpnRpcMsg = new VPN.VpnRpcMsg( + { + HubName_str: hub_name, + Msg_bin: new Uint8Array([ 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x21, 0x20, 0xe4, 0xb8, 0x87, 0xe5, 0x9b, 0xbd, 0xe3, 0x81, 0xae, 0xe5, 0x8a, 0xb4, 0xe5, 0x83, 0x8d, 0xe8, 0x80, 0x85, 0xe3, 0x82, 0x88, 0xe3, 0x80, 0x81, 0xe5, 0x9b, 0xa3, 0xe7, 0xb5, 0x90, 0xe3, 0x81, 0x9b, 0xe3, 0x82, 0x88, 0x21, 0x20, 0xd7, 0x92, 0xd7, 0x91, 0xd7, 0xa8, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa2, 0xd7, 0x95, 0xd7, 0x91, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa9, 0xd7, 0x9c, 0x20, 0xd7, 0x9b, 0xd7, 0x9c, 0x20, 0xd7, 0x94, 0xd7, 0x9e, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0xa0, 0xd7, 0x95, 0xd7, 0xaa, 0x2c, 0x20, 0xd7, 0x94, 0xd7, 0xaa, 0xd7, 0x90, 0xd7, 0x97, 0xd7, 0x93, 0xd7, 0x95, 0x21, ]), + }); + let out_rpc_msg: VPN.VpnRpcMsg = await api.SetHubMsg(in_rpc_msg); + console.log(out_rpc_msg); + console.log("End: Test_SetHubMsg"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubMsg', Get message of today on hub */ +async function Test_GetHubMsg(): Promise +{ + console.log("Begin: Test_GetHubMsg"); + let in_rpc_msg: VPN.VpnRpcMsg = new VPN.VpnRpcMsg( + { + HubName_str: hub_name, + }); + let out_rpc_msg: VPN.VpnRpcMsg = await api.GetHubMsg(in_rpc_msg); + console.log(out_rpc_msg); + console.log("End: Test_GetHubMsg"); + console.log("-----"); + console.log(); +} + +/** API test for 'Crash', Do Crash */ +async function Test_Crash(): Promise +{ + console.log("Begin: Test_Crash"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + }); + let out_rpc_test: VPN.VpnRpcTest = await api.Crash(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_Crash"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetAdminMsg', Get message for administrators */ +async function Test_GetAdminMsg(): Promise +{ + console.log("Begin: Test_GetAdminMsg"); + let out_rpc_msg: VPN.VpnRpcMsg = await api.GetAdminMsg(); + console.log(out_rpc_msg); + console.log("End: Test_GetAdminMsg"); + console.log("-----"); + console.log(); +} + +/** API test for 'Flush', Flush configuration file */ +async function Test_Flush(): Promise +{ + console.log("Begin: Test_Flush"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + }); + let out_rpc_test: VPN.VpnRpcTest = await api.Flush(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_Flush"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetIPsecServices', Set IPsec service configuration */ +async function Test_SetIPsecServices(): Promise +{ + console.log("Begin: Test_SetIPsecServices"); + let in_ipsec_services: VPN.VpnIPsecServices = new VPN.VpnIPsecServices( + { + L2TP_Raw_bool: false, + L2TP_IPsec_bool: false, + EtherIP_IPsec_bool: false, + IPsec_Secret_str: "vpn", + L2TP_DefaultHub_str: "HUB_ABC", + }); + let out_ipsec_services: VPN.VpnIPsecServices = await api.SetIPsecServices(in_ipsec_services); + console.log(out_ipsec_services); + console.log("End: Test_SetIPsecServices"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetIPsecServices', Get IPsec service configuration */ +async function Test_GetIPsecServices(): Promise +{ + console.log("Begin: Test_GetIPsecServices"); + let out_ipsec_services: VPN.VpnIPsecServices = await api.GetIPsecServices(); + console.log(out_ipsec_services); + console.log("End: Test_GetIPsecServices"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddEtherIpId', Add EtherIP ID setting */ +async function Test_AddEtherIpId(): Promise +{ + console.log("Begin: Test_AddEtherIpId"); + let in_etherip_id: VPN.VpnEtherIpId = new VPN.VpnEtherIpId( + { + Id_str: "testid", + HubName_str: hub_name, + UserName_str: "nekosan", + Password_str: "torisan", + }); + let out_etherip_id: VPN.VpnEtherIpId = await api.AddEtherIpId(in_etherip_id); + console.log(out_etherip_id); + console.log("End: Test_AddEtherIpId"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetEtherIpId', Get EtherIP ID setting */ +async function Test_GetEtherIpId(id: string): Promise +{ + console.log("Begin: Test_GetEtherIpId"); + let in_etherip_id: VPN.VpnEtherIpId = new VPN.VpnEtherIpId( + { + Id_str: id, + }); + let out_etherip_id: VPN.VpnEtherIpId = await api.GetEtherIpId(in_etherip_id); + console.log(out_etherip_id); + console.log("End: Test_GetEtherIpId"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteEtherIpId', Delete EtherIP ID setting */ +async function Test_DeleteEtherIpId(id: string): Promise +{ + console.log("Begin: Test_DeleteEtherIpId"); + let in_etherip_id: VPN.VpnEtherIpId = new VPN.VpnEtherIpId( + { + Id_str: id, + }); + let out_etherip_id: VPN.VpnEtherIpId = await api.DeleteEtherIpId(in_etherip_id); + console.log(out_etherip_id); + console.log("End: Test_DeleteEtherIpId"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumEtherIpId', Enumerate EtherIP ID settings */ +async function Test_EnumEtherIpId(): Promise +{ + console.log("Begin: Test_EnumEtherIpId"); + let out_rpc_enum_etherip_id: VPN.VpnRpcEnumEtherIpId = await api.EnumEtherIpId(); + console.log(out_rpc_enum_etherip_id); + console.log("End: Test_EnumEtherIpId"); + console.log("-----"); + console.log(); + return out_rpc_enum_etherip_id; +} + +/** API test for 'SetOpenVpnSstpConfig', Set configurations for OpenVPN and SSTP */ +async function Test_SetOpenVpnSstpConfig(): Promise +{ + console.log("Begin: Test_SetOpenVpnSstpConfig"); + let in_openvpn_sstp_config: VPN.VpnOpenVpnSstpConfig = new VPN.VpnOpenVpnSstpConfig( + { + EnableOpenVPN_bool: true, + OpenVPNPortList_str: "1 2 3 4 5", + EnableSSTP_bool: true, + }); + let out_openvpn_sstp_config: VPN.VpnOpenVpnSstpConfig = await api.SetOpenVpnSstpConfig(in_openvpn_sstp_config); + console.log(out_openvpn_sstp_config); + console.log("End: Test_SetOpenVpnSstpConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetOpenVpnSstpConfig', Get configurations for OpenVPN and SSTP */ +async function Test_GetOpenVpnSstpConfig(): Promise +{ + console.log("Begin: Test_GetOpenVpnSstpConfig"); + let out_openvpn_sstp_config: VPN.VpnOpenVpnSstpConfig = await api.GetOpenVpnSstpConfig(); + console.log(out_openvpn_sstp_config); + console.log("End: Test_GetOpenVpnSstpConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetDDnsClientStatus', Get status of DDNS client */ +async function Test_GetDDnsClientStatus(): Promise +{ + console.log("Begin: Test_GetDDnsClientStatus"); + let out_ddns_client_status: VPN.VpnDDnsClientStatus = await api.GetDDnsClientStatus(); + console.log(out_ddns_client_status); + console.log("End: Test_GetDDnsClientStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'ChangeDDnsClientHostname', Change host-name for DDNS client */ +async function Test_ChangeDDnsClientHostname(): Promise +{ + console.log("Begin: Test_ChangeDDnsClientHostname"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + StrValue_str: "nekotest" + Math.floor((Math.random() * (2100000000 - 1000000000)) + 1000000000), + }); + let out_rpc_test: VPN.VpnRpcTest = await api.ChangeDDnsClientHostname(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_ChangeDDnsClientHostname"); + console.log("-----"); + console.log(); +} + +/** API test for 'RegenerateServerCert', Regenerate server certification */ +async function Test_RegenerateServerCert(): Promise +{ + console.log("Begin: Test_RegenerateServerCert"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + StrValue_str: "abc.example.org", + }); + let out_rpc_test: VPN.VpnRpcTest = await api.RegenerateServerCert(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_RegenerateServerCert"); + console.log("-----"); + console.log(); +} + +/** API test for 'MakeOpenVpnConfigFile', Generate OpenVPN configuration files */ +async function Test_MakeOpenVpnConfigFile(): Promise +{ + console.log("Begin: Test_MakeOpenVpnConfigFile"); + let out_rpc_read_log_file: VPN.VpnRpcReadLogFile = await api.MakeOpenVpnConfigFile(); + console.log(out_rpc_read_log_file); + console.log("End: Test_MakeOpenVpnConfigFile"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetSpecialListener', Set special listener status */ +async function Test_SetSpecialListener(): Promise +{ + console.log("Begin: Test_SetSpecialListener"); + let in_rpc_special_listener: VPN.VpnRpcSpecialListener = new VPN.VpnRpcSpecialListener( + { + VpnOverDnsListener_bool: true, + VpnOverIcmpListener_bool: true, + }); + let out_rpc_special_listener: VPN.VpnRpcSpecialListener = await api.SetSpecialListener(in_rpc_special_listener); + console.log(out_rpc_special_listener); + console.log("End: Test_SetSpecialListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSpecialListener', Get special listener status */ +async function Test_GetSpecialListener(): Promise +{ + console.log("Begin: Test_GetSpecialListener"); + let out_rpc_special_listener: VPN.VpnRpcSpecialListener = await api.GetSpecialListener(); + console.log(out_rpc_special_listener); + console.log("End: Test_GetSpecialListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetAzureStatus', Get Azure status */ +async function Test_GetAzureStatus(): Promise +{ + console.log("Begin: Test_GetAzureStatus"); + let out_rpc_azure_status: VPN.VpnRpcAzureStatus = await api.GetAzureStatus(); + console.log(out_rpc_azure_status); + console.log("End: Test_GetAzureStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetAzureStatus', Set Azure status */ +async function Test_SetAzureStatus(): Promise +{ + console.log("Begin: Test_SetAzureStatus"); + let in_rpc_azure_status: VPN.VpnRpcAzureStatus = new VPN.VpnRpcAzureStatus( + { + IsEnabled_bool: true, + }); + let out_rpc_azure_status: VPN.VpnRpcAzureStatus = await api.SetAzureStatus(in_rpc_azure_status); + console.log(out_rpc_azure_status); + console.log("End: Test_SetAzureStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetDDnsInternetSettng', Get DDNS proxy configuration */ +async function Test_GetDDnsInternetSettng(): Promise +{ + console.log("Begin: Test_GetDDnsInternetSettng"); + let out_internet_setting: VPN.VpnInternetSetting = await api.GetDDnsInternetSettng(); + console.log(out_internet_setting); + console.log("End: Test_GetDDnsInternetSettng"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetDDnsInternetSettng', Set DDNS proxy configuration */ +async function Test_SetDDnsInternetSettng(): Promise +{ + console.log("Begin: Test_SetDDnsInternetSettng"); + let in_internet_setting: VPN.VpnInternetSetting = new VPN.VpnInternetSetting( + { + ProxyType_u32: VPN.VpnRpcProxyType.Direct, + ProxyHostName_str: "1.2.3.4", + ProxyPort_u32: 1234, + ProxyUsername_str: "neko", + ProxyPassword_str: "dog", + }); + let out_internet_setting: VPN.VpnInternetSetting = await api.SetDDnsInternetSettng(in_internet_setting); + console.log(out_internet_setting); + console.log("End: Test_SetDDnsInternetSettng"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetVgsConfig', Setting VPN Gate Server Configuration */ +async function Test_SetVgsConfig(): Promise +{ + console.log("Begin: Test_SetVgsConfig"); + let in_vgs_config: VPN.VpnVgsConfig = new VPN.VpnVgsConfig( + { + IsEnabled_bool: false, + Message_utf: "Neko san!!!", + Owner_utf: "Go go go!!!", + Abuse_utf: "da.test@softether.co.jp", + NoLog_bool: false, + LogPermanent_bool: true, + EnableL2TP_bool: true, + }); + let out_vgs_config: VPN.VpnVgsConfig = await api.SetVgsConfig(in_vgs_config); + console.log(out_vgs_config); + console.log("End: Test_SetVgsConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetVgsConfig', Get VPN Gate configuration */ +async function Test_GetVgsConfig(): Promise +{ + console.log("Begin: Test_GetVgsConfig"); + let out_vgs_config: VPN.VpnVgsConfig = await api.GetVgsConfig(); + console.log(out_vgs_config); + console.log("End: Test_GetVgsConfig"); + console.log("-----"); + console.log(); +} + + + diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/src/vpnrpc.ts b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/src/vpnrpc.ts new file mode 100644 index 00000000..1774bbd6 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/src/vpnrpc.ts @@ -0,0 +1,5167 @@ +// SoftEther VPN Server JSON-RPC Stub code for TypeScript +// +// vpnrpc.ts +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + + +// Trivial utility codes +let is_node_js = (typeof navigator === "undefined") || navigator.userAgent.indexOf("Node.js") !== -1 || navigator.userAgent.indexOf("jsdom") !== -1; +function is_null(obj: any) +{ + return (typeof obj === "undefined") || (obj === null); +} +let debug_mode: boolean = false; + +/** VPN Server RPC Stubs */ +export class VpnServerRpc +{ + /** Determine if this JavaScript environment is on the Node.js or not. */ + public static IsNodeJS(): boolean + { + return is_node_js; + } + + /** Set the debug mode flag */ + public static SetDebugMode(flag: boolean): void + { + debug_mode = flag; + } + + private rpc_url: string; + private rpc_client: JsonRpcClient; + + /** + * Constructor of the VpnServerRpc class + * @param vpnserver_hostname The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param vpnserver_port The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param hubname The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + * @param password Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + * @param nodejs_https_client_reject_untrusted_server_cert In Node.js set this true to check the SSL server certificate on the destination VPN Server. Set this false to ignore the SSL server certification. + */ + constructor(vpnserver_hostname?: string, vpnserver_port?: number, hubname?: string, password?: string, nodejs_https_client_reject_untrusted_server_cert?: boolean) + { + let headers: { [name: string]: string } = {}; + let send_credentials: boolean = false; + + nodejs_https_client_reject_untrusted_server_cert = is_null(nodejs_https_client_reject_untrusted_server_cert) ? false : nodejs_https_client_reject_untrusted_server_cert!; + + if (is_null(vpnserver_hostname)) + { + this.rpc_url = "/api/"; + send_credentials = true; + } + else + { + if (is_null(vpnserver_port)) vpnserver_port = 443; + this.rpc_url = `https://${vpnserver_hostname}:${vpnserver_port}/api/`; + + + headers["X-VPNADMIN-HUBNAME"] = is_null(hubname) ? "" : hubname!; + headers["X-VPNADMIN-PASSWORD"] = is_null(password) ? "" : password!; + } + + if (is_null(nodejs_https_client_reject_untrusted_server_cert)) nodejs_https_client_reject_untrusted_server_cert = false; + + this.rpc_client = new JsonRpcClient(this.rpc_url, headers, send_credentials, nodejs_https_client_reject_untrusted_server_cert); + } + + // --- Stubs --- + /** Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. */ + public Test = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("Test", in_param); + } + + /** Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. */ + public GetServerInfo = (): Promise => + { + return this.CallAsync("GetServerInfo", new VpnRpcServerInfo()); + } + + /** Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. */ + public GetServerStatus = (): Promise => + { + return this.CallAsync("GetServerStatus", new VpnRpcServerStatus()); + } + + /** Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. */ + public CreateListener = (in_param: VpnRpcListener): Promise => + { + return this.CallAsync("CreateListener", in_param); + } + + /** Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. */ + public EnumListener = (): Promise => + { + return this.CallAsync("EnumListener", new VpnRpcListenerList()); + } + + /** Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + public DeleteListener = (in_param: VpnRpcListener): Promise => + { + return this.CallAsync("DeleteListener", in_param); + } + + /** Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + public EnableListener = (in_param: VpnRpcListener): Promise => + { + return this.CallAsync("EnableListener", in_param); + } + + /** Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. */ + public SetServerPassword = (in_param: VpnRpcSetPassword): Promise => + { + return this.CallAsync("SetServerPassword", in_param); + } + + /** Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. */ + public SetFarmSetting = (in_param: VpnRpcFarm): Promise => + { + return this.CallAsync("SetFarmSetting", in_param); + } + + /** Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. */ + public GetFarmSetting = (): Promise => + { + return this.CallAsync("GetFarmSetting", new VpnRpcFarm()); + } + + /** Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. */ + public GetFarmInfo = (in_param: VpnRpcFarmInfo): Promise => + { + return this.CallAsync("GetFarmInfo", in_param); + } + + /** Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. */ + public EnumFarmMember = (): Promise => + { + return this.CallAsync("EnumFarmMember", new VpnRpcEnumFarm()); + } + + /** Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. */ + public GetFarmConnectionStatus = (): Promise => + { + return this.CallAsync("GetFarmConnectionStatus", new VpnRpcFarmConnectionStatus()); + } + + /** Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. */ + public SetServerCert = (in_param: VpnRpcKeyPair): Promise => + { + return this.CallAsync("SetServerCert", in_param); + } + + /** Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. */ + public GetServerCert = (): Promise => + { + return this.CallAsync("GetServerCert", new VpnRpcKeyPair()); + } + + /** Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. */ + public GetServerCipher = (): Promise => + { + return this.CallAsync("GetServerCipher", new VpnRpcStr()); + } + + /** Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. */ + public SetServerCipher = (in_param: VpnRpcStr): Promise => + { + return this.CallAsync("SetServerCipher", in_param); + } + + /** Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + public CreateHub = (in_param: VpnRpcCreateHub): Promise => + { + return this.CallAsync("CreateHub", in_param); + } + + /** Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. */ + public SetHub = (in_param: VpnRpcCreateHub): Promise => + { + return this.CallAsync("SetHub", in_param); + } + + /** Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. */ + public GetHub = (in_param: VpnRpcCreateHub): Promise => + { + return this.CallAsync("GetHub", in_param); + } + + /** Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. */ + public EnumHub = (): Promise => + { + return this.CallAsync("EnumHub", new VpnRpcEnumHub()); + } + + /** Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + public DeleteHub = (in_param: VpnRpcDeleteHub): Promise => + { + return this.CallAsync("DeleteHub", in_param); + } + + /** Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetHubRadius = (in_param: VpnRpcRadius): Promise => + { + return this.CallAsync("GetHubRadius", in_param); + } + + /** Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetHubRadius = (in_param: VpnRpcRadius): Promise => + { + return this.CallAsync("SetHubRadius", in_param); + } + + /** Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. */ + public EnumConnection = (): Promise => + { + return this.CallAsync("EnumConnection", new VpnRpcEnumConnection()); + } + + /** Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. */ + public DisconnectConnection = (in_param: VpnRpcDisconnectConnection): Promise => + { + return this.CallAsync("DisconnectConnection", in_param); + } + + /** Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. */ + public GetConnectionInfo = (in_param: VpnRpcConnectionInfo): Promise => + { + return this.CallAsync("GetConnectionInfo", in_param); + } + + /** Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetHubOnline = (in_param: VpnRpcSetHubOnline): Promise => + { + return this.CallAsync("SetHubOnline", in_param); + } + + /** Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. */ + public GetHubStatus = (in_param: VpnRpcHubStatus): Promise => + { + return this.CallAsync("GetHubStatus", in_param); + } + + /** Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. */ + public SetHubLog = (in_param: VpnRpcHubLog): Promise => + { + return this.CallAsync("SetHubLog", in_param); + } + + /** Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. */ + public GetHubLog = (in_param: VpnRpcHubLog): Promise => + { + return this.CallAsync("GetHubLog", in_param); + } + + /** Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public AddCa = (in_param: VpnRpcHubAddCA): Promise => + { + return this.CallAsync("AddCa", in_param); + } + + /** Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumCa = (in_param: VpnRpcHubEnumCA): Promise => + { + return this.CallAsync("EnumCa", in_param); + } + + /** Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public GetCa = (in_param: VpnRpcHubGetCA): Promise => + { + return this.CallAsync("GetCa", in_param); + } + + /** Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteCa = (in_param: VpnRpcHubDeleteCA): Promise => + { + return this.CallAsync("DeleteCa", in_param); + } + + /** Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public CreateLink = (in_param: VpnRpcCreateLink): Promise => + { + return this.CallAsync("CreateLink", in_param); + } + + /** Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetLink = (in_param: VpnRpcCreateLink): Promise => + { + return this.CallAsync("GetLink", in_param); + } + + /** Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. */ + public SetLink = (in_param: VpnRpcCreateLink): Promise => + { + return this.CallAsync("SetLink", in_param); + } + + /** Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumLink = (in_param: VpnRpcEnumLink): Promise => + { + return this.CallAsync("EnumLink", in_param); + } + + /** Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetLinkOnline = (in_param: VpnRpcLink): Promise => + { + return this.CallAsync("SetLinkOnline", in_param); + } + + /** Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetLinkOffline = (in_param: VpnRpcLink): Promise => + { + return this.CallAsync("SetLinkOffline", in_param); + } + + /** Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DeleteLink = (in_param: VpnRpcLink): Promise => + { + return this.CallAsync("DeleteLink", in_param); + } + + /** Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public RenameLink = (in_param: VpnRpcRenameLink): Promise => + { + return this.CallAsync("RenameLink", in_param); + } + + /** Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetLinkStatus = (in_param: VpnRpcLinkStatus): Promise => + { + return this.CallAsync("GetLinkStatus", in_param); + } + + /** Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public AddAccess = (in_param: VpnRpcAddAccess): Promise => + { + return this.CallAsync("AddAccess", in_param); + } + + /** Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteAccess = (in_param: VpnRpcDeleteAccess): Promise => + { + return this.CallAsync("DeleteAccess", in_param); + } + + /** Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumAccess = (in_param: VpnRpcEnumAccessList): Promise => + { + return this.CallAsync("EnumAccess", in_param); + } + + /** Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. */ + public SetAccessList = (in_param: VpnRpcEnumAccessList): Promise => + { + return this.CallAsync("SetAccessList", in_param); + } + + /** Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public CreateUser = (in_param: VpnRpcSetUser): Promise => + { + return this.CallAsync("CreateUser", in_param); + } + + /** Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public SetUser = (in_param: VpnRpcSetUser): Promise => + { + return this.CallAsync("SetUser", in_param); + } + + /** Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public GetUser = (in_param: VpnRpcSetUser): Promise => + { + return this.CallAsync("GetUser", in_param); + } + + /** Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteUser = (in_param: VpnRpcDeleteUser): Promise => + { + return this.CallAsync("DeleteUser", in_param); + } + + /** Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumUser = (in_param: VpnRpcEnumUser): Promise => + { + return this.CallAsync("EnumUser", in_param); + } + + /** Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public CreateGroup = (in_param: VpnRpcSetGroup): Promise => + { + return this.CallAsync("CreateGroup", in_param); + } + + /** Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public SetGroup = (in_param: VpnRpcSetGroup): Promise => + { + return this.CallAsync("SetGroup", in_param); + } + + /** Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public GetGroup = (in_param: VpnRpcSetGroup): Promise => + { + return this.CallAsync("GetGroup", in_param); + } + + /** Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteGroup = (in_param: VpnRpcDeleteUser): Promise => + { + return this.CallAsync("DeleteGroup", in_param); + } + + /** Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumGroup = (in_param: VpnRpcEnumGroup): Promise => + { + return this.CallAsync("EnumGroup", in_param); + } + + /** Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. */ + public EnumSession = (in_param: VpnRpcEnumSession): Promise => + { + return this.CallAsync("EnumSession", in_param); + } + + /** Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. */ + public GetSessionStatus = (in_param: VpnRpcSessionStatus): Promise => + { + return this.CallAsync("GetSessionStatus", in_param); + } + + /** Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. */ + public DeleteSession = (in_param: VpnRpcDeleteSession): Promise => + { + return this.CallAsync("DeleteSession", in_param); + } + + /** Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. */ + public EnumMacTable = (in_param: VpnRpcEnumMacTable): Promise => + { + return this.CallAsync("EnumMacTable", in_param); + } + + /** Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. */ + public DeleteMacTable = (in_param: VpnRpcDeleteTable): Promise => + { + return this.CallAsync("DeleteMacTable", in_param); + } + + /** Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. */ + public EnumIpTable = (in_param: VpnRpcEnumIpTable): Promise => + { + return this.CallAsync("EnumIpTable", in_param); + } + + /** Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. */ + public DeleteIpTable = (in_param: VpnRpcDeleteTable): Promise => + { + return this.CallAsync("DeleteIpTable", in_param); + } + + /** Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. */ + public SetKeep = (in_param: VpnRpcKeep): Promise => + { + return this.CallAsync("SetKeep", in_param); + } + + /** Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. */ + public GetKeep = (in_param: VpnRpcKeep): Promise => + { + return this.CallAsync("GetKeep", in_param); + } + + /** Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnableSecureNAT = (in_param: VpnRpcHub): Promise => + { + return this.CallAsync("EnableSecureNAT", in_param); + } + + /** Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DisableSecureNAT = (in_param: VpnRpcHub): Promise => + { + return this.CallAsync("DisableSecureNAT", in_param); + } + + /** Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetSecureNATOption = (in_param: VpnVhOption): Promise => + { + return this.CallAsync("SetSecureNATOption", in_param); + } + + /** Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. */ + public GetSecureNATOption = (in_param: VpnVhOption): Promise => + { + return this.CallAsync("GetSecureNATOption", in_param); + } + + /** Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumNAT = (in_param: VpnRpcEnumNat): Promise => + { + return this.CallAsync("EnumNAT", in_param); + } + + /** Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumDHCP = (in_param: VpnRpcEnumDhcp): Promise => + { + return this.CallAsync("EnumDHCP", in_param); + } + + /** Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetSecureNATStatus = (in_param: VpnRpcNatStatus): Promise => + { + return this.CallAsync("GetSecureNATStatus", in_param); + } + + /** Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + public EnumEthernet = (): Promise => + { + return this.CallAsync("EnumEthernet", new VpnRpcEnumEth()); + } + + /** Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. */ + public AddLocalBridge = (in_param: VpnRpcLocalBridge): Promise => + { + return this.CallAsync("AddLocalBridge", in_param); + } + + /** Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + public DeleteLocalBridge = (in_param: VpnRpcLocalBridge): Promise => + { + return this.CallAsync("DeleteLocalBridge", in_param); + } + + /** Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. */ + public EnumLocalBridge = (): Promise => + { + return this.CallAsync("EnumLocalBridge", new VpnRpcEnumLocalBridge()); + } + + /** Get whether the localbridge function is supported on the current system. */ + public GetBridgeSupport = (): Promise => + { + return this.CallAsync("GetBridgeSupport", new VpnRpcBridgeSupport()); + } + + /** Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. */ + public RebootServer = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("RebootServer", in_param); + } + + /** Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. */ + public GetCaps = (): Promise => + { + return this.CallAsync("GetCaps", new VpnCapslist()); + } + + /** Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. */ + public GetConfig = (): Promise => + { + return this.CallAsync("GetConfig", new VpnRpcConfig()); + } + + /** Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. */ + public SetConfig = (in_param: VpnRpcConfig): Promise => + { + return this.CallAsync("SetConfig", in_param); + } + + /** Get Virtual Hub Administration Option default values. */ + public GetDefaultHubAdminOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("GetDefaultHubAdminOptions", in_param); + } + + /** Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public GetHubAdminOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("GetHubAdminOptions", in_param); + } + + /** Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public SetHubAdminOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("SetHubAdminOptions", in_param); + } + + /** Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public GetHubExtOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("GetHubExtOptions", in_param); + } + + /** Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public SetHubExtOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("SetHubExtOptions", in_param); + } + + /** Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + public AddL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("AddL3Switch", in_param); + } + + /** Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + public DelL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("DelL3Switch", in_param); + } + + /** Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + public EnumL3Switch = (): Promise => + { + return this.CallAsync("EnumL3Switch", new VpnRpcEnumL3Sw()); + } + + /** Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + public StartL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("StartL3Switch", in_param); + } + + /** Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. */ + public StopL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("StopL3Switch", in_param); + } + + /** Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public AddL3If = (in_param: VpnRpcL3If): Promise => + { + return this.CallAsync("AddL3If", in_param); + } + + /** Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public DelL3If = (in_param: VpnRpcL3If): Promise => + { + return this.CallAsync("DelL3If", in_param); + } + + /** Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + public EnumL3If = (in_param: VpnRpcEnumL3If): Promise => + { + return this.CallAsync("EnumL3If", in_param); + } + + /** Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public AddL3Table = (in_param: VpnRpcL3Table): Promise => + { + return this.CallAsync("AddL3Table", in_param); + } + + /** Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public DelL3Table = (in_param: VpnRpcL3Table): Promise => + { + return this.CallAsync("DelL3Table", in_param); + } + + /** Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + public EnumL3Table = (in_param: VpnRpcEnumL3Table): Promise => + { + return this.CallAsync("EnumL3Table", in_param); + } + + /** Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumCrl = (in_param: VpnRpcEnumCrl): Promise => + { + return this.CallAsync("EnumCrl", in_param); + } + + /** Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public AddCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("AddCrl", in_param); + } + + /** Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DelCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("DelCrl", in_param); + } + + /** Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("GetCrl", in_param); + } + + /** Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("SetCrl", in_param); + } + + /** Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetAcList = (in_param: VpnRpcAcList): Promise => + { + return this.CallAsync("SetAcList", in_param); + } + + /** Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetAcList = (in_param: VpnRpcAcList): Promise => + { + return this.CallAsync("GetAcList", in_param); + } + + /** Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + public EnumLogFile = (): Promise => + { + return this.CallAsync("EnumLogFile", new VpnRpcEnumLogFile()); + } + + /** Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + public ReadLogFile = (in_param: VpnRpcReadLogFile): Promise => + { + return this.CallAsync("ReadLogFile", in_param); + } + + /** Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use. */ + public SetSysLog = (in_param: VpnSyslogSetting): Promise => + { + return this.CallAsync("SetSysLog", in_param); + } + + /** Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. */ + public GetSysLog = (in_param: VpnSyslogSetting): Promise => + { + return this.CallAsync("GetSysLog", in_param); + } + + /** Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + public SetHubMsg = (in_param: VpnRpcMsg): Promise => + { + return this.CallAsync("SetHubMsg", in_param); + } + + /** Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + public GetHubMsg = (in_param: VpnRpcMsg): Promise => + { + return this.CallAsync("GetHubMsg", in_param); + } + + /** Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + public Crash = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("Crash", in_param); + } + + /** Get the message for administrators. */ + public GetAdminMsg = (): Promise => + { + return this.CallAsync("GetAdminMsg", new VpnRpcMsg()); + } + + /** Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + public Flush = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("Flush", in_param); + } + + /** Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetIPsecServices = (in_param: VpnIPsecServices): Promise => + { + return this.CallAsync("SetIPsecServices", in_param); + } + + /** Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetIPsecServices = (): Promise => + { + return this.CallAsync("GetIPsecServices", new VpnIPsecServices()); + } + + /** Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public AddEtherIpId = (in_param: VpnEtherIpId): Promise => + { + return this.CallAsync("AddEtherIpId", in_param); + } + + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetEtherIpId = (in_param: VpnEtherIpId): Promise => + { + return this.CallAsync("GetEtherIpId", in_param); + } + + /** Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DeleteEtherIpId = (in_param: VpnEtherIpId): Promise => + { + return this.CallAsync("DeleteEtherIpId", in_param); + } + + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumEtherIpId = (): Promise => + { + return this.CallAsync("EnumEtherIpId", new VpnRpcEnumEtherIpId()); + } + + /** Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetOpenVpnSstpConfig = (in_param: VpnOpenVpnSstpConfig): Promise => + { + return this.CallAsync("SetOpenVpnSstpConfig", in_param); + } + + /** Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetOpenVpnSstpConfig = (): Promise => + { + return this.CallAsync("GetOpenVpnSstpConfig", new VpnOpenVpnSstpConfig()); + } + + /** Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public GetDDnsClientStatus = (): Promise => + { + return this.CallAsync("GetDDnsClientStatus", new VpnDDnsClientStatus()); + } + + /** Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public ChangeDDnsClientHostname = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("ChangeDDnsClientHostname", in_param); + } + + /** Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public RegenerateServerCert = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("RegenerateServerCert", in_param); + } + + /** Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public MakeOpenVpnConfigFile = (): Promise => + { + return this.CallAsync("MakeOpenVpnConfigFile", new VpnRpcReadLogFile()); + } + + /** Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public SetSpecialListener = (in_param: VpnRpcSpecialListener): Promise => + { + return this.CallAsync("SetSpecialListener", in_param); + } + + /** Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public GetSpecialListener = (): Promise => + { + return this.CallAsync("GetSpecialListener", new VpnRpcSpecialListener()); + } + + /** Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetAzureStatus = (): Promise => + { + return this.CallAsync("GetAzureStatus", new VpnRpcAzureStatus()); + } + + /** Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetAzureStatus = (in_param: VpnRpcAzureStatus): Promise => + { + return this.CallAsync("SetAzureStatus", in_param); + } + + /** Get the Proxy Settings for Connecting to the DDNS server. */ + public GetDDnsInternetSettng = (): Promise => + { + return this.CallAsync("GetDDnsInternetSettng", new VpnInternetSetting()); + } + + /** Set the Proxy Settings for Connecting to the DDNS server. */ + public SetDDnsInternetSettng = (in_param: VpnInternetSetting): Promise => + { + return this.CallAsync("SetDDnsInternetSettng", in_param); + } + + /** Set the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + public SetVgsConfig = (in_param: VpnVgsConfig): Promise => + { + return this.CallAsync("SetVgsConfig", in_param); + } + + /** Get the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + public GetVgsConfig = (): Promise => + { + return this.CallAsync("GetVgsConfig", new VpnVgsConfig()); + } + + + + // -- Utility functions -- + /** Call a RPC procedure */ + public async CallAsync(method_name: string, request: T): Promise + { + let response: T = await this.rpc_client.CallAsync(method_name, request); + + return response; + } +} + + + + +// --- Types --- +/** IP Protocol Numbers */ +export enum VpnIpProtocolNumber +{ + /** ICMP for IPv4 */ + ICMPv4 = 1, + + /** TCP */ + TCP = 6, + + /** UDP */ + UDP = 17, + + /** ICMP for IPv6 */ + ICMPv6 = 58, + +} + +/** The body of the Access list */ +export class VpnAccess +{ + /** ID */ + public Id_u32: number = 0; + + /** Specify a description (note) for this rule */ + public Note_utf: string = ""; + + /** Enabled flag (true: enabled, false: disabled) */ + public Active_bool: boolean = false; + + /** Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. */ + public Priority_u32: number = 0; + + /** The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. */ + public Discard_bool: boolean = false; + + /** The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. */ + public IsIPv6_bool: boolean = false; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. */ + public SrcIpAddress_ip: string = ""; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + public SrcSubnetMask_ip: string = ""; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. */ + public DestIpAddress_ip: string = ""; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + public DestSubnetMask_ip: string = ""; + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. */ + public SrcIpAddress6_bin: Uint8Array = new Uint8Array([]); + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + public SrcSubnetMask6_bin: Uint8Array = new Uint8Array([]); + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. */ + public DestIpAddress6_bin: Uint8Array = new Uint8Array([]); + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + public DestSubnetMask6_bin: Uint8Array = new Uint8Array([]); + + /** The IP protocol number */ + public Protocol_u32: VpnIpProtocolNumber = 0; + + /** The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public SrcPortStart_u32: number = 0; + + /** The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public SrcPortEnd_u32: number = 0; + + /** The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public DestPortStart_u32: number = 0; + + /** The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public DestPortEnd_u32: number = 0; + + /** Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + public SrcUsername_str: string = ""; + + /** Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + public DestUsername_str: string = ""; + + /** Specify true if you want to check the source MAC address. */ + public CheckSrcMac_bool: boolean = false; + + /** Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + public SrcMacAddress_bin: Uint8Array = new Uint8Array([]); + + /** Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + public SrcMacMask_bin: Uint8Array = new Uint8Array([]); + + /** Specify true if you want to check the destination MAC address. */ + public CheckDstMac_bool: boolean = false; + + /** Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + public DstMacAddress_bin: Uint8Array = new Uint8Array([]); + + /** Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + public DstMacMask_bin: Uint8Array = new Uint8Array([]); + + /** Specify true if you want to check the state of the TCP connection. */ + public CheckTcpState_bool: boolean = false; + + /** Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. */ + public Established_bool: boolean = false; + + /** Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. */ + public Delay_u32: number = 0; + + /** Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. */ + public Jitter_u32: number = 0; + + /** Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. */ + public Loss_u32: number = 0; + + /** The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. */ + public RedirectUrl_str: string = ""; + + /** Constructor for the 'VpnAccess' class: The body of the Access list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Add an item to Access List */ +export class VpnRpcAddAccess +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Access list (Must be a single item) */ + public AccessListSingle: VpnAccess[] = []; + + /** Constructor for the 'VpnRpcAddAccess' class: Add an item to Access List */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Add CA to HUB */ +export class VpnRpcHubAddCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The body of the X.509 certificate */ + public Cert_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcHubAddCA' class: Add CA to HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** CRL entry */ +export class VpnRpcCrl +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Key ID */ + public Key_u32: number = 0; + + /** CN, optional */ + public CommonName_utf: string = ""; + + /** O, optional */ + public Organization_utf: string = ""; + + /** OU, optional */ + public Unit_utf: string = ""; + + /** C, optional */ + public Country_utf: string = ""; + + /** ST, optional */ + public State_utf: string = ""; + + /** L, optional */ + public Local_utf: string = ""; + + /** Serial, optional */ + public Serial_bin: Uint8Array = new Uint8Array([]); + + /** MD5 Digest, optional */ + public DigestMD5_bin: Uint8Array = new Uint8Array([]); + + /** SHA1 Digest, optional */ + public DigestSHA1_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcCrl' class: CRL entry */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** EtherIP key list entry */ +export class VpnEtherIpId +{ + /** Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. */ + public Id_str: string = ""; + + /** Specify the name of the Virtual Hub to connect. */ + public HubName_str: string = ""; + + /** Specify the username to login to the destination Virtual Hub. */ + public UserName_str: string = ""; + + /** Specify the password to login to the destination Virtual Hub. */ + public Password_str: string = ""; + + /** Constructor for the 'VpnEtherIpId' class: EtherIP key list entry */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 virtual interface */ +export class VpnRpcL3If +{ + /** L3 switch name */ + public Name_str: string = ""; + + /** Virtual HUB name */ + public HubName_str: string = ""; + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Subnet mask */ + public SubnetMask_ip: string = ""; + + /** Constructor for the 'VpnRpcL3If' class: Layer-3 virtual interface */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 switch */ +export class VpnRpcL3Sw +{ + /** Layer-3 Switch name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcL3Sw' class: Layer-3 switch */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Routing table */ +export class VpnRpcL3Table +{ + /** L3 switch name */ + public Name_str: string = ""; + + /** Network address */ + public NetworkAddress_ip: string = ""; + + /** Subnet mask */ + public SubnetMask_ip: string = ""; + + /** Gateway address */ + public GatewayAddress_ip: string = ""; + + /** Metric */ + public Metric_u32: number = 0; + + /** Constructor for the 'VpnRpcL3Table' class: Routing table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Generic parameter to contain u32, u64, ascii_string and unicode string */ +export class VpnRpcTest +{ + /** A 32-bit integer field */ + public IntValue_u32: number = 0; + + /** A 64-bit integer field */ + public Int64Value_u64: number = 0; + + /** An Ascii string field */ + public StrValue_str: string = ""; + + /** An UTF-8 string field */ + public UniStrValue_utf: string = ""; + + /** Constructor for the 'VpnRpcTest' class: Generic parameter to contain u32, u64, ascii_string and unicode string */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Local Bridge list item */ +export class VpnRpcLocalBridge +{ + /** Physical Ethernet device name */ + public DeviceName_str: string = ""; + + /** The Virtual Hub name */ + public HubNameLB_str: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** Running flag */ + public Active_bool: boolean = false; + + /** Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). */ + public TapMode_bool: boolean = false; + + /** Constructor for the 'VpnRpcLocalBridge' class: Local Bridge list item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Create, configure, and get the group */ +export class VpnRpcSetGroup +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The group name */ + public Name_str: string = ""; + + /** Optional real name (full name) of the group, allow using any Unicode characters */ + public Realname_utf: string = ""; + + /** Optional, specify a description of the group */ + public Note_utf: string = ""; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** The flag whether to use security policy */ + public UsePolicy_bool: boolean = false; + + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + public ["policy:Access_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPFilter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + public ["policy:DHCPNoServer_bool"]: boolean = false; + + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + public ["policy:DHCPForce_bool"]: boolean = false; + + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + public ["policy:NoBridge_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRouting_bool"]: boolean = false; + + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckMac_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIP_bool"]: boolean = false; + + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + public ["policy:ArpDhcpOnly_bool"]: boolean = false; + + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + public ["policy:PrivacyFilter_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + public ["policy:NoServer_bool"]: boolean = false; + + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + public ["policy:NoBroadcastLimiter_bool"]: boolean = false; + + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + public ["policy:MonitorPort_bool"]: boolean = false; + + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + public ["policy:MaxConnection_u32"]: number = 0; + + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + public ["policy:TimeOut_u32"]: number = 0; + + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + public ["policy:MaxMac_u32"]: number = 0; + + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + public ["policy:MaxIP_u32"]: number = 0; + + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + public ["policy:MaxUpload_u32"]: number = 0; + + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + public ["policy:MaxDownload_u32"]: number = 0; + + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + public ["policy:FixPassword_bool"]: boolean = false; + + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + public ["policy:MultiLogins_u32"]: number = 0; + + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + public ["policy:NoQoS_bool"]: boolean = false; + + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + public ["policy:RSandRAFilter_bool"]: boolean = false; + + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + public ["policy:RAFilter_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPv6Filter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + public ["policy:DHCPv6NoServer_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRoutingV6_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIPv6_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + public ["policy:NoServerV6_bool"]: boolean = false; + + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + public ["policy:MaxIPv6_u32"]: number = 0; + + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:NoSavePassword_bool"]: boolean = false; + + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:AutoDisconnect_u32"]: number = 0; + + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv4_bool"]: boolean = false; + + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv6_bool"]: boolean = false; + + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + public ["policy:FilterNonIP_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: boolean = false; + + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + public ["policy:VLanId_u32"]: number = 0; + + /** Security policy: Whether version 3.0 (must be true) */ + public ["policy:Ver3_bool"]: boolean = false; + + /** Constructor for the 'VpnRpcSetGroup' class: Create, configure, and get the group */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Hub types */ +export enum VpnRpcHubType +{ + /** Stand-alone HUB */ + Standalone = 0, + + /** Static HUB */ + FarmStatic = 1, + + /** Dynamic HUB */ + FarmDynamic = 2, + +} + +/** Create a HUB */ +export class VpnRpcCreateHub +{ + /** Specify the name of the Virtual Hub to create / update. */ + public HubName_str: string = ""; + + /** Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. */ + public AdminPasswordPlainText_str: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** Maximum number of VPN sessions */ + public MaxSession_u32: number = 0; + + /** No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. */ + public NoEnum_bool: boolean = false; + + /** Type of the Virtual Hub (Valid only for Clustered VPN Servers) */ + public HubType_u32: VpnRpcHubType = 0; + + /** Constructor for the 'VpnRpcCreateHub' class: Create a HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +export enum VpnRpcClientAuthType +{ + /** Anonymous authentication */ + Anonymous = 0, + + /** SHA-0 hashed password authentication */ + SHA0_Hashed_Password = 1, + + /** Plain password authentication */ + PlainPassword = 2, + + /** Certificate authentication */ + Cert = 3, + +} + +/** Create and set of link */ +export class VpnRpcCreateLink +{ + /** The Virtual Hub name */ + public HubName_Ex_str: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** The flag to enable validation for the server certificate */ + public CheckServerCert_bool: boolean = false; + + /** The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. */ + public ServerCert_bin: Uint8Array = new Uint8Array([]); + + /** Client Option Parameters: Specify the name of the Cascade Connection */ + public AccountName_utf: string = ""; + + /** Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. */ + public Hostname_str: string = ""; + + /** Client Option Parameters: Specify the port number of the destination VPN Server. */ + public Port_u32: number = 0; + + /** Client Option Parameters: The type of the proxy server */ + public ProxyType_u32: VpnRpcProxyType = 0; + + /** Client Option Parameters: The hostname or IP address of the proxy server name */ + public ProxyName_str: string = ""; + + /** Client Option Parameters: The port number of the proxy server */ + public ProxyPort_u32: number = 0; + + /** Client Option Parameters: The username to connect to the proxy server */ + public ProxyUsername_str: string = ""; + + /** Client Option Parameters: The password to connect to the proxy server */ + public ProxyPassword_str: string = ""; + + /** Client Option Parameters: The Virtual Hub on the destination VPN Server */ + public HubName_str: string = ""; + + /** Client Option Parameters: Number of TCP Connections to Use in VPN Communication */ + public MaxConnection_u32: number = 0; + + /** Client Option Parameters: The flag to enable the encryption on the communication */ + public UseEncrypt_bool: boolean = false; + + /** Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection */ + public UseCompress_bool: boolean = false; + + /** Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. */ + public HalfConnection_bool: boolean = false; + + /** Client Option Parameters: Connection attempt interval when additional connection will be established */ + public AdditionalConnectionInterval_u32: number = 0; + + /** Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) */ + public ConnectionDisconnectSpan_u32: number = 0; + + /** Client Option Parameters: Disable QoS Control Function if the value is true */ + public DisableQoS_bool: boolean = false; + + /** Client Option Parameters: Do not use TLS 1.x of the value is true */ + public NoTls1_bool: boolean = false; + + /** Client Option Parameters: Do not use UDP acceleration mode if the value is true */ + public NoUdpAcceleration_bool: boolean = false; + + /** Authentication type */ + public AuthType_u32: VpnRpcClientAuthType = 0; + + /** User name */ + public Username_str: string = ""; + + /** SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). */ + public HashedPassword_bin: Uint8Array = new Uint8Array([]); + + /** Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). */ + public PlainPassword_str: string = ""; + + /** Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + public ClientX_bin: Uint8Array = new Uint8Array([]); + + /** Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + public ClientK_bin: Uint8Array = new Uint8Array([]); + + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPFilter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + public ["policy:DHCPNoServer_bool"]: boolean = false; + + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + public ["policy:DHCPForce_bool"]: boolean = false; + + /** Security policy: Prohibit the duplicate MAC address */ + public SecPol_CheckMac_bool: boolean = false; + + /** Security policy: Prohibit a duplicate IP address (IPv4) */ + public SecPol_CheckIP_bool: boolean = false; + + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + public ["policy:ArpDhcpOnly_bool"]: boolean = false; + + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + public ["policy:PrivacyFilter_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + public ["policy:NoServer_bool"]: boolean = false; + + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + public ["policy:NoBroadcastLimiter_bool"]: boolean = false; + + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + public ["policy:MaxMac_u32"]: number = 0; + + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + public ["policy:MaxIP_u32"]: number = 0; + + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + public ["policy:MaxUpload_u32"]: number = 0; + + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + public ["policy:MaxDownload_u32"]: number = 0; + + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + public ["policy:RSandRAFilter_bool"]: boolean = false; + + /** Security policy: Filter the router advertisement packet (IPv6) */ + public SecPol_RAFilter_bool: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPv6Filter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + public ["policy:DHCPv6NoServer_bool"]: boolean = false; + + /** Security policy: Prohibit the duplicate IP address (IPv6) */ + public SecPol_CheckIPv6_bool: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + public ["policy:NoServerV6_bool"]: boolean = false; + + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + public ["policy:MaxIPv6_u32"]: number = 0; + + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv4_bool"]: boolean = false; + + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv6_bool"]: boolean = false; + + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + public ["policy:FilterNonIP_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean = false; + + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + public ["policy:VLanId_u32"]: number = 0; + + /** Security policy: Whether version 3.0 (must be true) */ + public ["policy:Ver3_bool"]: boolean = false; + + /** Constructor for the 'VpnRpcCreateLink' class: Create and set of link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Listener */ +export class VpnRpcListener +{ + /** Port number (Range: 1 - 65535) */ + public Port_u32: number = 0; + + /** Active state */ + public Enable_bool: boolean = false; + + /** Constructor for the 'VpnRpcListener' class: Listener */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** User authentication type (server side) */ +export enum VpnRpcUserAuthType +{ + /** Anonymous authentication */ + Anonymous = 0, + + /** Password authentication */ + Password = 1, + + /** User certificate authentication */ + UserCert = 2, + + /** Root certificate which is issued by trusted Certificate Authority */ + RootCert = 3, + + /** Radius authentication */ + Radius = 4, + + /** Windows NT authentication */ + NTDomain = 5, + +} + +/** Create, configure, and get the user */ +export class VpnRpcSetUser +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Specify the user name of the user */ + public Name_str: string = ""; + + /** Assigned group name for the user */ + public GroupName_str: string = ""; + + /** Optional real name (full name) of the user, allow using any Unicode characters */ + public Realname_utf: string = ""; + + /** Optional User Description */ + public Note_utf: string = ""; + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Last modified date and time */ + public UpdatedTime_dt: Date = new Date(); + + /** Expiration date and time */ + public ExpireTime_dt: Date = new Date(); + + /** Authentication method of the user */ + public AuthType_u32: VpnRpcUserAuthType = 0; + + /** User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. */ + public Auth_Password_str: string = ""; + + /** User certificate, valid only if AuthType_u32 == UserCert(2). */ + public UserX_bin: Uint8Array = new Uint8Array([]); + + /** Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). */ + public Serial_bin: Uint8Array = new Uint8Array([]); + + /** Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). */ + public CommonName_utf: string = ""; + + /** Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). */ + public RadiusUsername_utf: string = ""; + + /** Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). */ + public NtUsername_utf: string = ""; + + /** Number of total logins of the user */ + public NumLogin_u32: number = 0; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** The flag whether to use security policy */ + public UsePolicy_bool: boolean = false; + + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + public ["policy:Access_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPFilter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + public ["policy:DHCPNoServer_bool"]: boolean = false; + + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + public ["policy:DHCPForce_bool"]: boolean = false; + + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + public ["policy:NoBridge_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRouting_bool"]: boolean = false; + + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckMac_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIP_bool"]: boolean = false; + + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + public ["policy:ArpDhcpOnly_bool"]: boolean = false; + + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + public ["policy:PrivacyFilter_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + public ["policy:NoServer_bool"]: boolean = false; + + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + public ["policy:NoBroadcastLimiter_bool"]: boolean = false; + + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + public ["policy:MonitorPort_bool"]: boolean = false; + + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + public ["policy:MaxConnection_u32"]: number = 0; + + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + public ["policy:TimeOut_u32"]: number = 0; + + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + public ["policy:MaxMac_u32"]: number = 0; + + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + public ["policy:MaxIP_u32"]: number = 0; + + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + public ["policy:MaxUpload_u32"]: number = 0; + + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + public ["policy:MaxDownload_u32"]: number = 0; + + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + public ["policy:FixPassword_bool"]: boolean = false; + + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + public ["policy:MultiLogins_u32"]: number = 0; + + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + public ["policy:NoQoS_bool"]: boolean = false; + + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + public ["policy:RSandRAFilter_bool"]: boolean = false; + + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + public ["policy:RAFilter_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPv6Filter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + public ["policy:DHCPv6NoServer_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRoutingV6_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIPv6_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + public ["policy:NoServerV6_bool"]: boolean = false; + + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + public ["policy:MaxIPv6_u32"]: number = 0; + + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:NoSavePassword_bool"]: boolean = false; + + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:AutoDisconnect_u32"]: number = 0; + + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv4_bool"]: boolean = false; + + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv6_bool"]: boolean = false; + + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + public ["policy:FilterNonIP_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: boolean = false; + + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + public ["policy:VLanId_u32"]: number = 0; + + /** Security policy: Whether version 3.0 (must be true) */ + public ["policy:Ver3_bool"]: boolean = false; + + /** Constructor for the 'VpnRpcSetUser' class: Create, configure, and get the user */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the access list */ +export class VpnRpcDeleteAccess +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** ID */ + public Id_u32: number = 0; + + /** Constructor for the 'VpnRpcDeleteAccess' class: Delete the access list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the CA of HUB */ +export class VpnRpcHubDeleteCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Certificate key id to be deleted */ + public Key_u32: number = 0; + + /** Constructor for the 'VpnRpcHubDeleteCA' class: Delete the CA of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Deleting a user or group */ +export class VpnRpcDeleteUser +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** User or group name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcDeleteUser' class: Deleting a user or group */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the HUB */ +export class VpnRpcDeleteHub +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Constructor for the 'VpnRpcDeleteHub' class: Delete the HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the table */ +export class VpnRpcDeleteTable +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Key ID */ + public Key_u32: number = 0; + + /** Constructor for the 'VpnRpcDeleteTable' class: Delete the table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Specify the Link */ +export class VpnRpcLink +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The name of the cascade connection */ + public AccountName_utf: string = ""; + + /** Constructor for the 'VpnRpcLink' class: Specify the Link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Disconnect the session */ +export class VpnRpcDeleteSession +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Session name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcDeleteSession' class: Disconnect the session */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Specify the HUB */ +export class VpnRpcHub +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Constructor for the 'VpnRpcHub' class: Specify the HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Disconnect a connection */ +export class VpnRpcDisconnectConnection +{ + /** Connection name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcDisconnectConnection' class: Disconnect a connection */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of the access list */ +export class VpnRpcEnumAccessList +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Access list */ + public AccessList: VpnAccess[] = []; + + /** Constructor for the 'VpnRpcEnumAccessList' class: Enumeration of the access list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** CA enumeration items of HUB */ +export class VpnRpcHubEnumCAItem +{ + /** The key id of the item */ + public Key_u32: number = 0; + + /** Subject */ + public SubjectName_utf: string = ""; + + /** Issuer */ + public IssuerName_utf: string = ""; + + /** Expiration date */ + public Expires_dt: Date = new Date(); + + /** Constructor for the 'VpnRpcHubEnumCAItem' class: CA enumeration items of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** CA enumeration of HUB */ +export class VpnRpcHubEnumCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The list of CA */ + public CAList: VpnRpcHubEnumCAItem[] = []; + + /** Constructor for the 'VpnRpcHubEnumCA' class: CA enumeration of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Type of connection */ +export enum VpnRpcConnectionType +{ + /** VPN Client */ + Client = 0, + + /** During initialization */ + Init = 1, + + /** Login connection */ + Login = 2, + + /** Additional connection */ + Additional = 3, + + /** RPC for server farm */ + FarmRpc = 4, + + /** RPC for Management */ + AdminRpc = 5, + + /** HUB enumeration */ + EnumHub = 6, + + /** Password change */ + Password = 7, + + /** SSTP */ + SSTP = 8, + + /** OpenVPN */ + OpenVPN = 9, + +} + +/** Connection enumeration items */ +export class VpnRpcEnumConnectionItem +{ + /** Connection name */ + public Name_str: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** IP address */ + public Ip_ip: string = ""; + + /** Port number */ + public Port_u32: number = 0; + + /** Connected time */ + public ConnectedTime_dt: Date = new Date(); + + /** Connection type */ + public Type_u32: VpnRpcConnectionType = 0; + + /** Constructor for the 'VpnRpcEnumConnectionItem' class: Connection enumeration items */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Connection enumeration */ +export class VpnRpcEnumConnection +{ + /** Number of connections */ + public NumConnection_u32: number = 0; + + /** Connection list */ + public ConnectionList: VpnRpcEnumConnectionItem[] = []; + + /** Constructor for the 'VpnRpcEnumConnection' class: Connection enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enum CRL Item */ +export class VpnRpcEnumCrlItem +{ + /** Key ID */ + public Key_u32: number = 0; + + /** The contents of the CRL item */ + public CrlInfo_utf: string = ""; + + /** Constructor for the 'VpnRpcEnumCrlItem' class: Enum CRL Item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enum CRL */ +export class VpnRpcEnumCrl +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** CRL list */ + public CRLList: VpnRpcEnumCrlItem[] = []; + + /** Constructor for the 'VpnRpcEnumCrl' class: Enum CRL */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_ENUM_DHCP_ITEM */ +export class VpnRpcEnumDhcpItem +{ + /** ID */ + public Id_u32: number = 0; + + /** Lease time */ + public LeasedTime_dt: Date = new Date(); + + /** Expiration date */ + public ExpireTime_dt: Date = new Date(); + + /** MAC address */ + public MacAddress_bin: Uint8Array = new Uint8Array([]); + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Subnet mask */ + public Mask_u32: number = 0; + + /** Host name */ + public Hostname_str: string = ""; + + /** Constructor for the 'VpnRpcEnumDhcpItem' class: RPC_ENUM_DHCP_ITEM */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_ENUM_DHCP */ +export class VpnRpcEnumDhcp +{ + /** Virtual Hub Name */ + public HubName_str: string = ""; + + /** DHCP Item */ + public DhcpTable: VpnRpcEnumDhcpItem[] = []; + + /** Constructor for the 'VpnRpcEnumDhcp' class: RPC_ENUM_DHCP */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** EtherIP setting list */ +export class VpnRpcEnumEtherIpId +{ + /** Setting list */ + public Settings: VpnEtherIpId[] = []; + + /** Constructor for the 'VpnRpcEnumEtherIpId' class: EtherIP setting list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Ethernet Network Adapters list item */ +export class VpnRpcEnumEthItem +{ + /** Device name */ + public DeviceName_str: string = ""; + + /** Network connection name (description) */ + public NetworkConnectionName_utf: string = ""; + + /** Constructor for the 'VpnRpcEnumEthItem' class: Ethernet Network Adapters list item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Ethernet Network Adapters list */ +export class VpnRpcEnumEth +{ + /** Ethernet Network Adapters list */ + public EthList: VpnRpcEnumEthItem[] = []; + + /** Constructor for the 'VpnRpcEnumEth' class: Ethernet Network Adapters list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm members enumeration items */ +export class VpnRpcEnumFarmItem +{ + /** ID */ + public Id_u32: number = 0; + + /** Controller */ + public Controller_bool: boolean = false; + + /** Connection time */ + public ConnectedTime_dt: Date = new Date(); + + /** IP address */ + public Ip_ip: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** Point */ + public Point_u32: number = 0; + + /** Number of sessions */ + public NumSessions_u32: number = 0; + + /** Number of TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of HUBs */ + public NumHubs_u32: number = 0; + + /** Number of assigned client licenses */ + public AssignedClientLicense_u32: number = 0; + + /** Number of assigned bridge licenses */ + public AssignedBridgeLicense_u32: number = 0; + + /** Constructor for the 'VpnRpcEnumFarmItem' class: Server farm members enumeration items */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm member enumeration */ +export class VpnRpcEnumFarm +{ + /** Number of Cluster Members */ + public NumFarm_u32: number = 0; + + /** Cluster Members list */ + public FarmMemberList: VpnRpcEnumFarmItem[] = []; + + /** Constructor for the 'VpnRpcEnumFarm' class: Server farm member enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items in the group */ +export class VpnRpcEnumGroupItem +{ + /** User name */ + public Name_str: string = ""; + + /** Real name */ + public Realname_utf: string = ""; + + /** Note */ + public Note_utf: string = ""; + + /** Number of users */ + public NumUsers_u32: number = 0; + + /** Access denied */ + public DenyAccess_bool: boolean = false; + + /** Constructor for the 'VpnRpcEnumGroupItem' class: Enumeration items in the group */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Group enumeration */ +export class VpnRpcEnumGroup +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Group list */ + public GroupList: VpnRpcEnumGroupItem[] = []; + + /** Constructor for the 'VpnRpcEnumGroup' class: Group enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items of HUB */ +export class VpnRpcEnumHubItem +{ + /** The name of the Virtual Hub */ + public HubName_str: string = ""; + + /** Online state */ + public Online_bool: boolean = false; + + /** Type of HUB (Valid only for Clustered VPN Servers) */ + public HubType_u32: VpnRpcHubType = 0; + + /** Number of users */ + public NumUsers_u32: number = 0; + + /** Number of registered groups */ + public NumGroups_u32: number = 0; + + /** Number of registered sessions */ + public NumSessions_u32: number = 0; + + /** Number of current MAC table entries */ + public NumMacTables_u32: number = 0; + + /** Number of current IP table entries */ + public NumIpTables_u32: number = 0; + + /** Last communication date and time */ + public LastCommTime_dt: Date = new Date(); + + /** Last login date and time */ + public LastLoginTime_dt: Date = new Date(); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Number of accumulated logins */ + public NumLogin_u32: number = 0; + + /** Whether the traffic information is provided */ + public IsTrafficFilled_bool: boolean = false; + + /** Number of broadcast packets (Recv) */ + public ["Ex.Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Ex.Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Ex.Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Ex.Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Ex.Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Ex.Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastCount_u64"]: number = 0; + + /** Constructor for the 'VpnRpcEnumHubItem' class: Enumeration items of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of HUB */ +export class VpnRpcEnumHub +{ + /** Number of Virtual Hubs */ + public NumHub_u32: number = 0; + + /** Virtual Hubs */ + public HubList: VpnRpcEnumHubItem[] = []; + + /** Constructor for the 'VpnRpcEnumHub' class: Enumeration of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items of IP table */ +export class VpnRpcEnumIpTableItem +{ + /** Key ID */ + public Key_u32: number = 0; + + /** Session name */ + public SessionName_str: string = ""; + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Assigned by the DHCP */ + public DhcpAllocated_bool: boolean = false; + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Updating date */ + public UpdatedTime_dt: Date = new Date(); + + /** Remote items */ + public RemoteItem_bool: boolean = false; + + /** Remote host name */ + public RemoteHostname_str: string = ""; + + /** Constructor for the 'VpnRpcEnumIpTableItem' class: Enumeration items of IP table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of IP table */ +export class VpnRpcEnumIpTable +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** MAC table */ + public IpTable: VpnRpcEnumIpTableItem[] = []; + + /** Constructor for the 'VpnRpcEnumIpTable' class: Enumeration of IP table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 interface enumeration */ +export class VpnRpcEnumL3If +{ + /** Layer-3 switch name */ + public Name_str: string = ""; + + /** Layer-3 interface list */ + public L3IFList: VpnRpcL3If[] = []; + + /** Constructor for the 'VpnRpcEnumL3If' class: Layer-3 interface enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 switch enumeration item */ +export class VpnRpcEnumL3SwItem +{ + /** Name of the layer-3 switch */ + public Name_str: string = ""; + + /** Number of layer-3 switch virtual interfaces */ + public NumInterfaces_u32: number = 0; + + /** Number of routing tables */ + public NumTables_u32: number = 0; + + /** Activated flag */ + public Active_bool: boolean = false; + + /** Online flag */ + public Online_bool: boolean = false; + + /** Constructor for the 'VpnRpcEnumL3SwItem' class: Layer-3 switch enumeration item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 switch enumeration */ +export class VpnRpcEnumL3Sw +{ + /** Layer-3 switch list */ + public L3SWList: VpnRpcEnumL3SwItem[] = []; + + /** Constructor for the 'VpnRpcEnumL3Sw' class: Layer-3 switch enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Routing table enumeration */ +export class VpnRpcEnumL3Table +{ + /** L3 switch name */ + public Name_str: string = ""; + + /** Routing table item list */ + public L3Table: VpnRpcL3Table[] = []; + + /** Constructor for the 'VpnRpcEnumL3Table' class: Routing table enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Cascade Connection Enumeration */ +export class VpnRpcEnumLinkItem +{ + /** The name of cascade connection */ + public AccountName_utf: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** The flag indicates whether the cascade connection is established */ + public Connected_bool: boolean = false; + + /** The error last occurred if the cascade connection is in the fail state */ + public LastError_u32: number = 0; + + /** Connection completion time */ + public ConnectedTime_dt: Date = new Date(); + + /** Host name of the destination VPN server */ + public Hostname_str: string = ""; + + /** The Virtual Hub name */ + public TargetHubName_str: string = ""; + + /** Constructor for the 'VpnRpcEnumLinkItem' class: Cascade Connection Enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of the link */ +export class VpnRpcEnumLink +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Number of cascade connections */ + public NumLink_u32: number = 0; + + /** The list of cascade connections */ + public LinkList: VpnRpcEnumLinkItem[] = []; + + /** Constructor for the 'VpnRpcEnumLink' class: Enumeration of the link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** List of listeners item */ +export class VpnRpcListenerListItem +{ + /** TCP port number (range: 1 - 65535) */ + public Ports_u32: number = 0; + + /** Active state */ + public Enables_bool: boolean = false; + + /** The flag to indicate if the error occurred on the listener port */ + public Errors_bool: boolean = false; + + /** Constructor for the 'VpnRpcListenerListItem' class: List of listeners item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** List of listeners */ +export class VpnRpcListenerList +{ + /** List of listener items */ + public ListenerList: VpnRpcListenerListItem[] = []; + + /** Constructor for the 'VpnRpcListenerList' class: List of listeners */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Local Bridge enumeration */ +export class VpnRpcEnumLocalBridge +{ + /** Local Bridge list */ + public LocalBridgeList: VpnRpcLocalBridge[] = []; + + /** Constructor for the 'VpnRpcEnumLocalBridge' class: Local Bridge enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Log file enumeration */ +export class VpnRpcEnumLogFileItem +{ + /** Server name */ + public ServerName_str: string = ""; + + /** File path */ + public FilePath_str: string = ""; + + /** File size */ + public FileSize_u32: number = 0; + + /** Last write date */ + public UpdatedTime_dt: Date = new Date(); + + /** Constructor for the 'VpnRpcEnumLogFileItem' class: Log file enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Log file enumeration */ +export class VpnRpcEnumLogFile +{ + /** Log file list */ + public LogFiles: VpnRpcEnumLogFileItem[] = []; + + /** Constructor for the 'VpnRpcEnumLogFile' class: Log file enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items of the MAC table */ +export class VpnRpcEnumMacTableItem +{ + /** Key ID */ + public Key_u32: number = 0; + + /** Session name */ + public SessionName_str: string = ""; + + /** MAC address */ + public MacAddress_bin: Uint8Array = new Uint8Array([]); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Updating date */ + public UpdatedTime_dt: Date = new Date(); + + /** Remote items */ + public RemoteItem_bool: boolean = false; + + /** Remote host name */ + public RemoteHostname_str: string = ""; + + /** VLAN ID */ + public VlanId_u32: number = 0; + + /** Constructor for the 'VpnRpcEnumMacTableItem' class: Enumeration items of the MAC table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of the MAC table */ +export class VpnRpcEnumMacTable +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** MAC table */ + public MacTable: VpnRpcEnumMacTableItem[] = []; + + /** Constructor for the 'VpnRpcEnumMacTable' class: Enumeration of the MAC table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** NAT Entry Protocol Number */ +export enum VpnRpcNatProtocol +{ + /** TCP */ + TCP = 0, + + /** UDP */ + UDP = 1, + + /** DNS */ + DNS = 2, + + /** ICMP */ + ICMP = 3, + +} + +/** State of NAT session (TCP) */ +export enum VpnRpcNatTcpState +{ + /** Connecting */ + Connecting = 0, + + /** Send the RST (Connection failure or disconnected) */ + SendReset = 1, + + /** Connection complete */ + Connected = 2, + + /** Connection established */ + Established = 3, + + /** Wait for socket disconnection */ + WaitDisconnect = 4, + +} + +/** VpnRpcEnumNat List Item */ +export class VpnRpcEnumNatItem +{ + /** ID */ + public Id_u32: number = 0; + + /** Protocol */ + public Protocol_u32: VpnRpcNatProtocol = 0; + + /** Source IP address */ + public SrcIp_ip: string = ""; + + /** Source host name */ + public SrcHost_str: string = ""; + + /** Source port number */ + public SrcPort_u32: number = 0; + + /** Destination IP address */ + public DestIp_ip: string = ""; + + /** Destination host name */ + public DestHost_str: string = ""; + + /** Destination port number */ + public DestPort_u32: number = 0; + + /** Connection time */ + public CreatedTime_dt: Date = new Date(); + + /** Last communication time */ + public LastCommTime_dt: Date = new Date(); + + /** Transmission size */ + public SendSize_u64: number = 0; + + /** Receive size */ + public RecvSize_u64: number = 0; + + /** TCP state */ + public TcpStatus_u32: VpnRpcNatTcpState = 0; + + /** Constructor for the 'VpnRpcEnumNatItem' class: VpnRpcEnumNat List Item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_ENUM_NAT */ +export class VpnRpcEnumNat +{ + /** Virtual Hub Name */ + public HubName_str: string = ""; + + /** NAT item */ + public NatTable: VpnRpcEnumNatItem[] = []; + + /** Constructor for the 'VpnRpcEnumNat' class: RPC_ENUM_NAT */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration item of VPN session */ +export class VpnRpcEnumSessionItem +{ + /** Session name */ + public Name_str: string = ""; + + /** Remote session */ + public RemoteSession_bool: boolean = false; + + /** Remote server name */ + public RemoteHostname_str: string = ""; + + /** User name */ + public Username_str: string = ""; + + /** IP address */ + public ClientIP_ip: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** Maximum number of underlying TCP connections */ + public MaxNumTcp_u32: number = 0; + + /** Number of current underlying TCP connections */ + public CurrentNumTcp_u32: number = 0; + + /** Packet size transmitted */ + public PacketSize_u64: number = 0; + + /** Number of packets transmitted */ + public PacketNum_u64: number = 0; + + /** Is a Cascade VPN session */ + public LinkMode_bool: boolean = false; + + /** Is a SecureNAT VPN session */ + public SecureNATMode_bool: boolean = false; + + /** Is the VPN session for Local Bridge */ + public BridgeMode_bool: boolean = false; + + /** Is a Layer-3 Switch VPN session */ + public Layer3Mode_bool: boolean = false; + + /** Is in Bridge Mode */ + public Client_BridgeMode_bool: boolean = false; + + /** Is in Monitor Mode */ + public Client_MonitorMode_bool: boolean = false; + + /** VLAN ID */ + public VLanId_u32: number = 0; + + /** Unique ID of the VPN Session */ + public UniqueId_bin: Uint8Array = new Uint8Array([]); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Last communication date and time */ + public LastCommTime_dt: Date = new Date(); + + /** Constructor for the 'VpnRpcEnumSessionItem' class: Enumeration item of VPN session */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumerate VPN sessions */ +export class VpnRpcEnumSession +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** VPN sessions list */ + public SessionList: VpnRpcEnumSessionItem[] = []; + + /** Constructor for the 'VpnRpcEnumSession' class: Enumerate VPN sessions */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration item of user */ +export class VpnRpcEnumUserItem +{ + /** User name */ + public Name_str: string = ""; + + /** Group name */ + public GroupName_str: string = ""; + + /** Real name */ + public Realname_utf: string = ""; + + /** Note */ + public Note_utf: string = ""; + + /** Authentication method */ + public AuthType_u32: VpnRpcUserAuthType = 0; + + /** Number of logins */ + public NumLogin_u32: number = 0; + + /** Last login date and time */ + public LastLoginTime_dt: Date = new Date(); + + /** Access denied */ + public DenyAccess_bool: boolean = false; + + /** Flag of whether the traffic variable is set */ + public IsTrafficFilled_bool: boolean = false; + + /** Flag of whether expiration date variable is set */ + public IsExpiresFilled_bool: boolean = false; + + /** Expiration date */ + public Expires_dt: Date = new Date(); + + /** Number of broadcast packets (Recv) */ + public ["Ex.Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Ex.Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Ex.Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Ex.Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Ex.Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Ex.Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastCount_u64"]: number = 0; + + /** Constructor for the 'VpnRpcEnumUserItem' class: Enumeration item of user */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of user */ +export class VpnRpcEnumUser +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** User list */ + public UserList: VpnRpcEnumUserItem[] = []; + + /** Constructor for the 'VpnRpcEnumUser' class: Enumeration of user */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Source IP Address Limit List Item */ +export class VpnAc +{ + /** ID */ + public Id_u32: number = 0; + + /** Priority */ + public Priority_u32: number = 0; + + /** Deny access */ + public Deny_bool: boolean = false; + + /** Set true if you want to specify the SubnetMask_ip item. */ + public Masked_bool: boolean = false; + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Subnet mask, valid only if Masked_bool == true */ + public SubnetMask_ip: string = ""; + + /** Constructor for the 'VpnAc' class: Source IP Address Limit List Item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Source IP Address Limit List */ +export class VpnRpcAcList +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Source IP Address Limit List */ + public ACList: VpnAc[] = []; + + /** Constructor for the 'VpnRpcAcList' class: Source IP Address Limit List */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Message */ +export class VpnRpcMsg +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Message (Unicode strings acceptable) */ + public Msg_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcMsg' class: Message */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Get / Set the Azure state */ +export class VpnRpcAzureStatus +{ + /** Whether VPN Azure Function is Enabled */ + public IsEnabled_bool: boolean = false; + + /** Whether connection to VPN Azure Cloud Server is established */ + public IsConnected_bool: boolean = false; + + /** Constructor for the 'VpnRpcAzureStatus' class: Get / Set the Azure state */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Local Bridge support information */ +export class VpnRpcBridgeSupport +{ + /** Whether the OS supports the Local Bridge function */ + public IsBridgeSupportedOs_bool: boolean = false; + + /** Whether WinPcap is necessary to install */ + public IsWinPcapNeeded_bool: boolean = false; + + /** Constructor for the 'VpnRpcBridgeSupport' class: Local Bridge support information */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Get the CA of HUB */ +export class VpnRpcHubGetCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The key id of the certificate */ + public Key_u32: number = 0; + + /** The body of the X.509 certificate */ + public Cert_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcHubGetCA' class: Get the CA of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Caps item of the VPN Server */ +export class VpnCaps +{ + /** Name */ + public CapsName_str: string = ""; + + /** Value */ + public CapsValue_u32: number = 0; + + /** Descrption */ + public CapsDescrption_utf: string = ""; + + /** Constructor for the 'VpnCaps' class: Caps item of the VPN Server */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Caps list of the VPN Server */ +export class VpnCapslist +{ + /** Caps list of the VPN Server */ + public CapsList: VpnCaps[] = []; + + /** Constructor for the 'VpnCapslist' class: Caps list of the VPN Server */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Config operation */ +export class VpnRpcConfig +{ + /** File name (valid only for returning from the server) */ + public FileName_str: string = ""; + + /** File data */ + public FileData_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcConfig' class: Config operation */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Connection information */ +export class VpnRpcConnectionInfo +{ + /** Connection name */ + public Name_str: string = ""; + + /** Type */ + public Type_u32: VpnRpcConnectionType = 0; + + /** Host name */ + public Hostname_str: string = ""; + + /** IP address */ + public Ip_ip: string = ""; + + /** Port number */ + public Port_u32: number = 0; + + /** Connected time */ + public ConnectedTime_dt: Date = new Date(); + + /** Server string */ + public ServerStr_str: string = ""; + + /** Server version */ + public ServerVer_u32: number = 0; + + /** Server build number */ + public ServerBuild_u32: number = 0; + + /** Client string */ + public ClientStr_str: string = ""; + + /** Client version */ + public ClientVer_u32: number = 0; + + /** Client build number */ + public ClientBuild_u32: number = 0; + + /** Constructor for the 'VpnRpcConnectionInfo' class: Connection information */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Proxy type */ +export enum VpnRpcProxyType +{ + /** Direct TCP connection */ + Direct = 0, + + /** Connection via HTTP proxy server */ + HTTP = 1, + + /** Connection via SOCKS proxy server */ + SOCKS = 2, + +} + +/** The current status of the DDNS */ +export class VpnDDnsClientStatus +{ + /** Last error code (IPv4) */ + public Err_IPv4_u32: number = 0; + + /** Last error string (IPv4) */ + public ErrStr_IPv4_utf: string = ""; + + /** Last error code (IPv6) */ + public Err_IPv6_u32: number = 0; + + /** Last error string (IPv6) */ + public ErrStr_IPv6_utf: string = ""; + + /** Current DDNS host name */ + public CurrentHostName_str: string = ""; + + /** Current FQDN of the DDNS hostname */ + public CurrentFqdn_str: string = ""; + + /** DDNS suffix */ + public DnsSuffix_str: string = ""; + + /** Current IPv4 address of the VPN Server */ + public CurrentIPv4_str: string = ""; + + /** Current IPv6 address of the VPN Server */ + public CurrentIPv6_str: string = ""; + + /** Constructor for the 'VpnDDnsClientStatus' class: The current status of the DDNS */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Internet connection settings */ +export class VpnInternetSetting +{ + /** Type of proxy server */ + public ProxyType_u32: VpnRpcProxyType = 0; + + /** Proxy server host name */ + public ProxyHostName_str: string = ""; + + /** Proxy server port number */ + public ProxyPort_u32: number = 0; + + /** Proxy server user name */ + public ProxyUsername_str: string = ""; + + /** Proxy server password */ + public ProxyPassword_str: string = ""; + + /** Constructor for the 'VpnInternetSetting' class: Internet connection settings */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Administration options */ +export class VpnAdminOption +{ + /** Name */ + public Name_str: string = ""; + + /** Data */ + public Value_u32: number = 0; + + /** Descrption */ + public Descrption_utf: string = ""; + + /** Constructor for the 'VpnAdminOption' class: Administration options */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Administration options list */ +export class VpnRpcAdminOption +{ + /** Virtual HUB name */ + public HubName_str: string = ""; + + /** List data */ + public AdminOptionList: VpnAdminOption[] = []; + + /** Constructor for the 'VpnRpcAdminOption' class: Administration options list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Connection state to the controller */ +export class VpnRpcFarmConnectionStatus +{ + /** IP address */ + public Ip_ip: string = ""; + + /** Port number */ + public Port_u32: number = 0; + + /** Online state */ + public Online_bool: boolean = false; + + /** Last error code */ + public LastError_u32: number = 0; + + /** Connection start time */ + public StartedTime_dt: Date = new Date(); + + /** First connection time */ + public FirstConnectedTime_dt: Date = new Date(); + + /** Connection time of this time */ + public CurrentConnectedTime_dt: Date = new Date(); + + /** Number of retries */ + public NumTry_u32: number = 0; + + /** Number of connection count */ + public NumConnected_u32: number = 0; + + /** Connection failure count */ + public NumFailed_u32: number = 0; + + /** Constructor for the 'VpnRpcFarmConnectionStatus' class: Connection state to the controller */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** HUB item of each farm member */ +export class VpnRpcFarmHub +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Dynamic HUB */ + public DynamicHub_bool: boolean = false; + + /** Constructor for the 'VpnRpcFarmHub' class: HUB item of each farm member */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm member information acquisition */ +export class VpnRpcFarmInfo +{ + /** ID */ + public Id_u32: number = 0; + + /** The flag if the server is Cluster Controller (false: Cluster Member servers) */ + public Controller_bool: boolean = false; + + /** Connection Established Time */ + public ConnectedTime_dt: Date = new Date(); + + /** IP address */ + public Ip_ip: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** Point */ + public Point_u32: number = 0; + + /** Number of Public Ports */ + public NumPort_u32: number = 0; + + /** Public Ports */ + public Ports_u32: number[] = []; + + /** Server certificate */ + public ServerCert_bin: Uint8Array = new Uint8Array([]); + + /** Number of farm HUB */ + public NumFarmHub_u32: number = 0; + + /** The hosted Virtual Hub list */ + public HubsList: VpnRpcFarmHub[] = []; + + /** Number of hosted VPN sessions */ + public NumSessions_u32: number = 0; + + /** Number of TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Performance Standard Ratio */ + public Weight_u32: number = 0; + + /** Constructor for the 'VpnRpcFarmInfo' class: Server farm member information acquisition */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm configuration */ +export class VpnRpcFarm +{ + /** Type of server */ + public ServerType_u32: VpnRpcServerType = 0; + + /** Valid only for Cluster Member servers. Number of the Ports_u32 element. */ + public NumPort_u32: number = 0; + + /** Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. */ + public Ports_u32: number[] = []; + + /** Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. */ + public PublicIp_ip: string = ""; + + /** Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. */ + public ControllerName_str: string = ""; + + /** Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. */ + public ControllerPort_u32: number = 0; + + /** Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. */ + public MemberPasswordPlaintext_str: string = ""; + + /** This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. */ + public Weight_u32: number = 0; + + /** Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. */ + public ControllerOnly_bool: boolean = false; + + /** Constructor for the 'VpnRpcFarm' class: Server farm configuration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Log switch type */ +export enum VpnRpcLogSwitchType +{ + /** No switching */ + No = 0, + + /** Secondly basis */ + Second = 1, + + /** Minutely basis */ + Minute = 2, + + /** Hourly basis */ + Hour = 3, + + /** Daily basis */ + Day = 4, + + /** Monthly basis */ + Month = 5, + +} + +/** Packet log settings */ +export enum VpnRpcPacketLogSetting +{ + /** Not save */ + None = 0, + + /** Only header */ + Header = 1, + + /** All payloads */ + All = 2, + +} + +/** Packet log settings array index */ +export enum VpnRpcPacketLogSettingIndex +{ + /** TCP connection log */ + TcpConnection = 0, + + /** TCP packet log */ + TcpAll = 1, + + /** DHCP Log */ + Dhcp = 2, + + /** UDP log */ + Udp = 3, + + /** ICMP log */ + Icmp = 4, + + /** IP log */ + Ip = 5, + + /** ARP log */ + Arp = 6, + + /** Ethernet log */ + Ethernet = 7, + +} + +/** HUB log settings */ +export class VpnRpcHubLog +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The flag to enable / disable saving the security log */ + public SaveSecurityLog_bool: boolean = false; + + /** The log filename switching setting of the security log */ + public SecurityLogSwitchType_u32: VpnRpcLogSwitchType = 0; + + /** The flag to enable / disable saving the security log */ + public SavePacketLog_bool: boolean = false; + + /** The log filename switching settings of the packet logs */ + public PacketLogSwitchType_u32: VpnRpcLogSwitchType = 0; + + /** Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7. */ + public PacketLogConfig_u32: VpnRpcPacketLogSetting[] = []; + + /** Constructor for the 'VpnRpcHubLog' class: HUB log settings */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RADIUS server options */ +export class VpnRpcRadius +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** RADIUS server name */ + public RadiusServerName_str: string = ""; + + /** RADIUS port number */ + public RadiusPort_u32: number = 0; + + /** Secret key */ + public RadiusSecret_str: string = ""; + + /** Radius retry interval */ + public RadiusRetryInterval_u32: number = 0; + + /** Constructor for the 'VpnRpcRadius' class: RADIUS server options */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Get the state HUB */ +export class VpnRpcHubStatus +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Online */ + public Online_bool: boolean = false; + + /** Type of HUB */ + public HubType_u32: VpnRpcHubType = 0; + + /** Number of sessions */ + public NumSessions_u32: number = 0; + + /** Number of sessions (client mode) */ + public NumSessionsClient_u32: number = 0; + + /** Number of sessions (bridge mode) */ + public NumSessionsBridge_u32: number = 0; + + /** Number of Access list entries */ + public NumAccessLists_u32: number = 0; + + /** Number of users */ + public NumUsers_u32: number = 0; + + /** Number of groups */ + public NumGroups_u32: number = 0; + + /** Number of MAC table entries */ + public NumMacTables_u32: number = 0; + + /** Number of IP table entries */ + public NumIpTables_u32: number = 0; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** Whether SecureNAT is enabled */ + public SecureNATEnabled_bool: boolean = false; + + /** Last communication date and time */ + public LastCommTime_dt: Date = new Date(); + + /** Last login date and time */ + public LastLoginTime_dt: Date = new Date(); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Number of logins */ + public NumLogin_u32: number = 0; + + /** Constructor for the 'VpnRpcHubStatus' class: Get the state HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** List of services provided by IPsec server */ +export class VpnIPsecServices +{ + /** Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. */ + public L2TP_Raw_bool: boolean = false; + + /** Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. */ + public L2TP_IPsec_bool: boolean = false; + + /** Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. */ + public EtherIP_IPsec_bool: boolean = false; + + /** Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. */ + public IPsec_Secret_str: string = ""; + + /** Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. */ + public L2TP_DefaultHub_str: string = ""; + + /** Constructor for the 'VpnIPsecServices' class: List of services provided by IPsec server */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Keep alive protocol */ +export enum VpnRpcKeepAliveProtocol +{ + /** TCP */ + TCP = 0, + + /** UDP */ + UDP = 1, + +} + +/** Keep Alive settings */ +export class VpnRpcKeep +{ + /** The flag to enable keep-alive to the Internet */ + public UseKeepConnect_bool: boolean = false; + + /** Specify the host name or IP address of the destination */ + public KeepConnectHost_str: string = ""; + + /** Specify the port number of the destination */ + public KeepConnectPort_u32: number = 0; + + /** Protocol type */ + public KeepConnectProtocol_u32: VpnRpcKeepAliveProtocol = 0; + + /** Interval Between Packets Sends (Seconds) */ + public KeepConnectInterval_u32: number = 0; + + /** Constructor for the 'VpnRpcKeep' class: Keep Alive settings */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** State of the client session */ +export enum VpnRpcClientSessionStatus +{ + /** Connecting */ + Connecting = 0, + + /** Negotiating */ + Negotiation = 1, + + /** During user authentication */ + Auth = 2, + + /** Connection complete */ + Established = 3, + + /** Wait to retry */ + Retry = 4, + + /** Idle state */ + Idle = 5, + +} + +/** Get the link state */ +export class VpnRpcLinkStatus +{ + /** The Virtual Hub name */ + public HubName_Ex_str: string = ""; + + /** The name of the cascade connection */ + public AccountName_utf: string = ""; + + /** The flag whether the cascade connection is enabled */ + public Active_bool: boolean = false; + + /** The flag whether the cascade connection is established */ + public Connected_bool: boolean = false; + + /** The session status */ + public SessionStatus_u32: VpnRpcClientSessionStatus = 0; + + /** The destination VPN server name */ + public ServerName_str: string = ""; + + /** The port number of the server */ + public ServerPort_u32: number = 0; + + /** Server product name */ + public ServerProductName_str: string = ""; + + /** Server product version */ + public ServerProductVer_u32: number = 0; + + /** Server product build number */ + public ServerProductBuild_u32: number = 0; + + /** Server's X.509 certificate */ + public ServerX_bin: Uint8Array = new Uint8Array([]); + + /** Client certificate */ + public ClientX_bin: Uint8Array = new Uint8Array([]); + + /** Connection start time */ + public StartTime_dt: Date = new Date(); + + /** Connection completion time of the first connection */ + public FirstConnectionEstablisiedTime_dt: Date = new Date(); + + /** Connection completion time of this connection */ + public CurrentConnectionEstablishTime_dt: Date = new Date(); + + /** Number of connections have been established so far */ + public NumConnectionsEatablished_u32: number = 0; + + /** Half-connection */ + public HalfConnection_bool: boolean = false; + + /** VoIP / QoS */ + public QoS_bool: boolean = false; + + /** Maximum number of the underlying TCP connections */ + public MaxTcpConnections_u32: number = 0; + + /** Number of current underlying TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of underlying inbound TCP connections */ + public NumTcpConnectionsUpload_u32: number = 0; + + /** Number of underlying outbound TCP connections */ + public NumTcpConnectionsDownload_u32: number = 0; + + /** Use of encryption */ + public UseEncrypt_bool: boolean = false; + + /** Cipher algorithm name */ + public CipherName_str: string = ""; + + /** Use of compression */ + public UseCompress_bool: boolean = false; + + /** The flag whether this is a R-UDP session */ + public IsRUDPSession_bool: boolean = false; + + /** Underlying physical communication protocol */ + public UnderlayProtocol_str: string = ""; + + /** The UDP acceleration is enabled */ + public IsUdpAccelerationEnabled_bool: boolean = false; + + /** The UDP acceleration is being actually used */ + public IsUsingUdpAcceleration_bool: boolean = false; + + /** Session name */ + public SessionName_str: string = ""; + + /** Connection name */ + public ConnectionName_str: string = ""; + + /** Session key */ + public SessionKey_bin: Uint8Array = new Uint8Array([]); + + /** Total transmitted data size */ + public TotalSendSize_u64: number = 0; + + /** Total received data size */ + public TotalRecvSize_u64: number = 0; + + /** Total transmitted data size (no compression) */ + public TotalSendSizeReal_u64: number = 0; + + /** Total received data size (no compression) */ + public TotalRecvSizeReal_u64: number = 0; + + /** The flag whether the VPN session is Bridge Mode */ + public IsBridgeMode_bool: boolean = false; + + /** The flag whether the VPN session is Monitor mode */ + public IsMonitorMode_bool: boolean = false; + + /** VLAN ID */ + public VLanId_u32: number = 0; + + /** Constructor for the 'VpnRpcLinkStatus' class: Get the link state */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Setting of SSTP and OpenVPN */ +export class VpnOpenVpnSstpConfig +{ + /** Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. */ + public EnableOpenVPN_bool: boolean = false; + + /** Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. */ + public OpenVPNPortList_str: string = ""; + + /** pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. */ + public EnableSSTP_bool: boolean = false; + + /** Constructor for the 'VpnOpenVpnSstpConfig' class: Setting of SSTP and OpenVPN */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Virtual host option */ +export class VpnVhOption +{ + /** Target Virtual HUB name */ + public RpcHubName_str: string = ""; + + /** MAC address */ + public MacAddress_bin: Uint8Array = new Uint8Array([]); + + /** IP address */ + public Ip_ip: string = ""; + + /** Subnet mask */ + public Mask_ip: string = ""; + + /** Use flag of the Virtual NAT function */ + public UseNat_bool: boolean = false; + + /** MTU value (Standard: 1500) */ + public Mtu_u32: number = 0; + + /** NAT TCP timeout in seconds */ + public NatTcpTimeout_u32: number = 0; + + /** NAT UDP timeout in seconds */ + public NatUdpTimeout_u32: number = 0; + + /** Using flag of DHCP function */ + public UseDhcp_bool: boolean = false; + + /** Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) */ + public DhcpLeaseIPStart_ip: string = ""; + + /** Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) */ + public DhcpLeaseIPEnd_ip: string = ""; + + /** Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) */ + public DhcpSubnetMask_ip: string = ""; + + /** Specify the expiration date in second units for leasing an IP address to a client. */ + public DhcpExpireTimeSpan_u32: number = 0; + + /** Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. */ + public DhcpGatewayAddress_ip: string = ""; + + /** Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + public DhcpDnsServerAddress_ip: string = ""; + + /** Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + public DhcpDnsServerAddress2_ip: string = ""; + + /** Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. */ + public DhcpDomainName_str: string = ""; + + /** Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. */ + public SaveLog_bool: boolean = false; + + /** The flag to enable the DhcpPushRoutes_str field. */ + public ApplyDhcpPushRoutes_bool: boolean = false; + + /** Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. */ + public DhcpPushRoutes_str: string = ""; + + /** Constructor for the 'VpnVhOption' class: Virtual host option */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_NAT_STATUS */ +export class VpnRpcNatStatus +{ + /** Virtual Hub Name */ + public HubName_str: string = ""; + + /** Number of TCP sessions */ + public NumTcpSessions_u32: number = 0; + + /** Ntmber of UDP sessions */ + public NumUdpSessions_u32: number = 0; + + /** Nymber of ICMP sessions */ + public NumIcmpSessions_u32: number = 0; + + /** Number of DNS sessions */ + public NumDnsSessions_u32: number = 0; + + /** Number of DHCP clients */ + public NumDhcpClients_u32: number = 0; + + /** Whether the NAT is operating in the Kernel Mode */ + public IsKernelMode_bool: boolean = false; + + /** Whether the NAT is operating in the Raw IP Mode */ + public IsRawIpMode_bool: boolean = false; + + /** Constructor for the 'VpnRpcNatStatus' class: RPC_NAT_STATUS */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Key pair */ +export class VpnRpcKeyPair +{ + /** The body of the certificate */ + public Cert_bin: Uint8Array = new Uint8Array([]); + + /** The body of the private key */ + public Key_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcKeyPair' class: Key pair */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Single string value */ +export class VpnRpcStr +{ + /** A string value */ + public String_str: string = ""; + + /** Constructor for the 'VpnRpcStr' class: Single string value */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Type of VPN Server */ +export enum VpnRpcServerType +{ + /** Stand-alone server */ + Standalone = 0, + + /** Farm controller server */ + FarmController = 1, + + /** Farm member server */ + FarmMember = 2, + +} + +/** Operating system type */ +export enum VpnRpcOsType +{ + /** Windows 95 */ + WINDOWS_95 = 1100, + + /** Windows 98 */ + WINDOWS_98 = 1200, + + /** Windows Me */ + WINDOWS_ME = 1300, + + /** Windows (unknown) */ + WINDOWS_UNKNOWN = 1400, + + /** Windows NT 4.0 Workstation */ + WINDOWS_NT_4_WORKSTATION = 2100, + + /** Windows NT 4.0 Server */ + WINDOWS_NT_4_SERVER = 2110, + + /** Windows NT 4.0 Server, Enterprise Edition */ + WINDOWS_NT_4_SERVER_ENTERPRISE = 2111, + + /** Windows NT 4.0 Terminal Server */ + WINDOWS_NT_4_TERMINAL_SERVER = 2112, + + /** BackOffice Server 4.5 */ + WINDOWS_NT_4_BACKOFFICE = 2113, + + /** Small Business Server 4.5 */ + WINDOWS_NT_4_SMS = 2114, + + /** Windows 2000 Professional */ + WINDOWS_2000_PROFESSIONAL = 2200, + + /** Windows 2000 Server */ + WINDOWS_2000_SERVER = 2211, + + /** Windows 2000 Advanced Server */ + WINDOWS_2000_ADVANCED_SERVER = 2212, + + /** Windows 2000 Datacenter Server */ + WINDOWS_2000_DATACENTER_SERVER = 2213, + + /** BackOffice Server 2000 */ + WINDOWS_2000_BACKOFFICE = 2214, + + /** Small Business Server 2000 */ + WINDOWS_2000_SBS = 2215, + + /** Windows XP Home Edition */ + WINDOWS_XP_HOME = 2300, + + /** Windows XP Professional */ + WINDOWS_XP_PROFESSIONAL = 2301, + + /** Windows Server 2003 Web Edition */ + WINDOWS_2003_WEB = 2410, + + /** Windows Server 2003 Standard Edition */ + WINDOWS_2003_STANDARD = 2411, + + /** Windows Server 2003 Enterprise Edition */ + WINDOWS_2003_ENTERPRISE = 2412, + + /** Windows Server 2003 DataCenter Edition */ + WINDOWS_2003_DATACENTER = 2413, + + /** BackOffice Server 2003 */ + WINDOWS_2003_BACKOFFICE = 2414, + + /** Small Business Server 2003 */ + WINDOWS_2003_SBS = 2415, + + /** Windows Vista */ + WINDOWS_LONGHORN_PROFESSIONAL = 2500, + + /** Windows Server 2008 */ + WINDOWS_LONGHORN_SERVER = 2510, + + /** Windows 7 */ + WINDOWS_7 = 2600, + + /** Windows Server 2008 R2 */ + WINDOWS_SERVER_2008_R2 = 2610, + + /** Windows 8 */ + WINDOWS_8 = 2700, + + /** Windows Server 2012 */ + WINDOWS_SERVER_8 = 2710, + + /** Windows 8.1 */ + WINDOWS_81 = 2701, + + /** Windows Server 2012 R2 */ + WINDOWS_SERVER_81 = 2711, + + /** Windows 10 */ + WINDOWS_10 = 2702, + + /** Windows Server 10 */ + WINDOWS_SERVER_10 = 2712, + + /** Windows 11 or later */ + WINDOWS_11 = 2800, + + /** Windows Server 11 or later */ + WINDOWS_SERVER_11 = 2810, + + /** Unknown UNIX */ + UNIX_UNKNOWN = 3000, + + /** Linux */ + LINUX = 3100, + + /** Solaris */ + SOLARIS = 3200, + + /** Cygwin */ + CYGWIN = 3300, + + /** BSD */ + BSD = 3400, + + /** MacOS X */ + MACOS_X = 3500, + +} + +/** VPN Server Information */ +export class VpnRpcServerInfo +{ + /** Server product name */ + public ServerProductName_str: string = ""; + + /** Server version string */ + public ServerVersionString_str: string = ""; + + /** Server build information string */ + public ServerBuildInfoString_str: string = ""; + + /** Server version integer value */ + public ServerVerInt_u32: number = 0; + + /** Server build number integer value */ + public ServerBuildInt_u32: number = 0; + + /** Server host name */ + public ServerHostName_str: string = ""; + + /** Type of server */ + public ServerType_u32: VpnRpcServerType = 0; + + /** Build date and time of the server */ + public ServerBuildDate_dt: Date = new Date(); + + /** Family name */ + public ServerFamilyName_str: string = ""; + + /** OS type */ + public OsType_u32: VpnRpcOsType = 0; + + /** Service pack number */ + public OsServicePack_u32: number = 0; + + /** OS system name */ + public OsSystemName_str: string = ""; + + /** OS product name */ + public OsProductName_str: string = ""; + + /** OS vendor name */ + public OsVendorName_str: string = ""; + + /** OS version */ + public OsVersion_str: string = ""; + + /** Kernel name */ + public KernelName_str: string = ""; + + /** Kernel version */ + public KernelVersion_str: string = ""; + + /** Constructor for the 'VpnRpcServerInfo' class: VPN Server Information */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server status */ +export class VpnRpcServerStatus +{ + /** Type of server */ + public ServerType_u32: VpnRpcServerType = 0; + + /** Total number of TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of Local TCP connections */ + public NumTcpConnectionsLocal_u32: number = 0; + + /** Number of remote TCP connections */ + public NumTcpConnectionsRemote_u32: number = 0; + + /** Total number of HUBs */ + public NumHubTotal_u32: number = 0; + + /** Nymber of stand-alone HUB */ + public NumHubStandalone_u32: number = 0; + + /** Number of static HUBs */ + public NumHubStatic_u32: number = 0; + + /** Number of Dynamic HUBs */ + public NumHubDynamic_u32: number = 0; + + /** Total number of sessions */ + public NumSessionsTotal_u32: number = 0; + + /** Number of local VPN sessions */ + public NumSessionsLocal_u32: number = 0; + + /** The number of remote sessions */ + public NumSessionsRemote_u32: number = 0; + + /** Number of MAC table entries (total sum of all Virtual Hubs) */ + public NumMacTables_u32: number = 0; + + /** Number of IP table entries (total sum of all Virtual Hubs) */ + public NumIpTables_u32: number = 0; + + /** Number of users (total sum of all Virtual Hubs) */ + public NumUsers_u32: number = 0; + + /** Number of groups (total sum of all Virtual Hubs) */ + public NumGroups_u32: number = 0; + + /** Number of assigned bridge licenses (Useful to make a commercial version) */ + public AssignedBridgeLicenses_u32: number = 0; + + /** Number of assigned client licenses (Useful to make a commercial version) */ + public AssignedClientLicenses_u32: number = 0; + + /** Number of Assigned bridge license (cluster-wide), useful to make a commercial version */ + public AssignedBridgeLicensesTotal_u32: number = 0; + + /** Number of assigned client licenses (cluster-wide), useful to make a commercial version */ + public AssignedClientLicensesTotal_u32: number = 0; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** Current time */ + public CurrentTime_dt: Date = new Date(); + + /** 64 bit High-Precision Logical System Clock */ + public CurrentTick_u64: number = 0; + + /** VPN Server Start-up time */ + public StartTime_dt: Date = new Date(); + + /** Memory information: Total Memory */ + public TotalMemory_u64: number = 0; + + /** Memory information: Used Memory */ + public UsedMemory_u64: number = 0; + + /** Memory information: Free Memory */ + public FreeMemory_u64: number = 0; + + /** Memory information: Total Phys */ + public TotalPhys_u64: number = 0; + + /** Memory information: Used Phys */ + public UsedPhys_u64: number = 0; + + /** Memory information: Free Phys */ + public FreePhys_u64: number = 0; + + /** Constructor for the 'VpnRpcServerStatus' class: Server status */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** VPN Session status */ +export class VpnRpcSessionStatus +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** VPN session name */ + public Name_str: string = ""; + + /** User name */ + public Username_str: string = ""; + + /** Real user name which was used for the authentication */ + public RealUsername_str: string = ""; + + /** Group name */ + public GroupName_str: string = ""; + + /** Is Cascade Session */ + public LinkMode_bool: boolean = false; + + /** Client IP address */ + public Client_Ip_Address_ip: string = ""; + + /** Client host name */ + public SessionStatus_ClientHostName_str: string = ""; + + /** Operation flag */ + public Active_bool: boolean = false; + + /** Connected flag */ + public Connected_bool: boolean = false; + + /** State of the client session */ + public SessionStatus_u32: VpnRpcClientSessionStatus = 0; + + /** Server name */ + public ServerName_str: string = ""; + + /** Port number of the server */ + public ServerPort_u32: number = 0; + + /** Server product name */ + public ServerProductName_str: string = ""; + + /** Server product version */ + public ServerProductVer_u32: number = 0; + + /** Server product build number */ + public ServerProductBuild_u32: number = 0; + + /** Connection start time */ + public StartTime_dt: Date = new Date(); + + /** Connection completion time of the first connection */ + public FirstConnectionEstablisiedTime_dt: Date = new Date(); + + /** Connection completion time of this connection */ + public CurrentConnectionEstablishTime_dt: Date = new Date(); + + /** Number of connections have been established so far */ + public NumConnectionsEatablished_u32: number = 0; + + /** Half-connection */ + public HalfConnection_bool: boolean = false; + + /** VoIP / QoS */ + public QoS_bool: boolean = false; + + /** Maximum number of the underlying TCP connections */ + public MaxTcpConnections_u32: number = 0; + + /** Number of current underlying TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of inbound underlying connections */ + public NumTcpConnectionsUpload_u32: number = 0; + + /** Number of outbound underlying connections */ + public NumTcpConnectionsDownload_u32: number = 0; + + /** Use of encryption */ + public UseEncrypt_bool: boolean = false; + + /** Cipher algorithm name */ + public CipherName_str: string = ""; + + /** Use of compression */ + public UseCompress_bool: boolean = false; + + /** Is R-UDP session */ + public IsRUDPSession_bool: boolean = false; + + /** Physical underlying communication protocol */ + public UnderlayProtocol_str: string = ""; + + /** The UDP acceleration is enabled */ + public IsUdpAccelerationEnabled_bool: boolean = false; + + /** Using the UDP acceleration function */ + public IsUsingUdpAcceleration_bool: boolean = false; + + /** VPN session name */ + public SessionName_str: string = ""; + + /** Connection name */ + public ConnectionName_str: string = ""; + + /** Session key */ + public SessionKey_bin: Uint8Array = new Uint8Array([]); + + /** Total transmitted data size */ + public TotalSendSize_u64: number = 0; + + /** Total received data size */ + public TotalRecvSize_u64: number = 0; + + /** Total transmitted data size (no compression) */ + public TotalSendSizeReal_u64: number = 0; + + /** Total received data size (no compression) */ + public TotalRecvSizeReal_u64: number = 0; + + /** Is Bridge Mode */ + public IsBridgeMode_bool: boolean = false; + + /** Is Monitor mode */ + public IsMonitorMode_bool: boolean = false; + + /** VLAN ID */ + public VLanId_u32: number = 0; + + /** Client product name */ + public ClientProductName_str: string = ""; + + /** Client version */ + public ClientProductVer_u32: number = 0; + + /** Client build number */ + public ClientProductBuild_u32: number = 0; + + /** Client OS name */ + public ClientOsName_str: string = ""; + + /** Client OS version */ + public ClientOsVer_str: string = ""; + + /** Client OS Product ID */ + public ClientOsProductId_str: string = ""; + + /** Client host name */ + public ClientHostname_str: string = ""; + + /** Unique ID */ + public UniqueId_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcSessionStatus' class: VPN Session status */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Set the special listener */ +export class VpnRpcSpecialListener +{ + /** The flag to activate the VPN over ICMP server function */ + public VpnOverIcmpListener_bool: boolean = false; + + /** The flag to activate the VPN over DNS function */ + public VpnOverDnsListener_bool: boolean = false; + + /** Constructor for the 'VpnRpcSpecialListener' class: Set the special listener */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Syslog configuration */ +export enum VpnSyslogSaveType +{ + /** Do not use syslog */ + None = 0, + + /** Only server log */ + ServerLog = 1, + + /** Server and Virtual HUB security log */ + ServerAndHubSecurityLog = 2, + + /** Server, Virtual HUB security, and packet log */ + ServerAndHubAllLog = 3, + +} + +/** Syslog configuration */ +export class VpnSyslogSetting +{ + /** The behavior of the syslog function */ + public SaveType_u32: VpnSyslogSaveType = 0; + + /** Specify the host name or IP address of the syslog server */ + public Hostname_str: string = ""; + + /** Specify the port number of the syslog server */ + public Port_u32: number = 0; + + /** Constructor for the 'VpnSyslogSetting' class: Syslog configuration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** VPN Gate Server Config */ +export class VpnVgsConfig +{ + /** Active flag */ + public IsEnabled_bool: boolean = false; + + /** Message */ + public Message_utf: string = ""; + + /** Owner name */ + public Owner_utf: string = ""; + + /** Abuse email */ + public Abuse_utf: string = ""; + + /** Log save flag */ + public NoLog_bool: boolean = false; + + /** Save log permanently */ + public LogPermanent_bool: boolean = false; + + /** Enable the L2TP VPN function */ + public EnableL2TP_bool: boolean = false; + + /** Constructor for the 'VpnVgsConfig' class: VPN Gate Server Config */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Read a Log file */ +export class VpnRpcReadLogFile +{ + /** Server name */ + public ServerName_str: string = ""; + + /** File Path */ + public FilePath_str: string = ""; + + /** Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. */ + public Offset_u32: number = 0; + + /** Received buffer */ + public Buffer_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcReadLogFile' class: Read a Log file */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Rename link */ +export class VpnRpcRenameLink +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The old name of the cascade connection */ + public OldAccountName_utf: string = ""; + + /** The new name of the cascade connection */ + public NewAccountName_utf: string = ""; + + /** Constructor for the 'VpnRpcRenameLink' class: Rename link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Online or offline the HUB */ +export class VpnRpcSetHubOnline +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Online / offline flag */ + public Online_bool: boolean = false; + + /** Constructor for the 'VpnRpcSetHubOnline' class: Online or offline the HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Set Password */ +export class VpnRpcSetPassword +{ + /** The plaintext password */ + public PlainTextPassword_str: string = ""; + + /** Constructor for the 'VpnRpcSetPassword' class: Set Password */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + + + + + +// --- Utility codes --- + +/** JSON-RPC request class. See https://www.jsonrpc.org/specification */ +export class JsonRpcRequest +{ + public jsonrpc: string = "2.0"; + public method: string; + public params: any; + public id: string; + + constructor(method: string = "", param: any = null, id: string = "") + { + this.method = method; + this.params = param; + this.id = id; + } +} + +/** JSON-RPC error class. See https://www.jsonrpc.org/specification */ +export class JsonRpcError +{ + public code: number; + public message: string; + public data: any; + + constructor(code: number = 0, message: string = "", data: any = null) + { + this.code = code; + this.message = message; + this.data = data; + } +} + +/** JSON-RPC response class with generics */ +export class JsonRpcResponse +{ + public jsonrpc: string = "2.0"; + public result: TResult = null!; + public error: JsonRpcError = null!; + public id: string = ""; +} + +/** JSON-RPC client class. See https://www.jsonrpc.org/specification */ +export class JsonRpcClient +{ + /** A utility function to convert any object to JSON string */ + public static ObjectToJson(obj: any): string + { + return JSON.stringify(obj, + (key, value) => + { + if (key.endsWith("_bin")) + { + return Util_Base64_Encode(value); + } + return value; + } + , 4); + } + + /** A utility function to convert JSON string to object */ + public static JsonToObject(str: string): any + { + return JSON.parse(str, + (key, value) => + { + if (key.endsWith("_bin")) + { + return Util_Base64_Decode(value); + } + else if (key.endsWith("_dt")) + { + return new Date(value); + } + return value; + }); + } + + /** Base URL */ + public BaseUrl: string; + + /** The instance of HTTP client */ + private client: HttpClient; + + /** Additional HTTP headers */ + private headers: { [name: string]: string }; + + /** + * JSON-RPC client class constructor + * @param url The URL + * @param headers Additional HTTP headers + * @param send_credential Set true to use the same credential with the browsing web site. Valid only if the code is running on the web browser. + */ + constructor(url: string, headers: { [name: string]: string }, send_credential: boolean, nodejs_https_client_reject_untrusted_server_cert: boolean) + { + this.BaseUrl = url; + this.headers = headers; + + this.client = new HttpClient(); + this.client.SendCredential = send_credential; + this.client.NodeJS_HTTPS_Client_Reject_Unauthorized = nodejs_https_client_reject_untrusted_server_cert; + } + + /** + * Call a single RPC call (without error check). You can wait for the response with Promise or await statement. + * @param method_name The name of RPC method + * @param param The parameters + */ + public async CallInternalAsync(method_name: string, param: any): Promise + { + let id = "1"; + + let req = new JsonRpcRequest(method_name, param, id); + + let req_string = JsonRpcClient.ObjectToJson(req); + + if (debug_mode) + { + console.log("--- RPC Request Body ---"); + console.log(req_string); + console.log("------------------------"); + } + + let http_response = await this.client.PostAsync(this.BaseUrl, this.headers, + req_string, "application/json"); + + let ret_string = http_response.Body; + + if (debug_mode) + { + console.log("--- RPC Response Body ---"); + console.log(ret_string); + console.log("-------------------------"); + } + + return ret_string; + } + + /** + * Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + * @param method_name The name of RPC method + * @param param The parameters + */ + public async CallAsync(method_name: string, param: any): Promise + { + let ret_string = await this.CallInternalAsync(method_name, param); + + let ret: JsonRpcResponse = JSON.parse(ret_string); + + if (is_null(ret.error) === false) + { + throw new JsonRpcException(ret.error); + } + + return ret.result; + } +} + +/** JSON-RPC exception class */ +export class JsonRpcException extends Error +{ + public Error: JsonRpcError; + + constructor(error: JsonRpcError) + { + super(`Code=${error.code}, Message=${error.message}`); + this.Error = error; + } +} + +/** HTTP client exception class */ +export class HttpClientException extends Error +{ + constructor(message: string) + { + super(message); + } +} + +/** HTTP client response class */ +export class HttpClientResponse +{ + public Body: string = ""; +} + +/** An HTTP client which can be used in both web browsers and Node.js */ +export class HttpClient +{ + public TimeoutMsecs: number = 60 * 5 * 1000; + public SendCredential: boolean = true; + public NodeJS_HTTPS_Client_Reject_Unauthorized: boolean = false; + + /** Post method. In web browsers this function will process the request by itself. In Node.js this function will call PostAsync_NodeJS() instead. */ + public async PostAsync(url: string, headers: { [name: string]: string }, + req_body: string, req_media_type: string): Promise + { + if (is_node_js) + { + return this.PostAsync_NodeJS(url, headers, req_body, req_media_type); + } + + let fetch_header_list = new Headers(); + + for (let name of Object.keys(headers)) + { + fetch_header_list.append(name, headers[name]); + } + + let fetch_init: RequestInit = + { + mode: "cors", + headers: fetch_header_list, + credentials: (this.SendCredential ? "include" : "omit"), + method: "POST", + cache: "no-cache", + keepalive: true, + redirect: "follow", + body: req_body, + }; + + let fetch_response = await fetch(url, fetch_init); + + if (fetch_response.ok === false) + { + throw new HttpClientException("HTTP Error: " + fetch_response.status + " " + fetch_response.statusText); + } + + let ret = new HttpClientResponse(); + + ret.Body = await fetch_response.text(); + + return ret; + } + + /** Post method for Node.js. */ + public PostAsync_NodeJS(url: string, headers: { [name: string]: string }, + req_body: string, req_media_type: string): Promise + { + const https = require("https"); + const keepAliveAgent = new https.Agent({ keepAlive: true }); + const urlparse = require("url"); + + const urlobj = urlparse.parse(url); + + if (is_null(urlobj.host)) throw new Error("URL is invalid."); + + let options = + { + host: urlobj.hostname, + port: urlobj.port, + path: urlobj.path, + rejectUnauthorized: this.NodeJS_HTTPS_Client_Reject_Unauthorized, + method: "POST", + timeout: this.TimeoutMsecs, + agent: keepAliveAgent, + }; + + return new Promise(function (resolve, reject) + { + let req = https.request(options, (res: any) => + { + if (res.statusCode !== 200) + { + reject(new HttpClientException("HTTP Error: " + res.statusCode + " " + res.statusMessage)); + } + + let recv_str: string = ""; + + res.on("data", (body: any) => + { + recv_str += body; + }); + + res.on("end", () => + { + let ret = new HttpClientResponse(); + + ret.Body = recv_str; + + resolve(ret); + }); + }).on("error", (err: any) => + { + throw err; + } + ); + + for (let name of Object.keys(headers)) + { + req.setHeader(name, !is_null(headers[name]) ? headers[name] : ""); + } + req.setHeader("Content-Type", req_media_type); + req.setHeader("Content-Length", Buffer.byteLength(req_body)); + req.write(req_body); + req.end(); + }); + } +} + + + + +//////// BEGIN: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js +// The MIT License(MIT) +// Copyright(c) 2014 +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +var lookup: any = []; +var revLookup: any = []; + +var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +for (var i = 0, len = code.length; i < len; ++i) +{ + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup["-".charCodeAt(0)] = 62; +revLookup["_".charCodeAt(0)] = 63; + +function getLens(b64: any) +{ + var len = b64.length; + + if (len % 4 > 0) + { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf("="); + if (validLen === -1) validLen = len; + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4); + + return [validLen, placeHoldersLen]; +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength(b64: any) +{ + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} + +function _byteLength(b64: any, validLen: any, placeHoldersLen: any) +{ + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} + +export function Util_Base64_Decode(b64: any) +{ + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + + var arr = new Uint8Array(_byteLength(b64, validLen, placeHoldersLen)); + + var curByte = 0; + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen; + + for (var i = 0; i < len; i += 4) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)]; + arr[curByte++] = (tmp >> 16) & 0xFF; + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + + if (placeHoldersLen === 2) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[curByte++] = tmp & 0xFF; + } + + if (placeHoldersLen === 1) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + + return arr; +} + +function tripletToBase64(num: any) +{ + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F]; +} + +function encodeChunk(uint8: any, start: any, end: any) +{ + var tmp; + var output = []; + for (var i = start; i < end; i += 3) + { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF); + output.push(tripletToBase64(tmp)); + } + return output.join(""); +} + +export function Util_Base64_Encode(uint8: any) +{ + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) + { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) + { + tmp = uint8[len - 1]; + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + "==" + ); + } else if (extraBytes === 2) + { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + "=" + ); + } + + return parts.join(""); +} +//////// END: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js + + + diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/tsconfig.json b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/tsconfig.json new file mode 100644 index 00000000..73ae4a86 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/tsconfig.json @@ -0,0 +1,72 @@ +{ + "compilerOptions": { + /* Basic Options */ + "target": "ES3", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": [ + "dom", + "es2015.promise", + "es5" + ], // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "./dist/", /* Redirect output structure to the directory. */ + "rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "incremental": true, /* Enable incremental compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/tslint.json b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/tslint.json new file mode 100644 index 00000000..cb18b3f2 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/tslint.json @@ -0,0 +1,20 @@ +{ + "defaultSeverity": "warn", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": { + "comment-format": false, + "no-consecutive-blank-lines": false, + "no-trailing-whitespace": false, + "no-console": false, + "prefer-const": false, + "one-line": false, + "only-arrow-functions": false, + "space-before-function-paren": false, + "trailing-comma": false, + "no-empty": false, + }, + "rulesDirectory": [] +} \ No newline at end of file diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts new file mode 100644 index 00000000..ddb69314 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts @@ -0,0 +1,2690 @@ +// Test sample code for SoftEther VPN Server JSON-RPC Stub +// Runs on both web browsers and Node.js +// +// sample.ts +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// This sample code shows how to call all available RPC functions. +// You can copy and paste test code to write your own web browser TypeScript / JavaScript codes. +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + +// On the web browser uncomment below imports as necessary to support old browsers. +// import "core-js/es6/promise"; +// import "core-js/es6/string"; +// import "whatwg-fetch"; + + +// Import the vpnrpc.ts RPC stub. +import * as VPN from "./vpnrpc"; + +// Output JSON-RPC request / reply strings to the debug console. +VPN.VpnServerRpc.SetDebugMode(true); + +let api: VPN.VpnServerRpc; +// Creating the VpnServerRpc class instance here. +if (VPN.VpnServerRpc.IsNodeJS() === false) // // Determine if this JavaScript environment is on the Node.js or not +{ + // On the web browser. We do not need to specify any hostname, port or credential as the web browser already knows it. + api = new VPN.VpnServerRpc(); +} +else +{ + // On the Node.js. We need to specify the target VPN Server's hostname, port and credential. + api = new VPN.VpnServerRpc("127.0.0.1", 443, "", "PASSWORD_HERE", false); +} + +// A variable for test +let hub_name = "test"; + +// Call the Test_All() function to test almost all VPN APIs. +Test_All(); + + + + +/** Tests all VPN APIs */ +async function Test_All(): Promise +{ + hub_name = "TEST"; + await Test_Test(); + await Test_GetServerInfo(); + await Test_GetServerStatus(); + let new_listener_port: number = await Test_CreateListener(); + await Test_EnableListener(new_listener_port, false); + await Test_EnumListener(); + await Test_EnableListener(new_listener_port, true); + await Test_EnumListener(); + await Test_DeleteListener(new_listener_port); + await Test_SetServerPassword(); + await Test_GetFarmSetting(); + if (false) + { + await Test_SetFarmSetting(); + let farm_members: VPN.VpnRpcEnumFarm = await Test_EnumFarmMember(); + for (let farm_member of farm_members.FarmMemberList) + { + await Test_GetFarmInfo(farm_member.Id_u32); + } + await Test_GetFarmConnectionStatus(); + } + else if (false) + { + console.log("abc"); + } + else + { + console.log("def"); + } + await Test_GetServerCert(); + await Test_SetServerCert(); + await Test_GetServerCipher(); + await Test_SetServerCipher(); + let enum_connection: VPN.VpnRpcEnumConnection = await Test_EnumConnection(); + for (let connecton of enum_connection.ConnectionList) + { + await Test_GetConnectionInfo(connecton.Name_str); + } + hub_name = await Test_CreateHub(); + await Test_SetHub(); + await Test_GetHub(); + await Test_EnumHub(); + await Test_SetHubRadius(); + await Test_GetHubRadius(); + await Test_SetHubOnline(); + await Test_GetHubStatus(); + let hub_log_settings: VPN.VpnRpcHubLog = await Test_GetHubLog(); + await Test_SetHubLog(hub_log_settings); + await Test_AddCa(); + let enum_ca: VPN.VpnRpcHubEnumCA = await Test_EnumCa(); + for (let ca of enum_ca.CAList) + { + await Test_GetCa(ca.Key_u32); + await Test_DeleteCa(ca.Key_u32); + } + await Test_CreateLink(); + await Test_GetLink(); + await Test_SetLink(); + await Test_SetLinkOffline(); + await Test_SetLinkOnline(); + let enum_link: VPN.VpnRpcEnumLink = await Test_EnumLink(); + for (let link of enum_link.LinkList) + { + await Test_GetLinkStatus(link.AccountName_utf); + } + await new Promise((r) => setTimeout(r, 3000)); + await Test_RenameLink(); + await Test_DeleteLink(); + await Test_AddAccess(); + await Test_EnumAccess(); + await Test_DeleteAccess(); + await Test_SetAccessList(); + await Test_CreateGroup(); + await Test_SetGroup(); + await Test_GetGroup(); + await Test_CreateUser(); + await Test_SetUser(); + await Test_GetUser(); + await Test_EnumUser(); + await Test_EnumGroup(); + await Test_DeleteUser(); + await Test_DeleteGroup(); + let enum_session: VPN.VpnRpcEnumSession = await Test_EnumSession(); + for (let session of enum_session.SessionList) + { + await Test_GetSessionStatus(session.Name_str); + await Test_DeleteSession(session.Name_str); + } + let enum_mac: VPN.VpnRpcEnumMacTable = await Test_EnumMacTable(); + for (let mac of enum_mac.MacTable) + { + await Test_DeleteMacTable(mac.Key_u32); + } + let enum_ip: VPN.VpnRpcEnumIpTable = await Test_EnumIpTable(); + for (let ip of enum_ip.IpTable) + { + await Test_DeleteIpTable(ip.Key_u32); + } + await Test_SetKeep(); + await Test_GetKeep(); + await Test_EnableSecureNAT(); + await Test_GetSecureNATOption(); + await Test_SetSecureNATOption(); + await Test_EnumNAT(); + await Test_EnumDHCP(); + await Test_GetSecureNATStatus(); + await Test_DisableSecureNAT(); + await Test_EnumEthernet(); + await Test_EnumLocalBridge(); + await Test_GetBridgeSupport(); + await Test_GetCaps(); + await Test_GetConfig(); + await Test_GetDefaultHubAdminOptions(); + await Test_GetHubAdminOptions(); + await Test_SetHubAdminOptions(); + await Test_GetHubExtOptions(); + await Test_SetHubExtOptions(); + await Test_AddL3Switch(); + await Test_AddL3If(); + await Test_EnumL3Switch(); + await Test_EnumL3If(); + await Test_AddL3Table(); + await Test_EnumL3Table(); + await Test_DelL3Table(); + await Test_StartL3Switch(); + await Test_StopL3Switch(); + await Test_DelL3If(); + await Test_DelL3Switch(); + await Test_AddCrl(); + let enum_crl: VPN.VpnRpcEnumCrl = await Test_EnumCrl(); + for (let crl of enum_crl.CRLList) + { + let got_crl: VPN.VpnRpcCrl = await Test_GetCrl(crl.Key_u32); + got_crl.CommonName_utf = got_crl.CommonName_utf + "_a"; + await Test_SetCrl(got_crl); + } + enum_crl = await Test_EnumCrl(); + for (let crl of enum_crl.CRLList) + { + await Test_DelCrl(crl.Key_u32); + } + await Test_SetAcList(); + await Test_GetAcList(); + let enum_log_file: VPN.VpnRpcEnumLogFile = await Test_EnumLogFile(); + for (let log of enum_log_file.LogFiles) + { + await Test_ReadLogFile(log.FilePath_str); + break; + } + await Test_SetSysLog(true); + await Test_GetSysLog(); + await Test_SetSysLog(false); + await Test_SetHubMsg(); + await Test_GetHubMsg(); + await Test_GetAdminMsg(); + await Test_Flush(); + await Test_SetIPsecServices(); + await Test_GetIPsecServices(); + await Test_AddEtherIpId(); + let enum_etherip_id: VPN.VpnRpcEnumEtherIpId = await Test_EnumEtherIpId(); + for (let etherip_id of enum_etherip_id.Settings) + { + await Test_GetEtherIpId(etherip_id.Id_str); + await Test_DeleteEtherIpId(etherip_id.Id_str); + } + await Test_SetOpenVpnSstpConfig(); + await Test_GetOpenVpnSstpConfig(); + await Test_GetDDnsClientStatus(); + await Test_SetDDnsInternetSettng(); + await Test_GetDDnsInternetSettng(); + await Test_ChangeDDnsClientHostname(); + await Test_RegenerateServerCert(); + await Test_MakeOpenVpnConfigFile(); + await Test_SetSpecialListener(); + await Test_GetSpecialListener(); + await Test_GetAzureStatus(); + await Test_SetAzureStatus(); + await Test_SetVgsConfig(); + await Test_GetVgsConfig(); + await Test_DeleteHub(); + return; +} + +/** API test for 'Test', test RPC function */ +async function Test_Test(): Promise +{ + console.log("Begin: Test_Test"); + let a: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + IntValue_u32: 12345, + }); + let b: VPN.VpnRpcTest = await api.Test(a); + console.log(b); + console.log("End: Test_Test"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerInfo', Get server information */ +async function Test_GetServerInfo(): Promise +{ + console.log("Begin: Test_GetServerInfo"); + let info: VPN.VpnRpcServerInfo = await api.GetServerInfo(); + console.log(info); + console.log("End: Test_GetServerInfo"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerStatus', Get server status */ +async function Test_GetServerStatus(): Promise +{ + console.log("Begin: Test_GetServerStatus"); + let out_rpc_server_status: VPN.VpnRpcServerStatus = await api.GetServerStatus(); + console.log(out_rpc_server_status); + console.log("End: Test_GetServerStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateListener', Create a listener */ +async function Test_CreateListener(): Promise +{ + console.log("Begin: Test_CreateListener"); + let port: number = Math.floor((Math.random() * (65534 - 1025)) + 1025); + console.log("Creating a new listener port: Port " + port); + let in_rpc_listener: VPN.VpnRpcListener = new VPN.VpnRpcListener( + { + Enable_bool: true, + Port_u32: port, + }); + let out_rpc_listener: VPN.VpnRpcListener = await api.CreateListener(in_rpc_listener); + console.log("Done."); + console.log("End: Test_CreateListener"); + console.log("-----"); + console.log(); + return port; +} + +/** API test for 'EnumListener', Enumerating listeners */ +async function Test_EnumListener(): Promise +{ + console.log("Begin: Test_EnumListener"); + let out_rpc_listener_list: VPN.VpnRpcListenerList = await api.EnumListener(); + console.log(out_rpc_listener_list); + console.log("End: Test_EnumListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteListener', Delete a listener */ +async function Test_DeleteListener(port: number): Promise +{ + console.log("Begin: Test_DeleteListener"); + console.log("Deleting a new listener port: Port" + port); + let in_rpc_listener: VPN.VpnRpcListener = new VPN.VpnRpcListener( + { + Port_u32: port, + }); + let out_rpc_listener: VPN.VpnRpcListener = await api.DeleteListener(in_rpc_listener); + console.log("Done."); + console.log("End: Test_DeleteListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnableListener', Enable / Disable listener */ +async function Test_EnableListener(port: number, enabled: boolean): Promise +{ + console.log("Begin: Test_EnableListener"); + if (enabled) + { + console.log("Enabling listener port = " + port); + } + else + { + console.log("Disabling listener port = " + port); + } + let in_rpc_listener: VPN.VpnRpcListener = new VPN.VpnRpcListener( + { + Port_u32: port, + Enable_bool: enabled, + }); + let out_rpc_listener: VPN.VpnRpcListener = await api.EnableListener(in_rpc_listener); + console.log("Done."); + console.log("End: Test_EnableListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetServerPassword', Set server password */ +async function Test_SetServerPassword(): Promise +{ + let password: string = "microsoft"; + console.log("Begin: Test_SetServerPassword"); + console.log("Set the server administrator password to '" + password + "'."); + let in_rpc_set_password: VPN.VpnRpcSetPassword = new VPN.VpnRpcSetPassword( + { + PlainTextPassword_str: password, + }); + let out_rpc_set_password: VPN.VpnRpcSetPassword = await api.SetServerPassword(in_rpc_set_password); + console.log("Done."); + console.log("End: Test_SetServerPassword"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetFarmSetting', Set clustering configuration */ +async function Test_SetFarmSetting(): Promise +{ + console.log("Begin: Test_SetFarmSetting"); + let in_rpc_farm: VPN.VpnRpcFarm = new VPN.VpnRpcFarm( + { + ServerType_u32: VPN.VpnRpcServerType.FarmController, + NumPort_u32: 2, + Ports_u32: [ 443, 444, 445, ], + PublicIp_ip: "1.2.3.4", + ControllerName_str: "controller", + MemberPasswordPlaintext_str: "microsoft", + ControllerPort_u32: 443, + Weight_u32: 100, + ControllerOnly_bool: false, + }); + let out_rpc_farm: VPN.VpnRpcFarm = await api.SetFarmSetting(in_rpc_farm); + console.log("End: Test_SetFarmSetting"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetFarmSetting', Get clustering configuration */ +async function Test_GetFarmSetting(): Promise +{ + console.log("Begin: Test_GetFarmSetting"); + let out_rpc_farm: VPN.VpnRpcFarm = await api.GetFarmSetting(); + console.log(out_rpc_farm); + console.log("End: Test_GetFarmSetting"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetFarmInfo', Get cluster member information */ +async function Test_GetFarmInfo(id: number): Promise +{ + console.log("Begin: Test_GetFarmInfo"); + let in_rpc_farm_info: VPN.VpnRpcFarmInfo = new VPN.VpnRpcFarmInfo( + { + Id_u32: id, + }); + let out_rpc_farm_info: VPN.VpnRpcFarmInfo = await api.GetFarmInfo(in_rpc_farm_info); + console.log(out_rpc_farm_info); + console.log("End: Test_GetFarmInfo"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumFarmMember', Enumerate cluster members */ +async function Test_EnumFarmMember(): Promise +{ + console.log("Begin: Test_EnumFarmMember"); + let out_rpc_enum_farm: VPN.VpnRpcEnumFarm = await api.EnumFarmMember(); + console.log(out_rpc_enum_farm); + console.log("End: Test_EnumFarmMember"); + console.log("-----"); + console.log(); + return out_rpc_enum_farm; +} + +/** API test for 'GetFarmConnectionStatus', Get status of connection to cluster controller */ +async function Test_GetFarmConnectionStatus(): Promise +{ + console.log("Begin: Test_GetFarmConnectionStatus"); + let out_rpc_farm_connection_status: VPN.VpnRpcFarmConnectionStatus = await api.GetFarmConnectionStatus(); + console.log(out_rpc_farm_connection_status); + console.log("End: Test_GetFarmConnectionStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetServerCert', Set the server certification */ +async function Test_SetServerCert(): Promise +{ + console.log("Begin: Test_SetServerCert"); + let in_rpc_key_pair: VPN.VpnRpcKeyPair = new VPN.VpnRpcKeyPair( + { + Cert_bin: new Uint8Array([ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, ]), + Key_bin: new Uint8Array([ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x45, 0x76, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, 0x42, 0x4b, 0x67, 0x77, 0x67, 0x67, 0x53, 0x6b, 0x41, 0x67, 0x45, 0x41, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x0a, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x0a, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x0a, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x0a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x0a, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x0a, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x45, 0x43, 0x67, 0x67, 0x45, 0x41, 0x54, 0x77, 0x34, 0x52, 0x6f, 0x52, 0x4c, 0x6a, 0x73, 0x68, 0x72, 0x42, 0x56, 0x6f, 0x59, 0x69, 0x78, 0x4f, 0x4a, 0x2b, 0x57, 0x4c, 0x6d, 0x2f, 0x45, 0x51, 0x57, 0x65, 0x37, 0x6f, 0x6a, 0x38, 0x31, 0x51, 0x50, 0x73, 0x39, 0x56, 0x45, 0x49, 0x32, 0x62, 0x53, 0x4f, 0x0a, 0x34, 0x4a, 0x51, 0x42, 0x55, 0x42, 0x53, 0x6b, 0x70, 0x64, 0x48, 0x34, 0x57, 0x32, 0x77, 0x51, 0x75, 0x2f, 0x61, 0x58, 0x57, 0x38, 0x75, 0x75, 0x53, 0x39, 0x45, 0x43, 0x6d, 0x6d, 0x41, 0x41, 0x75, 0x45, 0x79, 0x4a, 0x54, 0x56, 0x7a, 0x75, 0x31, 0x32, 0x35, 0x58, 0x73, 0x65, 0x63, 0x6c, 0x44, 0x41, 0x55, 0x38, 0x49, 0x55, 0x70, 0x54, 0x2b, 0x70, 0x4c, 0x35, 0x79, 0x70, 0x37, 0x34, 0x0a, 0x45, 0x62, 0x76, 0x4e, 0x48, 0x48, 0x33, 0x67, 0x65, 0x72, 0x4f, 0x67, 0x78, 0x76, 0x49, 0x6a, 0x50, 0x64, 0x67, 0x77, 0x62, 0x66, 0x6d, 0x4d, 0x49, 0x59, 0x48, 0x62, 0x56, 0x70, 0x6e, 0x49, 0x30, 0x77, 0x32, 0x42, 0x43, 0x44, 0x51, 0x76, 0x74, 0x64, 0x64, 0x57, 0x6f, 0x42, 0x74, 0x41, 0x33, 0x43, 0x54, 0x6a, 0x63, 0x2f, 0x43, 0x56, 0x67, 0x73, 0x47, 0x77, 0x33, 0x43, 0x4e, 0x72, 0x0a, 0x46, 0x78, 0x41, 0x46, 0x35, 0x73, 0x4a, 0x34, 0x63, 0x5a, 0x4c, 0x6e, 0x5a, 0x31, 0x45, 0x36, 0x69, 0x74, 0x4c, 0x54, 0x50, 0x69, 0x6f, 0x6a, 0x74, 0x76, 0x48, 0x48, 0x34, 0x61, 0x64, 0x6d, 0x68, 0x68, 0x43, 0x61, 0x42, 0x49, 0x78, 0x76, 0x47, 0x2f, 0x53, 0x6e, 0x59, 0x77, 0x4e, 0x35, 0x38, 0x37, 0x55, 0x5a, 0x6d, 0x37, 0x4c, 0x57, 0x50, 0x61, 0x67, 0x4c, 0x41, 0x33, 0x67, 0x69, 0x0a, 0x48, 0x4b, 0x4f, 0x2b, 0x4b, 0x79, 0x42, 0x51, 0x39, 0x33, 0x31, 0x4e, 0x4d, 0x61, 0x65, 0x6a, 0x36, 0x6d, 0x75, 0x75, 0x46, 0x32, 0x30, 0x32, 0x76, 0x34, 0x37, 0x6c, 0x57, 0x6b, 0x64, 0x50, 0x4f, 0x6e, 0x52, 0x43, 0x69, 0x6f, 0x4d, 0x58, 0x30, 0x63, 0x31, 0x6a, 0x36, 0x76, 0x32, 0x61, 0x59, 0x34, 0x34, 0x77, 0x55, 0x4b, 0x71, 0x39, 0x4d, 0x52, 0x67, 0x6f, 0x52, 0x76, 0x4a, 0x37, 0x0a, 0x41, 0x39, 0x77, 0x65, 0x72, 0x4c, 0x6b, 0x68, 0x35, 0x78, 0x78, 0x35, 0x35, 0x32, 0x4f, 0x74, 0x71, 0x50, 0x36, 0x73, 0x61, 0x6d, 0x75, 0x47, 0x44, 0x52, 0x78, 0x31, 0x42, 0x70, 0x36, 0x53, 0x4f, 0x70, 0x68, 0x43, 0x45, 0x50, 0x48, 0x59, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x36, 0x33, 0x65, 0x2b, 0x52, 0x75, 0x6c, 0x36, 0x46, 0x78, 0x47, 0x43, 0x76, 0x67, 0x70, 0x6b, 0x33, 0x0a, 0x57, 0x67, 0x2f, 0x54, 0x31, 0x77, 0x2f, 0x59, 0x4b, 0x6b, 0x79, 0x4f, 0x49, 0x46, 0x4c, 0x63, 0x46, 0x4c, 0x57, 0x71, 0x42, 0x44, 0x71, 0x6c, 0x6e, 0x58, 0x65, 0x63, 0x6c, 0x6b, 0x50, 0x4b, 0x6a, 0x57, 0x4e, 0x2f, 0x32, 0x70, 0x4a, 0x6d, 0x4f, 0x31, 0x63, 0x46, 0x63, 0x44, 0x4a, 0x46, 0x59, 0x64, 0x32, 0x45, 0x49, 0x45, 0x72, 0x76, 0x42, 0x57, 0x54, 0x34, 0x51, 0x39, 0x4d, 0x42, 0x0a, 0x4e, 0x35, 0x6c, 0x44, 0x6b, 0x47, 0x75, 0x6a, 0x34, 0x2f, 0x6b, 0x68, 0x56, 0x6c, 0x79, 0x6e, 0x77, 0x62, 0x64, 0x42, 0x6e, 0x47, 0x43, 0x34, 0x61, 0x34, 0x48, 0x4a, 0x49, 0x4a, 0x76, 0x61, 0x35, 0x63, 0x70, 0x49, 0x63, 0x57, 0x65, 0x4a, 0x72, 0x35, 0x61, 0x57, 0x33, 0x69, 0x44, 0x36, 0x68, 0x53, 0x73, 0x61, 0x6c, 0x79, 0x55, 0x76, 0x4a, 0x4d, 0x6d, 0x64, 0x4d, 0x42, 0x6e, 0x47, 0x0a, 0x37, 0x2b, 0x50, 0x65, 0x53, 0x2b, 0x4e, 0x73, 0x4b, 0x30, 0x61, 0x63, 0x31, 0x67, 0x33, 0x4d, 0x6c, 0x56, 0x35, 0x42, 0x41, 0x32, 0x70, 0x55, 0x54, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x62, 0x65, 0x46, 0x6d, 0x2b, 0x46, 0x46, 0x35, 0x62, 0x76, 0x6f, 0x4b, 0x7a, 0x49, 0x4c, 0x6c, 0x31, 0x62, 0x79, 0x6b, 0x6c, 0x52, 0x6b, 0x69, 0x76, 0x7a, 0x6b, 0x62, 0x7a, 0x49, 0x6b, 0x41, 0x78, 0x0a, 0x35, 0x56, 0x6b, 0x74, 0x67, 0x36, 0x4a, 0x35, 0x63, 0x76, 0x38, 0x44, 0x35, 0x2b, 0x72, 0x71, 0x50, 0x75, 0x6a, 0x4f, 0x66, 0x39, 0x67, 0x42, 0x6a, 0x4e, 0x37, 0x70, 0x64, 0x78, 0x39, 0x39, 0x35, 0x6b, 0x47, 0x49, 0x78, 0x5a, 0x39, 0x6d, 0x31, 0x68, 0x57, 0x69, 0x78, 0x55, 0x55, 0x31, 0x55, 0x6f, 0x38, 0x72, 0x70, 0x39, 0x4a, 0x69, 0x47, 0x4f, 0x36, 0x72, 0x65, 0x31, 0x77, 0x69, 0x0a, 0x6a, 0x56, 0x2f, 0x4c, 0x31, 0x64, 0x37, 0x55, 0x66, 0x39, 0x48, 0x6a, 0x65, 0x61, 0x70, 0x4f, 0x46, 0x62, 0x34, 0x6b, 0x72, 0x71, 0x52, 0x58, 0x54, 0x65, 0x75, 0x4d, 0x6e, 0x35, 0x35, 0x44, 0x33, 0x64, 0x70, 0x79, 0x6a, 0x51, 0x4e, 0x43, 0x30, 0x5a, 0x50, 0x72, 0x61, 0x6d, 0x58, 0x64, 0x38, 0x31, 0x57, 0x6f, 0x6f, 0x56, 0x77, 0x58, 0x59, 0x41, 0x66, 0x69, 0x46, 0x76, 0x4c, 0x49, 0x0a, 0x6f, 0x66, 0x31, 0x37, 0x51, 0x67, 0x67, 0x49, 0x59, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x59, 0x55, 0x67, 0x67, 0x43, 0x34, 0x58, 0x49, 0x67, 0x5a, 0x76, 0x58, 0x34, 0x59, 0x65, 0x55, 0x38, 0x6c, 0x61, 0x79, 0x51, 0x50, 0x79, 0x4b, 0x71, 0x67, 0x38, 0x37, 0x2f, 0x76, 0x31, 0x2b, 0x7a, 0x35, 0x79, 0x65, 0x2f, 0x4d, 0x32, 0x5a, 0x65, 0x36, 0x53, 0x6e, 0x37, 0x48, 0x4a, 0x66, 0x59, 0x0a, 0x55, 0x5a, 0x4d, 0x36, 0x37, 0x48, 0x37, 0x52, 0x4b, 0x4e, 0x6f, 0x68, 0x46, 0x6c, 0x35, 0x43, 0x39, 0x65, 0x44, 0x4e, 0x7a, 0x67, 0x72, 0x50, 0x6b, 0x52, 0x63, 0x2f, 0x2f, 0x54, 0x77, 0x32, 0x45, 0x48, 0x74, 0x59, 0x68, 0x33, 0x42, 0x4b, 0x49, 0x6f, 0x72, 0x77, 0x39, 0x45, 0x64, 0x78, 0x59, 0x4e, 0x6c, 0x6b, 0x2b, 0x6a, 0x4e, 0x73, 0x30, 0x30, 0x64, 0x57, 0x35, 0x34, 0x64, 0x39, 0x0a, 0x65, 0x69, 0x69, 0x7a, 0x7a, 0x78, 0x59, 0x34, 0x34, 0x2f, 0x41, 0x32, 0x70, 0x39, 0x52, 0x49, 0x4d, 0x67, 0x79, 0x35, 0x49, 0x52, 0x77, 0x76, 0x53, 0x73, 0x6d, 0x50, 0x67, 0x61, 0x71, 0x34, 0x6f, 0x4b, 0x4d, 0x64, 0x54, 0x4e, 0x4d, 0x4f, 0x73, 0x30, 0x4a, 0x77, 0x65, 0x79, 0x50, 0x72, 0x42, 0x65, 0x49, 0x41, 0x72, 0x62, 0x46, 0x43, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x71, 0x0a, 0x57, 0x30, 0x34, 0x56, 0x33, 0x49, 0x75, 0x74, 0x33, 0x55, 0x42, 0x6f, 0x75, 0x50, 0x4d, 0x63, 0x63, 0x38, 0x2f, 0x56, 0x62, 0x69, 0x77, 0x48, 0x77, 0x79, 0x2b, 0x52, 0x6c, 0x4c, 0x6d, 0x4e, 0x77, 0x59, 0x41, 0x71, 0x63, 0x79, 0x35, 0x50, 0x35, 0x58, 0x4b, 0x4c, 0x33, 0x70, 0x36, 0x62, 0x65, 0x33, 0x2b, 0x4d, 0x6f, 0x76, 0x48, 0x52, 0x71, 0x6a, 0x35, 0x78, 0x72, 0x4a, 0x54, 0x57, 0x0a, 0x54, 0x6a, 0x2f, 0x36, 0x59, 0x61, 0x51, 0x73, 0x31, 0x2b, 0x72, 0x74, 0x63, 0x51, 0x45, 0x61, 0x74, 0x64, 0x34, 0x4b, 0x50, 0x66, 0x64, 0x78, 0x53, 0x2f, 0x63, 0x66, 0x52, 0x74, 0x38, 0x71, 0x74, 0x75, 0x42, 0x77, 0x51, 0x61, 0x2f, 0x34, 0x39, 0x4d, 0x72, 0x41, 0x4c, 0x76, 0x57, 0x43, 0x4c, 0x53, 0x42, 0x75, 0x4b, 0x74, 0x33, 0x49, 0x49, 0x75, 0x53, 0x2f, 0x51, 0x44, 0x74, 0x43, 0x0a, 0x5a, 0x4e, 0x67, 0x6d, 0x36, 0x4d, 0x78, 0x71, 0x4e, 0x6e, 0x49, 0x43, 0x58, 0x35, 0x46, 0x34, 0x36, 0x6d, 0x52, 0x49, 0x52, 0x42, 0x42, 0x4f, 0x32, 0x4b, 0x7a, 0x6c, 0x30, 0x33, 0x68, 0x62, 0x51, 0x6c, 0x71, 0x58, 0x4c, 0x5a, 0x63, 0x38, 0x6f, 0x51, 0x4b, 0x42, 0x67, 0x43, 0x53, 0x77, 0x66, 0x46, 0x7a, 0x68, 0x48, 0x76, 0x78, 0x36, 0x68, 0x69, 0x64, 0x57, 0x67, 0x48, 0x4a, 0x63, 0x0a, 0x77, 0x79, 0x76, 0x64, 0x6e, 0x70, 0x58, 0x78, 0x36, 0x5a, 0x4c, 0x6e, 0x6f, 0x61, 0x7a, 0x61, 0x6f, 0x48, 0x47, 0x74, 0x4d, 0x47, 0x43, 0x45, 0x5a, 0x49, 0x50, 0x66, 0x6a, 0x4c, 0x42, 0x63, 0x30, 0x4d, 0x74, 0x79, 0x45, 0x64, 0x53, 0x4c, 0x78, 0x54, 0x6c, 0x35, 0x59, 0x70, 0x78, 0x6f, 0x6d, 0x43, 0x46, 0x55, 0x4d, 0x33, 0x55, 0x63, 0x59, 0x4e, 0x2f, 0x50, 0x5a, 0x66, 0x58, 0x41, 0x0a, 0x6d, 0x36, 0x31, 0x45, 0x6d, 0x71, 0x53, 0x53, 0x4d, 0x56, 0x63, 0x47, 0x50, 0x67, 0x65, 0x2f, 0x43, 0x34, 0x44, 0x42, 0x5a, 0x59, 0x6a, 0x53, 0x45, 0x71, 0x62, 0x67, 0x37, 0x6d, 0x73, 0x52, 0x30, 0x33, 0x37, 0x42, 0x58, 0x54, 0x48, 0x6b, 0x78, 0x44, 0x62, 0x33, 0x71, 0x48, 0x46, 0x54, 0x6f, 0x30, 0x6b, 0x48, 0x57, 0x4a, 0x66, 0x34, 0x39, 0x59, 0x77, 0x32, 0x73, 0x77, 0x6a, 0x54, 0x0a, 0x72, 0x4f, 0x38, 0x46, 0x46, 0x44, 0x52, 0x56, 0x50, 0x44, 0x4c, 0x5a, 0x61, 0x37, 0x36, 0x47, 0x67, 0x79, 0x41, 0x55, 0x4a, 0x38, 0x55, 0x63, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, ]), + }); + let out_rpc_key_pair: VPN.VpnRpcKeyPair = await api.SetServerCert(in_rpc_key_pair); + console.log(out_rpc_key_pair); + console.log("End: Test_SetServerCert"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerCert', Get the server certification */ +async function Test_GetServerCert(): Promise +{ + console.log("Begin: Test_GetServerCert"); + let out_rpc_key_pair: VPN.VpnRpcKeyPair = await api.GetServerCert(); + console.log(out_rpc_key_pair); + console.log("End: Test_GetServerCert"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetServerCipher', Get cipher for SSL */ +async function Test_GetServerCipher(): Promise +{ + console.log("Begin: Test_GetServerCipher"); + let out_rpc_str: VPN.VpnRpcStr = await api.GetServerCipher(); + console.log(out_rpc_str); + console.log("End: Test_GetServerCipher"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetServerCipher', Set cipher for SSL to the server */ +async function Test_SetServerCipher(): Promise +{ + console.log("Begin: Test_SetServerCipher"); + let in_rpc_str: VPN.VpnRpcStr = new VPN.VpnRpcStr( + { + String_str: "RC4-MD5", + }); + let out_rpc_str: VPN.VpnRpcStr = await api.SetServerCipher(in_rpc_str); + console.log(out_rpc_str); + console.log("End: Test_SetServerCipher"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateHub', Create a hub */ +async function Test_CreateHub(): Promise +{ + let hub_name: string = "Test_" + Math.floor((Math.random() * (999999 - 100000)) + 100000); + console.log("Begin: Test_CreateHub"); + let in_rpc_create_hub: VPN.VpnRpcCreateHub = new VPN.VpnRpcCreateHub( + { + HubName_str: hub_name, + HubType_u32: VPN.VpnRpcHubType.Standalone, + Online_bool: true, + AdminPasswordPlainText_str: "microsoft", + MaxSession_u32: 123, + NoEnum_bool: false, + }); + let out_rpc_create_hub: VPN.VpnRpcCreateHub = await api.CreateHub(in_rpc_create_hub); + console.log(out_rpc_create_hub); + console.log("End: Test_CreateHub"); + console.log("-----"); + console.log(); + return hub_name; +} + +/** API test for 'SetHub', Set hub configuration */ +async function Test_SetHub(): Promise +{ + console.log("Begin: Test_SetHub"); + let in_rpc_create_hub: VPN.VpnRpcCreateHub = new VPN.VpnRpcCreateHub( + { + HubName_str: hub_name, + AdminPasswordPlainText_str: "aho", + HubType_u32: VPN.VpnRpcHubType.Standalone, + NoEnum_bool: false, + MaxSession_u32: 128, + Online_bool: true, + }); + let out_rpc_create_hub: VPN.VpnRpcCreateHub = await api.SetHub(in_rpc_create_hub); + console.log(out_rpc_create_hub); + console.log("End: Test_SetHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHub', Get hub configuration */ +async function Test_GetHub(): Promise +{ + console.log("Begin: Test_GetHub"); + let in_rpc_create_hub: VPN.VpnRpcCreateHub = new VPN.VpnRpcCreateHub( + { + HubName_str: hub_name, + }); + let out_rpc_create_hub: VPN.VpnRpcCreateHub = await api.GetHub(in_rpc_create_hub); + console.log(out_rpc_create_hub); + console.log("End: Test_GetHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumHub', Enumerate hubs */ +async function Test_EnumHub(): Promise +{ + console.log("Begin: Test_EnumHub"); + let out_rpc_enum_hub: VPN.VpnRpcEnumHub = await api.EnumHub(); + console.log(out_rpc_enum_hub); + console.log("End: Test_EnumHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteHub', Delete a hub */ +async function Test_DeleteHub(): Promise +{ + console.log("Begin: Test_DeleteHub"); + let in_rpc_delete_hub: VPN.VpnRpcDeleteHub = new VPN.VpnRpcDeleteHub( + { + HubName_str: hub_name, + }); + let out_rpc_delete_hub: VPN.VpnRpcDeleteHub = await api.DeleteHub(in_rpc_delete_hub); + console.log(out_rpc_delete_hub); + console.log("End: Test_DeleteHub"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubRadius', Get Radius options of the hub */ +async function Test_GetHubRadius(): Promise +{ + console.log("Begin: Test_GetHubRadius"); + let in_rpc_radius: VPN.VpnRpcRadius = new VPN.VpnRpcRadius( + { + HubName_str: hub_name, + }); + let out_rpc_radius: VPN.VpnRpcRadius = await api.GetHubRadius(in_rpc_radius); + console.log(out_rpc_radius); + console.log("End: Test_GetHubRadius"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubRadius', Set Radius options of the hub */ +async function Test_SetHubRadius(): Promise +{ + console.log("Begin: Test_SetHubRadius"); + let in_rpc_radius: VPN.VpnRpcRadius = new VPN.VpnRpcRadius( + { + HubName_str: hub_name, + RadiusServerName_str: "1.2.3.4", + RadiusPort_u32: 1234, + RadiusSecret_str: "microsoft", + RadiusRetryInterval_u32: 1000, + }); + let out_rpc_radius: VPN.VpnRpcRadius = await api.SetHubRadius(in_rpc_radius); + console.log(out_rpc_radius); + console.log("End: Test_SetHubRadius"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumConnection', Enumerate connections */ +async function Test_EnumConnection(): Promise +{ + console.log("Begin: Test_EnumConnection"); + let out_rpc_enum_connection: VPN.VpnRpcEnumConnection = await api.EnumConnection(); + console.log(out_rpc_enum_connection); + console.log("End: Test_EnumConnection"); + console.log("-----"); + console.log(); + return out_rpc_enum_connection; +} + +/** API test for 'DisconnectConnection', Disconnect a connection */ +async function Test_DisconnectConnection(connection_id: string): Promise +{ + console.log("Begin: Test_DisconnectConnection"); + let in_rpc_disconnect_connection: VPN.VpnRpcDisconnectConnection = new VPN.VpnRpcDisconnectConnection( + { + Name_str: connection_id, + }); + let out_rpc_disconnect_connection: VPN.VpnRpcDisconnectConnection = await api.DisconnectConnection(in_rpc_disconnect_connection); + console.log(out_rpc_disconnect_connection); + console.log("End: Test_DisconnectConnection"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetConnectionInfo', Get connection information */ +async function Test_GetConnectionInfo(name: string): Promise +{ + console.log("Begin: Test_GetConnectionInfo"); + let in_rpc_connection_info: VPN.VpnRpcConnectionInfo = new VPN.VpnRpcConnectionInfo( + { + Name_str: name, + }); + let out_rpc_connection_info: VPN.VpnRpcConnectionInfo = await api.GetConnectionInfo(in_rpc_connection_info); + console.log(out_rpc_connection_info); + console.log("End: Test_GetConnectionInfo"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubOnline', Make a hub on-line or off-line */ +async function Test_SetHubOnline(): Promise +{ + console.log("Begin: Test_SetHubOnline"); + let in_rpc_set_hub_online: VPN.VpnRpcSetHubOnline = new VPN.VpnRpcSetHubOnline( + { + HubName_str: hub_name, + Online_bool: true, + }); + let out_rpc_set_hub_online: VPN.VpnRpcSetHubOnline = await api.SetHubOnline(in_rpc_set_hub_online); + console.log(out_rpc_set_hub_online); + console.log("End: Test_SetHubOnline"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubStatus', Get hub status */ +async function Test_GetHubStatus(): Promise +{ + console.log("Begin: Test_GetHubStatus"); + let in_rpc_hub_status: VPN.VpnRpcHubStatus = new VPN.VpnRpcHubStatus( + { + HubName_str: hub_name, + }); + let out_rpc_hub_status: VPN.VpnRpcHubStatus = await api.GetHubStatus(in_rpc_hub_status); + console.log(out_rpc_hub_status); + console.log("End: Test_GetHubStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubLog', Set logging configuration into the hub */ +async function Test_SetHubLog(in_rpc_hub_log: VPN.VpnRpcHubLog): Promise +{ + console.log("Begin: Test_SetHubLog"); + let out_rpc_hub_log: VPN.VpnRpcHubLog = await api.SetHubLog(in_rpc_hub_log); + console.log(out_rpc_hub_log); + console.log("End: Test_SetHubLog"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubLog', Get logging configuration of the hub */ +async function Test_GetHubLog(): Promise +{ + console.log("Begin: Test_GetHubLog"); + let in_rpc_hub_log: VPN.VpnRpcHubLog = new VPN.VpnRpcHubLog( + { + HubName_str: hub_name, + }); + let out_rpc_hub_log: VPN.VpnRpcHubLog = await api.GetHubLog(in_rpc_hub_log); + console.log(out_rpc_hub_log); + console.log("End: Test_GetHubLog"); + console.log("-----"); + console.log(); + return out_rpc_hub_log; +} + +/** API test for 'AddCa', Add CA(Certificate Authority) into the hub */ +async function Test_AddCa(): Promise +{ + console.log("Begin: Test_AddCa"); + let in_rpc_hub_add_ca: VPN.VpnRpcHubAddCA = new VPN.VpnRpcHubAddCA( + { + HubName_str: hub_name, + Cert_bin: new Uint8Array([ 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, ]), + }); + let out_rpc_hub_add_ca: VPN.VpnRpcHubAddCA = await api.AddCa(in_rpc_hub_add_ca); + console.log(out_rpc_hub_add_ca); + console.log("End: Test_AddCa"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumCa', Enumerate CA(Certificate Authority) in the hub */ +async function Test_EnumCa(): Promise +{ + console.log("Begin: Test_EnumCa"); + let in_rpc_hub_enum_ca: VPN.VpnRpcHubEnumCA = new VPN.VpnRpcHubEnumCA( + { + HubName_str: hub_name, + }); + let out_rpc_hub_enum_ca: VPN.VpnRpcHubEnumCA = await api.EnumCa(in_rpc_hub_enum_ca); + console.log(out_rpc_hub_enum_ca); + console.log("End: Test_EnumCa"); + console.log("-----"); + console.log(); + return out_rpc_hub_enum_ca; +} + +/** API test for 'GetCa', Get CA(Certificate Authority) setting from the hub */ +async function Test_GetCa(key: number): Promise +{ + console.log("Begin: Test_GetCa"); + let in_rpc_hub_get_ca: VPN.VpnRpcHubGetCA = new VPN.VpnRpcHubGetCA( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_hub_get_ca: VPN.VpnRpcHubGetCA = await api.GetCa(in_rpc_hub_get_ca); + console.log(out_rpc_hub_get_ca); + console.log("End: Test_GetCa"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteCa', Delete a CA(Certificate Authority) setting from the hub */ +async function Test_DeleteCa(key: number): Promise +{ + console.log("Begin: Test_DeleteCa"); + let in_rpc_hub_delete_ca: VPN.VpnRpcHubDeleteCA = new VPN.VpnRpcHubDeleteCA( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_hub_delete_ca: VPN.VpnRpcHubDeleteCA = await api.DeleteCa(in_rpc_hub_delete_ca); + console.log(out_rpc_hub_delete_ca); + console.log("End: Test_DeleteCa"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetLinkOnline', Make a link into on-line */ +async function Test_SetLinkOnline(): Promise +{ + console.log("Begin: Test_SetLinkOnline"); + let in_rpc_link: VPN.VpnRpcLink = new VPN.VpnRpcLink( + { + HubName_str: hub_name, + AccountName_utf: "linktest", + }); + let out_rpc_link: VPN.VpnRpcLink = await api.SetLinkOnline(in_rpc_link); + console.log(out_rpc_link); + console.log("End: Test_SetLinkOnline"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetLinkOffline', Make a link into off-line */ +async function Test_SetLinkOffline(): Promise +{ + console.log("Begin: Test_SetLinkOffline"); + let in_rpc_link: VPN.VpnRpcLink = new VPN.VpnRpcLink( + { + HubName_str: hub_name, + AccountName_utf: "linktest", + }); + let out_rpc_link: VPN.VpnRpcLink = await api.SetLinkOffline(in_rpc_link); + console.log(out_rpc_link); + console.log("End: Test_SetLinkOffline"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteLink', Delete a link */ +async function Test_DeleteLink(): Promise +{ + console.log("Begin: Test_DeleteLink"); + let in_rpc_link: VPN.VpnRpcLink = new VPN.VpnRpcLink( + { + HubName_str: hub_name, + AccountName_utf: "linktest2", + }); + let out_rpc_link: VPN.VpnRpcLink = await api.DeleteLink(in_rpc_link); + console.log(out_rpc_link); + console.log("End: Test_DeleteLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'RenameLink', Rename link (cascade connection) */ +async function Test_RenameLink(): Promise +{ + console.log("Begin: Test_RenameLink"); + let in_rpc_rename_link: VPN.VpnRpcRenameLink = new VPN.VpnRpcRenameLink( + { + HubName_str: hub_name, + OldAccountName_utf: "linktest", + NewAccountName_utf: "linktest2", + }); + let out_rpc_rename_link: VPN.VpnRpcRenameLink = await api.RenameLink(in_rpc_rename_link); + console.log(out_rpc_rename_link); + console.log("End: Test_RenameLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateLink', Create a new link(cascade) */ +async function Test_CreateLink(): Promise +{ + console.log("Begin: Test_CreateLink"); + let in_rpc_create_link: VPN.VpnRpcCreateLink = new VPN.VpnRpcCreateLink( + { + HubName_Ex_str: hub_name, + CheckServerCert_bool: false, + AccountName_utf: "linktest", + Hostname_str: "1.2.3.4", + Port_u32: 443, + ProxyType_u32: 0, + HubName_str: "ABC", + MaxConnection_u32: 16, + UseEncrypt_bool: true, + UseCompress_bool: false, + HalfConnection_bool: true, + AdditionalConnectionInterval_u32: 2, + ConnectionDisconnectSpan_u32: 24, + AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword, + Username_str: "181012", + PlainPassword_str: "microsoft", + HashedPassword_bin: new Uint8Array([ ]), + ClientX_bin: new Uint8Array([ ]), + ClientK_bin: new Uint8Array([ ]), + ["policy:DHCPFilter_bool"]: true, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: true, + SecPol_CheckMac_bool: true, + SecPol_CheckIP_bool: true, + ["policy:ArpDhcpOnly_bool"]: true, + ["policy:PrivacyFilter_bool"]: true, + ["policy:NoServer_bool"]: true, + ["policy:NoBroadcastLimiter_bool"]: true, + ["policy:MaxMac_u32"]: 32, + ["policy:MaxIP_u32"]: 64, + ["policy:MaxUpload_u32"]: 960000, + ["policy:MaxDownload_u32"]: 1280000, + ["policy:RSandRAFilter_bool"]: true, + SecPol_RAFilter_bool: true, + ["policy:DHCPv6Filter_bool"]: true, + ["policy:DHCPv6NoServer_bool"]: true, + SecPol_CheckIPv6_bool: true, + ["policy:NoServerV6_bool"]: true, + ["policy:MaxIPv6_u32"]: 127, + ["policy:FilterIPv4_bool"]: true, + ["policy:FilterIPv6_bool"]: true, + ["policy:FilterNonIP_bool"]: true, + ["policy:NoIPv6DefaultRouterInRA_bool"]: true, + ["policy:VLanId_u32"]: 123, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_create_link: VPN.VpnRpcCreateLink = await api.CreateLink(in_rpc_create_link); + console.log(out_rpc_create_link); + console.log("End: Test_CreateLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetLink', Get link configuration */ +async function Test_GetLink(): Promise +{ + console.log("Begin: Test_GetLink"); + let in_rpc_create_link: VPN.VpnRpcCreateLink = new VPN.VpnRpcCreateLink( + { + HubName_Ex_str: hub_name, + AccountName_utf: "linktest", + }); + let out_rpc_create_link: VPN.VpnRpcCreateLink = await api.GetLink(in_rpc_create_link); + console.log(out_rpc_create_link); + console.log("End: Test_GetLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetLink', Set link configuration */ +async function Test_SetLink(): Promise +{ + console.log("Begin: Test_SetLink"); + let in_rpc_create_link: VPN.VpnRpcCreateLink = new VPN.VpnRpcCreateLink( + { + HubName_Ex_str: hub_name, + CheckServerCert_bool: false, + AccountName_utf: "linktest", + Hostname_str: "1.2.3.4", + Port_u32: 443, + ProxyType_u32: 0, + HubName_str: "ABC", + MaxConnection_u32: 16, + UseEncrypt_bool: true, + UseCompress_bool: false, + HalfConnection_bool: true, + AdditionalConnectionInterval_u32: 2, + ConnectionDisconnectSpan_u32: 24, + AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword, + Username_str: "181012", + PlainPassword_str: "microsoft", + HashedPassword_bin: new Uint8Array([ ]), + ClientX_bin: new Uint8Array([ ]), + ClientK_bin: new Uint8Array([ ]), + ["policy:DHCPFilter_bool"]: true, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: true, + SecPol_CheckMac_bool: true, + SecPol_CheckIP_bool: true, + ["policy:ArpDhcpOnly_bool"]: true, + ["policy:PrivacyFilter_bool"]: true, + ["policy:NoServer_bool"]: true, + ["policy:NoBroadcastLimiter_bool"]: true, + ["policy:MaxMac_u32"]: 32, + ["policy:MaxIP_u32"]: 64, + ["policy:MaxUpload_u32"]: 960000, + ["policy:MaxDownload_u32"]: 1280000, + ["policy:RSandRAFilter_bool"]: true, + SecPol_RAFilter_bool: true, + ["policy:DHCPv6Filter_bool"]: true, + ["policy:DHCPv6NoServer_bool"]: true, + SecPol_CheckIPv6_bool: true, + ["policy:NoServerV6_bool"]: true, + ["policy:MaxIPv6_u32"]: 127, + ["policy:FilterIPv4_bool"]: true, + ["policy:FilterIPv6_bool"]: true, + ["policy:FilterNonIP_bool"]: true, + ["policy:NoIPv6DefaultRouterInRA_bool"]: true, + ["policy:VLanId_u32"]: 123, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_create_link: VPN.VpnRpcCreateLink = await api.SetLink(in_rpc_create_link); + console.log(out_rpc_create_link); + console.log("End: Test_SetLink"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumLink', Enumerate links */ +async function Test_EnumLink(): Promise +{ + console.log("Begin: Test_EnumLink"); + let in_rpc_enum_link: VPN.VpnRpcEnumLink = new VPN.VpnRpcEnumLink( + { + HubName_str: hub_name, + }); + let out_rpc_enum_link: VPN.VpnRpcEnumLink = await api.EnumLink(in_rpc_enum_link); + console.log(out_rpc_enum_link); + console.log("End: Test_EnumLink"); + console.log("-----"); + console.log(); + return out_rpc_enum_link; +} + +/** API test for 'GetLinkStatus', Get link status */ +async function Test_GetLinkStatus(name: string): Promise +{ + console.log("Begin: Test_GetLinkStatus"); + let in_rpc_link_status: VPN.VpnRpcLinkStatus = new VPN.VpnRpcLinkStatus( + { + HubName_Ex_str: hub_name, + AccountName_utf: name, + }); + let out_rpc_link_status: VPN.VpnRpcLinkStatus = await api.GetLinkStatus(in_rpc_link_status); + console.log(out_rpc_link_status); + console.log("End: Test_GetLinkStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddAccess', Add access list entry */ +async function Test_AddAccess(): Promise +{ + console.log("Begin: Test_AddAccess"); + let in_rpc_add_access_ipv4: VPN.VpnRpcAddAccess = new VPN.VpnRpcAddAccess( + { + HubName_str: hub_name, + AccessListSingle: [ new VPN.VpnAccess( + { + Note_utf: "IPv4 Test", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: false, + SrcIpAddress_ip: "192.168.0.0", + SrcSubnetMask_ip: "255.255.255.0", + DestIpAddress_ip: "10.0.0.0", + DestSubnetMask_ip: "255.255.0.0", + Protocol_u32: VPN.VpnIpProtocolNumber.TCP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), ], + }); + let out_rpc_add_access_ipv4: VPN.VpnRpcAddAccess = await api.AddAccess(in_rpc_add_access_ipv4); + let in_rpc_add_access_ipv6: VPN.VpnRpcAddAccess = new VPN.VpnRpcAddAccess( + { + HubName_str: hub_name, + AccessListSingle: [ new VPN.VpnAccess( + { + Note_utf: "IPv6 Test", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: true, + SrcIpAddress6_bin: new Uint8Array([ 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + SrcSubnetMask6_bin: new Uint8Array([ 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + Protocol_u32: VPN.VpnIpProtocolNumber.UDP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), ], + }); + let out_rpc_add_access_ipv6: VPN.VpnRpcAddAccess = await api.AddAccess(in_rpc_add_access_ipv6); + console.log("End: Test_AddAccess"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteAccess', Delete access list entry */ +async function Test_DeleteAccess(): Promise +{ + console.log("Begin: Test_DeleteAccess"); + let in_rpc_delete_access: VPN.VpnRpcDeleteAccess = new VPN.VpnRpcDeleteAccess( + { + HubName_str: hub_name, + Id_u32: 1, + }); + let out_rpc_delete_access: VPN.VpnRpcDeleteAccess = await api.DeleteAccess(in_rpc_delete_access); + console.log(out_rpc_delete_access); + console.log("End: Test_DeleteAccess"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumAccess', Get access list */ +async function Test_EnumAccess(): Promise +{ + console.log("Begin: Test_EnumAccess"); + let in_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = new VPN.VpnRpcEnumAccessList( + { + HubName_str: hub_name, + }); + let out_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = await api.EnumAccess(in_rpc_enum_access_list); + console.log(out_rpc_enum_access_list); + console.log("End: Test_EnumAccess"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetAccessList', Set access list */ +async function Test_SetAccessList(): Promise +{ + console.log("Begin: Test_SetAccessList"); + let in_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = new VPN.VpnRpcEnumAccessList( + { + HubName_str: hub_name, + AccessList: [ new VPN.VpnAccess( + { + Note_utf: "IPv4 Test 2", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: false, + SrcIpAddress_ip: "192.168.0.0", + SrcSubnetMask_ip: "255.255.255.0", + DestIpAddress_ip: "10.0.0.0", + DestSubnetMask_ip: "255.255.0.0", + Protocol_u32: VPN.VpnIpProtocolNumber.TCP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), new VPN.VpnAccess( + { + Note_utf: "IPv6 Test 2", + Active_bool: true, + Priority_u32: 100, + Discard_bool: true, + IsIPv6_bool: true, + SrcIpAddress6_bin: new Uint8Array([ 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + SrcSubnetMask6_bin: new Uint8Array([ 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]), + Protocol_u32: VPN.VpnIpProtocolNumber.UDP, + SrcPortStart_u32: 123, + SrcPortEnd_u32: 456, + DestPortStart_u32: 555, + DestPortEnd_u32: 666, + SrcUsername_str: "dnobori", + DestUsername_str: "nekosan", + CheckSrcMac_bool: true, + SrcMacAddress_bin: new Uint8Array([ 1, 2, 3, 0, 0, 0, ]), + SrcMacMask_bin: new Uint8Array([ 255, 255, 255, 0, 0, 0, ]), + CheckTcpState_bool: true, + Established_bool: true, + Delay_u32: 10, + Jitter_u32: 20, + Loss_u32: 30, + RedirectUrl_str: "aho", + }), ], + }); + let out_rpc_enum_access_list: VPN.VpnRpcEnumAccessList = await api.SetAccessList(in_rpc_enum_access_list); + console.log(out_rpc_enum_access_list); + console.log("End: Test_SetAccessList"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateUser', Create a user */ +async function Test_CreateUser(): Promise +{ + console.log("Begin: Test_CreateUser"); + let in_rpc_set_user: VPN.VpnRpcSetUser = new VPN.VpnRpcSetUser( + { + HubName_str: hub_name, + Name_str: "test1", + Realname_utf: "Cat man", + Note_utf: "Hey!!!", + AuthType_u32: VPN.VpnRpcUserAuthType.Password, + Auth_Password_str: "microsoft", + UserX_bin: new Uint8Array([ ]), + Serial_bin: new Uint8Array([ ]), + CommonName_utf: "", + RadiusUsername_utf: "", + NtUsername_utf: "", + ExpireTime_dt: new Date(2019, 1, 1), + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_user: VPN.VpnRpcSetUser = await api.CreateUser(in_rpc_set_user); + console.log("End: Test_CreateUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetUser', Set user setting */ +async function Test_SetUser(): Promise +{ + console.log("Begin: Test_SetUser"); + let in_rpc_set_user: VPN.VpnRpcSetUser = new VPN.VpnRpcSetUser( + { + HubName_str: hub_name, + Name_str: "test1", + Realname_utf: "Cat man", + Note_utf: "Hey!!!", + GroupName_str: "group1", + AuthType_u32: VPN.VpnRpcUserAuthType.Anonymous, + Auth_Password_str: "", + UserX_bin: new Uint8Array([ ]), + Serial_bin: new Uint8Array([ ]), + CommonName_utf: "", + RadiusUsername_utf: "", + NtUsername_utf: "", + ExpireTime_dt: new Date(2019, 1, 1), + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_user: VPN.VpnRpcSetUser = await api.SetUser(in_rpc_set_user); + console.log("End: Test_SetUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetUser', Get user setting */ +async function Test_GetUser(): Promise +{ + console.log("Begin: Test_GetUser"); + let in_rpc_set_user: VPN.VpnRpcSetUser = new VPN.VpnRpcSetUser( + { + HubName_str: hub_name, + Name_str: "test1", + }); + let out_rpc_set_user: VPN.VpnRpcSetUser = await api.GetUser(in_rpc_set_user); + console.log(out_rpc_set_user); + console.log("End: Test_GetUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteUser', Delete a user */ +async function Test_DeleteUser(): Promise +{ + console.log("Begin: Test_DeleteUser"); + let in_rpc_delete_user: VPN.VpnRpcDeleteUser = new VPN.VpnRpcDeleteUser( + { + HubName_str: hub_name, + Name_str: "test1", + }); + let out_rpc_delete_user: VPN.VpnRpcDeleteUser = await api.DeleteUser(in_rpc_delete_user); + console.log("End: Test_DeleteUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumUser', Enumerate users */ +async function Test_EnumUser(): Promise +{ + console.log("Begin: Test_EnumUser"); + let in_rpc_enum_user: VPN.VpnRpcEnumUser = new VPN.VpnRpcEnumUser( + { + HubName_str: hub_name, + }); + let out_rpc_enum_user: VPN.VpnRpcEnumUser = await api.EnumUser(in_rpc_enum_user); + console.log(out_rpc_enum_user); + console.log("End: Test_EnumUser"); + console.log("-----"); + console.log(); +} + +/** API test for 'CreateGroup', Create a group */ +async function Test_CreateGroup(): Promise +{ + console.log("Begin: Test_CreateGroup"); + let in_rpc_set_group: VPN.VpnRpcSetGroup = new VPN.VpnRpcSetGroup( + { + HubName_str: hub_name, + Name_str: "group1", + Realname_utf: "Cat group", + Note_utf: "This is it! This is it!!", + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_group: VPN.VpnRpcSetGroup = await api.CreateGroup(in_rpc_set_group); + console.log(out_rpc_set_group); + console.log("End: Test_CreateGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetGroup', Set group setting */ +async function Test_SetGroup(): Promise +{ + console.log("Begin: Test_SetGroup"); + let in_rpc_set_group: VPN.VpnRpcSetGroup = new VPN.VpnRpcSetGroup( + { + HubName_str: hub_name, + Name_str: "group1", + Realname_utf: "Cat group 2", + Note_utf: "This is it! This is it!! 2", + UsePolicy_bool: true, + ["policy:Access_bool"]: true, + ["policy:DHCPFilter_bool"]: false, + ["policy:DHCPNoServer_bool"]: true, + ["policy:DHCPForce_bool"]: false, + ["policy:NoBridge_bool"]: false, + ["policy:NoRouting_bool"]: false, + ["policy:CheckMac_bool"]: false, + ["policy:CheckIP_bool"]: false, + ["policy:ArpDhcpOnly_bool"]: false, + ["policy:PrivacyFilter_bool"]: false, + ["policy:NoServer_bool"]: false, + ["policy:NoBroadcastLimiter_bool"]: false, + ["policy:MonitorPort_bool"]: false, + ["policy:MaxConnection_u32"]: 32, + ["policy:TimeOut_u32"]: 15, + ["policy:MaxMac_u32"]: 1000, + ["policy:MaxIP_u32"]: 1000, + ["policy:MaxUpload_u32"]: 1000000000, + ["policy:MaxDownload_u32"]: 1000000000, + ["policy:FixPassword_bool"]: false, + ["policy:MultiLogins_u32"]: 1000, + ["policy:NoQoS_bool"]: false, + ["policy:RSandRAFilter_bool"]: false, + ["policy:RAFilter_bool"]: false, + ["policy:DHCPv6Filter_bool"]: false, + ["policy:DHCPv6NoServer_bool"]: false, + ["policy:NoRoutingV6_bool"]: false, + ["policy:CheckIPv6_bool"]: false, + ["policy:NoServerV6_bool"]: false, + ["policy:MaxIPv6_u32"]: 1234, + ["policy:NoSavePassword_bool"]: false, + ["policy:AutoDisconnect_u32"]: 0, + ["policy:FilterIPv4_bool"]: false, + ["policy:FilterIPv6_bool"]: false, + ["policy:FilterNonIP_bool"]: false, + ["policy:NoIPv6DefaultRouterInRA_bool"]: false, + ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: false, + ["policy:VLanId_u32"]: 0, + ["policy:Ver3_bool"]: true, + }); + let out_rpc_set_group: VPN.VpnRpcSetGroup = await api.SetGroup(in_rpc_set_group); + console.log(out_rpc_set_group); + console.log("End: Test_SetGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetGroup', Get group information */ +async function Test_GetGroup(): Promise +{ + console.log("Begin: Test_GetGroup"); + let in_rpc_set_group: VPN.VpnRpcSetGroup = new VPN.VpnRpcSetGroup( + { + HubName_str: hub_name, + Name_str: "group1", + }); + let out_rpc_set_group: VPN.VpnRpcSetGroup = await api.GetGroup(in_rpc_set_group); + console.log(out_rpc_set_group); + console.log("End: Test_GetGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteGroup', Delete a group */ +async function Test_DeleteGroup(): Promise +{ + console.log("Begin: Test_DeleteGroup"); + let in_rpc_delete_user: VPN.VpnRpcDeleteUser = new VPN.VpnRpcDeleteUser( + { + HubName_str: hub_name, + Name_str: "group1", + }); + let out_rpc_delete_user: VPN.VpnRpcDeleteUser = await api.DeleteGroup(in_rpc_delete_user); + console.log(out_rpc_delete_user); + console.log("End: Test_DeleteGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumGroup', Enumerate groups */ +async function Test_EnumGroup(): Promise +{ + console.log("Begin: Test_EnumGroup"); + let in_rpc_enum_group: VPN.VpnRpcEnumGroup = new VPN.VpnRpcEnumGroup( + { + HubName_str: hub_name, + }); + let out_rpc_enum_group: VPN.VpnRpcEnumGroup = await api.EnumGroup(in_rpc_enum_group); + console.log(out_rpc_enum_group); + console.log("End: Test_EnumGroup"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumSession', Enumerate sessions */ +async function Test_EnumSession(): Promise +{ + console.log("Begin: Test_EnumSession"); + let in_rpc_enum_session: VPN.VpnRpcEnumSession = new VPN.VpnRpcEnumSession( + { + HubName_str: hub_name, + }); + let out_rpc_enum_session: VPN.VpnRpcEnumSession = await api.EnumSession(in_rpc_enum_session); + console.log(out_rpc_enum_session); + console.log("End: Test_EnumSession"); + console.log("-----"); + console.log(); + return out_rpc_enum_session; +} + +/** API test for 'GetSessionStatus', Get session status */ +async function Test_GetSessionStatus(session_name: string): Promise +{ + console.log("Begin: Test_GetSessionStatus"); + let in_rpc_session_status: VPN.VpnRpcSessionStatus = new VPN.VpnRpcSessionStatus( + { + HubName_str: hub_name, + Name_str: session_name, + }); + let out_rpc_session_status: VPN.VpnRpcSessionStatus = await api.GetSessionStatus(in_rpc_session_status); + console.log(out_rpc_session_status); + console.log("End: Test_GetSessionStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteSession', Delete a session */ +async function Test_DeleteSession(session_id: string): Promise +{ + console.log("Begin: Test_DeleteSession"); + let in_rpc_delete_session: VPN.VpnRpcDeleteSession = new VPN.VpnRpcDeleteSession( + { + HubName_str: hub_name, + Name_str: session_id, + }); + let out_rpc_delete_session: VPN.VpnRpcDeleteSession = await api.DeleteSession(in_rpc_delete_session); + console.log(out_rpc_delete_session); + console.log("End: Test_DeleteSession"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumMacTable', Get MAC address table */ +async function Test_EnumMacTable(): Promise +{ + console.log("Begin: Test_EnumMacTable"); + let in_rpc_enum_mac_table: VPN.VpnRpcEnumMacTable = new VPN.VpnRpcEnumMacTable( + { + HubName_str: hub_name, + }); + let out_rpc_enum_mac_table: VPN.VpnRpcEnumMacTable = await api.EnumMacTable(in_rpc_enum_mac_table); + console.log(out_rpc_enum_mac_table); + console.log("End: Test_EnumMacTable"); + console.log("-----"); + console.log(); + return out_rpc_enum_mac_table; +} + +/** API test for 'DeleteMacTable', Delete MAC address table entry */ +async function Test_DeleteMacTable(key32: number): Promise +{ + console.log("Begin: Test_DeleteMacTable"); + let in_rpc_delete_table: VPN.VpnRpcDeleteTable = new VPN.VpnRpcDeleteTable( + { + HubName_str: hub_name, + Key_u32: key32, + }); + let out_rpc_delete_table: VPN.VpnRpcDeleteTable = await api.DeleteMacTable(in_rpc_delete_table); + console.log("End: Test_DeleteMacTable"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumIpTable', Get IP address table */ +async function Test_EnumIpTable(): Promise +{ + console.log("Begin: Test_EnumIpTable"); + let in_rpc_enum_ip_table: VPN.VpnRpcEnumIpTable = new VPN.VpnRpcEnumIpTable( + { + HubName_str: hub_name, + }); + let out_rpc_enum_ip_table: VPN.VpnRpcEnumIpTable = await api.EnumIpTable(in_rpc_enum_ip_table); + console.log(out_rpc_enum_ip_table); + console.log("End: Test_EnumIpTable"); + console.log("-----"); + console.log(); + return out_rpc_enum_ip_table; +} + +/** API test for 'DeleteIpTable', Delete IP address table entry */ +async function Test_DeleteIpTable(key32: number): Promise +{ + console.log("Begin: Test_DeleteIpTable"); + let in_rpc_delete_table: VPN.VpnRpcDeleteTable = new VPN.VpnRpcDeleteTable( + { + HubName_str: hub_name, + Key_u32: key32, + }); + let out_rpc_delete_table: VPN.VpnRpcDeleteTable = await api.DeleteIpTable(in_rpc_delete_table); + console.log(out_rpc_delete_table); + console.log("End: Test_DeleteIpTable"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetKeep', Set keep-alive function setting */ +async function Test_SetKeep(): Promise +{ + console.log("Begin: Test_SetKeep"); + let in_rpc_keep: VPN.VpnRpcKeep = new VPN.VpnRpcKeep( + { + UseKeepConnect_bool: true, + KeepConnectHost_str: "www.softether.org", + KeepConnectPort_u32: 123, + KeepConnectProtocol_u32: VPN.VpnRpcKeepAliveProtocol.UDP, + KeepConnectInterval_u32: 1, + }); + let out_rpc_keep: VPN.VpnRpcKeep = await api.SetKeep(in_rpc_keep); + console.log(out_rpc_keep); + console.log("End: Test_SetKeep"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetKeep', Get keep-alive function setting */ +async function Test_GetKeep(): Promise +{ + console.log("Begin: Test_GetKeep"); + let in_rpc_keep: VPN.VpnRpcKeep = new VPN.VpnRpcKeep( + { + }); + let out_rpc_keep: VPN.VpnRpcKeep = await api.GetKeep(in_rpc_keep); + console.log(out_rpc_keep); + console.log("End: Test_GetKeep"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnableSecureNAT', Enable SecureNAT function of the hub */ +async function Test_EnableSecureNAT(): Promise +{ + console.log("Begin: Test_EnableSecureNAT"); + let in_rpc_hub: VPN.VpnRpcHub = new VPN.VpnRpcHub( + { + HubName_str: hub_name, + }); + let out_rpc_hub: VPN.VpnRpcHub = await api.EnableSecureNAT(in_rpc_hub); + console.log(out_rpc_hub); + console.log("End: Test_EnableSecureNAT"); + console.log("-----"); + console.log(); +} + +/** API test for 'DisableSecureNAT', Disable the SecureNAT function of the hub */ +async function Test_DisableSecureNAT(): Promise +{ + console.log("Begin: Test_DisableSecureNAT"); + let in_rpc_hub: VPN.VpnRpcHub = new VPN.VpnRpcHub( + { + HubName_str: hub_name, + }); + let out_rpc_hub: VPN.VpnRpcHub = await api.DisableSecureNAT(in_rpc_hub); + console.log(out_rpc_hub); + console.log("End: Test_DisableSecureNAT"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetSecureNATOption', Set SecureNAT options */ +async function Test_SetSecureNATOption(): Promise +{ + console.log("Begin: Test_SetSecureNATOption"); + let in_vh_option: VPN.VpnVhOption = new VPN.VpnVhOption( + { + RpcHubName_str: hub_name, + MacAddress_bin: new Uint8Array([ 0x00, 0xAC, 0x00, 0x11, 0x22, 0x33, ]), + Ip_ip: "10.0.0.254", + Mask_ip: "255.255.255.0", + UseNat_bool: true, + Mtu_u32: 1200, + NatTcpTimeout_u32: 100, + NatUdpTimeout_u32: 50, + UseDhcp_bool: true, + DhcpLeaseIPStart_ip: "10.0.0.101", + DhcpLeaseIPEnd_ip: "10.0.0.199", + DhcpSubnetMask_ip: "255.255.255.0", + DhcpExpireTimeSpan_u32: 3600, + DhcpGatewayAddress_ip: "10.0.0.254", + DhcpDnsServerAddress_ip: "10.0.0.254", + DhcpDnsServerAddress2_ip: "8.8.8.8", + DhcpDomainName_str: "lab.coe.ad.jp", + SaveLog_bool: true, + ApplyDhcpPushRoutes_bool: false, + DhcpPushRoutes_str: "", + }); + let out_vh_option: VPN.VpnVhOption = await api.SetSecureNATOption(in_vh_option); + console.log(out_vh_option); + console.log("End: Test_SetSecureNATOption"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSecureNATOption', Get SecureNAT options */ +async function Test_GetSecureNATOption(): Promise +{ + console.log("Begin: Test_GetSecureNATOption"); + let in_vh_option: VPN.VpnVhOption = new VPN.VpnVhOption( + { + RpcHubName_str: hub_name, + }); + let out_vh_option: VPN.VpnVhOption = await api.GetSecureNATOption(in_vh_option); + console.log(out_vh_option); + console.log("End: Test_GetSecureNATOption"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumNAT', Enumerate NAT entries of the SecureNAT */ +async function Test_EnumNAT(): Promise +{ + console.log("Begin: Test_EnumNAT"); + let in_rpc_enum_nat: VPN.VpnRpcEnumNat = new VPN.VpnRpcEnumNat( + { + HubName_str: hub_name, + }); + let out_rpc_enum_nat: VPN.VpnRpcEnumNat = await api.EnumNAT(in_rpc_enum_nat); + console.log(out_rpc_enum_nat); + console.log("End: Test_EnumNAT"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumDHCP', Enumerate DHCP entries */ +async function Test_EnumDHCP(): Promise +{ + console.log("Begin: Test_EnumDHCP"); + let in_rpc_enum_dhcp: VPN.VpnRpcEnumDhcp = new VPN.VpnRpcEnumDhcp( + { + HubName_str: hub_name, + }); + let out_rpc_enum_dhcp: VPN.VpnRpcEnumDhcp = await api.EnumDHCP(in_rpc_enum_dhcp); + console.log(out_rpc_enum_dhcp); + console.log("End: Test_EnumDHCP"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSecureNATStatus', Get status of the SecureNAT */ +async function Test_GetSecureNATStatus(): Promise +{ + console.log("Begin: Test_GetSecureNATStatus"); + let in_rpc_nat_status: VPN.VpnRpcNatStatus = new VPN.VpnRpcNatStatus( + { + HubName_str: hub_name, + }); + let out_rpc_nat_status: VPN.VpnRpcNatStatus = await api.GetSecureNATStatus(in_rpc_nat_status); + console.log(out_rpc_nat_status); + console.log("End: Test_GetSecureNATStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumEthernet', Enumerate Ethernet devices */ +async function Test_EnumEthernet(): Promise +{ + console.log("Begin: Test_EnumEthernet"); + let out_rpc_enum_eth: VPN.VpnRpcEnumEth = await api.EnumEthernet(); + console.log(out_rpc_enum_eth); + console.log("End: Test_EnumEthernet"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddLocalBridge', Add a new local bridge */ +async function Test_AddLocalBridge(): Promise +{ + console.log("Begin: Test_AddLocalBridge"); + let in_rpc_localbridge: VPN.VpnRpcLocalBridge = new VPN.VpnRpcLocalBridge( + { + DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str: hub_name, + }); + let out_rpc_localbridge: VPN.VpnRpcLocalBridge = await api.AddLocalBridge(in_rpc_localbridge); + console.log(out_rpc_localbridge); + console.log("End: Test_AddLocalBridge"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteLocalBridge', Delete a local bridge */ +async function Test_DeleteLocalBridge(): Promise +{ + console.log("Begin: Test_DeleteLocalBridge"); + let in_rpc_localbridge: VPN.VpnRpcLocalBridge = new VPN.VpnRpcLocalBridge( + { + DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str: hub_name, + }); + let out_rpc_localbridge: VPN.VpnRpcLocalBridge = await api.DeleteLocalBridge(in_rpc_localbridge); + console.log(out_rpc_localbridge); + console.log("End: Test_DeleteLocalBridge"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumLocalBridge', Enumerate local bridges */ +async function Test_EnumLocalBridge(): Promise +{ + console.log("Begin: Test_EnumLocalBridge"); + let out_rpc_enum_localbridge: VPN.VpnRpcEnumLocalBridge = await api.EnumLocalBridge(); + console.log(out_rpc_enum_localbridge); + console.log("End: Test_EnumLocalBridge"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetBridgeSupport', Get availability to localbridge function */ +async function Test_GetBridgeSupport(): Promise +{ + console.log("Begin: Test_GetBridgeSupport"); + let out_rpc_bridge_support: VPN.VpnRpcBridgeSupport = await api.GetBridgeSupport(); + console.log(out_rpc_bridge_support); + console.log("End: Test_GetBridgeSupport"); + console.log("-----"); + console.log(); +} + +/** API test for 'RebootServer', Reboot server itself */ +async function Test_RebootServer(): Promise +{ + console.log("Begin: Test_RebootServer"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + }); + let out_rpc_test: VPN.VpnRpcTest = await api.RebootServer(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_RebootServer"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetCaps', Get capabilities */ +async function Test_GetCaps(): Promise +{ + console.log("Begin: Test_GetCaps"); + let out_capslist: VPN.VpnCapslist = await api.GetCaps(); + console.log(out_capslist); + console.log("End: Test_GetCaps"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetConfig', Get configuration file stream */ +async function Test_GetConfig(): Promise +{ + console.log("Begin: Test_GetConfig"); + let out_rpc_config: VPN.VpnRpcConfig = await api.GetConfig(); + console.log(out_rpc_config); + console.log("End: Test_GetConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetConfig', Overwrite configuration file by specified data */ +async function Test_SetConfig(): Promise +{ + console.log("Begin: Test_SetConfig"); + let in_rpc_config: VPN.VpnRpcConfig = new VPN.VpnRpcConfig( + { + FileData_bin: new Uint8Array([ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, ]), + }); + let out_rpc_config: VPN.VpnRpcConfig = await api.SetConfig(in_rpc_config); + console.log("End: Test_SetConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetDefaultHubAdminOptions', Get default hub administration options */ +async function Test_GetDefaultHubAdminOptions(): Promise +{ + console.log("Begin: Test_GetDefaultHubAdminOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.GetDefaultHubAdminOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_GetDefaultHubAdminOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubAdminOptions', Get hub administration options */ +async function Test_GetHubAdminOptions(): Promise +{ + console.log("Begin: Test_GetHubAdminOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.GetHubAdminOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_GetHubAdminOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubAdminOptions', Set hub administration options */ +async function Test_SetHubAdminOptions(): Promise +{ + console.log("Begin: Test_SetHubAdminOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + AdminOptionList: [ new VPN.VpnAdminOption( + { + Name_str: "no_securenat_enablenat", + Value_u32: 1, + }), ], + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.SetHubAdminOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_SetHubAdminOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubExtOptions', Get hub extended options */ +async function Test_GetHubExtOptions(): Promise +{ + console.log("Begin: Test_GetHubExtOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.GetHubExtOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_GetHubExtOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubExtOptions', Set hub extended options */ +async function Test_SetHubExtOptions(): Promise +{ + console.log("Begin: Test_SetHubExtOptions"); + let in_rpc_admin_option: VPN.VpnRpcAdminOption = new VPN.VpnRpcAdminOption( + { + HubName_str: hub_name, + AdminOptionList: [ new VPN.VpnAdminOption( + { + Name_str: "SecureNAT_RandomizeAssignIp", + Value_u32: 1, + }), ], + }); + let out_rpc_admin_option: VPN.VpnRpcAdminOption = await api.SetHubExtOptions(in_rpc_admin_option); + console.log(out_rpc_admin_option); + console.log("End: Test_SetHubExtOptions"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddL3Switch', Add a new virtual layer-3 switch */ +async function Test_AddL3Switch(): Promise +{ + console.log("Begin: Test_AddL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.AddL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_AddL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelL3Switch', Delete a virtual layer-3 switch */ +async function Test_DelL3Switch(): Promise +{ + console.log("Begin: Test_DelL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.DelL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_DelL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumL3Switch', Enumerate virtual layer-3 switches */ +async function Test_EnumL3Switch(): Promise +{ + console.log("Begin: Test_EnumL3Switch"); + let out_rpc_enum_l3sw: VPN.VpnRpcEnumL3Sw = await api.EnumL3Switch(); + console.log(out_rpc_enum_l3sw); + console.log("End: Test_EnumL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'StartL3Switch', Start a virtual layer-3 switch */ +async function Test_StartL3Switch(): Promise +{ + console.log("Begin: Test_StartL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.StartL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_StartL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'StopL3Switch', Stop a virtual layer-3 switch */ +async function Test_StopL3Switch(): Promise +{ + console.log("Begin: Test_StopL3Switch"); + let in_rpc_l3sw: VPN.VpnRpcL3Sw = new VPN.VpnRpcL3Sw( + { + Name_str: "L3SW1", + }); + let out_rpc_l3sw: VPN.VpnRpcL3Sw = await api.StopL3Switch(in_rpc_l3sw); + console.log(out_rpc_l3sw); + console.log("End: Test_StopL3Switch"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddL3If', Add new virtual interface on virtual L3 switch */ +async function Test_AddL3If(): Promise +{ + console.log("Begin: Test_AddL3If"); + let in_rpc_l3if: VPN.VpnRpcL3If = new VPN.VpnRpcL3If( + { + Name_str: "L3SW1", + HubName_str: hub_name, + IpAddress_ip: "192.168.0.1", + SubnetMask_ip: "255.255.255.0", + }); + let out_rpc_l3if: VPN.VpnRpcL3If = await api.AddL3If(in_rpc_l3if); + console.log(out_rpc_l3if); + console.log("End: Test_AddL3If"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelL3If', Delete a virtual interface on virtual L3 switch */ +async function Test_DelL3If(): Promise +{ + console.log("Begin: Test_DelL3If"); + let in_rpc_l3if: VPN.VpnRpcL3If = new VPN.VpnRpcL3If( + { + Name_str: "L3SW1", + HubName_str: hub_name, + }); + let out_rpc_l3if: VPN.VpnRpcL3If = await api.DelL3If(in_rpc_l3if); + console.log(out_rpc_l3if); + console.log("End: Test_DelL3If"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumL3If', Enumerate virtual interfaces on virtual L3 switch */ +async function Test_EnumL3If(): Promise +{ + console.log("Begin: Test_EnumL3If"); + let in_rpc_enum_l3if: VPN.VpnRpcEnumL3If = new VPN.VpnRpcEnumL3If( + { + Name_str: "L3SW1", + }); + let out_rpc_enum_l3if: VPN.VpnRpcEnumL3If = await api.EnumL3If(in_rpc_enum_l3if); + console.log(out_rpc_enum_l3if); + console.log("End: Test_EnumL3If"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddL3Table', Add new routing table entry on virtual L3 switch */ +async function Test_AddL3Table(): Promise +{ + console.log("Begin: Test_AddL3Table"); + let in_rpc_l3table: VPN.VpnRpcL3Table = new VPN.VpnRpcL3Table( + { + Name_str: "L3SW1", + NetworkAddress_ip: "10.0.0.0", + SubnetMask_ip: "255.0.0.0", + GatewayAddress_ip: "192.168.7.1", + Metric_u32: 10, + }); + let out_rpc_l3table: VPN.VpnRpcL3Table = await api.AddL3Table(in_rpc_l3table); + console.log(out_rpc_l3table); + console.log("End: Test_AddL3Table"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelL3Table', Delete routing table entry on virtual L3 switch */ +async function Test_DelL3Table(): Promise +{ + console.log("Begin: Test_DelL3Table"); + let in_rpc_l3table: VPN.VpnRpcL3Table = new VPN.VpnRpcL3Table( + { + Name_str: "L3SW1", + NetworkAddress_ip: "10.0.0.0", + SubnetMask_ip: "255.0.0.0", + GatewayAddress_ip: "192.168.7.1", + Metric_u32: 10, + }); + let out_rpc_l3table: VPN.VpnRpcL3Table = await api.DelL3Table(in_rpc_l3table); + console.log(out_rpc_l3table); + console.log("End: Test_DelL3Table"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumL3Table', Get routing table on virtual L3 switch */ +async function Test_EnumL3Table(): Promise +{ + console.log("Begin: Test_EnumL3Table"); + let in_rpc_enum_l3table: VPN.VpnRpcEnumL3Table = new VPN.VpnRpcEnumL3Table( + { + Name_str: "L3SW1", + }); + let out_rpc_enum_l3table: VPN.VpnRpcEnumL3Table = await api.EnumL3Table(in_rpc_enum_l3table); + console.log(out_rpc_enum_l3table); + console.log("End: Test_EnumL3Table"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumCrl', Get CRL (Certificate Revocation List) index */ +async function Test_EnumCrl(): Promise +{ + console.log("Begin: Test_EnumCrl"); + let in_rpc_enum_crl: VPN.VpnRpcEnumCrl = new VPN.VpnRpcEnumCrl( + { + HubName_str: hub_name, + }); + let out_rpc_enum_crl: VPN.VpnRpcEnumCrl = await api.EnumCrl(in_rpc_enum_crl); + console.log(out_rpc_enum_crl); + console.log("End: Test_EnumCrl"); + console.log("-----"); + console.log(); + return out_rpc_enum_crl; +} + +/** API test for 'AddCrl', Add new CRL (Certificate Revocation List) entry */ +async function Test_AddCrl(): Promise +{ + console.log("Begin: Test_AddCrl"); + let in_rpc_crl: VPN.VpnRpcCrl = new VPN.VpnRpcCrl( + { + HubName_str: hub_name, + CommonName_utf: "CN", + Organization_utf: "Org", + Unit_utf: "ICSCOE", + Country_utf: "JP", + State_utf: "Ibaraki", + Local_utf: "Tsukuba", + Serial_bin: new Uint8Array([ 1, 2, 3, 4, 5, ]), + DigestMD5_bin: new Uint8Array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ]), + DigestSHA1_bin: new Uint8Array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ]), + }); + let out_rpc_crl: VPN.VpnRpcCrl = await api.AddCrl(in_rpc_crl); + console.log(out_rpc_crl); + console.log("End: Test_AddCrl"); + console.log("-----"); + console.log(); +} + +/** API test for 'DelCrl', Delete CRL (Certificate Revocation List) entry */ +async function Test_DelCrl(key: number): Promise +{ + console.log("Begin: Test_DelCrl"); + let in_rpc_crl: VPN.VpnRpcCrl = new VPN.VpnRpcCrl( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_crl: VPN.VpnRpcCrl = await api.DelCrl(in_rpc_crl); + console.log(out_rpc_crl); + console.log("End: Test_DelCrl"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetCrl', Get CRL (Certificate Revocation List) entry */ +async function Test_GetCrl(key: number): Promise +{ + console.log("Begin: Test_GetCrl"); + let in_rpc_crl: VPN.VpnRpcCrl = new VPN.VpnRpcCrl( + { + HubName_str: hub_name, + Key_u32: key, + }); + let out_rpc_crl: VPN.VpnRpcCrl = await api.GetCrl(in_rpc_crl); + console.log(out_rpc_crl); + console.log("End: Test_GetCrl"); + console.log("-----"); + console.log(); + return out_rpc_crl; +} + +/** API test for 'SetCrl', Set CRL (Certificate Revocation List) entry */ +async function Test_SetCrl(crl: VPN.VpnRpcCrl): Promise +{ + console.log("Begin: Test_SetCrl"); + let out_rpc_crl: VPN.VpnRpcCrl = await api.SetCrl(crl); + console.log(out_rpc_crl); + console.log("End: Test_SetCrl"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetAcList', Set access control list */ +async function Test_SetAcList(): Promise +{ + console.log("Begin: Test_SetAcList"); + let in_rpc_ac_list: VPN.VpnRpcAcList = new VPN.VpnRpcAcList( + { + HubName_str: hub_name, + ACList: [ new VPN.VpnAc( + { + Deny_bool: true, + IpAddress_ip: "192.168.0.0", + SubnetMask_ip: "255.255.0.0", + Masked_bool: true, + Priority_u32: 123, + }), new VPN.VpnAc( + { + Deny_bool: false, + IpAddress_ip: "fe80::", + SubnetMask_ip: "8", + Masked_bool: true, + Priority_u32: 123, + }), ], + }); + let out_rpc_ac_list: VPN.VpnRpcAcList = await api.SetAcList(in_rpc_ac_list); + console.log(out_rpc_ac_list); + console.log("End: Test_SetAcList"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetAcList', Get access control list */ +async function Test_GetAcList(): Promise +{ + console.log("Begin: Test_GetAcList"); + let in_rpc_ac_list: VPN.VpnRpcAcList = new VPN.VpnRpcAcList( + { + HubName_str: hub_name, + }); + let out_rpc_ac_list: VPN.VpnRpcAcList = await api.GetAcList(in_rpc_ac_list); + console.log(out_rpc_ac_list); + console.log("End: Test_GetAcList"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumLogFile', Enumerate log files */ +async function Test_EnumLogFile(): Promise +{ + console.log("Begin: Test_EnumLogFile"); + let out_rpc_enum_log_file: VPN.VpnRpcEnumLogFile = await api.EnumLogFile(); + console.log(out_rpc_enum_log_file); + console.log("End: Test_EnumLogFile"); + console.log("-----"); + console.log(); + return out_rpc_enum_log_file; +} + +/** API test for 'ReadLogFile', Read a log file */ +async function Test_ReadLogFile(filename: string): Promise +{ + console.log("Begin: Test_ReadLogFile"); + let in_rpc_read_log_file: VPN.VpnRpcReadLogFile = new VPN.VpnRpcReadLogFile( + { + FilePath_str: filename, + }); + let out_rpc_read_log_file: VPN.VpnRpcReadLogFile = await api.ReadLogFile(in_rpc_read_log_file); + console.log(out_rpc_read_log_file); + console.log("End: Test_ReadLogFile"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetSysLog', Set syslog function setting */ +async function Test_SetSysLog(flag: boolean): Promise +{ + console.log("Begin: Test_SetSysLog"); + let in_syslog_setting: VPN.VpnSyslogSetting = new VPN.VpnSyslogSetting( + { + SaveType_u32: flag ? VPN.VpnSyslogSaveType.ServerAndHubAllLog : VPN.VpnSyslogSaveType.None, + Hostname_str: "1.2.3.4", + Port_u32: 123, + }); + let out_syslog_setting: VPN.VpnSyslogSetting = await api.SetSysLog(in_syslog_setting); + console.log(out_syslog_setting); + console.log("End: Test_SetSysLog"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSysLog', Get syslog function setting */ +async function Test_GetSysLog(): Promise +{ + console.log("Begin: Test_GetSysLog"); + let in_syslog_setting: VPN.VpnSyslogSetting = new VPN.VpnSyslogSetting( + { + }); + let out_syslog_setting: VPN.VpnSyslogSetting = await api.GetSysLog(in_syslog_setting); + console.log(out_syslog_setting); + console.log("End: Test_GetSysLog"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetHubMsg', Set message of today on hub */ +async function Test_SetHubMsg(): Promise +{ + console.log("Begin: Test_SetHubMsg"); + let in_rpc_msg: VPN.VpnRpcMsg = new VPN.VpnRpcMsg( + { + HubName_str: hub_name, + Msg_bin: new Uint8Array([ 0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x21, 0x20, 0xe4, 0xb8, 0x87, 0xe5, 0x9b, 0xbd, 0xe3, 0x81, 0xae, 0xe5, 0x8a, 0xb4, 0xe5, 0x83, 0x8d, 0xe8, 0x80, 0x85, 0xe3, 0x82, 0x88, 0xe3, 0x80, 0x81, 0xe5, 0x9b, 0xa3, 0xe7, 0xb5, 0x90, 0xe3, 0x81, 0x9b, 0xe3, 0x82, 0x88, 0x21, 0x20, 0xd7, 0x92, 0xd7, 0x91, 0xd7, 0xa8, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa2, 0xd7, 0x95, 0xd7, 0x91, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa9, 0xd7, 0x9c, 0x20, 0xd7, 0x9b, 0xd7, 0x9c, 0x20, 0xd7, 0x94, 0xd7, 0x9e, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0xa0, 0xd7, 0x95, 0xd7, 0xaa, 0x2c, 0x20, 0xd7, 0x94, 0xd7, 0xaa, 0xd7, 0x90, 0xd7, 0x97, 0xd7, 0x93, 0xd7, 0x95, 0x21, ]), + }); + let out_rpc_msg: VPN.VpnRpcMsg = await api.SetHubMsg(in_rpc_msg); + console.log(out_rpc_msg); + console.log("End: Test_SetHubMsg"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetHubMsg', Get message of today on hub */ +async function Test_GetHubMsg(): Promise +{ + console.log("Begin: Test_GetHubMsg"); + let in_rpc_msg: VPN.VpnRpcMsg = new VPN.VpnRpcMsg( + { + HubName_str: hub_name, + }); + let out_rpc_msg: VPN.VpnRpcMsg = await api.GetHubMsg(in_rpc_msg); + console.log(out_rpc_msg); + console.log("End: Test_GetHubMsg"); + console.log("-----"); + console.log(); +} + +/** API test for 'Crash', Do Crash */ +async function Test_Crash(): Promise +{ + console.log("Begin: Test_Crash"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + }); + let out_rpc_test: VPN.VpnRpcTest = await api.Crash(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_Crash"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetAdminMsg', Get message for administrators */ +async function Test_GetAdminMsg(): Promise +{ + console.log("Begin: Test_GetAdminMsg"); + let out_rpc_msg: VPN.VpnRpcMsg = await api.GetAdminMsg(); + console.log(out_rpc_msg); + console.log("End: Test_GetAdminMsg"); + console.log("-----"); + console.log(); +} + +/** API test for 'Flush', Flush configuration file */ +async function Test_Flush(): Promise +{ + console.log("Begin: Test_Flush"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + }); + let out_rpc_test: VPN.VpnRpcTest = await api.Flush(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_Flush"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetIPsecServices', Set IPsec service configuration */ +async function Test_SetIPsecServices(): Promise +{ + console.log("Begin: Test_SetIPsecServices"); + let in_ipsec_services: VPN.VpnIPsecServices = new VPN.VpnIPsecServices( + { + L2TP_Raw_bool: false, + L2TP_IPsec_bool: false, + EtherIP_IPsec_bool: false, + IPsec_Secret_str: "vpn", + L2TP_DefaultHub_str: "HUB_ABC", + }); + let out_ipsec_services: VPN.VpnIPsecServices = await api.SetIPsecServices(in_ipsec_services); + console.log(out_ipsec_services); + console.log("End: Test_SetIPsecServices"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetIPsecServices', Get IPsec service configuration */ +async function Test_GetIPsecServices(): Promise +{ + console.log("Begin: Test_GetIPsecServices"); + let out_ipsec_services: VPN.VpnIPsecServices = await api.GetIPsecServices(); + console.log(out_ipsec_services); + console.log("End: Test_GetIPsecServices"); + console.log("-----"); + console.log(); +} + +/** API test for 'AddEtherIpId', Add EtherIP ID setting */ +async function Test_AddEtherIpId(): Promise +{ + console.log("Begin: Test_AddEtherIpId"); + let in_etherip_id: VPN.VpnEtherIpId = new VPN.VpnEtherIpId( + { + Id_str: "testid", + HubName_str: hub_name, + UserName_str: "nekosan", + Password_str: "torisan", + }); + let out_etherip_id: VPN.VpnEtherIpId = await api.AddEtherIpId(in_etherip_id); + console.log(out_etherip_id); + console.log("End: Test_AddEtherIpId"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetEtherIpId', Get EtherIP ID setting */ +async function Test_GetEtherIpId(id: string): Promise +{ + console.log("Begin: Test_GetEtherIpId"); + let in_etherip_id: VPN.VpnEtherIpId = new VPN.VpnEtherIpId( + { + Id_str: id, + }); + let out_etherip_id: VPN.VpnEtherIpId = await api.GetEtherIpId(in_etherip_id); + console.log(out_etherip_id); + console.log("End: Test_GetEtherIpId"); + console.log("-----"); + console.log(); +} + +/** API test for 'DeleteEtherIpId', Delete EtherIP ID setting */ +async function Test_DeleteEtherIpId(id: string): Promise +{ + console.log("Begin: Test_DeleteEtherIpId"); + let in_etherip_id: VPN.VpnEtherIpId = new VPN.VpnEtherIpId( + { + Id_str: id, + }); + let out_etherip_id: VPN.VpnEtherIpId = await api.DeleteEtherIpId(in_etherip_id); + console.log(out_etherip_id); + console.log("End: Test_DeleteEtherIpId"); + console.log("-----"); + console.log(); +} + +/** API test for 'EnumEtherIpId', Enumerate EtherIP ID settings */ +async function Test_EnumEtherIpId(): Promise +{ + console.log("Begin: Test_EnumEtherIpId"); + let out_rpc_enum_etherip_id: VPN.VpnRpcEnumEtherIpId = await api.EnumEtherIpId(); + console.log(out_rpc_enum_etherip_id); + console.log("End: Test_EnumEtherIpId"); + console.log("-----"); + console.log(); + return out_rpc_enum_etherip_id; +} + +/** API test for 'SetOpenVpnSstpConfig', Set configurations for OpenVPN and SSTP */ +async function Test_SetOpenVpnSstpConfig(): Promise +{ + console.log("Begin: Test_SetOpenVpnSstpConfig"); + let in_openvpn_sstp_config: VPN.VpnOpenVpnSstpConfig = new VPN.VpnOpenVpnSstpConfig( + { + EnableOpenVPN_bool: true, + OpenVPNPortList_str: "1 2 3 4 5", + EnableSSTP_bool: true, + }); + let out_openvpn_sstp_config: VPN.VpnOpenVpnSstpConfig = await api.SetOpenVpnSstpConfig(in_openvpn_sstp_config); + console.log(out_openvpn_sstp_config); + console.log("End: Test_SetOpenVpnSstpConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetOpenVpnSstpConfig', Get configurations for OpenVPN and SSTP */ +async function Test_GetOpenVpnSstpConfig(): Promise +{ + console.log("Begin: Test_GetOpenVpnSstpConfig"); + let out_openvpn_sstp_config: VPN.VpnOpenVpnSstpConfig = await api.GetOpenVpnSstpConfig(); + console.log(out_openvpn_sstp_config); + console.log("End: Test_GetOpenVpnSstpConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetDDnsClientStatus', Get status of DDNS client */ +async function Test_GetDDnsClientStatus(): Promise +{ + console.log("Begin: Test_GetDDnsClientStatus"); + let out_ddns_client_status: VPN.VpnDDnsClientStatus = await api.GetDDnsClientStatus(); + console.log(out_ddns_client_status); + console.log("End: Test_GetDDnsClientStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'ChangeDDnsClientHostname', Change host-name for DDNS client */ +async function Test_ChangeDDnsClientHostname(): Promise +{ + console.log("Begin: Test_ChangeDDnsClientHostname"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + StrValue_str: "nekotest" + Math.floor((Math.random() * (2100000000 - 1000000000)) + 1000000000), + }); + let out_rpc_test: VPN.VpnRpcTest = await api.ChangeDDnsClientHostname(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_ChangeDDnsClientHostname"); + console.log("-----"); + console.log(); +} + +/** API test for 'RegenerateServerCert', Regenerate server certification */ +async function Test_RegenerateServerCert(): Promise +{ + console.log("Begin: Test_RegenerateServerCert"); + let in_rpc_test: VPN.VpnRpcTest = new VPN.VpnRpcTest( + { + StrValue_str: "abc.example.org", + }); + let out_rpc_test: VPN.VpnRpcTest = await api.RegenerateServerCert(in_rpc_test); + console.log(out_rpc_test); + console.log("End: Test_RegenerateServerCert"); + console.log("-----"); + console.log(); +} + +/** API test for 'MakeOpenVpnConfigFile', Generate OpenVPN configuration files */ +async function Test_MakeOpenVpnConfigFile(): Promise +{ + console.log("Begin: Test_MakeOpenVpnConfigFile"); + let out_rpc_read_log_file: VPN.VpnRpcReadLogFile = await api.MakeOpenVpnConfigFile(); + console.log(out_rpc_read_log_file); + console.log("End: Test_MakeOpenVpnConfigFile"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetSpecialListener', Set special listener status */ +async function Test_SetSpecialListener(): Promise +{ + console.log("Begin: Test_SetSpecialListener"); + let in_rpc_special_listener: VPN.VpnRpcSpecialListener = new VPN.VpnRpcSpecialListener( + { + VpnOverDnsListener_bool: true, + VpnOverIcmpListener_bool: true, + }); + let out_rpc_special_listener: VPN.VpnRpcSpecialListener = await api.SetSpecialListener(in_rpc_special_listener); + console.log(out_rpc_special_listener); + console.log("End: Test_SetSpecialListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetSpecialListener', Get special listener status */ +async function Test_GetSpecialListener(): Promise +{ + console.log("Begin: Test_GetSpecialListener"); + let out_rpc_special_listener: VPN.VpnRpcSpecialListener = await api.GetSpecialListener(); + console.log(out_rpc_special_listener); + console.log("End: Test_GetSpecialListener"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetAzureStatus', Get Azure status */ +async function Test_GetAzureStatus(): Promise +{ + console.log("Begin: Test_GetAzureStatus"); + let out_rpc_azure_status: VPN.VpnRpcAzureStatus = await api.GetAzureStatus(); + console.log(out_rpc_azure_status); + console.log("End: Test_GetAzureStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetAzureStatus', Set Azure status */ +async function Test_SetAzureStatus(): Promise +{ + console.log("Begin: Test_SetAzureStatus"); + let in_rpc_azure_status: VPN.VpnRpcAzureStatus = new VPN.VpnRpcAzureStatus( + { + IsEnabled_bool: true, + }); + let out_rpc_azure_status: VPN.VpnRpcAzureStatus = await api.SetAzureStatus(in_rpc_azure_status); + console.log(out_rpc_azure_status); + console.log("End: Test_SetAzureStatus"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetDDnsInternetSettng', Get DDNS proxy configuration */ +async function Test_GetDDnsInternetSettng(): Promise +{ + console.log("Begin: Test_GetDDnsInternetSettng"); + let out_internet_setting: VPN.VpnInternetSetting = await api.GetDDnsInternetSettng(); + console.log(out_internet_setting); + console.log("End: Test_GetDDnsInternetSettng"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetDDnsInternetSettng', Set DDNS proxy configuration */ +async function Test_SetDDnsInternetSettng(): Promise +{ + console.log("Begin: Test_SetDDnsInternetSettng"); + let in_internet_setting: VPN.VpnInternetSetting = new VPN.VpnInternetSetting( + { + ProxyType_u32: VPN.VpnRpcProxyType.Direct, + ProxyHostName_str: "1.2.3.4", + ProxyPort_u32: 1234, + ProxyUsername_str: "neko", + ProxyPassword_str: "dog", + }); + let out_internet_setting: VPN.VpnInternetSetting = await api.SetDDnsInternetSettng(in_internet_setting); + console.log(out_internet_setting); + console.log("End: Test_SetDDnsInternetSettng"); + console.log("-----"); + console.log(); +} + +/** API test for 'SetVgsConfig', Setting VPN Gate Server Configuration */ +async function Test_SetVgsConfig(): Promise +{ + console.log("Begin: Test_SetVgsConfig"); + let in_vgs_config: VPN.VpnVgsConfig = new VPN.VpnVgsConfig( + { + IsEnabled_bool: false, + Message_utf: "Neko san!!!", + Owner_utf: "Go go go!!!", + Abuse_utf: "da.test@softether.co.jp", + NoLog_bool: false, + LogPermanent_bool: true, + EnableL2TP_bool: true, + }); + let out_vgs_config: VPN.VpnVgsConfig = await api.SetVgsConfig(in_vgs_config); + console.log(out_vgs_config); + console.log("End: Test_SetVgsConfig"); + console.log("-----"); + console.log(); +} + +/** API test for 'GetVgsConfig', Get VPN Gate configuration */ +async function Test_GetVgsConfig(): Promise +{ + console.log("Begin: Test_GetVgsConfig"); + let out_vgs_config: VPN.VpnVgsConfig = await api.GetVgsConfig(); + console.log(out_vgs_config); + console.log("End: Test_GetVgsConfig"); + console.log("-----"); + console.log(); +} + + + diff --git a/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/vpnrpc.ts b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/vpnrpc.ts new file mode 100644 index 00000000..1774bbd6 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/vpnrpc.ts @@ -0,0 +1,5167 @@ +// SoftEther VPN Server JSON-RPC Stub code for TypeScript +// +// vpnrpc.ts +// Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-2019 SoftEther VPN Project + + +// Trivial utility codes +let is_node_js = (typeof navigator === "undefined") || navigator.userAgent.indexOf("Node.js") !== -1 || navigator.userAgent.indexOf("jsdom") !== -1; +function is_null(obj: any) +{ + return (typeof obj === "undefined") || (obj === null); +} +let debug_mode: boolean = false; + +/** VPN Server RPC Stubs */ +export class VpnServerRpc +{ + /** Determine if this JavaScript environment is on the Node.js or not. */ + public static IsNodeJS(): boolean + { + return is_node_js; + } + + /** Set the debug mode flag */ + public static SetDebugMode(flag: boolean): void + { + debug_mode = flag; + } + + private rpc_url: string; + private rpc_client: JsonRpcClient; + + /** + * Constructor of the VpnServerRpc class + * @param vpnserver_hostname The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param vpnserver_port The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param hubname The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + * @param password Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + * @param nodejs_https_client_reject_untrusted_server_cert In Node.js set this true to check the SSL server certificate on the destination VPN Server. Set this false to ignore the SSL server certification. + */ + constructor(vpnserver_hostname?: string, vpnserver_port?: number, hubname?: string, password?: string, nodejs_https_client_reject_untrusted_server_cert?: boolean) + { + let headers: { [name: string]: string } = {}; + let send_credentials: boolean = false; + + nodejs_https_client_reject_untrusted_server_cert = is_null(nodejs_https_client_reject_untrusted_server_cert) ? false : nodejs_https_client_reject_untrusted_server_cert!; + + if (is_null(vpnserver_hostname)) + { + this.rpc_url = "/api/"; + send_credentials = true; + } + else + { + if (is_null(vpnserver_port)) vpnserver_port = 443; + this.rpc_url = `https://${vpnserver_hostname}:${vpnserver_port}/api/`; + + + headers["X-VPNADMIN-HUBNAME"] = is_null(hubname) ? "" : hubname!; + headers["X-VPNADMIN-PASSWORD"] = is_null(password) ? "" : password!; + } + + if (is_null(nodejs_https_client_reject_untrusted_server_cert)) nodejs_https_client_reject_untrusted_server_cert = false; + + this.rpc_client = new JsonRpcClient(this.rpc_url, headers, send_credentials, nodejs_https_client_reject_untrusted_server_cert); + } + + // --- Stubs --- + /** Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. */ + public Test = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("Test", in_param); + } + + /** Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. */ + public GetServerInfo = (): Promise => + { + return this.CallAsync("GetServerInfo", new VpnRpcServerInfo()); + } + + /** Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. */ + public GetServerStatus = (): Promise => + { + return this.CallAsync("GetServerStatus", new VpnRpcServerStatus()); + } + + /** Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. */ + public CreateListener = (in_param: VpnRpcListener): Promise => + { + return this.CallAsync("CreateListener", in_param); + } + + /** Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. */ + public EnumListener = (): Promise => + { + return this.CallAsync("EnumListener", new VpnRpcListenerList()); + } + + /** Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + public DeleteListener = (in_param: VpnRpcListener): Promise => + { + return this.CallAsync("DeleteListener", in_param); + } + + /** Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. */ + public EnableListener = (in_param: VpnRpcListener): Promise => + { + return this.CallAsync("EnableListener", in_param); + } + + /** Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. */ + public SetServerPassword = (in_param: VpnRpcSetPassword): Promise => + { + return this.CallAsync("SetServerPassword", in_param); + } + + /** Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. */ + public SetFarmSetting = (in_param: VpnRpcFarm): Promise => + { + return this.CallAsync("SetFarmSetting", in_param); + } + + /** Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. */ + public GetFarmSetting = (): Promise => + { + return this.CallAsync("GetFarmSetting", new VpnRpcFarm()); + } + + /** Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. */ + public GetFarmInfo = (in_param: VpnRpcFarmInfo): Promise => + { + return this.CallAsync("GetFarmInfo", in_param); + } + + /** Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. */ + public EnumFarmMember = (): Promise => + { + return this.CallAsync("EnumFarmMember", new VpnRpcEnumFarm()); + } + + /** Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. */ + public GetFarmConnectionStatus = (): Promise => + { + return this.CallAsync("GetFarmConnectionStatus", new VpnRpcFarmConnectionStatus()); + } + + /** Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. */ + public SetServerCert = (in_param: VpnRpcKeyPair): Promise => + { + return this.CallAsync("SetServerCert", in_param); + } + + /** Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. */ + public GetServerCert = (): Promise => + { + return this.CallAsync("GetServerCert", new VpnRpcKeyPair()); + } + + /** Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. */ + public GetServerCipher = (): Promise => + { + return this.CallAsync("GetServerCipher", new VpnRpcStr()); + } + + /** Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. */ + public SetServerCipher = (in_param: VpnRpcStr): Promise => + { + return this.CallAsync("SetServerCipher", in_param); + } + + /** Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + public CreateHub = (in_param: VpnRpcCreateHub): Promise => + { + return this.CallAsync("CreateHub", in_param); + } + + /** Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. */ + public SetHub = (in_param: VpnRpcCreateHub): Promise => + { + return this.CallAsync("SetHub", in_param); + } + + /** Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. */ + public GetHub = (in_param: VpnRpcCreateHub): Promise => + { + return this.CallAsync("GetHub", in_param); + } + + /** Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. */ + public EnumHub = (): Promise => + { + return this.CallAsync("EnumHub", new VpnRpcEnumHub()); + } + + /** Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. */ + public DeleteHub = (in_param: VpnRpcDeleteHub): Promise => + { + return this.CallAsync("DeleteHub", in_param); + } + + /** Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetHubRadius = (in_param: VpnRpcRadius): Promise => + { + return this.CallAsync("GetHubRadius", in_param); + } + + /** Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetHubRadius = (in_param: VpnRpcRadius): Promise => + { + return this.CallAsync("SetHubRadius", in_param); + } + + /** Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. */ + public EnumConnection = (): Promise => + { + return this.CallAsync("EnumConnection", new VpnRpcEnumConnection()); + } + + /** Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. */ + public DisconnectConnection = (in_param: VpnRpcDisconnectConnection): Promise => + { + return this.CallAsync("DisconnectConnection", in_param); + } + + /** Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. */ + public GetConnectionInfo = (in_param: VpnRpcConnectionInfo): Promise => + { + return this.CallAsync("GetConnectionInfo", in_param); + } + + /** Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetHubOnline = (in_param: VpnRpcSetHubOnline): Promise => + { + return this.CallAsync("SetHubOnline", in_param); + } + + /** Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. */ + public GetHubStatus = (in_param: VpnRpcHubStatus): Promise => + { + return this.CallAsync("GetHubStatus", in_param); + } + + /** Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. */ + public SetHubLog = (in_param: VpnRpcHubLog): Promise => + { + return this.CallAsync("SetHubLog", in_param); + } + + /** Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. */ + public GetHubLog = (in_param: VpnRpcHubLog): Promise => + { + return this.CallAsync("GetHubLog", in_param); + } + + /** Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public AddCa = (in_param: VpnRpcHubAddCA): Promise => + { + return this.CallAsync("AddCa", in_param); + } + + /** Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumCa = (in_param: VpnRpcHubEnumCA): Promise => + { + return this.CallAsync("EnumCa", in_param); + } + + /** Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public GetCa = (in_param: VpnRpcHubGetCA): Promise => + { + return this.CallAsync("GetCa", in_param); + } + + /** Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteCa = (in_param: VpnRpcHubDeleteCA): Promise => + { + return this.CallAsync("DeleteCa", in_param); + } + + /** Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public CreateLink = (in_param: VpnRpcCreateLink): Promise => + { + return this.CallAsync("CreateLink", in_param); + } + + /** Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetLink = (in_param: VpnRpcCreateLink): Promise => + { + return this.CallAsync("GetLink", in_param); + } + + /** Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. */ + public SetLink = (in_param: VpnRpcCreateLink): Promise => + { + return this.CallAsync("SetLink", in_param); + } + + /** Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumLink = (in_param: VpnRpcEnumLink): Promise => + { + return this.CallAsync("EnumLink", in_param); + } + + /** Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetLinkOnline = (in_param: VpnRpcLink): Promise => + { + return this.CallAsync("SetLinkOnline", in_param); + } + + /** Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetLinkOffline = (in_param: VpnRpcLink): Promise => + { + return this.CallAsync("SetLinkOffline", in_param); + } + + /** Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DeleteLink = (in_param: VpnRpcLink): Promise => + { + return this.CallAsync("DeleteLink", in_param); + } + + /** Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public RenameLink = (in_param: VpnRpcRenameLink): Promise => + { + return this.CallAsync("RenameLink", in_param); + } + + /** Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetLinkStatus = (in_param: VpnRpcLinkStatus): Promise => + { + return this.CallAsync("GetLinkStatus", in_param); + } + + /** Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public AddAccess = (in_param: VpnRpcAddAccess): Promise => + { + return this.CallAsync("AddAccess", in_param); + } + + /** Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteAccess = (in_param: VpnRpcDeleteAccess): Promise => + { + return this.CallAsync("DeleteAccess", in_param); + } + + /** Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumAccess = (in_param: VpnRpcEnumAccessList): Promise => + { + return this.CallAsync("EnumAccess", in_param); + } + + /** Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. */ + public SetAccessList = (in_param: VpnRpcEnumAccessList): Promise => + { + return this.CallAsync("SetAccessList", in_param); + } + + /** Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public CreateUser = (in_param: VpnRpcSetUser): Promise => + { + return this.CallAsync("CreateUser", in_param); + } + + /** Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public SetUser = (in_param: VpnRpcSetUser): Promise => + { + return this.CallAsync("SetUser", in_param); + } + + /** Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public GetUser = (in_param: VpnRpcSetUser): Promise => + { + return this.CallAsync("GetUser", in_param); + } + + /** Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteUser = (in_param: VpnRpcDeleteUser): Promise => + { + return this.CallAsync("DeleteUser", in_param); + } + + /** Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumUser = (in_param: VpnRpcEnumUser): Promise => + { + return this.CallAsync("EnumUser", in_param); + } + + /** Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public CreateGroup = (in_param: VpnRpcSetGroup): Promise => + { + return this.CallAsync("CreateGroup", in_param); + } + + /** Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public SetGroup = (in_param: VpnRpcSetGroup): Promise => + { + return this.CallAsync("SetGroup", in_param); + } + + /** Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public GetGroup = (in_param: VpnRpcSetGroup): Promise => + { + return this.CallAsync("GetGroup", in_param); + } + + /** Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public DeleteGroup = (in_param: VpnRpcDeleteUser): Promise => + { + return this.CallAsync("DeleteGroup", in_param); + } + + /** Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. */ + public EnumGroup = (in_param: VpnRpcEnumGroup): Promise => + { + return this.CallAsync("EnumGroup", in_param); + } + + /** Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. */ + public EnumSession = (in_param: VpnRpcEnumSession): Promise => + { + return this.CallAsync("EnumSession", in_param); + } + + /** Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. */ + public GetSessionStatus = (in_param: VpnRpcSessionStatus): Promise => + { + return this.CallAsync("GetSessionStatus", in_param); + } + + /** Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. */ + public DeleteSession = (in_param: VpnRpcDeleteSession): Promise => + { + return this.CallAsync("DeleteSession", in_param); + } + + /** Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. */ + public EnumMacTable = (in_param: VpnRpcEnumMacTable): Promise => + { + return this.CallAsync("EnumMacTable", in_param); + } + + /** Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. */ + public DeleteMacTable = (in_param: VpnRpcDeleteTable): Promise => + { + return this.CallAsync("DeleteMacTable", in_param); + } + + /** Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. */ + public EnumIpTable = (in_param: VpnRpcEnumIpTable): Promise => + { + return this.CallAsync("EnumIpTable", in_param); + } + + /** Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. */ + public DeleteIpTable = (in_param: VpnRpcDeleteTable): Promise => + { + return this.CallAsync("DeleteIpTable", in_param); + } + + /** Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. */ + public SetKeep = (in_param: VpnRpcKeep): Promise => + { + return this.CallAsync("SetKeep", in_param); + } + + /** Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. */ + public GetKeep = (in_param: VpnRpcKeep): Promise => + { + return this.CallAsync("GetKeep", in_param); + } + + /** Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnableSecureNAT = (in_param: VpnRpcHub): Promise => + { + return this.CallAsync("EnableSecureNAT", in_param); + } + + /** Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DisableSecureNAT = (in_param: VpnRpcHub): Promise => + { + return this.CallAsync("DisableSecureNAT", in_param); + } + + /** Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetSecureNATOption = (in_param: VpnVhOption): Promise => + { + return this.CallAsync("SetSecureNATOption", in_param); + } + + /** Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. */ + public GetSecureNATOption = (in_param: VpnVhOption): Promise => + { + return this.CallAsync("GetSecureNATOption", in_param); + } + + /** Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumNAT = (in_param: VpnRpcEnumNat): Promise => + { + return this.CallAsync("EnumNAT", in_param); + } + + /** Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumDHCP = (in_param: VpnRpcEnumDhcp): Promise => + { + return this.CallAsync("EnumDHCP", in_param); + } + + /** Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetSecureNATStatus = (in_param: VpnRpcNatStatus): Promise => + { + return this.CallAsync("GetSecureNATStatus", in_param); + } + + /** Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + public EnumEthernet = (): Promise => + { + return this.CallAsync("EnumEthernet", new VpnRpcEnumEth()); + } + + /** Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. */ + public AddLocalBridge = (in_param: VpnRpcLocalBridge): Promise => + { + return this.CallAsync("AddLocalBridge", in_param); + } + + /** Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. */ + public DeleteLocalBridge = (in_param: VpnRpcLocalBridge): Promise => + { + return this.CallAsync("DeleteLocalBridge", in_param); + } + + /** Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. */ + public EnumLocalBridge = (): Promise => + { + return this.CallAsync("EnumLocalBridge", new VpnRpcEnumLocalBridge()); + } + + /** Get whether the localbridge function is supported on the current system. */ + public GetBridgeSupport = (): Promise => + { + return this.CallAsync("GetBridgeSupport", new VpnRpcBridgeSupport()); + } + + /** Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. */ + public RebootServer = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("RebootServer", in_param); + } + + /** Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. */ + public GetCaps = (): Promise => + { + return this.CallAsync("GetCaps", new VpnCapslist()); + } + + /** Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. */ + public GetConfig = (): Promise => + { + return this.CallAsync("GetConfig", new VpnRpcConfig()); + } + + /** Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. */ + public SetConfig = (in_param: VpnRpcConfig): Promise => + { + return this.CallAsync("SetConfig", in_param); + } + + /** Get Virtual Hub Administration Option default values. */ + public GetDefaultHubAdminOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("GetDefaultHubAdminOptions", in_param); + } + + /** Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public GetHubAdminOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("GetHubAdminOptions", in_param); + } + + /** Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public SetHubAdminOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("SetHubAdminOptions", in_param); + } + + /** Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public GetHubExtOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("GetHubExtOptions", in_param); + } + + /** Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. */ + public SetHubExtOptions = (in_param: VpnRpcAdminOption): Promise => + { + return this.CallAsync("SetHubExtOptions", in_param); + } + + /** Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + public AddL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("AddL3Switch", in_param); + } + + /** Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + public DelL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("DelL3Switch", in_param); + } + + /** Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + public EnumL3Switch = (): Promise => + { + return this.CallAsync("EnumL3Switch", new VpnRpcEnumL3Sw()); + } + + /** Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. */ + public StartL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("StartL3Switch", in_param); + } + + /** Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. */ + public StopL3Switch = (in_param: VpnRpcL3Sw): Promise => + { + return this.CallAsync("StopL3Switch", in_param); + } + + /** Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public AddL3If = (in_param: VpnRpcL3If): Promise => + { + return this.CallAsync("AddL3If", in_param); + } + + /** Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public DelL3If = (in_param: VpnRpcL3If): Promise => + { + return this.CallAsync("DelL3If", in_param); + } + + /** Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + public EnumL3If = (in_param: VpnRpcEnumL3If): Promise => + { + return this.CallAsync("EnumL3If", in_param); + } + + /** Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public AddL3Table = (in_param: VpnRpcL3Table): Promise => + { + return this.CallAsync("AddL3Table", in_param); + } + + /** Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. */ + public DelL3Table = (in_param: VpnRpcL3Table): Promise => + { + return this.CallAsync("DelL3Table", in_param); + } + + /** Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. */ + public EnumL3Table = (in_param: VpnRpcEnumL3Table): Promise => + { + return this.CallAsync("EnumL3Table", in_param); + } + + /** Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumCrl = (in_param: VpnRpcEnumCrl): Promise => + { + return this.CallAsync("EnumCrl", in_param); + } + + /** Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public AddCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("AddCrl", in_param); + } + + /** Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DelCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("DelCrl", in_param); + } + + /** Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("GetCrl", in_param); + } + + /** Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetCrl = (in_param: VpnRpcCrl): Promise => + { + return this.CallAsync("SetCrl", in_param); + } + + /** Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetAcList = (in_param: VpnRpcAcList): Promise => + { + return this.CallAsync("SetAcList", in_param); + } + + /** Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetAcList = (in_param: VpnRpcAcList): Promise => + { + return this.CallAsync("GetAcList", in_param); + } + + /** Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + public EnumLogFile = (): Promise => + { + return this.CallAsync("EnumLogFile", new VpnRpcEnumLogFile()); + } + + /** Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. */ + public ReadLogFile = (in_param: VpnRpcReadLogFile): Promise => + { + return this.CallAsync("ReadLogFile", in_param); + } + + /** Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use. */ + public SetSysLog = (in_param: VpnSyslogSetting): Promise => + { + return this.CallAsync("SetSysLog", in_param); + } + + /** Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. */ + public GetSysLog = (in_param: VpnSyslogSetting): Promise => + { + return this.CallAsync("GetSysLog", in_param); + } + + /** Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + public SetHubMsg = (in_param: VpnRpcMsg): Promise => + { + return this.CallAsync("SetHubMsg", in_param); + } + + /** Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. */ + public GetHubMsg = (in_param: VpnRpcMsg): Promise => + { + return this.CallAsync("GetHubMsg", in_param); + } + + /** Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + public Crash = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("Crash", in_param); + } + + /** Get the message for administrators. */ + public GetAdminMsg = (): Promise => + { + return this.CallAsync("GetAdminMsg", new VpnRpcMsg()); + } + + /** Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. */ + public Flush = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("Flush", in_param); + } + + /** Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetIPsecServices = (in_param: VpnIPsecServices): Promise => + { + return this.CallAsync("SetIPsecServices", in_param); + } + + /** Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetIPsecServices = (): Promise => + { + return this.CallAsync("GetIPsecServices", new VpnIPsecServices()); + } + + /** Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public AddEtherIpId = (in_param: VpnEtherIpId): Promise => + { + return this.CallAsync("AddEtherIpId", in_param); + } + + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetEtherIpId = (in_param: VpnEtherIpId): Promise => + { + return this.CallAsync("GetEtherIpId", in_param); + } + + /** Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public DeleteEtherIpId = (in_param: VpnEtherIpId): Promise => + { + return this.CallAsync("DeleteEtherIpId", in_param); + } + + /** Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public EnumEtherIpId = (): Promise => + { + return this.CallAsync("EnumEtherIpId", new VpnRpcEnumEtherIpId()); + } + + /** Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetOpenVpnSstpConfig = (in_param: VpnOpenVpnSstpConfig): Promise => + { + return this.CallAsync("SetOpenVpnSstpConfig", in_param); + } + + /** Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetOpenVpnSstpConfig = (): Promise => + { + return this.CallAsync("GetOpenVpnSstpConfig", new VpnOpenVpnSstpConfig()); + } + + /** Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public GetDDnsClientStatus = (): Promise => + { + return this.CallAsync("GetDDnsClientStatus", new VpnDDnsClientStatus()); + } + + /** Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public ChangeDDnsClientHostname = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("ChangeDDnsClientHostname", in_param); + } + + /** Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public RegenerateServerCert = (in_param: VpnRpcTest): Promise => + { + return this.CallAsync("RegenerateServerCert", in_param); + } + + /** Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public MakeOpenVpnConfigFile = (): Promise => + { + return this.CallAsync("MakeOpenVpnConfigFile", new VpnRpcReadLogFile()); + } + + /** Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public SetSpecialListener = (in_param: VpnRpcSpecialListener): Promise => + { + return this.CallAsync("SetSpecialListener", in_param); + } + + /** Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. */ + public GetSpecialListener = (): Promise => + { + return this.CallAsync("GetSpecialListener", new VpnRpcSpecialListener()); + } + + /** Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public GetAzureStatus = (): Promise => + { + return this.CallAsync("GetAzureStatus", new VpnRpcAzureStatus()); + } + + /** Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. */ + public SetAzureStatus = (in_param: VpnRpcAzureStatus): Promise => + { + return this.CallAsync("SetAzureStatus", in_param); + } + + /** Get the Proxy Settings for Connecting to the DDNS server. */ + public GetDDnsInternetSettng = (): Promise => + { + return this.CallAsync("GetDDnsInternetSettng", new VpnInternetSetting()); + } + + /** Set the Proxy Settings for Connecting to the DDNS server. */ + public SetDDnsInternetSettng = (in_param: VpnInternetSetting): Promise => + { + return this.CallAsync("SetDDnsInternetSettng", in_param); + } + + /** Set the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + public SetVgsConfig = (in_param: VpnVgsConfig): Promise => + { + return this.CallAsync("SetVgsConfig", in_param); + } + + /** Get the VPN Gate Server Configuration. This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. */ + public GetVgsConfig = (): Promise => + { + return this.CallAsync("GetVgsConfig", new VpnVgsConfig()); + } + + + + // -- Utility functions -- + /** Call a RPC procedure */ + public async CallAsync(method_name: string, request: T): Promise + { + let response: T = await this.rpc_client.CallAsync(method_name, request); + + return response; + } +} + + + + +// --- Types --- +/** IP Protocol Numbers */ +export enum VpnIpProtocolNumber +{ + /** ICMP for IPv4 */ + ICMPv4 = 1, + + /** TCP */ + TCP = 6, + + /** UDP */ + UDP = 17, + + /** ICMP for IPv6 */ + ICMPv6 = 58, + +} + +/** The body of the Access list */ +export class VpnAccess +{ + /** ID */ + public Id_u32: number = 0; + + /** Specify a description (note) for this rule */ + public Note_utf: string = ""; + + /** Enabled flag (true: enabled, false: disabled) */ + public Active_bool: boolean = false; + + /** Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. */ + public Priority_u32: number = 0; + + /** The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. */ + public Discard_bool: boolean = false; + + /** The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. */ + public IsIPv6_bool: boolean = false; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. */ + public SrcIpAddress_ip: string = ""; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + public SrcSubnetMask_ip: string = ""; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. */ + public DestIpAddress_ip: string = ""; + + /** Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. */ + public DestSubnetMask_ip: string = ""; + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. */ + public SrcIpAddress6_bin: Uint8Array = new Uint8Array([]); + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + public SrcSubnetMask6_bin: Uint8Array = new Uint8Array([]); + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. */ + public DestIpAddress6_bin: Uint8Array = new Uint8Array([]); + + /** Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. */ + public DestSubnetMask6_bin: Uint8Array = new Uint8Array([]); + + /** The IP protocol number */ + public Protocol_u32: VpnIpProtocolNumber = 0; + + /** The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public SrcPortStart_u32: number = 0; + + /** The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public SrcPortEnd_u32: number = 0; + + /** The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public DestPortStart_u32: number = 0; + + /** The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. */ + public DestPortEnd_u32: number = 0; + + /** Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + public SrcUsername_str: string = ""; + + /** Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. */ + public DestUsername_str: string = ""; + + /** Specify true if you want to check the source MAC address. */ + public CheckSrcMac_bool: boolean = false; + + /** Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + public SrcMacAddress_bin: Uint8Array = new Uint8Array([]); + + /** Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + public SrcMacMask_bin: Uint8Array = new Uint8Array([]); + + /** Specify true if you want to check the destination MAC address. */ + public CheckDstMac_bool: boolean = false; + + /** Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. */ + public DstMacAddress_bin: Uint8Array = new Uint8Array([]); + + /** Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. */ + public DstMacMask_bin: Uint8Array = new Uint8Array([]); + + /** Specify true if you want to check the state of the TCP connection. */ + public CheckTcpState_bool: boolean = false; + + /** Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. */ + public Established_bool: boolean = false; + + /** Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. */ + public Delay_u32: number = 0; + + /** Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. */ + public Jitter_u32: number = 0; + + /** Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. */ + public Loss_u32: number = 0; + + /** The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. */ + public RedirectUrl_str: string = ""; + + /** Constructor for the 'VpnAccess' class: The body of the Access list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Add an item to Access List */ +export class VpnRpcAddAccess +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Access list (Must be a single item) */ + public AccessListSingle: VpnAccess[] = []; + + /** Constructor for the 'VpnRpcAddAccess' class: Add an item to Access List */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Add CA to HUB */ +export class VpnRpcHubAddCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The body of the X.509 certificate */ + public Cert_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcHubAddCA' class: Add CA to HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** CRL entry */ +export class VpnRpcCrl +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Key ID */ + public Key_u32: number = 0; + + /** CN, optional */ + public CommonName_utf: string = ""; + + /** O, optional */ + public Organization_utf: string = ""; + + /** OU, optional */ + public Unit_utf: string = ""; + + /** C, optional */ + public Country_utf: string = ""; + + /** ST, optional */ + public State_utf: string = ""; + + /** L, optional */ + public Local_utf: string = ""; + + /** Serial, optional */ + public Serial_bin: Uint8Array = new Uint8Array([]); + + /** MD5 Digest, optional */ + public DigestMD5_bin: Uint8Array = new Uint8Array([]); + + /** SHA1 Digest, optional */ + public DigestSHA1_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcCrl' class: CRL entry */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** EtherIP key list entry */ +export class VpnEtherIpId +{ + /** Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. */ + public Id_str: string = ""; + + /** Specify the name of the Virtual Hub to connect. */ + public HubName_str: string = ""; + + /** Specify the username to login to the destination Virtual Hub. */ + public UserName_str: string = ""; + + /** Specify the password to login to the destination Virtual Hub. */ + public Password_str: string = ""; + + /** Constructor for the 'VpnEtherIpId' class: EtherIP key list entry */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 virtual interface */ +export class VpnRpcL3If +{ + /** L3 switch name */ + public Name_str: string = ""; + + /** Virtual HUB name */ + public HubName_str: string = ""; + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Subnet mask */ + public SubnetMask_ip: string = ""; + + /** Constructor for the 'VpnRpcL3If' class: Layer-3 virtual interface */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 switch */ +export class VpnRpcL3Sw +{ + /** Layer-3 Switch name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcL3Sw' class: Layer-3 switch */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Routing table */ +export class VpnRpcL3Table +{ + /** L3 switch name */ + public Name_str: string = ""; + + /** Network address */ + public NetworkAddress_ip: string = ""; + + /** Subnet mask */ + public SubnetMask_ip: string = ""; + + /** Gateway address */ + public GatewayAddress_ip: string = ""; + + /** Metric */ + public Metric_u32: number = 0; + + /** Constructor for the 'VpnRpcL3Table' class: Routing table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Generic parameter to contain u32, u64, ascii_string and unicode string */ +export class VpnRpcTest +{ + /** A 32-bit integer field */ + public IntValue_u32: number = 0; + + /** A 64-bit integer field */ + public Int64Value_u64: number = 0; + + /** An Ascii string field */ + public StrValue_str: string = ""; + + /** An UTF-8 string field */ + public UniStrValue_utf: string = ""; + + /** Constructor for the 'VpnRpcTest' class: Generic parameter to contain u32, u64, ascii_string and unicode string */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Local Bridge list item */ +export class VpnRpcLocalBridge +{ + /** Physical Ethernet device name */ + public DeviceName_str: string = ""; + + /** The Virtual Hub name */ + public HubNameLB_str: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** Running flag */ + public Active_bool: boolean = false; + + /** Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). */ + public TapMode_bool: boolean = false; + + /** Constructor for the 'VpnRpcLocalBridge' class: Local Bridge list item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Create, configure, and get the group */ +export class VpnRpcSetGroup +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The group name */ + public Name_str: string = ""; + + /** Optional real name (full name) of the group, allow using any Unicode characters */ + public Realname_utf: string = ""; + + /** Optional, specify a description of the group */ + public Note_utf: string = ""; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** The flag whether to use security policy */ + public UsePolicy_bool: boolean = false; + + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + public ["policy:Access_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPFilter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + public ["policy:DHCPNoServer_bool"]: boolean = false; + + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + public ["policy:DHCPForce_bool"]: boolean = false; + + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + public ["policy:NoBridge_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRouting_bool"]: boolean = false; + + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckMac_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIP_bool"]: boolean = false; + + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + public ["policy:ArpDhcpOnly_bool"]: boolean = false; + + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + public ["policy:PrivacyFilter_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + public ["policy:NoServer_bool"]: boolean = false; + + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + public ["policy:NoBroadcastLimiter_bool"]: boolean = false; + + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + public ["policy:MonitorPort_bool"]: boolean = false; + + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + public ["policy:MaxConnection_u32"]: number = 0; + + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + public ["policy:TimeOut_u32"]: number = 0; + + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + public ["policy:MaxMac_u32"]: number = 0; + + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + public ["policy:MaxIP_u32"]: number = 0; + + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + public ["policy:MaxUpload_u32"]: number = 0; + + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + public ["policy:MaxDownload_u32"]: number = 0; + + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + public ["policy:FixPassword_bool"]: boolean = false; + + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + public ["policy:MultiLogins_u32"]: number = 0; + + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + public ["policy:NoQoS_bool"]: boolean = false; + + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + public ["policy:RSandRAFilter_bool"]: boolean = false; + + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + public ["policy:RAFilter_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPv6Filter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + public ["policy:DHCPv6NoServer_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRoutingV6_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIPv6_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + public ["policy:NoServerV6_bool"]: boolean = false; + + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + public ["policy:MaxIPv6_u32"]: number = 0; + + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:NoSavePassword_bool"]: boolean = false; + + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:AutoDisconnect_u32"]: number = 0; + + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv4_bool"]: boolean = false; + + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv6_bool"]: boolean = false; + + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + public ["policy:FilterNonIP_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: boolean = false; + + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + public ["policy:VLanId_u32"]: number = 0; + + /** Security policy: Whether version 3.0 (must be true) */ + public ["policy:Ver3_bool"]: boolean = false; + + /** Constructor for the 'VpnRpcSetGroup' class: Create, configure, and get the group */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Hub types */ +export enum VpnRpcHubType +{ + /** Stand-alone HUB */ + Standalone = 0, + + /** Static HUB */ + FarmStatic = 1, + + /** Dynamic HUB */ + FarmDynamic = 2, + +} + +/** Create a HUB */ +export class VpnRpcCreateHub +{ + /** Specify the name of the Virtual Hub to create / update. */ + public HubName_str: string = ""; + + /** Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. */ + public AdminPasswordPlainText_str: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** Maximum number of VPN sessions */ + public MaxSession_u32: number = 0; + + /** No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. */ + public NoEnum_bool: boolean = false; + + /** Type of the Virtual Hub (Valid only for Clustered VPN Servers) */ + public HubType_u32: VpnRpcHubType = 0; + + /** Constructor for the 'VpnRpcCreateHub' class: Create a HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +export enum VpnRpcClientAuthType +{ + /** Anonymous authentication */ + Anonymous = 0, + + /** SHA-0 hashed password authentication */ + SHA0_Hashed_Password = 1, + + /** Plain password authentication */ + PlainPassword = 2, + + /** Certificate authentication */ + Cert = 3, + +} + +/** Create and set of link */ +export class VpnRpcCreateLink +{ + /** The Virtual Hub name */ + public HubName_Ex_str: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** The flag to enable validation for the server certificate */ + public CheckServerCert_bool: boolean = false; + + /** The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. */ + public ServerCert_bin: Uint8Array = new Uint8Array([]); + + /** Client Option Parameters: Specify the name of the Cascade Connection */ + public AccountName_utf: string = ""; + + /** Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. */ + public Hostname_str: string = ""; + + /** Client Option Parameters: Specify the port number of the destination VPN Server. */ + public Port_u32: number = 0; + + /** Client Option Parameters: The type of the proxy server */ + public ProxyType_u32: VpnRpcProxyType = 0; + + /** Client Option Parameters: The hostname or IP address of the proxy server name */ + public ProxyName_str: string = ""; + + /** Client Option Parameters: The port number of the proxy server */ + public ProxyPort_u32: number = 0; + + /** Client Option Parameters: The username to connect to the proxy server */ + public ProxyUsername_str: string = ""; + + /** Client Option Parameters: The password to connect to the proxy server */ + public ProxyPassword_str: string = ""; + + /** Client Option Parameters: The Virtual Hub on the destination VPN Server */ + public HubName_str: string = ""; + + /** Client Option Parameters: Number of TCP Connections to Use in VPN Communication */ + public MaxConnection_u32: number = 0; + + /** Client Option Parameters: The flag to enable the encryption on the communication */ + public UseEncrypt_bool: boolean = false; + + /** Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection */ + public UseCompress_bool: boolean = false; + + /** Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. */ + public HalfConnection_bool: boolean = false; + + /** Client Option Parameters: Connection attempt interval when additional connection will be established */ + public AdditionalConnectionInterval_u32: number = 0; + + /** Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) */ + public ConnectionDisconnectSpan_u32: number = 0; + + /** Client Option Parameters: Disable QoS Control Function if the value is true */ + public DisableQoS_bool: boolean = false; + + /** Client Option Parameters: Do not use TLS 1.x of the value is true */ + public NoTls1_bool: boolean = false; + + /** Client Option Parameters: Do not use UDP acceleration mode if the value is true */ + public NoUdpAcceleration_bool: boolean = false; + + /** Authentication type */ + public AuthType_u32: VpnRpcClientAuthType = 0; + + /** User name */ + public Username_str: string = ""; + + /** SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). */ + public HashedPassword_bin: Uint8Array = new Uint8Array([]); + + /** Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). */ + public PlainPassword_str: string = ""; + + /** Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + public ClientX_bin: Uint8Array = new Uint8Array([]); + + /** Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). */ + public ClientK_bin: Uint8Array = new Uint8Array([]); + + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPFilter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + public ["policy:DHCPNoServer_bool"]: boolean = false; + + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + public ["policy:DHCPForce_bool"]: boolean = false; + + /** Security policy: Prohibit the duplicate MAC address */ + public SecPol_CheckMac_bool: boolean = false; + + /** Security policy: Prohibit a duplicate IP address (IPv4) */ + public SecPol_CheckIP_bool: boolean = false; + + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + public ["policy:ArpDhcpOnly_bool"]: boolean = false; + + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + public ["policy:PrivacyFilter_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + public ["policy:NoServer_bool"]: boolean = false; + + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + public ["policy:NoBroadcastLimiter_bool"]: boolean = false; + + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + public ["policy:MaxMac_u32"]: number = 0; + + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + public ["policy:MaxIP_u32"]: number = 0; + + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + public ["policy:MaxUpload_u32"]: number = 0; + + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + public ["policy:MaxDownload_u32"]: number = 0; + + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + public ["policy:RSandRAFilter_bool"]: boolean = false; + + /** Security policy: Filter the router advertisement packet (IPv6) */ + public SecPol_RAFilter_bool: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPv6Filter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + public ["policy:DHCPv6NoServer_bool"]: boolean = false; + + /** Security policy: Prohibit the duplicate IP address (IPv6) */ + public SecPol_CheckIPv6_bool: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + public ["policy:NoServerV6_bool"]: boolean = false; + + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + public ["policy:MaxIPv6_u32"]: number = 0; + + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv4_bool"]: boolean = false; + + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv6_bool"]: boolean = false; + + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + public ["policy:FilterNonIP_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean = false; + + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + public ["policy:VLanId_u32"]: number = 0; + + /** Security policy: Whether version 3.0 (must be true) */ + public ["policy:Ver3_bool"]: boolean = false; + + /** Constructor for the 'VpnRpcCreateLink' class: Create and set of link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Listener */ +export class VpnRpcListener +{ + /** Port number (Range: 1 - 65535) */ + public Port_u32: number = 0; + + /** Active state */ + public Enable_bool: boolean = false; + + /** Constructor for the 'VpnRpcListener' class: Listener */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** User authentication type (server side) */ +export enum VpnRpcUserAuthType +{ + /** Anonymous authentication */ + Anonymous = 0, + + /** Password authentication */ + Password = 1, + + /** User certificate authentication */ + UserCert = 2, + + /** Root certificate which is issued by trusted Certificate Authority */ + RootCert = 3, + + /** Radius authentication */ + Radius = 4, + + /** Windows NT authentication */ + NTDomain = 5, + +} + +/** Create, configure, and get the user */ +export class VpnRpcSetUser +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Specify the user name of the user */ + public Name_str: string = ""; + + /** Assigned group name for the user */ + public GroupName_str: string = ""; + + /** Optional real name (full name) of the user, allow using any Unicode characters */ + public Realname_utf: string = ""; + + /** Optional User Description */ + public Note_utf: string = ""; + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Last modified date and time */ + public UpdatedTime_dt: Date = new Date(); + + /** Expiration date and time */ + public ExpireTime_dt: Date = new Date(); + + /** Authentication method of the user */ + public AuthType_u32: VpnRpcUserAuthType = 0; + + /** User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. */ + public Auth_Password_str: string = ""; + + /** User certificate, valid only if AuthType_u32 == UserCert(2). */ + public UserX_bin: Uint8Array = new Uint8Array([]); + + /** Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). */ + public Serial_bin: Uint8Array = new Uint8Array([]); + + /** Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). */ + public CommonName_utf: string = ""; + + /** Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). */ + public RadiusUsername_utf: string = ""; + + /** Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). */ + public NtUsername_utf: string = ""; + + /** Number of total logins of the user */ + public NumLogin_u32: number = 0; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** The flag whether to use security policy */ + public UsePolicy_bool: boolean = false; + + /** Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. */ + public ["policy:Access_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPFilter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. */ + public ["policy:DHCPNoServer_bool"]: boolean = false; + + /** Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. */ + public ["policy:DHCPForce_bool"]: boolean = false; + + /** Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. */ + public ["policy:NoBridge_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRouting_bool"]: boolean = false; + + /** Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckMac_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIP_bool"]: boolean = false; + + /** Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. */ + public ["policy:ArpDhcpOnly_bool"]: boolean = false; + + /** Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. */ + public ["policy:PrivacyFilter_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. */ + public ["policy:NoServer_bool"]: boolean = false; + + /** Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. */ + public ["policy:NoBroadcastLimiter_bool"]: boolean = false; + + /** Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. */ + public ["policy:MonitorPort_bool"]: boolean = false; + + /** Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. */ + public ["policy:MaxConnection_u32"]: number = 0; + + /** Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. */ + public ["policy:TimeOut_u32"]: number = 0; + + /** Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. */ + public ["policy:MaxMac_u32"]: number = 0; + + /** Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. */ + public ["policy:MaxIP_u32"]: number = 0; + + /** Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. */ + public ["policy:MaxUpload_u32"]: number = 0; + + /** Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. */ + public ["policy:MaxDownload_u32"]: number = 0; + + /** Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. */ + public ["policy:FixPassword_bool"]: boolean = false; + + /** Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. */ + public ["policy:MultiLogins_u32"]: number = 0; + + /** Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. */ + public ["policy:NoQoS_bool"]: boolean = false; + + /** Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. */ + public ["policy:RSandRAFilter_bool"]: boolean = false; + + /** Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. */ + public ["policy:RAFilter_bool"]: boolean = false; + + /** Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. */ + public ["policy:DHCPv6Filter_bool"]: boolean = false; + + /** Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. */ + public ["policy:DHCPv6NoServer_bool"]: boolean = false; + + /** Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. */ + public ["policy:NoRoutingV6_bool"]: boolean = false; + + /** Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. */ + public ["policy:CheckIPv6_bool"]: boolean = false; + + /** Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. */ + public ["policy:NoServerV6_bool"]: boolean = false; + + /** Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. */ + public ["policy:MaxIPv6_u32"]: number = 0; + + /** Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:NoSavePassword_bool"]: boolean = false; + + /** Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. */ + public ["policy:AutoDisconnect_u32"]: number = 0; + + /** Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv4_bool"]: boolean = false; + + /** Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. */ + public ["policy:FilterIPv6_bool"]: boolean = false; + + /** Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. */ + public ["policy:FilterNonIP_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRA_bool"]: boolean = false; + + /** Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. */ + public ["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"]: boolean = false; + + /** Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. */ + public ["policy:VLanId_u32"]: number = 0; + + /** Security policy: Whether version 3.0 (must be true) */ + public ["policy:Ver3_bool"]: boolean = false; + + /** Constructor for the 'VpnRpcSetUser' class: Create, configure, and get the user */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the access list */ +export class VpnRpcDeleteAccess +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** ID */ + public Id_u32: number = 0; + + /** Constructor for the 'VpnRpcDeleteAccess' class: Delete the access list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the CA of HUB */ +export class VpnRpcHubDeleteCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Certificate key id to be deleted */ + public Key_u32: number = 0; + + /** Constructor for the 'VpnRpcHubDeleteCA' class: Delete the CA of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Deleting a user or group */ +export class VpnRpcDeleteUser +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** User or group name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcDeleteUser' class: Deleting a user or group */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the HUB */ +export class VpnRpcDeleteHub +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Constructor for the 'VpnRpcDeleteHub' class: Delete the HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Delete the table */ +export class VpnRpcDeleteTable +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Key ID */ + public Key_u32: number = 0; + + /** Constructor for the 'VpnRpcDeleteTable' class: Delete the table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Specify the Link */ +export class VpnRpcLink +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The name of the cascade connection */ + public AccountName_utf: string = ""; + + /** Constructor for the 'VpnRpcLink' class: Specify the Link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Disconnect the session */ +export class VpnRpcDeleteSession +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Session name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcDeleteSession' class: Disconnect the session */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Specify the HUB */ +export class VpnRpcHub +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Constructor for the 'VpnRpcHub' class: Specify the HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Disconnect a connection */ +export class VpnRpcDisconnectConnection +{ + /** Connection name */ + public Name_str: string = ""; + + /** Constructor for the 'VpnRpcDisconnectConnection' class: Disconnect a connection */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of the access list */ +export class VpnRpcEnumAccessList +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Access list */ + public AccessList: VpnAccess[] = []; + + /** Constructor for the 'VpnRpcEnumAccessList' class: Enumeration of the access list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** CA enumeration items of HUB */ +export class VpnRpcHubEnumCAItem +{ + /** The key id of the item */ + public Key_u32: number = 0; + + /** Subject */ + public SubjectName_utf: string = ""; + + /** Issuer */ + public IssuerName_utf: string = ""; + + /** Expiration date */ + public Expires_dt: Date = new Date(); + + /** Constructor for the 'VpnRpcHubEnumCAItem' class: CA enumeration items of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** CA enumeration of HUB */ +export class VpnRpcHubEnumCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The list of CA */ + public CAList: VpnRpcHubEnumCAItem[] = []; + + /** Constructor for the 'VpnRpcHubEnumCA' class: CA enumeration of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Type of connection */ +export enum VpnRpcConnectionType +{ + /** VPN Client */ + Client = 0, + + /** During initialization */ + Init = 1, + + /** Login connection */ + Login = 2, + + /** Additional connection */ + Additional = 3, + + /** RPC for server farm */ + FarmRpc = 4, + + /** RPC for Management */ + AdminRpc = 5, + + /** HUB enumeration */ + EnumHub = 6, + + /** Password change */ + Password = 7, + + /** SSTP */ + SSTP = 8, + + /** OpenVPN */ + OpenVPN = 9, + +} + +/** Connection enumeration items */ +export class VpnRpcEnumConnectionItem +{ + /** Connection name */ + public Name_str: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** IP address */ + public Ip_ip: string = ""; + + /** Port number */ + public Port_u32: number = 0; + + /** Connected time */ + public ConnectedTime_dt: Date = new Date(); + + /** Connection type */ + public Type_u32: VpnRpcConnectionType = 0; + + /** Constructor for the 'VpnRpcEnumConnectionItem' class: Connection enumeration items */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Connection enumeration */ +export class VpnRpcEnumConnection +{ + /** Number of connections */ + public NumConnection_u32: number = 0; + + /** Connection list */ + public ConnectionList: VpnRpcEnumConnectionItem[] = []; + + /** Constructor for the 'VpnRpcEnumConnection' class: Connection enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enum CRL Item */ +export class VpnRpcEnumCrlItem +{ + /** Key ID */ + public Key_u32: number = 0; + + /** The contents of the CRL item */ + public CrlInfo_utf: string = ""; + + /** Constructor for the 'VpnRpcEnumCrlItem' class: Enum CRL Item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enum CRL */ +export class VpnRpcEnumCrl +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** CRL list */ + public CRLList: VpnRpcEnumCrlItem[] = []; + + /** Constructor for the 'VpnRpcEnumCrl' class: Enum CRL */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_ENUM_DHCP_ITEM */ +export class VpnRpcEnumDhcpItem +{ + /** ID */ + public Id_u32: number = 0; + + /** Lease time */ + public LeasedTime_dt: Date = new Date(); + + /** Expiration date */ + public ExpireTime_dt: Date = new Date(); + + /** MAC address */ + public MacAddress_bin: Uint8Array = new Uint8Array([]); + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Subnet mask */ + public Mask_u32: number = 0; + + /** Host name */ + public Hostname_str: string = ""; + + /** Constructor for the 'VpnRpcEnumDhcpItem' class: RPC_ENUM_DHCP_ITEM */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_ENUM_DHCP */ +export class VpnRpcEnumDhcp +{ + /** Virtual Hub Name */ + public HubName_str: string = ""; + + /** DHCP Item */ + public DhcpTable: VpnRpcEnumDhcpItem[] = []; + + /** Constructor for the 'VpnRpcEnumDhcp' class: RPC_ENUM_DHCP */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** EtherIP setting list */ +export class VpnRpcEnumEtherIpId +{ + /** Setting list */ + public Settings: VpnEtherIpId[] = []; + + /** Constructor for the 'VpnRpcEnumEtherIpId' class: EtherIP setting list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Ethernet Network Adapters list item */ +export class VpnRpcEnumEthItem +{ + /** Device name */ + public DeviceName_str: string = ""; + + /** Network connection name (description) */ + public NetworkConnectionName_utf: string = ""; + + /** Constructor for the 'VpnRpcEnumEthItem' class: Ethernet Network Adapters list item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Ethernet Network Adapters list */ +export class VpnRpcEnumEth +{ + /** Ethernet Network Adapters list */ + public EthList: VpnRpcEnumEthItem[] = []; + + /** Constructor for the 'VpnRpcEnumEth' class: Ethernet Network Adapters list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm members enumeration items */ +export class VpnRpcEnumFarmItem +{ + /** ID */ + public Id_u32: number = 0; + + /** Controller */ + public Controller_bool: boolean = false; + + /** Connection time */ + public ConnectedTime_dt: Date = new Date(); + + /** IP address */ + public Ip_ip: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** Point */ + public Point_u32: number = 0; + + /** Number of sessions */ + public NumSessions_u32: number = 0; + + /** Number of TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of HUBs */ + public NumHubs_u32: number = 0; + + /** Number of assigned client licenses */ + public AssignedClientLicense_u32: number = 0; + + /** Number of assigned bridge licenses */ + public AssignedBridgeLicense_u32: number = 0; + + /** Constructor for the 'VpnRpcEnumFarmItem' class: Server farm members enumeration items */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm member enumeration */ +export class VpnRpcEnumFarm +{ + /** Number of Cluster Members */ + public NumFarm_u32: number = 0; + + /** Cluster Members list */ + public FarmMemberList: VpnRpcEnumFarmItem[] = []; + + /** Constructor for the 'VpnRpcEnumFarm' class: Server farm member enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items in the group */ +export class VpnRpcEnumGroupItem +{ + /** User name */ + public Name_str: string = ""; + + /** Real name */ + public Realname_utf: string = ""; + + /** Note */ + public Note_utf: string = ""; + + /** Number of users */ + public NumUsers_u32: number = 0; + + /** Access denied */ + public DenyAccess_bool: boolean = false; + + /** Constructor for the 'VpnRpcEnumGroupItem' class: Enumeration items in the group */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Group enumeration */ +export class VpnRpcEnumGroup +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Group list */ + public GroupList: VpnRpcEnumGroupItem[] = []; + + /** Constructor for the 'VpnRpcEnumGroup' class: Group enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items of HUB */ +export class VpnRpcEnumHubItem +{ + /** The name of the Virtual Hub */ + public HubName_str: string = ""; + + /** Online state */ + public Online_bool: boolean = false; + + /** Type of HUB (Valid only for Clustered VPN Servers) */ + public HubType_u32: VpnRpcHubType = 0; + + /** Number of users */ + public NumUsers_u32: number = 0; + + /** Number of registered groups */ + public NumGroups_u32: number = 0; + + /** Number of registered sessions */ + public NumSessions_u32: number = 0; + + /** Number of current MAC table entries */ + public NumMacTables_u32: number = 0; + + /** Number of current IP table entries */ + public NumIpTables_u32: number = 0; + + /** Last communication date and time */ + public LastCommTime_dt: Date = new Date(); + + /** Last login date and time */ + public LastLoginTime_dt: Date = new Date(); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Number of accumulated logins */ + public NumLogin_u32: number = 0; + + /** Whether the traffic information is provided */ + public IsTrafficFilled_bool: boolean = false; + + /** Number of broadcast packets (Recv) */ + public ["Ex.Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Ex.Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Ex.Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Ex.Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Ex.Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Ex.Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastCount_u64"]: number = 0; + + /** Constructor for the 'VpnRpcEnumHubItem' class: Enumeration items of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of HUB */ +export class VpnRpcEnumHub +{ + /** Number of Virtual Hubs */ + public NumHub_u32: number = 0; + + /** Virtual Hubs */ + public HubList: VpnRpcEnumHubItem[] = []; + + /** Constructor for the 'VpnRpcEnumHub' class: Enumeration of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items of IP table */ +export class VpnRpcEnumIpTableItem +{ + /** Key ID */ + public Key_u32: number = 0; + + /** Session name */ + public SessionName_str: string = ""; + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Assigned by the DHCP */ + public DhcpAllocated_bool: boolean = false; + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Updating date */ + public UpdatedTime_dt: Date = new Date(); + + /** Remote items */ + public RemoteItem_bool: boolean = false; + + /** Remote host name */ + public RemoteHostname_str: string = ""; + + /** Constructor for the 'VpnRpcEnumIpTableItem' class: Enumeration items of IP table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of IP table */ +export class VpnRpcEnumIpTable +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** MAC table */ + public IpTable: VpnRpcEnumIpTableItem[] = []; + + /** Constructor for the 'VpnRpcEnumIpTable' class: Enumeration of IP table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 interface enumeration */ +export class VpnRpcEnumL3If +{ + /** Layer-3 switch name */ + public Name_str: string = ""; + + /** Layer-3 interface list */ + public L3IFList: VpnRpcL3If[] = []; + + /** Constructor for the 'VpnRpcEnumL3If' class: Layer-3 interface enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 switch enumeration item */ +export class VpnRpcEnumL3SwItem +{ + /** Name of the layer-3 switch */ + public Name_str: string = ""; + + /** Number of layer-3 switch virtual interfaces */ + public NumInterfaces_u32: number = 0; + + /** Number of routing tables */ + public NumTables_u32: number = 0; + + /** Activated flag */ + public Active_bool: boolean = false; + + /** Online flag */ + public Online_bool: boolean = false; + + /** Constructor for the 'VpnRpcEnumL3SwItem' class: Layer-3 switch enumeration item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Layer-3 switch enumeration */ +export class VpnRpcEnumL3Sw +{ + /** Layer-3 switch list */ + public L3SWList: VpnRpcEnumL3SwItem[] = []; + + /** Constructor for the 'VpnRpcEnumL3Sw' class: Layer-3 switch enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Routing table enumeration */ +export class VpnRpcEnumL3Table +{ + /** L3 switch name */ + public Name_str: string = ""; + + /** Routing table item list */ + public L3Table: VpnRpcL3Table[] = []; + + /** Constructor for the 'VpnRpcEnumL3Table' class: Routing table enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Cascade Connection Enumeration */ +export class VpnRpcEnumLinkItem +{ + /** The name of cascade connection */ + public AccountName_utf: string = ""; + + /** Online flag */ + public Online_bool: boolean = false; + + /** The flag indicates whether the cascade connection is established */ + public Connected_bool: boolean = false; + + /** The error last occurred if the cascade connection is in the fail state */ + public LastError_u32: number = 0; + + /** Connection completion time */ + public ConnectedTime_dt: Date = new Date(); + + /** Host name of the destination VPN server */ + public Hostname_str: string = ""; + + /** The Virtual Hub name */ + public TargetHubName_str: string = ""; + + /** Constructor for the 'VpnRpcEnumLinkItem' class: Cascade Connection Enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of the link */ +export class VpnRpcEnumLink +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Number of cascade connections */ + public NumLink_u32: number = 0; + + /** The list of cascade connections */ + public LinkList: VpnRpcEnumLinkItem[] = []; + + /** Constructor for the 'VpnRpcEnumLink' class: Enumeration of the link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** List of listeners item */ +export class VpnRpcListenerListItem +{ + /** TCP port number (range: 1 - 65535) */ + public Ports_u32: number = 0; + + /** Active state */ + public Enables_bool: boolean = false; + + /** The flag to indicate if the error occurred on the listener port */ + public Errors_bool: boolean = false; + + /** Constructor for the 'VpnRpcListenerListItem' class: List of listeners item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** List of listeners */ +export class VpnRpcListenerList +{ + /** List of listener items */ + public ListenerList: VpnRpcListenerListItem[] = []; + + /** Constructor for the 'VpnRpcListenerList' class: List of listeners */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Local Bridge enumeration */ +export class VpnRpcEnumLocalBridge +{ + /** Local Bridge list */ + public LocalBridgeList: VpnRpcLocalBridge[] = []; + + /** Constructor for the 'VpnRpcEnumLocalBridge' class: Local Bridge enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Log file enumeration */ +export class VpnRpcEnumLogFileItem +{ + /** Server name */ + public ServerName_str: string = ""; + + /** File path */ + public FilePath_str: string = ""; + + /** File size */ + public FileSize_u32: number = 0; + + /** Last write date */ + public UpdatedTime_dt: Date = new Date(); + + /** Constructor for the 'VpnRpcEnumLogFileItem' class: Log file enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Log file enumeration */ +export class VpnRpcEnumLogFile +{ + /** Log file list */ + public LogFiles: VpnRpcEnumLogFileItem[] = []; + + /** Constructor for the 'VpnRpcEnumLogFile' class: Log file enumeration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration items of the MAC table */ +export class VpnRpcEnumMacTableItem +{ + /** Key ID */ + public Key_u32: number = 0; + + /** Session name */ + public SessionName_str: string = ""; + + /** MAC address */ + public MacAddress_bin: Uint8Array = new Uint8Array([]); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Updating date */ + public UpdatedTime_dt: Date = new Date(); + + /** Remote items */ + public RemoteItem_bool: boolean = false; + + /** Remote host name */ + public RemoteHostname_str: string = ""; + + /** VLAN ID */ + public VlanId_u32: number = 0; + + /** Constructor for the 'VpnRpcEnumMacTableItem' class: Enumeration items of the MAC table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of the MAC table */ +export class VpnRpcEnumMacTable +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** MAC table */ + public MacTable: VpnRpcEnumMacTableItem[] = []; + + /** Constructor for the 'VpnRpcEnumMacTable' class: Enumeration of the MAC table */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** NAT Entry Protocol Number */ +export enum VpnRpcNatProtocol +{ + /** TCP */ + TCP = 0, + + /** UDP */ + UDP = 1, + + /** DNS */ + DNS = 2, + + /** ICMP */ + ICMP = 3, + +} + +/** State of NAT session (TCP) */ +export enum VpnRpcNatTcpState +{ + /** Connecting */ + Connecting = 0, + + /** Send the RST (Connection failure or disconnected) */ + SendReset = 1, + + /** Connection complete */ + Connected = 2, + + /** Connection established */ + Established = 3, + + /** Wait for socket disconnection */ + WaitDisconnect = 4, + +} + +/** VpnRpcEnumNat List Item */ +export class VpnRpcEnumNatItem +{ + /** ID */ + public Id_u32: number = 0; + + /** Protocol */ + public Protocol_u32: VpnRpcNatProtocol = 0; + + /** Source IP address */ + public SrcIp_ip: string = ""; + + /** Source host name */ + public SrcHost_str: string = ""; + + /** Source port number */ + public SrcPort_u32: number = 0; + + /** Destination IP address */ + public DestIp_ip: string = ""; + + /** Destination host name */ + public DestHost_str: string = ""; + + /** Destination port number */ + public DestPort_u32: number = 0; + + /** Connection time */ + public CreatedTime_dt: Date = new Date(); + + /** Last communication time */ + public LastCommTime_dt: Date = new Date(); + + /** Transmission size */ + public SendSize_u64: number = 0; + + /** Receive size */ + public RecvSize_u64: number = 0; + + /** TCP state */ + public TcpStatus_u32: VpnRpcNatTcpState = 0; + + /** Constructor for the 'VpnRpcEnumNatItem' class: VpnRpcEnumNat List Item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_ENUM_NAT */ +export class VpnRpcEnumNat +{ + /** Virtual Hub Name */ + public HubName_str: string = ""; + + /** NAT item */ + public NatTable: VpnRpcEnumNatItem[] = []; + + /** Constructor for the 'VpnRpcEnumNat' class: RPC_ENUM_NAT */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration item of VPN session */ +export class VpnRpcEnumSessionItem +{ + /** Session name */ + public Name_str: string = ""; + + /** Remote session */ + public RemoteSession_bool: boolean = false; + + /** Remote server name */ + public RemoteHostname_str: string = ""; + + /** User name */ + public Username_str: string = ""; + + /** IP address */ + public ClientIP_ip: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** Maximum number of underlying TCP connections */ + public MaxNumTcp_u32: number = 0; + + /** Number of current underlying TCP connections */ + public CurrentNumTcp_u32: number = 0; + + /** Packet size transmitted */ + public PacketSize_u64: number = 0; + + /** Number of packets transmitted */ + public PacketNum_u64: number = 0; + + /** Is a Cascade VPN session */ + public LinkMode_bool: boolean = false; + + /** Is a SecureNAT VPN session */ + public SecureNATMode_bool: boolean = false; + + /** Is the VPN session for Local Bridge */ + public BridgeMode_bool: boolean = false; + + /** Is a Layer-3 Switch VPN session */ + public Layer3Mode_bool: boolean = false; + + /** Is in Bridge Mode */ + public Client_BridgeMode_bool: boolean = false; + + /** Is in Monitor Mode */ + public Client_MonitorMode_bool: boolean = false; + + /** VLAN ID */ + public VLanId_u32: number = 0; + + /** Unique ID of the VPN Session */ + public UniqueId_bin: Uint8Array = new Uint8Array([]); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Last communication date and time */ + public LastCommTime_dt: Date = new Date(); + + /** Constructor for the 'VpnRpcEnumSessionItem' class: Enumeration item of VPN session */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumerate VPN sessions */ +export class VpnRpcEnumSession +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** VPN sessions list */ + public SessionList: VpnRpcEnumSessionItem[] = []; + + /** Constructor for the 'VpnRpcEnumSession' class: Enumerate VPN sessions */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration item of user */ +export class VpnRpcEnumUserItem +{ + /** User name */ + public Name_str: string = ""; + + /** Group name */ + public GroupName_str: string = ""; + + /** Real name */ + public Realname_utf: string = ""; + + /** Note */ + public Note_utf: string = ""; + + /** Authentication method */ + public AuthType_u32: VpnRpcUserAuthType = 0; + + /** Number of logins */ + public NumLogin_u32: number = 0; + + /** Last login date and time */ + public LastLoginTime_dt: Date = new Date(); + + /** Access denied */ + public DenyAccess_bool: boolean = false; + + /** Flag of whether the traffic variable is set */ + public IsTrafficFilled_bool: boolean = false; + + /** Flag of whether expiration date variable is set */ + public IsExpiresFilled_bool: boolean = false; + + /** Expiration date */ + public Expires_dt: Date = new Date(); + + /** Number of broadcast packets (Recv) */ + public ["Ex.Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Ex.Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Ex.Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Ex.Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Ex.Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Ex.Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Ex.Send.UnicastCount_u64"]: number = 0; + + /** Constructor for the 'VpnRpcEnumUserItem' class: Enumeration item of user */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Enumeration of user */ +export class VpnRpcEnumUser +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** User list */ + public UserList: VpnRpcEnumUserItem[] = []; + + /** Constructor for the 'VpnRpcEnumUser' class: Enumeration of user */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Source IP Address Limit List Item */ +export class VpnAc +{ + /** ID */ + public Id_u32: number = 0; + + /** Priority */ + public Priority_u32: number = 0; + + /** Deny access */ + public Deny_bool: boolean = false; + + /** Set true if you want to specify the SubnetMask_ip item. */ + public Masked_bool: boolean = false; + + /** IP address */ + public IpAddress_ip: string = ""; + + /** Subnet mask, valid only if Masked_bool == true */ + public SubnetMask_ip: string = ""; + + /** Constructor for the 'VpnAc' class: Source IP Address Limit List Item */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Source IP Address Limit List */ +export class VpnRpcAcList +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Source IP Address Limit List */ + public ACList: VpnAc[] = []; + + /** Constructor for the 'VpnRpcAcList' class: Source IP Address Limit List */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Message */ +export class VpnRpcMsg +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Message (Unicode strings acceptable) */ + public Msg_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcMsg' class: Message */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Get / Set the Azure state */ +export class VpnRpcAzureStatus +{ + /** Whether VPN Azure Function is Enabled */ + public IsEnabled_bool: boolean = false; + + /** Whether connection to VPN Azure Cloud Server is established */ + public IsConnected_bool: boolean = false; + + /** Constructor for the 'VpnRpcAzureStatus' class: Get / Set the Azure state */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Local Bridge support information */ +export class VpnRpcBridgeSupport +{ + /** Whether the OS supports the Local Bridge function */ + public IsBridgeSupportedOs_bool: boolean = false; + + /** Whether WinPcap is necessary to install */ + public IsWinPcapNeeded_bool: boolean = false; + + /** Constructor for the 'VpnRpcBridgeSupport' class: Local Bridge support information */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Get the CA of HUB */ +export class VpnRpcHubGetCA +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The key id of the certificate */ + public Key_u32: number = 0; + + /** The body of the X.509 certificate */ + public Cert_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcHubGetCA' class: Get the CA of HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Caps item of the VPN Server */ +export class VpnCaps +{ + /** Name */ + public CapsName_str: string = ""; + + /** Value */ + public CapsValue_u32: number = 0; + + /** Descrption */ + public CapsDescrption_utf: string = ""; + + /** Constructor for the 'VpnCaps' class: Caps item of the VPN Server */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Caps list of the VPN Server */ +export class VpnCapslist +{ + /** Caps list of the VPN Server */ + public CapsList: VpnCaps[] = []; + + /** Constructor for the 'VpnCapslist' class: Caps list of the VPN Server */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Config operation */ +export class VpnRpcConfig +{ + /** File name (valid only for returning from the server) */ + public FileName_str: string = ""; + + /** File data */ + public FileData_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcConfig' class: Config operation */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Connection information */ +export class VpnRpcConnectionInfo +{ + /** Connection name */ + public Name_str: string = ""; + + /** Type */ + public Type_u32: VpnRpcConnectionType = 0; + + /** Host name */ + public Hostname_str: string = ""; + + /** IP address */ + public Ip_ip: string = ""; + + /** Port number */ + public Port_u32: number = 0; + + /** Connected time */ + public ConnectedTime_dt: Date = new Date(); + + /** Server string */ + public ServerStr_str: string = ""; + + /** Server version */ + public ServerVer_u32: number = 0; + + /** Server build number */ + public ServerBuild_u32: number = 0; + + /** Client string */ + public ClientStr_str: string = ""; + + /** Client version */ + public ClientVer_u32: number = 0; + + /** Client build number */ + public ClientBuild_u32: number = 0; + + /** Constructor for the 'VpnRpcConnectionInfo' class: Connection information */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Proxy type */ +export enum VpnRpcProxyType +{ + /** Direct TCP connection */ + Direct = 0, + + /** Connection via HTTP proxy server */ + HTTP = 1, + + /** Connection via SOCKS proxy server */ + SOCKS = 2, + +} + +/** The current status of the DDNS */ +export class VpnDDnsClientStatus +{ + /** Last error code (IPv4) */ + public Err_IPv4_u32: number = 0; + + /** Last error string (IPv4) */ + public ErrStr_IPv4_utf: string = ""; + + /** Last error code (IPv6) */ + public Err_IPv6_u32: number = 0; + + /** Last error string (IPv6) */ + public ErrStr_IPv6_utf: string = ""; + + /** Current DDNS host name */ + public CurrentHostName_str: string = ""; + + /** Current FQDN of the DDNS hostname */ + public CurrentFqdn_str: string = ""; + + /** DDNS suffix */ + public DnsSuffix_str: string = ""; + + /** Current IPv4 address of the VPN Server */ + public CurrentIPv4_str: string = ""; + + /** Current IPv6 address of the VPN Server */ + public CurrentIPv6_str: string = ""; + + /** Constructor for the 'VpnDDnsClientStatus' class: The current status of the DDNS */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Internet connection settings */ +export class VpnInternetSetting +{ + /** Type of proxy server */ + public ProxyType_u32: VpnRpcProxyType = 0; + + /** Proxy server host name */ + public ProxyHostName_str: string = ""; + + /** Proxy server port number */ + public ProxyPort_u32: number = 0; + + /** Proxy server user name */ + public ProxyUsername_str: string = ""; + + /** Proxy server password */ + public ProxyPassword_str: string = ""; + + /** Constructor for the 'VpnInternetSetting' class: Internet connection settings */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Administration options */ +export class VpnAdminOption +{ + /** Name */ + public Name_str: string = ""; + + /** Data */ + public Value_u32: number = 0; + + /** Descrption */ + public Descrption_utf: string = ""; + + /** Constructor for the 'VpnAdminOption' class: Administration options */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Administration options list */ +export class VpnRpcAdminOption +{ + /** Virtual HUB name */ + public HubName_str: string = ""; + + /** List data */ + public AdminOptionList: VpnAdminOption[] = []; + + /** Constructor for the 'VpnRpcAdminOption' class: Administration options list */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Connection state to the controller */ +export class VpnRpcFarmConnectionStatus +{ + /** IP address */ + public Ip_ip: string = ""; + + /** Port number */ + public Port_u32: number = 0; + + /** Online state */ + public Online_bool: boolean = false; + + /** Last error code */ + public LastError_u32: number = 0; + + /** Connection start time */ + public StartedTime_dt: Date = new Date(); + + /** First connection time */ + public FirstConnectedTime_dt: Date = new Date(); + + /** Connection time of this time */ + public CurrentConnectedTime_dt: Date = new Date(); + + /** Number of retries */ + public NumTry_u32: number = 0; + + /** Number of connection count */ + public NumConnected_u32: number = 0; + + /** Connection failure count */ + public NumFailed_u32: number = 0; + + /** Constructor for the 'VpnRpcFarmConnectionStatus' class: Connection state to the controller */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** HUB item of each farm member */ +export class VpnRpcFarmHub +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Dynamic HUB */ + public DynamicHub_bool: boolean = false; + + /** Constructor for the 'VpnRpcFarmHub' class: HUB item of each farm member */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm member information acquisition */ +export class VpnRpcFarmInfo +{ + /** ID */ + public Id_u32: number = 0; + + /** The flag if the server is Cluster Controller (false: Cluster Member servers) */ + public Controller_bool: boolean = false; + + /** Connection Established Time */ + public ConnectedTime_dt: Date = new Date(); + + /** IP address */ + public Ip_ip: string = ""; + + /** Host name */ + public Hostname_str: string = ""; + + /** Point */ + public Point_u32: number = 0; + + /** Number of Public Ports */ + public NumPort_u32: number = 0; + + /** Public Ports */ + public Ports_u32: number[] = []; + + /** Server certificate */ + public ServerCert_bin: Uint8Array = new Uint8Array([]); + + /** Number of farm HUB */ + public NumFarmHub_u32: number = 0; + + /** The hosted Virtual Hub list */ + public HubsList: VpnRpcFarmHub[] = []; + + /** Number of hosted VPN sessions */ + public NumSessions_u32: number = 0; + + /** Number of TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Performance Standard Ratio */ + public Weight_u32: number = 0; + + /** Constructor for the 'VpnRpcFarmInfo' class: Server farm member information acquisition */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server farm configuration */ +export class VpnRpcFarm +{ + /** Type of server */ + public ServerType_u32: VpnRpcServerType = 0; + + /** Valid only for Cluster Member servers. Number of the Ports_u32 element. */ + public NumPort_u32: number = 0; + + /** Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. */ + public Ports_u32: number[] = []; + + /** Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. */ + public PublicIp_ip: string = ""; + + /** Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. */ + public ControllerName_str: string = ""; + + /** Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. */ + public ControllerPort_u32: number = 0; + + /** Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. */ + public MemberPasswordPlaintext_str: string = ""; + + /** This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. */ + public Weight_u32: number = 0; + + /** Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. */ + public ControllerOnly_bool: boolean = false; + + /** Constructor for the 'VpnRpcFarm' class: Server farm configuration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Log switch type */ +export enum VpnRpcLogSwitchType +{ + /** No switching */ + No = 0, + + /** Secondly basis */ + Second = 1, + + /** Minutely basis */ + Minute = 2, + + /** Hourly basis */ + Hour = 3, + + /** Daily basis */ + Day = 4, + + /** Monthly basis */ + Month = 5, + +} + +/** Packet log settings */ +export enum VpnRpcPacketLogSetting +{ + /** Not save */ + None = 0, + + /** Only header */ + Header = 1, + + /** All payloads */ + All = 2, + +} + +/** Packet log settings array index */ +export enum VpnRpcPacketLogSettingIndex +{ + /** TCP connection log */ + TcpConnection = 0, + + /** TCP packet log */ + TcpAll = 1, + + /** DHCP Log */ + Dhcp = 2, + + /** UDP log */ + Udp = 3, + + /** ICMP log */ + Icmp = 4, + + /** IP log */ + Ip = 5, + + /** ARP log */ + Arp = 6, + + /** Ethernet log */ + Ethernet = 7, + +} + +/** HUB log settings */ +export class VpnRpcHubLog +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The flag to enable / disable saving the security log */ + public SaveSecurityLog_bool: boolean = false; + + /** The log filename switching setting of the security log */ + public SecurityLogSwitchType_u32: VpnRpcLogSwitchType = 0; + + /** The flag to enable / disable saving the security log */ + public SavePacketLog_bool: boolean = false; + + /** The log filename switching settings of the packet logs */ + public PacketLogSwitchType_u32: VpnRpcLogSwitchType = 0; + + /** Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7. */ + public PacketLogConfig_u32: VpnRpcPacketLogSetting[] = []; + + /** Constructor for the 'VpnRpcHubLog' class: HUB log settings */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RADIUS server options */ +export class VpnRpcRadius +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** RADIUS server name */ + public RadiusServerName_str: string = ""; + + /** RADIUS port number */ + public RadiusPort_u32: number = 0; + + /** Secret key */ + public RadiusSecret_str: string = ""; + + /** Radius retry interval */ + public RadiusRetryInterval_u32: number = 0; + + /** Constructor for the 'VpnRpcRadius' class: RADIUS server options */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Get the state HUB */ +export class VpnRpcHubStatus +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Online */ + public Online_bool: boolean = false; + + /** Type of HUB */ + public HubType_u32: VpnRpcHubType = 0; + + /** Number of sessions */ + public NumSessions_u32: number = 0; + + /** Number of sessions (client mode) */ + public NumSessionsClient_u32: number = 0; + + /** Number of sessions (bridge mode) */ + public NumSessionsBridge_u32: number = 0; + + /** Number of Access list entries */ + public NumAccessLists_u32: number = 0; + + /** Number of users */ + public NumUsers_u32: number = 0; + + /** Number of groups */ + public NumGroups_u32: number = 0; + + /** Number of MAC table entries */ + public NumMacTables_u32: number = 0; + + /** Number of IP table entries */ + public NumIpTables_u32: number = 0; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** Whether SecureNAT is enabled */ + public SecureNATEnabled_bool: boolean = false; + + /** Last communication date and time */ + public LastCommTime_dt: Date = new Date(); + + /** Last login date and time */ + public LastLoginTime_dt: Date = new Date(); + + /** Creation date and time */ + public CreatedTime_dt: Date = new Date(); + + /** Number of logins */ + public NumLogin_u32: number = 0; + + /** Constructor for the 'VpnRpcHubStatus' class: Get the state HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** List of services provided by IPsec server */ +export class VpnIPsecServices +{ + /** Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. */ + public L2TP_Raw_bool: boolean = false; + + /** Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. */ + public L2TP_IPsec_bool: boolean = false; + + /** Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. */ + public EtherIP_IPsec_bool: boolean = false; + + /** Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. */ + public IPsec_Secret_str: string = ""; + + /** Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. */ + public L2TP_DefaultHub_str: string = ""; + + /** Constructor for the 'VpnIPsecServices' class: List of services provided by IPsec server */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Keep alive protocol */ +export enum VpnRpcKeepAliveProtocol +{ + /** TCP */ + TCP = 0, + + /** UDP */ + UDP = 1, + +} + +/** Keep Alive settings */ +export class VpnRpcKeep +{ + /** The flag to enable keep-alive to the Internet */ + public UseKeepConnect_bool: boolean = false; + + /** Specify the host name or IP address of the destination */ + public KeepConnectHost_str: string = ""; + + /** Specify the port number of the destination */ + public KeepConnectPort_u32: number = 0; + + /** Protocol type */ + public KeepConnectProtocol_u32: VpnRpcKeepAliveProtocol = 0; + + /** Interval Between Packets Sends (Seconds) */ + public KeepConnectInterval_u32: number = 0; + + /** Constructor for the 'VpnRpcKeep' class: Keep Alive settings */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** State of the client session */ +export enum VpnRpcClientSessionStatus +{ + /** Connecting */ + Connecting = 0, + + /** Negotiating */ + Negotiation = 1, + + /** During user authentication */ + Auth = 2, + + /** Connection complete */ + Established = 3, + + /** Wait to retry */ + Retry = 4, + + /** Idle state */ + Idle = 5, + +} + +/** Get the link state */ +export class VpnRpcLinkStatus +{ + /** The Virtual Hub name */ + public HubName_Ex_str: string = ""; + + /** The name of the cascade connection */ + public AccountName_utf: string = ""; + + /** The flag whether the cascade connection is enabled */ + public Active_bool: boolean = false; + + /** The flag whether the cascade connection is established */ + public Connected_bool: boolean = false; + + /** The session status */ + public SessionStatus_u32: VpnRpcClientSessionStatus = 0; + + /** The destination VPN server name */ + public ServerName_str: string = ""; + + /** The port number of the server */ + public ServerPort_u32: number = 0; + + /** Server product name */ + public ServerProductName_str: string = ""; + + /** Server product version */ + public ServerProductVer_u32: number = 0; + + /** Server product build number */ + public ServerProductBuild_u32: number = 0; + + /** Server's X.509 certificate */ + public ServerX_bin: Uint8Array = new Uint8Array([]); + + /** Client certificate */ + public ClientX_bin: Uint8Array = new Uint8Array([]); + + /** Connection start time */ + public StartTime_dt: Date = new Date(); + + /** Connection completion time of the first connection */ + public FirstConnectionEstablisiedTime_dt: Date = new Date(); + + /** Connection completion time of this connection */ + public CurrentConnectionEstablishTime_dt: Date = new Date(); + + /** Number of connections have been established so far */ + public NumConnectionsEatablished_u32: number = 0; + + /** Half-connection */ + public HalfConnection_bool: boolean = false; + + /** VoIP / QoS */ + public QoS_bool: boolean = false; + + /** Maximum number of the underlying TCP connections */ + public MaxTcpConnections_u32: number = 0; + + /** Number of current underlying TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of underlying inbound TCP connections */ + public NumTcpConnectionsUpload_u32: number = 0; + + /** Number of underlying outbound TCP connections */ + public NumTcpConnectionsDownload_u32: number = 0; + + /** Use of encryption */ + public UseEncrypt_bool: boolean = false; + + /** Cipher algorithm name */ + public CipherName_str: string = ""; + + /** Use of compression */ + public UseCompress_bool: boolean = false; + + /** The flag whether this is a R-UDP session */ + public IsRUDPSession_bool: boolean = false; + + /** Underlying physical communication protocol */ + public UnderlayProtocol_str: string = ""; + + /** The UDP acceleration is enabled */ + public IsUdpAccelerationEnabled_bool: boolean = false; + + /** The UDP acceleration is being actually used */ + public IsUsingUdpAcceleration_bool: boolean = false; + + /** Session name */ + public SessionName_str: string = ""; + + /** Connection name */ + public ConnectionName_str: string = ""; + + /** Session key */ + public SessionKey_bin: Uint8Array = new Uint8Array([]); + + /** Total transmitted data size */ + public TotalSendSize_u64: number = 0; + + /** Total received data size */ + public TotalRecvSize_u64: number = 0; + + /** Total transmitted data size (no compression) */ + public TotalSendSizeReal_u64: number = 0; + + /** Total received data size (no compression) */ + public TotalRecvSizeReal_u64: number = 0; + + /** The flag whether the VPN session is Bridge Mode */ + public IsBridgeMode_bool: boolean = false; + + /** The flag whether the VPN session is Monitor mode */ + public IsMonitorMode_bool: boolean = false; + + /** VLAN ID */ + public VLanId_u32: number = 0; + + /** Constructor for the 'VpnRpcLinkStatus' class: Get the link state */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Setting of SSTP and OpenVPN */ +export class VpnOpenVpnSstpConfig +{ + /** Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. */ + public EnableOpenVPN_bool: boolean = false; + + /** Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. */ + public OpenVPNPortList_str: string = ""; + + /** pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. */ + public EnableSSTP_bool: boolean = false; + + /** Constructor for the 'VpnOpenVpnSstpConfig' class: Setting of SSTP and OpenVPN */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Virtual host option */ +export class VpnVhOption +{ + /** Target Virtual HUB name */ + public RpcHubName_str: string = ""; + + /** MAC address */ + public MacAddress_bin: Uint8Array = new Uint8Array([]); + + /** IP address */ + public Ip_ip: string = ""; + + /** Subnet mask */ + public Mask_ip: string = ""; + + /** Use flag of the Virtual NAT function */ + public UseNat_bool: boolean = false; + + /** MTU value (Standard: 1500) */ + public Mtu_u32: number = 0; + + /** NAT TCP timeout in seconds */ + public NatTcpTimeout_u32: number = 0; + + /** NAT UDP timeout in seconds */ + public NatUdpTimeout_u32: number = 0; + + /** Using flag of DHCP function */ + public UseDhcp_bool: boolean = false; + + /** Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) */ + public DhcpLeaseIPStart_ip: string = ""; + + /** Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) */ + public DhcpLeaseIPEnd_ip: string = ""; + + /** Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) */ + public DhcpSubnetMask_ip: string = ""; + + /** Specify the expiration date in second units for leasing an IP address to a client. */ + public DhcpExpireTimeSpan_u32: number = 0; + + /** Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. */ + public DhcpGatewayAddress_ip: string = ""; + + /** Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + public DhcpDnsServerAddress_ip: string = ""; + + /** Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. */ + public DhcpDnsServerAddress2_ip: string = ""; + + /** Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. */ + public DhcpDomainName_str: string = ""; + + /** Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. */ + public SaveLog_bool: boolean = false; + + /** The flag to enable the DhcpPushRoutes_str field. */ + public ApplyDhcpPushRoutes_bool: boolean = false; + + /** Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. */ + public DhcpPushRoutes_str: string = ""; + + /** Constructor for the 'VpnVhOption' class: Virtual host option */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** RPC_NAT_STATUS */ +export class VpnRpcNatStatus +{ + /** Virtual Hub Name */ + public HubName_str: string = ""; + + /** Number of TCP sessions */ + public NumTcpSessions_u32: number = 0; + + /** Ntmber of UDP sessions */ + public NumUdpSessions_u32: number = 0; + + /** Nymber of ICMP sessions */ + public NumIcmpSessions_u32: number = 0; + + /** Number of DNS sessions */ + public NumDnsSessions_u32: number = 0; + + /** Number of DHCP clients */ + public NumDhcpClients_u32: number = 0; + + /** Whether the NAT is operating in the Kernel Mode */ + public IsKernelMode_bool: boolean = false; + + /** Whether the NAT is operating in the Raw IP Mode */ + public IsRawIpMode_bool: boolean = false; + + /** Constructor for the 'VpnRpcNatStatus' class: RPC_NAT_STATUS */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Key pair */ +export class VpnRpcKeyPair +{ + /** The body of the certificate */ + public Cert_bin: Uint8Array = new Uint8Array([]); + + /** The body of the private key */ + public Key_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcKeyPair' class: Key pair */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Single string value */ +export class VpnRpcStr +{ + /** A string value */ + public String_str: string = ""; + + /** Constructor for the 'VpnRpcStr' class: Single string value */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Type of VPN Server */ +export enum VpnRpcServerType +{ + /** Stand-alone server */ + Standalone = 0, + + /** Farm controller server */ + FarmController = 1, + + /** Farm member server */ + FarmMember = 2, + +} + +/** Operating system type */ +export enum VpnRpcOsType +{ + /** Windows 95 */ + WINDOWS_95 = 1100, + + /** Windows 98 */ + WINDOWS_98 = 1200, + + /** Windows Me */ + WINDOWS_ME = 1300, + + /** Windows (unknown) */ + WINDOWS_UNKNOWN = 1400, + + /** Windows NT 4.0 Workstation */ + WINDOWS_NT_4_WORKSTATION = 2100, + + /** Windows NT 4.0 Server */ + WINDOWS_NT_4_SERVER = 2110, + + /** Windows NT 4.0 Server, Enterprise Edition */ + WINDOWS_NT_4_SERVER_ENTERPRISE = 2111, + + /** Windows NT 4.0 Terminal Server */ + WINDOWS_NT_4_TERMINAL_SERVER = 2112, + + /** BackOffice Server 4.5 */ + WINDOWS_NT_4_BACKOFFICE = 2113, + + /** Small Business Server 4.5 */ + WINDOWS_NT_4_SMS = 2114, + + /** Windows 2000 Professional */ + WINDOWS_2000_PROFESSIONAL = 2200, + + /** Windows 2000 Server */ + WINDOWS_2000_SERVER = 2211, + + /** Windows 2000 Advanced Server */ + WINDOWS_2000_ADVANCED_SERVER = 2212, + + /** Windows 2000 Datacenter Server */ + WINDOWS_2000_DATACENTER_SERVER = 2213, + + /** BackOffice Server 2000 */ + WINDOWS_2000_BACKOFFICE = 2214, + + /** Small Business Server 2000 */ + WINDOWS_2000_SBS = 2215, + + /** Windows XP Home Edition */ + WINDOWS_XP_HOME = 2300, + + /** Windows XP Professional */ + WINDOWS_XP_PROFESSIONAL = 2301, + + /** Windows Server 2003 Web Edition */ + WINDOWS_2003_WEB = 2410, + + /** Windows Server 2003 Standard Edition */ + WINDOWS_2003_STANDARD = 2411, + + /** Windows Server 2003 Enterprise Edition */ + WINDOWS_2003_ENTERPRISE = 2412, + + /** Windows Server 2003 DataCenter Edition */ + WINDOWS_2003_DATACENTER = 2413, + + /** BackOffice Server 2003 */ + WINDOWS_2003_BACKOFFICE = 2414, + + /** Small Business Server 2003 */ + WINDOWS_2003_SBS = 2415, + + /** Windows Vista */ + WINDOWS_LONGHORN_PROFESSIONAL = 2500, + + /** Windows Server 2008 */ + WINDOWS_LONGHORN_SERVER = 2510, + + /** Windows 7 */ + WINDOWS_7 = 2600, + + /** Windows Server 2008 R2 */ + WINDOWS_SERVER_2008_R2 = 2610, + + /** Windows 8 */ + WINDOWS_8 = 2700, + + /** Windows Server 2012 */ + WINDOWS_SERVER_8 = 2710, + + /** Windows 8.1 */ + WINDOWS_81 = 2701, + + /** Windows Server 2012 R2 */ + WINDOWS_SERVER_81 = 2711, + + /** Windows 10 */ + WINDOWS_10 = 2702, + + /** Windows Server 10 */ + WINDOWS_SERVER_10 = 2712, + + /** Windows 11 or later */ + WINDOWS_11 = 2800, + + /** Windows Server 11 or later */ + WINDOWS_SERVER_11 = 2810, + + /** Unknown UNIX */ + UNIX_UNKNOWN = 3000, + + /** Linux */ + LINUX = 3100, + + /** Solaris */ + SOLARIS = 3200, + + /** Cygwin */ + CYGWIN = 3300, + + /** BSD */ + BSD = 3400, + + /** MacOS X */ + MACOS_X = 3500, + +} + +/** VPN Server Information */ +export class VpnRpcServerInfo +{ + /** Server product name */ + public ServerProductName_str: string = ""; + + /** Server version string */ + public ServerVersionString_str: string = ""; + + /** Server build information string */ + public ServerBuildInfoString_str: string = ""; + + /** Server version integer value */ + public ServerVerInt_u32: number = 0; + + /** Server build number integer value */ + public ServerBuildInt_u32: number = 0; + + /** Server host name */ + public ServerHostName_str: string = ""; + + /** Type of server */ + public ServerType_u32: VpnRpcServerType = 0; + + /** Build date and time of the server */ + public ServerBuildDate_dt: Date = new Date(); + + /** Family name */ + public ServerFamilyName_str: string = ""; + + /** OS type */ + public OsType_u32: VpnRpcOsType = 0; + + /** Service pack number */ + public OsServicePack_u32: number = 0; + + /** OS system name */ + public OsSystemName_str: string = ""; + + /** OS product name */ + public OsProductName_str: string = ""; + + /** OS vendor name */ + public OsVendorName_str: string = ""; + + /** OS version */ + public OsVersion_str: string = ""; + + /** Kernel name */ + public KernelName_str: string = ""; + + /** Kernel version */ + public KernelVersion_str: string = ""; + + /** Constructor for the 'VpnRpcServerInfo' class: VPN Server Information */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Server status */ +export class VpnRpcServerStatus +{ + /** Type of server */ + public ServerType_u32: VpnRpcServerType = 0; + + /** Total number of TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of Local TCP connections */ + public NumTcpConnectionsLocal_u32: number = 0; + + /** Number of remote TCP connections */ + public NumTcpConnectionsRemote_u32: number = 0; + + /** Total number of HUBs */ + public NumHubTotal_u32: number = 0; + + /** Nymber of stand-alone HUB */ + public NumHubStandalone_u32: number = 0; + + /** Number of static HUBs */ + public NumHubStatic_u32: number = 0; + + /** Number of Dynamic HUBs */ + public NumHubDynamic_u32: number = 0; + + /** Total number of sessions */ + public NumSessionsTotal_u32: number = 0; + + /** Number of local VPN sessions */ + public NumSessionsLocal_u32: number = 0; + + /** The number of remote sessions */ + public NumSessionsRemote_u32: number = 0; + + /** Number of MAC table entries (total sum of all Virtual Hubs) */ + public NumMacTables_u32: number = 0; + + /** Number of IP table entries (total sum of all Virtual Hubs) */ + public NumIpTables_u32: number = 0; + + /** Number of users (total sum of all Virtual Hubs) */ + public NumUsers_u32: number = 0; + + /** Number of groups (total sum of all Virtual Hubs) */ + public NumGroups_u32: number = 0; + + /** Number of assigned bridge licenses (Useful to make a commercial version) */ + public AssignedBridgeLicenses_u32: number = 0; + + /** Number of assigned client licenses (Useful to make a commercial version) */ + public AssignedClientLicenses_u32: number = 0; + + /** Number of Assigned bridge license (cluster-wide), useful to make a commercial version */ + public AssignedBridgeLicensesTotal_u32: number = 0; + + /** Number of assigned client licenses (cluster-wide), useful to make a commercial version */ + public AssignedClientLicensesTotal_u32: number = 0; + + /** Number of broadcast packets (Recv) */ + public ["Recv.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Recv) */ + public ["Recv.BroadcastCount_u64"]: number = 0; + + /** Unicast count (Recv) */ + public ["Recv.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Recv) */ + public ["Recv.UnicastCount_u64"]: number = 0; + + /** Number of broadcast packets (Send) */ + public ["Send.BroadcastBytes_u64"]: number = 0; + + /** Broadcast bytes (Send) */ + public ["Send.BroadcastCount_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastBytes_u64"]: number = 0; + + /** Unicast bytes (Send) */ + public ["Send.UnicastCount_u64"]: number = 0; + + /** Current time */ + public CurrentTime_dt: Date = new Date(); + + /** 64 bit High-Precision Logical System Clock */ + public CurrentTick_u64: number = 0; + + /** VPN Server Start-up time */ + public StartTime_dt: Date = new Date(); + + /** Memory information: Total Memory */ + public TotalMemory_u64: number = 0; + + /** Memory information: Used Memory */ + public UsedMemory_u64: number = 0; + + /** Memory information: Free Memory */ + public FreeMemory_u64: number = 0; + + /** Memory information: Total Phys */ + public TotalPhys_u64: number = 0; + + /** Memory information: Used Phys */ + public UsedPhys_u64: number = 0; + + /** Memory information: Free Phys */ + public FreePhys_u64: number = 0; + + /** Constructor for the 'VpnRpcServerStatus' class: Server status */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** VPN Session status */ +export class VpnRpcSessionStatus +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** VPN session name */ + public Name_str: string = ""; + + /** User name */ + public Username_str: string = ""; + + /** Real user name which was used for the authentication */ + public RealUsername_str: string = ""; + + /** Group name */ + public GroupName_str: string = ""; + + /** Is Cascade Session */ + public LinkMode_bool: boolean = false; + + /** Client IP address */ + public Client_Ip_Address_ip: string = ""; + + /** Client host name */ + public SessionStatus_ClientHostName_str: string = ""; + + /** Operation flag */ + public Active_bool: boolean = false; + + /** Connected flag */ + public Connected_bool: boolean = false; + + /** State of the client session */ + public SessionStatus_u32: VpnRpcClientSessionStatus = 0; + + /** Server name */ + public ServerName_str: string = ""; + + /** Port number of the server */ + public ServerPort_u32: number = 0; + + /** Server product name */ + public ServerProductName_str: string = ""; + + /** Server product version */ + public ServerProductVer_u32: number = 0; + + /** Server product build number */ + public ServerProductBuild_u32: number = 0; + + /** Connection start time */ + public StartTime_dt: Date = new Date(); + + /** Connection completion time of the first connection */ + public FirstConnectionEstablisiedTime_dt: Date = new Date(); + + /** Connection completion time of this connection */ + public CurrentConnectionEstablishTime_dt: Date = new Date(); + + /** Number of connections have been established so far */ + public NumConnectionsEatablished_u32: number = 0; + + /** Half-connection */ + public HalfConnection_bool: boolean = false; + + /** VoIP / QoS */ + public QoS_bool: boolean = false; + + /** Maximum number of the underlying TCP connections */ + public MaxTcpConnections_u32: number = 0; + + /** Number of current underlying TCP connections */ + public NumTcpConnections_u32: number = 0; + + /** Number of inbound underlying connections */ + public NumTcpConnectionsUpload_u32: number = 0; + + /** Number of outbound underlying connections */ + public NumTcpConnectionsDownload_u32: number = 0; + + /** Use of encryption */ + public UseEncrypt_bool: boolean = false; + + /** Cipher algorithm name */ + public CipherName_str: string = ""; + + /** Use of compression */ + public UseCompress_bool: boolean = false; + + /** Is R-UDP session */ + public IsRUDPSession_bool: boolean = false; + + /** Physical underlying communication protocol */ + public UnderlayProtocol_str: string = ""; + + /** The UDP acceleration is enabled */ + public IsUdpAccelerationEnabled_bool: boolean = false; + + /** Using the UDP acceleration function */ + public IsUsingUdpAcceleration_bool: boolean = false; + + /** VPN session name */ + public SessionName_str: string = ""; + + /** Connection name */ + public ConnectionName_str: string = ""; + + /** Session key */ + public SessionKey_bin: Uint8Array = new Uint8Array([]); + + /** Total transmitted data size */ + public TotalSendSize_u64: number = 0; + + /** Total received data size */ + public TotalRecvSize_u64: number = 0; + + /** Total transmitted data size (no compression) */ + public TotalSendSizeReal_u64: number = 0; + + /** Total received data size (no compression) */ + public TotalRecvSizeReal_u64: number = 0; + + /** Is Bridge Mode */ + public IsBridgeMode_bool: boolean = false; + + /** Is Monitor mode */ + public IsMonitorMode_bool: boolean = false; + + /** VLAN ID */ + public VLanId_u32: number = 0; + + /** Client product name */ + public ClientProductName_str: string = ""; + + /** Client version */ + public ClientProductVer_u32: number = 0; + + /** Client build number */ + public ClientProductBuild_u32: number = 0; + + /** Client OS name */ + public ClientOsName_str: string = ""; + + /** Client OS version */ + public ClientOsVer_str: string = ""; + + /** Client OS Product ID */ + public ClientOsProductId_str: string = ""; + + /** Client host name */ + public ClientHostname_str: string = ""; + + /** Unique ID */ + public UniqueId_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcSessionStatus' class: VPN Session status */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Set the special listener */ +export class VpnRpcSpecialListener +{ + /** The flag to activate the VPN over ICMP server function */ + public VpnOverIcmpListener_bool: boolean = false; + + /** The flag to activate the VPN over DNS function */ + public VpnOverDnsListener_bool: boolean = false; + + /** Constructor for the 'VpnRpcSpecialListener' class: Set the special listener */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Syslog configuration */ +export enum VpnSyslogSaveType +{ + /** Do not use syslog */ + None = 0, + + /** Only server log */ + ServerLog = 1, + + /** Server and Virtual HUB security log */ + ServerAndHubSecurityLog = 2, + + /** Server, Virtual HUB security, and packet log */ + ServerAndHubAllLog = 3, + +} + +/** Syslog configuration */ +export class VpnSyslogSetting +{ + /** The behavior of the syslog function */ + public SaveType_u32: VpnSyslogSaveType = 0; + + /** Specify the host name or IP address of the syslog server */ + public Hostname_str: string = ""; + + /** Specify the port number of the syslog server */ + public Port_u32: number = 0; + + /** Constructor for the 'VpnSyslogSetting' class: Syslog configuration */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** VPN Gate Server Config */ +export class VpnVgsConfig +{ + /** Active flag */ + public IsEnabled_bool: boolean = false; + + /** Message */ + public Message_utf: string = ""; + + /** Owner name */ + public Owner_utf: string = ""; + + /** Abuse email */ + public Abuse_utf: string = ""; + + /** Log save flag */ + public NoLog_bool: boolean = false; + + /** Save log permanently */ + public LogPermanent_bool: boolean = false; + + /** Enable the L2TP VPN function */ + public EnableL2TP_bool: boolean = false; + + /** Constructor for the 'VpnVgsConfig' class: VPN Gate Server Config */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Read a Log file */ +export class VpnRpcReadLogFile +{ + /** Server name */ + public ServerName_str: string = ""; + + /** File Path */ + public FilePath_str: string = ""; + + /** Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. */ + public Offset_u32: number = 0; + + /** Received buffer */ + public Buffer_bin: Uint8Array = new Uint8Array([]); + + /** Constructor for the 'VpnRpcReadLogFile' class: Read a Log file */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Rename link */ +export class VpnRpcRenameLink +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** The old name of the cascade connection */ + public OldAccountName_utf: string = ""; + + /** The new name of the cascade connection */ + public NewAccountName_utf: string = ""; + + /** Constructor for the 'VpnRpcRenameLink' class: Rename link */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Online or offline the HUB */ +export class VpnRpcSetHubOnline +{ + /** The Virtual Hub name */ + public HubName_str: string = ""; + + /** Online / offline flag */ + public Online_bool: boolean = false; + + /** Constructor for the 'VpnRpcSetHubOnline' class: Online or offline the HUB */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + +/** Set Password */ +export class VpnRpcSetPassword +{ + /** The plaintext password */ + public PlainTextPassword_str: string = ""; + + /** Constructor for the 'VpnRpcSetPassword' class: Set Password */ + public constructor(init?: Partial) + { + Object.assign(this, init); + } +} + + + + + +// --- Utility codes --- + +/** JSON-RPC request class. See https://www.jsonrpc.org/specification */ +export class JsonRpcRequest +{ + public jsonrpc: string = "2.0"; + public method: string; + public params: any; + public id: string; + + constructor(method: string = "", param: any = null, id: string = "") + { + this.method = method; + this.params = param; + this.id = id; + } +} + +/** JSON-RPC error class. See https://www.jsonrpc.org/specification */ +export class JsonRpcError +{ + public code: number; + public message: string; + public data: any; + + constructor(code: number = 0, message: string = "", data: any = null) + { + this.code = code; + this.message = message; + this.data = data; + } +} + +/** JSON-RPC response class with generics */ +export class JsonRpcResponse +{ + public jsonrpc: string = "2.0"; + public result: TResult = null!; + public error: JsonRpcError = null!; + public id: string = ""; +} + +/** JSON-RPC client class. See https://www.jsonrpc.org/specification */ +export class JsonRpcClient +{ + /** A utility function to convert any object to JSON string */ + public static ObjectToJson(obj: any): string + { + return JSON.stringify(obj, + (key, value) => + { + if (key.endsWith("_bin")) + { + return Util_Base64_Encode(value); + } + return value; + } + , 4); + } + + /** A utility function to convert JSON string to object */ + public static JsonToObject(str: string): any + { + return JSON.parse(str, + (key, value) => + { + if (key.endsWith("_bin")) + { + return Util_Base64_Decode(value); + } + else if (key.endsWith("_dt")) + { + return new Date(value); + } + return value; + }); + } + + /** Base URL */ + public BaseUrl: string; + + /** The instance of HTTP client */ + private client: HttpClient; + + /** Additional HTTP headers */ + private headers: { [name: string]: string }; + + /** + * JSON-RPC client class constructor + * @param url The URL + * @param headers Additional HTTP headers + * @param send_credential Set true to use the same credential with the browsing web site. Valid only if the code is running on the web browser. + */ + constructor(url: string, headers: { [name: string]: string }, send_credential: boolean, nodejs_https_client_reject_untrusted_server_cert: boolean) + { + this.BaseUrl = url; + this.headers = headers; + + this.client = new HttpClient(); + this.client.SendCredential = send_credential; + this.client.NodeJS_HTTPS_Client_Reject_Unauthorized = nodejs_https_client_reject_untrusted_server_cert; + } + + /** + * Call a single RPC call (without error check). You can wait for the response with Promise or await statement. + * @param method_name The name of RPC method + * @param param The parameters + */ + public async CallInternalAsync(method_name: string, param: any): Promise + { + let id = "1"; + + let req = new JsonRpcRequest(method_name, param, id); + + let req_string = JsonRpcClient.ObjectToJson(req); + + if (debug_mode) + { + console.log("--- RPC Request Body ---"); + console.log(req_string); + console.log("------------------------"); + } + + let http_response = await this.client.PostAsync(this.BaseUrl, this.headers, + req_string, "application/json"); + + let ret_string = http_response.Body; + + if (debug_mode) + { + console.log("--- RPC Response Body ---"); + console.log(ret_string); + console.log("-------------------------"); + } + + return ret_string; + } + + /** + * Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + * @param method_name The name of RPC method + * @param param The parameters + */ + public async CallAsync(method_name: string, param: any): Promise + { + let ret_string = await this.CallInternalAsync(method_name, param); + + let ret: JsonRpcResponse = JSON.parse(ret_string); + + if (is_null(ret.error) === false) + { + throw new JsonRpcException(ret.error); + } + + return ret.result; + } +} + +/** JSON-RPC exception class */ +export class JsonRpcException extends Error +{ + public Error: JsonRpcError; + + constructor(error: JsonRpcError) + { + super(`Code=${error.code}, Message=${error.message}`); + this.Error = error; + } +} + +/** HTTP client exception class */ +export class HttpClientException extends Error +{ + constructor(message: string) + { + super(message); + } +} + +/** HTTP client response class */ +export class HttpClientResponse +{ + public Body: string = ""; +} + +/** An HTTP client which can be used in both web browsers and Node.js */ +export class HttpClient +{ + public TimeoutMsecs: number = 60 * 5 * 1000; + public SendCredential: boolean = true; + public NodeJS_HTTPS_Client_Reject_Unauthorized: boolean = false; + + /** Post method. In web browsers this function will process the request by itself. In Node.js this function will call PostAsync_NodeJS() instead. */ + public async PostAsync(url: string, headers: { [name: string]: string }, + req_body: string, req_media_type: string): Promise + { + if (is_node_js) + { + return this.PostAsync_NodeJS(url, headers, req_body, req_media_type); + } + + let fetch_header_list = new Headers(); + + for (let name of Object.keys(headers)) + { + fetch_header_list.append(name, headers[name]); + } + + let fetch_init: RequestInit = + { + mode: "cors", + headers: fetch_header_list, + credentials: (this.SendCredential ? "include" : "omit"), + method: "POST", + cache: "no-cache", + keepalive: true, + redirect: "follow", + body: req_body, + }; + + let fetch_response = await fetch(url, fetch_init); + + if (fetch_response.ok === false) + { + throw new HttpClientException("HTTP Error: " + fetch_response.status + " " + fetch_response.statusText); + } + + let ret = new HttpClientResponse(); + + ret.Body = await fetch_response.text(); + + return ret; + } + + /** Post method for Node.js. */ + public PostAsync_NodeJS(url: string, headers: { [name: string]: string }, + req_body: string, req_media_type: string): Promise + { + const https = require("https"); + const keepAliveAgent = new https.Agent({ keepAlive: true }); + const urlparse = require("url"); + + const urlobj = urlparse.parse(url); + + if (is_null(urlobj.host)) throw new Error("URL is invalid."); + + let options = + { + host: urlobj.hostname, + port: urlobj.port, + path: urlobj.path, + rejectUnauthorized: this.NodeJS_HTTPS_Client_Reject_Unauthorized, + method: "POST", + timeout: this.TimeoutMsecs, + agent: keepAliveAgent, + }; + + return new Promise(function (resolve, reject) + { + let req = https.request(options, (res: any) => + { + if (res.statusCode !== 200) + { + reject(new HttpClientException("HTTP Error: " + res.statusCode + " " + res.statusMessage)); + } + + let recv_str: string = ""; + + res.on("data", (body: any) => + { + recv_str += body; + }); + + res.on("end", () => + { + let ret = new HttpClientResponse(); + + ret.Body = recv_str; + + resolve(ret); + }); + }).on("error", (err: any) => + { + throw err; + } + ); + + for (let name of Object.keys(headers)) + { + req.setHeader(name, !is_null(headers[name]) ? headers[name] : ""); + } + req.setHeader("Content-Type", req_media_type); + req.setHeader("Content-Length", Buffer.byteLength(req_body)); + req.write(req_body); + req.end(); + }); + } +} + + + + +//////// BEGIN: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js +// The MIT License(MIT) +// Copyright(c) 2014 +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +var lookup: any = []; +var revLookup: any = []; + +var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +for (var i = 0, len = code.length; i < len; ++i) +{ + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup["-".charCodeAt(0)] = 62; +revLookup["_".charCodeAt(0)] = 63; + +function getLens(b64: any) +{ + var len = b64.length; + + if (len % 4 > 0) + { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf("="); + if (validLen === -1) validLen = len; + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4); + + return [validLen, placeHoldersLen]; +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength(b64: any) +{ + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} + +function _byteLength(b64: any, validLen: any, placeHoldersLen: any) +{ + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} + +export function Util_Base64_Decode(b64: any) +{ + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + + var arr = new Uint8Array(_byteLength(b64, validLen, placeHoldersLen)); + + var curByte = 0; + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen; + + for (var i = 0; i < len; i += 4) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)]; + arr[curByte++] = (tmp >> 16) & 0xFF; + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + + if (placeHoldersLen === 2) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[curByte++] = tmp & 0xFF; + } + + if (placeHoldersLen === 1) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + + return arr; +} + +function tripletToBase64(num: any) +{ + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F]; +} + +function encodeChunk(uint8: any, start: any, end: any) +{ + var tmp; + var output = []; + for (var i = start; i < end; i += 3) + { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF); + output.push(tripletToBase64(tmp)); + } + return output.join(""); +} + +export function Util_Base64_Encode(uint8: any) +{ + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) + { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) + { + tmp = uint8[len - 1]; + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + "==" + ); + } else if (extraBytes === 2) + { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + "=" + ); + } + + return parts.join(""); +} +//////// END: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js + + + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/.gitignore b/developer_tools/vpnserver-jsonrpc-codegen/.gitignore new file mode 100644 index 00000000..ab0f72cb --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/.gitignore @@ -0,0 +1,350 @@ +# Created by https://www.gitignore.io/api/visualstudio +# Edit at https://www.gitignore.io/?templates=visualstudio + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- Backup*.rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# End of https://www.gitignore.io/api/visualstudio diff --git a/developer_tools/vpnserver-jsonrpc-codegen/CodeGen/CodeGen.cs b/developer_tools/vpnserver-jsonrpc-codegen/CodeGen/CodeGen.cs new file mode 100644 index 00000000..82aedf17 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/CodeGen/CodeGen.cs @@ -0,0 +1,2067 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text; +using System.Linq; +using static System.Console; +using System.Xml.Linq; +using SoftEther.JsonRpc; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using Markdig; + +namespace VPNServer_JSONRPC_CodeGen +{ + public enum TargetLang + { + CSharp, + TypeScript, + } + + static class CodeGenUtil + { + public static string AppExeDir; + public static string ProjectDir; + public static string VpnSrcDir; + public static string OutputDir_Clients; + public static string OutputDir_HamCore; + + static CodeGenUtil() + { + AppExeDir = System.AppContext.BaseDirectory; + ProjectDir = AppExeDir; + string tmp = AppExeDir; + while (true) + { + try + { + tmp = Path.GetDirectoryName(tmp); + if (Directory.GetFiles(tmp, "*.csproj").Length >= 1) + { + ProjectDir = tmp; + break; + } + } + catch + { + break; + } + } + OutputDir_Clients = Path.Combine(ProjectDir, @"..\vpnserver-jsonrpc-clients"); + + string root_dir = Path.Combine(ProjectDir, @"..\.."); + string dirname = null; + if (Directory.Exists(Path.Combine(root_dir, "Main"))) dirname = "Main"; + if (Directory.Exists(Path.Combine(root_dir, "src"))) dirname = "src"; + if (string.IsNullOrEmpty(dirname)) throw new ApplicationException($"Directory '{root_dir}' is not a root dir."); + + VpnSrcDir = dirname; + + OutputDir_HamCore = Path.Combine(root_dir, dirname, @"bin\hamcore"); + if (Directory.Exists(OutputDir_HamCore) == false) throw new ApplicationException($"Direction '{OutputDir_HamCore}' not found."); + } + + public static void MakeDir(string path) + { + try + { + Directory.CreateDirectory(path); + } + catch + { + } + } + } + + class CSharpSourceCode + { + public SyntaxTree Tree { get; } + public CompilationUnitSyntax Root { get; } + public SemanticModel Model { get; set; } + + public CSharpSourceCode(string filename) : this(File.ReadAllText(filename), filename) + { + } + + public CSharpSourceCode(string body, string filename) + { + this.Tree = CSharpSyntaxTree.ParseText(body, path: filename); + this.Root = this.Tree.GetCompilationUnitRoot(); + } + } + + + class CSharpCompiler + { + public string AssemblyName { get; } + public List ReferencesList { get; } = new List(); + public List SourceCodeList { get; } = new List(); + + CSharpCompilation _compilation = null; + + public CSharpCompilation Compilation + { + get + { + if (_compilation == null) + { + _compilation = CSharpCompilation.Create(this.AssemblyName, + this.SourceCodeList.Select(s => s.Tree), + this.ReferencesList, + options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, optimizationLevel: OptimizationLevel.Debug, + assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default)); + + } + return _compilation; + } + } + + public CSharpCompiler(string assembly_name) + { + this.AssemblyName = assembly_name; + } + + public void AddReference(MetadataReference r) + { + this.ReferencesList.Add(r); + } + public void AddReferenceByPath(string path) + { + AddReference(MetadataReference.CreateFromFile(path)); + } + public void AddReferenceByType(Type type) + { + AddReferenceByPath(type.Assembly.Location); + } + public void AddReferenceByAssemblyName(string name) + { + var a = System.Reflection.Assembly.Load(new System.Reflection.AssemblyName(name)); + + AddReferenceByPath(a.Location); + } + public void AddReferenceDotNetStandard() + { + var a = System.Reflection.Assembly.Load(new System.Reflection.AssemblyName("netstandard")); + + AddReferenceByPath(a.Location); + + string dir = Path.GetDirectoryName(a.Location); + + AddReferenceByPath(Path.Combine(dir, "System.Private.CoreLib.dll")); + + foreach (var refa in a.GetReferencedAssemblies()) + { + string dll_name = Path.Combine(dir, refa.Name) + ".dll"; + + if (File.Exists(dll_name)) + { + AddReferenceByPath(dll_name); + } + } + } + + public void AddSourceCode(CSharpSourceCode cs) + { + this.SourceCodeList.Add(cs); + } + + public bool OkOrPrintErrors() + { + MemoryStream ms = new MemoryStream(); + Microsoft.CodeAnalysis.Emit.EmitResult ret = Compilation.Emit(ms); + + if (ret.Success) + { + return true; + } + + IEnumerable failures = ret.Diagnostics.Where(diagnostic => + diagnostic.IsWarningAsError || + diagnostic.Severity == DiagnosticSeverity.Error); + + foreach (Diagnostic diagnostic in failures) + { + WriteLine(diagnostic.ToString()); + } + return false; + } + + public void Compile(bool test_full_compile = false) + { + if (test_full_compile) + { + if (OkOrPrintErrors() == false) + { + throw new ApplicationException("Compile Error."); + } + } + + foreach (CSharpSourceCode cs in this.SourceCodeList) + { + cs.Model = this.Compilation.GetSemanticModel(cs.Tree); + } + } + } + + class GeneratedCodePart + { + public int Seq = 0; + public string Text = ""; + } + + class GeneratedCodeSection + { + public List PartList = new List(); + + public override string ToString() + { + StringWriter w = new StringWriter(); + var a = this.PartList.OrderBy(x => x.Seq); + + foreach (var b in a) + { + w.Write(b.Text.ToString()); + } + + return w.ToString(); + } + + public void AddPart(int seq, string text) + { + this.PartList.Add(new GeneratedCodePart() { Seq = seq, Text = text }); + } + } + + class GeneratedCode + { + public GeneratedCodeSection Types = new GeneratedCodeSection(); + public GeneratedCodeSection Stubs = new GeneratedCodeSection(); + public GeneratedCodeSection Tests = new GeneratedCodeSection(); + + public override string ToString() + { + StringWriter w = new StringWriter(); + + w.WriteLine("// --- Types ---"); + w.Write(this.Types.ToString()); + w.WriteLine(); + + w.WriteLine("// --- Stubs ---"); + w.Write(this.Stubs.ToString()); + w.WriteLine(); + + w.WriteLine("// --- Tests ---"); + w.Write(this.Tests.ToString()); + w.WriteLine(); + + return w.ToString(); + } + } + + class GeneratedCodeForLang + { + public GeneratedCode TypeScript = new GeneratedCode(); + + public string DocsRpc = ""; + } + + static class CodeGenExtensions + { + public static string GetDocumentStr(this ISymbol sym) + { + if (sym == null) return ""; + string xml = sym.GetDocumentationCommentXml(); + if (string.IsNullOrEmpty(xml)) return ""; + XDocument doc = XDocument.Parse(xml); + var summary = doc.Descendants("summary").FirstOrDefault(); + string str = summary.Value; + if (string.IsNullOrEmpty(str)) return ""; + str = str.Replace(" (Async mode)", "", StringComparison.InvariantCultureIgnoreCase); + str = str.Trim(); + return str; + } + } + + class RpcInfo + { + public string Name; + public string TypeName; + + public IMethodSymbol Symbol; + + public HashSet InputParamMembers = new HashSet(); + } + + class RpcTypeParameterInfo + { + public string Name; + public string Type; + public string Description; + } + + class RpcTypeInfo + { + public string Name; + public string Description; + + public List Params = new List(); + public List SubTypes = new List(); + } + + class CodeGen + { + CSharpSourceCode cs_types, cs_stubs, cs_tests; + + public Dictionary rpc_list = new Dictionary(); + public Dictionary rpc_type_list = new Dictionary(); + + CSharpCompiler csc; + + public CodeGen() + { + csc = new CSharpCompiler("Test"); + + csc.AddReferenceDotNetStandard(); + csc.AddReferenceByType(typeof(Newtonsoft.Json.JsonPropertyAttribute)); + + cs_types = new CSharpSourceCode(Path.Combine(CodeGenUtil.ProjectDir, @"VpnServerRpc\VPNServerRpcTypes.cs")); + csc.AddSourceCode(cs_types); + + cs_stubs = new CSharpSourceCode(Path.Combine(CodeGenUtil.ProjectDir, @"VpnServerRpc\VPNServerRpc.cs")); + csc.AddSourceCode(cs_stubs); + + cs_tests = new CSharpSourceCode(Path.Combine(CodeGenUtil.ProjectDir, @"VpnServerRpcTest\VpnServerRpcTest.cs")); + csc.AddSourceCode(cs_tests); + + csc.Compile(); + } + + void generate_types(GeneratedCodeForLang ret) + { + var model = cs_types.Model; + + var class_list = cs_types.Root.DescendantNodes().OfType(); + + foreach (ClassDeclarationSyntax c in class_list) + { + StringWriter ts = new StringWriter(); + + string doc = model.GetDeclaredSymbol(c).GetDocumentStr(); + if (string.IsNullOrEmpty(doc) == false) + { + ts.WriteLine($"/** {doc} */"); + } + + RpcTypeInfo info = new RpcTypeInfo() + { + Name = c.Identifier.Text, + Description = doc, + }; + rpc_type_list[c.Identifier.Text] = info; + + ts.WriteLine($"export class {c.Identifier.Text}"); + ts.WriteLine("{"); + + foreach (var member in model.GetDeclaredSymbol(c).GetMembers()) + { + string json_name = ""; + bool json_name_has_special_char = false; + var atts = member.GetAttributes(); + var y = atts.Where(x => x.AttributeClass.Name == "JsonPropertyAttribute").FirstOrDefault(); + if (y != null) + { + json_name = y.ConstructorArguments.FirstOrDefault().Value.ToString(); + if (json_name.IndexOf(':') != -1 || json_name.IndexOf('.') != -1) json_name_has_special_char = true; + } + + string default_value = "\"\""; + + string enum_type = ""; + + switch (member) + { + case IFieldSymbol field: + string ts_type = ""; + ITypeSymbol type = field.Type; + switch (type.Kind) + { + case SymbolKind.NamedType: + switch (type.Name) + { + case "UInt32": + case "UInt64": + ts_type = "number"; + default_value = "0"; + break; + + case "String": + ts_type = "string"; + break; + + case "Boolean": + ts_type = "boolean"; + default_value = "false"; + break; + + case "DateTime": + ts_type = "Date"; + default_value = "new Date()"; + break; + + default: + if (type.TypeKind == TypeKind.Enum) + { + ts_type = type.Name; + enum_type = type.Name; + default_value = "0"; + break; + } + throw new ApplicationException($"{c.Identifier}.{member.Name}: type.Name = {type.Name}"); + } + break; + + case SymbolKind.ArrayType: + ITypeSymbol type2 = ((IArrayTypeSymbol)type).ElementType; + + default_value = "[]"; + + switch (type2.Kind) + { + case SymbolKind.NamedType: + switch (type2.Name) + { + case "UInt32": + case "UInt64": + ts_type = "number[]"; + break; + + case "String": + ts_type = "string[]"; + break; + + case "Boolean": + ts_type = "boolean[]"; + break; + + case "Byte": + ts_type = "Uint8Array"; + default_value = "new Uint8Array([])"; + break; + + default: + if (type2.ContainingAssembly.Name == csc.AssemblyName) + { + ts_type = type2.Name + "[]"; + enum_type = type2.Name; + break; + } + throw new ApplicationException($"{c.Identifier}.{member.Name}: type2.Name = {type2.Name}"); + } + break; + + default: + throw new ApplicationException($"{c.Identifier}.{member.Name}: type2.Kind = {type2.Kind}"); + } + + break; + + default: + throw new ApplicationException($"{c.Identifier}.{member.Name}: type.Kind = {type.Kind}"); + } + + if (string.IsNullOrEmpty(ts_type) == false) + { + string field_name = field.Name; + string doc2 = member.GetDocumentStr(); + + if (string.IsNullOrEmpty(json_name) == false) field_name = json_name; + + string info_type = ts_type; + string info_type2 = ""; + if (field_name.EndsWith("_str")) info_type2 = "ASCII"; + if (field_name.EndsWith("_utf")) info_type2 = "UTF8"; + if (field_name.EndsWith("_ip")) info_type2 = "IP address"; + if (field_name.EndsWith("_u32")) info_type2 = "uint32"; + if (field_name.EndsWith("_u64")) info_type2 = "uint64"; + if (field_name.EndsWith("_bin")) { info_type2 = "Base64 binary"; info_type = "string"; } + + string docs_add = ""; + + if (string.IsNullOrEmpty(enum_type) == false) + { + Type et = Type.GetType("SoftEther.VPNServerRpc." + enum_type); + if (et.IsEnum) + { + docs_add += "
Values:"; + + var ed = cs_types.Root.DescendantNodes().OfType() + .Where(e => e.Identifier.Text == enum_type) + .Single(); + + foreach (var em in model.GetDeclaredSymbol(ed).GetMembers()) + { + switch (em) + { + case IFieldSymbol ef: + if (ef.IsConst && ef.IsDefinition) + { + string doc3 = em.GetDocumentStr(); + docs_add += $"
`{ef.ConstantValue}`: {doc3}"; + } + break; + } + } + + info_type = "number"; + info_type2 = "enum"; + } + else + { + if (info.SubTypes.Contains(enum_type) == false) + { + info.SubTypes.Add(enum_type); + info_type = "Array object"; + } + } + } + + info_type = "`" + info_type + "`"; + if (string.IsNullOrEmpty(info_type2) == false) info_type += " (" + info_type2 + ")"; + + info.Params.Add(new RpcTypeParameterInfo() + { + Name = field_name, + Type = info_type, + Description = doc2 + docs_add, + }); + + if (json_name_has_special_char) field_name = $"[\"{json_name}\"]"; + + if (string.IsNullOrEmpty(doc2) == false) + { + ts.WriteLine($" /** {doc2} */"); + } + + ts.WriteLine($" public {field_name}: {ts_type} = {default_value};"); + + ts.WriteLine(); + } + break; + + case IMethodSymbol method when method.MethodKind == MethodKind.Constructor: + break; + + default: + throw new ApplicationException($"{c.Identifier}.{member.Name}: type = {member.GetType()}"); + } + } + + if (string.IsNullOrEmpty(doc) == false) + { + ts.WriteLine($" /** Constructor for the '{c.Identifier.Text}' class: {doc} */"); + } + ts.WriteLine($" public constructor(init?: Partial<{c.Identifier.Text}>)"); + ts.WriteLine(" {"); + ts.WriteLine(" Object.assign(this, init);"); + ts.WriteLine(" }"); + + ts.WriteLine("}"); + ts.WriteLine(); + + ret.TypeScript.Types.AddPart(c.SpanStart, ts.ToString()); + } + + var enum_list = cs_types.Root.DescendantNodes().OfType(); + + foreach (EnumDeclarationSyntax e in enum_list) + { + StringWriter ts = new StringWriter(); + + string doc = model.GetDeclaredSymbol(e).GetDocumentStr(); + if (string.IsNullOrEmpty(doc) == false) + { + ts.WriteLine($"/** {doc} */"); + } + + ts.WriteLine($"export enum {e.Identifier.Text}"); + ts.WriteLine("{"); + + foreach (var member in model.GetDeclaredSymbol(e).GetMembers()) + { + switch (member) + { + case IFieldSymbol field: + if (field.IsConst && field.IsDefinition) + { + string doc2 = member.GetDocumentStr(); + if (string.IsNullOrEmpty(doc2) == false) + { + ts.WriteLine($" /** {doc2} */"); + } + + ts.WriteLine($" {field.Name} = {field.ConstantValue},"); + + ts.WriteLine(); + } + break; + } + } + + ts.WriteLine("}"); + ts.WriteLine(); + + ret.TypeScript.Types.AddPart(e.SpanStart, ts.ToString()); + } + } + + void generate_stubs(GeneratedCodeForLang ret) + { + var model = cs_stubs.Model; + + var rpc_class = cs_stubs.Root.DescendantNodes().OfType().Where(c => c.Identifier.Text == "VpnServerRpc").First(); + + var members = model.GetDeclaredSymbol(rpc_class).GetMembers(); + + var methods = members.Where(m => m is IMethodSymbol).Select(m => m as IMethodSymbol).Where(m => m.IsStatic == false) + .Where(m => m.IsAsync).Where(m => m.Name != "CallAsync"); + + foreach (var method in methods) + { + string method_name = method.Name; + if (method_name.EndsWith("Async") == false) throw new ApplicationException($"{method.Name}: method_name = {method_name}"); + method_name = method_name.Substring(0, method_name.Length - 5); + + INamedTypeSymbol ret_type = (INamedTypeSymbol)method.ReturnType; + if (ret_type.Name != "Task") throw new ApplicationException($"{method.Name}: ret_type.Name = {ret_type.Name}"); + + var ret_type_args = ret_type.TypeArguments; + if (ret_type_args.Length != 1) throw new ApplicationException($"{method.Name}: type_args.Length = {ret_type_args.Length}"); + + var ret_type_name = ret_type_args[0].Name; + + if (method.Parameters.Length >= 2) throw new ApplicationException($"{method.Name}: method.Parameters.Length = {method.Parameters.Length}"); + + if (method.DeclaringSyntaxReferences.Length != 1) throw new ApplicationException($"{method.Name}: method.DeclaringSyntaxReferences.Length = {method.DeclaringSyntaxReferences.Length}"); + + MethodDeclarationSyntax syntax = (MethodDeclarationSyntax)method.DeclaringSyntaxReferences[0].GetSyntax(); + if (syntax.Body != null) throw new ApplicationException($"{method.Name}: syntax.Body != null"); + if (syntax.ExpressionBody == null) throw new ApplicationException($"{method.Name}: syntax.ExpressionBody == null"); + + ArrowExpressionClauseSyntax body = syntax.ExpressionBody; + InvocationExpressionSyntax invoke = body.DescendantNodes().OfType().Single(); + + if (model.GetSymbolInfo(invoke.Expression).Symbol.Name != "CallAsync") throw new ApplicationException($"{method.Name}: model.GetSymbolInfo(invoke.Expression).Symbol.Name = {model.GetSymbolInfo(invoke.Expression).Symbol.Name}"); + + if (invoke.ArgumentList.Arguments.Count != 2) throw new ApplicationException($"{method.Name}: invoke.ArgumentList.Arguments.Count = {invoke.ArgumentList.Arguments.Count}"); + + LiteralExpressionSyntax str_syntax = (LiteralExpressionSyntax)invoke.ArgumentList.Arguments[0].Expression; + + string str = str_syntax.Token.Text; + + StringWriter ts = new StringWriter(); + + string doc2 = method.GetDocumentStr(); + if (string.IsNullOrEmpty(doc2) == false) + { + ts.WriteLine($" /** {doc2} */"); + } + + if (method.Parameters.Length == 0) + { + ts.WriteLine($" public {method_name} = (): Promise<{ret_type_name}> =>"); + ts.WriteLine(" {"); + ts.WriteLine($" return this.CallAsync<{ret_type_name}>({str}, new {ret_type_name}());"); + ts.WriteLine(" }"); + ts.WriteLine(" "); + } + else + { + ts.WriteLine($" public {method_name} = (in_param: {ret_type_name}): Promise<{ret_type_name}> =>"); + ts.WriteLine(" {"); + ts.WriteLine($" return this.CallAsync<{ret_type_name}>({str}, in_param);"); + ts.WriteLine(" }"); + ts.WriteLine(" "); + } + + rpc_list[method_name] = new RpcInfo() + { + Name = method_name, + TypeName = ret_type_name, + Symbol = method, + }; + + ret.TypeScript.Stubs.AddPart(method.DeclaringSyntaxReferences[0].Span.Start, ts.ToString()); + } + } + + class CcWalker : CSharpSyntaxWalker + { + StringWriter w = new StringWriter(); + + List lines = new List(); + string current_line = ""; + int current_depth = 0; + const int TabSpace = 4; + CSharpSourceCode src; + + TargetLang lang; + + public CcWalker(CSharpSourceCode src, TargetLang lang) : base(SyntaxWalkerDepth.StructuredTrivia) + { + this.src = src; + this.lang = lang; + } + + string convert_type(string src) + { + if (lang == TargetLang.TypeScript) + { + if (src.StartsWith("Vpn")) + { + src = "VPN." + src; + } + + if (src == "int" || src == "uint" || src == "long" || src == "ulong") + { + src = "number"; + } + + if (src == "bool") + { + src = "boolean"; + } + + if (src == "DateTime") + { + src = "Date"; + } + } + return src; + } + + string convert_function(string src) + { + if (lang == TargetLang.TypeScript) + { + if (src == "Console.WriteLine" || src == "print_object") + { + src = "console.log"; + } + + if (src.StartsWith("api.") || src.StartsWith("Test_")) + { + src = "await " + src; + } + } + return src; + } + + void _emit_internal(string str, bool new_line) + { + if (string.IsNullOrEmpty(current_line)) + { + current_line += new string(' ', current_depth * TabSpace); + } + current_line += str; + if (new_line) + { + lines.Add(current_line); + current_line = ""; + } + } + + void emit_line(string str = "") => emit(str + "\r\n"); + + void emit(string str, bool new_line) + { + if (new_line == false) + { + emit(str); + } + else + { + emit_line(str); + } + } + + void emit(string str) + { + string tmp = ""; + for (int i = 0; i < str.Length; i++) + { + char c = str[i]; + if (c == '\r') { } + else if (c == '\n') + { + _emit_internal(tmp, true); + tmp = ""; + } + else + { + tmp += c; + } + } + if (String.IsNullOrEmpty(tmp) == false) + { + _emit_internal(tmp, false); + } + } + + public override void VisitMethodDeclaration(MethodDeclarationSyntax node) + { + if (node.Identifier.Text == "print_object") return; + + if (lang == TargetLang.TypeScript) + { + emit_line(); + + var sem = src.Model.GetDeclaredSymbol(node); + string doc2 = sem.GetDocumentStr(); + if (string.IsNullOrEmpty(doc2) == false) + { + emit_line($"/** {doc2} */"); + } + + emit("async function "); + emit(node.Identifier.Text); + Visit(node.ParameterList); + emit(": "); + emit("Promise<"); + Visit(node.ReturnType); + emit(">"); + emit_line(""); + + Visit(node.Body); + } + else + { + emit("public"); + emit(" "); + Visit(node.ReturnType); + emit(" "); + emit(node.Identifier.Text); + Visit(node.ParameterList); + emit_line(""); + + Visit(node.Body); + } + } + + public override void VisitParameter(ParameterSyntax node) + { + if (lang == TargetLang.TypeScript) + { + emit($"{node.Identifier.Text}"); + emit(": "); + Visit(node.Type); + } + else + { + Visit(node.Type); + emit(" "); + emit($"{node.Identifier.Text}"); + } + } + + public override void VisitParameterList(ParameterListSyntax node) + { + emit("("); + int num = 0; + foreach (ParameterSyntax p in node.Parameters) + { + if (num >= 1) + { + emit(", "); + } + + Visit(p); + + num++; + } + emit(")"); + } + + public override void VisitArgumentList(ArgumentListSyntax node) + { + emit("("); + int num = 0; + foreach (ArgumentSyntax arg in node.Arguments) + { + if (num >= 1) + { + emit(", "); + } + + this.VisitArgument(arg); + + num++; + } + emit(")"); + } + + public override void VisitAssignmentExpression(AssignmentExpressionSyntax node) + { + if (lang == TargetLang.TypeScript) + { + if (node.Parent.Kind() == SyntaxKind.ObjectInitializerExpression) + { + Visit(node.Left); + + emit(": "); + + Visit(node.Right); + } + else + { + Visit(node.Left); + + emit(" = "); + + Visit(node.Right); + } + } + else + { + Visit(node.Left); + + emit(" = "); + + Visit(node.Right); + } + } + + public override void VisitMemberAccessExpression(MemberAccessExpressionSyntax node) + { + Visit(node.Expression); + + emit(node.OperatorToken.Text); + + Visit(node.Name); + } + + public override void VisitCastExpression(CastExpressionSyntax node) + { + if (lang == TargetLang.TypeScript) + { + Visit(node.Expression); + } + else + { + emit("("); + Visit(node.Type); + emit(")"); + Visit(node.Expression); + } + } + + public override void VisitBreakStatement(BreakStatementSyntax node) + { + emit_line("break;"); + } + + public override void VisitReturnStatement(ReturnStatementSyntax node) + { + if (node.Expression == null) + { + emit_line("return;"); + } + else + { + emit("return"); + emit(" "); + Visit(node.Expression); + emit_line(";"); + } + } + + public override void VisitForEachStatement(ForEachStatementSyntax node) + { + if (lang == TargetLang.TypeScript) + { + emit("for (let "); + emit(node.Identifier.Text); + emit(" of "); + Visit(node.Expression); + emit_line(")"); + Visit(node.Statement); + } + else + { + emit("foreach ("); + + Visit(node.Type); + + emit(" "); + + emit(node.Identifier.Text); + + emit(" in "); + + Visit(node.Expression); + + emit_line(")"); + + Visit(node.Statement); + } + } + + public override void VisitExpressionStatement(ExpressionStatementSyntax node) + { + Visit(node.Expression); + + emit_line(";"); + } + + public override void VisitConditionalExpression(ConditionalExpressionSyntax node) + { + Visit(node.Condition); + emit(" ? "); + Visit(node.WhenTrue); + emit(" : "); + Visit(node.WhenFalse); + } + + public override void VisitIfStatement(IfStatementSyntax node) + { + emit("if ("); + Visit(node.Condition); + emit_line(")"); + + Visit(node.Statement); + + if (node.Else != null) + { + if (node.Else.Statement is IfStatementSyntax) + { + emit("else "); + } + else + { + emit_line("else"); + } + + Visit(node.Else.Statement); + } + } + + public override void VisitInitializerExpression(InitializerExpressionSyntax node) + { + if (lang == TargetLang.TypeScript) + { + if (node.Kind() == SyntaxKind.ArrayInitializerExpression) + { + bool is_byte_array = false; + + if (node.Parent.Kind() == SyntaxKind.ArrayCreationExpression && + ((ArrayCreationExpressionSyntax)node.Parent).Type.ElementType.ToString() == "byte") + { + is_byte_array = true; + } + + if (is_byte_array) + { + emit("new Uint8Array("); + } + + emit("[ "); + current_depth++; + + foreach (var exp in node.Expressions) + { + this.Visit(exp); + + emit(", "); + } + + current_depth--; + emit(" ]"); + + if (is_byte_array) + { + emit(")"); + } + } + else + { + emit_line("{"); + current_depth++; + + foreach (var exp in node.Expressions) + { + this.Visit(exp); + + emit_line(","); + } + + current_depth--; + emit("}"); + } + } + else + { + if (node.Kind() == SyntaxKind.ArrayInitializerExpression) + { + emit("{ "); + current_depth++; + + foreach (var exp in node.Expressions) + { + this.Visit(exp); + + emit(", "); + } + + current_depth--; + emit(" }"); + } + else + { + emit_line("{"); + current_depth++; + + foreach (var exp in node.Expressions) + { + this.Visit(exp); + + emit_line(","); + } + + current_depth--; + emit("}"); + } + } + } + + public override void VisitArrayCreationExpression(ArrayCreationExpressionSyntax node) + { + if (lang == TargetLang.TypeScript) + { + var type = node.Type; + + if (node.Initializer != null) + { + emit(" "); + Visit(node.Initializer); + } + else + { + emit("[]"); + } + } + else + { + var type = node.Type; + + emit("new "); + + Visit(node.Type); + + if (node.Initializer != null) + { + emit(" "); + Visit(node.Initializer); + } + } + } + + public override void VisitObjectCreationExpression(ObjectCreationExpressionSyntax node) + { + if (lang == TargetLang.TypeScript) + { + var type = (IdentifierNameSyntax)node.Type; + + if (node.Initializer == null) + { + emit("new "); + Visit(node.Type); +// emit($"new {type.Identifier.Text}"); + + Visit(node.ArgumentList); + } + else + { + emit("new "); + Visit(node.Type); + emit_line("("); + Visit(node.Initializer); + emit(")"); + } + } + else + { + var type = (IdentifierNameSyntax)node.Type; + + emit($"new {type.Identifier.Text}"); + + Visit(node.ArgumentList); + + if (node.Initializer != null) + { + emit_line(""); + Visit(node.Initializer); + } + } + } + + public override void VisitLiteralExpression(LiteralExpressionSyntax node) + { + emit(node.Token.Text); + } + + public override void VisitParenthesizedExpression(ParenthesizedExpressionSyntax node) + { + emit("("); + base.Visit(node.Expression); + emit(")"); + } + + public override void VisitBinaryExpression(BinaryExpressionSyntax node) + { + base.Visit(node.Left); + emit($" {node.OperatorToken.Text} "); + base.Visit(node.Right); + } + + public override void VisitIdentifierName(IdentifierNameSyntax node) + { + string name = node.Identifier.Text; + + if (node.Parent.Kind() == SyntaxKind.VariableDeclaration + || node.Parent.Kind() == SyntaxKind.MethodDeclaration + || node.Parent.Kind() == SyntaxKind.SimpleMemberAccessExpression + || node.Parent.Kind() == SyntaxKind.ForEachStatement + || node.Parent.Kind() == SyntaxKind.Parameter + || node.Parent.Kind() == SyntaxKind.ObjectCreationExpression) + { + name = convert_type(name); + } + + var sym = src.Model.GetSymbolInfo(node); + string json_name = ""; + bool json_name_has_special_char = false; + var atts = sym.Symbol.GetAttributes(); + var y = atts.Where(x => x.AttributeClass.Name == "JsonPropertyAttribute").FirstOrDefault(); + if (y != null) + { + json_name = y.ConstructorArguments.FirstOrDefault().Value.ToString(); + if (json_name.IndexOf(':') != -1 || json_name.IndexOf('.') != -1) json_name_has_special_char = true; + } + + string field_name = name; + if (lang == TargetLang.TypeScript) + { + if (string.IsNullOrEmpty(json_name) == false) field_name = json_name; + if (json_name_has_special_char) field_name = $"[\"{json_name}\"]"; + } + + emit(field_name); + } + + public override void VisitInvocationExpression(InvocationExpressionSyntax node) + { + string func_name = node.Expression.ToString(); + func_name = convert_function(func_name); + + if (lang == TargetLang.TypeScript) + { + if (func_name == "rand.Next") + { + string a = node.ArgumentList.Arguments[0].ToString(); + string b = node.ArgumentList.Arguments[1].ToString(); + emit($"Math.floor((Math.random() * ({b} - {a})) + {a})"); + return; + } + + if (func_name == "System.Threading.Thread.Sleep") + { + string a = node.ArgumentList.Arguments[0].ToString(); + emit($"await new Promise((r) => setTimeout(r, {a}))"); + return; + } + } + + emit(func_name); + + Visit(node.ArgumentList); + } + + public override void VisitPredefinedType(PredefinedTypeSyntax node) + { + string name = node.Keyword.Text; + name = convert_type(name); + emit(name); + } + + public override void VisitArrayRankSpecifier(ArrayRankSpecifierSyntax node) + { + emit("["); + + int num = 0; + + foreach (ExpressionSyntax exp in node.Sizes) + { + if (num >= 1) + { + emit(","); + } + + Visit(exp); + + num++; + } + + emit("]"); + } + + public override void VisitConstructorDeclaration(ConstructorDeclarationSyntax node) + { + /*foreach (var statement in node.Body.Statements) + { + Visit(statement); + }*/ + } + + public override void VisitArrayType(ArrayTypeSyntax node) + { + Visit(node.ElementType); + + foreach (var rank in node.RankSpecifiers) + { + Visit(rank); + } + } + + public void VisitVariableDeclarator(VariableDeclaratorSyntax node, TypeSyntax type) + { + if (lang == TargetLang.TypeScript) + { +// if (node.Parent.Parent.Kind() == SyntaxKind.LocalDeclarationStatement) + { + emit("let "); + } + + emit($"{node.Identifier.Text}"); + + emit(": "); + + var type_dec = src.Model.GetTypeInfo(type); + + if (type is PredefinedTypeSyntax) + { + Visit(type); + } + else if (type is ArrayTypeSyntax) + { + Visit(type); + } + else if (type is IdentifierNameSyntax) + { + Visit(type); + } + else + { + throw new ApplicationException($"VisitVariableDeclarator: {type.GetType().ToString()}"); + } + + if (node.Initializer != null) + { + emit(" = "); + + var value = node.Initializer.Value; + + base.Visit(value); + } + + emit_line(";"); + } + else + { + var type_dec = src.Model.GetTypeInfo(type); + + if (type is PredefinedTypeSyntax) + { + Visit(type); + } + else if (type is ArrayTypeSyntax) + { + Visit(type); + } + else if (type is IdentifierNameSyntax) + { + Visit(type); + } + else + { + throw new ApplicationException($"VisitVariableDeclarator: {type.GetType().ToString()}"); + } + + emit($" {node.Identifier.Text}"); + + if (node.Initializer != null) + { + emit(" = "); + + var value = node.Initializer.Value; + + base.Visit(value); + } + + emit_line(";"); + } + } + + public override void VisitVariableDeclaration(VariableDeclarationSyntax node) + { + foreach (var v in node.Variables) + { + VisitVariableDeclarator(v, node.Type); + } + } + + public override void VisitLocalDeclarationStatement(LocalDeclarationStatementSyntax node) + { + Visit(node.Declaration); + } + + public override void VisitFieldDeclaration(FieldDeclarationSyntax node) + { + //Visit(node.Declaration); + } + + public override void VisitBlock(BlockSyntax node) + { + emit_line("{"); + current_depth++; + + foreach (var statement in node.Statements) + { + Visit(statement); + } + + current_depth--; + emit_line("}"); + } + + public override void VisitClassDeclaration(ClassDeclarationSyntax node) + { + if (lang == TargetLang.TypeScript) + { + base.VisitClassDeclaration(node); + } + else + { + emit_line($"class {node.Identifier.Text}"); + emit_line("{"); + + current_depth++; + + base.VisitClassDeclaration(node); + + current_depth--; + + emit_line("}"); + } + } + + public override string ToString() + { + StringWriter w = new StringWriter(); + this.lines.ForEach(x => w.WriteLine(x)); + if (String.IsNullOrEmpty(this.current_line) == false) w.WriteLine(this.current_line); + return w.ToString(); + } + } + + void generate_tests(GeneratedCodeForLang ret) + { + var test_class = cs_tests.Root.DescendantNodes().OfType().Where(c => c.Identifier.Text == "VPNRPCTest").First(); + + CcWalker ts_walker = new CcWalker(cs_tests, TargetLang.TypeScript); + ts_walker.Visit(test_class); + ret.TypeScript.Tests.PartList.Add(new GeneratedCodePart() { Seq = 0, Text = ts_walker.ToString() }); + } + + void doc_write_parameters(StringWriter w, RpcTypeInfo type_info) + { + List plist = new List(); + + foreach (RpcTypeParameterInfo p in type_info.Params) + { + plist.Add(p); + } + + foreach (string subtype in type_info.SubTypes) + { + foreach (RpcTypeParameterInfo p in rpc_type_list[subtype].Params) + { + plist.Add(p); + } + } + + w.WriteLine("Name | Type | Description"); + w.WriteLine("--- | --- | ---"); + foreach (RpcTypeParameterInfo p in plist) + { + w.WriteLine($"`{p.Name}` | {p.Type} | {p.Description}"); + } + } + + void doc_write_function(StringWriter w, RpcInfo rpc) + { + string func_summary = rpc.Symbol.GetDocumentStr(); + int index = func_summary.IndexOf("."); + if (index != -1) func_summary = func_summary.Substring(0, index + 1); + func_summary = func_summary.TrimEnd('.'); + + w.WriteLine($""); + w.WriteLine($"## \"{rpc.Name}\" RPC API - {func_summary}"); + + w.WriteLine("### Description"); + + w.WriteLine(rpc.Symbol.GetDocumentStr()); + + var model = cs_tests.Model; + + var func = cs_tests.Root.DescendantNodes().OfType() + .Where(f => f.Identifier.Text == "Test_" + rpc.Name) + .Single(); + + var fields = func.DescendantNodes().OfType() + .Where(i => i.Kind() == SyntaxKind.ObjectInitializerExpression) + .SelectMany(o => o.DescendantNodes().OfType()) + .Where(a => a.Kind() == SyntaxKind.SimpleAssignmentExpression) + .Select(a => (a.Left as IdentifierNameSyntax)); + + foreach (var field in fields) + { + string json_name = field.Identifier.Text; + var sym = model.GetSymbolInfo(field); + + var atts = sym.Symbol.GetAttributes(); + var y = atts.Where(x => x.AttributeClass.Name == "JsonPropertyAttribute").FirstOrDefault(); + if (y != null) + { + json_name = y.ConstructorArguments.FirstOrDefault().Value.ToString(); + } + + rpc.InputParamMembers.Add(json_name); + } + + Type obj_type = Type.GetType("SoftEther.VPNServerRpc." + rpc.TypeName); + + object in_object = Activator.CreateInstance(obj_type); + object out_object = Activator.CreateInstance(obj_type); + + JsonRpcRequest rpc_in = new JsonRpcRequest() { Method = rpc.Name, Params = in_object, Id = "rpc_call_id", }; + Type rpc_out_type = typeof(JsonRpcResponse<>).MakeGenericType(obj_type); + var rpc_out = Activator.CreateInstance(rpc_out_type); + + rpc_out_type.GetProperty("Id").SetValue(rpc_out, "rpc_call_id"); + rpc_out_type.GetProperty("Result").SetValue(rpc_out, out_object); + + sample_fill_object(in_object); + sample_fill_object(out_object); + + JsonSerializerSettings rpc_in_settings = new JsonSerializerSettings() + { + MaxDepth = 8, + NullValueHandling = NullValueHandling.Include, + ReferenceLoopHandling = ReferenceLoopHandling.Error, + PreserveReferencesHandling = PreserveReferencesHandling.None, + ContractResolver = new JSonInputContractResolver(rpc), + }; + + JsonSerializerSettings rpc_out_settings = new JsonSerializerSettings() + { + MaxDepth = 8, + NullValueHandling = NullValueHandling.Include, + ReferenceLoopHandling = ReferenceLoopHandling.Error, + PreserveReferencesHandling = PreserveReferencesHandling.None, + ContractResolver = new JSonOutputContractResolver(rpc), + }; + + string in_str = JsonConvert.SerializeObject(rpc_in, Formatting.Indented, rpc_in_settings); + string out_str = JsonConvert.SerializeObject(rpc_out, Formatting.Indented, rpc_out_settings); + + w.WriteLine(); + w.WriteLine("### Input JSON-RPC Format"); + w.WriteLine("```json"); + w.WriteLine(in_str); + w.WriteLine("```"); + + w.WriteLine(); + w.WriteLine("### Output JSON-RPC Format"); + w.WriteLine("```json"); + w.WriteLine(out_str); + w.WriteLine("```"); + + w.WriteLine(); + w.WriteLine("### Parameters"); + w.WriteLine(); + doc_write_parameters(w, rpc_type_list[rpc.TypeName]); + + //w.WriteLine("
"); + w.WriteLine(); + } + + class JSonOutputContractResolver : DefaultContractResolver + { + RpcInfo rpc_info; + + public JSonOutputContractResolver(RpcInfo info) : base() + { + this.rpc_info = info; + } + + protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) + { + if (member.Name == "Error") return null; + JsonProperty ret = base.CreateProperty(member, memberSerialization); + return ret; + } + } + + + class JSonInputConverter : JsonConverter + { + RpcInfo rpc_info; + + public JSonInputConverter(RpcInfo info) + { + this.rpc_info = info; + } + + public override bool CanRead => false; + + public override bool CanConvert(Type objectType) + { + return true; + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + throw new NotImplementedException(); + } + + public override void WriteJson(JsonWriter w, object value, JsonSerializer serializer) + { + JToken t = JToken.FromObject(value); + List a = new List(); + bool all = false; + if (rpc_info.Name == "SetHubLog") all = true; + + foreach (var p1 in t.Children()) + { + foreach (var p2 in p1.Children()) + { + if (rpc_info.InputParamMembers.Contains(p2.Name) == false) a.Add(p2); + } + if (rpc_info.InputParamMembers.Contains(p1.Name) == false) a.Add(p1); + } + if (all == false) + { + foreach (var p in a) + { + try + { + p.Remove(); + } + catch + { + } + } + } + t.WriteTo(w); + } + } + + class JSonInputContractResolver : DefaultContractResolver + { + RpcInfo rpc_info; + + public JSonInputContractResolver(RpcInfo info) : base() + { + this.rpc_info = info; + } + + protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) + { + JsonProperty ret = base.CreateProperty(member, memberSerialization); + ret.Converter = new JSonInputConverter(this.rpc_info); + return ret; + } + } + + void sample_fill_object(object o) + { + Type t = o.GetType(); + + var fields = t.GetFields(); + foreach (var field in fields) + { + Type t2 = field.FieldType; + object v = null; + + if (t2 == typeof(string)) + { + string tmp = field.Name.ToLowerInvariant(); + if (tmp.EndsWith("_str") || tmp.EndsWith("_utf")) tmp = tmp.Substring(0, tmp.Length - 4); + if (tmp.EndsWith("_ip")) + { + if (tmp.IndexOf("mask", StringComparison.InvariantCultureIgnoreCase) == -1) + tmp = "192.168.0.1"; + else + tmp = "255.255.255.255"; + } + v = tmp; + } + else if (t2 == typeof(uint)) + v = (uint)0; + else if (t2 == typeof(ulong)) + v = (ulong)0; + else if (t2 == typeof(bool)) + v = (bool)false; + else if (t2 == typeof(byte[])) + v = Encoding.UTF8.GetBytes("Hello World"); + else if (t2 == typeof(DateTime)) + v = new DateTime(DateTime.Now.Year + 1, 8, 1, 12, 24, 36, 123); + else if (t2.IsEnum) + { + v = (int)0; + } + else if (t2.IsArray) + { + if (t2 == typeof(uint[])) + { + v = new uint[] { 1, 2, 3 }; + } + else + { + if (t2.GetArrayRank() != 1) throw new ApplicationException("Array rank != 1"); + Type obj_type = t2.GetElementType(); + + if (obj_type.IsEnum) + { + v = new int[] { 1, 2, 3 }; + } + else + { + int num = 3; + + if (field.Name.IndexOf("single", StringComparison.CurrentCultureIgnoreCase) != -1) + { + num = 1; + } + + object list = Activator.CreateInstance(typeof(List<>).MakeGenericType(obj_type)); + + for (int i = 0; i < num; i++) + { + object a = Activator.CreateInstance(obj_type); + sample_fill_object(a); + + list.GetType().GetMethod("Add").Invoke(list, new object[] { a }); + } + + v = list.GetType().GetMethod("ToArray").Invoke(list, new object[] { } ); + } + } + } + else if (t2.Name.StartsWith("Vpn")) + { + Type obj_type = Type.GetType("SoftEther.VPNServerRpc." + t2.Name); + v = Activator.CreateInstance(obj_type); + sample_fill_object(v); + } + else + { + throw new ApplicationException($"sample_fill_object: type: {t2.ToString()}"); + } + + field.SetValue(o, v); + } + } + + void generate_documents(GeneratedCodeForLang ret) + { + StringWriter w = new StringWriter(); + + string doc_txt = read_text_resource("doc.txt"); + w.WriteLine(doc_txt); + + w.WriteLine("## Table of contents"); + foreach (RpcInfo rpc in rpc_list.Values) + { + string func_summary = rpc.Symbol.GetDocumentStr(); + int index = func_summary.IndexOf("."); + if (index != -1) func_summary = func_summary.Substring(0, index + 1); + func_summary = func_summary.TrimEnd('.'); + + w.WriteLine($"- [{rpc.Name} - {func_summary}](#{rpc.Name.ToLowerInvariant()})"); + + } + + w.WriteLine(); + w.WriteLine("***"); + + foreach (RpcInfo rpc in rpc_list.Values) + { + if (rpc.Name.IndexOf("Vgs", StringComparison.Ordinal) == -1) + { + doc_write_function(w, rpc); + + w.WriteLine("***"); + } + } + + w.WriteLine($"Automatically generated at {timestamp.ToString("yyyy-MM-dd HH:mm:ss")} by vpnserver-jsonrpc-codegen. "); + w.WriteLine("Copyright (c) 2014-" + DateTime.Now.Year + " [SoftEther VPN Project](https://www.softether.org/) under the Apache License 2.0. "); + w.WriteLine(); + + ret.DocsRpc = w.ToString(); + } + + public GeneratedCodeForLang GenerateCodes() + { + GeneratedCodeForLang ret = new GeneratedCodeForLang(); + + generate_stubs(ret); + + generate_tests(ret); + + generate_types(ret); + + generate_documents(ret); + + return ret; + } + + public void GenerateAndSaveCodes(string output_dir) + { + CodeGenUtil.MakeDir(output_dir); + + WriteLine($"GenerateAndSaveCodes(): output_dir = '{output_dir}'"); + WriteLine(); + WriteLine("Generating codes ..."); + GeneratedCodeForLang codes = GenerateCodes(); + WriteLine("Generating codes: done."); + WriteLine(); + + output_docs(codes, output_dir); + + output_csharp(Path.Combine(output_dir, "vpnserver-jsonrpc-client-csharp")); + + output_typescript(codes.TypeScript, Path.Combine(output_dir, "vpnserver-jsonrpc-client-typescript")); + } + + static Assembly this_assembly = Assembly.GetExecutingAssembly(); + static string read_text_resource(string name) + { + var x = this_assembly.GetManifestResourceNames(); + string resourceName = this_assembly.GetManifestResourceNames().Single(str => str.EndsWith(name)); + using (Stream stream = this_assembly.GetManifestResourceStream(resourceName)) + { + using (StreamReader reader = new StreamReader(stream)) + { + return reader.ReadToEnd(); + } + } + } + + static string read_text_file(string name) + { + using (Stream stream = File.OpenRead(name)) + { + using (StreamReader reader = new StreamReader(stream)) + { + return reader.ReadToEnd(); + } + } + } + + static string replace_strings(string src, params string[] replace_list) + { + int i; + for (i = 0; i < replace_list.Length / 2; i++) + { + string s1 = replace_list[i * 2]; + string s2 = replace_list[i * 2 + 1]; + src = src.Replace(s1, s2, StringComparison.InvariantCultureIgnoreCase); + } + return src; + } + + static string normalize_crlf(string src, string crlf) + { + StringReader r = new StringReader(src); + StringWriter w = new StringWriter(); + w.NewLine = crlf; + while (true) + { + string line = r.ReadLine(); + if (line == null) break; + w.WriteLine(line); + } + return w.ToString(); + } + + static void normalize(ref string str, string crlf, params string[] replace_list) + { + str = normalize_crlf(replace_strings(str, replace_list), crlf); + } + + static void save(string path, string body, bool bom) + { + string dir_name = Path.GetDirectoryName(path); + CodeGenUtil.MakeDir(dir_name); + + if (bom) + File.WriteAllText(path, body, Encoding.UTF8); + else + File.WriteAllText(path, body); + } + + DateTime timestamp = DateTime.Now; + + void output_docs(GeneratedCodeForLang c, string output_dir) + { + CodeGenUtil.MakeDir(output_dir); + + save(Path.Combine(output_dir, "README.md"), c.DocsRpc, true); + + var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); + + string md_html_body = Markdown.ToHtml(c.DocsRpc, pipeline); + + string html = read_text_resource("md_html.html"); + + string[] replace_list = + { + "__BODY__", md_html_body, + }; + + normalize(ref html, "\r\n", replace_list); + + save(Path.Combine(output_dir, "README.html"), html, true); + save(Path.Combine(CodeGenUtil.OutputDir_HamCore, "vpnserver_api_doc.html"), html, true); + } + + void output_typescript(GeneratedCode c, string output_dir) + { + CodeGenUtil.MakeDir(output_dir); + + string ts_rpc = read_text_resource("ts_rpc.txt"); + string ts_test = read_text_resource("ts_test.txt"); + + string[] replace_list = + { + "__YEAR__", timestamp.Year.ToString(), + "__TESTS__", c.Tests.ToString(), + "__STUBS__", c.Stubs.ToString(), + "__TYPES__", c.Types.ToString(), + "__TIMESTAMP__", timestamp.ToString("yyyy-MM-dd HH:mm:ss"), + }; + + normalize(ref ts_rpc, "\n", replace_list); + normalize(ref ts_test, "\n", replace_list); + + save(Path.Combine(output_dir, "vpnrpc.ts"), ts_rpc, true); + save(Path.Combine(output_dir, "sample.ts"), ts_test, true); + + save(Path.Combine(output_dir + "/../vpnserver-jsonrpc-client-nodejs-package/src/", "vpnrpc.ts"), ts_rpc, true); + save(Path.Combine(output_dir + "/../vpnserver-jsonrpc-client-nodejs-package/src/", "sample.ts"), ts_test, true); + } + + void output_csharp(string output_dir) + { + CodeGenUtil.MakeDir(output_dir); + + string cs_proj = read_text_resource("cs_proj.txt"); + string cs_sln = read_text_resource("cs_sln.txt"); + string cs_main = read_text_resource("cs_main.txt"); + + string cs_code_jsonrpc = read_text_file(Path.Combine(CodeGenUtil.ProjectDir, + @"VpnServerRpc/JsonRpc.cs")); + + string cs_code_vpnserver_rpc = read_text_file(Path.Combine(CodeGenUtil.ProjectDir, + @"VpnServerRpc/VPNServerRpc.cs")); + + string cs_code_vpnserver_rpc_types = read_text_file(Path.Combine(CodeGenUtil.ProjectDir, + @"VpnServerRpc/VPNServerRpcTypes.cs")); + + string cs_code_vpnserver_rpc_test = read_text_file(Path.Combine(CodeGenUtil.ProjectDir, + @"VpnServerRpcTest/VpnServerRpcTest.cs")); + + string[] replace_list = + { + "__YEAR__", timestamp.Year.ToString(), + "__TIMESTAMP__", timestamp.ToString("yyyy-MM-dd HH:mm:ss"), + }; + + normalize(ref cs_main, "\r\n", replace_list); + normalize(ref cs_proj, "\r\n", replace_list); + normalize(ref cs_sln, "\r\n", replace_list); + normalize(ref cs_code_jsonrpc, "\r\n", replace_list); + normalize(ref cs_code_vpnserver_rpc, "\r\n", replace_list); + normalize(ref cs_code_vpnserver_rpc_types, "\r\n", replace_list); + normalize(ref cs_code_vpnserver_rpc_test, "\r\n", replace_list); + + save(Path.Combine(output_dir, "vpnserver-jsonrpc-client-csharp.csproj"), + cs_proj, true); + + save(Path.Combine(output_dir, "vpnserver-jsonrpc-client-csharp.sln"), + cs_sln, true); + + save(Path.Combine(output_dir, @"rpc-stubs\JsonRpc.cs"), + cs_code_jsonrpc, true); + + save(Path.Combine(output_dir, @"rpc-stubs\VPNServerRpc.cs"), + cs_code_vpnserver_rpc, true); + + save(Path.Combine(output_dir, @"rpc-stubs\VPNServerRpcTypes.cs"), + cs_code_vpnserver_rpc_types, true); + + save(Path.Combine(output_dir, @"sample\VpnServerRpcTest.cs"), + cs_code_vpnserver_rpc_test, true); + + save(Path.Combine(output_dir, @"sample\Main.cs"), + cs_main, true); + } + + public void Test() + { + GeneratedCodeForLang ret = GenerateCodes(); + + Console.WriteLine(ret.TypeScript.ToString()); + + return; + var model = cs_types.Model; + + var type_classes = cs_types.Root.DescendantNodes() + .OfType(); + + foreach (ClassDeclarationSyntax v in type_classes) + { + WriteLine(v.Identifier.Text); + + var info = model.GetDeclaredSymbol(v); + + var x = info.GetMembers(); + + foreach (var y in x) + { + WriteLine(y.Name); + } + + break; + } + + Console.WriteLine(); + } + } +} diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Program.cs b/developer_tools/vpnserver-jsonrpc-codegen/Program.cs new file mode 100644 index 00000000..203860dd --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Program.cs @@ -0,0 +1,37 @@ +using System; +using System.IO; +using System.Diagnostics; +using Newtonsoft.Json; +using SoftEther.VPNServerRpc; +using System.Text; +using SoftEther.JsonRpc; + + +namespace VPNServer_JSONRPC_CodeGen +{ + class Program + { + static void Main(string[] args) + { + string output_dir = CodeGenUtil.OutputDir_Clients; + + try + { + Directory.CreateDirectory(output_dir); + } + catch + { + } + + CodeGen g = new CodeGen(); + + g.GenerateAndSaveCodes(output_dir); + } + } +} + + + + + + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_main.txt b/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_main.txt new file mode 100644 index 00000000..a73d31ac --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_main.txt @@ -0,0 +1,17 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// Program.cs - The Main() entry point +// +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + +class Program +{ + static void Main(string[] args) + { + VPNRPCTest test = new VPNRPCTest(); + test.Test_All(); + } +} diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_proj.txt b/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_proj.txt new file mode 100644 index 00000000..6d97ba0c --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_proj.txt @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp2.1 + SoftEther.VPNServerRpc + + + + + + + + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_sln.txt b/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_sln.txt new file mode 100644 index 00000000..8cef1417 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/cs_sln.txt @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2041 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vpnserver-jsonrpc-client-csharp", "vpnserver-jsonrpc-client-csharp.csproj", "{81CA3EC4-026E-4D37-9889-828186BBB8C0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D87E5CF1-9A10-431C-AC42-F1041470AEE8} + EndGlobalSection +EndGlobal diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/doc.txt b/developer_tools/vpnserver-jsonrpc-codegen/Templates/doc.txt new file mode 100644 index 00000000..aed5c743 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/doc.txt @@ -0,0 +1,77 @@ +# SoftEther VPN Server JSON-RPC API Suite Document +This reference describes all JSON-RPC functions available on SoftEther VPN Server. + + +You can access to the latest [SoftEther VPN Server JSON-RPC Document on GitHub](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/). + + +## What is SoftEther VPN Server JSON-RPC API Suite? +The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions). + + - Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API. + - You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.) + - If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server. + - No need to use any specific API client library since all APIs are provided on the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification). You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment. + - Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. [The Node.js Client Library for VPN Server RPC (vpnrpc)](https://www.npmjs.com/package/vpnrpc) package is also available. + + +## Principle + +### Entry point +The entry point URL of JSON-RPC is: +``` +https://:/api/ +``` + + - Older versions of SoftEther VPN before June 2019 don't support JSON-RPC APIs. + - If you want to completely disable the JSON-RPC on your VPN Server, set the `DisableJsonRpcWebApi` variable to `true` on the `vpn_server.config`. + + +### JSON-RPC specification +You must use HTTPS 1.1 `POST` method to call each of JSON-RPC APIs. +All APIs are based on the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification). + - JSON-RPC Notification is not supported. + - JSON-RPC Batch is not supported. + + +### "vpnrpc": Node.js Client Library package for VPN Server JSON-RPC +If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [JavaScript Client Library for VPN Server RPC (vpnrpc)](https://www.npmjs.com/package/vpnrpc). + + - You can use the `vpnrpc` library in JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js. + - As a sample code there is the [sample.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts) program in TypeScript. This sample calls all of available JSON-RPC APIs against the specified SoftEther VPN Server. (Note: This sample code is written in TypeScript.) + +You can use the following command to download the `vpnrpc` library package with Node.js. +``` +$ npm install --save-dev vpnrpc +``` + + + +### "vpnrpc.ts": TypeScript Client Library for VPN Server JSON-RPC +If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [TypeScript Client Library for VPN Server RPC (vpnrpc.ts)](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/). + + - You can use the [vpnrpc.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/vpnrpc.ts) library in TypeScript / JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js. + - As a sample code there is the [sample.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts) program in TypeScript. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server. + + +### "vpnserver-jsonrpc-client-csharp": C# Client Library for VPN Server JSON-RPC +If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [vpnserver-jsonrpc-client-csharp C# library](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/). + + - The [client library codes for C#](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/) is written in pure C# 7.3. It works on .NET Core 2.1 or later on Windows, Linux and macOS. Very comfort with Visual Studio for both Windows or macOS. + - As a sample code there is the [VpnServerRpcTest.cs](https://github.com/SoftEtherVPN/SoftEtherVPN/blob/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/VpnServerRpcTest.cs) program in C#. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server. + + + +### HTTPS Authentication +You must specify the following HTTPS custom headers for authentication on each of requests. + + +Value | Description +--- | --- +`X-VPNADMIN-HUBNAME` | The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify empty string if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. +`X-VPNADMIN-PASSWORD` | Specify the administration password. + + +- You can omit the above HTTPS custom authentication headers if you are calling JSON-RPC APIs from the web browser which is already logged in to the VPN Server with HTTPS Basic Authentication. In such usage the credential of HTTPS Basic Authtication will be used. + +*** diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/md_html.html b/developer_tools/vpnserver-jsonrpc-codegen/Templates/md_html.html new file mode 100644 index 00000000..ac6d7185 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/md_html.html @@ -0,0 +1,16 @@ + + + + + SoftEther VPN Server JSON-RPC Suite Document + + + + + + +
+__BODY__ +
+ + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_rpc.txt b/developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_rpc.txt new file mode 100644 index 00000000..572cadb2 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_rpc.txt @@ -0,0 +1,576 @@ +// SoftEther VPN Server JSON-RPC Stub code for TypeScript +// +// vpnrpc.ts +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + + +// Trivial utility codes +let is_node_js = (typeof navigator === "undefined") || navigator.userAgent.indexOf("Node.js") !== -1 || navigator.userAgent.indexOf("jsdom") !== -1; +function is_null(obj: any) +{ + return (typeof obj === "undefined") || (obj === null); +} +let debug_mode: boolean = false; + +/** VPN Server RPC Stubs */ +export class VpnServerRpc +{ + /** Determine if this JavaScript environment is on the Node.js or not. */ + public static IsNodeJS(): boolean + { + return is_node_js; + } + + /** Set the debug mode flag */ + public static SetDebugMode(flag: boolean): void + { + debug_mode = flag; + } + + private rpc_url: string; + private rpc_client: JsonRpcClient; + + /** + * Constructor of the VpnServerRpc class + * @param vpnserver_hostname The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param vpnserver_port The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + * @param hubname The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + * @param password Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + * @param nodejs_https_client_reject_untrusted_server_cert In Node.js set this true to check the SSL server certificate on the destination VPN Server. Set this false to ignore the SSL server certification. + */ + constructor(vpnserver_hostname?: string, vpnserver_port?: number, hubname?: string, password?: string, nodejs_https_client_reject_untrusted_server_cert?: boolean) + { + let headers: { [name: string]: string } = {}; + let send_credentials: boolean = false; + + nodejs_https_client_reject_untrusted_server_cert = is_null(nodejs_https_client_reject_untrusted_server_cert) ? false : nodejs_https_client_reject_untrusted_server_cert!; + + if (is_null(vpnserver_hostname)) + { + this.rpc_url = "/api/"; + send_credentials = true; + } + else + { + if (is_null(vpnserver_port)) vpnserver_port = 443; + this.rpc_url = `https://${vpnserver_hostname}:${vpnserver_port}/api/`; + + + headers["X-VPNADMIN-HUBNAME"] = is_null(hubname) ? "" : hubname!; + headers["X-VPNADMIN-PASSWORD"] = is_null(password) ? "" : password!; + } + + if (is_null(nodejs_https_client_reject_untrusted_server_cert)) nodejs_https_client_reject_untrusted_server_cert = false; + + this.rpc_client = new JsonRpcClient(this.rpc_url, headers, send_credentials, nodejs_https_client_reject_untrusted_server_cert); + } + + // --- Stubs --- +__STUBS__ + + // -- Utility functions -- + /** Call a RPC procedure */ + public async CallAsync(method_name: string, request: T): Promise + { + let response: T = await this.rpc_client.CallAsync(method_name, request); + + return response; + } +} + + + + +// --- Types --- +__TYPES__ + + + +// --- Utility codes --- + +/** JSON-RPC request class. See https://www.jsonrpc.org/specification */ +export class JsonRpcRequest +{ + public jsonrpc: string = "2.0"; + public method: string; + public params: any; + public id: string; + + constructor(method: string = "", param: any = null, id: string = "") + { + this.method = method; + this.params = param; + this.id = id; + } +} + +/** JSON-RPC error class. See https://www.jsonrpc.org/specification */ +export class JsonRpcError +{ + public code: number; + public message: string; + public data: any; + + constructor(code: number = 0, message: string = "", data: any = null) + { + this.code = code; + this.message = message; + this.data = data; + } +} + +/** JSON-RPC response class with generics */ +export class JsonRpcResponse +{ + public jsonrpc: string = "2.0"; + public result: TResult = null!; + public error: JsonRpcError = null!; + public id: string = ""; +} + +/** JSON-RPC client class. See https://www.jsonrpc.org/specification */ +export class JsonRpcClient +{ + /** A utility function to convert any object to JSON string */ + public static ObjectToJson(obj: any): string + { + return JSON.stringify(obj, + (key, value) => + { + if (key.endsWith("_bin")) + { + return Util_Base64_Encode(value); + } + return value; + } + , 4); + } + + /** A utility function to convert JSON string to object */ + public static JsonToObject(str: string): any + { + return JSON.parse(str, + (key, value) => + { + if (key.endsWith("_bin")) + { + return Util_Base64_Decode(value); + } + else if (key.endsWith("_dt")) + { + return new Date(value); + } + return value; + }); + } + + /** Base URL */ + public BaseUrl: string; + + /** The instance of HTTP client */ + private client: HttpClient; + + /** Additional HTTP headers */ + private headers: { [name: string]: string }; + + /** + * JSON-RPC client class constructor + * @param url The URL + * @param headers Additional HTTP headers + * @param send_credential Set true to use the same credential with the browsing web site. Valid only if the code is running on the web browser. + */ + constructor(url: string, headers: { [name: string]: string }, send_credential: boolean, nodejs_https_client_reject_untrusted_server_cert: boolean) + { + this.BaseUrl = url; + this.headers = headers; + + this.client = new HttpClient(); + this.client.SendCredential = send_credential; + this.client.NodeJS_HTTPS_Client_Reject_Unauthorized = nodejs_https_client_reject_untrusted_server_cert; + } + + /** + * Call a single RPC call (without error check). You can wait for the response with Promise or await statement. + * @param method_name The name of RPC method + * @param param The parameters + */ + public async CallInternalAsync(method_name: string, param: any): Promise + { + let id = "1"; + + let req = new JsonRpcRequest(method_name, param, id); + + let req_string = JsonRpcClient.ObjectToJson(req); + + if (debug_mode) + { + console.log("--- RPC Request Body ---"); + console.log(req_string); + console.log("------------------------"); + } + + let http_response = await this.client.PostAsync(this.BaseUrl, this.headers, + req_string, "application/json"); + + let ret_string = http_response.Body; + + if (debug_mode) + { + console.log("--- RPC Response Body ---"); + console.log(ret_string); + console.log("-------------------------"); + } + + return ret_string; + } + + /** + * Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + * @param method_name The name of RPC method + * @param param The parameters + */ + public async CallAsync(method_name: string, param: any): Promise + { + let ret_string = await this.CallInternalAsync(method_name, param); + + let ret: JsonRpcResponse = JSON.parse(ret_string); + + if (is_null(ret.error) === false) + { + throw new JsonRpcException(ret.error); + } + + return ret.result; + } +} + +/** JSON-RPC exception class */ +export class JsonRpcException extends Error +{ + public Error: JsonRpcError; + + constructor(error: JsonRpcError) + { + super(`Code=${error.code}, Message=${error.message}`); + this.Error = error; + } +} + +/** HTTP client exception class */ +export class HttpClientException extends Error +{ + constructor(message: string) + { + super(message); + } +} + +/** HTTP client response class */ +export class HttpClientResponse +{ + public Body: string = ""; +} + +/** An HTTP client which can be used in both web browsers and Node.js */ +export class HttpClient +{ + public TimeoutMsecs: number = 60 * 5 * 1000; + public SendCredential: boolean = true; + public NodeJS_HTTPS_Client_Reject_Unauthorized: boolean = false; + + /** Post method. In web browsers this function will process the request by itself. In Node.js this function will call PostAsync_NodeJS() instead. */ + public async PostAsync(url: string, headers: { [name: string]: string }, + req_body: string, req_media_type: string): Promise + { + if (is_node_js) + { + return this.PostAsync_NodeJS(url, headers, req_body, req_media_type); + } + + let fetch_header_list = new Headers(); + + for (let name of Object.keys(headers)) + { + fetch_header_list.append(name, headers[name]); + } + + let fetch_init: RequestInit = + { + mode: "cors", + headers: fetch_header_list, + credentials: (this.SendCredential ? "include" : "omit"), + method: "POST", + cache: "no-cache", + keepalive: true, + redirect: "follow", + body: req_body, + }; + + let fetch_response = await fetch(url, fetch_init); + + if (fetch_response.ok === false) + { + throw new HttpClientException("HTTP Error: " + fetch_response.status + " " + fetch_response.statusText); + } + + let ret = new HttpClientResponse(); + + ret.Body = await fetch_response.text(); + + return ret; + } + + /** Post method for Node.js. */ + public PostAsync_NodeJS(url: string, headers: { [name: string]: string }, + req_body: string, req_media_type: string): Promise + { + const https = require("https"); + const keepAliveAgent = new https.Agent({ keepAlive: true }); + const urlparse = require("url"); + + const urlobj = urlparse.parse(url); + + if (is_null(urlobj.host)) throw new Error("URL is invalid."); + + let options = + { + host: urlobj.hostname, + port: urlobj.port, + path: urlobj.path, + rejectUnauthorized: this.NodeJS_HTTPS_Client_Reject_Unauthorized, + method: "POST", + timeout: this.TimeoutMsecs, + agent: keepAliveAgent, + }; + + return new Promise(function (resolve, reject) + { + let req = https.request(options, (res: any) => + { + if (res.statusCode !== 200) + { + reject(new HttpClientException("HTTP Error: " + res.statusCode + " " + res.statusMessage)); + } + + let recv_str: string = ""; + + res.on("data", (body: any) => + { + recv_str += body; + }); + + res.on("end", () => + { + let ret = new HttpClientResponse(); + + ret.Body = recv_str; + + resolve(ret); + }); + }).on("error", (err: any) => + { + throw err; + } + ); + + for (let name of Object.keys(headers)) + { + req.setHeader(name, !is_null(headers[name]) ? headers[name] : ""); + } + req.setHeader("Content-Type", req_media_type); + req.setHeader("Content-Length", Buffer.byteLength(req_body)); + req.write(req_body); + req.end(); + }); + } +} + + + + +//////// BEGIN: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js +// The MIT License(MIT) +// Copyright(c) 2014 +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +var lookup: any = []; +var revLookup: any = []; + +var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +for (var i = 0, len = code.length; i < len; ++i) +{ + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup["-".charCodeAt(0)] = 62; +revLookup["_".charCodeAt(0)] = 63; + +function getLens(b64: any) +{ + var len = b64.length; + + if (len % 4 > 0) + { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf("="); + if (validLen === -1) validLen = len; + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4); + + return [validLen, placeHoldersLen]; +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength(b64: any) +{ + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} + +function _byteLength(b64: any, validLen: any, placeHoldersLen: any) +{ + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen; +} + +export function Util_Base64_Decode(b64: any) +{ + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + + var arr = new Uint8Array(_byteLength(b64, validLen, placeHoldersLen)); + + var curByte = 0; + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen; + + for (var i = 0; i < len; i += 4) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)]; + arr[curByte++] = (tmp >> 16) & 0xFF; + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + + if (placeHoldersLen === 2) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[curByte++] = tmp & 0xFF; + } + + if (placeHoldersLen === 1) + { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[curByte++] = (tmp >> 8) & 0xFF; + arr[curByte++] = tmp & 0xFF; + } + + return arr; +} + +function tripletToBase64(num: any) +{ + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F]; +} + +function encodeChunk(uint8: any, start: any, end: any) +{ + var tmp; + var output = []; + for (var i = start; i < end; i += 3) + { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF); + output.push(tripletToBase64(tmp)); + } + return output.join(""); +} + +export function Util_Base64_Encode(uint8: any) +{ + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) + { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) + { + tmp = uint8[len - 1]; + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + "==" + ); + } else if (extraBytes === 2) + { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + "=" + ); + } + + return parts.join(""); +} +//////// END: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js + + + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_test.txt b/developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_test.txt new file mode 100644 index 00000000..a265ab04 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_test.txt @@ -0,0 +1,48 @@ +// Test sample code for SoftEther VPN Server JSON-RPC Stub +// Runs on both web browsers and Node.js +// +// sample.ts +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// This sample code shows how to call all available RPC functions. +// You can copy and paste test code to write your own web browser TypeScript / JavaScript codes. +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + +// On the web browser uncomment below imports as necessary to support old browsers. +// import "core-js/es6/promise"; +// import "core-js/es6/string"; +// import "whatwg-fetch"; + + +// Import the vpnrpc.ts RPC stub. +import * as VPN from "./vpnrpc"; + +// Output JSON-RPC request / reply strings to the debug console. +VPN.VpnServerRpc.SetDebugMode(true); + +let api: VPN.VpnServerRpc; +// Creating the VpnServerRpc class instance here. +if (VPN.VpnServerRpc.IsNodeJS() === false) // // Determine if this JavaScript environment is on the Node.js or not +{ + // On the web browser. We do not need to specify any hostname, port or credential as the web browser already knows it. + api = new VPN.VpnServerRpc(); +} +else +{ + // On the Node.js. We need to specify the target VPN Server's hostname, port and credential. + api = new VPN.VpnServerRpc("127.0.0.1", 443, "", "PASSWORD_HERE", false); +} + +// A variable for test +let hub_name = "test"; + +// Call the Test_All() function to test almost all VPN APIs. +Test_All(); + + + +__TESTS__ + + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/JsonRpc.cs b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/JsonRpc.cs new file mode 100644 index 00000000..d7ee166b --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/JsonRpc.cs @@ -0,0 +1,282 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// JsonRpc.cs - JSON-RPC Client Utility Functions +// +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + +using System; +using System.IO; +using System.Net.Security; +using System.Net.Http; +using System.Collections.Generic; +using System.Text; +using System.Security.Cryptography.X509Certificates; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace SoftEther.JsonRpc +{ + /// + /// Internal utility class + /// + static class ClientUtil + { + public const int DefaultMaxDepth = 8; + + public static string NonNull(this string s) { if (s == null) return ""; else return s; } + public static bool IsEmpty(this string str) + { + if (str == null || str.Trim().Length == 0) + return true; + else + return false; + } + public static bool IsFilled(this string str) => !IsEmpty(str); + + public static string ObjectToJson(this object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false) => ClientUtil.Serialize(obj, include_null, escape_html, max_depth, compact, reference_handling); + public static T JsonToObject(this string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize(str, include_null, max_depth); + public static object JsonToObject(this string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize(str, type, include_null, max_depth); + + public static string Serialize(object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false) + { + JsonSerializerSettings setting = new JsonSerializerSettings() + { + MaxDepth = max_depth, + NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore, + ReferenceLoopHandling = ReferenceLoopHandling.Error, + PreserveReferencesHandling = reference_handling ? PreserveReferencesHandling.All : PreserveReferencesHandling.None, + StringEscapeHandling = escape_html ? StringEscapeHandling.EscapeHtml : StringEscapeHandling.Default, + }; + return JsonConvert.SerializeObject(obj, compact ? Formatting.None : Formatting.Indented, setting); + } + + public static T Deserialize(string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) + => (T)Deserialize(str, typeof(T), include_null, max_depth); + + public static object Deserialize(string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) + { + JsonSerializerSettings setting = new JsonSerializerSettings() + { + MaxDepth = max_depth, + NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore, + ObjectCreationHandling = ObjectCreationHandling.Replace, + ReferenceLoopHandling = ReferenceLoopHandling.Error, + }; + return JsonConvert.DeserializeObject(str, type, setting); + } + + public static void Print(this object o) + { + string str = o.ObjectToJson(); + + if (o is string) str = (string)o; + + Console.WriteLine(str); + } + } + + /// + /// JSON-RPC exception class + /// + class JsonRpcException : Exception + { + public JsonRpcError RpcError { get; } + public JsonRpcException(JsonRpcError err) + : base($"Code={err.Code}, Message={err.Message.NonNull()}" + + (err == null || err.Data == null ? "" : $", Data={err.Data.ObjectToJson(compact: true)}")) + { + this.RpcError = err; + } + } + + /// + /// JSON-RPC request class. See https://www.jsonrpc.org/specification + /// + class JsonRpcRequest + { + [JsonProperty("jsonrpc", Order = 1)] + public string Version { get; set; } = "2.0"; + + [JsonProperty("id", Order = 2)] + public string Id { get; set; } = null; + + [JsonProperty("method", Order = 3)] + public string Method { get; set; } = ""; + + [JsonProperty("params", Order = 4)] + public object Params { get; set; } = null; + + public JsonRpcRequest() { } + + public JsonRpcRequest(string method, object param, string id) + { + this.Method = method; + this.Params = param; + this.Id = id; + } + } + + /// + /// JSON-RPC response class with generics + /// + /// + class JsonRpcResponse + { + [JsonProperty("jsonrpc", Order = 1)] + public virtual string Version { get; set; } = "2.0"; + + [JsonProperty("id", NullValueHandling = NullValueHandling.Include, Order = 2)] + public virtual string Id { get; set; } = null; + + [JsonProperty("result", Order = 3)] + public virtual TResult Result { get; set; } = default(TResult); + + [JsonProperty("error", Order = 4)] + public virtual JsonRpcError Error { get; set; } = null; + + [JsonIgnore] + public virtual bool IsError => this.Error != null; + + [JsonIgnore] + public virtual bool IsOk => !IsError; + + public virtual void ThrowIfError() + { + if (this.IsError) throw new JsonRpcException(this.Error); + } + + public override string ToString() + { + return this.ObjectToJson(compact: true); + } + } + + /// + /// JSON-RPC error class. See https://www.jsonrpc.org/specification + /// + class JsonRpcError + { + public JsonRpcError() { } + public JsonRpcError(int code, string message, object data = null) + { + this.Code = code; + this.Message = message.NonNull(); + if (this.Message.IsEmpty()) this.Message = $"JSON-RPC Error {code}"; + this.Data = data; + } + + [JsonProperty("code")] + public int Code { get; set; } = 0; + + [JsonProperty("message")] + public string Message { get; set; } = null; + + [JsonProperty("data")] + public object Data { get; set; } = null; + } + + /// + /// JSON-RPC client. See https://www.jsonrpc.org/specification + /// + class JsonRpcClient + { + HttpClientHandler client_handler; + HttpClient client; + public const int DefaultTimeoutMsecs = 60 * 1000; + public int TimeoutMsecs { get => (int)client.Timeout.TotalMilliseconds; set => client.Timeout = new TimeSpan(0, 0, 0, 0, value); } + public Dictionary HttpHeaders { get; } = new Dictionary(); + + string base_url; + + /// + /// JSON-RPC client class constructor + /// + /// The URL + /// The SSL certificate validation callback + public JsonRpcClient(string url, Func cert_check_proc = null) + { + if (cert_check_proc == null) cert_check_proc = (message, cert, chain, errors) => true; + client_handler = new HttpClientHandler(); + + this.client_handler.AllowAutoRedirect = true; + this.client_handler.MaxAutomaticRedirections = 10; + + client_handler.ServerCertificateCustomValidationCallback = cert_check_proc; + + client = new HttpClient(client_handler, true); + //Console.WriteLine("new HttpClient(client_handler, true);"); + + this.base_url = url; + + this.TimeoutMsecs = DefaultTimeoutMsecs; + } + + /// + /// Call a single RPC call (without error check). You can wait for the response with Task or await statement. + /// + /// The name of RPC method + /// The parameters + public async Task CallInternalAsync(string method_name, object param) + { + string id = DateTime.Now.Ticks.ToString(); + + JsonRpcRequest req = new JsonRpcRequest(method_name, param, id); + + string req_string = req.ObjectToJson(); + + //Console.WriteLine($"req: {req_string}"); + + HttpContent content = new StringContent(req_string, Encoding.UTF8, "application/json"); + + foreach (string key in this.HttpHeaders.Keys) + { + string value = this.HttpHeaders[key]; + + content.Headers.Add(key, value); + } + + HttpResponseMessage response = await this.client.PostAsync(base_url, content); + + Stream responseStream = await response.Content.ReadAsStreamAsync(); + + if (!response.IsSuccessStatusCode) + { + using (StreamReader streamReader = new StreamReader(responseStream)) + { + throw new Exception($"Error: {response.StatusCode}: {await streamReader.ReadToEndAsync()}"); + } + } + + string ret_string; + + using (StreamReader streamReader = new StreamReader(responseStream)) + { + ret_string = await streamReader.ReadToEndAsync(); + } + + //Console.WriteLine($"ret: {ret_string}"); + + return ret_string; + } + + /// + /// Call a single RPC call (with error check). You can wait for the response with Promise or await statement. In the case of error, it will be thrown. + /// + /// The name of RPC method + /// The parameters + public async Task CallAsync(string method_name, object param) + { + string ret_string = await CallInternalAsync(method_name, param); + + JsonRpcResponse ret = ret_string.JsonToObject>(); + + ret.ThrowIfError(); + + return ret.Result; + } + } +} + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/VPNServerRpc.cs b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/VPNServerRpc.cs new file mode 100644 index 00000000..63da0e6d --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/VPNServerRpc.cs @@ -0,0 +1,1399 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// VPNServerRpc.cs - SoftEther VPN Server's JSON-RPC Stubs +// +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + +using System.Threading.Tasks; +using SoftEther.JsonRpc; + +namespace SoftEther.VPNServerRpc +{ + /// + /// VPN Server RPC Stubs + /// + public class VpnServerRpc + { + JsonRpcClient rpc_client; + + /// + /// Constructor of the VpnServerRpc class + /// + /// The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + /// The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself. + /// Specify the administration password. This value is valid only if vpnserver_hostname is sepcified. + /// The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode. + public VpnServerRpc(string vpnserver_host, int vpnserver_port, string admin_password, string hub_name = null) + { + rpc_client = new JsonRpcClient($"https://{vpnserver_host}:{vpnserver_port}/api/", null); + + rpc_client.HttpHeaders.Add("X-VPNADMIN-HUBNAME", string.IsNullOrEmpty(hub_name) ? "" : hub_name); + rpc_client.HttpHeaders.Add("X-VPNADMIN-PASSWORD", admin_password); + } + + /// + /// Call a RPC procedure + /// + public async Task CallAsync(string method_name, T request) + { + T response = await rpc_client.CallAsync(method_name, request); + + return response; + } + + /// + /// Test RPC function (Async mode). Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. + /// + public async Task TestAsync(VpnRpcTest t) => await CallAsync("Test", t); + + /// + /// Test RPC function (Sync mode). Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field. + /// + public VpnRpcTest Test(VpnRpcTest t) => TestAsync(t).Result; + + /// + /// Get server information (Async mode). This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. + /// + public async Task GetServerInfoAsync() => await CallAsync("GetServerInfo", new VpnRpcServerInfo()); + + /// + /// Get server information (Sync mode). This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. + /// + public VpnRpcServerInfo GetServerInfo() => GetServerInfoAsync().Result; + + /// + /// Get Current Server Status (Async mode). This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. + /// + public async Task GetServerStatusAsync() => await CallAsync("GetServerStatus", new VpnRpcServerStatus()); + + /// + /// Get Current Server Status (Sync mode). This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. + /// + public VpnRpcServerStatus GetServerStatus() => GetServerStatusAsync().Result; + + /// + /// Create New TCP Listener (Async mode). This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. + /// + public async Task CreateListenerAsync(VpnRpcListener t) => await CallAsync("CreateListener", t); + + /// + /// Create New TCP Listener (Sync mode). This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListener CreateListener(VpnRpcListener t) => CreateListenerAsync(t).Result; + + /// + /// Get List of TCP Listeners (Async mode). This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnumListenerAsync() => await CallAsync("EnumListener", new VpnRpcListenerList()); + + /// + /// Get List of TCP Listeners (Async mode). This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListenerList EnumListener() => EnumListenerAsync().Result; + + /// + /// Delete TCP Listener (Async mode). This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task DeleteListenerAsync(VpnRpcListener t) => await CallAsync("DeleteListener", t); + + /// + /// Delete TCP Listener (Async mode). This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListener DeleteListener(VpnRpcListener t) => DeleteListenerAsync(t).Result; + + /// + /// Enable / Disable TCP Listener (Async mode). This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnableListenerAsync(VpnRpcListener t) => await CallAsync("EnableListener", t); + + /// + /// Enable / Disable TCP Listener (Async mode). This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcListener EnableListener(VpnRpcListener t) => EnableListenerAsync(t).Result; + + /// + /// Set VPN Server Administrator Password (Async mode). This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetServerPasswordAsync(VpnRpcSetPassword t) => await CallAsync("SetServerPassword", t); + + /// + /// Set VPN Server Administrator Password (Async mode). This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcSetPassword SetServerPassword(VpnRpcSetPassword t) => SetServerPasswordAsync(t).Result; + + /// + /// Set the VPN Server clustering configuration (Async mode). Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. + /// + public async Task SetFarmSettingAsync(VpnRpcFarm t) => await CallAsync("SetFarmSetting", t); + + /// + /// Set the VPN Server clustering configuration (Async mode). Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge. + /// + public VpnRpcFarm SetFarmSetting(VpnRpcFarm t) => SetFarmSettingAsync(t).Result; + + /// + /// Get Clustering Configuration of Current VPN Server (Async mode). You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetFarmSettingAsync() => await CallAsync("GetFarmSetting", new VpnRpcFarm()); + + /// + /// Get Clustering Configuration of Current VPN Server (Async mode). You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcFarm GetFarmSetting() => GetFarmSettingAsync().Result; + + /// + /// Get Cluster Member Information (Async mode). When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. + /// + public async Task GetFarmInfoAsync(VpnRpcFarmInfo t) => await CallAsync("GetFarmInfo", t); + + /// + /// Get Cluster Member Information (Async mode). When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcFarmInfo GetFarmInfo(VpnRpcFarmInfo t) => GetFarmInfoAsync(t).Result; + + /// + /// Get List of Cluster Members (Async mode). Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. + /// + public async Task EnumFarmMemberAsync() => await CallAsync("EnumFarmMember", new VpnRpcEnumFarm()); + + /// + /// Get List of Cluster Members (Async mode). Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcEnumFarm EnumFarmMember() => EnumFarmMemberAsync().Result; + + /// + /// Get Connection Status to Cluster Controller (Async mode). Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. + /// + public async Task GetFarmConnectionStatusAsync() => await CallAsync("GetFarmConnectionStatus", new VpnRpcFarmConnectionStatus()); + + /// + /// Get Connection Status to Cluster Controller (Sync mode). Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcFarmConnectionStatus GetFarmConnectionStatus() => GetFarmConnectionStatusAsync().Result; + + /// + /// Set SSL Certificate and Private Key of VPN Server (Async mode). You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetServerCertAsync(VpnRpcKeyPair t) => await CallAsync("SetServerCert", t); + + /// + /// Set SSL Certificate and Private Key of VPN Server (Sync mode). You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcKeyPair SetServerCert(VpnRpcKeyPair t) => SetServerCertAsync(t).Result; + + /// + /// Get SSL Certificate and Private Key of VPN Server (Async mode). Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetServerCertAsync() => await CallAsync("GetServerCert", new VpnRpcKeyPair()); + + /// + /// Get SSL Certificate and Private Key of VPN Server (Async mode). Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcKeyPair GetServerCert() => GetServerCertAsync().Result; + + /// + /// Get the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. + /// + public async Task GetServerCipherAsync() => await CallAsync("GetServerCipher", new VpnRpcStr()); + + /// + /// Get the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. + /// + public VpnRpcStr GetServerCipher() => GetServerCipherAsync().Result; + + /// + /// Set the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetServerCipherAsync(VpnRpcStr t) => await CallAsync("SetServerCipher", t); + + /// + /// Set the Encrypted Algorithm Used for VPN Communication (Async mode). Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcStr SetServerCipher(VpnRpcStr t) => SetServerCipherAsync(t).Result; + + /// + /// Create New Virtual Hub (Async mode). Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public async Task CreateHubAsync(VpnRpcCreateHub input_param) => await CallAsync("CreateHub", input_param); + + /// + /// Create New Virtual Hub (Async mode). Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public VpnRpcCreateHub CreateHub(VpnRpcCreateHub input_param) => CreateHubAsync(input_param).Result; + + /// + /// Set the Virtual Hub configuration (Async mode). You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. + /// + public async Task SetHubAsync(VpnRpcCreateHub input_param) => await CallAsync("SetHub", input_param); + + /// + /// Set the Virtual Hub configuration (Async mode). You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API. + /// + public VpnRpcCreateHub SetHub(VpnRpcCreateHub input_param) => SetHubAsync(input_param).Result; + + /// + /// Get the Virtual Hub configuration (Async mode). You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. + /// + public async Task GetHubAsync(VpnRpcCreateHub input_param) => await CallAsync("GetHub", input_param); + + /// + /// Get the Virtual Hub configuration (Async mode). You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API. + /// + public VpnRpcCreateHub GetHub(VpnRpcCreateHub input_param) => GetHubAsync(input_param).Result; + + /// + /// Get List of Virtual Hubs (Async mode). Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. + /// + public async Task EnumHubAsync() => await CallAsync("EnumHub", new VpnRpcEnumHub()); + + /// + /// Get List of Virtual Hubs (Async mode). Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. + /// + public VpnRpcEnumHub EnumHub() => EnumHubAsync().Result; + + /// + /// Delete Virtual Hub (Async mode). Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public async Task DeleteHubAsync(VpnRpcDeleteHub input_param) => await CallAsync("DeleteHub", input_param); + + /// + /// Delete Virtual Hub (Async mode). Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. + /// + public VpnRpcDeleteHub DeleteHub(VpnRpcDeleteHub input_param) => DeleteHubAsync(input_param).Result; + + /// + /// Get Setting of RADIUS Server Used for User Authentication (Async mode). Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetHubRadiusAsync(VpnRpcRadius input_param) => await CallAsync("GetHubRadius", input_param); + + /// + /// Get Setting of RADIUS Server Used for User Authentication (Async mode). Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcRadius GetHubRadius(VpnRpcRadius input_param) => GetHubRadiusAsync(input_param).Result; + + /// + /// Set RADIUS Server to use for User Authentication (Async mode). To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetHubRadiusAsync(VpnRpcRadius input_param) => await CallAsync("SetHubRadius", input_param); + + /// + /// Set RADIUS Server to use for User Authentication (Async mode). To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcRadius SetHubRadius(VpnRpcRadius input_param) => SetHubRadiusAsync(input_param).Result; + + /// + /// Get List of TCP Connections Connecting to the VPN Server (Async mode). Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnumConnectionAsync() => await CallAsync("EnumConnection", new VpnRpcEnumConnection()); + + /// + /// Get List of TCP Connections Connecting to the VPN Server (Async mode). Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcEnumConnection EnumConnection() => EnumConnectionAsync().Result; + + /// + /// Disconnect TCP Connections Connecting to the VPN Server (Async mode). Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public async Task DisconnectConnectionAsync(VpnRpcDisconnectConnection input_param) => await CallAsync("DisconnectConnection", input_param); + + /// + /// Disconnect TCP Connections Connecting to the VPN Server (Async mode). Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcDisconnectConnection DisconnectConnection(VpnRpcDisconnectConnection input_param) => DisconnectConnectionAsync(input_param).Result; + + /// + /// Get Information of TCP Connections Connecting to the VPN Server (Async mode). Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetConnectionInfoAsync(VpnRpcConnectionInfo input_param) => await CallAsync("GetConnectionInfo", input_param); + + /// + /// Get Information of TCP Connections Connecting to the VPN Server (Async mode). Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcConnectionInfo GetConnectionInfo(VpnRpcConnectionInfo input_param) => GetConnectionInfoAsync(input_param).Result; + + /// + /// Switch Virtual Hub to Online or Offline (Async mode). Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetHubOnlineAsync(VpnRpcSetHubOnline input_param) => await CallAsync("SetHubOnline", input_param); + + /// + /// Switch Virtual Hub to Online or Offline (Async mode). Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcSetHubOnline SetHubOnline(VpnRpcSetHubOnline input_param) => SetHubOnlineAsync(input_param).Result; + + /// + /// Get Current Status of Virtual Hub (Async mode). Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. + /// + public async Task GetHubStatusAsync(VpnRpcHubStatus input_param) => await CallAsync("GetHubStatus", input_param); + + /// + /// Get Current Status of Virtual Hub (Async mode). Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. + /// + public VpnRpcHubStatus GetHubStatus(VpnRpcHubStatus input_param) => GetHubStatusAsync(input_param).Result; + + /// + /// Set the logging configuration of the Virtual Hub (Async mode). Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. + /// + public async Task SetHubLogAsync(VpnRpcHubLog input_param) => await CallAsync("SetHubLog", input_param); + + /// + /// Set the logging configuration of the Virtual Hub (Async mode). Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API. + /// + public VpnRpcHubLog SetHubLog(VpnRpcHubLog input_param) => SetHubLogAsync(input_param).Result; + + /// + /// Get the logging configuration of the Virtual Hub (Async mode). Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. + /// + public async Task GetHubLogAsync(VpnRpcHubLog input_param) => await CallAsync("GetHubLog", input_param); + + /// + /// Get the logging configuration of the Virtual Hub (Async mode). Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API. + /// + public VpnRpcHubLog GetHubLog(VpnRpcHubLog input_param) => GetHubLogAsync(input_param).Result; + + /// + /// Add Trusted CA Certificate (Async mode). Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task AddCaAsync(VpnRpcHubAddCA input_param) => await CallAsync("AddCa", input_param); + + /// + /// Add Trusted CA Certificate (Async mode). Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubAddCA AddCa(VpnRpcHubAddCA input_param) => AddCaAsync(input_param).Result; + + /// + /// Get List of Trusted CA Certificates (Async mode). Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumCaAsync(VpnRpcHubEnumCA input_param) => await CallAsync("EnumCa", input_param); + + /// + /// Get List of Trusted CA Certificates (Async mode). Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubEnumCA EnumCa(VpnRpcHubEnumCA input_param) => EnumCaAsync(input_param).Result; + + /// + /// Get Trusted CA Certificate (Async mode). Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task GetCaAsync(VpnRpcHubGetCA input_param) => await CallAsync("GetCa", input_param); + + /// + /// Get Trusted CA Certificate (Async mode). Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubGetCA GetCa(VpnRpcHubGetCA input_param) => GetCaAsync(input_param).Result; + + /// + /// Delete Trusted CA Certificate (Async mode). Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteCaAsync(VpnRpcHubDeleteCA input_param) => await CallAsync("DeleteCa", input_param); + + /// + /// Delete Trusted CA Certificate (Async mode). Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcHubDeleteCA DeleteCa(VpnRpcHubDeleteCA input_param) => DeleteCaAsync(input_param).Result; + + /// + /// Create New Cascade Connection (Async mode). Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task CreateLinkAsync(VpnRpcCreateLink input_param) => await CallAsync("CreateLink", input_param); + + /// + /// Create New Cascade Connection (Async mode). Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCreateLink CreateLink(VpnRpcCreateLink input_param) => CreateLinkAsync(input_param).Result; + + /// + /// Get the Cascade Connection Setting (Async mode). Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetLinkAsync(VpnRpcCreateLink input_param) => await CallAsync("GetLink", input_param); + + /// + /// Get the Cascade Connection Setting (Async mode). Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCreateLink GetLink(VpnRpcCreateLink input_param) => GetLinkAsync(input_param).Result; + + /// + /// Change Existing Cascade Connection (Async mode). Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. + /// + public async Task SetLinkAsync(VpnRpcCreateLink input_param) => await CallAsync("SetLink", input_param); + + /// + /// Change Existing Cascade Connection (Async mode). Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub. + /// + public VpnRpcCreateLink SetLink(VpnRpcCreateLink input_param) => SetLinkAsync(input_param).Result; + + /// + /// Get List of Cascade Connections (Async mode). Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumLinkAsync(VpnRpcEnumLink input_param) => await CallAsync("EnumLink", input_param); + + /// + /// Get List of Cascade Connections (Async mode). Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumLink EnumLink(VpnRpcEnumLink input_param) => EnumLinkAsync(input_param).Result; + + /// + /// Switch Cascade Connection to Online Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetLinkOnlineAsync(VpnRpcLink input_param) => await CallAsync("SetLinkOnline", input_param); + + /// + /// Switch Cascade Connection to Online Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLink SetLinkOnline(VpnRpcLink input_param) => SetLinkOnlineAsync(input_param).Result; + + /// + /// Switch Cascade Connection to Offline Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetLinkOfflineAsync(VpnRpcLink input_param) => await CallAsync("SetLinkOffline", input_param); + + /// + /// Switch Cascade Connection to Offline Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLink SetLinkOffline(VpnRpcLink input_param) => SetLinkOfflineAsync(input_param).Result; + + /// + /// Delete Cascade Connection Setting (Async mode). Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DeleteLinkAsync(VpnRpcLink input_param) => await CallAsync("DeleteLink", input_param); + + /// + /// Delete Cascade Connection Setting (Async mode). Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLink DeleteLink(VpnRpcLink input_param) => DeleteLinkAsync(input_param).Result; + + /// + /// Change Name of Cascade Connection (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task RenameLinkAsync(VpnRpcRenameLink input_param) => await CallAsync("RenameLink", input_param); + + /// + /// Change Name of Cascade Connection (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcRenameLink RenameLink(VpnRpcRenameLink input_param) => RenameLinkAsync(input_param).Result; + + /// + /// Get Current Cascade Connection Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetLinkStatusAsync(VpnRpcLinkStatus input_param) => await CallAsync("GetLinkStatus", input_param); + + /// + /// Get Current Cascade Connection Status (Async mode). When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcLinkStatus GetLinkStatus(VpnRpcLinkStatus input_param) => GetLinkStatusAsync(input_param).Result; + + /// + /// Add Access List Rule (Async mode). Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task AddAccessAsync(VpnRpcAddAccess input_param) => await CallAsync("AddAccess", input_param); + + /// + /// Add Access List Rule (Async mode). Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcAddAccess AddAccess(VpnRpcAddAccess input_param) => AddAccessAsync(input_param).Result; + + /// + /// Delete Rule from Access List (Async mode). Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteAccessAsync(VpnRpcDeleteAccess input_param) => await CallAsync("DeleteAccess", input_param); + + /// + /// Delete Rule from Access List (Async mode). Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcDeleteAccess DeleteAccess(VpnRpcDeleteAccess input_param) => DeleteAccessAsync(input_param).Result; + + /// + /// Get Access List Rule List (Async mode). Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumAccessAsync(VpnRpcEnumAccessList input_param) => await CallAsync("EnumAccess", input_param); + + /// + /// Get Access List Rule List (Async mode). Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcEnumAccessList EnumAccess(VpnRpcEnumAccessList input_param) => EnumAccessAsync(input_param).Result; + + /// + /// Replace all access lists on a single bulk API call (Async mode). This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. + /// + public async Task SetAccessListAsync(VpnRpcEnumAccessList input_param) => await CallAsync("SetAccessList", input_param); + + /// + /// Replace all access lists on a single bulk API call (Async mode). This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter. + /// + public VpnRpcEnumAccessList SetAccessList(VpnRpcEnumAccessList input_param) => SetAccessListAsync(input_param).Result; + + /// + /// Create a user (Async mode). Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task CreateUserAsync(VpnRpcSetUser input_param) => await CallAsync("CreateUser", input_param); + + /// + /// Create a user (Async mode). Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetUser CreateUser(VpnRpcSetUser input_param) => CreateUserAsync(input_param).Result; + + /// + /// Change User Settings (Async mode). Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task SetUserAsync(VpnRpcSetUser input_param) => await CallAsync("SetUser", input_param); + + /// + /// Change User Settings (Async mode). Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetUser SetUser(VpnRpcSetUser input_param) => SetUserAsync(input_param).Result; + + /// + /// Get User Settings (Async mode). Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task GetUserAsync(VpnRpcSetUser input_param) => await CallAsync("GetUser", input_param); + + /// + /// Get User Settings (Async mode). Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetUser GetUser(VpnRpcSetUser input_param) => GetUserAsync(input_param).Result; + + /// + /// Delete a user (Async mode). Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteUserAsync(VpnRpcDeleteUser input_param) => await CallAsync("DeleteUser", input_param); + + /// + /// Delete a user (Sync mode). Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcDeleteUser DeleteUser(VpnRpcDeleteUser input_param) => DeleteUserAsync(input_param).Result; + + /// + /// Get List of Users (Async mode). Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumUserAsync(VpnRpcEnumUser input_param) => await CallAsync("EnumUser", input_param); + + /// + /// Get List of Users (Async mode). Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcEnumUser EnumUser(VpnRpcEnumUser input_param) => EnumUserAsync(input_param).Result; + + /// + /// Create Group (Async mode). Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task CreateGroupAsync(VpnRpcSetGroup input_param) => await CallAsync("CreateGroup", input_param); + + /// + /// Create Group (Async mode). Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetGroup CreateGroup(VpnRpcSetGroup input_param) => CreateGroupAsync(input_param).Result; + + /// + /// Set group settings (Async mode). Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task SetGroupAsync(VpnRpcSetGroup input_param) => await CallAsync("SetGroup", input_param); + + /// + /// Set group settings (Async mode). Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetGroup SetGroup(VpnRpcSetGroup input_param) => SetGroupAsync(input_param).Result; + + /// + /// Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task GetGroupAsync(VpnRpcSetGroup input_param) => await CallAsync("GetGroup", input_param); + + /// + /// Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcSetGroup GetGroup(VpnRpcSetGroup input_param) => GetGroupAsync(input_param).Result; + + /// + /// Delete User from Group (Async mode). Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task DeleteGroupAsync(VpnRpcDeleteUser input_param) => await CallAsync("DeleteGroup", input_param); + + /// + /// Delete User from Group (Async mode). Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcDeleteUser DeleteGroup(VpnRpcDeleteUser input_param) => DeleteGroupAsync(input_param).Result; + + /// + /// Get List of Groups (Async mode). Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public async Task EnumGroupAsync(VpnRpcEnumGroup input_param) => await CallAsync("EnumGroup", input_param); + + /// + /// Get List of Groups (Async mode). Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster. + /// + public VpnRpcEnumGroup EnumGroup(VpnRpcEnumGroup input_param) => EnumGroupAsync(input_param).Result; + + /// + /// Get List of Connected VPN Sessions (Async mode). Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. + /// + public async Task EnumSessionAsync(VpnRpcEnumSession input_param) => await CallAsync("EnumSession", input_param); + + /// + /// Get List of Connected VPN Sessions (Async mode). Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. + /// + public VpnRpcEnumSession EnumSession(VpnRpcEnumSession input_param) => EnumSessionAsync(input_param).Result; + + /// + /// Get Session Status (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. + /// + public async Task GetSessionStatusAsync(VpnRpcSessionStatus input_param) => await CallAsync("GetSessionStatus", input_param); + + /// + /// Get Session Status (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API. + /// + public VpnRpcSessionStatus GetSessionStatus(VpnRpcSessionStatus input_param) => GetSessionStatusAsync(input_param).Result; + + /// + /// Disconnect Session (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. + /// + public async Task DeleteSessionAsync(VpnRpcDeleteSession input_param) => await CallAsync("DeleteSession", input_param); + + /// + /// Disconnect Session (Async mode). Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API. + /// + public VpnRpcDeleteSession DeleteSession(VpnRpcDeleteSession input_param) => DeleteSessionAsync(input_param).Result; + + /// + /// Get the MAC Address Table Database (Async mode). Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. + /// + public async Task EnumMacTableAsync(VpnRpcEnumMacTable input_param) => await CallAsync("EnumMacTable", input_param); + + /// + /// Get the MAC Address Table Database (Async mode). Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication. + /// + public VpnRpcEnumMacTable EnumMacTable(VpnRpcEnumMacTable input_param) => EnumMacTableAsync(input_param).Result; + + /// + /// Delete MAC Address Table Entry (Async mode). Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. + /// + public async Task DeleteMacTableAsync(VpnRpcDeleteTable input_param) => await CallAsync("DeleteMacTable", input_param); + + /// + /// Delete MAC Address Table Entry (Async mode). Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API. + /// + public VpnRpcDeleteTable DeleteMacTable(VpnRpcDeleteTable input_param) => DeleteMacTableAsync(input_param).Result; + + /// + /// Get the IP Address Table Database (Async mode). Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. + /// + public async Task EnumIpTableAsync(VpnRpcEnumIpTable input_param) => await CallAsync("EnumIpTable", input_param); + + /// + /// Get the IP Address Table Database (Async mode). Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session. + /// + public VpnRpcEnumIpTable EnumIpTable(VpnRpcEnumIpTable input_param) => EnumIpTableAsync(input_param).Result; + + /// + /// Delete IP Address Table Entry (Async mode). Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. + /// + public async Task DeleteIpTableAsync(VpnRpcDeleteTable input_param) => await CallAsync("DeleteIpTable", input_param); + + /// + /// Delete IP Address Table Entry (Async mode). Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API. + /// + public VpnRpcDeleteTable DeleteIpTable(VpnRpcDeleteTable input_param) => DeleteIpTableAsync(input_param).Result; + + /// + /// Set the Keep Alive Internet Connection Function (Async mode). Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. + /// + public async Task SetKeepAsync(VpnRpcKeep input_param) => await CallAsync("SetKeep", input_param); + + /// + /// Set the Keep Alive Internet Connection Function (Async mode). Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges. + /// + public VpnRpcKeep SetKeep(VpnRpcKeep input_param) => SetKeepAsync(input_param).Result; + + /// + /// Get the Keep Alive Internet Connection Function (Async mode). Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. + /// + public async Task GetKeepAsync(VpnRpcKeep input_param) => await CallAsync("GetKeep", input_param); + + /// + /// Get the Keep Alive Internet Connection Function (Async mode). Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. + /// + public VpnRpcKeep GetKeep(VpnRpcKeep input_param) => GetKeepAsync(input_param).Result; + + /// + /// Enable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnableSecureNATAsync(VpnRpcHub input_param) => await CallAsync("EnableSecureNAT", input_param); + + /// + /// Enable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcHub EnableSecureNAT(VpnRpcHub input_param) => EnableSecureNATAsync(input_param).Result; + + /// + /// Disable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DisableSecureNATAsync(VpnRpcHub input_param) => await CallAsync("DisableSecureNAT", input_param); + + /// + /// Disable the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcHub DisableSecureNAT(VpnRpcHub input_param) => DisableSecureNATAsync(input_param).Result; + + /// + /// Change Settings of SecureNAT Function (Async mode). Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetSecureNATOptionAsync(VpnVhOption input_param) => await CallAsync("SetSecureNATOption", input_param); + + /// + /// Change Settings of SecureNAT Function (Async mode). Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnVhOption SetSecureNATOption(VpnVhOption input_param) => SetSecureNATOptionAsync(input_param).Result; + + /// + /// Get Settings of SecureNAT Function (Async mode). This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. + /// + public async Task GetSecureNATOptionAsync(VpnVhOption input_param) => await CallAsync("GetSecureNATOption", input_param); + + /// + /// Get Settings of SecureNAT Function (Async mode). This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API. + /// + public VpnVhOption GetSecureNATOption(VpnVhOption input_param) => GetSecureNATOptionAsync(input_param).Result; + + /// + /// Get Virtual NAT Function Session Table of SecureNAT Function (Async mode). Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumNATAsync(VpnRpcEnumNat input_param) => await CallAsync("EnumNAT", input_param); + + /// + /// Get Virtual NAT Function Session Table of SecureNAT Function (Async mode). Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumNat EnumNAT(VpnRpcEnumNat input_param) => EnumNATAsync(input_param).Result; + + /// + /// Get Virtual DHCP Server Function Lease Table of SecureNAT Function (Async mode). Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumDHCPAsync(VpnRpcEnumDhcp input_param) => await CallAsync("EnumDHCP", input_param); + + /// + /// Get Virtual DHCP Server Function Lease Table of SecureNAT Function (Async mode). Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumDhcp EnumDHCP(VpnRpcEnumDhcp input_param) => EnumDHCPAsync(input_param).Result; + + /// + /// Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetSecureNATStatusAsync(VpnRpcNatStatus input_param) => await CallAsync("GetSecureNATStatus", input_param); + + /// + /// Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function) (Async mode). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcNatStatus GetSecureNATStatus(VpnRpcNatStatus input_param) => GetSecureNATStatusAsync(input_param).Result; + + /// + /// Get List of Network Adapters Usable as Local Bridge (Async mode). Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task EnumEthernetAsync() => await CallAsync("EnumEthernet", new VpnRpcEnumEth()); + + /// + /// Get List of Network Adapters Usable as Local Bridge (Async mode). Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcEnumEth EnumEthernet() => EnumEthernetAsync().Result; + + /// + /// Create Local Bridge Connection (Async mode). Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. + /// + public async Task AddLocalBridgeAsync(VpnRpcLocalBridge input_param) => await CallAsync("AddLocalBridge", input_param); + + /// + /// Create Local Bridge Connection (Async mode). Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcLocalBridge AddLocalBridge(VpnRpcLocalBridge input_param) => AddLocalBridgeAsync(input_param).Result; + + /// + /// Delete Local Bridge Connection (Async mode). Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task DeleteLocalBridgeAsync(VpnRpcLocalBridge input_param) => await CallAsync("DeleteLocalBridge", input_param); + + /// + /// Delete Local Bridge Connection (Async mode). Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcLocalBridge DeleteLocalBridge(VpnRpcLocalBridge input_param) => DeleteLocalBridgeAsync(input_param).Result; + + /// + /// Get List of Local Bridge Connection (Async mode). Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. + /// + public async Task EnumLocalBridgeAsync() => await CallAsync("EnumLocalBridge", new VpnRpcEnumLocalBridge()); + + /// + /// Get List of Local Bridge Connection (Async mode). Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. + /// + public VpnRpcEnumLocalBridge EnumLocalBridge() => EnumLocalBridgeAsync().Result; + + /// + /// Get whether the localbridge function is supported on the current system (Async mode). + /// + public async Task GetBridgeSupportAsync() => await CallAsync("GetBridgeSupport", new VpnRpcBridgeSupport()); + + /// + /// Get whether the localbridge function is supported on the current system (Async mode). + /// + public VpnRpcBridgeSupport GetBridgeSupport() => GetBridgeSupportAsync().Result; + + /// + /// Reboot VPN Server Service (Async mode). Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. + /// + public async Task RebootServerAsync(VpnRpcTest input_param) => await CallAsync("RebootServer", input_param); + + /// + /// Reboot VPN Server Service (Async mode). Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcTest RebootServer(VpnRpcTest input_param) => RebootServerAsync(input_param).Result; + + /// + /// Get List of Server Functions / Capability (Async mode). Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. + /// + public async Task GetCapsAsync() => await CallAsync("GetCaps", new VpnCapslist()); + + /// + /// Get List of Server Functions / Capability (Async mode). Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it. + /// + public VpnCapslist GetCaps() => GetCapsAsync().Result; + + /// + /// Get the current configuration of the VPN Server (Async mode). Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task GetConfigAsync() => await CallAsync("GetConfig", new VpnRpcConfig()); + + /// + /// Get the current configuration of the VPN Server (Async mode). Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcConfig GetConfig() => GetConfigAsync().Result; + + /// + /// Write Configuration File to VPN Server (Async mode). Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. + /// + public async Task SetConfigAsync(VpnRpcConfig input_param) => await CallAsync("SetConfig", input_param); + + /// + /// Write Configuration File to VPN Server (Async mode). Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcConfig SetConfig(VpnRpcConfig input_param) => SetConfigAsync(input_param).Result; + + /// + /// Get Virtual Hub Administration Option default values (Async mode). + /// + public async Task GetDefaultHubAdminOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("GetDefaultHubAdminOptions", input_param); + + /// + /// Get Virtual Hub Administration Option default values (Async mode). + /// + public VpnRpcAdminOption GetDefaultHubAdminOptions(VpnRpcAdminOption input_param) => GetDefaultHubAdminOptionsAsync(input_param).Result; + + /// + /// Get List of Virtual Hub Administration Options (Async mode). Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task GetHubAdminOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("GetHubAdminOptions", input_param); + + /// + /// Get List of Virtual Hub Administration Options (Async mode). Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption GetHubAdminOptions(VpnRpcAdminOption input_param) => GetHubAdminOptionsAsync(input_param).Result; + + /// + /// Set Values of Virtual Hub Administration Options (Async mode). Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task SetHubAdminOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("SetHubAdminOptions", input_param); + + /// + /// Set Values of Virtual Hub Administration Options (Async mode). Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption SetHubAdminOptions(VpnRpcAdminOption input_param) => SetHubAdminOptionsAsync(input_param).Result; + + /// + /// Get List of Virtual Hub Extended Options (Async mode). Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task GetHubExtOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("GetHubExtOptions", input_param); + + /// + /// Get List of Virtual Hub Extended Options (Async mode). Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption GetHubExtOptions(VpnRpcAdminOption input_param) => GetHubExtOptionsAsync(input_param).Result; + + /// + /// Set a Value of Virtual Hub Extended Options (Async mode). Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public async Task SetHubExtOptionsAsync(VpnRpcAdminOption input_param) => await CallAsync("SetHubExtOptions", input_param); + + /// + /// Set a Value of Virtual Hub Extended Options (Async mode). Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member. + /// + public VpnRpcAdminOption SetHubExtOptions(VpnRpcAdminOption input_param) => SetHubExtOptionsAsync(input_param).Result; + + /// + /// Define New Virtual Layer 3 Switch (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public async Task AddL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("AddL3Switch", input_param); + + /// + /// Define New Virtual Layer 3 Switch (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public VpnRpcL3Sw AddL3Switch(VpnRpcL3Sw input_param) => AddL3SwitchAsync(input_param).Result; + + /// + /// Delete Virtual Layer 3 Switch (Async mode). Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public async Task DelL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("DelL3Switch", input_param); + + /// + /// Delete Virtual Layer 3 Switch (Async mode). Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public VpnRpcL3Sw DelL3Switch(VpnRpcL3Sw input_param) => DelL3SwitchAsync(input_param).Result; + + /// + /// Get List of Virtual Layer 3 Switches (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public async Task EnumL3SwitchAsync() => await CallAsync("EnumL3Switch", new VpnRpcEnumL3Sw()); + + /// + /// Get List of Virtual Layer 3 Switches (Async mode). Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public VpnRpcEnumL3Sw EnumL3Switch() => EnumL3SwitchAsync().Result; + + /// + /// Start Virtual Layer 3 Switch Operation (Async mode). Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public async Task StartL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("StartL3Switch", input_param); + + /// + /// Start Virtual Layer 3 Switch Operation (Async mode). Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. + /// + public VpnRpcL3Sw StartL3Switch(VpnRpcL3Sw input_param) => StartL3SwitchAsync(input_param).Result; + + /// + /// Stop Virtual Layer 3 Switch Operation (Async mode). Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. + /// + public async Task StopL3SwitchAsync(VpnRpcL3Sw input_param) => await CallAsync("StopL3Switch", input_param); + + /// + /// Stop Virtual Layer 3 Switch Operation (Async mode). Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. + /// + public VpnRpcL3Sw StopL3Switch(VpnRpcL3Sw input_param) => StopL3SwitchAsync(input_param).Result; + + /// + /// Add Virtual Interface to Virtual Layer 3 Switch (Async mode). Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task AddL3IfAsync(VpnRpcL3If input_param) => await CallAsync("AddL3If", input_param); + + /// + /// Add Virtual Interface to Virtual Layer 3 Switch (Async mode). Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3If AddL3If(VpnRpcL3If input_param) => AddL3IfAsync(input_param).Result; + + /// + /// Delete Virtual Interface of Virtual Layer 3 Switch (Async mode). Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task DelL3IfAsync(VpnRpcL3If input_param) => await CallAsync("DelL3If", input_param); + + /// + /// Delete Virtual Interface of Virtual Layer 3 Switch (Async mode). Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3If DelL3If(VpnRpcL3If input_param) => DelL3IfAsync(input_param).Result; + + /// + /// Get List of Interfaces Registered on the Virtual Layer 3 Switch (Async mode). Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public async Task EnumL3IfAsync(VpnRpcEnumL3If input_param) => await CallAsync("EnumL3If", input_param); + + /// + /// Get List of Interfaces Registered on the Virtual Layer 3 Switch (Async mode). Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public VpnRpcEnumL3If EnumL3If(VpnRpcEnumL3If input_param) => EnumL3IfAsync(input_param).Result; + + /// + /// Add Routing Table Entry for Virtual Layer 3 Switch (Async mode). Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task AddL3TableAsync(VpnRpcL3Table input_param) => await CallAsync("AddL3Table", input_param); + + /// + /// Add Routing Table Entry for Virtual Layer 3 Switch (Async mode). Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3Table AddL3Table(VpnRpcL3Table input_param) => AddL3TableAsync(input_param).Result; + + /// + /// Delete Routing Table Entry of Virtual Layer 3 Switch (Async mode). Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public async Task DelL3TableAsync(VpnRpcL3Table input_param) => await CallAsync("DelL3Table", input_param); + + /// + /// Delete Routing Table Entry of Virtual Layer 3 Switch (Async mode). Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API. + /// + public VpnRpcL3Table DelL3Table(VpnRpcL3Table input_param) => DelL3TableAsync(input_param).Result; + + /// + /// Get List of Routing Tables of Virtual Layer 3 Switch (Async mode). Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public async Task EnumL3TableAsync(VpnRpcEnumL3Table input_param) => await CallAsync("EnumL3Table", input_param); + + /// + /// Get List of Routing Tables of Virtual Layer 3 Switch (Async mode). Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. + /// + public VpnRpcEnumL3Table EnumL3Table(VpnRpcEnumL3Table input_param) => EnumL3TableAsync(input_param).Result; + + /// + /// Get List of Certificates Revocation List (Async mode). Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumCrlAsync(VpnRpcEnumCrl input_param) => await CallAsync("EnumCrl", input_param); + + /// + /// Get List of Certificates Revocation List (Async mode). Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumCrl EnumCrl(VpnRpcEnumCrl input_param) => EnumCrlAsync(input_param).Result; + + /// + /// Add a Revoked Certificate (Async mode). Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task AddCrlAsync(VpnRpcCrl input_param) => await CallAsync("AddCrl", input_param); + + /// + /// Add a Revoked Certificate (Async mode). Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl AddCrl(VpnRpcCrl input_param) => AddCrlAsync(input_param).Result; + + /// + /// Delete a Revoked Certificate (Async mode). Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DelCrlAsync(VpnRpcCrl input_param) => await CallAsync("DelCrl", input_param); + + /// + /// Delete a Revoked Certificate (Async mode). Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl DelCrl(VpnRpcCrl input_param) => DelCrlAsync(input_param).Result; + + /// + /// Get a Revoked Certificate (Async mode). Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetCrlAsync(VpnRpcCrl input_param) => await CallAsync("GetCrl", input_param); + + /// + /// Get a Revoked Certificate (Async mode). Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl GetCrl(VpnRpcCrl input_param) => GetCrlAsync(input_param).Result; + + /// + /// Change Existing CRL (Certificate Revocation List) Entry (Async mode). Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetCrlAsync(VpnRpcCrl input_param) => await CallAsync("SetCrl", input_param); + + /// + /// Change Existing CRL (Certificate Revocation List) Entry (Async mode). Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcCrl SetCrl(VpnRpcCrl input_param) => SetCrlAsync(input_param).Result; + + /// + /// Add Rule to Source IP Address Limit List (Async mode). Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetAcListAsync(VpnRpcAcList input_param) => await CallAsync("SetAcList", input_param); + + /// + /// Add Rule to Source IP Address Limit List (Async mode). Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAcList SetAcList(VpnRpcAcList input_param) => SetAcListAsync(input_param).Result; + + /// + /// Get List of Rule Items of Source IP Address Limit List (Async mode). Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetAcListAsync(VpnRpcAcList input_param) => await CallAsync("GetAcList", input_param); + + /// + /// Get List of Rule Items of Source IP Address Limit List (Async mode). Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAcList GetAcList(VpnRpcAcList input_param) => GetAcListAsync(input_param).Result; + + /// + /// Get List of Log Files (Async mode). Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public async Task EnumLogFileAsync() => await CallAsync("EnumLogFile", new VpnRpcEnumLogFile()); + + /// + /// Get List of Log Files (Async mode). Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public VpnRpcEnumLogFile EnumLogFile() => EnumLogFileAsync().Result; + + /// + /// Download a part of Log File (Async mode). Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public async Task ReadLogFileAsync(VpnRpcReadLogFile input_param) => await CallAsync("ReadLogFile", input_param); + + /// + /// Download a part of Log File (Async mode). Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. + /// + public VpnRpcReadLogFile ReadLogFile(VpnRpcReadLogFile input_param) => ReadLogFileAsync(input_param).Result; + + /// + /// Set syslog Send Function (Async mode). Use this to set the usage of syslog send function and which syslog server to use. + /// + public async Task SetSysLogAsync(VpnSyslogSetting input_param) => await CallAsync("SetSysLog", input_param); + + /// + /// Set syslog Send Function (Async mode). Use this to set the usage of syslog send function and which syslog server to use. + /// + public VpnSyslogSetting SetSysLog(VpnSyslogSetting input_param) => SetSysLogAsync(input_param).Result; + + /// + /// Get syslog Send Function (Async mode). This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. + /// + public async Task GetSysLogAsync(VpnSyslogSetting input_param) => await CallAsync("GetSysLog", input_param); + + /// + /// Get syslog Send Function (Async mode). This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. + /// + public VpnSyslogSetting GetSysLog(VpnSyslogSetting input_param) => GetSysLogAsync(input_param).Result; + + /// + /// Set Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public async Task SetHubMsgAsync(VpnRpcMsg input_param) => await CallAsync("SetHubMsg", input_param); + + /// + /// Set Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public VpnRpcMsg SetHubMsg(VpnRpcMsg input_param) => SetHubMsgAsync(input_param).Result; + + /// + /// Get Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public async Task GetHubMsgAsync(VpnRpcMsg input_param) => await CallAsync("GetHubMsg", input_param); + + /// + /// Get Today's Message of Virtual Hub (Async mode). The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub. + /// + public VpnRpcMsg GetHubMsg(VpnRpcMsg input_param) => GetHubMsgAsync(input_param).Result; + + /// + /// Raise a vital error on the VPN Server / Bridge to terminate the process forcefully (Async mode). This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public async Task CrashAsync(VpnRpcTest input_param) => await CallAsync("Crash", input_param); + + /// + /// Raise a vital error on the VPN Server / Bridge to terminate the process forcefully (Async mode). This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public VpnRpcTest Crash(VpnRpcTest input_param) => CrashAsync(input_param).Result; + + /// + /// Get the message for administrators (Async mode). + /// + public async Task GetAdminMsgAsync() => await CallAsync("GetAdminMsg", new VpnRpcMsg()); + + /// + /// Get message for administrators (Sync mode) + /// + public VpnRpcMsg GetAdminMsg() => GetAdminMsgAsync().Result; + + /// + /// Save All Volatile Data of VPN Server / Bridge to the Configuration File (Async mode). The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public async Task FlushAsync(VpnRpcTest input_param) => await CallAsync("Flush", input_param); + + /// + /// Save All Volatile Data of VPN Server / Bridge to the Configuration File (Sync mode). The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges. + /// + public VpnRpcTest Flush(VpnRpcTest input_param) => FlushAsync(input_param).Result; + + /// + /// Enable or Disable IPsec VPN Server Function (Async mode). Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetIPsecServicesAsync(VpnIPsecServices input_param) => await CallAsync("SetIPsecServices", input_param); + + /// + /// Enable or Disable IPsec VPN Server Function (Async mode). Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnIPsecServices SetIPsecServices(VpnIPsecServices input_param) => SetIPsecServicesAsync(input_param).Result; + + /// + /// Get the Current IPsec VPN Server Settings (Async mode). Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetIPsecServicesAsync() => await CallAsync("GetIPsecServices", new VpnIPsecServices()); + + /// + /// Get the Current IPsec VPN Server Settings (Async mode). Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnIPsecServices GetIPsecServices() => GetIPsecServicesAsync().Result; + + /// + /// Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices (Async mode). Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task AddEtherIpIdAsync(VpnEtherIpId input_param) => await CallAsync("AddEtherIpId", input_param); + + /// + /// Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices (Async mode). Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnEtherIpId AddEtherIpId(VpnEtherIpId input_param) => AddEtherIpIdAsync(input_param).Result; + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetEtherIpIdAsync(VpnEtherIpId input_param) => await CallAsync("GetEtherIpId", input_param); + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnEtherIpId GetEtherIpId(VpnEtherIpId input_param) => GetEtherIpIdAsync(input_param).Result; + + /// + /// Delete an EtherIP / L2TPv3 over IPsec Client Setting (Async mode). This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task DeleteEtherIpIdAsync(VpnEtherIpId input_param) => await CallAsync("DeleteEtherIpId", input_param); + + /// + /// Delete an EtherIP / L2TPv3 over IPsec Client Setting (Async mode). This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnEtherIpId DeleteEtherIpId(VpnEtherIpId input_param) => DeleteEtherIpIdAsync(input_param).Result; + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task EnumEtherIpIdAsync() => await CallAsync("EnumEtherIpId", new VpnRpcEnumEtherIpId()); + + /// + /// Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions (Async mode). This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcEnumEtherIpId EnumEtherIpId() => EnumEtherIpIdAsync().Result; + + /// + /// Set Settings for OpenVPN Clone Server Function (Async mode). The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetOpenVpnSstpConfigAsync(VpnOpenVpnSstpConfig input_param) => await CallAsync("SetOpenVpnSstpConfig", input_param); + + /// + /// Set Settings for OpenVPN Clone Server Function (Async mode). The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnOpenVpnSstpConfig SetOpenVpnSstpConfig(VpnOpenVpnSstpConfig input_param) => SetOpenVpnSstpConfigAsync(input_param).Result; + + /// + /// Get the Current Settings of OpenVPN Clone Server Function (Async mode). Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetOpenVpnSstpConfigAsync() => await CallAsync("GetOpenVpnSstpConfig", new VpnOpenVpnSstpConfig()); + + /// + /// Get the Current Settings of OpenVPN Clone Server Function (Async mode). Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnOpenVpnSstpConfig GetOpenVpnSstpConfig() => GetOpenVpnSstpConfigAsync().Result; + + /// + /// Show the Current Status of Dynamic DNS Function (Async mode). Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task GetDDnsClientStatusAsync() => await CallAsync("GetDDnsClientStatus", new VpnDDnsClientStatus()); + + /// + /// Show the Current Status of Dynamic DNS Function (Async mode). Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnDDnsClientStatus GetDDnsClientStatus() => GetDDnsClientStatusAsync().Result; + + /// + /// Set the Dynamic DNS Hostname (Async mode). You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task ChangeDDnsClientHostnameAsync(VpnRpcTest input_param) => await CallAsync("ChangeDDnsClientHostname", input_param); + + /// + /// Set the Dynamic DNS Hostname (Async mode). You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcTest ChangeDDnsClientHostname(VpnRpcTest input_param) => ChangeDDnsClientHostnameAsync(input_param).Result; + + /// + /// Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server (Async mode). You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task RegenerateServerCertAsync(VpnRpcTest input_param) => await CallAsync("RegenerateServerCert", input_param); + + /// + /// Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server (Async mode). You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcTest RegenerateServerCert(VpnRpcTest input_param) => RegenerateServerCertAsync(input_param).Result; + + /// + /// Generate a Sample Setting File for OpenVPN Client (Async mode). Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task MakeOpenVpnConfigFileAsync() => await CallAsync("MakeOpenVpnConfigFile", new VpnRpcReadLogFile()); + + /// + /// Generate a Sample Setting File for OpenVPN Client (Async mode). Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcReadLogFile MakeOpenVpnConfigFile() => MakeOpenVpnConfigFileAsync().Result; + + /// + /// Enable / Disable the VPN over ICMP / VPN over DNS Server Function (Async mode). You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task SetSpecialListenerAsync(VpnRpcSpecialListener input_param) => await CallAsync("SetSpecialListener", input_param); + + /// + /// Enable / Disable the VPN over ICMP / VPN over DNS Server Function (Async mode). You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcSpecialListener SetSpecialListener(VpnRpcSpecialListener input_param) => SetSpecialListenerAsync(input_param).Result; + + /// + /// Get Current Setting of the VPN over ICMP / VPN over DNS Function (Async mode). Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public async Task GetSpecialListenerAsync() => await CallAsync("GetSpecialListener", new VpnRpcSpecialListener()); + + /// + /// Get Current Setting of the VPN over ICMP / VPN over DNS Function (Async mode). Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. + /// + public VpnRpcSpecialListener GetSpecialListener() => GetSpecialListenerAsync().Result; + + /// + /// Show the current status of VPN Azure function (Async mode). Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task GetAzureStatusAsync() => await CallAsync("GetAzureStatus", new VpnRpcAzureStatus()); + + /// + /// Show the current status of VPN Azure function (Async mode). Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAzureStatus GetAzureStatus() => GetAzureStatusAsync().Result; + + /// + /// Enable / Disable VPN Azure Function (Async mode). Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public async Task SetAzureStatusAsync(VpnRpcAzureStatus input_param) => await CallAsync("SetAzureStatus", input_param); + + /// + /// Enable / Disable VPN Azure Function (Async mode). Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster. + /// + public VpnRpcAzureStatus SetAzureStatus(VpnRpcAzureStatus input_param) => SetAzureStatusAsync(input_param).Result; + + /// + /// Get the Proxy Settings for Connecting to the DDNS server (Async mode). + /// + public async Task GetDDnsInternetSettngAsync() => await CallAsync("GetDDnsInternetSettng", new VpnInternetSetting()); + + /// + /// Get the Proxy Settings for Connecting to the DDNS server (Async mode). + /// + public VpnInternetSetting GetDDnsInternetSettng() => GetDDnsInternetSettngAsync().Result; + + /// + /// Set the Proxy Settings for Connecting to the DDNS server (Async mode). + /// + public async Task SetDDnsInternetSettngAsync(VpnInternetSetting input_param) => await CallAsync("SetDDnsInternetSettng", input_param); + + /// + /// Set the Proxy Settings for Connecting to the DDNS server (Sync mode). + /// + public VpnInternetSetting SetDDnsInternetSettng(VpnInternetSetting input_param) => SetDDnsInternetSettngAsync(input_param).Result; + + /// + /// Set the VPN Gate Server Configuration (Async mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public async Task SetVgsConfigAsync(VpnVgsConfig input_param) => await CallAsync("SetVgsConfig", input_param); + + /// + /// Set the VPN Gate Server Configuration (Sync mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public VpnVgsConfig SetVgsConfig(VpnVgsConfig input_param) => SetVgsConfigAsync(input_param).Result; + + /// + /// Get the VPN Gate Server Configuration (Async mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public async Task GetVgsConfigAsync() => await CallAsync("GetVgsConfig", new VpnVgsConfig()); + + /// + /// Get the VPN Gate Server Configuration (Sync mode). This API is valid for Win32 binary distribution of the Stable Edition of SoftEther VPN Server. + /// + public VpnVgsConfig GetVgsConfig() => GetVgsConfigAsync().Result; + + + } +} diff --git a/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/VPNServerRpcTypes.cs b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/VPNServerRpcTypes.cs new file mode 100644 index 00000000..08db87e4 --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpc/VPNServerRpcTypes.cs @@ -0,0 +1,5381 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// VPNServerRpcTypes.cs - Data Type Definition for SoftEther VPN Server JSON-RPC Stubs +// +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + +using System; +using Newtonsoft.Json; + +namespace SoftEther.VPNServerRpc +{ + /// + /// IP Protocol Numbers + /// + public enum VpnIpProtocolNumber + { + /// + /// ICMP for IPv4 + /// + ICMPv4 = 1, + + /// + /// TCP + /// + TCP = 6, + + /// + /// UDP + /// + UDP = 17, + + /// + /// ICMP for IPv6 + /// + ICMPv6 = 58, + } + + /// + /// The body of the Access list + /// + public class VpnAccess + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Specify a description (note) for this rule + /// + public string Note_utf; + + /// + /// Enabled flag (true: enabled, false: disabled) + /// + public bool Active_bool; + + /// + /// Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. + /// + public uint Priority_u32; + + /// + /// The flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded. + /// + public bool Discard_bool; + + /// + /// The flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6. + /// + public bool IsIPv6_bool; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field. + /// + public string SrcIpAddress_ip; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. + /// + public string SrcSubnetMask_ip; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field. + /// + public string DestIpAddress_ip; + + /// + /// Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host. + /// + public string DestSubnetMask_ip; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field. + /// + public byte[] SrcIpAddress6_bin; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. + /// + public byte[] SrcSubnetMask6_bin; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field. + /// + public byte[] DestIpAddress6_bin; + + /// + /// Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form. + /// + public byte[] DestSubnetMask6_bin; + + /// + /// The IP protocol number + /// + public VpnIpProtocolNumber Protocol_u32; + + /// + /// The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint SrcPortStart_u32; + + /// + /// The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint SrcPortEnd_u32; + + /// + /// The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint DestPortStart_u32; + + /// + /// The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. + /// + public uint DestPortEnd_u32; + + /// + /// Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. + /// + public string SrcUsername_str; + + /// + /// Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. + /// + public string DestUsername_str; + + /// + /// Specify true if you want to check the source MAC address. + /// + public bool CheckSrcMac_bool; + + /// + /// Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] SrcMacAddress_bin; + + /// + /// Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] SrcMacMask_bin; + + /// + /// Specify true if you want to check the destination MAC address. + /// + public bool CheckDstMac_bool; + + /// + /// Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] DstMacAddress_bin; + + /// + /// Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true. + /// + public byte[] DstMacMask_bin; + + /// + /// Specify true if you want to check the state of the TCP connection. + /// + public bool CheckTcpState_bool; + + /// + /// Valid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets. + /// + public bool Established_bool; + + /// + /// Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. + /// + public uint Delay_u32; + + /// + /// Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. + /// + public uint Jitter_u32; + + /// + /// Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. + /// + public uint Loss_u32; + + /// + /// The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. + /// + public string RedirectUrl_str; + } + + /// + /// Add an item to Access List + /// + public class VpnRpcAddAccess + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Access list (Must be a single item) + /// + public VpnAccess[] AccessListSingle; + } + + /// + /// Add CA to HUB + /// + public class VpnRpcHubAddCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The body of the X.509 certificate + /// + public byte[] Cert_bin; + } + + /// + /// CRL entry + /// + public class VpnRpcCrl + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// CN, optional + /// + public string CommonName_utf; + + /// + /// O, optional + /// + public string Organization_utf; + + /// + /// OU, optional + /// + public string Unit_utf; + + /// + /// C, optional + /// + public string Country_utf; + + /// + /// ST, optional + /// + public string State_utf; + + /// + /// L, optional + /// + public string Local_utf; + + /// + /// Serial, optional + /// + public byte[] Serial_bin; + + /// + /// MD5 Digest, optional + /// + public byte[] DigestMD5_bin; + + /// + /// SHA1 Digest, optional + /// + public byte[] DigestSHA1_bin; + } + + /// + /// EtherIP key list entry + /// + public class VpnEtherIpId + { + /// + /// Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. + /// + public string Id_str; + + /// + /// Specify the name of the Virtual Hub to connect. + /// + public string HubName_str; + + /// + /// Specify the username to login to the destination Virtual Hub. + /// + public string UserName_str; + + /// + /// Specify the password to login to the destination Virtual Hub. + /// + public string Password_str; + } + + /// + /// Layer-3 virtual interface + /// + public class VpnRpcL3If + { + /// + /// L3 switch name + /// + public string Name_str; + + /// + /// Virtual HUB name + /// + public string HubName_str; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Subnet mask + /// + public string SubnetMask_ip; + } + + /// + /// Layer-3 switch + /// + public class VpnRpcL3Sw + { + /// + /// Layer-3 Switch name + /// + public string Name_str; + } + + /// + /// Routing table + /// + public class VpnRpcL3Table + { + /// + /// L3 switch name + /// + public string Name_str; + + /// + /// Network address + /// + public string NetworkAddress_ip; + + /// + /// Subnet mask + /// + public string SubnetMask_ip; + + /// + /// Gateway address + /// + public string GatewayAddress_ip; + + /// + /// Metric + /// + public uint Metric_u32; + } + + /// + /// Generic parameter to contain u32, u64, ascii_string and unicode string + /// + public class VpnRpcTest + { + /// + /// A 32-bit integer field + /// + public uint IntValue_u32; + + /// + /// A 64-bit integer field + /// + public ulong Int64Value_u64; + + /// + /// An Ascii string field + /// + public string StrValue_str; + + /// + /// An UTF-8 string field + /// + public string UniStrValue_utf; + } + + /// + /// Local Bridge list item + /// + public class VpnRpcLocalBridge + { + /// + /// Physical Ethernet device name + /// + public string DeviceName_str; + + /// + /// The Virtual Hub name + /// + public string HubNameLB_str; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// Running flag + /// + public bool Active_bool; + + /// + /// Specify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). + /// + public bool TapMode_bool; + } + + /// + /// Create, configure, and get the group + /// + public class VpnRpcSetGroup + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The group name + /// + public string Name_str; + + /// + /// Optional real name (full name) of the group, allow using any Unicode characters + /// + public string Realname_utf; + + /// + /// Optional, specify a description of the group + /// + public string Note_utf; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// The flag whether to use security policy + /// + public bool UsePolicy_bool; + + // ---- Start of Security policy --- + /// + /// Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. + /// + [JsonProperty("policy:Access_bool")] + public bool SecPol_Access_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPFilter_bool")] + public bool SecPol_DHCPFilter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPNoServer_bool")] + public bool SecPol_DHCPNoServer_bool; + + /// + /// Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. + /// + [JsonProperty("policy:DHCPForce_bool")] + public bool SecPol_DHCPForce_bool; + + /// + /// Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. + /// + [JsonProperty("policy:NoBridge_bool")] + public bool SecPol_NoBridge_bool; + + /// + /// Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRouting_bool")] + public bool SecPol_NoRouting_bool; + + /// + /// Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckMac_bool")] + public bool SecPol_CheckMac_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIP_bool")] + public bool SecPol_CheckIP_bool; + + /// + /// Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. + /// + [JsonProperty("policy:ArpDhcpOnly_bool")] + public bool SecPol_ArpDhcpOnly_bool; + + /// + /// Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. + /// + [JsonProperty("policy:PrivacyFilter_bool")] + public bool SecPol_PrivacyFilter_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. + /// + [JsonProperty("policy:NoServer_bool")] + public bool SecPol_NoServer_bool; + + /// + /// Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. + /// + [JsonProperty("policy:NoBroadcastLimiter_bool")] + public bool SecPol_NoBroadcastLimiter_bool; + + /// + /// Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. + /// + [JsonProperty("policy:MonitorPort_bool")] + public bool SecPol_MonitorPort_bool; + + /// + /// Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. + /// + [JsonProperty("policy:MaxConnection_u32")] + public uint SecPol_MaxConnection_u32; + + /// + /// Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. + /// + [JsonProperty("policy:TimeOut_u32")] + public uint SecPol_TimeOut_u32; + + /// + /// Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. + /// + [JsonProperty("policy:MaxMac_u32")] + public uint SecPol_MaxMac_u32; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIP_u32")] + public uint SecPol_MaxIP_u32; + + /// + /// Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. + /// + [JsonProperty("policy:MaxUpload_u32")] + public uint SecPol_MaxUpload_u32; + + /// + /// Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. + /// + [JsonProperty("policy:MaxDownload_u32")] + public uint SecPol_MaxDownload_u32; + + /// + /// Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. + /// + [JsonProperty("policy:FixPassword_bool")] + public bool SecPol_FixPassword_bool; + + /// + /// Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. + /// + [JsonProperty("policy:MultiLogins_u32")] + public uint SecPol_MultiLogins_u32; + + /// + /// Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. + /// + [JsonProperty("policy:NoQoS_bool")] + public bool SecPol_NoQoS_bool; + + /// + /// Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. + /// + [JsonProperty("policy:RSandRAFilter_bool")] + public bool SecPol_RSandRAFilter_bool; + + /// + /// Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. + /// + [JsonProperty("policy:RAFilter_bool")] + public bool SecPol_RAFilter_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPv6Filter_bool")] + public bool SecPol_DHCPv6Filter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPv6NoServer_bool")] + public bool SecPol_DHCPv6NoServer_bool; + + /// + /// Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRoutingV6_bool")] + public bool SecPol_NoRoutingV6_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIPv6_bool")] + public bool SecPol_CheckIPv6_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. + /// + [JsonProperty("policy:NoServerV6_bool")] + public bool SecPol_NoServerV6_bool; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIPv6_u32")] + public uint SecPol_MaxIPv6_u32; + + /// + /// Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:NoSavePassword_bool")] + public bool SecPol_NoSavePassword_bool; + + /// + /// Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:AutoDisconnect_u32")] + public uint SecPol_AutoDisconnect_u32; + + /// + /// Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv4_bool")] + public bool SecPol_FilterIPv4_bool; + + /// + /// Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv6_bool")] + public bool SecPol_FilterIPv6_bool; + + /// + /// Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. + /// + [JsonProperty("policy:FilterNonIP_bool")] + public bool SecPol_FilterNonIP_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRA_bool")] + public bool SecPol_NoIPv6DefaultRouterInRA_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRAWhenIPv6_bool")] + public bool SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool; + + /// + /// Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + /// + [JsonProperty("policy:VLanId_u32")] + public uint SecPol_VLanId_u32; + + /// + /// Security policy: Whether version 3.0 (must be true) + /// + [JsonProperty("policy:Ver3_bool")] + public bool SecPol_Ver3_bool = true; + // ---- End of Security policy --- + } + + /// + /// Hub types + /// + public enum VpnRpcHubType + { + /// + /// Stand-alone HUB + /// + Standalone = 0, + + /// + /// Static HUB + /// + FarmStatic = 1, + + /// + /// Dynamic HUB + /// + FarmDynamic = 2, + } + + /// + /// Create a HUB + /// + public class VpnRpcCreateHub + { + /// + /// Specify the name of the Virtual Hub to create / update. + /// + public string HubName_str; + + /// + /// Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password. + /// + public string AdminPasswordPlainText_str; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// Maximum number of VPN sessions + /// + public uint MaxSession_u32; + + /// + /// No Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. + /// + public bool NoEnum_bool; + + /// + /// Type of the Virtual Hub (Valid only for Clustered VPN Servers) + /// + public VpnRpcHubType HubType_u32; + } + + public enum VpnRpcClientAuthType + { + /// + /// Anonymous authentication + /// + Anonymous = 0, + + /// + /// SHA-0 hashed password authentication + /// + SHA0_Hashed_Password = 1, + + /// + /// Plain password authentication + /// + PlainPassword = 2, + + /// + /// Certificate authentication + /// + Cert = 3, + } + + /// + /// Create and set of link + /// + public class VpnRpcCreateLink + { + /// + /// The Virtual Hub name + /// + public string HubName_Ex_str; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// The flag to enable validation for the server certificate + /// + public bool CheckServerCert_bool; + + /// + /// The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true. + /// + public byte[] ServerCert_bin; + + // ---- Start of Client Option Parameters --- + /// + /// Client Option Parameters: Specify the name of the Cascade Connection + /// + [JsonProperty("AccountName_utf")] + public string ClientOption_AccountName_utf; + + /// + /// Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address. + /// + [JsonProperty("Hostname_str")] + public string ClientOption_Hostname_str; + + /// + /// Client Option Parameters: Specify the port number of the destination VPN Server. + /// + [JsonProperty("Port_u32")] + public uint ClientOption_Port_u32; + + /// + /// Client Option Parameters: The type of the proxy server + /// + [JsonProperty("ProxyType_u32")] + public VpnRpcProxyType ClientOption_ProxyType_u32; + + /// + /// Client Option Parameters: The hostname or IP address of the proxy server name + /// + [JsonProperty("ProxyName_str")] + public string ClientOption_ProxyName_str; + + /// + /// Client Option Parameters: The port number of the proxy server + /// + [JsonProperty("ProxyPort_u32")] + public uint ClientOption_ProxyPort_u32; + + /// + /// Client Option Parameters: The username to connect to the proxy server + /// + [JsonProperty("ProxyUsername_str")] + public string ClientOption_ProxyUsername_str; + + /// + /// Client Option Parameters: The password to connect to the proxy server + /// + [JsonProperty("ProxyPassword_str")] + public string ClientOption_ProxyPassword_str; + + /// + /// Client Option Parameters: The Virtual Hub on the destination VPN Server + /// + [JsonProperty("HubName_str")] + public string ClientOption_HubName_str; + + /// + /// Client Option Parameters: Number of TCP Connections to Use in VPN Communication + /// + [JsonProperty("MaxConnection_u32")] + public uint ClientOption_MaxConnection_u32; + + /// + /// Client Option Parameters: The flag to enable the encryption on the communication + /// + [JsonProperty("UseEncrypt_bool")] + public bool ClientOption_UseEncrypt_bool; + + /// + /// Client Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection + /// + [JsonProperty("UseCompress_bool")] + public bool ClientOption_UseCompress_bool; + + /// + /// Client Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. + /// + [JsonProperty("HalfConnection_bool")] + public bool ClientOption_HalfConnection_bool; + + /// + /// Client Option Parameters: Connection attempt interval when additional connection will be established + /// + [JsonProperty("AdditionalConnectionInterval_u32")] + public uint ClientOption_AdditionalConnectionInterval_u32; + + /// + /// Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive) + /// + [JsonProperty("ConnectionDisconnectSpan_u32")] + public uint ClientOption_ConnectionDisconnectSpan_u32; + + /// + /// Client Option Parameters: Disable QoS Control Function if the value is true + /// + [JsonProperty("DisableQoS_bool")] + public bool ClientOption_DisableQoS_bool; + + /// + /// Client Option Parameters: Do not use TLS 1.x of the value is true + /// + [JsonProperty("NoTls1_bool")] + public bool ClientOption_NoTls1_bool; + + /// + /// Client Option Parameters: Do not use UDP acceleration mode if the value is true + /// + [JsonProperty("NoUdpAcceleration_bool")] + public bool ClientOption_NoUdpAcceleration_bool; + // ---- End of Client Option --- + + // ---- Start of Client Auth Parameters --- + /// + /// Authentication type + /// + [JsonProperty("AuthType_u32")] + public VpnRpcClientAuthType ClientAuth_AuthType_u32; + + /// + /// User name + /// + [JsonProperty("Username_str")] + public string ClientAuth_Username_str; + + /// + /// SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string). + /// + [JsonProperty("HashedPassword_bin")] + public byte[] ClientAuth_HashedPassword_bin; + + /// + /// Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2). + /// + [JsonProperty("PlainPassword_str")] + public string ClientAuth_PlainPassword_str; + + /// + /// Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). + /// + [JsonProperty("ClientX_bin")] + public byte[] ClientAuth_ClientX_bin; + + /// + /// Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3). + /// + [JsonProperty("ClientK_bin")] + public byte[] ClientAuth_ClientK_bin; + + /// + /// Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPFilter_bool")] + public bool SecPol_DHCPFilter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPNoServer_bool")] + public bool SecPol_DHCPNoServer_bool; + + /// + /// Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. + /// + [JsonProperty("policy:DHCPForce_bool")] + public bool SecPol_DHCPForce_bool; + + /// + /// Security policy: Prohibit the duplicate MAC address + /// + /// Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + public bool SecPol_CheckMac_bool; + + /// + /// Security policy: Prohibit a duplicate IP address (IPv4) + /// + /// Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + public bool SecPol_CheckIP_bool; + + /// + /// Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. + /// + [JsonProperty("policy:ArpDhcpOnly_bool")] + public bool SecPol_ArpDhcpOnly_bool; + + /// + /// Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. + /// + [JsonProperty("policy:PrivacyFilter_bool")] + public bool SecPol_PrivacyFilter_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. + /// + [JsonProperty("policy:NoServer_bool")] + public bool SecPol_NoServer_bool; + + /// + /// Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. + /// + [JsonProperty("policy:NoBroadcastLimiter_bool")] + public bool SecPol_NoBroadcastLimiter_bool; + + /// + /// Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. + /// + [JsonProperty("policy:MaxMac_u32")] + public uint SecPol_MaxMac_u32; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIP_u32")] + public uint SecPol_MaxIP_u32; + + /// + /// Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. + /// + [JsonProperty("policy:MaxUpload_u32")] + public uint SecPol_MaxUpload_u32; + + /// + /// Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. + /// + [JsonProperty("policy:MaxDownload_u32")] + public uint SecPol_MaxDownload_u32; + + /// + /// Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. + /// + [JsonProperty("policy:RSandRAFilter_bool")] + public bool SecPol_RSandRAFilter_bool; + + /// + /// Security policy: Filter the router advertisement packet (IPv6) + /// + /// Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. + public bool SecPol_RAFilter_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPv6Filter_bool")] + public bool SecPol_DHCPv6Filter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPv6NoServer_bool")] + public bool SecPol_DHCPv6NoServer_bool; + + /// + /// Security policy: Prohibit the duplicate IP address (IPv6) + /// + /// Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + public bool SecPol_CheckIPv6_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. + /// + [JsonProperty("policy:NoServerV6_bool")] + public bool SecPol_NoServerV6_bool; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIPv6_u32")] + public uint SecPol_MaxIPv6_u32; + + /// + /// Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv4_bool")] + public bool SecPol_FilterIPv4_bool; + + /// + /// Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv6_bool")] + public bool SecPol_FilterIPv6_bool; + + /// + /// Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. + /// + [JsonProperty("policy:FilterNonIP_bool")] + public bool SecPol_FilterNonIP_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRA_bool")] + public bool SecPol_NoIPv6DefaultRouterInRA_bool; + + /// + /// Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + /// + [JsonProperty("policy:VLanId_u32")] + public uint SecPol_VLanId_u32; + + /// + /// Security policy: Whether version 3.0 (must be true) + /// + [JsonProperty("policy:Ver3_bool")] + public bool SecPol_Ver3_bool = true; + // ---- End of Security policy --- + } + + /// + /// Listener + /// + public class VpnRpcListener + { + /// + /// Port number (Range: 1 - 65535) + /// + public uint Port_u32; + + /// + /// Active state + /// + public bool Enable_bool; + } + + /// + /// User authentication type (server side) + /// + public enum VpnRpcUserAuthType + { + /// + /// Anonymous authentication + /// + Anonymous = 0, + + /// + /// Password authentication + /// + Password = 1, + + /// + /// User certificate authentication + /// + UserCert = 2, + + /// + /// Root certificate which is issued by trusted Certificate Authority + /// + RootCert = 3, + + /// + /// Radius authentication + /// + Radius = 4, + + /// + /// Windows NT authentication + /// + NTDomain = 5, + } + + /// + /// Create, configure, and get the user + /// + public class VpnRpcSetUser + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Specify the user name of the user + /// + public string Name_str; + + /// + /// Assigned group name for the user + /// + public string GroupName_str; + + /// + /// Optional real name (full name) of the user, allow using any Unicode characters + /// + public string Realname_utf; + + /// + /// Optional User Description + /// + public string Note_utf; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Last modified date and time + /// + public DateTime UpdatedTime_dt; + + /// + /// Expiration date and time + /// + public DateTime ExpireTime_dt; + + /// + /// Authentication method of the user + /// + public VpnRpcUserAuthType AuthType_u32; + + /// + /// User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations. + /// + public string Auth_Password_str; + + /// + /// User certificate, valid only if AuthType_u32 == UserCert(2). + /// + [JsonProperty("UserX_bin")] + public byte[] Auth_UserCert_CertData; + + /// + /// Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3). + /// + [JsonProperty("Serial_bin")] + public byte[] Auth_RootCert_Serial; + + /// + /// Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3). + /// + [JsonProperty("CommonName_utf")] + public string Auth_RootCert_CommonName; + + /// + /// Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4). + /// + [JsonProperty("RadiusUsername_utf")] + public string Auth_Radius_RadiusUsername; + + /// + /// Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5). + /// + [JsonProperty("NtUsername_utf")] + public string Auth_NT_NTUsername; + + /// + /// Number of total logins of the user + /// + public uint NumLogin_u32; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// The flag whether to use security policy + /// + public bool UsePolicy_bool; + + // ---- Start of Security policy --- + /// + /// Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server. + /// + [JsonProperty("policy:Access_bool")] + public bool SecPol_Access_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPFilter_bool")] + public bool SecPol_DHCPFilter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPNoServer_bool")] + public bool SecPol_DHCPNoServer_bool; + + /// + /// Security policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. + /// + [JsonProperty("policy:DHCPForce_bool")] + public bool SecPol_DHCPForce_bool; + + /// + /// Security policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. + /// + [JsonProperty("policy:NoBridge_bool")] + public bool SecPol_NoBridge_bool; + + /// + /// Security policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRouting_bool")] + public bool SecPol_NoRouting_bool; + + /// + /// Security policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckMac_bool")] + public bool SecPol_CheckMac_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIP_bool")] + public bool SecPol_CheckIP_bool; + + /// + /// Security policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. + /// + [JsonProperty("policy:ArpDhcpOnly_bool")] + public bool SecPol_ArpDhcpOnly_bool; + + /// + /// Security policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered. + /// + [JsonProperty("policy:PrivacyFilter_bool")] + public bool SecPol_PrivacyFilter_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. + /// + [JsonProperty("policy:NoServer_bool")] + public bool SecPol_NoServer_bool; + + /// + /// Security policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. + /// + [JsonProperty("policy:NoBroadcastLimiter_bool")] + public bool SecPol_NoBroadcastLimiter_bool; + + /// + /// Security policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. + /// + [JsonProperty("policy:MonitorPort_bool")] + public bool SecPol_MonitorPort_bool; + + /// + /// Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. + /// + [JsonProperty("policy:MaxConnection_u32")] + public uint SecPol_MaxConnection_u32; + + /// + /// Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. + /// + [JsonProperty("policy:TimeOut_u32")] + public uint SecPol_TimeOut_u32; + + /// + /// Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session. + /// + [JsonProperty("policy:MaxMac_u32")] + public uint SecPol_MaxMac_u32; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIP_u32")] + public uint SecPol_MaxIP_u32; + + /// + /// Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. + /// + [JsonProperty("policy:MaxUpload_u32")] + public uint SecPol_MaxUpload_u32; + + /// + /// Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. + /// + [JsonProperty("policy:MaxDownload_u32")] + public uint SecPol_MaxDownload_u32; + + /// + /// Security policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. + /// + [JsonProperty("policy:FixPassword_bool")] + public bool SecPol_FixPassword_bool; + + /// + /// Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. + /// + [JsonProperty("policy:MultiLogins_u32")] + public uint SecPol_MultiLogins_u32; + + /// + /// Security policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. + /// + [JsonProperty("policy:NoQoS_bool")] + public bool SecPol_NoQoS_bool; + + /// + /// Security policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. + /// + [JsonProperty("policy:RSandRAFilter_bool")] + public bool SecPol_RSandRAFilter_bool; + + /// + /// Security policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. + /// + [JsonProperty("policy:RAFilter_bool")] + public bool SecPol_RAFilter_bool; + + /// + /// Security policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:DHCPv6Filter_bool")] + public bool SecPol_DHCPv6Filter_bool; + + /// + /// Security policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. + /// + [JsonProperty("policy:DHCPv6NoServer_bool")] + public bool SecPol_DHCPv6NoServer_bool; + + /// + /// Security policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. + /// + [JsonProperty("policy:NoRoutingV6_bool")] + public bool SecPol_NoRoutingV6_bool; + + /// + /// Security policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. + /// + [JsonProperty("policy:CheckIPv6_bool")] + public bool SecPol_CheckIPv6_bool; + + /// + /// Security policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. + /// + [JsonProperty("policy:NoServerV6_bool")] + public bool SecPol_NoServerV6_bool; + + /// + /// Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. + /// + [JsonProperty("policy:MaxIPv6_u32")] + public uint SecPol_MaxIPv6_u32; + + /// + /// Security policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:NoSavePassword_bool")] + public bool SecPol_NoSavePassword_bool; + + /// + /// Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. + /// + [JsonProperty("policy:AutoDisconnect_u32")] + public uint SecPol_AutoDisconnect_u32; + + /// + /// Security policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv4_bool")] + public bool SecPol_FilterIPv4_bool; + + /// + /// Security policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered. + /// + [JsonProperty("policy:FilterIPv6_bool")] + public bool SecPol_FilterIPv6_bool; + + /// + /// Security policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. + /// + [JsonProperty("policy:FilterNonIP_bool")] + public bool SecPol_FilterNonIP_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRA_bool")] + public bool SecPol_NoIPv6DefaultRouterInRA_bool; + + /// + /// Security policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. + /// + [JsonProperty("policy:NoIPv6DefaultRouterInRAWhenIPv6_bool")] + public bool SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool; + + /// + /// Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + /// + [JsonProperty("policy:VLanId_u32")] + public uint SecPol_VLanId_u32; + + /// + /// Security policy: Whether version 3.0 (must be true) + /// + [JsonProperty("policy:Ver3_bool")] + public bool SecPol_Ver3_bool = true; + // ---- End of Security policy --- + } + + /// + /// Delete the access list + /// + public class VpnRpcDeleteAccess + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// ID + /// + public uint Id_u32; + } + + /// + /// Delete the CA of HUB + /// + public class VpnRpcHubDeleteCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Certificate key id to be deleted + /// + public uint Key_u32; + } + + /// + /// Deleting a user or group + /// + public class VpnRpcDeleteUser + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// User or group name + /// + public string Name_str; + } + + /// + /// Delete the HUB + /// + public class VpnRpcDeleteHub + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + } + + /// + /// Delete the table + /// + public class VpnRpcDeleteTable + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Key ID + /// + public uint Key_u32; + } + + /// + /// Specify the Link + /// + public class VpnRpcLink + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The name of the cascade connection + /// + public string AccountName_utf; + } + + /// + /// Disconnect the session + /// + public class VpnRpcDeleteSession + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Session name + /// + public string Name_str; + } + + /// + /// Specify the HUB + /// + public class VpnRpcHub + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + } + + /// + /// Disconnect a connection + /// + public class VpnRpcDisconnectConnection + { + /// + /// Connection name + /// + public string Name_str; + } + + /// + /// Enumeration of the access list + /// + public class VpnRpcEnumAccessList + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Access list + /// + public VpnAccess[] AccessList; + } + + /// + /// CA enumeration items of HUB + /// + public class VpnRpcHubEnumCAItem + { + /// + /// The key id of the item + /// + public uint Key_u32; + + /// + /// Subject + /// + public string SubjectName_utf; + + /// + /// Issuer + /// + public string IssuerName_utf; + + /// + /// Expiration date + /// + public DateTime Expires_dt; + } + + /// + /// CA enumeration of HUB + /// + public class VpnRpcHubEnumCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The list of CA + /// + public VpnRpcHubEnumCAItem[] CAList; + } + + /// + /// Type of connection + /// + public enum VpnRpcConnectionType + { + /// + /// VPN Client + /// + Client = 0, + + /// + /// During initialization + /// + Init = 1, + + /// + /// Login connection + /// + Login = 2, + + /// + /// Additional connection + /// + Additional = 3, + + /// + /// RPC for server farm + /// + FarmRpc = 4, + + /// + /// RPC for Management + /// + AdminRpc = 5, + + /// + /// HUB enumeration + /// + EnumHub = 6, + + /// + /// Password change + /// + Password = 7, + + /// + /// SSTP + /// + SSTP = 8, + + /// + /// OpenVPN + /// + OpenVPN = 9, + } + + /// + /// Connection enumeration items + /// + public class VpnRpcEnumConnectionItem + { + /// + /// Connection name + /// + public string Name_str; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Port number + /// + public uint Port_u32; + + /// + /// Connected time + /// + public DateTime ConnectedTime_dt; + + /// + /// Connection type + /// + public VpnRpcConnectionType Type_u32; + } + + /// + /// Connection enumeration + /// + public class VpnRpcEnumConnection + { + /// + /// Number of connections + /// + public uint NumConnection_u32; + + /// + /// Connection list + /// + public VpnRpcEnumConnectionItem[] ConnectionList; + } + + /// + /// Enum CRL Item + /// + public class VpnRpcEnumCrlItem + { + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// The contents of the CRL item + /// + public string CrlInfo_utf; + } + + /// + /// Enum CRL + /// + public class VpnRpcEnumCrl + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// CRL list + /// + public VpnRpcEnumCrlItem[] CRLList; + } + + /// + /// RPC_ENUM_DHCP_ITEM + /// + public class VpnRpcEnumDhcpItem + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Lease time + /// + public DateTime LeasedTime_dt; + + /// + /// Expiration date + /// + public DateTime ExpireTime_dt; + + /// + /// MAC address + /// + public byte[] MacAddress_bin; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Subnet mask + /// + public uint Mask_u32; + + /// + /// Host name + /// + public string Hostname_str; + } + + /// + /// RPC_ENUM_DHCP + /// + public class VpnRpcEnumDhcp + { + /// + /// Virtual Hub Name + /// + public string HubName_str; + + /// + /// DHCP Item + /// + public VpnRpcEnumDhcpItem[] DhcpTable; + } + + /// + /// EtherIP setting list + /// + public class VpnRpcEnumEtherIpId + { + /// + /// Setting list + /// + public VpnEtherIpId[] Settings; + } + + /// + /// Ethernet Network Adapters list item + /// + public class VpnRpcEnumEthItem + { + /// + /// Device name + /// + public string DeviceName_str; + + /// + /// Network connection name (description) + /// + public string NetworkConnectionName_utf; + } + + /// + /// Ethernet Network Adapters list + /// + public class VpnRpcEnumEth + { + /// + /// Ethernet Network Adapters list + /// + public VpnRpcEnumEthItem[] EthList; + } + + /// + /// Server farm members enumeration items + /// + public class VpnRpcEnumFarmItem + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Controller + /// + public bool Controller_bool; + + /// + /// Connection time + /// + public DateTime ConnectedTime_dt; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// Point + /// + public uint Point_u32; + + /// + /// Number of sessions + /// + public uint NumSessions_u32; + + /// + /// Number of TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of HUBs + /// + public uint NumHubs_u32; + + /// + /// Number of assigned client licenses + /// + public uint AssignedClientLicense_u32; + + /// + /// Number of assigned bridge licenses + /// + public uint AssignedBridgeLicense_u32; + } + + /// + /// Server farm member enumeration + /// + public class VpnRpcEnumFarm + { + /// + /// Number of Cluster Members + /// + public uint NumFarm_u32; + + /// + /// Cluster Members list + /// + public VpnRpcEnumFarmItem[] FarmMemberList; + } + + /// + /// Enumeration items in the group + /// + public class VpnRpcEnumGroupItem + { + /// + /// User name + /// + public string Name_str; + + /// + /// Real name + /// + public string Realname_utf; + + /// + /// Note + /// + public string Note_utf; + + /// + /// Number of users + /// + public uint NumUsers_u32; + + /// + /// Access denied + /// + public bool DenyAccess_bool; + } + + /// + /// Group enumeration + /// + public class VpnRpcEnumGroup + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Group list + /// + public VpnRpcEnumGroupItem[] GroupList; + } + + /// + /// Enumeration items of HUB + /// + public class VpnRpcEnumHubItem + { + /// + /// The name of the Virtual Hub + /// + public string HubName_str; + + /// + /// Online state + /// + public bool Online_bool; + + /// + /// Type of HUB (Valid only for Clustered VPN Servers) + /// + public VpnRpcHubType HubType_u32; + + /// + /// Number of users + /// + public uint NumUsers_u32; + + /// + /// Number of registered groups + /// + public uint NumGroups_u32; + + /// + /// Number of registered sessions + /// + public uint NumSessions_u32; + + /// + /// Number of current MAC table entries + /// + public uint NumMacTables_u32; + + /// + /// Number of current IP table entries + /// + public uint NumIpTables_u32; + + /// + /// Last communication date and time + /// + public DateTime LastCommTime_dt; + + /// + /// Last login date and time + /// + public DateTime LastLoginTime_dt; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Number of accumulated logins + /// + public uint NumLogin_u32; + + /// + /// Whether the traffic information is provided + /// + public bool IsTrafficFilled_bool; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Ex.Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Ex.Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Ex.Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Ex.Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + } + + /// + /// Enumeration of HUB + /// + public class VpnRpcEnumHub + { + /// + /// Number of Virtual Hubs + /// + public uint NumHub_u32; + + /// + /// Virtual Hubs + /// + public VpnRpcEnumHubItem[] HubList; + } + + /// + /// Enumeration items of IP table + /// + public class VpnRpcEnumIpTableItem + { + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// Session name + /// + public string SessionName_str; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Assigned by the DHCP + /// + public bool DhcpAllocated_bool; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Updating date + /// + public DateTime UpdatedTime_dt; + + /// + /// Remote items + /// + public bool RemoteItem_bool; + + /// + /// Remote host name + /// + public string RemoteHostname_str; + } + + /// + /// Enumeration of IP table + /// + public class VpnRpcEnumIpTable + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// MAC table + /// + public VpnRpcEnumIpTableItem[] IpTable; + } + + /// + /// Layer-3 interface enumeration + /// + public class VpnRpcEnumL3If + { + /// + /// Layer-3 switch name + /// + public string Name_str; + + /// + /// Layer-3 interface list + /// + public VpnRpcL3If[] L3IFList; + } + + /// + /// Layer-3 switch enumeration item + /// + public class VpnRpcEnumL3SwItem + { + /// + /// Name of the layer-3 switch + /// + public string Name_str; + + /// + /// Number of layer-3 switch virtual interfaces + /// + public uint NumInterfaces_u32; + + /// + /// Number of routing tables + /// + public uint NumTables_u32; + + /// + /// Activated flag + /// + public bool Active_bool; + + /// + /// Online flag + /// + public bool Online_bool; + } + + /// + /// Layer-3 switch enumeration + /// + public class VpnRpcEnumL3Sw + { + /// + /// Layer-3 switch list + /// + public VpnRpcEnumL3SwItem[] L3SWList; + } + + /// + /// Routing table enumeration + /// + public class VpnRpcEnumL3Table + { + /// + /// L3 switch name + /// + public string Name_str; + + /// + /// Routing table item list + /// + public VpnRpcL3Table[] L3Table; + } + + /// + /// Cascade Connection Enumeration + /// + public class VpnRpcEnumLinkItem + { + /// + /// The name of cascade connection + /// + public string AccountName_utf; + + /// + /// Online flag + /// + public bool Online_bool; + + /// + /// The flag indicates whether the cascade connection is established + /// + public bool Connected_bool; + + /// + /// The error last occurred if the cascade connection is in the fail state + /// + public uint LastError_u32; + + /// + /// Connection completion time + /// + public DateTime ConnectedTime_dt; + + /// + /// Host name of the destination VPN server + /// + public string Hostname_str; + + /// + /// The Virtual Hub name + /// + public string TargetHubName_str; + } + + /// + /// Enumeration of the link + /// + public class VpnRpcEnumLink + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Number of cascade connections + /// + public uint NumLink_u32; + + /// + /// The list of cascade connections + /// + public VpnRpcEnumLinkItem[] LinkList; + } + + /// + /// List of listeners item + /// + public class VpnRpcListenerListItem + { + /// + /// TCP port number (range: 1 - 65535) + /// + public uint Ports_u32; + + /// + /// Active state + /// + public bool Enables_bool; + + /// + /// The flag to indicate if the error occurred on the listener port + /// + public bool Errors_bool; + } + + /// + /// List of listeners + /// + public class VpnRpcListenerList + { + /// + /// List of listener items + /// + public VpnRpcListenerListItem[] ListenerList; + } + + /// + /// Local Bridge enumeration + /// + public class VpnRpcEnumLocalBridge + { + /// + /// Local Bridge list + /// + public VpnRpcLocalBridge[] LocalBridgeList; + } + + /// + /// Log file enumeration + /// + public class VpnRpcEnumLogFileItem + { + /// + /// Server name + /// + public string ServerName_str; + + /// + /// File path + /// + public string FilePath_str; + + /// + /// File size + /// + public uint FileSize_u32; + + /// + /// Last write date + /// + public DateTime UpdatedTime_dt; + } + + /// + /// Log file enumeration + /// + public class VpnRpcEnumLogFile + { + /// + /// Log file list + /// + public VpnRpcEnumLogFileItem[] LogFiles; + } + + /// + /// Enumeration items of the MAC table + /// + public class VpnRpcEnumMacTableItem + { + /// + /// Key ID + /// + public uint Key_u32; + + /// + /// Session name + /// + public string SessionName_str; + + /// + /// MAC address + /// + public byte[] MacAddress_bin; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Updating date + /// + public DateTime UpdatedTime_dt; + + /// + /// Remote items + /// + public bool RemoteItem_bool; + + /// + /// Remote host name + /// + public string RemoteHostname_str; + + /// + /// VLAN ID + /// + public uint VlanId_u32; + } + + /// + /// Enumeration of the MAC table + /// + public class VpnRpcEnumMacTable + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// MAC table + /// + public VpnRpcEnumMacTableItem[] MacTable; + } + + /// + /// NAT Entry Protocol Number + /// + public enum VpnRpcNatProtocol + { + /// + /// TCP + /// + TCP = 0, + + /// + /// UDP + /// + UDP = 1, + + /// + /// DNS + /// + DNS = 2, + + /// + /// ICMP + /// + ICMP = 3, + } + + /// + /// State of NAT session (TCP) + /// + public enum VpnRpcNatTcpState + { + /// + /// Connecting + /// + Connecting = 0, + + /// + /// Send the RST (Connection failure or disconnected) + /// + SendReset = 1, + + /// + /// Connection complete + /// + Connected = 2, + + /// + /// Connection established + /// + Established = 3, + + /// + /// Wait for socket disconnection + /// + WaitDisconnect = 4, + } + + /// + /// VpnRpcEnumNat List Item + /// + public class VpnRpcEnumNatItem + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Protocol + /// + public VpnRpcNatProtocol Protocol_u32; + + /// + /// Source IP address + /// + public string SrcIp_ip; + + /// + /// Source host name + /// + public string SrcHost_str; + + /// + /// Source port number + /// + public uint SrcPort_u32; + + /// + /// Destination IP address + /// + public string DestIp_ip; + + /// + /// Destination host name + /// + public string DestHost_str; + + /// + /// Destination port number + /// + public uint DestPort_u32; + + /// + /// Connection time + /// + public DateTime CreatedTime_dt; + + /// + /// Last communication time + /// + public DateTime LastCommTime_dt; + + /// + /// Transmission size + /// + public ulong SendSize_u64; + + /// + /// Receive size + /// + public ulong RecvSize_u64; + + /// + /// TCP state + /// + public VpnRpcNatTcpState TcpStatus_u32; + } + + /// + /// RPC_ENUM_NAT + /// + public class VpnRpcEnumNat + { + /// + /// Virtual Hub Name + /// + public string HubName_str; + + /// + /// NAT item + /// + public VpnRpcEnumNatItem[] NatTable; + } + + /// + /// Enumeration item of VPN session + /// + public class VpnRpcEnumSessionItem + { + /// + /// Session name + /// + public string Name_str; + + /// + /// Remote session + /// + public bool RemoteSession_bool; + + /// + /// Remote server name + /// + public string RemoteHostname_str; + + /// + /// User name + /// + public string Username_str; + + /// + /// IP address + /// + public string ClientIP_ip; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// Maximum number of underlying TCP connections + /// + public uint MaxNumTcp_u32; + + /// + /// Number of current underlying TCP connections + /// + public uint CurrentNumTcp_u32; + + /// + /// Packet size transmitted + /// + public ulong PacketSize_u64; + + /// + /// Number of packets transmitted + /// + public ulong PacketNum_u64; + + /// + /// Is a Cascade VPN session + /// + public bool LinkMode_bool; + + /// + /// Is a SecureNAT VPN session + /// + public bool SecureNATMode_bool; + + /// + /// Is the VPN session for Local Bridge + /// + public bool BridgeMode_bool; + + /// + /// Is a Layer-3 Switch VPN session + /// + public bool Layer3Mode_bool; + + /// + /// Is in Bridge Mode + /// + public bool Client_BridgeMode_bool; + + /// + /// Is in Monitor Mode + /// + public bool Client_MonitorMode_bool; + + /// + /// VLAN ID + /// + public uint VLanId_u32; + + /// + /// Unique ID of the VPN Session + /// + public byte[] UniqueId_bin; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Last communication date and time + /// + public DateTime LastCommTime_dt; + } + + /// + /// Enumerate VPN sessions + /// + public class VpnRpcEnumSession + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// VPN sessions list + /// + public VpnRpcEnumSessionItem[] SessionList; + } + + /// + /// Enumeration item of user + /// + public class VpnRpcEnumUserItem + { + /// + /// User name + /// + public string Name_str; + + /// + /// Group name + /// + public string GroupName_str; + + /// + /// Real name + /// + public string Realname_utf; + + /// + /// Note + /// + public string Note_utf; + + /// + /// Authentication method + /// + public VpnRpcUserAuthType AuthType_u32; + + /// + /// Number of logins + /// + public uint NumLogin_u32; + + /// + /// Last login date and time + /// + public DateTime LastLoginTime_dt; + + /// + /// Access denied + /// + public bool DenyAccess_bool; + + /// + /// Flag of whether the traffic variable is set + /// + public bool IsTrafficFilled_bool; + + /// + /// Flag of whether expiration date variable is set + /// + public bool IsExpiresFilled_bool; + + /// + /// Expiration date + /// + public DateTime Expires_dt; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Ex.Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Ex.Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Ex.Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Ex.Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Ex.Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Ex.Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + } + + /// + /// Enumeration of user + /// + public class VpnRpcEnumUser + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// User list + /// + public VpnRpcEnumUserItem[] UserList; + } + + /// + /// Source IP Address Limit List Item + /// + public class VpnAc + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// Priority + /// + public uint Priority_u32; + + /// + /// Deny access + /// + public bool Deny_bool; + + /// + /// Set true if you want to specify the SubnetMask_ip item. + /// + public bool Masked_bool; + + /// + /// IP address + /// + public string IpAddress_ip; + + /// + /// Subnet mask, valid only if Masked_bool == true + /// + public string SubnetMask_ip; + } + + /// + /// Source IP Address Limit List + /// + public class VpnRpcAcList + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Source IP Address Limit List + /// + public VpnAc[] ACList; + } + + /// + /// Message + /// + public class VpnRpcMsg + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Message (Unicode strings acceptable) + /// + public byte[] Msg_bin; + } + + /// + /// Get / Set the Azure state + /// + public class VpnRpcAzureStatus + { + /// + /// Whether VPN Azure Function is Enabled + /// + public bool IsEnabled_bool; + + /// + /// Whether connection to VPN Azure Cloud Server is established + /// + public bool IsConnected_bool; + } + + /// + /// Local Bridge support information + /// + public class VpnRpcBridgeSupport + { + /// + /// Whether the OS supports the Local Bridge function + /// + public bool IsBridgeSupportedOs_bool; + + /// + /// Whether WinPcap is necessary to install + /// + public bool IsWinPcapNeeded_bool; + } + + /// + /// Get the CA of HUB + /// + public class VpnRpcHubGetCA + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The key id of the certificate + /// + public uint Key_u32; + + /// + /// The body of the X.509 certificate + /// + public byte[] Cert_bin; + } + + /// + /// Caps item of the VPN Server + /// + public class VpnCaps + { + /// + /// Name + /// + public string CapsName_str; + + /// + /// Value + /// + public uint CapsValue_u32; + + /// + /// Descrption + /// + public string CapsDescrption_utf; + } + + /// + /// Caps list of the VPN Server + /// + public class VpnCapslist + { + /// + /// Caps list of the VPN Server + /// + public VpnCaps[] CapsList; + } + + /// + /// Config operation + /// + public class VpnRpcConfig + { + /// + /// File name (valid only for returning from the server) + /// + public string FileName_str; + + /// + /// File data + /// + public byte[] FileData_bin; + } + + /// + /// Connection information + /// + public class VpnRpcConnectionInfo + { + /// + /// Connection name + /// + public string Name_str; + + /// + /// Type + /// + public VpnRpcConnectionType Type_u32; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Port number + /// + public uint Port_u32; + + /// + /// Connected time + /// + public DateTime ConnectedTime_dt; + + /// + /// Server string + /// + public string ServerStr_str; + + /// + /// Server version + /// + public uint ServerVer_u32; + + /// + /// Server build number + /// + public uint ServerBuild_u32; + + /// + /// Client string + /// + public string ClientStr_str; + + /// + /// Client version + /// + public uint ClientVer_u32; + + /// + /// Client build number + /// + public uint ClientBuild_u32; + } + + /// + /// Proxy type + /// + public enum VpnRpcProxyType + { + /// + /// Direct TCP connection + /// + Direct = 0, + + /// + /// Connection via HTTP proxy server + /// + HTTP = 1, + + /// + /// Connection via SOCKS proxy server + /// + SOCKS = 2, + } + + /// + /// The current status of the DDNS + /// + public class VpnDDnsClientStatus + { + /// + /// Last error code (IPv4) + /// + public uint Err_IPv4_u32; + + /// + /// Last error string (IPv4) + /// + public string ErrStr_IPv4_utf; + + /// + /// Last error code (IPv6) + /// + public uint Err_IPv6_u32; + + /// + /// Last error string (IPv6) + /// + public string ErrStr_IPv6_utf; + + /// + /// Current DDNS host name + /// + public string CurrentHostName_str; + + /// + /// Current FQDN of the DDNS hostname + /// + public string CurrentFqdn_str; + + /// + /// DDNS suffix + /// + public string DnsSuffix_str; + + /// + /// Current IPv4 address of the VPN Server + /// + public string CurrentIPv4_str; + + /// + /// Current IPv6 address of the VPN Server + /// + public string CurrentIPv6_str; + } + + /// + /// Internet connection settings + /// + public class VpnInternetSetting + { + /// + /// Type of proxy server + /// + public VpnRpcProxyType ProxyType_u32; + + /// + /// Proxy server host name + /// + public string ProxyHostName_str; + + /// + /// Proxy server port number + /// + public uint ProxyPort_u32; + + /// + /// Proxy server user name + /// + public string ProxyUsername_str; + + /// + /// Proxy server password + /// + public string ProxyPassword_str; + } + + /// + /// Administration options + /// + public class VpnAdminOption + { + /// + /// Name + /// + public string Name_str; + + /// + /// Data + /// + public uint Value_u32; + + /// + /// Descrption + /// + public string Descrption_utf; + } + + /// + /// Administration options list + /// + public class VpnRpcAdminOption + { + /// + /// Virtual HUB name + /// + public string HubName_str; + + /// + /// List data + /// + public VpnAdminOption[] AdminOptionList; + } + + /// + /// Connection state to the controller + /// + public class VpnRpcFarmConnectionStatus + { + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Port number + /// + public uint Port_u32; + + /// + /// Online state + /// + public bool Online_bool; + + /// + /// Last error code + /// + public uint LastError_u32; + + /// + /// Connection start time + /// + public DateTime StartedTime_dt; + + /// + /// First connection time + /// + public DateTime FirstConnectedTime_dt; + + /// + /// Connection time of this time + /// + public DateTime CurrentConnectedTime_dt; + + /// + /// Number of retries + /// + public uint NumTry_u32; + + /// + /// Number of connection count + /// + public uint NumConnected_u32; + + /// + /// Connection failure count + /// + public uint NumFailed_u32; + } + + /// + /// HUB item of each farm member + /// + public class VpnRpcFarmHub + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Dynamic HUB + /// + public bool DynamicHub_bool; + } + + + /// + /// Server farm member information acquisition + /// + public class VpnRpcFarmInfo + { + /// + /// ID + /// + public uint Id_u32; + + /// + /// The flag if the server is Cluster Controller (false: Cluster Member servers) + /// + public bool Controller_bool; + + /// + /// Connection Established Time + /// + public DateTime ConnectedTime_dt; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Host name + /// + public string Hostname_str; + + /// + /// Point + /// + public uint Point_u32; + + /// + /// Number of Public Ports + /// + public uint NumPort_u32; + + /// + /// Public Ports + /// + public uint[] Ports_u32; + + /// + /// Server certificate + /// + public byte[] ServerCert_bin; + + /// + /// Number of farm HUB + /// + public uint NumFarmHub_u32; + + /// + /// The hosted Virtual Hub list + /// + public VpnRpcFarmHub[] HubsList; + + /// + /// Number of hosted VPN sessions + /// + public uint NumSessions_u32; + + /// + /// Number of TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Performance Standard Ratio + /// + public uint Weight_u32; + } + + /// + /// Server farm configuration + /// + public class VpnRpcFarm + { + /// + /// Type of server + /// + public VpnRpcServerType ServerType_u32; + + /// + /// Valid only for Cluster Member servers. Number of the Ports_u32 element. + /// + public uint NumPort_u32; + + /// + /// Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. + /// + public uint[] Ports_u32; + + /// + /// Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. + /// + public string PublicIp_ip; + + /// + /// Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller. + /// + public string ControllerName_str; + + /// + /// Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller. + /// + public uint ControllerPort_u32; + + /// + /// Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. + /// + public string MemberPasswordPlaintext_str; + + /// + /// This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. + /// + public uint Weight_u32; + + /// + /// Valid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. + /// + public bool ControllerOnly_bool; + } + + /// + /// Log switch type + /// + public enum VpnRpcLogSwitchType + { + /// + /// No switching + /// + No = 0, + + /// + /// Secondly basis + /// + Second = 1, + + /// + /// Minutely basis + /// + Minute = 2, + + /// + /// Hourly basis + /// + Hour = 3, + + /// + /// Daily basis + /// + Day = 4, + + /// + /// Monthly basis + /// + Month = 5, + } + + /// + /// Packet log settings + /// + public enum VpnRpcPacketLogSetting + { + /// + /// Not save + /// + None = 0, + + /// + /// Only header + /// + Header = 1, + + /// + /// All payloads + /// + All = 2, + } + + /// + /// Packet log settings array index + /// + public enum VpnRpcPacketLogSettingIndex + { + /// + /// TCP connection log + /// + TcpConnection = 0, + + /// + /// TCP packet log + /// + TcpAll = 1, + + /// + /// DHCP Log + /// + Dhcp = 2, + + /// + /// UDP log + /// + Udp = 3, + + /// + /// ICMP log + /// + Icmp = 4, + + /// + /// IP log + /// + Ip = 5, + + /// + /// ARP log + /// + Arp = 6, + + /// + /// Ethernet log + /// + Ethernet = 7, + } + + /// + /// HUB log settings + /// + public class VpnRpcHubLog + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The flag to enable / disable saving the security log + /// + public bool SaveSecurityLog_bool; + + /// + /// The log filename switching setting of the security log + /// + public VpnRpcLogSwitchType SecurityLogSwitchType_u32; + + /// + /// The flag to enable / disable saving the security log + /// + public bool SavePacketLog_bool; + + /// + /// The log filename switching settings of the packet logs + /// + public VpnRpcLogSwitchType PacketLogSwitchType_u32; + + /// + /// Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7. + /// + public VpnRpcPacketLogSetting[] PacketLogConfig_u32 = new VpnRpcPacketLogSetting[16]; + } + + /// + /// RADIUS server options + /// + public class VpnRpcRadius + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// RADIUS server name + /// + public string RadiusServerName_str; + + /// + /// RADIUS port number + /// + public uint RadiusPort_u32; + + /// + /// Secret key + /// + public string RadiusSecret_str; + + /// + /// Radius retry interval + /// + public uint RadiusRetryInterval_u32; + } + + /// + /// Get the state HUB + /// + public class VpnRpcHubStatus + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Online + /// + public bool Online_bool; + + /// + /// Type of HUB + /// + public VpnRpcHubType HubType_u32; + + /// + /// Number of sessions + /// + public uint NumSessions_u32; + + /// + /// Number of sessions (client mode) + /// + public uint NumSessionsClient_u32; + + /// + /// Number of sessions (bridge mode) + /// + public uint NumSessionsBridge_u32; + + /// + /// Number of Access list entries + /// + public uint NumAccessLists_u32; + + /// + /// Number of users + /// + public uint NumUsers_u32; + + /// + /// Number of groups + /// + public uint NumGroups_u32; + + /// + /// Number of MAC table entries + /// + public uint NumMacTables_u32; + + /// + /// Number of IP table entries + /// + public uint NumIpTables_u32; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// Whether SecureNAT is enabled + /// + public bool SecureNATEnabled_bool; + + /// + /// Last communication date and time + /// + public DateTime LastCommTime_dt; + + /// + /// Last login date and time + /// + public DateTime LastLoginTime_dt; + + /// + /// Creation date and time + /// + public DateTime CreatedTime_dt; + + /// + /// Number of logins + /// + public uint NumLogin_u32; + } + + /// + /// List of services provided by IPsec server + /// + public class VpnIPsecServices + { + /// + /// Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. + /// + public bool L2TP_Raw_bool; + + /// + /// Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. + /// + public bool L2TP_IPsec_bool; + + /// + /// Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. + /// + public bool EtherIP_IPsec_bool; + + /// + /// Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. + /// + public string IPsec_Secret_str; + + /// + /// Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. + /// + public string L2TP_DefaultHub_str; + } + + /// + /// Keep alive protocol + /// + public enum VpnRpcKeepAliveProtocol + { + /// + /// TCP + /// + TCP = 0, + + /// + /// UDP + /// + UDP = 1, + } + + /// + /// Keep Alive settings + /// + public class VpnRpcKeep + { + /// + /// The flag to enable keep-alive to the Internet + /// + public bool UseKeepConnect_bool; + + /// + /// Specify the host name or IP address of the destination + /// + public string KeepConnectHost_str; + + /// + /// Specify the port number of the destination + /// + public uint KeepConnectPort_u32; + + /// + /// Protocol type + /// + public VpnRpcKeepAliveProtocol KeepConnectProtocol_u32; + + /// + /// Interval Between Packets Sends (Seconds) + /// + public uint KeepConnectInterval_u32; + } + + /// + /// State of the client session + /// + public enum VpnRpcClientSessionStatus + { + /// + /// Connecting + /// + Connecting = 0, + + /// + /// Negotiating + /// + Negotiation = 1, + + /// + /// During user authentication + /// + Auth = 2, + + /// + /// Connection complete + /// + Established = 3, + + /// + /// Wait to retry + /// + Retry = 4, + + /// + /// Idle state + /// + Idle = 5, + } + + /// + /// Get the link state + /// + public class VpnRpcLinkStatus + { + /// + /// The Virtual Hub name + /// + public string HubName_Ex_str; + + /// + /// The name of the cascade connection + /// + public string AccountName_utf; + + /// + /// The flag whether the cascade connection is enabled + /// + public bool Active_bool; + + /// + /// The flag whether the cascade connection is established + /// + public bool Connected_bool; + + /// + /// The session status + /// + public VpnRpcClientSessionStatus SessionStatus_u32; + + /// + /// The destination VPN server name + /// + public string ServerName_str; + + /// + /// The port number of the server + /// + public uint ServerPort_u32; + + /// + /// Server product name + /// + public string ServerProductName_str; + + /// + /// Server product version + /// + public uint ServerProductVer_u32; + + /// + /// Server product build number + /// + public uint ServerProductBuild_u32; + + /// + /// Server's X.509 certificate + /// + public byte[] ServerX_bin; + + /// + /// Client certificate + /// + public byte[] ClientX_bin; + + /// + /// Connection start time + /// + public DateTime StartTime_dt; + + /// + /// Connection completion time of the first connection + /// + public DateTime FirstConnectionEstablisiedTime_dt; + + /// + /// Connection completion time of this connection + /// + public DateTime CurrentConnectionEstablishTime_dt; + + /// + /// Number of connections have been established so far + /// + public uint NumConnectionsEatablished_u32; + + /// + /// Half-connection + /// + public bool HalfConnection_bool; + + /// + /// VoIP / QoS + /// + public bool QoS_bool; + + /// + /// Maximum number of the underlying TCP connections + /// + public uint MaxTcpConnections_u32; + + /// + /// Number of current underlying TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of underlying inbound TCP connections + /// + public uint NumTcpConnectionsUpload_u32; + + /// + /// Number of underlying outbound TCP connections + /// + public uint NumTcpConnectionsDownload_u32; + + /// + /// Use of encryption + /// + public bool UseEncrypt_bool; + + /// + /// Cipher algorithm name + /// + public string CipherName_str; + + /// + /// Use of compression + /// + public bool UseCompress_bool; + + /// + /// The flag whether this is a R-UDP session + /// + public bool IsRUDPSession_bool; + + /// + /// Underlying physical communication protocol + /// + public string UnderlayProtocol_str; + + /// + /// The UDP acceleration is enabled + /// + public bool IsUdpAccelerationEnabled_bool; + + /// + /// The UDP acceleration is being actually used + /// + public bool IsUsingUdpAcceleration_bool; + + /// + /// Session name + /// + public string SessionName_str; + + /// + /// Connection name + /// + public string ConnectionName_str; + + /// + /// Session key + /// + public byte[] SessionKey_bin; + + /// + /// Total transmitted data size + /// + public ulong TotalSendSize_u64; + + /// + /// Total received data size + /// + public ulong TotalRecvSize_u64; + + /// + /// Total transmitted data size (no compression) + /// + public ulong TotalSendSizeReal_u64; + + /// + /// Total received data size (no compression) + /// + public ulong TotalRecvSizeReal_u64; + + /// + /// The flag whether the VPN session is Bridge Mode + /// + public bool IsBridgeMode_bool; + + /// + /// The flag whether the VPN session is Monitor mode + /// + public bool IsMonitorMode_bool; + + /// + /// VLAN ID + /// + public uint VLanId_u32; + } + + /// + /// Setting of SSTP and OpenVPN + /// + public class VpnOpenVpnSstpConfig + { + /// + /// Specify true to enable the OpenVPN Clone Server Function. Specify false to disable. + /// + public bool EnableOpenVPN_bool; + + /// + /// Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. + /// + public string OpenVPNPortList_str; + + /// + /// pecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable. + /// + public bool EnableSSTP_bool; + } + + /// + /// Virtual host option + /// + public class VpnVhOption + { + /// + /// Target Virtual HUB name + /// + public string RpcHubName_str; + + /// + /// MAC address + /// + public byte[] MacAddress_bin; + + /// + /// IP address + /// + public string Ip_ip; + + /// + /// Subnet mask + /// + public string Mask_ip; + + /// + /// Use flag of the Virtual NAT function + /// + public bool UseNat_bool; + + /// + /// MTU value (Standard: 1500) + /// + public uint Mtu_u32; + + /// + /// NAT TCP timeout in seconds + /// + public uint NatTcpTimeout_u32; + + /// + /// NAT UDP timeout in seconds + /// + public uint NatUdpTimeout_u32; + + /// + /// Using flag of DHCP function + /// + public bool UseDhcp_bool; + + /// + /// Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) + /// + public string DhcpLeaseIPStart_ip; + + /// + /// Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) + /// + public string DhcpLeaseIPEnd_ip; + + /// + /// Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) + /// + public string DhcpSubnetMask_ip; + + /// + /// Specify the expiration date in second units for leasing an IP address to a client. + /// + public uint DhcpExpireTimeSpan_u32; + + /// + /// Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. + /// + public string DhcpGatewayAddress_ip; + + /// + /// Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. + /// + public string DhcpDnsServerAddress_ip; + + /// + /// Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address. + /// + public string DhcpDnsServerAddress2_ip; + + /// + /// Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. + /// + public string DhcpDomainName_str; + + /// + /// Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting. + /// + public bool SaveLog_bool; + + /// + /// The flag to enable the DhcpPushRoutes_str field. + /// + public bool ApplyDhcpPushRoutes_bool; + + /// + /// Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes. + /// + public string DhcpPushRoutes_str; + } + + /// + /// RPC_NAT_STATUS + /// + public class VpnRpcNatStatus + { + /// + /// Virtual Hub Name + /// + public string HubName_str; + + /// + /// Number of TCP sessions + /// + public uint NumTcpSessions_u32; + + /// + /// Ntmber of UDP sessions + /// + public uint NumUdpSessions_u32; + + /// + /// Nymber of ICMP sessions + /// + public uint NumIcmpSessions_u32; + + /// + /// Number of DNS sessions + /// + public uint NumDnsSessions_u32; + + /// + /// Number of DHCP clients + /// + public uint NumDhcpClients_u32; + + /// + /// Whether the NAT is operating in the Kernel Mode + /// + public bool IsKernelMode_bool; + + /// + /// Whether the NAT is operating in the Raw IP Mode + /// + public bool IsRawIpMode_bool; + } + + /// + /// Key pair + /// + public class VpnRpcKeyPair + { + /// + /// The body of the certificate + /// + public byte[] Cert_bin; + + /// + /// The body of the private key + /// + public byte[] Key_bin; + } + + /// + /// Single string value + /// + public class VpnRpcStr + { + /// + /// A string value + /// + public string String_str; + } + + /// + /// Type of VPN Server + /// + public enum VpnRpcServerType + { + /// + /// Stand-alone server + /// + Standalone = 0, + + /// + /// Farm controller server + /// + FarmController = 1, + + /// + /// Farm member server + /// + FarmMember = 2, + } + + /// + /// Operating system type + /// + public enum VpnRpcOsType + { + /// + /// Windows 95 + /// + WINDOWS_95 = 1100, + + /// + /// Windows 98 + /// + WINDOWS_98 = 1200, + + /// + /// Windows Me + /// + WINDOWS_ME = 1300, + + /// + /// Windows (unknown) + /// + WINDOWS_UNKNOWN = 1400, + + /// + /// Windows NT 4.0 Workstation + /// + WINDOWS_NT_4_WORKSTATION = 2100, + + /// + /// Windows NT 4.0 Server + /// + WINDOWS_NT_4_SERVER = 2110, + + /// + /// Windows NT 4.0 Server, Enterprise Edition + /// + WINDOWS_NT_4_SERVER_ENTERPRISE = 2111, + + /// + /// Windows NT 4.0 Terminal Server + /// + WINDOWS_NT_4_TERMINAL_SERVER = 2112, + + /// + /// BackOffice Server 4.5 + /// + WINDOWS_NT_4_BACKOFFICE = 2113, + + /// + /// Small Business Server 4.5 + /// + WINDOWS_NT_4_SMS = 2114, + + /// + /// Windows 2000 Professional + /// + WINDOWS_2000_PROFESSIONAL = 2200, + + /// + /// Windows 2000 Server + /// + WINDOWS_2000_SERVER = 2211, + + /// + /// Windows 2000 Advanced Server + /// + WINDOWS_2000_ADVANCED_SERVER = 2212, + + /// + /// Windows 2000 Datacenter Server + /// + WINDOWS_2000_DATACENTER_SERVER = 2213, + + /// + /// BackOffice Server 2000 + /// + WINDOWS_2000_BACKOFFICE = 2214, + + /// + /// Small Business Server 2000 + /// + WINDOWS_2000_SBS = 2215, + + /// + /// Windows XP Home Edition + /// + WINDOWS_XP_HOME = 2300, + + /// + /// Windows XP Professional + /// + WINDOWS_XP_PROFESSIONAL = 2301, + + /// + /// Windows Server 2003 Web Edition + /// + WINDOWS_2003_WEB = 2410, + + /// + /// Windows Server 2003 Standard Edition + /// + WINDOWS_2003_STANDARD = 2411, + + /// + /// Windows Server 2003 Enterprise Edition + /// + WINDOWS_2003_ENTERPRISE = 2412, + + /// + /// Windows Server 2003 DataCenter Edition + /// + WINDOWS_2003_DATACENTER = 2413, + + /// + /// BackOffice Server 2003 + /// + WINDOWS_2003_BACKOFFICE = 2414, + + /// + /// Small Business Server 2003 + /// + WINDOWS_2003_SBS = 2415, + + /// + /// Windows Vista + /// + WINDOWS_LONGHORN_PROFESSIONAL = 2500, + + /// + /// Windows Server 2008 + /// + WINDOWS_LONGHORN_SERVER = 2510, + + /// + /// Windows 7 + /// + WINDOWS_7 = 2600, + + /// + /// Windows Server 2008 R2 + /// + WINDOWS_SERVER_2008_R2 = 2610, + + /// + /// Windows 8 + /// + WINDOWS_8 = 2700, + + /// + /// Windows Server 2012 + /// + WINDOWS_SERVER_8 = 2710, + + /// + /// Windows 8.1 + /// + WINDOWS_81 = 2701, + + /// + /// Windows Server 2012 R2 + /// + WINDOWS_SERVER_81 = 2711, + + /// + /// Windows 10 + /// + WINDOWS_10 = 2702, + + /// + /// Windows Server 10 + /// + WINDOWS_SERVER_10 = 2712, + + /// + /// Windows 11 or later + /// + WINDOWS_11 = 2800, + + /// + /// Windows Server 11 or later + /// + WINDOWS_SERVER_11 = 2810, + + /// + /// Unknown UNIX + /// + UNIX_UNKNOWN = 3000, + + /// + /// Linux + /// + LINUX = 3100, + + /// + /// Solaris + /// + SOLARIS = 3200, + + /// + /// Cygwin + /// + CYGWIN = 3300, + + /// + /// BSD + /// + BSD = 3400, + + /// + /// MacOS X + /// + MACOS_X = 3500, + } + + /// + /// VPN Server Information + /// + public class VpnRpcServerInfo + { + /// + /// Server product name + /// + public string ServerProductName_str; + + /// + /// Server version string + /// + public string ServerVersionString_str; + + /// + /// Server build information string + /// + public string ServerBuildInfoString_str; + + /// + /// Server version integer value + /// + public uint ServerVerInt_u32; + + /// + /// Server build number integer value + /// + public uint ServerBuildInt_u32; + + /// + /// Server host name + /// + public string ServerHostName_str; + + /// + /// Type of server + /// + public VpnRpcServerType ServerType_u32; + + /// + /// Build date and time of the server + /// + public DateTime ServerBuildDate_dt; + + /// + /// Family name + /// + public string ServerFamilyName_str; + + /// + /// OS type + /// + public VpnRpcOsType OsType_u32; + + /// + /// Service pack number + /// + public uint OsServicePack_u32; + + /// + /// OS system name + /// + public string OsSystemName_str; + + /// + /// OS product name + /// + public string OsProductName_str; + + /// + /// OS vendor name + /// + public string OsVendorName_str; + + /// + /// OS version + /// + public string OsVersion_str; + + /// + /// Kernel name + /// + public string KernelName_str; + + /// + /// Kernel version + /// + public string KernelVersion_str; + } + + /// + /// Server status + /// + public class VpnRpcServerStatus + { + /// + /// Type of server + /// + public VpnRpcServerType ServerType_u32; + + /// + /// Total number of TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of Local TCP connections + /// + public uint NumTcpConnectionsLocal_u32; + + /// + /// Number of remote TCP connections + /// + public uint NumTcpConnectionsRemote_u32; + + /// + /// Total number of HUBs + /// + public uint NumHubTotal_u32; + + /// + /// Nymber of stand-alone HUB + /// + public uint NumHubStandalone_u32; + + /// + /// Number of static HUBs + /// + public uint NumHubStatic_u32; + + /// + /// Number of Dynamic HUBs + /// + public uint NumHubDynamic_u32; + + /// + /// Total number of sessions + /// + public uint NumSessionsTotal_u32; + + /// + /// Number of local VPN sessions + /// + public uint NumSessionsLocal_u32; + + /// + /// The number of remote sessions + /// + public uint NumSessionsRemote_u32; + + /// + /// Number of MAC table entries (total sum of all Virtual Hubs) + /// + public uint NumMacTables_u32; + + /// + /// Number of IP table entries (total sum of all Virtual Hubs) + /// + public uint NumIpTables_u32; + + /// + /// Number of users (total sum of all Virtual Hubs) + /// + public uint NumUsers_u32; + + /// + /// Number of groups (total sum of all Virtual Hubs) + /// + public uint NumGroups_u32; + + /// + /// Number of assigned bridge licenses (Useful to make a commercial version) + /// + public uint AssignedBridgeLicenses_u32; + + /// + /// Number of assigned client licenses (Useful to make a commercial version) + /// + public uint AssignedClientLicenses_u32; + + /// + /// Number of Assigned bridge license (cluster-wide), useful to make a commercial version + /// + public uint AssignedBridgeLicensesTotal_u32; + + /// + /// Number of assigned client licenses (cluster-wide), useful to make a commercial version + /// + public uint AssignedClientLicensesTotal_u32; + + /// + /// Number of broadcast packets (Recv) + /// + [JsonProperty("Recv.BroadcastBytes_u64")] + public ulong Recv_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Recv) + /// + [JsonProperty("Recv.BroadcastCount_u64")] + public ulong Recv_BroadcastCount_u64; + + /// + /// Unicast count (Recv) + /// + [JsonProperty("Recv.UnicastBytes_u64")] + public ulong Recv_UnicastBytes_u64; + + /// + /// Unicast bytes (Recv) + /// + [JsonProperty("Recv.UnicastCount_u64")] + public ulong Recv_UnicastCount_u64; + + /// + /// Number of broadcast packets (Send) + /// + [JsonProperty("Send.BroadcastBytes_u64")] + public ulong Send_BroadcastBytes_u64; + + /// + /// Broadcast bytes (Send) + /// + [JsonProperty("Send.BroadcastCount_u64")] + public ulong Send_BroadcastCount_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastBytes_u64")] + public ulong Send_UnicastBytes_u64; + + /// + /// Unicast bytes (Send) + /// + [JsonProperty("Send.UnicastCount_u64")] + public ulong Send_UnicastCount_u64; + + /// + /// Current time + /// + public DateTime CurrentTime_dt; + + /// + /// 64 bit High-Precision Logical System Clock + /// + public ulong CurrentTick_u64; + + /// + /// VPN Server Start-up time + /// + public DateTime StartTime_dt; + + /// + /// Memory information: Total Memory + /// + public ulong TotalMemory_u64; + + /// + /// Memory information: Used Memory + /// + public ulong UsedMemory_u64; + + /// + /// Memory information: Free Memory + /// + public ulong FreeMemory_u64; + + /// + /// Memory information: Total Phys + /// + public ulong TotalPhys_u64; + + /// + /// Memory information: Used Phys + /// + public ulong UsedPhys_u64; + + /// + /// Memory information: Free Phys + /// + public ulong FreePhys_u64; + } + + /// + /// VPN Session status + /// + public class VpnRpcSessionStatus + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// VPN session name + /// + public string Name_str; + + /// + /// User name + /// + public string Username_str; + + /// + /// Real user name which was used for the authentication + /// + public string RealUsername_str; + + /// + /// Group name + /// + public string GroupName_str; + + /// + /// Is Cascade Session + /// + public bool LinkMode_bool; + + /// + /// Client IP address + /// + public string Client_Ip_Address_ip; + + /// + /// Client host name + /// + [JsonProperty("SessionStatus_ClientHostName_str")] + public string ClientHostName_str; + + /// + /// Operation flag + /// + public bool Active_bool; + + /// + /// Connected flag + /// + public bool Connected_bool; + + /// + /// State of the client session + /// + public VpnRpcClientSessionStatus SessionStatus_u32; + + /// + /// Server name + /// + public string ServerName_str; + + /// + /// Port number of the server + /// + public uint ServerPort_u32; + + /// + /// Server product name + /// + public string ServerProductName_str; + + /// + /// Server product version + /// + public uint ServerProductVer_u32; + + /// + /// Server product build number + /// + public uint ServerProductBuild_u32; + + /// + /// Connection start time + /// + public DateTime StartTime_dt; + + /// + /// Connection completion time of the first connection + /// + public DateTime FirstConnectionEstablisiedTime_dt; + + /// + /// Connection completion time of this connection + /// + public DateTime CurrentConnectionEstablishTime_dt; + + /// + /// Number of connections have been established so far + /// + public uint NumConnectionsEatablished_u32; + + /// + /// Half-connection + /// + public bool HalfConnection_bool; + + /// + /// VoIP / QoS + /// + public bool QoS_bool; + + /// + /// Maximum number of the underlying TCP connections + /// + public uint MaxTcpConnections_u32; + + /// + /// Number of current underlying TCP connections + /// + public uint NumTcpConnections_u32; + + /// + /// Number of inbound underlying connections + /// + public uint NumTcpConnectionsUpload_u32; + + /// + /// Number of outbound underlying connections + /// + public uint NumTcpConnectionsDownload_u32; + + /// + /// Use of encryption + /// + public bool UseEncrypt_bool; + + /// + /// Cipher algorithm name + /// + public string CipherName_str; + + /// + /// Use of compression + /// + public bool UseCompress_bool; + + /// + /// Is R-UDP session + /// + public bool IsRUDPSession_bool; + + /// + /// Physical underlying communication protocol + /// + public string UnderlayProtocol_str; + + /// + /// The UDP acceleration is enabled + /// + public bool IsUdpAccelerationEnabled_bool; + + /// + /// Using the UDP acceleration function + /// + public bool IsUsingUdpAcceleration_bool; + + /// + /// VPN session name + /// + public string SessionName_str; + + /// + /// Connection name + /// + public string ConnectionName_str; + + /// + /// Session key + /// + public byte[] SessionKey_bin; + + /// + /// Total transmitted data size + /// + public ulong TotalSendSize_u64; + + /// + /// Total received data size + /// + public ulong TotalRecvSize_u64; + + /// + /// Total transmitted data size (no compression) + /// + public ulong TotalSendSizeReal_u64; + + /// + /// Total received data size (no compression) + /// + public ulong TotalRecvSizeReal_u64; + + /// + /// Is Bridge Mode + /// + public bool IsBridgeMode_bool; + + /// + /// Is Monitor mode + /// + public bool IsMonitorMode_bool; + + /// + /// VLAN ID + /// + public uint VLanId_u32; + + /// + /// Client product name + /// + public string ClientProductName_str; + + /// + /// Client version + /// + public uint ClientProductVer_u32; + + /// + /// Client build number + /// + public uint ClientProductBuild_u32; + + /// + /// Client OS name + /// + public string ClientOsName_str; + + /// + /// Client OS version + /// + public string ClientOsVer_str; + + /// + /// Client OS Product ID + /// + public string ClientOsProductId_str; + + /// + /// Client host name + /// + public string ClientHostname_str; + + /// + /// Unique ID + /// + public byte[] UniqueId_bin; + } + + /// + /// Set the special listener + /// + public class VpnRpcSpecialListener + { + /// + /// The flag to activate the VPN over ICMP server function + /// + public bool VpnOverIcmpListener_bool; + + /// + /// The flag to activate the VPN over DNS function + /// + public bool VpnOverDnsListener_bool; + } + + /// + /// Syslog configuration + /// + public enum VpnSyslogSaveType + { + /// + /// Do not use syslog + /// + None = 0, + + /// + /// Only server log + /// + ServerLog = 1, + + /// + /// Server and Virtual HUB security log + /// + ServerAndHubSecurityLog = 2, + + /// + /// Server, Virtual HUB security, and packet log + /// + ServerAndHubAllLog = 3, + } + + /// + /// Syslog configuration + /// + public class VpnSyslogSetting + { + /// + /// The behavior of the syslog function + /// + public VpnSyslogSaveType SaveType_u32; + + /// + /// Specify the host name or IP address of the syslog server + /// + public string Hostname_str; + + /// + /// Specify the port number of the syslog server + /// + public uint Port_u32; + } + + /// + /// VPN Gate Server Config + /// + public class VpnVgsConfig + { + /// + /// Active flag + /// + public bool IsEnabled_bool; + + /// + /// Message + /// + public string Message_utf; + + /// + /// Owner name + /// + public string Owner_utf; + + /// + /// Abuse email + /// + public string Abuse_utf; + + /// + /// Log save flag + /// + public bool NoLog_bool; + + /// + /// Save log permanently + /// + public bool LogPermanent_bool; + + /// + /// Enable the L2TP VPN function + /// + public bool EnableL2TP_bool; + } + + /// + /// Read a Log file + /// + public class VpnRpcReadLogFile + { + /// + /// Server name + /// + public string ServerName_str; + + /// + /// File Path + /// + public string FilePath_str; + + /// + /// Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field. + /// + public uint Offset_u32; + + /// + /// Received buffer + /// + public byte[] Buffer_bin; + } + + /// + /// Rename link + /// + public class VpnRpcRenameLink + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// The old name of the cascade connection + /// + public string OldAccountName_utf; + + /// + /// The new name of the cascade connection + /// + public string NewAccountName_utf; + } + + /// + /// Online or offline the HUB + /// + public class VpnRpcSetHubOnline + { + /// + /// The Virtual Hub name + /// + public string HubName_str; + + /// + /// Online / offline flag + /// + public bool Online_bool; + } + + /// + /// Set Password + /// + public class VpnRpcSetPassword + { + /// + /// The plaintext password + /// + public string PlainTextPassword_str; + } + +} diff --git a/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpcTest/VpnServerRpcTest.cs b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpcTest/VpnServerRpcTest.cs new file mode 100644 index 00000000..b407750f --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/VpnServerRpcTest/VpnServerRpcTest.cs @@ -0,0 +1,3736 @@ +// SoftEther VPN Server JSON-RPC Stub code for C# +// +// VpnServerRpcTest.cs - Test sample code for SoftEther VPN Server JSON-RPC Stub +// +// This sample code shows how to call all available RPC functions. +// You can copy and paste test code to write your own C# codes. +// +// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen +// +// Licensed under the Apache License 2.0 +// Copyright (c) 2014-__YEAR__ SoftEther VPN Project + +using System; +using SoftEther.VPNServerRpc; + +class VPNRPCTest +{ + VpnServerRpc api; + + Random rand = new Random(); + + string hub_name = "TEST"; + + public VPNRPCTest() + { + api = new VpnServerRpc("127.0.0.1", 443, "PASSWORD_HERE", ""); // Speficy your VPN Server's password here. + } + + /// + /// Tests all VPN APIs + /// + public void Test_All() + { + hub_name = "TEST"; + + Test_Test(); + + Test_GetServerInfo(); + Test_GetServerStatus(); + + uint new_listener_port = Test_CreateListener(); + Test_EnableListener(new_listener_port, false); + Test_EnumListener(); + Test_EnableListener(new_listener_port, true); + Test_EnumListener(); + Test_DeleteListener(new_listener_port); + + Test_SetServerPassword(); + + Test_GetFarmSetting(); + + if (false) + { + + Test_SetFarmSetting(); + + VpnRpcEnumFarm farm_members = Test_EnumFarmMember(); + + foreach (VpnRpcEnumFarmItem farm_member in farm_members.FarmMemberList) + { + Test_GetFarmInfo(farm_member.Id_u32); + } + + Test_GetFarmConnectionStatus(); + } + else if (false) + { + Console.WriteLine("abc"); + } + else + { + Console.WriteLine("def"); + } + + Test_GetServerCert(); + + Test_SetServerCert(); + + Test_GetServerCipher(); + + Test_SetServerCipher(); + + VpnRpcEnumConnection enum_connection = Test_EnumConnection(); + + foreach (VpnRpcEnumConnectionItem connecton in enum_connection.ConnectionList) + { + Test_GetConnectionInfo(connecton.Name_str); + //Test_DisconnectConnection(connecton.Name_str); + } + + hub_name = Test_CreateHub(); + + Test_SetHub(); + Test_GetHub(); + Test_EnumHub(); + Test_SetHubRadius(); + Test_GetHubRadius(); + + Test_SetHubOnline(); + Test_GetHubStatus(); + + VpnRpcHubLog hub_log_settings = Test_GetHubLog(); + Test_SetHubLog(hub_log_settings); + + Test_AddCa(); + VpnRpcHubEnumCA enum_ca = Test_EnumCa(); + foreach (VpnRpcHubEnumCAItem ca in enum_ca.CAList) + { + Test_GetCa(ca.Key_u32); + Test_DeleteCa(ca.Key_u32); + } + + Test_CreateLink(); + Test_GetLink(); + Test_SetLink(); + Test_SetLinkOffline(); + Test_SetLinkOnline(); + VpnRpcEnumLink enum_link = Test_EnumLink(); + foreach (var link in enum_link.LinkList) + { + Test_GetLinkStatus(link.AccountName_utf); + } + System.Threading.Thread.Sleep(3000); + Test_RenameLink(); + Test_DeleteLink(); + + Test_AddAccess(); + Test_EnumAccess(); + Test_DeleteAccess(); + Test_SetAccessList(); + + Test_CreateGroup(); + Test_SetGroup(); + Test_GetGroup(); + + Test_CreateUser(); + Test_SetUser(); + Test_GetUser(); + Test_EnumUser(); + Test_EnumGroup(); + + Test_DeleteUser(); + Test_DeleteGroup(); + + VpnRpcEnumSession enum_session = Test_EnumSession(); + + foreach (VpnRpcEnumSessionItem session in enum_session.SessionList) + { + Test_GetSessionStatus(session.Name_str); + + Test_DeleteSession(session.Name_str); + } + + VpnRpcEnumMacTable enum_mac = Test_EnumMacTable(); + + foreach (VpnRpcEnumMacTableItem mac in enum_mac.MacTable) + { + Test_DeleteMacTable(mac.Key_u32); + } + + VpnRpcEnumIpTable enum_ip = Test_EnumIpTable(); + + foreach (VpnRpcEnumIpTableItem ip in enum_ip.IpTable) + { + Test_DeleteIpTable(ip.Key_u32); + } + + Test_SetKeep(); + Test_GetKeep(); + + Test_EnableSecureNAT(); + Test_GetSecureNATOption(); + Test_SetSecureNATOption(); + Test_EnumNAT(); + Test_EnumDHCP(); + Test_GetSecureNATStatus(); + Test_DisableSecureNAT(); + + Test_EnumEthernet(); + //Test_AddLocalBridge(); + Test_EnumLocalBridge(); + //Test_DeleteLocalBridge(); + Test_GetBridgeSupport(); + + Test_GetCaps(); + Test_GetConfig(); + //Test_SetConfig(); + + Test_GetDefaultHubAdminOptions(); + Test_GetHubAdminOptions(); + Test_SetHubAdminOptions(); + Test_GetHubExtOptions(); + Test_SetHubExtOptions(); + + Test_AddL3Switch(); + Test_AddL3If(); + Test_EnumL3Switch(); + Test_EnumL3If(); + Test_AddL3Table(); + Test_EnumL3Table(); + Test_DelL3Table(); + Test_StartL3Switch(); + Test_StopL3Switch(); + Test_DelL3If(); + Test_DelL3Switch(); + + Test_AddCrl(); + VpnRpcEnumCrl enum_crl = Test_EnumCrl(); + foreach (VpnRpcEnumCrlItem crl in enum_crl.CRLList) + { + VpnRpcCrl got_crl = Test_GetCrl(crl.Key_u32); + + got_crl.CommonName_utf = got_crl.CommonName_utf + "_a"; + Test_SetCrl(got_crl); + } + + enum_crl = Test_EnumCrl(); + foreach (VpnRpcEnumCrlItem crl in enum_crl.CRLList) + { + Test_DelCrl(crl.Key_u32); + } + + Test_SetAcList(); + Test_GetAcList(); + + VpnRpcEnumLogFile enum_log_file = Test_EnumLogFile(); + foreach (VpnRpcEnumLogFileItem log in enum_log_file.LogFiles) + { + Test_ReadLogFile(log.FilePath_str); + + break; + } + + Test_SetSysLog(true); + Test_GetSysLog(); + Test_SetSysLog(false); + + Test_SetHubMsg(); + Test_GetHubMsg(); + Test_GetAdminMsg(); + Test_Flush(); + + Test_SetIPsecServices(); + Test_GetIPsecServices(); + + Test_AddEtherIpId(); + VpnRpcEnumEtherIpId enum_etherip_id = Test_EnumEtherIpId(); + foreach (VpnEtherIpId etherip_id in enum_etherip_id.Settings) + { + Test_GetEtherIpId(etherip_id.Id_str); + Test_DeleteEtherIpId(etherip_id.Id_str); + } + + Test_SetOpenVpnSstpConfig(); + Test_GetOpenVpnSstpConfig(); + + Test_GetDDnsClientStatus(); + Test_SetDDnsInternetSettng(); + Test_GetDDnsInternetSettng(); + + Test_ChangeDDnsClientHostname(); + Test_RegenerateServerCert(); + Test_MakeOpenVpnConfigFile(); + Test_SetSpecialListener(); + Test_GetSpecialListener(); + + Test_GetAzureStatus(); + Test_SetAzureStatus(); + Test_SetVgsConfig(); + Test_GetVgsConfig(); + + Test_DeleteHub(); + //Test_RebootServer(); + + return; + } + + + /// + /// API test for 'Test', test RPC function + /// + public void Test_Test() + { + Console.WriteLine("Begin: Test_Test"); + + VpnRpcTest a = new VpnRpcTest() { IntValue_u32 = 12345 }; + + VpnRpcTest b = api.Test(a); + + print_object(b); + + Console.WriteLine("End: Test_Test"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerInfo', Get server information + /// + public void Test_GetServerInfo() + { + Console.WriteLine("Begin: Test_GetServerInfo"); + + VpnRpcServerInfo info = api.GetServerInfo(); + + print_object(info); + + Console.WriteLine("End: Test_GetServerInfo"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerStatus', Get server status + /// + public void Test_GetServerStatus() + { + Console.WriteLine("Begin: Test_GetServerStatus"); + + VpnRpcServerStatus out_rpc_server_status = api.GetServerStatus(); + + print_object(out_rpc_server_status); + + Console.WriteLine("End: Test_GetServerStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateListener', Create a listener + /// + public uint Test_CreateListener() + { + Console.WriteLine("Begin: Test_CreateListener"); + + uint port = (uint)rand.Next(1025, 65534); + + Console.WriteLine("Creating a new listener port: Port " + port); + VpnRpcListener in_rpc_listener = new VpnRpcListener() { Enable_bool = true, Port_u32 = port, }; + VpnRpcListener out_rpc_listener = api.CreateListener(in_rpc_listener); + + Console.WriteLine("Done."); + Console.WriteLine("End: Test_CreateListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return port; + } + + /// + /// API test for 'EnumListener', Enumerating listeners + /// + public void Test_EnumListener() + { + Console.WriteLine("Begin: Test_EnumListener"); + + VpnRpcListenerList out_rpc_listener_list = api.EnumListener(); + + print_object(out_rpc_listener_list); + + Console.WriteLine("End: Test_EnumListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteListener', Delete a listener + /// + public void Test_DeleteListener(uint port) + { + Console.WriteLine("Begin: Test_DeleteListener"); + + Console.WriteLine("Deleting a new listener port: Port" + port); + VpnRpcListener in_rpc_listener = new VpnRpcListener() { Port_u32 = port }; + VpnRpcListener out_rpc_listener = api.DeleteListener(in_rpc_listener); + + Console.WriteLine("Done."); + Console.WriteLine("End: Test_DeleteListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnableListener', Enable / Disable listener + /// + public void Test_EnableListener(uint port, bool enabled) + { + Console.WriteLine("Begin: Test_EnableListener"); + + if (enabled) + { + Console.WriteLine("Enabling listener port = " + port); + } + else + { + Console.WriteLine("Disabling listener port = " + port); + } + + VpnRpcListener in_rpc_listener = new VpnRpcListener() { Port_u32 = port, Enable_bool = enabled }; + VpnRpcListener out_rpc_listener = api.EnableListener(in_rpc_listener); + + Console.WriteLine("Done."); + + Console.WriteLine("End: Test_EnableListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetServerPassword', Set server password + /// + public void Test_SetServerPassword() + { + string password = "microsoft"; + + Console.WriteLine("Begin: Test_SetServerPassword"); + + Console.WriteLine("Set the server administrator password to '" + password + "'."); + + VpnRpcSetPassword in_rpc_set_password = new VpnRpcSetPassword() { PlainTextPassword_str = password }; + VpnRpcSetPassword out_rpc_set_password = api.SetServerPassword(in_rpc_set_password); + + Console.WriteLine("Done."); + + Console.WriteLine("End: Test_SetServerPassword"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetFarmSetting', Set clustering configuration + /// + public void Test_SetFarmSetting() + { + Console.WriteLine("Begin: Test_SetFarmSetting"); + + VpnRpcFarm in_rpc_farm = new VpnRpcFarm() + { + ServerType_u32 = VpnRpcServerType.FarmController, + NumPort_u32 = 2, + Ports_u32 = new uint[] { 443, 444, 445 }, + PublicIp_ip = "1.2.3.4", + ControllerName_str = "controller", + MemberPasswordPlaintext_str = "microsoft", + ControllerPort_u32 = 443, + Weight_u32 = 100, + ControllerOnly_bool = false, + }; + + VpnRpcFarm out_rpc_farm = api.SetFarmSetting(in_rpc_farm); + + Console.WriteLine("End: Test_SetFarmSetting"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetFarmSetting', Get clustering configuration + /// + public void Test_GetFarmSetting() + { + Console.WriteLine("Begin: Test_GetFarmSetting"); + + // VpnRpcFarm in_rpc_farm = new VpnRpcFarm(); + VpnRpcFarm out_rpc_farm = api.GetFarmSetting(); + + print_object(out_rpc_farm); + + Console.WriteLine("End: Test_GetFarmSetting"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetFarmInfo', Get cluster member information + /// + public void Test_GetFarmInfo(uint id) + { + Console.WriteLine("Begin: Test_GetFarmInfo"); + + VpnRpcFarmInfo in_rpc_farm_info = new VpnRpcFarmInfo() { Id_u32 = id }; + VpnRpcFarmInfo out_rpc_farm_info = api.GetFarmInfo(in_rpc_farm_info); + + print_object(out_rpc_farm_info); + + Console.WriteLine("End: Test_GetFarmInfo"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumFarmMember', Enumerate cluster members + /// + public VpnRpcEnumFarm Test_EnumFarmMember() + { + Console.WriteLine("Begin: Test_EnumFarmMember"); + + VpnRpcEnumFarm out_rpc_enum_farm = api.EnumFarmMember(); + + print_object(out_rpc_enum_farm); + + Console.WriteLine("End: Test_EnumFarmMember"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_farm; + } + + /// + /// API test for 'GetFarmConnectionStatus', Get status of connection to cluster controller + /// + public void Test_GetFarmConnectionStatus() + { + Console.WriteLine("Begin: Test_GetFarmConnectionStatus"); + + VpnRpcFarmConnectionStatus out_rpc_farm_connection_status = api.GetFarmConnectionStatus(); + + print_object(out_rpc_farm_connection_status); + + Console.WriteLine("End: Test_GetFarmConnectionStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetServerCert', Set the server certification + /// + public void Test_SetServerCert() + { + Console.WriteLine("Begin: Test_SetServerCert"); + + VpnRpcKeyPair in_rpc_key_pair = new VpnRpcKeyPair() + { + Cert_bin = new byte[] + { +0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x43,0x45,0x52,0x54,0x49, +0x46,0x49,0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x44, +0x72,0x6a,0x43,0x43,0x41,0x70,0x61,0x67,0x41,0x77,0x49,0x42,0x41,0x67,0x49,0x42, +0x41,0x44,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42, +0x41,0x51,0x73,0x46,0x41,0x44,0x42,0x57,0x4d,0x51,0x77,0x77,0x43,0x67,0x59,0x44, +0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x0a,0x46,0x54,0x41, +0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72,0x2b,0x4f, +0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x4d,0x41,0x6b, +0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78,0x45,0x44,0x41, +0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69,0x0a,0x59,0x58, +0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41, +0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77,0x48,0x68, +0x63,0x4e,0x4d,0x54,0x67,0x78,0x4d,0x44,0x45,0x78,0x4d,0x6a,0x4d,0x7a,0x4e,0x54, +0x41,0x78,0x57,0x68,0x63,0x4e,0x4e,0x44,0x49,0x78,0x4d,0x44,0x41,0x31,0x0a,0x4d, +0x6a,0x4d,0x7a,0x4e,0x54,0x41,0x78,0x57,0x6a,0x42,0x57,0x4d,0x51,0x77,0x77,0x43, +0x67,0x59,0x44,0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x46, +0x54,0x41,0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72, +0x2b,0x4f,0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x0a, +0x4d,0x41,0x6b,0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78, +0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69, +0x59,0x58,0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56, +0x42,0x41,0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77, +0x0a,0x67,0x67,0x45,0x69,0x4d,0x41,0x30,0x47,0x43,0x53,0x71,0x47,0x53,0x49,0x62, +0x33,0x44,0x51,0x45,0x42,0x41,0x51,0x55,0x41,0x41,0x34,0x49,0x42,0x44,0x77,0x41, +0x77,0x67,0x67,0x45,0x4b,0x41,0x6f,0x49,0x42,0x41,0x51,0x44,0x58,0x45,0x63,0x76, +0x72,0x59,0x37,0x56,0x2b,0x7a,0x64,0x42,0x79,0x72,0x64,0x4e,0x78,0x4a,0x59,0x45, +0x6d,0x0a,0x61,0x41,0x4e,0x59,0x55,0x4f,0x37,0x76,0x57,0x34,0x68,0x64,0x41,0x35, +0x49,0x42,0x49,0x46,0x6d,0x4d,0x70,0x6e,0x62,0x79,0x69,0x4e,0x6e,0x5a,0x77,0x36, +0x57,0x39,0x6f,0x61,0x67,0x78,0x33,0x5a,0x49,0x65,0x65,0x48,0x56,0x59,0x62,0x52, +0x69,0x4b,0x36,0x41,0x66,0x46,0x74,0x53,0x31,0x32,0x2b,0x45,0x31,0x4d,0x59,0x31, +0x64,0x32,0x0a,0x61,0x71,0x51,0x31,0x53,0x72,0x49,0x43,0x39,0x51,0x35,0x55,0x6e, +0x5a,0x61,0x42,0x72,0x62,0x57,0x32,0x32,0x6d,0x4e,0x75,0x6c,0x4d,0x34,0x2f,0x6c, +0x49,0x4a,0x72,0x48,0x70,0x51,0x55,0x68,0x50,0x78,0x6f,0x62,0x79,0x34,0x2f,0x36, +0x4e,0x41,0x37,0x71,0x4b,0x67,0x55,0x48,0x69,0x79,0x4f,0x64,0x33,0x4a,0x42,0x70, +0x4f,0x66,0x77,0x0a,0x38,0x54,0x76,0x53,0x74,0x51,0x78,0x34,0x4c,0x38,0x59,0x64, +0x4b,0x51,0x35,0x68,0x74,0x7a,0x6b,0x32,0x68,0x70,0x52,0x4a,0x4c,0x30,0x6c,0x4b, +0x67,0x47,0x31,0x57,0x34,0x75,0x4b,0x32,0x39,0x39,0x42,0x74,0x7a,0x64,0x41,0x67, +0x66,0x42,0x76,0x43,0x54,0x33,0x41,0x31,0x61,0x53,0x70,0x6a,0x49,0x47,0x74,0x6e, +0x69,0x72,0x49,0x31,0x0a,0x46,0x4c,0x52,0x58,0x47,0x79,0x38,0x31,0x31,0x57,0x4a, +0x39,0x4a,0x68,0x68,0x34,0x41,0x4b,0x4c,0x66,0x79,0x56,0x70,0x42,0x4a,0x67,0x65, +0x34,0x73,0x56,0x72,0x36,0x4e,0x75,0x75,0x49,0x66,0x32,0x71,0x47,0x31,0x6f,0x79, +0x31,0x30,0x70,0x61,0x51,0x4e,0x65,0x71,0x32,0x33,0x55,0x47,0x61,0x59,0x74,0x2f, +0x7a,0x55,0x56,0x4a,0x77,0x0a,0x55,0x74,0x30,0x57,0x45,0x6b,0x58,0x38,0x48,0x4f, +0x63,0x62,0x33,0x75,0x49,0x6f,0x54,0x6d,0x61,0x4f,0x34,0x72,0x48,0x42,0x55,0x4a, +0x71,0x45,0x79,0x39,0x51,0x58,0x7a,0x53,0x57,0x77,0x43,0x35,0x78,0x45,0x43,0x64, +0x37,0x43,0x4a,0x53,0x53,0x68,0x31,0x30,0x4f,0x75,0x6e,0x6c,0x75,0x4c,0x32,0x4d, +0x47,0x65,0x5a,0x47,0x6e,0x76,0x0a,0x41,0x67,0x4d,0x42,0x41,0x41,0x47,0x6a,0x67, +0x59,0x59,0x77,0x67,0x59,0x4d,0x77,0x44,0x77,0x59,0x44,0x56,0x52,0x30,0x54,0x41, +0x51,0x48,0x2f,0x42,0x41,0x55,0x77,0x41,0x77,0x45,0x42,0x2f,0x7a,0x41,0x4c,0x42, +0x67,0x4e,0x56,0x48,0x51,0x38,0x45,0x42,0x41,0x4d,0x43,0x41,0x66,0x59,0x77,0x59, +0x77,0x59,0x44,0x56,0x52,0x30,0x6c,0x0a,0x42,0x46,0x77,0x77,0x57,0x67,0x59,0x49, +0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x45,0x47,0x43,0x43,0x73,0x47, +0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x43,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46, +0x42,0x51,0x63,0x44,0x41,0x77,0x59,0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48, +0x41,0x77,0x51,0x47,0x43,0x43,0x73,0x47,0x0a,0x41,0x51,0x55,0x46,0x42,0x77,0x4d, +0x46,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46,0x42,0x51,0x63,0x44,0x42,0x67,0x59, +0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x63,0x47,0x43,0x43,0x73, +0x47,0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x49,0x42,0x67,0x67,0x72,0x42,0x67,0x45, +0x46,0x42,0x51,0x63,0x44,0x43,0x54,0x41,0x4e,0x0a,0x42,0x67,0x6b,0x71,0x68,0x6b, +0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x73,0x46,0x41,0x41,0x4f,0x43,0x41,0x51, +0x45,0x41,0x46,0x6d,0x34,0x37,0x47,0x55,0x70,0x50,0x57,0x35,0x2b,0x37,0x69,0x46, +0x74,0x69,0x6c,0x6f,0x6b,0x35,0x32,0x49,0x6f,0x54,0x57,0x72,0x74,0x46,0x67,0x32, +0x79,0x69,0x36,0x6b,0x49,0x32,0x69,0x52,0x4e,0x51,0x0a,0x4b,0x75,0x67,0x48,0x55, +0x49,0x4f,0x34,0x4b,0x53,0x71,0x4a,0x56,0x42,0x50,0x38,0x61,0x4b,0x4f,0x61,0x54, +0x5a,0x47,0x45,0x31,0x4b,0x4d,0x68,0x2f,0x59,0x6a,0x68,0x36,0x71,0x2f,0x67,0x50, +0x61,0x6c,0x67,0x64,0x2f,0x38,0x44,0x6d,0x72,0x78,0x53,0x4a,0x6d,0x55,0x78,0x33, +0x62,0x4e,0x62,0x38,0x52,0x59,0x36,0x70,0x4b,0x7a,0x74,0x0a,0x5a,0x64,0x75,0x53, +0x61,0x53,0x2b,0x57,0x55,0x30,0x59,0x74,0x2b,0x6c,0x47,0x35,0x76,0x56,0x67,0x61, +0x70,0x48,0x45,0x71,0x36,0x79,0x71,0x4c,0x62,0x65,0x56,0x78,0x51,0x4c,0x75,0x62, +0x54,0x69,0x6e,0x4f,0x66,0x56,0x56,0x5a,0x58,0x79,0x45,0x43,0x59,0x47,0x4d,0x73, +0x59,0x71,0x65,0x6e,0x4a,0x6a,0x4e,0x63,0x62,0x49,0x5a,0x4e,0x0a,0x79,0x4d,0x75, +0x72,0x46,0x63,0x67,0x30,0x34,0x36,0x4f,0x34,0x59,0x79,0x68,0x56,0x79,0x71,0x53, +0x69,0x74,0x43,0x59,0x37,0x68,0x2f,0x65,0x71,0x67,0x6b,0x50,0x4a,0x51,0x30,0x68, +0x6b,0x70,0x39,0x45,0x64,0x51,0x77,0x62,0x6e,0x38,0x56,0x6c,0x66,0x78,0x64,0x42, +0x58,0x77,0x51,0x34,0x4e,0x48,0x4b,0x30,0x4a,0x56,0x46,0x2f,0x33,0x0a,0x71,0x48, +0x61,0x68,0x4e,0x48,0x4f,0x35,0x64,0x62,0x4a,0x5a,0x57,0x59,0x41,0x62,0x42,0x44, +0x70,0x32,0x51,0x45,0x53,0x70,0x76,0x6f,0x2b,0x38,0x33,0x6c,0x68,0x34,0x64,0x6e, +0x58,0x6a,0x46,0x58,0x4d,0x43,0x48,0x76,0x52,0x68,0x35,0x31,0x79,0x2f,0x54,0x71, +0x79,0x42,0x34,0x56,0x76,0x72,0x52,0x4b,0x49,0x4b,0x74,0x54,0x6f,0x7a,0x0a,0x5a, +0x6a,0x48,0x59,0x49,0x63,0x62,0x6a,0x76,0x53,0x58,0x4d,0x7a,0x61,0x44,0x50,0x6a, +0x50,0x63,0x5a,0x47,0x6a,0x42,0x4a,0x6c,0x47,0x36,0x43,0x76,0x44,0x34,0x4c,0x6d, +0x59,0x7a,0x72,0x6b,0x48,0x34,0x31,0x63,0x7a,0x72,0x34,0x57,0x41,0x3d,0x3d,0x0a, +0x2d,0x2d,0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x43,0x45,0x52,0x54,0x49,0x46,0x49, +0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a + }, + Key_bin = new byte[] + { +0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x50,0x52,0x49,0x56,0x41, +0x54,0x45,0x20,0x4b,0x45,0x59,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x45, +0x76,0x67,0x49,0x42,0x41,0x44,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47, +0x39,0x77,0x30,0x42,0x41,0x51,0x45,0x46,0x41,0x41,0x53,0x43,0x42,0x4b,0x67,0x77, +0x67,0x67,0x53,0x6b,0x41,0x67,0x45,0x41,0x41,0x6f,0x49,0x42,0x41,0x51,0x44,0x58, +0x45,0x63,0x76,0x72,0x59,0x37,0x56,0x2b,0x7a,0x64,0x42,0x79,0x0a,0x72,0x64,0x4e, +0x78,0x4a,0x59,0x45,0x6d,0x61,0x41,0x4e,0x59,0x55,0x4f,0x37,0x76,0x57,0x34,0x68, +0x64,0x41,0x35,0x49,0x42,0x49,0x46,0x6d,0x4d,0x70,0x6e,0x62,0x79,0x69,0x4e,0x6e, +0x5a,0x77,0x36,0x57,0x39,0x6f,0x61,0x67,0x78,0x33,0x5a,0x49,0x65,0x65,0x48,0x56, +0x59,0x62,0x52,0x69,0x4b,0x36,0x41,0x66,0x46,0x74,0x53,0x31,0x32,0x0a,0x2b,0x45, +0x31,0x4d,0x59,0x31,0x64,0x32,0x61,0x71,0x51,0x31,0x53,0x72,0x49,0x43,0x39,0x51, +0x35,0x55,0x6e,0x5a,0x61,0x42,0x72,0x62,0x57,0x32,0x32,0x6d,0x4e,0x75,0x6c,0x4d, +0x34,0x2f,0x6c,0x49,0x4a,0x72,0x48,0x70,0x51,0x55,0x68,0x50,0x78,0x6f,0x62,0x79, +0x34,0x2f,0x36,0x4e,0x41,0x37,0x71,0x4b,0x67,0x55,0x48,0x69,0x79,0x4f,0x0a,0x64, +0x33,0x4a,0x42,0x70,0x4f,0x66,0x77,0x38,0x54,0x76,0x53,0x74,0x51,0x78,0x34,0x4c, +0x38,0x59,0x64,0x4b,0x51,0x35,0x68,0x74,0x7a,0x6b,0x32,0x68,0x70,0x52,0x4a,0x4c, +0x30,0x6c,0x4b,0x67,0x47,0x31,0x57,0x34,0x75,0x4b,0x32,0x39,0x39,0x42,0x74,0x7a, +0x64,0x41,0x67,0x66,0x42,0x76,0x43,0x54,0x33,0x41,0x31,0x61,0x53,0x70,0x6a,0x0a, +0x49,0x47,0x74,0x6e,0x69,0x72,0x49,0x31,0x46,0x4c,0x52,0x58,0x47,0x79,0x38,0x31, +0x31,0x57,0x4a,0x39,0x4a,0x68,0x68,0x34,0x41,0x4b,0x4c,0x66,0x79,0x56,0x70,0x42, +0x4a,0x67,0x65,0x34,0x73,0x56,0x72,0x36,0x4e,0x75,0x75,0x49,0x66,0x32,0x71,0x47, +0x31,0x6f,0x79,0x31,0x30,0x70,0x61,0x51,0x4e,0x65,0x71,0x32,0x33,0x55,0x47,0x61, +0x0a,0x59,0x74,0x2f,0x7a,0x55,0x56,0x4a,0x77,0x55,0x74,0x30,0x57,0x45,0x6b,0x58, +0x38,0x48,0x4f,0x63,0x62,0x33,0x75,0x49,0x6f,0x54,0x6d,0x61,0x4f,0x34,0x72,0x48, +0x42,0x55,0x4a,0x71,0x45,0x79,0x39,0x51,0x58,0x7a,0x53,0x57,0x77,0x43,0x35,0x78, +0x45,0x43,0x64,0x37,0x43,0x4a,0x53,0x53,0x68,0x31,0x30,0x4f,0x75,0x6e,0x6c,0x75, +0x4c,0x0a,0x32,0x4d,0x47,0x65,0x5a,0x47,0x6e,0x76,0x41,0x67,0x4d,0x42,0x41,0x41, +0x45,0x43,0x67,0x67,0x45,0x41,0x54,0x77,0x34,0x52,0x6f,0x52,0x4c,0x6a,0x73,0x68, +0x72,0x42,0x56,0x6f,0x59,0x69,0x78,0x4f,0x4a,0x2b,0x57,0x4c,0x6d,0x2f,0x45,0x51, +0x57,0x65,0x37,0x6f,0x6a,0x38,0x31,0x51,0x50,0x73,0x39,0x56,0x45,0x49,0x32,0x62, +0x53,0x4f,0x0a,0x34,0x4a,0x51,0x42,0x55,0x42,0x53,0x6b,0x70,0x64,0x48,0x34,0x57, +0x32,0x77,0x51,0x75,0x2f,0x61,0x58,0x57,0x38,0x75,0x75,0x53,0x39,0x45,0x43,0x6d, +0x6d,0x41,0x41,0x75,0x45,0x79,0x4a,0x54,0x56,0x7a,0x75,0x31,0x32,0x35,0x58,0x73, +0x65,0x63,0x6c,0x44,0x41,0x55,0x38,0x49,0x55,0x70,0x54,0x2b,0x70,0x4c,0x35,0x79, +0x70,0x37,0x34,0x0a,0x45,0x62,0x76,0x4e,0x48,0x48,0x33,0x67,0x65,0x72,0x4f,0x67, +0x78,0x76,0x49,0x6a,0x50,0x64,0x67,0x77,0x62,0x66,0x6d,0x4d,0x49,0x59,0x48,0x62, +0x56,0x70,0x6e,0x49,0x30,0x77,0x32,0x42,0x43,0x44,0x51,0x76,0x74,0x64,0x64,0x57, +0x6f,0x42,0x74,0x41,0x33,0x43,0x54,0x6a,0x63,0x2f,0x43,0x56,0x67,0x73,0x47,0x77, +0x33,0x43,0x4e,0x72,0x0a,0x46,0x78,0x41,0x46,0x35,0x73,0x4a,0x34,0x63,0x5a,0x4c, +0x6e,0x5a,0x31,0x45,0x36,0x69,0x74,0x4c,0x54,0x50,0x69,0x6f,0x6a,0x74,0x76,0x48, +0x48,0x34,0x61,0x64,0x6d,0x68,0x68,0x43,0x61,0x42,0x49,0x78,0x76,0x47,0x2f,0x53, +0x6e,0x59,0x77,0x4e,0x35,0x38,0x37,0x55,0x5a,0x6d,0x37,0x4c,0x57,0x50,0x61,0x67, +0x4c,0x41,0x33,0x67,0x69,0x0a,0x48,0x4b,0x4f,0x2b,0x4b,0x79,0x42,0x51,0x39,0x33, +0x31,0x4e,0x4d,0x61,0x65,0x6a,0x36,0x6d,0x75,0x75,0x46,0x32,0x30,0x32,0x76,0x34, +0x37,0x6c,0x57,0x6b,0x64,0x50,0x4f,0x6e,0x52,0x43,0x69,0x6f,0x4d,0x58,0x30,0x63, +0x31,0x6a,0x36,0x76,0x32,0x61,0x59,0x34,0x34,0x77,0x55,0x4b,0x71,0x39,0x4d,0x52, +0x67,0x6f,0x52,0x76,0x4a,0x37,0x0a,0x41,0x39,0x77,0x65,0x72,0x4c,0x6b,0x68,0x35, +0x78,0x78,0x35,0x35,0x32,0x4f,0x74,0x71,0x50,0x36,0x73,0x61,0x6d,0x75,0x47,0x44, +0x52,0x78,0x31,0x42,0x70,0x36,0x53,0x4f,0x70,0x68,0x43,0x45,0x50,0x48,0x59,0x67, +0x51,0x4b,0x42,0x67,0x51,0x44,0x36,0x33,0x65,0x2b,0x52,0x75,0x6c,0x36,0x46,0x78, +0x47,0x43,0x76,0x67,0x70,0x6b,0x33,0x0a,0x57,0x67,0x2f,0x54,0x31,0x77,0x2f,0x59, +0x4b,0x6b,0x79,0x4f,0x49,0x46,0x4c,0x63,0x46,0x4c,0x57,0x71,0x42,0x44,0x71,0x6c, +0x6e,0x58,0x65,0x63,0x6c,0x6b,0x50,0x4b,0x6a,0x57,0x4e,0x2f,0x32,0x70,0x4a,0x6d, +0x4f,0x31,0x63,0x46,0x63,0x44,0x4a,0x46,0x59,0x64,0x32,0x45,0x49,0x45,0x72,0x76, +0x42,0x57,0x54,0x34,0x51,0x39,0x4d,0x42,0x0a,0x4e,0x35,0x6c,0x44,0x6b,0x47,0x75, +0x6a,0x34,0x2f,0x6b,0x68,0x56,0x6c,0x79,0x6e,0x77,0x62,0x64,0x42,0x6e,0x47,0x43, +0x34,0x61,0x34,0x48,0x4a,0x49,0x4a,0x76,0x61,0x35,0x63,0x70,0x49,0x63,0x57,0x65, +0x4a,0x72,0x35,0x61,0x57,0x33,0x69,0x44,0x36,0x68,0x53,0x73,0x61,0x6c,0x79,0x55, +0x76,0x4a,0x4d,0x6d,0x64,0x4d,0x42,0x6e,0x47,0x0a,0x37,0x2b,0x50,0x65,0x53,0x2b, +0x4e,0x73,0x4b,0x30,0x61,0x63,0x31,0x67,0x33,0x4d,0x6c,0x56,0x35,0x42,0x41,0x32, +0x70,0x55,0x54,0x77,0x4b,0x42,0x67,0x51,0x44,0x62,0x65,0x46,0x6d,0x2b,0x46,0x46, +0x35,0x62,0x76,0x6f,0x4b,0x7a,0x49,0x4c,0x6c,0x31,0x62,0x79,0x6b,0x6c,0x52,0x6b, +0x69,0x76,0x7a,0x6b,0x62,0x7a,0x49,0x6b,0x41,0x78,0x0a,0x35,0x56,0x6b,0x74,0x67, +0x36,0x4a,0x35,0x63,0x76,0x38,0x44,0x35,0x2b,0x72,0x71,0x50,0x75,0x6a,0x4f,0x66, +0x39,0x67,0x42,0x6a,0x4e,0x37,0x70,0x64,0x78,0x39,0x39,0x35,0x6b,0x47,0x49,0x78, +0x5a,0x39,0x6d,0x31,0x68,0x57,0x69,0x78,0x55,0x55,0x31,0x55,0x6f,0x38,0x72,0x70, +0x39,0x4a,0x69,0x47,0x4f,0x36,0x72,0x65,0x31,0x77,0x69,0x0a,0x6a,0x56,0x2f,0x4c, +0x31,0x64,0x37,0x55,0x66,0x39,0x48,0x6a,0x65,0x61,0x70,0x4f,0x46,0x62,0x34,0x6b, +0x72,0x71,0x52,0x58,0x54,0x65,0x75,0x4d,0x6e,0x35,0x35,0x44,0x33,0x64,0x70,0x79, +0x6a,0x51,0x4e,0x43,0x30,0x5a,0x50,0x72,0x61,0x6d,0x58,0x64,0x38,0x31,0x57,0x6f, +0x6f,0x56,0x77,0x58,0x59,0x41,0x66,0x69,0x46,0x76,0x4c,0x49,0x0a,0x6f,0x66,0x31, +0x37,0x51,0x67,0x67,0x49,0x59,0x51,0x4b,0x42,0x67,0x51,0x44,0x59,0x55,0x67,0x67, +0x43,0x34,0x58,0x49,0x67,0x5a,0x76,0x58,0x34,0x59,0x65,0x55,0x38,0x6c,0x61,0x79, +0x51,0x50,0x79,0x4b,0x71,0x67,0x38,0x37,0x2f,0x76,0x31,0x2b,0x7a,0x35,0x79,0x65, +0x2f,0x4d,0x32,0x5a,0x65,0x36,0x53,0x6e,0x37,0x48,0x4a,0x66,0x59,0x0a,0x55,0x5a, +0x4d,0x36,0x37,0x48,0x37,0x52,0x4b,0x4e,0x6f,0x68,0x46,0x6c,0x35,0x43,0x39,0x65, +0x44,0x4e,0x7a,0x67,0x72,0x50,0x6b,0x52,0x63,0x2f,0x2f,0x54,0x77,0x32,0x45,0x48, +0x74,0x59,0x68,0x33,0x42,0x4b,0x49,0x6f,0x72,0x77,0x39,0x45,0x64,0x78,0x59,0x4e, +0x6c,0x6b,0x2b,0x6a,0x4e,0x73,0x30,0x30,0x64,0x57,0x35,0x34,0x64,0x39,0x0a,0x65, +0x69,0x69,0x7a,0x7a,0x78,0x59,0x34,0x34,0x2f,0x41,0x32,0x70,0x39,0x52,0x49,0x4d, +0x67,0x79,0x35,0x49,0x52,0x77,0x76,0x53,0x73,0x6d,0x50,0x67,0x61,0x71,0x34,0x6f, +0x4b,0x4d,0x64,0x54,0x4e,0x4d,0x4f,0x73,0x30,0x4a,0x77,0x65,0x79,0x50,0x72,0x42, +0x65,0x49,0x41,0x72,0x62,0x46,0x43,0x67,0x51,0x4b,0x42,0x67,0x51,0x43,0x71,0x0a, +0x57,0x30,0x34,0x56,0x33,0x49,0x75,0x74,0x33,0x55,0x42,0x6f,0x75,0x50,0x4d,0x63, +0x63,0x38,0x2f,0x56,0x62,0x69,0x77,0x48,0x77,0x79,0x2b,0x52,0x6c,0x4c,0x6d,0x4e, +0x77,0x59,0x41,0x71,0x63,0x79,0x35,0x50,0x35,0x58,0x4b,0x4c,0x33,0x70,0x36,0x62, +0x65,0x33,0x2b,0x4d,0x6f,0x76,0x48,0x52,0x71,0x6a,0x35,0x78,0x72,0x4a,0x54,0x57, +0x0a,0x54,0x6a,0x2f,0x36,0x59,0x61,0x51,0x73,0x31,0x2b,0x72,0x74,0x63,0x51,0x45, +0x61,0x74,0x64,0x34,0x4b,0x50,0x66,0x64,0x78,0x53,0x2f,0x63,0x66,0x52,0x74,0x38, +0x71,0x74,0x75,0x42,0x77,0x51,0x61,0x2f,0x34,0x39,0x4d,0x72,0x41,0x4c,0x76,0x57, +0x43,0x4c,0x53,0x42,0x75,0x4b,0x74,0x33,0x49,0x49,0x75,0x53,0x2f,0x51,0x44,0x74, +0x43,0x0a,0x5a,0x4e,0x67,0x6d,0x36,0x4d,0x78,0x71,0x4e,0x6e,0x49,0x43,0x58,0x35, +0x46,0x34,0x36,0x6d,0x52,0x49,0x52,0x42,0x42,0x4f,0x32,0x4b,0x7a,0x6c,0x30,0x33, +0x68,0x62,0x51,0x6c,0x71,0x58,0x4c,0x5a,0x63,0x38,0x6f,0x51,0x4b,0x42,0x67,0x43, +0x53,0x77,0x66,0x46,0x7a,0x68,0x48,0x76,0x78,0x36,0x68,0x69,0x64,0x57,0x67,0x48, +0x4a,0x63,0x0a,0x77,0x79,0x76,0x64,0x6e,0x70,0x58,0x78,0x36,0x5a,0x4c,0x6e,0x6f, +0x61,0x7a,0x61,0x6f,0x48,0x47,0x74,0x4d,0x47,0x43,0x45,0x5a,0x49,0x50,0x66,0x6a, +0x4c,0x42,0x63,0x30,0x4d,0x74,0x79,0x45,0x64,0x53,0x4c,0x78,0x54,0x6c,0x35,0x59, +0x70,0x78,0x6f,0x6d,0x43,0x46,0x55,0x4d,0x33,0x55,0x63,0x59,0x4e,0x2f,0x50,0x5a, +0x66,0x58,0x41,0x0a,0x6d,0x36,0x31,0x45,0x6d,0x71,0x53,0x53,0x4d,0x56,0x63,0x47, +0x50,0x67,0x65,0x2f,0x43,0x34,0x44,0x42,0x5a,0x59,0x6a,0x53,0x45,0x71,0x62,0x67, +0x37,0x6d,0x73,0x52,0x30,0x33,0x37,0x42,0x58,0x54,0x48,0x6b,0x78,0x44,0x62,0x33, +0x71,0x48,0x46,0x54,0x6f,0x30,0x6b,0x48,0x57,0x4a,0x66,0x34,0x39,0x59,0x77,0x32, +0x73,0x77,0x6a,0x54,0x0a,0x72,0x4f,0x38,0x46,0x46,0x44,0x52,0x56,0x50,0x44,0x4c, +0x5a,0x61,0x37,0x36,0x47,0x67,0x79,0x41,0x55,0x4a,0x38,0x55,0x63,0x0a,0x2d,0x2d, +0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x50,0x52,0x49,0x56,0x41,0x54,0x45,0x20,0x4b, +0x45,0x59,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a + }, + }; + + VpnRpcKeyPair out_rpc_key_pair = api.SetServerCert(in_rpc_key_pair); + + print_object(out_rpc_key_pair); + + Console.WriteLine("End: Test_SetServerCert"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerCert', Get the server certification + /// + public void Test_GetServerCert() + { + Console.WriteLine("Begin: Test_GetServerCert"); + + VpnRpcKeyPair out_rpc_key_pair = api.GetServerCert(); + + print_object(out_rpc_key_pair); + + Console.WriteLine("End: Test_GetServerCert"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetServerCipher', Get cipher for SSL + /// + public void Test_GetServerCipher() + { + Console.WriteLine("Begin: Test_GetServerCipher"); + + VpnRpcStr out_rpc_str = api.GetServerCipher(); + + print_object(out_rpc_str); + + Console.WriteLine("End: Test_GetServerCipher"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetServerCipher', Set cipher for SSL to the server + /// + public void Test_SetServerCipher() + { + Console.WriteLine("Begin: Test_SetServerCipher"); + + VpnRpcStr in_rpc_str = new VpnRpcStr() { String_str = "RC4-MD5" }; + VpnRpcStr out_rpc_str = api.SetServerCipher(in_rpc_str); + + print_object(out_rpc_str); + + Console.WriteLine("End: Test_SetServerCipher"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateHub', Create a hub + /// + public string Test_CreateHub() + { + string hub_name = "Test_" + rand.Next(100000, 999999); + Console.WriteLine("Begin: Test_CreateHub"); + + VpnRpcCreateHub in_rpc_create_hub = new VpnRpcCreateHub() + { + HubName_str = hub_name, + HubType_u32 = VpnRpcHubType.Standalone, + Online_bool = true, + AdminPasswordPlainText_str = "microsoft", + MaxSession_u32 = 123, + NoEnum_bool = false, + }; + + VpnRpcCreateHub out_rpc_create_hub = api.CreateHub(in_rpc_create_hub); + + print_object(out_rpc_create_hub); + + Console.WriteLine("End: Test_CreateHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return hub_name; + } + + /// + /// API test for 'SetHub', Set hub configuration + /// + public void Test_SetHub() + { + Console.WriteLine("Begin: Test_SetHub"); + + VpnRpcCreateHub in_rpc_create_hub = new VpnRpcCreateHub() + { + HubName_str = hub_name, + AdminPasswordPlainText_str = "aho", + HubType_u32 = VpnRpcHubType.Standalone, + NoEnum_bool = false, + MaxSession_u32 = 128, + Online_bool = true, + }; + + VpnRpcCreateHub out_rpc_create_hub = api.SetHub(in_rpc_create_hub); + + print_object(out_rpc_create_hub); + + Console.WriteLine("End: Test_SetHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHub', Get hub configuration + /// + public void Test_GetHub() + { + Console.WriteLine("Begin: Test_GetHub"); + + VpnRpcCreateHub in_rpc_create_hub = new VpnRpcCreateHub() + { + HubName_str = hub_name, + }; + + VpnRpcCreateHub out_rpc_create_hub = api.GetHub(in_rpc_create_hub); + + print_object(out_rpc_create_hub); + + Console.WriteLine("End: Test_GetHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumHub', Enumerate hubs + /// + public void Test_EnumHub() + { + Console.WriteLine("Begin: Test_EnumHub"); + + VpnRpcEnumHub out_rpc_enum_hub = api.EnumHub(); + + print_object(out_rpc_enum_hub); + + Console.WriteLine("End: Test_EnumHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteHub', Delete a hub + /// + public void Test_DeleteHub() + { + Console.WriteLine("Begin: Test_DeleteHub"); + + VpnRpcDeleteHub in_rpc_delete_hub = new VpnRpcDeleteHub() + { + HubName_str = hub_name, + }; + VpnRpcDeleteHub out_rpc_delete_hub = api.DeleteHub(in_rpc_delete_hub); + + print_object(out_rpc_delete_hub); + + Console.WriteLine("End: Test_DeleteHub"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubRadius', Get Radius options of the hub + /// + public void Test_GetHubRadius() + { + Console.WriteLine("Begin: Test_GetHubRadius"); + + VpnRpcRadius in_rpc_radius = new VpnRpcRadius() + { + HubName_str = hub_name, + }; + VpnRpcRadius out_rpc_radius = api.GetHubRadius(in_rpc_radius); + + print_object(out_rpc_radius); + + Console.WriteLine("End: Test_GetHubRadius"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubRadius', Set Radius options of the hub + /// + public void Test_SetHubRadius() + { + Console.WriteLine("Begin: Test_SetHubRadius"); + + VpnRpcRadius in_rpc_radius = new VpnRpcRadius() + { + HubName_str = hub_name, + RadiusServerName_str = "1.2.3.4", + RadiusPort_u32 = 1234, + RadiusSecret_str = "microsoft", + RadiusRetryInterval_u32 = 1000, + }; + VpnRpcRadius out_rpc_radius = api.SetHubRadius(in_rpc_radius); + + print_object(out_rpc_radius); + + Console.WriteLine("End: Test_SetHubRadius"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumConnection', Enumerate connections + /// + public VpnRpcEnumConnection Test_EnumConnection() + { + Console.WriteLine("Begin: Test_EnumConnection"); + + VpnRpcEnumConnection out_rpc_enum_connection = api.EnumConnection(); + + print_object(out_rpc_enum_connection); + + Console.WriteLine("End: Test_EnumConnection"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_connection; + } + + /// + /// API test for 'DisconnectConnection', Disconnect a connection + /// + public void Test_DisconnectConnection(string connection_id) + { + Console.WriteLine("Begin: Test_DisconnectConnection"); + + VpnRpcDisconnectConnection in_rpc_disconnect_connection = new VpnRpcDisconnectConnection() + { + Name_str = connection_id, + }; + VpnRpcDisconnectConnection out_rpc_disconnect_connection = api.DisconnectConnection(in_rpc_disconnect_connection); + + print_object(out_rpc_disconnect_connection); + + Console.WriteLine("End: Test_DisconnectConnection"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetConnectionInfo', Get connection information + /// + public void Test_GetConnectionInfo(string name) + { + Console.WriteLine("Begin: Test_GetConnectionInfo"); + + VpnRpcConnectionInfo in_rpc_connection_info = new VpnRpcConnectionInfo() + { + Name_str = name, + }; + VpnRpcConnectionInfo out_rpc_connection_info = api.GetConnectionInfo(in_rpc_connection_info); + + print_object(out_rpc_connection_info); + + Console.WriteLine("End: Test_GetConnectionInfo"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubOnline', Make a hub on-line or off-line + /// + public void Test_SetHubOnline() + { + Console.WriteLine("Begin: Test_SetHubOnline"); + + VpnRpcSetHubOnline in_rpc_set_hub_online = new VpnRpcSetHubOnline() + { + HubName_str = hub_name, + Online_bool = true, + }; + VpnRpcSetHubOnline out_rpc_set_hub_online = api.SetHubOnline(in_rpc_set_hub_online); + + print_object(out_rpc_set_hub_online); + + Console.WriteLine("End: Test_SetHubOnline"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubStatus', Get hub status + /// + public void Test_GetHubStatus() + { + Console.WriteLine("Begin: Test_GetHubStatus"); + + VpnRpcHubStatus in_rpc_hub_status = new VpnRpcHubStatus() + { + HubName_str = hub_name, + }; + VpnRpcHubStatus out_rpc_hub_status = api.GetHubStatus(in_rpc_hub_status); + + print_object(out_rpc_hub_status); + + Console.WriteLine("End: Test_GetHubStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubLog', Set logging configuration into the hub + /// + public void Test_SetHubLog(VpnRpcHubLog in_rpc_hub_log) + { + Console.WriteLine("Begin: Test_SetHubLog"); + + VpnRpcHubLog out_rpc_hub_log = api.SetHubLog(in_rpc_hub_log); + + print_object(out_rpc_hub_log); + + Console.WriteLine("End: Test_SetHubLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubLog', Get logging configuration of the hub + /// + public VpnRpcHubLog Test_GetHubLog() + { + Console.WriteLine("Begin: Test_GetHubLog"); + + VpnRpcHubLog in_rpc_hub_log = new VpnRpcHubLog() + { + HubName_str = hub_name, + }; + VpnRpcHubLog out_rpc_hub_log = api.GetHubLog(in_rpc_hub_log); + + print_object(out_rpc_hub_log); + + Console.WriteLine("End: Test_GetHubLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_hub_log; + } + + /// + /// API test for 'AddCa', Add CA(Certificate Authority) into the hub + /// + public void Test_AddCa() + { + Console.WriteLine("Begin: Test_AddCa"); + + VpnRpcHubAddCA in_rpc_hub_add_ca = new VpnRpcHubAddCA() + { + HubName_str = hub_name, + Cert_bin = new byte[] + { +0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x43,0x45,0x52,0x54,0x49, +0x46,0x49,0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x44, +0x72,0x6a,0x43,0x43,0x41,0x70,0x61,0x67,0x41,0x77,0x49,0x42,0x41,0x67,0x49,0x42, +0x41,0x44,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42, +0x41,0x51,0x73,0x46,0x41,0x44,0x42,0x57,0x4d,0x51,0x77,0x77,0x43,0x67,0x59,0x44, +0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x0a,0x46,0x54,0x41, +0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72,0x2b,0x4f, +0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x4d,0x41,0x6b, +0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78,0x45,0x44,0x41, +0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69,0x0a,0x59,0x58, +0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41, +0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77,0x48,0x68, +0x63,0x4e,0x4d,0x54,0x67,0x78,0x4d,0x44,0x45,0x78,0x4d,0x6a,0x4d,0x7a,0x4e,0x54, +0x41,0x78,0x57,0x68,0x63,0x4e,0x4e,0x44,0x49,0x78,0x4d,0x44,0x41,0x31,0x0a,0x4d, +0x6a,0x4d,0x7a,0x4e,0x54,0x41,0x78,0x57,0x6a,0x42,0x57,0x4d,0x51,0x77,0x77,0x43, +0x67,0x59,0x44,0x56,0x51,0x51,0x44,0x44,0x41,0x4e,0x68,0x59,0x57,0x45,0x78,0x46, +0x54,0x41,0x54,0x42,0x67,0x4e,0x56,0x42,0x41,0x6f,0x4d,0x44,0x4f,0x4f,0x42,0x72, +0x2b,0x4f,0x42,0x71,0x75,0x4f,0x42,0x6a,0x2b,0x4f,0x42,0x6e,0x54,0x45,0x4c,0x0a, +0x4d,0x41,0x6b,0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x53,0x6c,0x41,0x78, +0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x42,0x30,0x6c,0x69, +0x59,0x58,0x4a,0x68,0x61,0x32,0x6b,0x78,0x45,0x44,0x41,0x4f,0x42,0x67,0x4e,0x56, +0x42,0x41,0x63,0x4d,0x42,0x31,0x52,0x7a,0x64,0x57,0x74,0x31,0x59,0x6d,0x45,0x77, +0x0a,0x67,0x67,0x45,0x69,0x4d,0x41,0x30,0x47,0x43,0x53,0x71,0x47,0x53,0x49,0x62, +0x33,0x44,0x51,0x45,0x42,0x41,0x51,0x55,0x41,0x41,0x34,0x49,0x42,0x44,0x77,0x41, +0x77,0x67,0x67,0x45,0x4b,0x41,0x6f,0x49,0x42,0x41,0x51,0x44,0x58,0x45,0x63,0x76, +0x72,0x59,0x37,0x56,0x2b,0x7a,0x64,0x42,0x79,0x72,0x64,0x4e,0x78,0x4a,0x59,0x45, +0x6d,0x0a,0x61,0x41,0x4e,0x59,0x55,0x4f,0x37,0x76,0x57,0x34,0x68,0x64,0x41,0x35, +0x49,0x42,0x49,0x46,0x6d,0x4d,0x70,0x6e,0x62,0x79,0x69,0x4e,0x6e,0x5a,0x77,0x36, +0x57,0x39,0x6f,0x61,0x67,0x78,0x33,0x5a,0x49,0x65,0x65,0x48,0x56,0x59,0x62,0x52, +0x69,0x4b,0x36,0x41,0x66,0x46,0x74,0x53,0x31,0x32,0x2b,0x45,0x31,0x4d,0x59,0x31, +0x64,0x32,0x0a,0x61,0x71,0x51,0x31,0x53,0x72,0x49,0x43,0x39,0x51,0x35,0x55,0x6e, +0x5a,0x61,0x42,0x72,0x62,0x57,0x32,0x32,0x6d,0x4e,0x75,0x6c,0x4d,0x34,0x2f,0x6c, +0x49,0x4a,0x72,0x48,0x70,0x51,0x55,0x68,0x50,0x78,0x6f,0x62,0x79,0x34,0x2f,0x36, +0x4e,0x41,0x37,0x71,0x4b,0x67,0x55,0x48,0x69,0x79,0x4f,0x64,0x33,0x4a,0x42,0x70, +0x4f,0x66,0x77,0x0a,0x38,0x54,0x76,0x53,0x74,0x51,0x78,0x34,0x4c,0x38,0x59,0x64, +0x4b,0x51,0x35,0x68,0x74,0x7a,0x6b,0x32,0x68,0x70,0x52,0x4a,0x4c,0x30,0x6c,0x4b, +0x67,0x47,0x31,0x57,0x34,0x75,0x4b,0x32,0x39,0x39,0x42,0x74,0x7a,0x64,0x41,0x67, +0x66,0x42,0x76,0x43,0x54,0x33,0x41,0x31,0x61,0x53,0x70,0x6a,0x49,0x47,0x74,0x6e, +0x69,0x72,0x49,0x31,0x0a,0x46,0x4c,0x52,0x58,0x47,0x79,0x38,0x31,0x31,0x57,0x4a, +0x39,0x4a,0x68,0x68,0x34,0x41,0x4b,0x4c,0x66,0x79,0x56,0x70,0x42,0x4a,0x67,0x65, +0x34,0x73,0x56,0x72,0x36,0x4e,0x75,0x75,0x49,0x66,0x32,0x71,0x47,0x31,0x6f,0x79, +0x31,0x30,0x70,0x61,0x51,0x4e,0x65,0x71,0x32,0x33,0x55,0x47,0x61,0x59,0x74,0x2f, +0x7a,0x55,0x56,0x4a,0x77,0x0a,0x55,0x74,0x30,0x57,0x45,0x6b,0x58,0x38,0x48,0x4f, +0x63,0x62,0x33,0x75,0x49,0x6f,0x54,0x6d,0x61,0x4f,0x34,0x72,0x48,0x42,0x55,0x4a, +0x71,0x45,0x79,0x39,0x51,0x58,0x7a,0x53,0x57,0x77,0x43,0x35,0x78,0x45,0x43,0x64, +0x37,0x43,0x4a,0x53,0x53,0x68,0x31,0x30,0x4f,0x75,0x6e,0x6c,0x75,0x4c,0x32,0x4d, +0x47,0x65,0x5a,0x47,0x6e,0x76,0x0a,0x41,0x67,0x4d,0x42,0x41,0x41,0x47,0x6a,0x67, +0x59,0x59,0x77,0x67,0x59,0x4d,0x77,0x44,0x77,0x59,0x44,0x56,0x52,0x30,0x54,0x41, +0x51,0x48,0x2f,0x42,0x41,0x55,0x77,0x41,0x77,0x45,0x42,0x2f,0x7a,0x41,0x4c,0x42, +0x67,0x4e,0x56,0x48,0x51,0x38,0x45,0x42,0x41,0x4d,0x43,0x41,0x66,0x59,0x77,0x59, +0x77,0x59,0x44,0x56,0x52,0x30,0x6c,0x0a,0x42,0x46,0x77,0x77,0x57,0x67,0x59,0x49, +0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x45,0x47,0x43,0x43,0x73,0x47, +0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x43,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46, +0x42,0x51,0x63,0x44,0x41,0x77,0x59,0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48, +0x41,0x77,0x51,0x47,0x43,0x43,0x73,0x47,0x0a,0x41,0x51,0x55,0x46,0x42,0x77,0x4d, +0x46,0x42,0x67,0x67,0x72,0x42,0x67,0x45,0x46,0x42,0x51,0x63,0x44,0x42,0x67,0x59, +0x49,0x4b,0x77,0x59,0x42,0x42,0x51,0x55,0x48,0x41,0x77,0x63,0x47,0x43,0x43,0x73, +0x47,0x41,0x51,0x55,0x46,0x42,0x77,0x4d,0x49,0x42,0x67,0x67,0x72,0x42,0x67,0x45, +0x46,0x42,0x51,0x63,0x44,0x43,0x54,0x41,0x4e,0x0a,0x42,0x67,0x6b,0x71,0x68,0x6b, +0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x73,0x46,0x41,0x41,0x4f,0x43,0x41,0x51, +0x45,0x41,0x46,0x6d,0x34,0x37,0x47,0x55,0x70,0x50,0x57,0x35,0x2b,0x37,0x69,0x46, +0x74,0x69,0x6c,0x6f,0x6b,0x35,0x32,0x49,0x6f,0x54,0x57,0x72,0x74,0x46,0x67,0x32, +0x79,0x69,0x36,0x6b,0x49,0x32,0x69,0x52,0x4e,0x51,0x0a,0x4b,0x75,0x67,0x48,0x55, +0x49,0x4f,0x34,0x4b,0x53,0x71,0x4a,0x56,0x42,0x50,0x38,0x61,0x4b,0x4f,0x61,0x54, +0x5a,0x47,0x45,0x31,0x4b,0x4d,0x68,0x2f,0x59,0x6a,0x68,0x36,0x71,0x2f,0x67,0x50, +0x61,0x6c,0x67,0x64,0x2f,0x38,0x44,0x6d,0x72,0x78,0x53,0x4a,0x6d,0x55,0x78,0x33, +0x62,0x4e,0x62,0x38,0x52,0x59,0x36,0x70,0x4b,0x7a,0x74,0x0a,0x5a,0x64,0x75,0x53, +0x61,0x53,0x2b,0x57,0x55,0x30,0x59,0x74,0x2b,0x6c,0x47,0x35,0x76,0x56,0x67,0x61, +0x70,0x48,0x45,0x71,0x36,0x79,0x71,0x4c,0x62,0x65,0x56,0x78,0x51,0x4c,0x75,0x62, +0x54,0x69,0x6e,0x4f,0x66,0x56,0x56,0x5a,0x58,0x79,0x45,0x43,0x59,0x47,0x4d,0x73, +0x59,0x71,0x65,0x6e,0x4a,0x6a,0x4e,0x63,0x62,0x49,0x5a,0x4e,0x0a,0x79,0x4d,0x75, +0x72,0x46,0x63,0x67,0x30,0x34,0x36,0x4f,0x34,0x59,0x79,0x68,0x56,0x79,0x71,0x53, +0x69,0x74,0x43,0x59,0x37,0x68,0x2f,0x65,0x71,0x67,0x6b,0x50,0x4a,0x51,0x30,0x68, +0x6b,0x70,0x39,0x45,0x64,0x51,0x77,0x62,0x6e,0x38,0x56,0x6c,0x66,0x78,0x64,0x42, +0x58,0x77,0x51,0x34,0x4e,0x48,0x4b,0x30,0x4a,0x56,0x46,0x2f,0x33,0x0a,0x71,0x48, +0x61,0x68,0x4e,0x48,0x4f,0x35,0x64,0x62,0x4a,0x5a,0x57,0x59,0x41,0x62,0x42,0x44, +0x70,0x32,0x51,0x45,0x53,0x70,0x76,0x6f,0x2b,0x38,0x33,0x6c,0x68,0x34,0x64,0x6e, +0x58,0x6a,0x46,0x58,0x4d,0x43,0x48,0x76,0x52,0x68,0x35,0x31,0x79,0x2f,0x54,0x71, +0x79,0x42,0x34,0x56,0x76,0x72,0x52,0x4b,0x49,0x4b,0x74,0x54,0x6f,0x7a,0x0a,0x5a, +0x6a,0x48,0x59,0x49,0x63,0x62,0x6a,0x76,0x53,0x58,0x4d,0x7a,0x61,0x44,0x50,0x6a, +0x50,0x63,0x5a,0x47,0x6a,0x42,0x4a,0x6c,0x47,0x36,0x43,0x76,0x44,0x34,0x4c,0x6d, +0x59,0x7a,0x72,0x6b,0x48,0x34,0x31,0x63,0x7a,0x72,0x34,0x57,0x41,0x3d,0x3d,0x0a, +0x2d,0x2d,0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x43,0x45,0x52,0x54,0x49,0x46,0x49, +0x43,0x41,0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a + }, + }; + VpnRpcHubAddCA out_rpc_hub_add_ca = api.AddCa(in_rpc_hub_add_ca); + + print_object(out_rpc_hub_add_ca); + + Console.WriteLine("End: Test_AddCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumCa', Enumerate CA(Certificate Authority) in the hub + /// + public VpnRpcHubEnumCA Test_EnumCa() + { + Console.WriteLine("Begin: Test_EnumCa"); + + VpnRpcHubEnumCA in_rpc_hub_enum_ca = new VpnRpcHubEnumCA() + { + HubName_str = hub_name, + }; + VpnRpcHubEnumCA out_rpc_hub_enum_ca = api.EnumCa(in_rpc_hub_enum_ca); + + print_object(out_rpc_hub_enum_ca); + + Console.WriteLine("End: Test_EnumCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_hub_enum_ca; + } + + /// + /// API test for 'GetCa', Get CA(Certificate Authority) setting from the hub + /// + public void Test_GetCa(uint key) + { + Console.WriteLine("Begin: Test_GetCa"); + + VpnRpcHubGetCA in_rpc_hub_get_ca = new VpnRpcHubGetCA() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcHubGetCA out_rpc_hub_get_ca = api.GetCa(in_rpc_hub_get_ca); + + print_object(out_rpc_hub_get_ca); + + Console.WriteLine("End: Test_GetCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteCa', Delete a CA(Certificate Authority) setting from the hub + /// + public void Test_DeleteCa(uint key) + { + Console.WriteLine("Begin: Test_DeleteCa"); + + VpnRpcHubDeleteCA in_rpc_hub_delete_ca = new VpnRpcHubDeleteCA() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcHubDeleteCA out_rpc_hub_delete_ca = api.DeleteCa(in_rpc_hub_delete_ca); + + print_object(out_rpc_hub_delete_ca); + + Console.WriteLine("End: Test_DeleteCa"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetLinkOnline', Make a link into on-line + /// + public void Test_SetLinkOnline() + { + Console.WriteLine("Begin: Test_SetLinkOnline"); + + VpnRpcLink in_rpc_link = new VpnRpcLink() + { + HubName_str = hub_name, + AccountName_utf = "linktest", + }; + VpnRpcLink out_rpc_link = api.SetLinkOnline(in_rpc_link); + + print_object(out_rpc_link); + + Console.WriteLine("End: Test_SetLinkOnline"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetLinkOffline', Make a link into off-line + /// + public void Test_SetLinkOffline() + { + Console.WriteLine("Begin: Test_SetLinkOffline"); + + VpnRpcLink in_rpc_link = new VpnRpcLink() + { + HubName_str = hub_name, + AccountName_utf = "linktest", + }; + VpnRpcLink out_rpc_link = api.SetLinkOffline(in_rpc_link); + + print_object(out_rpc_link); + + Console.WriteLine("End: Test_SetLinkOffline"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteLink', Delete a link + /// + public void Test_DeleteLink() + { + Console.WriteLine("Begin: Test_DeleteLink"); + + VpnRpcLink in_rpc_link = new VpnRpcLink() + { + HubName_str = hub_name, + AccountName_utf = "linktest2", + }; + VpnRpcLink out_rpc_link = api.DeleteLink(in_rpc_link); + + print_object(out_rpc_link); + + Console.WriteLine("End: Test_DeleteLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'RenameLink', Rename link (cascade connection) + /// + public void Test_RenameLink() + { + Console.WriteLine("Begin: Test_RenameLink"); + + VpnRpcRenameLink in_rpc_rename_link = new VpnRpcRenameLink() + { + HubName_str = hub_name, + OldAccountName_utf = "linktest", + NewAccountName_utf = "linktest2", + }; + VpnRpcRenameLink out_rpc_rename_link = api.RenameLink(in_rpc_rename_link); + + print_object(out_rpc_rename_link); + + Console.WriteLine("End: Test_RenameLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateLink', Create a new link(cascade) + /// + public void Test_CreateLink() + { + Console.WriteLine("Begin: Test_CreateLink"); + + VpnRpcCreateLink in_rpc_create_link = new VpnRpcCreateLink() + { + HubName_Ex_str = hub_name, + CheckServerCert_bool = false, + + ClientOption_AccountName_utf = "linktest", + ClientOption_Hostname_str = "1.2.3.4", + ClientOption_Port_u32 = 443, + ClientOption_ProxyType_u32 = 0, + ClientOption_HubName_str = "ABC", + ClientOption_MaxConnection_u32 = 16, + ClientOption_UseEncrypt_bool = true, + ClientOption_UseCompress_bool = false, + ClientOption_HalfConnection_bool = true, + ClientOption_AdditionalConnectionInterval_u32 = 2, + ClientOption_ConnectionDisconnectSpan_u32 = 24, + + ClientAuth_AuthType_u32 = VpnRpcClientAuthType.PlainPassword, + ClientAuth_Username_str = "181012", + ClientAuth_PlainPassword_str = "microsoft", + ClientAuth_HashedPassword_bin = new byte[0] { }, + ClientAuth_ClientX_bin = new byte[0] { }, + ClientAuth_ClientK_bin = new byte[0] { }, + + SecPol_DHCPFilter_bool = true, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = true, + SecPol_CheckMac_bool = true, + SecPol_CheckIP_bool = true, + SecPol_ArpDhcpOnly_bool = true, + SecPol_PrivacyFilter_bool = true, + SecPol_NoServer_bool = true, + SecPol_NoBroadcastLimiter_bool = true, + SecPol_MaxMac_u32 = 32, + SecPol_MaxIP_u32 = 64, + SecPol_MaxUpload_u32 = 960000, + SecPol_MaxDownload_u32 = 1280000, + SecPol_RSandRAFilter_bool = true, + SecPol_RAFilter_bool = true, + SecPol_DHCPv6Filter_bool = true, + SecPol_DHCPv6NoServer_bool = true, + SecPol_CheckIPv6_bool = true, + SecPol_NoServerV6_bool = true, + SecPol_MaxIPv6_u32 = 127, + SecPol_FilterIPv4_bool = true, + SecPol_FilterIPv6_bool = true, + SecPol_FilterNonIP_bool = true, + SecPol_NoIPv6DefaultRouterInRA_bool = true, + SecPol_VLanId_u32 = 123, + SecPol_Ver3_bool = true, + }; + VpnRpcCreateLink out_rpc_create_link = api.CreateLink(in_rpc_create_link); + + print_object(out_rpc_create_link); + + Console.WriteLine("End: Test_CreateLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetLink', Get link configuration + /// + public void Test_GetLink() + { + Console.WriteLine("Begin: Test_GetLink"); + + VpnRpcCreateLink in_rpc_create_link = new VpnRpcCreateLink() + { + HubName_Ex_str = hub_name, + ClientOption_AccountName_utf = "linktest", + }; + VpnRpcCreateLink out_rpc_create_link = api.GetLink(in_rpc_create_link); + + print_object(out_rpc_create_link); + + Console.WriteLine("End: Test_GetLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetLink', Set link configuration + /// + public void Test_SetLink() + { + Console.WriteLine("Begin: Test_SetLink"); + + VpnRpcCreateLink in_rpc_create_link = new VpnRpcCreateLink() + { + HubName_Ex_str = hub_name, + CheckServerCert_bool = false, + + ClientOption_AccountName_utf = "linktest", + ClientOption_Hostname_str = "1.2.3.4", + ClientOption_Port_u32 = 443, + ClientOption_ProxyType_u32 = 0, + ClientOption_HubName_str = "ABC", + ClientOption_MaxConnection_u32 = 16, + ClientOption_UseEncrypt_bool = true, + ClientOption_UseCompress_bool = false, + ClientOption_HalfConnection_bool = true, + ClientOption_AdditionalConnectionInterval_u32 = 2, + ClientOption_ConnectionDisconnectSpan_u32 = 24, + + ClientAuth_AuthType_u32 = VpnRpcClientAuthType.PlainPassword, + ClientAuth_Username_str = "181012", + ClientAuth_PlainPassword_str = "microsoft", + ClientAuth_HashedPassword_bin = new byte[0] { }, + ClientAuth_ClientX_bin = new byte[0] { }, + ClientAuth_ClientK_bin = new byte[0] { }, + + SecPol_DHCPFilter_bool = true, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = true, + SecPol_CheckMac_bool = true, + SecPol_CheckIP_bool = true, + SecPol_ArpDhcpOnly_bool = true, + SecPol_PrivacyFilter_bool = true, + SecPol_NoServer_bool = true, + SecPol_NoBroadcastLimiter_bool = true, + SecPol_MaxMac_u32 = 32, + SecPol_MaxIP_u32 = 64, + SecPol_MaxUpload_u32 = 960000, + SecPol_MaxDownload_u32 = 1280000, + SecPol_RSandRAFilter_bool = true, + SecPol_RAFilter_bool = true, + SecPol_DHCPv6Filter_bool = true, + SecPol_DHCPv6NoServer_bool = true, + SecPol_CheckIPv6_bool = true, + SecPol_NoServerV6_bool = true, + SecPol_MaxIPv6_u32 = 127, + SecPol_FilterIPv4_bool = true, + SecPol_FilterIPv6_bool = true, + SecPol_FilterNonIP_bool = true, + SecPol_NoIPv6DefaultRouterInRA_bool = true, + SecPol_VLanId_u32 = 123, + SecPol_Ver3_bool = true, + }; + VpnRpcCreateLink out_rpc_create_link = api.SetLink(in_rpc_create_link); + + print_object(out_rpc_create_link); + + Console.WriteLine("End: Test_SetLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumLink', Enumerate links + /// + public VpnRpcEnumLink Test_EnumLink() + { + Console.WriteLine("Begin: Test_EnumLink"); + + VpnRpcEnumLink in_rpc_enum_link = new VpnRpcEnumLink() + { + HubName_str = hub_name, + }; + VpnRpcEnumLink out_rpc_enum_link = api.EnumLink(in_rpc_enum_link); + + print_object(out_rpc_enum_link); + + Console.WriteLine("End: Test_EnumLink"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_link; + } + + /// + /// API test for 'GetLinkStatus', Get link status + /// + public void Test_GetLinkStatus(string name) + { + Console.WriteLine("Begin: Test_GetLinkStatus"); + + VpnRpcLinkStatus in_rpc_link_status = new VpnRpcLinkStatus() + { + HubName_Ex_str = hub_name, + AccountName_utf = name, + }; + VpnRpcLinkStatus out_rpc_link_status = api.GetLinkStatus(in_rpc_link_status); + + print_object(out_rpc_link_status); + + Console.WriteLine("End: Test_GetLinkStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddAccess', Add access list entry + /// + public void Test_AddAccess() + { + Console.WriteLine("Begin: Test_AddAccess"); + + VpnRpcAddAccess in_rpc_add_access_ipv4 = new VpnRpcAddAccess() + { + HubName_str = hub_name, + + AccessListSingle = new VpnAccess[1] + { + new VpnAccess() + { + Note_utf = "IPv4 Test", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = false, + SrcIpAddress_ip = "192.168.0.0", + SrcSubnetMask_ip = "255.255.255.0", + DestIpAddress_ip = "10.0.0.0", + DestSubnetMask_ip = "255.255.0.0", + Protocol_u32 = VpnIpProtocolNumber.TCP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + }, + }; + VpnRpcAddAccess out_rpc_add_access_ipv4 = api.AddAccess(in_rpc_add_access_ipv4); + + VpnRpcAddAccess in_rpc_add_access_ipv6 = new VpnRpcAddAccess() + { + HubName_str = hub_name, + + AccessListSingle = new VpnAccess[1] + { + new VpnAccess() + { + Note_utf = "IPv6 Test", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = true, + SrcIpAddress6_bin = new byte[] { 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + SrcSubnetMask6_bin = new byte[] { 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + Protocol_u32 = VpnIpProtocolNumber.UDP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + }, + }; + VpnRpcAddAccess out_rpc_add_access_ipv6 = api.AddAccess(in_rpc_add_access_ipv6); + + Console.WriteLine("End: Test_AddAccess"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteAccess', Delete access list entry + /// + public void Test_DeleteAccess() + { + Console.WriteLine("Begin: Test_DeleteAccess"); + + VpnRpcDeleteAccess in_rpc_delete_access = new VpnRpcDeleteAccess() + { + HubName_str = hub_name, + Id_u32 = 1, + }; + VpnRpcDeleteAccess out_rpc_delete_access = api.DeleteAccess(in_rpc_delete_access); + + print_object(out_rpc_delete_access); + + Console.WriteLine("End: Test_DeleteAccess"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumAccess', Get access list + /// + public void Test_EnumAccess() + { + Console.WriteLine("Begin: Test_EnumAccess"); + + VpnRpcEnumAccessList in_rpc_enum_access_list = new VpnRpcEnumAccessList() + { + HubName_str = hub_name, + }; + VpnRpcEnumAccessList out_rpc_enum_access_list = api.EnumAccess(in_rpc_enum_access_list); + + print_object(out_rpc_enum_access_list); + + Console.WriteLine("End: Test_EnumAccess"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetAccessList', Set access list + /// + public void Test_SetAccessList() + { + Console.WriteLine("Begin: Test_SetAccessList"); + + VpnRpcEnumAccessList in_rpc_enum_access_list = new VpnRpcEnumAccessList() + { + HubName_str = hub_name, + AccessList = new VpnAccess[] + { + new VpnAccess() + { + Note_utf = "IPv4 Test 2", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = false, + SrcIpAddress_ip = "192.168.0.0", + SrcSubnetMask_ip = "255.255.255.0", + DestIpAddress_ip = "10.0.0.0", + DestSubnetMask_ip = "255.255.0.0", + Protocol_u32 = VpnIpProtocolNumber.TCP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + new VpnAccess() + { + Note_utf = "IPv6 Test 2", + Active_bool = true, + Priority_u32 = 100, + Discard_bool = true, + IsIPv6_bool = true, + SrcIpAddress6_bin = new byte[] { 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + SrcSubnetMask6_bin = new byte[] { 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + Protocol_u32 = VpnIpProtocolNumber.UDP, + SrcPortStart_u32 = 123, + SrcPortEnd_u32 = 456, + DestPortStart_u32 = 555, + DestPortEnd_u32 = 666, + SrcUsername_str = "dnobori", + DestUsername_str = "nekosan", + CheckSrcMac_bool = true, + SrcMacAddress_bin = new byte[] { 1, 2, 3, 0, 0, 0 }, + SrcMacMask_bin = new byte[] { 255, 255, 255, 0, 0, 0 }, + CheckTcpState_bool = true, + Established_bool = true, + Delay_u32 = 10, + Jitter_u32 = 20, + Loss_u32 = 30, + RedirectUrl_str = "aho", + }, + } + }; + VpnRpcEnumAccessList out_rpc_enum_access_list = api.SetAccessList(in_rpc_enum_access_list); + + print_object(out_rpc_enum_access_list); + + Console.WriteLine("End: Test_SetAccessList"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateUser', Create a user + /// + public void Test_CreateUser() + { + Console.WriteLine("Begin: Test_CreateUser"); + + VpnRpcSetUser in_rpc_set_user = new VpnRpcSetUser() + { + HubName_str = hub_name, + Name_str = "test1", + Realname_utf = "Cat man", + Note_utf = "Hey!!!", + AuthType_u32 = VpnRpcUserAuthType.Password, + Auth_Password_str = "microsoft", + Auth_UserCert_CertData = new byte[0] { }, + Auth_RootCert_Serial = new byte[0] { }, + Auth_RootCert_CommonName = "", + Auth_Radius_RadiusUsername = "", + Auth_NT_NTUsername = "", + ExpireTime_dt = new DateTime(2019, 1, 1), + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetUser out_rpc_set_user = api.CreateUser(in_rpc_set_user); + + Console.WriteLine("End: Test_CreateUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetUser', Set user setting + /// + public void Test_SetUser() + { + Console.WriteLine("Begin: Test_SetUser"); + + VpnRpcSetUser in_rpc_set_user = new VpnRpcSetUser() + { + HubName_str = hub_name, + Name_str = "test1", + Realname_utf = "Cat man", + Note_utf = "Hey!!!", + GroupName_str = "group1", + AuthType_u32 = VpnRpcUserAuthType.Anonymous, + Auth_Password_str = "", + Auth_UserCert_CertData = new byte[0] { }, + Auth_RootCert_Serial = new byte[0] { }, + Auth_RootCert_CommonName = "", + Auth_Radius_RadiusUsername = "", + Auth_NT_NTUsername = "", + ExpireTime_dt = new DateTime(2019, 1, 1), + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetUser out_rpc_set_user = api.SetUser(in_rpc_set_user); + + Console.WriteLine("End: Test_SetUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetUser', Get user setting + /// + public void Test_GetUser() + { + Console.WriteLine("Begin: Test_GetUser"); + + VpnRpcSetUser in_rpc_set_user = new VpnRpcSetUser() + { + HubName_str = hub_name, + Name_str = "test1", + }; + VpnRpcSetUser out_rpc_set_user = api.GetUser(in_rpc_set_user); + + print_object(out_rpc_set_user); + + Console.WriteLine("End: Test_GetUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteUser', Delete a user + /// + public void Test_DeleteUser() + { + Console.WriteLine("Begin: Test_DeleteUser"); + + VpnRpcDeleteUser in_rpc_delete_user = new VpnRpcDeleteUser() + { + HubName_str = hub_name, + Name_str = "test1", + }; + VpnRpcDeleteUser out_rpc_delete_user = api.DeleteUser(in_rpc_delete_user); + + Console.WriteLine("End: Test_DeleteUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumUser', Enumerate users + /// + public void Test_EnumUser() + { + Console.WriteLine("Begin: Test_EnumUser"); + + VpnRpcEnumUser in_rpc_enum_user = new VpnRpcEnumUser() + { + HubName_str = hub_name, + }; + VpnRpcEnumUser out_rpc_enum_user = api.EnumUser(in_rpc_enum_user); + + print_object(out_rpc_enum_user); + + Console.WriteLine("End: Test_EnumUser"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'CreateGroup', Create a group + /// + public void Test_CreateGroup() + { + Console.WriteLine("Begin: Test_CreateGroup"); + + VpnRpcSetGroup in_rpc_set_group = new VpnRpcSetGroup() + { + HubName_str = hub_name, + Name_str = "group1", + Realname_utf = "Cat group", + Note_utf = "This is it! This is it!!", + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetGroup out_rpc_set_group = api.CreateGroup(in_rpc_set_group); + + print_object(out_rpc_set_group); + + Console.WriteLine("End: Test_CreateGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetGroup', Set group setting + /// + public void Test_SetGroup() + { + Console.WriteLine("Begin: Test_SetGroup"); + + VpnRpcSetGroup in_rpc_set_group = new VpnRpcSetGroup() + { + HubName_str = hub_name, + Name_str = "group1", + Realname_utf = "Cat group 2", + Note_utf = "This is it! This is it!! 2", + UsePolicy_bool = true, + SecPol_Access_bool = true, + SecPol_DHCPFilter_bool = false, + SecPol_DHCPNoServer_bool = true, + SecPol_DHCPForce_bool = false, + SecPol_NoBridge_bool = false, + SecPol_NoRouting_bool = false, + SecPol_CheckMac_bool = false, + SecPol_CheckIP_bool = false, + SecPol_ArpDhcpOnly_bool = false, + SecPol_PrivacyFilter_bool = false, + SecPol_NoServer_bool = false, + SecPol_NoBroadcastLimiter_bool = false, + SecPol_MonitorPort_bool = false, + SecPol_MaxConnection_u32 = 32, + SecPol_TimeOut_u32 = 15, + SecPol_MaxMac_u32 = 1000, + SecPol_MaxIP_u32 = 1000, + SecPol_MaxUpload_u32 = 1000000000, + SecPol_MaxDownload_u32 = 1000000000, + SecPol_FixPassword_bool = false, + SecPol_MultiLogins_u32 = 1000, + SecPol_NoQoS_bool = false, + SecPol_RSandRAFilter_bool = false, + SecPol_RAFilter_bool = false, + SecPol_DHCPv6Filter_bool = false, + SecPol_DHCPv6NoServer_bool = false, + SecPol_NoRoutingV6_bool = false, + SecPol_CheckIPv6_bool = false, + SecPol_NoServerV6_bool = false, + SecPol_MaxIPv6_u32 = 1234, + SecPol_NoSavePassword_bool = false, + SecPol_AutoDisconnect_u32 = 0, + SecPol_FilterIPv4_bool = false, + SecPol_FilterIPv6_bool = false, + SecPol_FilterNonIP_bool = false, + SecPol_NoIPv6DefaultRouterInRA_bool = false, + SecPol_NoIPv6DefaultRouterInRAWhenIPv6_bool = false, + SecPol_VLanId_u32 = 0, + SecPol_Ver3_bool = true, + }; + VpnRpcSetGroup out_rpc_set_group = api.SetGroup(in_rpc_set_group); + + print_object(out_rpc_set_group); + + Console.WriteLine("End: Test_SetGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetGroup', Get group information + /// + public void Test_GetGroup() + { + Console.WriteLine("Begin: Test_GetGroup"); + + VpnRpcSetGroup in_rpc_set_group = new VpnRpcSetGroup() + { + HubName_str = hub_name, + Name_str = "group1", + }; + VpnRpcSetGroup out_rpc_set_group = api.GetGroup(in_rpc_set_group); + + print_object(out_rpc_set_group); + + Console.WriteLine("End: Test_GetGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteGroup', Delete a group + /// + public void Test_DeleteGroup() + { + Console.WriteLine("Begin: Test_DeleteGroup"); + + VpnRpcDeleteUser in_rpc_delete_user = new VpnRpcDeleteUser() + { + HubName_str = hub_name, + Name_str = "group1", + }; + VpnRpcDeleteUser out_rpc_delete_user = api.DeleteGroup(in_rpc_delete_user); + + print_object(out_rpc_delete_user); + + Console.WriteLine("End: Test_DeleteGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumGroup', Enumerate groups + /// + public void Test_EnumGroup() + { + Console.WriteLine("Begin: Test_EnumGroup"); + + VpnRpcEnumGroup in_rpc_enum_group = new VpnRpcEnumGroup() + { + HubName_str = hub_name, + }; + VpnRpcEnumGroup out_rpc_enum_group = api.EnumGroup(in_rpc_enum_group); + + print_object(out_rpc_enum_group); + + Console.WriteLine("End: Test_EnumGroup"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumSession', Enumerate sessions + /// + public VpnRpcEnumSession Test_EnumSession() + { + Console.WriteLine("Begin: Test_EnumSession"); + + VpnRpcEnumSession in_rpc_enum_session = new VpnRpcEnumSession() + { + HubName_str = hub_name, + }; + VpnRpcEnumSession out_rpc_enum_session = api.EnumSession(in_rpc_enum_session); + + print_object(out_rpc_enum_session); + + Console.WriteLine("End: Test_EnumSession"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_session; + } + + /// + /// API test for 'GetSessionStatus', Get session status + /// + public void Test_GetSessionStatus(string session_name) + { + Console.WriteLine("Begin: Test_GetSessionStatus"); + + VpnRpcSessionStatus in_rpc_session_status = new VpnRpcSessionStatus() + { + HubName_str = hub_name, + Name_str = session_name, + }; + VpnRpcSessionStatus out_rpc_session_status = api.GetSessionStatus(in_rpc_session_status); + + print_object(out_rpc_session_status); + + Console.WriteLine("End: Test_GetSessionStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteSession', Delete a session + /// + public void Test_DeleteSession(string session_id) + { + Console.WriteLine("Begin: Test_DeleteSession"); + + VpnRpcDeleteSession in_rpc_delete_session = new VpnRpcDeleteSession() + { + HubName_str = hub_name, + Name_str = session_id, + }; + VpnRpcDeleteSession out_rpc_delete_session = api.DeleteSession(in_rpc_delete_session); + + print_object(out_rpc_delete_session); + + Console.WriteLine("End: Test_DeleteSession"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumMacTable', Get MAC address table + /// + public VpnRpcEnumMacTable Test_EnumMacTable() + { + Console.WriteLine("Begin: Test_EnumMacTable"); + + VpnRpcEnumMacTable in_rpc_enum_mac_table = new VpnRpcEnumMacTable() + { + HubName_str = hub_name, + }; + VpnRpcEnumMacTable out_rpc_enum_mac_table = api.EnumMacTable(in_rpc_enum_mac_table); + + print_object(out_rpc_enum_mac_table); + + Console.WriteLine("End: Test_EnumMacTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_mac_table; + } + + /// + /// API test for 'DeleteMacTable', Delete MAC address table entry + /// + public void Test_DeleteMacTable(uint key32) + { + Console.WriteLine("Begin: Test_DeleteMacTable"); + + VpnRpcDeleteTable in_rpc_delete_table = new VpnRpcDeleteTable() + { + HubName_str = hub_name, + Key_u32 = key32, + }; + VpnRpcDeleteTable out_rpc_delete_table = api.DeleteMacTable(in_rpc_delete_table); + + Console.WriteLine("End: Test_DeleteMacTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumIpTable', Get IP address table + /// + public VpnRpcEnumIpTable Test_EnumIpTable() + { + Console.WriteLine("Begin: Test_EnumIpTable"); + + VpnRpcEnumIpTable in_rpc_enum_ip_table = new VpnRpcEnumIpTable() + { + HubName_str = hub_name, + }; + VpnRpcEnumIpTable out_rpc_enum_ip_table = api.EnumIpTable(in_rpc_enum_ip_table); + + print_object(out_rpc_enum_ip_table); + + Console.WriteLine("End: Test_EnumIpTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_ip_table; + } + + /// + /// API test for 'DeleteIpTable', Delete IP address table entry + /// + public void Test_DeleteIpTable(uint key32) + { + Console.WriteLine("Begin: Test_DeleteIpTable"); + + VpnRpcDeleteTable in_rpc_delete_table = new VpnRpcDeleteTable() + { + HubName_str = hub_name, + Key_u32 = key32, + }; + VpnRpcDeleteTable out_rpc_delete_table = api.DeleteIpTable(in_rpc_delete_table); + + print_object(out_rpc_delete_table); + + Console.WriteLine("End: Test_DeleteIpTable"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetKeep', Set keep-alive function setting + /// + public void Test_SetKeep() + { + Console.WriteLine("Begin: Test_SetKeep"); + + VpnRpcKeep in_rpc_keep = new VpnRpcKeep() + { + UseKeepConnect_bool = true, + KeepConnectHost_str = "www.softether.org", + KeepConnectPort_u32 = 123, + KeepConnectProtocol_u32 = VpnRpcKeepAliveProtocol.UDP, + KeepConnectInterval_u32 = 1, + }; + VpnRpcKeep out_rpc_keep = api.SetKeep(in_rpc_keep); + + print_object(out_rpc_keep); + + Console.WriteLine("End: Test_SetKeep"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetKeep', Get keep-alive function setting + /// + public void Test_GetKeep() + { + Console.WriteLine("Begin: Test_GetKeep"); + + VpnRpcKeep in_rpc_keep = new VpnRpcKeep() + { + }; + VpnRpcKeep out_rpc_keep = api.GetKeep(in_rpc_keep); + + print_object(out_rpc_keep); + + Console.WriteLine("End: Test_GetKeep"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnableSecureNAT', Enable SecureNAT function of the hub + /// + public void Test_EnableSecureNAT() + { + Console.WriteLine("Begin: Test_EnableSecureNAT"); + + VpnRpcHub in_rpc_hub = new VpnRpcHub() + { + HubName_str = hub_name, + }; + VpnRpcHub out_rpc_hub = api.EnableSecureNAT(in_rpc_hub); + + print_object(out_rpc_hub); + + Console.WriteLine("End: Test_EnableSecureNAT"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DisableSecureNAT', Disable the SecureNAT function of the hub + /// + public void Test_DisableSecureNAT() + { + Console.WriteLine("Begin: Test_DisableSecureNAT"); + + VpnRpcHub in_rpc_hub = new VpnRpcHub() + { + HubName_str = hub_name, + }; + VpnRpcHub out_rpc_hub = api.DisableSecureNAT(in_rpc_hub); + + print_object(out_rpc_hub); + + Console.WriteLine("End: Test_DisableSecureNAT"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetSecureNATOption', Set SecureNAT options + /// + public void Test_SetSecureNATOption() + { + Console.WriteLine("Begin: Test_SetSecureNATOption"); + + VpnVhOption in_vh_option = new VpnVhOption() + { + RpcHubName_str = hub_name, + MacAddress_bin = new byte[] { 0x00, 0xAC, 0x00, 0x11, 0x22, 0x33 }, + Ip_ip = "10.0.0.254", + Mask_ip = "255.255.255.0", + UseNat_bool = true, + Mtu_u32 = 1200, + NatTcpTimeout_u32 = 100, + NatUdpTimeout_u32 = 50, + UseDhcp_bool = true, + DhcpLeaseIPStart_ip = "10.0.0.101", + DhcpLeaseIPEnd_ip = "10.0.0.199", + DhcpSubnetMask_ip = "255.255.255.0", + DhcpExpireTimeSpan_u32 = 3600, + DhcpGatewayAddress_ip = "10.0.0.254", + DhcpDnsServerAddress_ip = "10.0.0.254", + DhcpDnsServerAddress2_ip = "8.8.8.8", + DhcpDomainName_str = "lab.coe.ad.jp", + SaveLog_bool = true, + ApplyDhcpPushRoutes_bool = false, + DhcpPushRoutes_str = "", + }; + VpnVhOption out_vh_option = api.SetSecureNATOption(in_vh_option); + + print_object(out_vh_option); + + Console.WriteLine("End: Test_SetSecureNATOption"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSecureNATOption', Get SecureNAT options + /// + public void Test_GetSecureNATOption() + { + Console.WriteLine("Begin: Test_GetSecureNATOption"); + + VpnVhOption in_vh_option = new VpnVhOption() + { + RpcHubName_str = hub_name, + }; + VpnVhOption out_vh_option = api.GetSecureNATOption(in_vh_option); + + print_object(out_vh_option); + + Console.WriteLine("End: Test_GetSecureNATOption"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumNAT', Enumerate NAT entries of the SecureNAT + /// + public void Test_EnumNAT() + { + Console.WriteLine("Begin: Test_EnumNAT"); + + VpnRpcEnumNat in_rpc_enum_nat = new VpnRpcEnumNat() + { + HubName_str = hub_name, + }; + VpnRpcEnumNat out_rpc_enum_nat = api.EnumNAT(in_rpc_enum_nat); + + print_object(out_rpc_enum_nat); + + Console.WriteLine("End: Test_EnumNAT"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumDHCP', Enumerate DHCP entries + /// + public void Test_EnumDHCP() + { + Console.WriteLine("Begin: Test_EnumDHCP"); + + VpnRpcEnumDhcp in_rpc_enum_dhcp = new VpnRpcEnumDhcp() + { + HubName_str = hub_name, + }; + VpnRpcEnumDhcp out_rpc_enum_dhcp = api.EnumDHCP(in_rpc_enum_dhcp); + + print_object(out_rpc_enum_dhcp); + + Console.WriteLine("End: Test_EnumDHCP"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSecureNATStatus', Get status of the SecureNAT + /// + public void Test_GetSecureNATStatus() + { + Console.WriteLine("Begin: Test_GetSecureNATStatus"); + + VpnRpcNatStatus in_rpc_nat_status = new VpnRpcNatStatus() + { + HubName_str = hub_name, + }; + VpnRpcNatStatus out_rpc_nat_status = api.GetSecureNATStatus(in_rpc_nat_status); + + print_object(out_rpc_nat_status); + + Console.WriteLine("End: Test_GetSecureNATStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumEthernet', Enumerate Ethernet devices + /// + public void Test_EnumEthernet() + { + Console.WriteLine("Begin: Test_EnumEthernet"); + + VpnRpcEnumEth out_rpc_enum_eth = api.EnumEthernet(); + + print_object(out_rpc_enum_eth); + + Console.WriteLine("End: Test_EnumEthernet"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddLocalBridge', Add a new local bridge + /// + public void Test_AddLocalBridge() + { + Console.WriteLine("Begin: Test_AddLocalBridge"); + + VpnRpcLocalBridge in_rpc_localbridge = new VpnRpcLocalBridge() + { + DeviceName_str = "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str = hub_name, + }; + VpnRpcLocalBridge out_rpc_localbridge = api.AddLocalBridge(in_rpc_localbridge); + + print_object(out_rpc_localbridge); + + Console.WriteLine("End: Test_AddLocalBridge"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteLocalBridge', Delete a local bridge + /// + public void Test_DeleteLocalBridge() + { + Console.WriteLine("Begin: Test_DeleteLocalBridge"); + + VpnRpcLocalBridge in_rpc_localbridge = new VpnRpcLocalBridge() + { + DeviceName_str = "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)", + HubNameLB_str = hub_name, + }; + VpnRpcLocalBridge out_rpc_localbridge = api.DeleteLocalBridge(in_rpc_localbridge); + + print_object(out_rpc_localbridge); + + Console.WriteLine("End: Test_DeleteLocalBridge"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumLocalBridge', Enumerate local bridges + /// + public void Test_EnumLocalBridge() + { + Console.WriteLine("Begin: Test_EnumLocalBridge"); + + VpnRpcEnumLocalBridge out_rpc_enum_localbridge = api.EnumLocalBridge(); + + print_object(out_rpc_enum_localbridge); + + Console.WriteLine("End: Test_EnumLocalBridge"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetBridgeSupport', Get availability to localbridge function + /// + public void Test_GetBridgeSupport() + { + Console.WriteLine("Begin: Test_GetBridgeSupport"); + + VpnRpcBridgeSupport out_rpc_bridge_support = api.GetBridgeSupport(); + + print_object(out_rpc_bridge_support); + + Console.WriteLine("End: Test_GetBridgeSupport"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'RebootServer', Reboot server itself + /// + public void Test_RebootServer() + { + Console.WriteLine("Begin: Test_RebootServer"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + }; + VpnRpcTest out_rpc_test = api.RebootServer(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_RebootServer"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetCaps', Get capabilities + /// + public void Test_GetCaps() + { + Console.WriteLine("Begin: Test_GetCaps"); + + VpnCapslist out_capslist = api.GetCaps(); + + print_object(out_capslist); + + Console.WriteLine("End: Test_GetCaps"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetConfig', Get configuration file stream + /// + public void Test_GetConfig() + { + Console.WriteLine("Begin: Test_GetConfig"); + + VpnRpcConfig out_rpc_config = api.GetConfig(); + + print_object(out_rpc_config); + + Console.WriteLine("End: Test_GetConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetConfig', Overwrite configuration file by specified data + /// + public void Test_SetConfig() + { + Console.WriteLine("Begin: Test_SetConfig"); + + VpnRpcConfig in_rpc_config = new VpnRpcConfig() + { + FileData_bin = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, }, + }; + VpnRpcConfig out_rpc_config = api.SetConfig(in_rpc_config); + + Console.WriteLine("End: Test_SetConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetDefaultHubAdminOptions', Get default hub administration options + /// + public void Test_GetDefaultHubAdminOptions() + { + Console.WriteLine("Begin: Test_GetDefaultHubAdminOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + }; + VpnRpcAdminOption out_rpc_admin_option = api.GetDefaultHubAdminOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_GetDefaultHubAdminOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubAdminOptions', Get hub administration options + /// + public void Test_GetHubAdminOptions() + { + Console.WriteLine("Begin: Test_GetHubAdminOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + }; + VpnRpcAdminOption out_rpc_admin_option = api.GetHubAdminOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_GetHubAdminOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubAdminOptions', Set hub administration options + /// + public void Test_SetHubAdminOptions() + { + Console.WriteLine("Begin: Test_SetHubAdminOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + AdminOptionList = new VpnAdminOption[] + { + new VpnAdminOption() + { + Name_str = "no_securenat_enablenat", + Value_u32 = 1, + } + } + }; + VpnRpcAdminOption out_rpc_admin_option = api.SetHubAdminOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_SetHubAdminOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubExtOptions', Get hub extended options + /// + public void Test_GetHubExtOptions() + { + Console.WriteLine("Begin: Test_GetHubExtOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + }; + VpnRpcAdminOption out_rpc_admin_option = api.GetHubExtOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_GetHubExtOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubExtOptions', Set hub extended options + /// + public void Test_SetHubExtOptions() + { + Console.WriteLine("Begin: Test_SetHubExtOptions"); + + VpnRpcAdminOption in_rpc_admin_option = new VpnRpcAdminOption() + { + HubName_str = hub_name, + AdminOptionList = new VpnAdminOption[] + { + new VpnAdminOption() + { + Name_str = "SecureNAT_RandomizeAssignIp", + Value_u32 = 1, + } + } + }; + VpnRpcAdminOption out_rpc_admin_option = api.SetHubExtOptions(in_rpc_admin_option); + + print_object(out_rpc_admin_option); + + Console.WriteLine("End: Test_SetHubExtOptions"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddL3Switch', Add a new virtual layer-3 switch + /// + public void Test_AddL3Switch() + { + Console.WriteLine("Begin: Test_AddL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.AddL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_AddL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelL3Switch', Delete a virtual layer-3 switch + /// + public void Test_DelL3Switch() + { + Console.WriteLine("Begin: Test_DelL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.DelL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_DelL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumL3Switch', Enumerate virtual layer-3 switches + /// + public void Test_EnumL3Switch() + { + Console.WriteLine("Begin: Test_EnumL3Switch"); + + VpnRpcEnumL3Sw out_rpc_enum_l3sw = api.EnumL3Switch(); + + print_object(out_rpc_enum_l3sw); + + Console.WriteLine("End: Test_EnumL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'StartL3Switch', Start a virtual layer-3 switch + /// + public void Test_StartL3Switch() + { + Console.WriteLine("Begin: Test_StartL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.StartL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_StartL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'StopL3Switch', Stop a virtual layer-3 switch + /// + public void Test_StopL3Switch() + { + Console.WriteLine("Begin: Test_StopL3Switch"); + + VpnRpcL3Sw in_rpc_l3sw = new VpnRpcL3Sw() + { + Name_str = "L3SW1", + }; + VpnRpcL3Sw out_rpc_l3sw = api.StopL3Switch(in_rpc_l3sw); + + print_object(out_rpc_l3sw); + + Console.WriteLine("End: Test_StopL3Switch"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddL3If', Add new virtual interface on virtual L3 switch + /// + public void Test_AddL3If() + { + Console.WriteLine("Begin: Test_AddL3If"); + + VpnRpcL3If in_rpc_l3if = new VpnRpcL3If() + { + Name_str = "L3SW1", + HubName_str = hub_name, + IpAddress_ip = "192.168.0.1", + SubnetMask_ip = "255.255.255.0", + }; + VpnRpcL3If out_rpc_l3if = api.AddL3If(in_rpc_l3if); + + print_object(out_rpc_l3if); + + Console.WriteLine("End: Test_AddL3If"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelL3If', Delete a virtual interface on virtual L3 switch + /// + public void Test_DelL3If() + { + Console.WriteLine("Begin: Test_DelL3If"); + + VpnRpcL3If in_rpc_l3if = new VpnRpcL3If() + { + Name_str = "L3SW1", + HubName_str = hub_name, + }; + VpnRpcL3If out_rpc_l3if = api.DelL3If(in_rpc_l3if); + + print_object(out_rpc_l3if); + + Console.WriteLine("End: Test_DelL3If"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumL3If', Enumerate virtual interfaces on virtual L3 switch + /// + public void Test_EnumL3If() + { + Console.WriteLine("Begin: Test_EnumL3If"); + + VpnRpcEnumL3If in_rpc_enum_l3if = new VpnRpcEnumL3If() + { + Name_str = "L3SW1", + }; + VpnRpcEnumL3If out_rpc_enum_l3if = api.EnumL3If(in_rpc_enum_l3if); + + print_object(out_rpc_enum_l3if); + + Console.WriteLine("End: Test_EnumL3If"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddL3Table', Add new routing table entry on virtual L3 switch + /// + public void Test_AddL3Table() + { + Console.WriteLine("Begin: Test_AddL3Table"); + + VpnRpcL3Table in_rpc_l3table = new VpnRpcL3Table() + { + Name_str = "L3SW1", + NetworkAddress_ip = "10.0.0.0", + SubnetMask_ip = "255.0.0.0", + GatewayAddress_ip = "192.168.7.1", + Metric_u32 = 10, + }; + VpnRpcL3Table out_rpc_l3table = api.AddL3Table(in_rpc_l3table); + + print_object(out_rpc_l3table); + + Console.WriteLine("End: Test_AddL3Table"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelL3Table', Delete routing table entry on virtual L3 switch + /// + public void Test_DelL3Table() + { + Console.WriteLine("Begin: Test_DelL3Table"); + + VpnRpcL3Table in_rpc_l3table = new VpnRpcL3Table() + { + Name_str = "L3SW1", + NetworkAddress_ip = "10.0.0.0", + SubnetMask_ip = "255.0.0.0", + GatewayAddress_ip = "192.168.7.1", + Metric_u32 = 10, + }; + VpnRpcL3Table out_rpc_l3table = api.DelL3Table(in_rpc_l3table); + + print_object(out_rpc_l3table); + + Console.WriteLine("End: Test_DelL3Table"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumL3Table', Get routing table on virtual L3 switch + /// + public void Test_EnumL3Table() + { + Console.WriteLine("Begin: Test_EnumL3Table"); + + VpnRpcEnumL3Table in_rpc_enum_l3table = new VpnRpcEnumL3Table() + { + Name_str = "L3SW1", + }; + VpnRpcEnumL3Table out_rpc_enum_l3table = api.EnumL3Table(in_rpc_enum_l3table); + + print_object(out_rpc_enum_l3table); + + Console.WriteLine("End: Test_EnumL3Table"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumCrl', Get CRL (Certificate Revocation List) index + /// + public VpnRpcEnumCrl Test_EnumCrl() + { + Console.WriteLine("Begin: Test_EnumCrl"); + + VpnRpcEnumCrl in_rpc_enum_crl = new VpnRpcEnumCrl() + { + HubName_str = hub_name, + }; + VpnRpcEnumCrl out_rpc_enum_crl = api.EnumCrl(in_rpc_enum_crl); + + print_object(out_rpc_enum_crl); + + Console.WriteLine("End: Test_EnumCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_crl; + } + + /// + /// API test for 'AddCrl', Add new CRL (Certificate Revocation List) entry + /// + public void Test_AddCrl() + { + Console.WriteLine("Begin: Test_AddCrl"); + + VpnRpcCrl in_rpc_crl = new VpnRpcCrl() + { + HubName_str = hub_name, + CommonName_utf = "CN", + Organization_utf = "Org", + Unit_utf = "ICSCOE", + Country_utf = "JP", + State_utf = "Ibaraki", + Local_utf = "Tsukuba", + Serial_bin = new byte[] { 1, 2, 3, 4, 5 }, + DigestMD5_bin = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + DigestSHA1_bin = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }, + }; + VpnRpcCrl out_rpc_crl = api.AddCrl(in_rpc_crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_AddCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DelCrl', Delete CRL (Certificate Revocation List) entry + /// + public void Test_DelCrl(uint key) + { + Console.WriteLine("Begin: Test_DelCrl"); + + VpnRpcCrl in_rpc_crl = new VpnRpcCrl() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcCrl out_rpc_crl = api.DelCrl(in_rpc_crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_DelCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetCrl', Get CRL (Certificate Revocation List) entry + /// + public VpnRpcCrl Test_GetCrl(uint key) + { + Console.WriteLine("Begin: Test_GetCrl"); + + VpnRpcCrl in_rpc_crl = new VpnRpcCrl() + { + HubName_str = hub_name, + Key_u32 = key, + }; + VpnRpcCrl out_rpc_crl = api.GetCrl(in_rpc_crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_GetCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_crl; + } + + /// + /// API test for 'SetCrl', Set CRL (Certificate Revocation List) entry + /// + public void Test_SetCrl(VpnRpcCrl crl) + { + Console.WriteLine("Begin: Test_SetCrl"); + + VpnRpcCrl out_rpc_crl = api.SetCrl(crl); + + print_object(out_rpc_crl); + + Console.WriteLine("End: Test_SetCrl"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetAcList', Set access control list + /// + public void Test_SetAcList() + { + Console.WriteLine("Begin: Test_SetAcList"); + + VpnRpcAcList in_rpc_ac_list = new VpnRpcAcList() + { + HubName_str = hub_name, + + ACList = new VpnAc[] + { + new VpnAc() + { + Deny_bool = true, + IpAddress_ip = "192.168.0.0", + SubnetMask_ip = "255.255.0.0", + Masked_bool = true, + Priority_u32 = 123, + }, + new VpnAc() + { + Deny_bool = false, + IpAddress_ip = "fe80::", + SubnetMask_ip = "8", + Masked_bool = true, + Priority_u32 = 123, + }, + } + }; + VpnRpcAcList out_rpc_ac_list = api.SetAcList(in_rpc_ac_list); + + print_object(out_rpc_ac_list); + + Console.WriteLine("End: Test_SetAcList"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetAcList', Get access control list + /// + public void Test_GetAcList() + { + Console.WriteLine("Begin: Test_GetAcList"); + + VpnRpcAcList in_rpc_ac_list = new VpnRpcAcList() + { + HubName_str = hub_name, + }; + VpnRpcAcList out_rpc_ac_list = api.GetAcList(in_rpc_ac_list); + + print_object(out_rpc_ac_list); + + Console.WriteLine("End: Test_GetAcList"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumLogFile', Enumerate log files + /// + public VpnRpcEnumLogFile Test_EnumLogFile() + { + Console.WriteLine("Begin: Test_EnumLogFile"); + + VpnRpcEnumLogFile out_rpc_enum_log_file = api.EnumLogFile(); + + print_object(out_rpc_enum_log_file); + + Console.WriteLine("End: Test_EnumLogFile"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_log_file; + } + + /// + /// API test for 'ReadLogFile', Read a log file + /// + public void Test_ReadLogFile(string filename) + { + Console.WriteLine("Begin: Test_ReadLogFile"); + + VpnRpcReadLogFile in_rpc_read_log_file = new VpnRpcReadLogFile() + { + FilePath_str = filename, + }; + VpnRpcReadLogFile out_rpc_read_log_file = api.ReadLogFile(in_rpc_read_log_file); + + print_object(out_rpc_read_log_file); + + Console.WriteLine("End: Test_ReadLogFile"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetSysLog', Set syslog function setting + /// + public void Test_SetSysLog(bool flag) + { + Console.WriteLine("Begin: Test_SetSysLog"); + + VpnSyslogSetting in_syslog_setting = new VpnSyslogSetting() + { + SaveType_u32 = flag ? VpnSyslogSaveType.ServerAndHubAllLog : VpnSyslogSaveType.None, + Hostname_str = "1.2.3.4", + Port_u32 = 123, + }; + VpnSyslogSetting out_syslog_setting = api.SetSysLog(in_syslog_setting); + + print_object(out_syslog_setting); + + Console.WriteLine("End: Test_SetSysLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSysLog', Get syslog function setting + /// + public void Test_GetSysLog() + { + Console.WriteLine("Begin: Test_GetSysLog"); + + VpnSyslogSetting in_syslog_setting = new VpnSyslogSetting() + { + }; + VpnSyslogSetting out_syslog_setting = api.GetSysLog(in_syslog_setting); + + print_object(out_syslog_setting); + + Console.WriteLine("End: Test_GetSysLog"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetHubMsg', Set message of today on hub + /// + public void Test_SetHubMsg() + { + Console.WriteLine("Begin: Test_SetHubMsg"); + + VpnRpcMsg in_rpc_msg = new VpnRpcMsg() + { + HubName_str = hub_name, + Msg_bin = new byte[] + { +0x57,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,0x4d,0x65,0x6e,0x20,0x6f,0x66,0x20,0x41, +0x6c,0x6c,0x20,0x43,0x6f,0x75,0x6e,0x74,0x72,0x69,0x65,0x73,0x2c,0x20,0x55,0x6e, +0x69,0x74,0x65,0x21,0x20,0xe4,0xb8,0x87,0xe5,0x9b,0xbd,0xe3,0x81,0xae,0xe5,0x8a, +0xb4,0xe5,0x83,0x8d,0xe8,0x80,0x85,0xe3,0x82,0x88,0xe3,0x80,0x81,0xe5,0x9b,0xa3, +0xe7,0xb5,0x90,0xe3,0x81,0x9b,0xe3,0x82,0x88,0x21,0x20,0xd7,0x92,0xd7,0x91,0xd7, +0xa8,0xd7,0x99,0xd7,0x9d,0x20,0xd7,0xa2,0xd7,0x95,0xd7,0x91,0xd7,0x93,0xd7,0x99, +0xd7,0x9d,0x20,0xd7,0xa9,0xd7,0x9c,0x20,0xd7,0x9b,0xd7,0x9c,0x20,0xd7,0x94,0xd7, +0x9e,0xd7,0x93,0xd7,0x99,0xd7,0xa0,0xd7,0x95,0xd7,0xaa,0x2c,0x20,0xd7,0x94,0xd7, +0xaa,0xd7,0x90,0xd7,0x97,0xd7,0x93,0xd7,0x95,0x21 + }, + }; + VpnRpcMsg out_rpc_msg = api.SetHubMsg(in_rpc_msg); + + print_object(out_rpc_msg); + + Console.WriteLine("End: Test_SetHubMsg"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetHubMsg', Get message of today on hub + /// + public void Test_GetHubMsg() + { + Console.WriteLine("Begin: Test_GetHubMsg"); + + VpnRpcMsg in_rpc_msg = new VpnRpcMsg() + { + HubName_str = hub_name, + }; + VpnRpcMsg out_rpc_msg = api.GetHubMsg(in_rpc_msg); + + print_object(out_rpc_msg); + + Console.WriteLine("End: Test_GetHubMsg"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'Crash', Do Crash + /// + public void Test_Crash() + { + Console.WriteLine("Begin: Test_Crash"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + }; + VpnRpcTest out_rpc_test = api.Crash(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_Crash"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetAdminMsg', Get message for administrators + /// + public void Test_GetAdminMsg() + { + Console.WriteLine("Begin: Test_GetAdminMsg"); + + VpnRpcMsg out_rpc_msg = api.GetAdminMsg(); + + print_object(out_rpc_msg); + + Console.WriteLine("End: Test_GetAdminMsg"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'Flush', Flush configuration file + /// + public void Test_Flush() + { + Console.WriteLine("Begin: Test_Flush"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + }; + VpnRpcTest out_rpc_test = api.Flush(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_Flush"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetIPsecServices', Set IPsec service configuration + /// + public void Test_SetIPsecServices() + { + Console.WriteLine("Begin: Test_SetIPsecServices"); + + VpnIPsecServices in_ipsec_services = new VpnIPsecServices() + { + L2TP_Raw_bool = false, + L2TP_IPsec_bool = false, + EtherIP_IPsec_bool = false, + IPsec_Secret_str = "vpn", + L2TP_DefaultHub_str = "HUB_ABC", + }; + VpnIPsecServices out_ipsec_services = api.SetIPsecServices(in_ipsec_services); + + print_object(out_ipsec_services); + + Console.WriteLine("End: Test_SetIPsecServices"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetIPsecServices', Get IPsec service configuration + /// + public void Test_GetIPsecServices() + { + Console.WriteLine("Begin: Test_GetIPsecServices"); + + VpnIPsecServices out_ipsec_services = api.GetIPsecServices(); + + print_object(out_ipsec_services); + + Console.WriteLine("End: Test_GetIPsecServices"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'AddEtherIpId', Add EtherIP ID setting + /// + public void Test_AddEtherIpId() + { + Console.WriteLine("Begin: Test_AddEtherIpId"); + + VpnEtherIpId in_etherip_id = new VpnEtherIpId() + { + Id_str = "testid", + HubName_str = hub_name, + UserName_str = "nekosan", + Password_str = "torisan", + }; + VpnEtherIpId out_etherip_id = api.AddEtherIpId(in_etherip_id); + + print_object(out_etherip_id); + + Console.WriteLine("End: Test_AddEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetEtherIpId', Get EtherIP ID setting + /// + public void Test_GetEtherIpId(string id) + { + Console.WriteLine("Begin: Test_GetEtherIpId"); + + VpnEtherIpId in_etherip_id = new VpnEtherIpId() + { + Id_str = id, + }; + VpnEtherIpId out_etherip_id = api.GetEtherIpId(in_etherip_id); + + print_object(out_etherip_id); + + Console.WriteLine("End: Test_GetEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'DeleteEtherIpId', Delete EtherIP ID setting + /// + public void Test_DeleteEtherIpId(string id) + { + Console.WriteLine("Begin: Test_DeleteEtherIpId"); + + VpnEtherIpId in_etherip_id = new VpnEtherIpId() + { + Id_str = id, + }; + VpnEtherIpId out_etherip_id = api.DeleteEtherIpId(in_etherip_id); + + print_object(out_etherip_id); + + Console.WriteLine("End: Test_DeleteEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'EnumEtherIpId', Enumerate EtherIP ID settings + /// + public VpnRpcEnumEtherIpId Test_EnumEtherIpId() + { + Console.WriteLine("Begin: Test_EnumEtherIpId"); + + VpnRpcEnumEtherIpId out_rpc_enum_etherip_id = api.EnumEtherIpId(); + + print_object(out_rpc_enum_etherip_id); + + Console.WriteLine("End: Test_EnumEtherIpId"); + Console.WriteLine("-----"); + Console.WriteLine(); + + return out_rpc_enum_etherip_id; + } + + /// + /// API test for 'SetOpenVpnSstpConfig', Set configurations for OpenVPN and SSTP + /// + public void Test_SetOpenVpnSstpConfig() + { + Console.WriteLine("Begin: Test_SetOpenVpnSstpConfig"); + + VpnOpenVpnSstpConfig in_openvpn_sstp_config = new VpnOpenVpnSstpConfig() + { + EnableOpenVPN_bool = true, + OpenVPNPortList_str = "1 2 3 4 5", + EnableSSTP_bool = true, + }; + VpnOpenVpnSstpConfig out_openvpn_sstp_config = api.SetOpenVpnSstpConfig(in_openvpn_sstp_config); + + print_object(out_openvpn_sstp_config); + + Console.WriteLine("End: Test_SetOpenVpnSstpConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetOpenVpnSstpConfig', Get configurations for OpenVPN and SSTP + /// + public void Test_GetOpenVpnSstpConfig() + { + Console.WriteLine("Begin: Test_GetOpenVpnSstpConfig"); + + VpnOpenVpnSstpConfig out_openvpn_sstp_config = api.GetOpenVpnSstpConfig(); + + print_object(out_openvpn_sstp_config); + + Console.WriteLine("End: Test_GetOpenVpnSstpConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetDDnsClientStatus', Get status of DDNS client + /// + public void Test_GetDDnsClientStatus() + { + Console.WriteLine("Begin: Test_GetDDnsClientStatus"); + + VpnDDnsClientStatus out_ddns_client_status = api.GetDDnsClientStatus(); + + print_object(out_ddns_client_status); + + Console.WriteLine("End: Test_GetDDnsClientStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'ChangeDDnsClientHostname', Change host-name for DDNS client + /// + public void Test_ChangeDDnsClientHostname() + { + Console.WriteLine("Begin: Test_ChangeDDnsClientHostname"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + StrValue_str = "nekotest" + rand.Next(1000000000, 2100000000), + }; + VpnRpcTest out_rpc_test = api.ChangeDDnsClientHostname(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_ChangeDDnsClientHostname"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'RegenerateServerCert', Regenerate server certification + /// + public void Test_RegenerateServerCert() + { + Console.WriteLine("Begin: Test_RegenerateServerCert"); + + VpnRpcTest in_rpc_test = new VpnRpcTest() + { + StrValue_str = "abc.example.org", + }; + + VpnRpcTest out_rpc_test = api.RegenerateServerCert(in_rpc_test); + + print_object(out_rpc_test); + + Console.WriteLine("End: Test_RegenerateServerCert"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'MakeOpenVpnConfigFile', Generate OpenVPN configuration files + /// + public void Test_MakeOpenVpnConfigFile() + { + Console.WriteLine("Begin: Test_MakeOpenVpnConfigFile"); + + VpnRpcReadLogFile out_rpc_read_log_file = api.MakeOpenVpnConfigFile(); + + print_object(out_rpc_read_log_file); + + Console.WriteLine("End: Test_MakeOpenVpnConfigFile"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetSpecialListener', Set special listener status + /// + public void Test_SetSpecialListener() + { + Console.WriteLine("Begin: Test_SetSpecialListener"); + + VpnRpcSpecialListener in_rpc_special_listener = new VpnRpcSpecialListener() + { + VpnOverDnsListener_bool = true, + VpnOverIcmpListener_bool = true, + }; + VpnRpcSpecialListener out_rpc_special_listener = api.SetSpecialListener(in_rpc_special_listener); + + print_object(out_rpc_special_listener); + + Console.WriteLine("End: Test_SetSpecialListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetSpecialListener', Get special listener status + /// + public void Test_GetSpecialListener() + { + Console.WriteLine("Begin: Test_GetSpecialListener"); + + VpnRpcSpecialListener out_rpc_special_listener = api.GetSpecialListener(); + + print_object(out_rpc_special_listener); + + Console.WriteLine("End: Test_GetSpecialListener"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetAzureStatus', Get Azure status + /// + public void Test_GetAzureStatus() + { + Console.WriteLine("Begin: Test_GetAzureStatus"); + + VpnRpcAzureStatus out_rpc_azure_status = api.GetAzureStatus(); + + print_object(out_rpc_azure_status); + + Console.WriteLine("End: Test_GetAzureStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetAzureStatus', Set Azure status + /// + public void Test_SetAzureStatus() + { + Console.WriteLine("Begin: Test_SetAzureStatus"); + + VpnRpcAzureStatus in_rpc_azure_status = new VpnRpcAzureStatus() + { + IsEnabled_bool = true, + }; + VpnRpcAzureStatus out_rpc_azure_status = api.SetAzureStatus(in_rpc_azure_status); + + print_object(out_rpc_azure_status); + + Console.WriteLine("End: Test_SetAzureStatus"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetDDnsInternetSettng', Get DDNS proxy configuration + /// + public void Test_GetDDnsInternetSettng() + { + Console.WriteLine("Begin: Test_GetDDnsInternetSettng"); + + VpnInternetSetting out_internet_setting = api.GetDDnsInternetSettng(); + + print_object(out_internet_setting); + + Console.WriteLine("End: Test_GetDDnsInternetSettng"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetDDnsInternetSettng', Set DDNS proxy configuration + /// + public void Test_SetDDnsInternetSettng() + { + Console.WriteLine("Begin: Test_SetDDnsInternetSettng"); + + VpnInternetSetting in_internet_setting = new VpnInternetSetting() + { + ProxyType_u32 = VpnRpcProxyType.Direct, + ProxyHostName_str = "1.2.3.4", + ProxyPort_u32 = 1234, + ProxyUsername_str = "neko", + ProxyPassword_str = "dog", + }; + VpnInternetSetting out_internet_setting = api.SetDDnsInternetSettng(in_internet_setting); + + print_object(out_internet_setting); + + Console.WriteLine("End: Test_SetDDnsInternetSettng"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'SetVgsConfig', Setting VPN Gate Server Configuration + /// + public void Test_SetVgsConfig() + { + Console.WriteLine("Begin: Test_SetVgsConfig"); + + VpnVgsConfig in_vgs_config = new VpnVgsConfig() + { + IsEnabled_bool = false, + Message_utf = "Neko san!!!", + Owner_utf = "Go go go!!!", + Abuse_utf = "da.test@softether.co.jp", + NoLog_bool = false, + LogPermanent_bool = true, + EnableL2TP_bool = true, + }; + VpnVgsConfig out_vgs_config = api.SetVgsConfig(in_vgs_config); + + print_object(out_vgs_config); + + Console.WriteLine("End: Test_SetVgsConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + /// + /// API test for 'GetVgsConfig', Get VPN Gate configuration + /// + public void Test_GetVgsConfig() + { + Console.WriteLine("Begin: Test_GetVgsConfig"); + + VpnVgsConfig out_vgs_config = api.GetVgsConfig(); + + print_object(out_vgs_config); + + Console.WriteLine("End: Test_GetVgsConfig"); + Console.WriteLine("-----"); + Console.WriteLine(); + } + + + void print_object(object obj) + { + var setting = new Newtonsoft.Json.JsonSerializerSettings() + { + NullValueHandling = Newtonsoft.Json.NullValueHandling.Include, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Error, + }; + string str = Newtonsoft.Json.JsonConvert.SerializeObject(obj, Newtonsoft.Json.Formatting.Indented, setting); + Console.WriteLine(str); + } +} diff --git a/developer_tools/vpnserver-jsonrpc-codegen/vpnserver-jsonrpc-codegen.csproj b/developer_tools/vpnserver-jsonrpc-codegen/vpnserver-jsonrpc-codegen.csproj new file mode 100644 index 00000000..8dd4a3cb --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/vpnserver-jsonrpc-codegen.csproj @@ -0,0 +1,35 @@ + + + + Exe + netcoreapp2.1 + VPNServer_JSONRPC_CodeGen + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/developer_tools/vpnserver-jsonrpc-codegen/vpnserver-jsonrpc-codegen.sln b/developer_tools/vpnserver-jsonrpc-codegen/vpnserver-jsonrpc-codegen.sln new file mode 100644 index 00000000..fbd0f7ec --- /dev/null +++ b/developer_tools/vpnserver-jsonrpc-codegen/vpnserver-jsonrpc-codegen.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2041 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vpnserver-jsonrpc-codegen", "vpnserver-jsonrpc-codegen.csproj", "{00B41CF0-7AE9-4542-9970-77B312412535}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00B41CF0-7AE9-4542-9970-77B312412535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00B41CF0-7AE9-4542-9970-77B312412535}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00B41CF0-7AE9-4542-9970-77B312412535}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00B41CF0-7AE9-4542-9970-77B312412535}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EBB5B5A2-21A9-42A1-B4F4-7ED92CD8BBC1} + EndGlobalSection +EndGlobal diff --git a/resources/icons8.png b/resources/icons8.png new file mode 100644 index 00000000..45ef34cb Binary files /dev/null and b/resources/icons8.png differ diff --git a/resources/softether-vpn-server.svg b/resources/softether-vpn-server.svg new file mode 100644 index 00000000..b1b980eb --- /dev/null +++ b/resources/softether-vpn-server.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/softether-vpn.svg b/resources/softether-vpn.svg new file mode 100644 index 00000000..6cfc6570 --- /dev/null +++ b/resources/softether-vpn.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/BUILD_UNIX.md b/src/BUILD_UNIX.md index e0d923e1..227d7350 100644 --- a/src/BUILD_UNIX.md +++ b/src/BUILD_UNIX.md @@ -1,13 +1,17 @@ -This document describes how to build SoftEtherVPN for Unix based Operating systems +This document describes how to build SoftEtherVPN for UNIX based Operating systems - [Requirements](#requirements) * [Install requirements on Centos/RedHat](#install-requirements-on-centosredhat) * [Install Requirements on Debian/Ubuntu](#install-requirements-on-debianubuntu) + * [Install Requirements on macOS](#install-requirements-on-macos) - [Build from source code and install](#build-from-source-code-and-install) - [How to Run SoftEther](#how-to-run-softether) * [Start/Stop SoftEther VPN Server](#startstop-softether-vpn-server) * [Start/Stop SoftEther VPN Bridge](#startstop-softether-vpn-bridge) * [Start/Stop SoftEther VPN Client](#startstop-softether-vpn-client) +- [About HTML5-based Modern Admin Console and JSON-RPC API Suite](#about-html5-based-modern-admin-console-and-json-rpc-api-suite) + * [Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console](#built-in-softether-vpn-server-html5-ajax-based-web-administration-console) + * [Built-in SoftEther Server VPN JSON-RPC API Suite](#built-in-softether-server-vpn-json-rpc-api-suite) - [Using SoftEther without installation.](#using-softether-without-installation) # Requirements @@ -34,11 +38,16 @@ sudo yum -y groupinstall "Development Tools" sudo yum -y install cmake ncurses-devel openssl-devel readline-devel zlib-devel ``` -## Install Requirements on Debian/Ubuntu +## Install requirements on Debian/Ubuntu ```bash sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev ``` +## Install requirements on macOS +```bash +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +brew install cmake openssl readline +``` # Build from source code and install @@ -101,6 +110,8 @@ connect to the VPN Server remotely. You can download the GUI Tool from http://www.softether-download.com/. + + ## Start/Stop SoftEther VPN Bridge To start the SoftEther VPN Bridge background service, run the following: @@ -153,7 +164,39 @@ connect to the VPN Client remotely. You can download the GUI Tool from http://www.softether-download.com/. -# Using SoftEther without installation. +# About HTML5-based Modern Admin Console and JSON-RPC API Suite + +## Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console +We are developing the HTML5 Ajax-based Web Administration Console (currently very limited, under construction) in the embedded HTTPS server on the SoftEther VPN Server. + +Access to the following URL from your favorite web browser. + +``` +https://:/admin/ +``` + +For example if your VPN Server is running as the port 5555 on the host at 192.168.0.1, you can access to the web console by: + +``` +https://192.168.0.1:5555/admin/ +``` + +Note: Your HTML5 development contribution is very appreciated. The current HTML5 pages are written by Daiyuu Nobori (the core developer of SoftEther VPN). He is obviously lack of HTML5 development ability. Please kindly consider to contribute for SoftEther VPN's development on GitHub. Your code will help every people running SoftEther VPN Server. + + +## Built-in SoftEther Server VPN JSON-RPC API Suite +The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions). + +You can access to the [latest SoftEther VPN Server JSON-RPC Document on GitHub.](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/) + +- Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API. +You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.) +- If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server. +- No need to use any specific API client library since all APIs are provided on the JSON-RPC 2.0 Specification. You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment. +- Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. The Node.js Client Library for VPN Server RPC (vpnrpc) package is also available. + + +# Using SoftEther without installation You can use any SoftEtherVPN component (server, client, bridge) without installing it, if you wish so. diff --git a/src/BUILD_WINDOWS.md b/src/BUILD_WINDOWS.md index 2717758d..1ce328f8 100644 --- a/src/BUILD_WINDOWS.md +++ b/src/BUILD_WINDOWS.md @@ -5,7 +5,7 @@ How to build SoftEther VPN for Windows Requirements ------------ -You need to install the following software to build SoftEther VPN for Windows. +You need to install the following software to run a full release build of SoftEther VPN for Windows. - Microsoft Windows XP, Vista, 7, 8 or later. - Microsoft Visual Studio 2008 with the latest SP (SP1 9.0.30729.4462 QFE). @@ -24,7 +24,7 @@ the installer packages of SoftEther VPN. It is very easy. 3. The built files are stored on the "output" directory. -Partly Build, Debug or Development Instructions on Visual Studio 2008 +Partly Build, Debug, or Development Instructions on Visual Studio 2008 --------------------------------------------------------------------- If you are a programmer, you can open the SoftEther VPN solution file @@ -40,7 +40,36 @@ If using anything else other than Visual Studio 2008 for development, your code It is OK to add newer Visual Studio (2015, 2017) solution files to the project, but there then must be dual solution files for both Visual C++ 2008 and the latest Visual Studio. -Note: There is an update to the CMake configuration that adds support for Windows in the works for future use. +Build and Development Instructions with Visual Studio 2017 & CMake +--------------------------------------------------------------------- + +An alternative method for development of the SoftEtherVPN project on Windows is through CMake. + +There are several methods for using CMake but the easiest by far is through Visual Studio 2017 by importing the CMake project directly +into it. So that is what will be described below. + +Requirements: + +1. Download Visual Studio 2017 (Community Edition is fine). +2. During install, make sure to check "Desktop development with C++" under "Workloads". +3. Click on individual components and scroll until you see "Visual C++ tools for CMake" under the compilers section. Make sure this is checked. +4. Proceed with and finish Visual Studio 2017 install. +5. Install the needed submodules to build the project, avoiding CMake telling you to do so with: `git submodule update --init --recursive` + +Building: + +Once both installs have finished, launch Visual Studio. Once its started go to the File menu click `Open --> CMake`. Then navigate to where you +cloned the project and open the `CMakeLists.txt` file in the projects root directory. + +Visual Studio will proceed to start the CMake configuration process and once its finished, you can simply go to toolbar and click `CMake -> Build All`. + +Once it has finished, hopefully with no errors, look in the newly created `/build` directory in the project's folder. Inside are the development versions +of all the SoftEtherVPN components. + +Congrats, you now have a complete CMake development environment for SoftEtherVPN on Windows, enjoy and happy contributing! + +Download Links: +- Visual Studio 2017 from Microsoft: https://visualstudio.microsoft.com/downloads ************************************ Thank You Using SoftEther VPN ! diff --git a/src/BuildAll.cmd b/src/BuildAll.cmd index 2ceec531..f3e2a148 100644 --- a/src/BuildAll.cmd +++ b/src/BuildAll.cmd @@ -1,6 +1,6 @@ SETLOCAL SET BATCH_FILE_NAME=%0 -SET BATCH_DIR_NAME=%0\.. +SET BATCH_DIR_PATH=%~dp0 SET NOW_TMP=%time:~0,2% SET NOW=%date:~0,4%%date:~5,2%%date:~8,2%_%NOW_TMP: =0%%time:~3,2%%time:~6,2% @@ -20,13 +20,18 @@ if not exist "C:\windows\Microsoft.NET\Framework\v3.5" ( echo on -if exist "%BATCH_DIR_NAME%\bin\BuildUtil.exe" ( - del "%BATCH_DIR_NAME%\bin\BuildUtil.exe" +copy "%BATCH_DIR_PATH%..\AUTHORS.TXT" "%BATCH_DIR_PATH%bin\hamcore\authors.txt" + +echo f | xcopy "%BATCH_DIR_PATH%BuildFiles\Library\vs2008\Win32_Release\ossl_static.pdb" "%BATCH_DIR_PATH%DebugFiles\pdb\Win32_Release\ossl_static.pdb" +echo f | xcopy "%BATCH_DIR_PATH%BuildFiles\Library\vs2008\x64_Release\ossl_static.pdb" "%BATCH_DIR_PATH%DebugFiles\pdb\x64_Release\ossl_static.pdb" + +if exist "%BATCH_DIR_PATH%bin\BuildUtil.exe" ( + del "%BATCH_DIR_PATH%bin\BuildUtil.exe" ) -C:\windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /toolsversion:3.5 /target:Clean;Rebuild /property:Configuration=Debug "%BATCH_DIR_NAME%\BuildUtil\BuildUtil.csproj" +C:\windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /toolsversion:3.5 /target:Clean;Rebuild /property:Configuration=Debug "%BATCH_DIR_PATH%BuildUtil\BuildUtil.csproj" -cd %BATCH_DIR_NAME%\bin +cd "%BATCH_DIR_PATH%bin" BuildUtil.exe /CMD:All diff --git a/src/BuildFiles/Library/Win32_Debug/libeay32.lib b/src/BuildFiles/Library/Win32_Debug/libeay32.lib deleted file mode 100644 index cf203711..00000000 Binary files a/src/BuildFiles/Library/Win32_Debug/libeay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/Win32_Debug/ssleay32.lib b/src/BuildFiles/Library/Win32_Debug/ssleay32.lib deleted file mode 100644 index 7ebbc494..00000000 Binary files a/src/BuildFiles/Library/Win32_Debug/ssleay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/Win32_Debug/zlib.lib b/src/BuildFiles/Library/Win32_Debug/zlib.lib deleted file mode 100644 index cdda429c..00000000 Binary files a/src/BuildFiles/Library/Win32_Debug/zlib.lib and /dev/null differ diff --git a/src/BuildFiles/Library/Win32_Release/libeay32.lib b/src/BuildFiles/Library/Win32_Release/libeay32.lib deleted file mode 100644 index 84e322db..00000000 Binary files a/src/BuildFiles/Library/Win32_Release/libeay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/Win32_Release/ssleay32.lib b/src/BuildFiles/Library/Win32_Release/ssleay32.lib deleted file mode 100644 index 53b98f42..00000000 Binary files a/src/BuildFiles/Library/Win32_Release/ssleay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/Win32_Release/zlib.lib b/src/BuildFiles/Library/Win32_Release/zlib.lib deleted file mode 100644 index 36f89247..00000000 Binary files a/src/BuildFiles/Library/Win32_Release/zlib.lib and /dev/null differ diff --git a/src/BuildFiles/Library/vs2008/OpenSSL_Build_ID.txt b/src/BuildFiles/Library/vs2008/OpenSSL_Build_ID.txt new file mode 100644 index 00000000..57a37c32 --- /dev/null +++ b/src/BuildFiles/Library/vs2008/OpenSSL_Build_ID.txt @@ -0,0 +1 @@ +crosslib_win32_191019_02 diff --git a/src/BuildFiles/Library/vs2008/Win32_Debug/libeay32.lib b/src/BuildFiles/Library/vs2008/Win32_Debug/libeay32.lib new file mode 100644 index 00000000..6fbba649 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/Win32_Debug/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/Win32_Debug/ssleay32.lib b/src/BuildFiles/Library/vs2008/Win32_Debug/ssleay32.lib new file mode 100644 index 00000000..f76c67c8 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/Win32_Debug/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/Win32_Debug/zlib.lib b/src/BuildFiles/Library/vs2008/Win32_Debug/zlib.lib new file mode 100644 index 00000000..fee4c3cb Binary files /dev/null and b/src/BuildFiles/Library/vs2008/Win32_Debug/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2008/Win32_Release/libeay32.lib b/src/BuildFiles/Library/vs2008/Win32_Release/libeay32.lib new file mode 100644 index 00000000..a9e8e125 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/Win32_Release/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/Win32_Release/ssleay32.lib b/src/BuildFiles/Library/vs2008/Win32_Release/ssleay32.lib new file mode 100644 index 00000000..48e957ef Binary files /dev/null and b/src/BuildFiles/Library/vs2008/Win32_Release/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/Win32_Release/zlib.lib b/src/BuildFiles/Library/vs2008/Win32_Release/zlib.lib new file mode 100644 index 00000000..b8af3f93 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/Win32_Release/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2008/x64_Debug/libeay32.lib b/src/BuildFiles/Library/vs2008/x64_Debug/libeay32.lib new file mode 100644 index 00000000..e8958374 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/x64_Debug/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/x64_Debug/ssleay32.lib b/src/BuildFiles/Library/vs2008/x64_Debug/ssleay32.lib new file mode 100644 index 00000000..c880e503 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/x64_Debug/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/x64_Debug/zlib.lib b/src/BuildFiles/Library/vs2008/x64_Debug/zlib.lib new file mode 100644 index 00000000..87955653 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/x64_Debug/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2008/x64_Release/libeay32.lib b/src/BuildFiles/Library/vs2008/x64_Release/libeay32.lib new file mode 100644 index 00000000..8fe66050 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/x64_Release/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/x64_Release/ssleay32.lib b/src/BuildFiles/Library/vs2008/x64_Release/ssleay32.lib new file mode 100644 index 00000000..03494a6f Binary files /dev/null and b/src/BuildFiles/Library/vs2008/x64_Release/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2008/x64_Release/zlib.lib b/src/BuildFiles/Library/vs2008/x64_Release/zlib.lib new file mode 100644 index 00000000..e22f2507 Binary files /dev/null and b/src/BuildFiles/Library/vs2008/x64_Release/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2008/zlib_Build_ID.txt b/src/BuildFiles/Library/vs2008/zlib_Build_ID.txt new file mode 100644 index 00000000..57a37c32 --- /dev/null +++ b/src/BuildFiles/Library/vs2008/zlib_Build_ID.txt @@ -0,0 +1 @@ +crosslib_win32_191019_02 diff --git a/src/BuildFiles/Library/vs2017/OpenSSL_Build_ID.txt b/src/BuildFiles/Library/vs2017/OpenSSL_Build_ID.txt new file mode 100644 index 00000000..57a37c32 --- /dev/null +++ b/src/BuildFiles/Library/vs2017/OpenSSL_Build_ID.txt @@ -0,0 +1 @@ +crosslib_win32_191019_02 diff --git a/src/BuildFiles/Library/vs2017/Win32_Debug/libeay32.lib b/src/BuildFiles/Library/vs2017/Win32_Debug/libeay32.lib new file mode 100644 index 00000000..a7d18bf7 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/Win32_Debug/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/Win32_Debug/ssleay32.lib b/src/BuildFiles/Library/vs2017/Win32_Debug/ssleay32.lib new file mode 100644 index 00000000..4507f5a0 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/Win32_Debug/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/Win32_Debug/zlib.lib b/src/BuildFiles/Library/vs2017/Win32_Debug/zlib.lib new file mode 100644 index 00000000..54a5362b Binary files /dev/null and b/src/BuildFiles/Library/vs2017/Win32_Debug/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2017/Win32_Release/libeay32.lib b/src/BuildFiles/Library/vs2017/Win32_Release/libeay32.lib new file mode 100644 index 00000000..e0836cd1 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/Win32_Release/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/Win32_Release/ssleay32.lib b/src/BuildFiles/Library/vs2017/Win32_Release/ssleay32.lib new file mode 100644 index 00000000..91e5e605 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/Win32_Release/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/Win32_Release/zlib.lib b/src/BuildFiles/Library/vs2017/Win32_Release/zlib.lib new file mode 100644 index 00000000..d0331dab Binary files /dev/null and b/src/BuildFiles/Library/vs2017/Win32_Release/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2017/x64_Debug/libeay32.lib b/src/BuildFiles/Library/vs2017/x64_Debug/libeay32.lib new file mode 100644 index 00000000..4ddec2ce Binary files /dev/null and b/src/BuildFiles/Library/vs2017/x64_Debug/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/x64_Debug/ssleay32.lib b/src/BuildFiles/Library/vs2017/x64_Debug/ssleay32.lib new file mode 100644 index 00000000..0a0be1e9 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/x64_Debug/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/x64_Debug/zlib.lib b/src/BuildFiles/Library/vs2017/x64_Debug/zlib.lib new file mode 100644 index 00000000..ff6d3248 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/x64_Debug/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2017/x64_Release/libeay32.lib b/src/BuildFiles/Library/vs2017/x64_Release/libeay32.lib new file mode 100644 index 00000000..530c26d6 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/x64_Release/libeay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/x64_Release/ssleay32.lib b/src/BuildFiles/Library/vs2017/x64_Release/ssleay32.lib new file mode 100644 index 00000000..67c0c8c8 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/x64_Release/ssleay32.lib differ diff --git a/src/BuildFiles/Library/vs2017/x64_Release/zlib.lib b/src/BuildFiles/Library/vs2017/x64_Release/zlib.lib new file mode 100644 index 00000000..3a1657a7 Binary files /dev/null and b/src/BuildFiles/Library/vs2017/x64_Release/zlib.lib differ diff --git a/src/BuildFiles/Library/vs2017/zlib_Build_ID.txt b/src/BuildFiles/Library/vs2017/zlib_Build_ID.txt new file mode 100644 index 00000000..57a37c32 --- /dev/null +++ b/src/BuildFiles/Library/vs2017/zlib_Build_ID.txt @@ -0,0 +1 @@ +crosslib_win32_191019_02 diff --git a/src/BuildFiles/Library/x64_Debug/libeay32.lib b/src/BuildFiles/Library/x64_Debug/libeay32.lib deleted file mode 100644 index ccc2f69d..00000000 Binary files a/src/BuildFiles/Library/x64_Debug/libeay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/x64_Debug/ssleay32.lib b/src/BuildFiles/Library/x64_Debug/ssleay32.lib deleted file mode 100644 index 1327f4eb..00000000 Binary files a/src/BuildFiles/Library/x64_Debug/ssleay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/x64_Debug/zlib.lib b/src/BuildFiles/Library/x64_Debug/zlib.lib deleted file mode 100644 index da852576..00000000 Binary files a/src/BuildFiles/Library/x64_Debug/zlib.lib and /dev/null differ diff --git a/src/BuildFiles/Library/x64_Release/libeay32.lib b/src/BuildFiles/Library/x64_Release/libeay32.lib deleted file mode 100644 index a3c712b6..00000000 Binary files a/src/BuildFiles/Library/x64_Release/libeay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/x64_Release/ssleay32.lib b/src/BuildFiles/Library/x64_Release/ssleay32.lib deleted file mode 100644 index 5451fbee..00000000 Binary files a/src/BuildFiles/Library/x64_Release/ssleay32.lib and /dev/null differ diff --git a/src/BuildFiles/Library/x64_Release/zlib.lib b/src/BuildFiles/Library/x64_Release/zlib.lib deleted file mode 100644 index 9be4c609..00000000 Binary files a/src/BuildFiles/Library/x64_Release/zlib.lib and /dev/null differ diff --git a/src/BuildFiles/VerScript/ver.rc b/src/BuildFiles/VerScript/ver.rc index 34f8aecb..0b36b425 100644 --- a/src/BuildFiles/VerScript/ver.rc +++ b/src/BuildFiles/VerScript/ver.rc @@ -1,8 +1,8 @@ #pragma code_page(932) 1 VERSIONINFO - FILEVERSION $VER_MAJOR$,$VER_MINOR$,0,$VER_BUILD$ - PRODUCTVERSION $VER_MAJOR$,$VER_MINOR$,0,$VER_BUILD$ + FILEVERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},0,${PROJECT_VERSION_PATCH} + PRODUCTVERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},0,${PROJECT_VERSION_PATCH} FILEFLAGSMASK 0x17L FILEOS 0x4L FILETYPE 0x1L @@ -12,15 +12,15 @@ BEGIN BEGIN BLOCK "041104b0" BEGIN - VALUE "CompanyName", "SoftEther VPN Project at University of Tsukuba, Japan. (Developer Edition)" - VALUE "FileDescription", "$PRODUCTNAME$ (Developer Edition)" - VALUE "FileVersion", "$VER_MAJOR$, $VER_MINOR$, 0, $VER_BUILD$" - VALUE "InternalName", "$INTERNALNAME$ (Developer Edition)" - VALUE "LegalCopyright", "Copyright (C) 2012-$YEAR$ SoftEther VPN Project. All Rights Reserved. (Developer Edition)" - VALUE "LegalTrademarks", "SoftEther(R) is a registered trademark of SoftEther Corporation in Japan, United Status and People's Republic of China. SoftEther Corporation is a company founded at University of Tsukuba, Japan." - VALUE "OriginalFilename", "$FILENAME$" - VALUE "ProductName", "$PRODUCTNAME$ (Developer Edition)" - VALUE "ProductVersion", "$VER_MAJOR$, $VER_MINOR$, 0, $VER_BUILD$" + VALUE "CompanyName", "SoftEther VPN Project at University of Tsukuba, Japan." + VALUE "FileDescription", "${PROJECT_NAME} ${COMPONENT_NAME} (Developer Edition)" + VALUE "FileVersion", "${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, 0, ${PROJECT_VERSION_PATCH}" + VALUE "InternalName", "${COMPONENT_INTERNAL_NAME}" + VALUE "LegalCopyright", "Copyright (c) 2012-${DATE_YEAR} all contributors on SoftEther VPN project in GitHub. Copyright (C) 2004-${DATE_YEAR} Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. All Rights Reserved." + VALUE "LegalTrademarks", "SoftEther(R) is a registered trademark of SoftEther Corporation in Japan, United States and People's Republic of China. SoftEther Corporation is a company founded at University of Tsukuba, Japan." + VALUE "OriginalFilename", "${COMPONENT_FILE_NAME}" + VALUE "ProductName", "${PROJECT_NAME} ${COMPONENT_NAME}" + VALUE "ProductVersion", "${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, 0, ${PROJECT_VERSION_PATCH}" END END BLOCK "VarFileInfo" diff --git a/src/BuildUtil/BuildUtilCommands.cs b/src/BuildUtil/BuildUtilCommands.cs index 3fd77482..79dddd00 100644 --- a/src/BuildUtil/BuildUtilCommands.cs +++ b/src/BuildUtil/BuildUtilCommands.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; @@ -535,6 +429,8 @@ namespace BuildUtil IO.ReadFile(Path.Combine(src_bindir, @"hamcore\warning_ja.txt")), true); zip.AddFileSimple("ReadMeFirst_Important_Notices_en.txt", DateTime.Now, FileAttributes.Normal, IO.ReadFile(Path.Combine(src_bindir, @"hamcore\warning_en.txt")), true); + zip.AddFileSimple("ReadMeFirst_Important_Notices_ru.txt", DateTime.Now, FileAttributes.Normal, + IO.ReadFile(Path.Combine(src_bindir, @"hamcore\warning_ru.txt")), true); zip.AddFileSimple("ReadMeFirst_Important_Notices_cn.txt", DateTime.Now, FileAttributes.Normal, IO.ReadFile(Path.Combine(src_bindir, @"hamcore\warning_cn.txt")), true); zip.Finish(); diff --git a/src/BuildUtil/BuildUtilMain.cs b/src/BuildUtil/BuildUtilMain.cs index 79d62e0a..b3b3e7a4 100644 --- a/src/BuildUtil/BuildUtilMain.cs +++ b/src/BuildUtil/BuildUtilMain.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CodeSign.cs b/src/BuildUtil/CodeSign.cs index 82ffb674..9da51394 100644 --- a/src/BuildUtil/CodeSign.cs +++ b/src/BuildUtil/CodeSign.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Bmp.cs b/src/BuildUtil/CoreUtil/Bmp.cs index 4afcd2e4..e63b8dbc 100644 --- a/src/BuildUtil/CoreUtil/Bmp.cs +++ b/src/BuildUtil/CoreUtil/Bmp.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Buf.cs b/src/BuildUtil/CoreUtil/Buf.cs index 8aa4e4f4..25e76c70 100644 --- a/src/BuildUtil/CoreUtil/Buf.cs +++ b/src/BuildUtil/CoreUtil/Buf.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Cache.cs b/src/BuildUtil/CoreUtil/Cache.cs index 43225371..637c1b03 100644 --- a/src/BuildUtil/CoreUtil/Cache.cs +++ b/src/BuildUtil/CoreUtil/Cache.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Compress.cs b/src/BuildUtil/CoreUtil/Compress.cs index 8ba48f30..64947527 100644 --- a/src/BuildUtil/CoreUtil/Compress.cs +++ b/src/BuildUtil/CoreUtil/Compress.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Console.cs b/src/BuildUtil/CoreUtil/Console.cs index bedeac42..4ad9865d 100644 --- a/src/BuildUtil/CoreUtil/Console.cs +++ b/src/BuildUtil/CoreUtil/Console.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Csv.cs b/src/BuildUtil/CoreUtil/Csv.cs index 8147cd4e..bbc65f42 100644 --- a/src/BuildUtil/CoreUtil/Csv.cs +++ b/src/BuildUtil/CoreUtil/Csv.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Env.cs b/src/BuildUtil/CoreUtil/Env.cs index 38be4707..be10c79e 100644 --- a/src/BuildUtil/CoreUtil/Env.cs +++ b/src/BuildUtil/CoreUtil/Env.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/FileIO.cs b/src/BuildUtil/CoreUtil/FileIO.cs index 52787a5f..1417014a 100644 --- a/src/BuildUtil/CoreUtil/FileIO.cs +++ b/src/BuildUtil/CoreUtil/FileIO.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/GZip.cs b/src/BuildUtil/CoreUtil/GZip.cs index e3eecd42..1869d427 100644 --- a/src/BuildUtil/CoreUtil/GZip.cs +++ b/src/BuildUtil/CoreUtil/GZip.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Kernel.cs b/src/BuildUtil/CoreUtil/Kernel.cs index 19dbaf87..45e666e5 100644 --- a/src/BuildUtil/CoreUtil/Kernel.cs +++ b/src/BuildUtil/CoreUtil/Kernel.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/MultiLang.cs b/src/BuildUtil/CoreUtil/MultiLang.cs index 926691e2..99c4482b 100644 --- a/src/BuildUtil/CoreUtil/MultiLang.cs +++ b/src/BuildUtil/CoreUtil/MultiLang.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Packer.cs b/src/BuildUtil/CoreUtil/Packer.cs index 7818df18..1b4f36b0 100644 --- a/src/BuildUtil/CoreUtil/Packer.cs +++ b/src/BuildUtil/CoreUtil/Packer.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/RC4.cs b/src/BuildUtil/CoreUtil/RC4.cs index c14b18c5..c633109f 100644 --- a/src/BuildUtil/CoreUtil/RC4.cs +++ b/src/BuildUtil/CoreUtil/RC4.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/ReadIni.cs b/src/BuildUtil/CoreUtil/ReadIni.cs index b50a2249..f71b651d 100644 --- a/src/BuildUtil/CoreUtil/ReadIni.cs +++ b/src/BuildUtil/CoreUtil/ReadIni.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Reg.cs b/src/BuildUtil/CoreUtil/Reg.cs index 85df9fba..b3c1b669 100644 --- a/src/BuildUtil/CoreUtil/Reg.cs +++ b/src/BuildUtil/CoreUtil/Reg.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Secure.cs b/src/BuildUtil/CoreUtil/Secure.cs index 63abd1c3..8d6ca942 100644 --- a/src/BuildUtil/CoreUtil/Secure.cs +++ b/src/BuildUtil/CoreUtil/Secure.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Stb.cs b/src/BuildUtil/CoreUtil/Stb.cs index 3c4c88a7..7fe4a627 100644 --- a/src/BuildUtil/CoreUtil/Stb.cs +++ b/src/BuildUtil/CoreUtil/Stb.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Str.cs b/src/BuildUtil/CoreUtil/Str.cs index 8d1f16b4..8caeeee6 100644 --- a/src/BuildUtil/CoreUtil/Str.cs +++ b/src/BuildUtil/CoreUtil/Str.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Tar.cs b/src/BuildUtil/CoreUtil/Tar.cs index 0c4dd877..2cc7725a 100644 --- a/src/BuildUtil/CoreUtil/Tar.cs +++ b/src/BuildUtil/CoreUtil/Tar.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Thread.cs b/src/BuildUtil/CoreUtil/Thread.cs index 19c1ffb1..caa45e41 100644 --- a/src/BuildUtil/CoreUtil/Thread.cs +++ b/src/BuildUtil/CoreUtil/Thread.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Time.cs b/src/BuildUtil/CoreUtil/Time.cs index d1d5b0a2..484eb4f4 100644 --- a/src/BuildUtil/CoreUtil/Time.cs +++ b/src/BuildUtil/CoreUtil/Time.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Util.cs b/src/BuildUtil/CoreUtil/Util.cs index 6635695d..8960d5ed 100644 --- a/src/BuildUtil/CoreUtil/Util.cs +++ b/src/BuildUtil/CoreUtil/Util.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Win32.cs b/src/BuildUtil/CoreUtil/Win32.cs index f8727a4f..cabfa04d 100644 --- a/src/BuildUtil/CoreUtil/Win32.cs +++ b/src/BuildUtil/CoreUtil/Win32.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/CoreUtil/Zip.cs b/src/BuildUtil/CoreUtil/Zip.cs index 4c605845..a4d86bd7 100644 --- a/src/BuildUtil/CoreUtil/Zip.cs +++ b/src/BuildUtil/CoreUtil/Zip.cs @@ -1,101 +1,4 @@ // CoreUtil -// -// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved. -// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/PEUtil.cs b/src/BuildUtil/PEUtil.cs index 6fef810b..a4fb1d2b 100644 --- a/src/BuildUtil/PEUtil.cs +++ b/src/BuildUtil/PEUtil.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/Properties/Resources.Designer.cs b/src/BuildUtil/Properties/Resources.Designer.cs index 0561aa3c..6e5266b8 100644 --- a/src/BuildUtil/Properties/Resources.Designer.cs +++ b/src/BuildUtil/Properties/Resources.Designer.cs @@ -7,100 +7,6 @@ // コードが再生成されるときに損失したりします。 // //------------------------------------------------------------------------------ -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. namespace BuildUtil.Properties { diff --git a/src/BuildUtil/Properties/Settings.Designer.cs b/src/BuildUtil/Properties/Settings.Designer.cs index e17f4720..43178190 100644 --- a/src/BuildUtil/Properties/Settings.Designer.cs +++ b/src/BuildUtil/Properties/Settings.Designer.cs @@ -7,100 +7,7 @@ // コードが再生成されるときに損失したりします。 // //------------------------------------------------------------------------------ -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. + namespace BuildUtil.Properties { diff --git a/src/BuildUtil/Test.cs b/src/BuildUtil/Test.cs index 780f4f2b..af98e9c5 100644 --- a/src/BuildUtil/Test.cs +++ b/src/BuildUtil/Test.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/UnixBuildSoftwares.cs b/src/BuildUtil/UnixBuildSoftwares.cs index f11063c3..2bc30ccf 100644 --- a/src/BuildUtil/UnixBuildSoftwares.cs +++ b/src/BuildUtil/UnixBuildSoftwares.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; @@ -143,6 +37,7 @@ namespace BuildUtil @"bin\BuiltHamcoreFiles", @"bin\hamcore", "Cedar", + "vpntest", "Mayaqua", "Neo", "vpnbridge", @@ -307,6 +202,17 @@ namespace BuildUtil tar.AddFileSimple(targetName + @"\" + "ReadMeFirst_Important_Notices_en.txt", destData, 0, destData.Length, DateTime.Now); } + if (true) + { + string srcData = File.ReadAllText(Path.Combine(Paths.BinDirName, @"hamcore\warning_ru.txt"), + enc); + + byte[] destData = enc.GetBytes(srcData); + + tar.AddFileSimple(targetName + @"\" + "ReadMeFirst_Important_Notices_ru.txt", destData, 0, destData.Length, DateTime.Now); + } + + if (true) { string srcData = File.ReadAllText(Path.Combine(Paths.BinDirName, @"hamcore\warning_cn.txt"), @@ -731,7 +637,7 @@ namespace BuildUtil { string[] programNames = { - "Ham", + "vpntest", "vpnserver", "vpnbridge", "vpnclient", diff --git a/src/BuildUtil/VpnBuilder.cs b/src/BuildUtil/VpnBuilder.cs index 1e4c5242..f235bcc9 100644 --- a/src/BuildUtil/VpnBuilder.cs +++ b/src/BuildUtil/VpnBuilder.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/VpnBuilderConfig.cs b/src/BuildUtil/VpnBuilderConfig.cs index 07fc17b8..aa4b4db0 100644 --- a/src/BuildUtil/VpnBuilderConfig.cs +++ b/src/BuildUtil/VpnBuilderConfig.cs @@ -1,112 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. - using System; using System.Threading; diff --git a/src/BuildUtil/VpnBuilderConfigTypes.cs b/src/BuildUtil/VpnBuilderConfigTypes.cs index 2b62a04c..43a0d9ef 100644 --- a/src/BuildUtil/VpnBuilderConfigTypes.cs +++ b/src/BuildUtil/VpnBuilderConfigTypes.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/Web References/HvSignService/Reference.cs b/src/BuildUtil/Web References/HvSignService/Reference.cs index 33921979..05d55165 100644 --- a/src/BuildUtil/Web References/HvSignService/Reference.cs +++ b/src/BuildUtil/Web References/HvSignService/Reference.cs @@ -7,100 +7,7 @@ // コードが再生成されるときに損失したりします。 // //------------------------------------------------------------------------------ -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. + // diff --git a/src/BuildUtil/Web References/SignService/Reference.cs b/src/BuildUtil/Web References/SignService/Reference.cs index fe838f44..ea32a82a 100644 --- a/src/BuildUtil/Web References/SignService/Reference.cs +++ b/src/BuildUtil/Web References/SignService/Reference.cs @@ -7,100 +7,7 @@ // コードが再生成されるときに損失したりします。 // //------------------------------------------------------------------------------ -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. + // diff --git a/src/BuildUtil/Win32BuildSoftware.cs b/src/BuildUtil/Win32BuildSoftware.cs index 6c4018c7..f6772504 100644 --- a/src/BuildUtil/Win32BuildSoftware.cs +++ b/src/BuildUtil/Win32BuildSoftware.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; diff --git a/src/BuildUtil/Win32BuildUtil.cs b/src/BuildUtil/Win32BuildUtil.cs index 1edc9d9c..fb6cfb2c 100644 --- a/src/BuildUtil/Win32BuildUtil.cs +++ b/src/BuildUtil/Win32BuildUtil.cs @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Build Utility -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. using System; @@ -199,24 +93,19 @@ namespace BuildUtil string exeFileName = Path.GetFileName(targetExeName); string internalName = Path.GetFileNameWithoutExtension(exeFileName); - if (Str.IsEmptyStr(product_name) == false) - { - body = Str.ReplaceStr(body, "$PRODUCTNAME$", product_name); - } - else - { #if !BU_SOFTETHER - body = Str.ReplaceStr(body, "$PRODUCTNAME$", "PacketiX VPN"); + body = Str.ReplaceStr(body, "${PROJECT_NAME}", "PacketiX VPN"); #else - body = Str.ReplaceStr(body, "$PRODUCTNAME$", "SoftEther VPN"); + body = Str.ReplaceStr(body, "${PROJECT_NAME}", "SoftEther VPN"); #endif - } - body = Str.ReplaceStr(body, "$INTERNALNAME$", internalName); - body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString()); - body = Str.ReplaceStr(body, "$FILENAME$", exeFileName); - body = Str.ReplaceStr(body, "$VER_MAJOR$", versionMajor.ToString()); - body = Str.ReplaceStr(body, "$VER_MINOR$", versionMinor.ToString()); - body = Str.ReplaceStr(body, "$VER_BUILD$", versionBuild.ToString()); + + body = Str.ReplaceStr(body, "${COMPONENT_NAME}", product_name); + body = Str.ReplaceStr(body, "${COMPONENT_INTERNAL_NAME}", internalName); + body = Str.ReplaceStr(body, "${DATE_YEAR}", date.Year.ToString()); + body = Str.ReplaceStr(body, "${COMPONENT_FILE_NAME}", exeFileName); + body = Str.ReplaceStr(body, "${PROJECT_VERSION_MAJOR}", versionMajor.ToString()); + body = Str.ReplaceStr(body, "${PROJECT_VERSION_MINOR}", versionMinor.ToString()); + body = Str.ReplaceStr(body, "${PROJECT_VERSION_PATCH}", versionBuild.ToString()); IO f = IO.CreateTempFileByExt(".rc"); string filename = f.Name; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8842cab4..9f34aa06 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,49 +1,32 @@ -include(GNUInstallDirs) +if(UNIX) + # Creates wrapper scripts and installs them in the user's binaries directory, which is usually "/usr/local/bin". + # This is required because symlinks use the folder they are in as working directory. + macro(install_wrapper_script component target) + get_filename_component(file_name ${target} NAME) -# Creates wrapper scripts and installs them in the user's binaries directory, which is usually "/usr/local/bin". -# This is required because symlinks use the folder they are in as working directory. -macro(install_wrapper_script component target) - get_filename_component(file_name ${target} NAME) + file(WRITE ${TOP_DIRECTORY}/tmp/script/${file_name} "#!/bin/sh\n") + file(APPEND ${TOP_DIRECTORY}/tmp/script/${file_name} "${target} \"$@\"\n") + file(APPEND ${TOP_DIRECTORY}/tmp/script/${file_name} "exit $?\n") - file(WRITE ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} "#!/bin/sh\n") - file(APPEND ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} "${target} \"$@\"\n") - file(APPEND ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} "exit $?\n") - - install(FILES ${CMAKE_SOURCE_DIR}/tmp/script/${file_name} - COMPONENT ${component} - DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -endmacro(install_wrapper_script) - -macro(install_systemd_service component file_path binary_path) - get_filename_component(file_name ${file_path} NAME) - get_filename_component(binary_directory ${binary_path} DIRECTORY) - - file(READ ${file_path} FILE_CONTENT) - string(REPLACE "[DIRECTORY]" ${binary_directory} FILE_CONTENT ${FILE_CONTENT}) - string(REPLACE "[BINARY]" ${binary_path} FILE_CONTENT ${FILE_CONTENT}) - file(WRITE ${CMAKE_SOURCE_DIR}/tmp/systemd/${file_name} ${FILE_CONTENT}) - - if(EXISTS "/lib/systemd/system") - install(FILES ${CMAKE_SOURCE_DIR}/tmp/systemd/${file_name} + install(FILES ${TOP_DIRECTORY}/tmp/script/${file_name} COMPONENT ${component} - DESTINATION "/lib/systemd/system" - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) - endif() -endmacro(install_systemd_service) - -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-D_DEBUG -DDEBUG) + endmacro(install_wrapper_script) endif() -if(CMAKE_BUILD_TYPE STREQUAL "Release") +if(BUILD_TYPE STREQUAL "Debug") + add_definitions(-D_DEBUG -DDEBUG) +else() add_definitions(-DNDEBUG -DVPN_SPEED) endif() if(CMAKE_SIZEOF_VOID_P EQUAL 8) - add_definitions(-DCPU_64) + set(COMPILER_ARCHITECTURE "x64") + add_definitions(-DCPU_64) +else() + set(COMPILER_ARCHITECTURE "x86") endif() add_definitions(-D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64) @@ -52,7 +35,7 @@ add_definitions(-D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_S include_directories(.) if(WIN32) - message(FATAL_ERROR "Windows compilation via CMake is currently not supported.") + add_definitions(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS) endif() if(UNIX) @@ -101,101 +84,47 @@ add_subdirectory(hamcorebuilder) # vpnserver add_subdirectory(vpnserver) -get_target_property(VPNSERVER_RUNTIME_OUTPUT_DIRECTORY vpnserver RUNTIME_OUTPUT_DIRECTORY) # vpnclient add_subdirectory(vpnclient) -get_target_property(VPNCLIENT_RUNTIME_OUTPUT_DIRECTORY vpnclient RUNTIME_OUTPUT_DIRECTORY) # vpnbridge add_subdirectory(vpnbridge) -get_target_property(VPNBRIDGE_RUNTIME_OUTPUT_DIRECTORY vpnbridge RUNTIME_OUTPUT_DIRECTORY) # vpncmd add_subdirectory(vpncmd) -get_target_property(VPNCMD_RUNTIME_OUTPUT_DIRECTORY vpncmd RUNTIME_OUTPUT_DIRECTORY) + +# vpntest +add_subdirectory(vpntest) # hamcore.se2 archive file add_custom_target(hamcore-archive-build ALL - COMMAND hamcorebuilder ${CMAKE_SOURCE_DIR}/src/bin/hamcore/ ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 + COMMAND hamcorebuilder "${TOP_DIRECTORY}/src/bin/hamcore/" "${BUILD_DIRECTORY}/hamcore.se2" DEPENDS hamcorebuilder COMMENT "Building hamcore.se2 archive file..." VERBATIM ) -# Copy hamcore.se2 to vpnserver's directory -add_custom_command(TARGET hamcore-archive-build - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNSERVER_RUNTIME_OUTPUT_DIRECTORY} -) +if(WIN32) + # PenCore + add_subdirectory(PenCore) + add_dependencies(hamcore-archive-build PenCore) -# Copy hamcore.se2 to vpnclient's directory -add_custom_command(TARGET hamcore-archive-build - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNCLIENT_RUNTIME_OUTPUT_DIRECTORY} -) + # vpnsmgr + add_subdirectory(vpnsmgr) -# Copy hamcore.se2 to vpnbridge's directory -add_custom_command(TARGET hamcore-archive-build - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNBRIDGE_RUNTIME_OUTPUT_DIRECTORY} -) + # vpncmgr + add_subdirectory(vpncmgr) +endif() -# Copy hamcore.se2 to vpncmd's directory -add_custom_command(TARGET hamcore-archive-build - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNCMD_RUNTIME_OUTPUT_DIRECTORY} -) - -# Copy "vpnserver" directory to /usr/lib(exec)/softether/, install launch script and systemd service -install(DIRECTORY ${VPNSERVER_RUNTIME_OUTPUT_DIRECTORY} - COMPONENT "vpnserver" - DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" - PATTERN "*" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) - -install_wrapper_script("vpnserver" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver") -install_systemd_service("vpnserver" "${CMAKE_SOURCE_DIR}/systemd/softether-vpnserver.service" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver") - -# Copy "vpnclient" directory to /usr/lib(exec)/softether/, install launch script and systemd service -install(DIRECTORY ${VPNCLIENT_RUNTIME_OUTPUT_DIRECTORY} - COMPONENT "vpnclient" - DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" - PATTERN "*" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) - -install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient") -install_systemd_service("vpnclient" "${CMAKE_SOURCE_DIR}/systemd/softether-vpnclient.service" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient") - -# Copy "vpnbridge" directory to /usr/lib(exec)/softether/, install launch script and systemd service -install(DIRECTORY ${VPNBRIDGE_RUNTIME_OUTPUT_DIRECTORY} - COMPONENT "vpnbridge" - DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" - PATTERN "*" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) - -install_wrapper_script("vpnbridge" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge") -install_systemd_service("vpnbridge" "${CMAKE_SOURCE_DIR}/systemd/softether-vpnbridge.service" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge") - -# Copy "vpncmd" directory to /usr/lib(exec)/softether/, install launch script and systemd service -install(DIRECTORY ${VPNCMD_RUNTIME_OUTPUT_DIRECTORY} - COMPONENT "vpncmd" - DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" - PATTERN "*" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) - -install_wrapper_script("vpncmd" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpncmd/vpncmd") - -# Print message after installing the targets -install(CODE "message(\"\n----------------------------------------------------------------------------------------------------------------------------\")") -install(CODE "message(\"Build completed successfully.\n\")") -install(CODE "message(\"Execute 'vpnserver start' to run the SoftEther VPN Server background service.\")") -install(CODE "message(\"Execute 'vpnbridge start' to run the SoftEther VPN Bridge background service.\")") -install(CODE "message(\"Execute 'vpnclient start' to run the SoftEther VPN Client background service.\")") -install(CODE "message(\"Execute 'vpncmd' to run the SoftEther VPN Command-Line Utility to configure VPN Server, VPN Bridge or VPN Client.\")") -install(CODE "message(\"----------------------------------------------------------------------------------------------------------------------------\n\")") +if(UNIX) + # Print message after installing the targets + install(CODE "message(\"\n----------------------------------------------------------------------------------------------------------------------------\")") + install(CODE "message(\"Build completed successfully.\n\")") + install(CODE "message(\"Execute 'vpnserver start' to run the SoftEther VPN Server background service.\")") + install(CODE "message(\"Execute 'vpnbridge start' to run the SoftEther VPN Bridge background service.\")") + install(CODE "message(\"Execute 'vpnclient start' to run the SoftEther VPN Client background service.\")") + install(CODE "message(\"Execute 'vpncmd' to run the SoftEther VPN Command-Line Utility to configure VPN Server, VPN Bridge or VPN Client.\")") + install(CODE "message(\"----------------------------------------------------------------------------------------------------------------------------\n\")") +endif() diff --git a/src/Cedar/Account.c b/src/Cedar/Account.c index 4d548628..67f45e46 100644 --- a/src/Cedar/Account.c +++ b/src/Cedar/Account.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Account.c @@ -159,18 +53,6 @@ POLICY_ITEM policy_item[] = {37, true, true, 1, 4095, 0, "POL_INT_VLAN"}, // VLanId }; -// Normalize policy name -char *NormalizePolicyName(char *name) -{ - // Validate arguments - if (name == NULL) - { - return NULL; - } - - return PolicyIdToStr(PolicyStrToId(name)); -} - // Format policy value void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value) { @@ -348,6 +230,7 @@ UINT PolicyNum() // Check the name is valid for account name bool IsUserName(char *name) { + UINT i, len; char tmp[MAX_SIZE]; // Validate arguments if (name == NULL) @@ -360,7 +243,8 @@ bool IsUserName(char *name) Trim(name); - if (StrLen(name) == 0) + len = StrLen(name); + if (len == 0) { return false; } @@ -370,14 +254,12 @@ bool IsUserName(char *name) return true; } - if (IsSafeStr(name) == false) + for (i = 0; i < len; i++) { - return false; - } - - if (StrCmpi(name, "link") == 0) - { - return false; + if (IsSafeChar(name[i]) == false && name[i] != '@') + { + return false; + } } if (StrCmpi(name, LINK_USER_NAME) == 0) @@ -519,32 +401,6 @@ void SetUserPolicy(USER *u, POLICY *policy) Unlock(u->lock); } -// Get user policy -POLICY *GetUserPolicy(USER *u) -{ - POLICY *ret; - // Validate arguments - if (u == NULL) - { - return NULL; - } - - Lock(u->lock); - { - if (u->Policy == NULL) - { - ret = NULL; - } - else - { - ret = ClonePolicy(u->Policy); - } - } - Unlock(u->lock); - - return ret; -} - // Set group policy void SetGroupPolicy(USERGROUP *g, POLICY *policy) { @@ -1416,3 +1272,49 @@ int CompareUserName(void *p1, void *p2) return StrCmpi(u1->Name, u2->Name); } +// Get the MAC address from the user's note string +bool GetUserMacAddressFromUserNote(UCHAR *mac, wchar_t *note) +{ + bool ret = false; + UINT i; + + Zero(mac, 6); + if (mac == NULL || note == NULL) + { + return false; + } + + i = UniSearchStrEx(note, USER_MAC_STR_PREFIX, 0, false); + if (i != INFINITE) + { + wchar_t *macstr_start = ¬e[i + UniStrLen(USER_MAC_STR_PREFIX)]; + wchar_t macstr2[MAX_SIZE]; + UNI_TOKEN_LIST *tokens; + + UniStrCpy(macstr2, sizeof(macstr2), macstr_start); + + UniTrim(macstr2); + + tokens = UniParseToken(macstr2, L" ,/()[]."); + if (tokens != NULL) + { + if (tokens->NumTokens >= 1) + { + wchar_t *macstr = tokens->Token[0]; + + if (UniIsEmptyStr(macstr) == false) + { + char macstr_a[MAX_SIZE]; + + UniToStr(macstr_a, sizeof(macstr_a), macstr); + + ret = StrToMac(mac, macstr_a); + } + } + + UniFreeToken(tokens); + } + } + + return ret; +} diff --git a/src/Cedar/Account.h b/src/Cedar/Account.h index dfef9039..37a55c31 100644 --- a/src/Cedar/Account.h +++ b/src/Cedar/Account.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Account.h @@ -114,6 +8,8 @@ #ifndef ACCOUNT_H #define ACCOUNT_H +#define USER_MAC_STR_PREFIX L"MAC:" + // Policy item struct POLICY_ITEM { @@ -295,7 +191,6 @@ POLICY *GetDefaultPolicy(); POLICY *ClonePolicy(POLICY *policy); void SetUserPolicy(USER *u, POLICY *policy); void OverwritePolicy(POLICY **target, POLICY *p); -POLICY *GetUserPolicy(USER *u); void SetGroupPolicy(USERGROUP *g, POLICY *policy); POLICY *GetGroupPolicy(USERGROUP *g); wchar_t *GetPolicyTitle(UINT id); @@ -309,8 +204,7 @@ char *PolicyIdToStr(UINT i); POLICY_ITEM *GetPolicyItem(UINT id); void GetPolicyValueRangeStr(wchar_t *str, UINT size, UINT id); void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value); -char *NormalizePolicyName(char *name); - +bool GetUserMacAddressFromUserNote(UCHAR *mac, wchar_t *note); #endif // ACCOUNT_H diff --git a/src/Cedar/Admin.c b/src/Cedar/Admin.c index 1d837d9c..f5e6ef56 100644 --- a/src/Cedar/Admin.c +++ b/src/Cedar/Admin.c @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - ELIN (https://github.com/el1n) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Admin.c @@ -382,6 +274,1157 @@ CAPSLIST *ScGetCapsEx(RPC *rpc) return t; } + + +// Process server side include +BUF *AdminWebProcessServerSideInclude(BUF *src_txt, char *filename, UINT depth) +{ + char *src_str; + UINT src_str_size; + UINT i, len; + BUF *ret = NULL; + UINT pos = 0; + char dirname[MAX_PATH]; + if (src_txt == NULL || filename == NULL || depth >= 4) + { + return CloneBuf(src_txt); + } + if (EndWith(filename, ".html") == false) + { + // We process only .html files + return CloneBuf(src_txt); + } + + GetDirNameFromFilePath(dirname, sizeof(dirname), filename); + + src_str_size = src_txt->Size + 1; + src_str = ZeroMalloc(src_str_size); + + Copy(src_str, src_txt->Buf, src_txt->Size); + + len = StrLen(src_str); + + ret = NewBuf(); + + for (i = 0;i < len;i++) + { + char *start_tag = ""; + UINT x; + + Zero(inc_filename, sizeof(inc_filename)); + + StrCpy(inc_filename, sizeof(inc_filename), src_str + i + StrLen(start_tag) + 1); + inc_filename[b - (i + StrLen(start_tag) + 1)] = 0; + + x = SearchStrEx(src_str, end_tag, b + 1, true); + + if ((x != INFINITE) && (x >= (b + 1))) + { + BUF *inc_buf; + char full_inc_filename[MAX_PATH]; + + if (StartWith(inc_filename, "/")) + { + Format(full_inc_filename, sizeof(full_inc_filename), "|wwwroot/%s", inc_filename + 1); + } + else + { + StrCpy(full_inc_filename, sizeof(full_inc_filename), dirname); + StrCat(full_inc_filename, sizeof(full_inc_filename), "/"); + StrCat(full_inc_filename, sizeof(full_inc_filename), inc_filename); + } + + Debug("dirname = %s, full_inc_filename (src) = %s\n\n", dirname, full_inc_filename); + NormalizePath(full_inc_filename, sizeof(full_inc_filename), full_inc_filename); + + if (StartWith(full_inc_filename, "|wwwroot/") == false + && StartWith(full_inc_filename, "|wwwroot\\") == false) + { + char tmp[MAX_PATH]; + Format(tmp, sizeof(tmp), "|wwwroot/%s", full_inc_filename); + StrCpy(full_inc_filename, sizeof(full_inc_filename), tmp); + } + + Debug("inc_filename = %s\nfull_inc_filename = %s\n\n", inc_filename, full_inc_filename); + + inc_buf = ReadDump(full_inc_filename); + + if (inc_buf != NULL) + { + BUF *inc_buf2; + + inc_buf2 = AdminWebProcessServerSideInclude(inc_buf, full_inc_filename, depth + 1); + + BufSkipUtf8Bom(inc_buf2); + WriteBufBufWithOffset(ret, inc_buf2); + + FreeBuf(inc_buf); + FreeBuf(inc_buf2); + } + else + { + Debug("Loading SSI '%s' error.\n", inc_buf); + } + + i = (x + StrLen(end_tag) - 1); + + is_ssi = true; + } + } + } + } + + if (is_ssi == false) + { + WriteBufChar(ret, src_str[i]); + } + } + + Free(src_str); + + return ret; +} + +// Handle the file request +bool AdminWebHandleFileRequest(ADMIN *a, CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_src, char *query_string, char *virtual_root_dir, char *physical_root_dir) +{ + bool ret = false; + char url[MAX_PATH]; + UINT i, len; + if (a == NULL || c == NULL || s == NULL || h == NULL || query_string == NULL || + virtual_root_dir == NULL || physical_root_dir == NULL) + { + return false; + } + + StrCpy(url, sizeof(url), url_src); + + len = StrLen(url); + for (i = 0;i < len;i++) + { + if (url[i] == '\\') + { + url[i] = '/'; + } + } + + // Is dangerous URL? + if (InStr(url, "..") || InStr(url, "//") || InStr(url, "\\\\") || InStr(url, "/\\") || InStr(url, "\\/")) + { + ret = AdminWebSend404Error(s, h); + } + else + { + char filename[MAX_PATH]; + bool is_index_file = false; + + BUF *b = AdminWebTryFindAndReadFile(virtual_root_dir, physical_root_dir, url, + filename, sizeof(filename), &is_index_file); + + if (b == NULL) + { + ret = AdminWebSend404Error(s, h); + } + else + { + if (is_index_file && EndWith(url, "/") == false) + { + char url2[MAX_PATH]; + StrCpy(url2, sizeof(url2), url); + StrCat(url2, sizeof(url2), "/"); + ret = AdminWebSend302Redirect(s, url2, query_string, h); + } + else if (is_index_file == false && EndWith(url, "/")) + { + char url2[MAX_PATH]; + TrimEndWith(url2, sizeof(url2), url, "/"); + ret = AdminWebSend302Redirect(s, url2, query_string, h); + } + else + { + BUF *b2 = AdminWebProcessServerSideInclude(b, filename, 0); + char *mime = GetMimeTypeFromFileName(filename); + + if (mime == NULL) + { + mime = "application/octet-stream"; + } + + ret = AdminWebSendBody(s, 200, "OK", b2->Buf, b2->Size, mime, NULL, NULL, h); + + FreeBuf(b2); + } + FreeBuf(b); + } + } + + return ret; +} + +// Try to find a file, and if exists return the file contents +BUF *AdminWebTryFindAndReadFile(char *vroot, char *proot, char *url, char *ret_filename, UINT ret_filename_size, bool *is_index_html) +{ + char tmp[MAX_PATH]; + char tmp2[MAX_PATH]; + UINT vroot_len; + UINT url_len; + char relative_path[MAX_PATH]; + BUF *b; + if (vroot == NULL || proot == NULL || url == NULL || ret_filename == NULL || is_index_html == NULL) + { + return NULL; + } + + *is_index_html = false; + + if (StartWith(url, vroot) == false) + { + return NULL; + } + + vroot_len = StrLen(vroot); + url_len = StrLen(url); + + StrCpy(relative_path, sizeof(relative_path), url + vroot_len); + + if (StartWith(relative_path, "/")) + { + char tmp3[MAX_PATH]; + + StrCpy(tmp3, sizeof(tmp3), relative_path + 1); + StrCpy(relative_path, sizeof(relative_path), tmp3); + } + + CombinePath(tmp, sizeof(tmp), proot, relative_path); + + // index.html + CombinePath(tmp2, sizeof(tmp2), tmp, "index.html"); + b = AdminWebTryOneFile(tmp2, ret_filename, ret_filename_size); + if (b != NULL) + { + *is_index_html = true; + return b; + } + + // dirname/filename + StrCpy(tmp2, sizeof(tmp2), tmp); + b = AdminWebTryOneFile(tmp2, ret_filename, ret_filename_size); + if (b != NULL) + { + return b; + } + + return NULL; +} +BUF *AdminWebTryOneFile(char *filename, char *ret_filename, UINT ret_filename_size) +{ + BUF *b; + if (filename == NULL || ret_filename == NULL) + { + return NULL; + } + + b = ReadDump(filename); + if (b == NULL) + { + return NULL; + } + + StrCpy(ret_filename, ret_filename_size, filename); + + return b; +} + +// Send a 401 Unauthorized error +bool AdminWebSendUnauthorized(SOCK *s, HTTP_HEADER *http_request_headers) +{ + char *http_401_str = "\r\n\r\n401 Unauthorized\r\n\r\n

" CEDAR_SERVER_STR ": Administrative authentication required.

\r\n

This VPN Server could not verify that you are authorized to access to the \r\nserver in administrative mode.

\r\n

For web browser logins:
You must supply the HTTP basic \r\nauthentication credential as following.

\r\n
    \r\n\t
  • To login to the VPN server as the entire server administrator, specify empty or "administrator" as the username field, and specify the server administrative \r\n\tpassword as the password field.
  • \r\n\t
  • To login to a particular Virtual Hub as the hub administrator, specify \r\n\tthe hub name as the username field, and specify the hub administrative \r\n\tpassword as the password field.
  • \r\n
\r\n

For JSON-RPC client logins:
Instead to HTTP basic \r\nauthentication, you can also specify the HTTP header parameters as following.

\r\n
    \r\n\t
  • X-VPNADMIN-HUBNAME: Empty to login to the VPN Server as the entire \r\n\tserver administrator, or specify the target Virtual Hub name as the hub \r\n\tadministrator.
  • \r\n\t
  • X-VPNADMIN-PASSWORD: Specify the administrative password.
  • \r\n
\r\n\r\n"; + bool ret; + // Validate arguments + if (s == NULL || http_request_headers == NULL) + { + return false; + } + + // Creating a Data + ret = AdminWebSendBody(s, 401, "Unauthorized", http_401_str, StrLen(http_401_str), HTTP_CONTENT_TYPE, + "WWW-Authenticate", + "Basic realm=\"Username 'administrator' for entire VPN Server privilege, or specify Virtual Hub name as the username for specified Virtual Hub administrative privilege.\"", + http_request_headers); + + return ret; +} + +// Send reply +bool AdminWebSendBody(SOCK *s, UINT status_code, char *status_string, UCHAR *data, UINT data_size, char *content_type, char *add_header_name, char *add_header_value, + HTTP_HEADER *request_headers) +{ + HTTP_HEADER *h; + char date_str[MAX_SIZE]; + char error_code_str[16]; + bool ret = false; + HTTP_VALUE *origin; + if (s == NULL || status_string == NULL || (data_size != 0 && data == NULL) || request_headers == NULL) + { + return false; + } + if (content_type == NULL) + { + content_type = "text/html; charset=utf-8"; + } + + ToStr(error_code_str, status_code); + GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); + + h = NewHttpHeader("HTTP/1.1", error_code_str, status_string); + + if (StrCmpi(request_headers->Method, "OPTIONS") == 0) + { + AddHttpValue(h, NewHttpValue("Allow", "OPTIONS, GET, POST")); + } + + AddHttpValue(h, NewHttpValue("Cache-Control", "no-cache")); + AddHttpValue(h, NewHttpValue("Content-Type", content_type)); + AddHttpValue(h, NewHttpValue("Date", date_str)); + AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); + AddHttpValue(h, NewHttpValue("Access-Control-Allow-Methods", "OPTIONS,GET,POST")); + AddHttpValue(h, NewHttpValue("Access-Control-Allow-Headers", "X-VPNADMIN-HUBNAME,X-VPNADMIN-PASSWORD")); + AddHttpValue(h, NewHttpValue("Access-Control-Allow-Credentials", "true")); + + origin = GetHttpValue(request_headers, "Origin"); + if (origin != NULL) + { + AddHttpValue(h, NewHttpValue("Access-Control-Allow-Origin", origin->Data)); + } + + if (add_header_name != NULL && add_header_value != NULL) + { + AddHttpValue(h, NewHttpValue(add_header_name, add_header_value)); + } + + ret = PostHttp(s, h, data, data_size); + + FreeHttpHeader(h); + + return ret; +} + +// Send 404 error +bool AdminWebSend404Error(SOCK *s, HTTP_HEADER *request_headers) +{ + char *body = "\r\n404 Not Found

Not Found

The requested URL was not found on this server.

\r\n"; + if (s == NULL || request_headers == NULL) + { + return false; + } + + return AdminWebSendBody(s, 404, "Not Found", body, StrLen(body), NULL, NULL, NULL, request_headers); +} + +// Send 302 redirect +bool AdminWebSend302Redirect(SOCK *s, char *url, char *query_string, HTTP_HEADER *request_headers) +{ + bool ret = false; + char *txt; + UINT txt_size; + char *url2; + UINT url2_size; + char *body = "Object moved\r\n

Object moved to here.

\r\n"; + if (s == NULL || url == NULL || request_headers == NULL) + { + return false; + } + + url2_size = (StrSize(url) + StrSize(query_string) + MAX_SIZE) * 2; + url2 = ZeroMalloc(url2_size); + + StrCpy(url2, url2_size, url); + if (IsEmptyStr(query_string) == false) + { + StrCat(url2, url2_size, "?"); + StrCat(url2, url2_size, query_string); + } + + txt_size = (StrSize(body) + StrSize(url2) + MAX_SIZE) * 2; + txt = ZeroMalloc(txt_size); + + ReplaceStrEx(txt, txt_size, body, "$URL$", url2, false); + + ret = AdminWebSendBody(s, 302, "Found", txt, StrLen(txt), NULL, "Location", url2, request_headers); + + Free(txt); + + Free(url2); + + return ret; +} + +// "/admin" web page POST handler +void AdminWebProcPost(CONNECTION *c, SOCK *s, HTTP_HEADER *h, UINT post_data_size, char *url_target) +{ + ADMIN *a; + UCHAR *data; + char url[MAX_PATH]; + char query_string[MAX_SIZE]; + UINT i; + if (c == NULL || s == NULL || h == NULL || url_target == NULL) + { + return; + } + + a = JsonRpcAuthLogin(c->Cedar, s, h); + if (a == NULL) + { + RecvAllWithDiscard(s, post_data_size, s->SecureMode); + AdminWebSendUnauthorized(s, h); + return; + } + + if (post_data_size > a->MaxJsonRpcRecvSize) + { + Disconnect(s); + return; + } + + data = ZeroMalloc(post_data_size + 1); + + if (RecvAll(s, data, post_data_size, s->SecureMode)) + { + c->JsonRpcAuthed = true; +#ifndef GC_SOFTETHER_OSS + RemoveDosEntry(c->Listener, s); +#endif // GC_SOFTETHER_OSS + + // Divide url_target into URL and query string + StrCpy(url, sizeof(url), url_target); + Zero(query_string, sizeof(query_string)); + i = SearchStr(url, "?", 0); + if (i != INFINITE) + { + StrCpy(query_string, sizeof(query_string), url + i + 1); + url[i] = 0; + } + + AdminWebHandleFileRequest(a, c, s, h, url, query_string, "/admin", "|wwwroot/admin"); + } + + Free(data); + Free(a); +} + +// "/admin" web page GET handler +void AdminWebProcGet(CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_target) +{ + ADMIN *a; + char url[MAX_PATH]; + char query_string[MAX_SIZE]; + UINT i; + if (c == NULL || s == NULL || h == NULL || url_target == NULL) + { + return; + } + + a = JsonRpcAuthLogin(c->Cedar, s, h); + if (a == NULL) + { + AdminWebSendUnauthorized(s, h); + return; + } + + c->JsonRpcAuthed = true; +#ifndef GC_SOFTETHER_OSS + RemoveDosEntry(c->Listener, s); +#endif // GC_SOFTETHER_OSS + + // Divide url_target into URL and query string + StrCpy(url, sizeof(url), url_target); + Zero(query_string, sizeof(query_string)); + i = SearchStr(url, "?", 0); + if (i != INFINITE) + { + StrCpy(query_string, sizeof(query_string), url + i + 1); + url[i] = 0; + } + + AdminWebHandleFileRequest(a, c, s, h, url, query_string, "/admin", "|wwwroot/admin"); + + Free(a); +} + +// New JSON-RPC Result +JSON_VALUE *JsonRpcNewResponse(PACK *p) +{ + JSON_VALUE *jv; + JSON_OBJECT *jo; + JSON_VALUE *jv2; + + if (p == NULL) + { + return NULL; + } + + jv = JsonNewObject(); + jo = JsonValueGetObject(jv); + + jv2 = PackToJson(p); + + JsonSet(jo, "result", jv2); + + return jv; +} + +// New JSON-RPC Error +JSON_VALUE *JsonRpcNewError(int code, wchar_t *message) +{ + wchar_t msg[MAX_PATH]; + JSON_VALUE *jv; + JSON_OBJECT *jo; + JSON_VALUE *jv2; + JSON_OBJECT *jo2; + + if (UniIsEmptyStr(message)) + { + UniFormat(msg, sizeof(msg), L"Error code %u", code); + } + else + { + UniFormat(msg, sizeof(msg), L"Error code %u: %s", code, message); + } + + jv = JsonNewObject(); + jo = JsonValueGetObject(jv); + + jv2 = JsonNewObject(); + jo2 = JsonValueGetObject(jv2); + + JsonSet(jo, "error", jv2); + + JsonSetNumber(jo2, "code", (UINT64)code); + JsonSetUniStr(jo2, "message", msg); + + return jv; +} + +// JSON-RPC process request object +JSON_VALUE *JsonRpcProcRequestObject(ADMIN *admin, CONNECTION *c, SOCK *s, JSON_VALUE *json_req, char *method_name) +{ + PACK *pack_request; + JSON_VALUE *ret = NULL; + if (c == NULL || s == NULL || json_req == NULL || admin == NULL) + { + return NULL; + } + + pack_request = JsonToPack(json_req); + + PackAddStr(pack_request, "function_name", method_name); + + if (pack_request != NULL) + { + RPC *rpc; + PACK *pack_response; + UINT err; + + // RPC Server + rpc = StartRpcServer(s, AdminDispatch, admin); + + admin->Rpc = rpc; + + pack_response = CallRpcDispatcher(rpc, pack_request); + + if (pack_response == NULL) + { + pack_response = PackError(ERR_NOT_SUPPORTED); + } + + RpcFreeEx(rpc, true); + + FreePack(pack_request); + + // Construct response object + err = GetErrorFromPack(pack_response); + if (err != 0) + { + // Return the error + ret = JsonRpcNewError(err, _E(err)); + } + else + { + // Return the PACK + ret = JsonRpcNewResponse(pack_response); + } + + SLog(admin->Server->Cedar, "LS_API_RPC_CALL", + &s->RemoteIP, s->RemotePort, s->RemoteHostname, + method_name, err, _E(err)); + + FreePack(pack_response); + } + + return ret; +} + +// JSON-RPC HTTP user authentication +bool HttpParseBasicAuthHeader(HTTP_HEADER *h, char *username, UINT username_size, char *password, UINT password_size) +{ + bool ret = false; + HTTP_VALUE *auth_value; + HTTP_VALUE *vpnadmin_hubname; + HTTP_VALUE *vpnadmin_password; + if (h == NULL || username == NULL || password == NULL) + { + return false; + } + + auth_value = GetHttpValue(h, "Authorization"); + vpnadmin_hubname = GetHttpValue(h, "X-VPNADMIN-HUBNAME"); + vpnadmin_password = GetHttpValue(h, "X-VPNADMIN-PASSWORD"); + + if (vpnadmin_password != NULL) + { + if (vpnadmin_hubname == NULL) + { + StrCpy(username, username_size, ""); + } + else + { + StrCpy(username, username_size, vpnadmin_hubname->Data); + } + + StrCpy(password, password_size, vpnadmin_password->Data); + + ret = true; + } + + if (ret == false && auth_value != NULL) + { + char key[32], value[MAX_SIZE]; + + if (GetKeyAndValue(auth_value->Data, key, sizeof(key), value, sizeof(value), " \t")) + { + if (StrCmpi(key, "Basic") == 0 && IsEmptyStr(value) == false) + { + UINT b64_dest_size = StrSize(value) * 2 + 256; + char *b64_dest = ZeroMalloc(b64_dest_size); + + Decode64(b64_dest, value); + + if (IsEmptyStr(b64_dest) == false) + { + if (b64_dest[0] == ':') + { + // Empty username + StrCpy(username, username_size, ""); + StrCpy(password, password_size, b64_dest + 1); + ret = true; + } + else + { + if (GetKeyAndValue(b64_dest, username, username_size, password, password_size, ":")) + { + ret = true; + } + } + } + + Free(b64_dest); + } + } + } + + return ret; +} + +// JSON-RPC Login +ADMIN *JsonRpcAuthLogin(CEDAR *c, SOCK *sock, HTTP_HEADER *h) +{ + ADMIN *a = NULL; + char username[MAX_HUBNAME_LEN + 1]; + char password[MAX_PASSWORD_LEN + 1]; + SERVER *s; + char empty_pw_hash[SHA1_SIZE]; + + if (c == NULL || h == NULL || sock == NULL) + { + return NULL; + } + + s = c->Server; + + HashAdminPassword(empty_pw_hash, ""); + + Zero(username, sizeof(username)); + Zero(password, sizeof(password)); + + if (HttpParseBasicAuthHeader(h, username, sizeof(username), password, sizeof(password))) + { + char pw_hash[SHA1_SIZE]; + bool is_server_admin = false; + bool is_hub_admin = false; + char hub_name[MAX_HUBNAME_LEN + 1]; + + HashAdminPassword(pw_hash, password); + + Zero(hub_name, sizeof(hub_name)); + + // Check if the server administrator password is empty. If yes, login always success. + if (Cmp(s->HashedPassword, empty_pw_hash, SHA1_SIZE) == 0) + { + is_server_admin = true; + } + else + { + if (IsEmptyStr(username) || StrCmpi(username, ADMINISTRATOR_USERNAME) == 0) + { + // If the username is empty or 'administrator', verify with the server admin password. + if (Cmp(s->HashedPassword, pw_hash, SHA1_SIZE) == 0) + { + is_server_admin = true; + } + } + } + + if (is_server_admin == false) + { + HUB *h; + // Hub admin mode + LockHubList(c); + { + h = GetHub(c, username); + } + UnlockHubList(c); + + if (h != NULL) + { + Lock(h->lock); + { + if (Cmp(pw_hash, h->HashedPassword, SHA1_SIZE) == 0) + { + is_hub_admin = true; + + StrCpy(hub_name, sizeof(hub_name), h->Name); + } + } + Unlock(h->lock); + + ReleaseHub(h); + } + } + + if (is_server_admin || is_hub_admin) + { + if (CheckAdminSourceAddress(sock, hub_name)) + { + a = ZeroMalloc(sizeof(ADMIN)); + + a->Server = s; + a->ServerAdmin = is_server_admin; + a->ClientBuild = c->Build; + + if (is_hub_admin) + { + StrCpy(a->dummy1, sizeof(a->dummy1), hub_name); + a->HubName = a->dummy1; + } + } + } + } + + if (a != NULL) + { + char admin_mode[256]; + if (a->ServerAdmin) + { + a->MaxJsonRpcRecvSize = ADMIN_RPC_MAX_POST_SIZE_BY_SERVER_ADMIN; + } + else + { + a->MaxJsonRpcRecvSize = ADMIN_RPC_MAX_POST_SIZE_BY_HUB_ADMIN; + } + + if (IsEmptyStr(a->HubName)) + { + StrCpy(admin_mode, sizeof(admin_mode), + "Entire VPN Server Admin Mode"); + } + else + { + Format(admin_mode, sizeof(admin_mode), + "Virtual Hub Admin Mode for '%s'", + a->HubName); + } + + SLog(s->Cedar, "LS_API_AUTH_OK", + &sock->RemoteIP, sock->RemotePort, sock->RemoteHostname, + admin_mode, username, h->Method, h->Target); + } + else + { + SLog(s->Cedar, "LS_API_AUTH_ERROR", + &sock->RemoteIP, sock->RemotePort, sock->RemoteHostname, + username, h->Method, h->Target); + } + + + return a; +} + +// Query string to JSON list value +JSON_VALUE *QueryStringToJsonListValue(char *qs) +{ + TOKEN_LIST *t; + UINT i; + LIST *distinct_list = NULL; + JSON_VALUE *v = NULL; + JSON_OBJECT *o = NULL; + if (qs == NULL) + { + return NULL; + } + + t = ParseTokenWithoutNullStr(qs, "&"); + if (t == NULL) + { + return NULL; + } + + distinct_list = NewStrList(); + + v = JsonNewObject(); + o = JsonValueGetObject(v); + + for (i = 0;i < t->NumTokens;i++) + { + char *token = t->Token[i]; + UINT pos; + + pos = SearchStr(token, "=", 0); + if (pos != INFINITE) + { + char *key_decoded; + char *value_decoded; + char *key = CopyStr(token); + char *value = CopyStr(token + pos + 1); + + key[pos] = 0; + key_decoded = UrlDecode(key); + value_decoded = UrlDecode(value); + + if (key_decoded != NULL && value_decoded != NULL) + { + if (AddStrToStrListDistinct(distinct_list, key_decoded)) + { + JsonSetStr(o, key_decoded, value_decoded); + } + } + + Free(value_decoded); + Free(key_decoded); + Free(key); + Free(value); + } + } + + FreeToken(t); + + FreeStrList(distinct_list); + + return v; +} + +// Construct new JSON-RPC dummy request +JSON_VALUE *ConstructDummyJsonRpcRequest(char *method_name, JSON_VALUE *p) +{ + JSON_VALUE *ret; + JSON_OBJECT *ret_object; + UCHAR rand[16]; + char id_str[64]; + + Rand(rand, sizeof(rand)); + + BinToStr(id_str, sizeof(id_str), rand, sizeof(rand)); + + ret = JsonNewObject(); + ret_object = JsonObject(ret); + + JsonSetStr(ret_object, "jsonrpc", "2.0"); + JsonSetStr(ret_object, "method", method_name); + JsonSet(ret_object, "params", p); + JsonSetStr(ret_object, "id", id_str); + + return ret; +} + +// JSON-RPC Options Dispatch +void JsonRpcProcOptions(CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_target) +{ + if (c == NULL || s == NULL || h == NULL || url_target == NULL) + { + return; + } + + c->JsonRpcAuthed = true; + +#ifndef GC_SOFTETHER_OSS + RemoveDosEntry(c->Listener, s); +#endif // GC_SOFTETHER_OSS + + AdminWebSendBody(s, 200, "OK", NULL, 0, NULL, NULL, NULL, h); +} + +// JSON-RPC GET Dispatch +void JsonRpcProcGet(CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_target) +{ + ADMIN *a; + char url[MAX_PATH]; + char query_string[MAX_SIZE]; + UINT i; + bool reply_sent = false; + if (c == NULL || s == NULL || h == NULL || url_target == NULL) + { + return; + } + + a = JsonRpcAuthLogin(c->Cedar, s, h); + if (a == NULL) + { + AdminWebSendUnauthorized(s, h); + return; + } + + c->JsonRpcAuthed = true; + +#ifndef GC_SOFTETHER_OSS + RemoveDosEntry(c->Listener, s); +#endif // GC_SOFTETHER_OSS + + // Divide url_target into URL and query string + StrCpy(url, sizeof(url), url_target); + Zero(query_string, sizeof(query_string)); + i = SearchStr(url, "?", 0); + if (i != INFINITE) + { + StrCpy(query_string, sizeof(query_string), url + i + 1); + url[i] = 0; + } + + if (StartWith(url, "/api/")) + { + // Call a method + JSON_VALUE *params_value = NULL; + JSON_OBJECT *params_object = NULL; + UINT i; + char method_name[MAX_PATH]; + + StrCpy(method_name, sizeof(method_name), url + 5); + + i = SearchStr(method_name, "/", 0); + if (i != INFINITE) + { + method_name[i] = 0; + } + + if (IsEmptyStr(method_name) == false) + { + // Call a method + params_value = QueryStringToJsonListValue(query_string); + + if (params_value != NULL) + { + JSON_VALUE *json_ret = NULL; + char id[96]; + char *ret_str = NULL; + + GetDateTimeStrMilli64(id, sizeof(id), LocalTime64()); + + params_object = JsonObject(params_value); + + // Process the request + json_ret = JsonRpcProcRequestObject(a, c, s, params_value, method_name); + + if (json_ret == NULL) + { + json_ret = JsonRpcNewError(ERR_INTERNAL_ERROR, L"Internal error"); + } + + JsonSetStr(JsonObject(json_ret), "jsonrpc", "2.0"); + JsonSetStr(JsonObject(json_ret), "id", id); + + ret_str = JsonToStr(json_ret); + + AdminWebSendBody(s, 200, "OK", ret_str, StrLen(ret_str), "text/plain; charset=UTF-8", NULL, NULL, h); + + Free(ret_str); + JsonFree(json_ret); + JsonFree(params_value); + } + } + } + + + if (reply_sent == false) + { + BUF *html_buf = ReadDump("|vpnserver_api_doc.html"); + + if (html_buf != NULL) + { + AdminWebSendBody(s, 200, "OK", html_buf->Buf, html_buf->Size, "text/html; charset=UTF-8", NULL, NULL, h); + + FreeBuf(html_buf); + } + else + { + AdminWebSend404Error(s, h); + } + } + + if (a->LogFileList != NULL) + { + FreeEnumLogFile(a->LogFileList); + } + Free(a); +} + +// JSON-RPC POST Dispatch +void JsonRpcProcPost(CONNECTION *c, SOCK *s, HTTP_HEADER *h, UINT post_data_size) +{ + ADMIN *a; + UCHAR *data; + if (c == NULL || s == NULL || h == NULL) + { + return; + } + + a = JsonRpcAuthLogin(c->Cedar, s, h); + if (a == NULL) + { + RecvAllWithDiscard(s, post_data_size, s->SecureMode); + AdminWebSendUnauthorized(s, h); + return; + } + + if (post_data_size > a->MaxJsonRpcRecvSize) + { + Disconnect(s); + return; + } + + data = ZeroMalloc(post_data_size + 1); + + if (RecvAll(s, data, post_data_size, s->SecureMode)) + { + // Parse JSON + JSON_VALUE *json_req = StrToJson(data); + JSON_OBJECT *json_req_object = JsonObject(json_req); + JSON_VALUE *json_ret = NULL; + char *res = NULL; + char *request_id = NULL; + char *method_name = NULL; + + c->JsonRpcAuthed = true; + +#ifndef GC_SOFTETHER_OSS + RemoveDosEntry(c->Listener, s); +#endif // GC_SOFTETHER_OSS + + if (json_req == NULL || json_req_object == NULL) + { + // Parse error + json_ret = JsonRpcNewError(ERR_INVALID_PARAMETER, L"Parameter is invalid: JSON-RPC Parse Error"); + } + else + { + // check the JSON-RPC version + char *ver_str = JsonGetStr(json_req_object, "jsonrpc"); + if (StrCmpi(ver_str, "2.0") != 0) + { + // Invalid version + json_ret = JsonRpcNewError(ERR_INVALID_PARAMETER, L"JSON-RPC version is invalid"); + } + else + { + JSON_VALUE *params_value = NULL; + JSON_OBJECT *params_object = NULL; + + // Get Request ID + request_id = JsonGetStr(json_req_object, "id"); + + // Get method name + method_name = JsonGetStr(json_req_object, "method"); + + // Get parameters + params_value = JsonGet(json_req_object, "params"); + params_object = JsonObject(params_value); + + if (IsEmptyStr(method_name)) + { + // method is empty + json_ret = JsonRpcNewError(ERR_INVALID_PARAMETER, L"JSON-RPC method name is empty"); + } + else if (params_value == NULL || params_object == NULL) + { + // params is empty + json_ret = JsonRpcNewError(ERR_INVALID_PARAMETER, L"JSON-RPC parameter is empty"); + } + else + { + // Process the request + json_ret = JsonRpcProcRequestObject(a, c, s, params_value, method_name); + } + } + } + + if (json_ret == NULL) + { + json_ret = JsonRpcNewError(ERR_INTERNAL_ERROR, L"Internal error"); + } + + JsonSetStr(JsonObject(json_ret), "jsonrpc", "2.0"); + if (request_id == NULL) + { + request_id = "0"; + } + JsonSetStr(JsonObject(json_ret), "id", request_id); + + res = JsonToStr(json_ret); + + AdminWebSendBody(s, 200, "OK", res, StrLen(res), "application/json", NULL, NULL, h); + + Free(res); + + JsonFree(json_ret); + JsonFree(json_req); + } + + Free(data); + + if (a->LogFileList != NULL) + { + FreeEnumLogFile(a->LogFileList); + } + Free(a); +} + // Dispatch routine for Administration RPC PACK *AdminDispatch(RPC *rpc, char *name, PACK *p) { @@ -456,6 +1499,7 @@ PACK *AdminDispatch(RPC *rpc, char *name, PACK *p) DECLARE_RPC("GetFarmConnectionStatus", RPC_FARM_CONNECTION_STATUS, StGetFarmConnectionStatus, InRpcFarmConnectionStatus, OutRpcFarmConnectionStatus) DECLARE_RPC_EX("SetServerCert", RPC_KEY_PAIR, StSetServerCert, InRpcKeyPair, OutRpcKeyPair, FreeRpcKeyPair) DECLARE_RPC_EX("GetServerCert", RPC_KEY_PAIR, StGetServerCert, InRpcKeyPair, OutRpcKeyPair, FreeRpcKeyPair) + DECLARE_RPC_EX("GetServerCipherList", RPC_STR, StGetServerCipherList, InRpcStr, OutRpcStr, FreeRpcStr) DECLARE_RPC_EX("GetServerCipher", RPC_STR, StGetServerCipher, InRpcStr, OutRpcStr, FreeRpcStr) DECLARE_RPC_EX("SetServerCipher", RPC_STR, StSetServerCipher, InRpcStr, OutRpcStr, FreeRpcStr) DECLARE_RPC("CreateHub", RPC_CREATE_HUB, StCreateHub, InRpcCreateHub, OutRpcCreateHub) @@ -635,6 +1679,7 @@ DECLARE_SC_EX("EnumFarmMember", RPC_ENUM_FARM, ScEnumFarmMember, InRpcEnumFarm, DECLARE_SC("GetFarmConnectionStatus", RPC_FARM_CONNECTION_STATUS, ScGetFarmConnectionStatus, InRpcFarmConnectionStatus, OutRpcFarmConnectionStatus) DECLARE_SC_EX("SetServerCert", RPC_KEY_PAIR, ScSetServerCert, InRpcKeyPair, OutRpcKeyPair, FreeRpcKeyPair) DECLARE_SC_EX("GetServerCert", RPC_KEY_PAIR, ScGetServerCert, InRpcKeyPair, OutRpcKeyPair, FreeRpcKeyPair) +DECLARE_SC_EX("GetServerCipherList", RPC_STR, ScGetServerCipherList, InRpcStr, OutRpcStr, FreeRpcStr) DECLARE_SC_EX("GetServerCipher", RPC_STR, ScGetServerCipher, InRpcStr, OutRpcStr, FreeRpcStr) DECLARE_SC_EX("SetServerCipher", RPC_STR, ScSetServerCipher, InRpcStr, OutRpcStr, FreeRpcStr) DECLARE_SC("CreateHub", RPC_CREATE_HUB, ScCreateHub, InRpcCreateHub, OutRpcCreateHub) @@ -1900,8 +2945,20 @@ UINT StReadLogFile(ADMIN *a, RPC_READ_LOG_FILE *t) // Check the permission to read the log file if (a->LogFileList == NULL) { - // Cache not found - return ERR_OBJECT_NOT_FOUND; + // Enum the log files first + RPC_ENUM_LOG_FILE elf; + UINT elf_ret; + + Zero(&elf, sizeof(elf)); + + elf_ret = StEnumLogFile(a, &elf); + + FreeRpcEnumLogFile(&elf); + + if (elf_ret != ERR_NO_ERROR) + { + return elf_ret; + } } if (CheckLogFileNameFromEnumList(a->LogFileList, logfilename, servername) == false) { @@ -1966,6 +3023,10 @@ UINT StReadLogFile(ADMIN *a, RPC_READ_LOG_FILE *t) ALog(a, NULL, "LA_READ_LOG_FILE", servername, logfilename); } + StrCpy(t->FilePath, sizeof(t->FilePath), logfilename); + StrCpy(t->ServerName, sizeof(t->ServerName), servername); + t->Offset = offset; + return ERR_NO_ERROR; } @@ -2256,7 +3317,7 @@ UINT StSetCrl(ADMIN *a, RPC_CRL *t) if (crl == NULL) { - ret = ERR_INTERNAL_ERROR; + ret = ERR_OBJECT_NOT_FOUND; } else { @@ -2325,7 +3386,7 @@ UINT StGetCrl(ADMIN *a, RPC_CRL *t) if (crl == NULL) { - ret = ERR_INTERNAL_ERROR; + ret = ERR_OBJECT_NOT_FOUND; } else { @@ -2385,7 +3446,7 @@ UINT StDelCrl(ADMIN *a, RPC_CRL *t) if (crl == NULL) { - ret = ERR_INTERNAL_ERROR; + ret = ERR_OBJECT_NOT_FOUND; } else { @@ -3282,6 +4343,7 @@ UINT StGetHubAdminOptions(ADMIN *a, RPC_ADMIN_OPTION *t) StrCpy(e->Name, sizeof(e->Name), a->Name); e->Value = a->Value; + UniStrCpy(e->Descrption, sizeof(e->Descrption), GetHubAdminOptionHelpString(e->Name)); } } UnlockList(h->AdminOptionList); @@ -3314,6 +4376,7 @@ UINT StGetDefaultHubAdminOptions(ADMIN *a, RPC_ADMIN_OPTION *t) StrCpy(a->Name, sizeof(a->Name), admin_options[i].Name); a->Value = admin_options[i].Value; + UniStrCpy(a->Descrption, sizeof(a->Descrption), GetHubAdminOptionHelpString(a->Name)); } return ERR_NO_ERROR; @@ -3818,6 +4881,7 @@ UINT SiEnumIpTable(SERVER *s, char *hubname, RPC_ENUM_IP_TABLE *t) StrCpy(e->SessionName, sizeof(e->SessionName), table->Session->Name); e->Ip = IPToUINT(&table->Ip); Copy(&e->IpV6, &table->Ip, sizeof(IP)); + Copy(&e->IpAddress, &table->Ip, sizeof(IP)); e->DhcpAllocated = table->DhcpAllocated; e->CreatedTime = TickToTime(table->CreatedTime); e->UpdatedTime = TickToTime(table->UpdatedTime); @@ -4269,6 +5333,8 @@ UINT StGetSessionStatus(ADMIN *a, RPC_SESSION_STATUS *t) Copy(&t->ClientIp6, &s->Connection->ClientIp.ipv6_addr, sizeof(t->ClientIp6)); } + CopyIP(&t->ClientIpAddress, &s->Connection->ClientIp); + StrCpy(t->ClientHostName, sizeof(t->ClientHostName), s->Connection->ClientHostname); } } @@ -5430,31 +6496,34 @@ UINT StSetAccessList(ADMIN *a, RPC_ENUM_ACCESS_LIST *t) { UINT i; - // Confirm whether the access list of form which cannot handle by the old client already exists - if (a->ClientBuild < 6560) + if (a->ClientBuild != 0) { - for (i = 0;i < LIST_NUM(h->AccessList);i++) + // Confirm whether the access list of form which cannot handle by the old client already exists + if (a->ClientBuild < 6560) { - ACCESS *access = LIST_DATA(h->AccessList, i); - if (access->IsIPv6 || - access->Jitter != 0 || access->Loss != 0 || access->Delay != 0) + for (i = 0;i < LIST_NUM(h->AccessList);i++) { - ret = ERR_VERSION_INVALID; - break; + ACCESS *access = LIST_DATA(h->AccessList, i); + if (access->IsIPv6 || + access->Jitter != 0 || access->Loss != 0 || access->Delay != 0) + { + ret = ERR_VERSION_INVALID; + break; + } } } - } - if (a->ClientBuild < 8234) - { - for (i = 0;i < LIST_NUM(h->AccessList);i++) + if (a->ClientBuild < 8234) { - ACCESS *access = LIST_DATA(h->AccessList, i); - - if (IsEmptyStr(access->RedirectUrl) == false) + for (i = 0;i < LIST_NUM(h->AccessList);i++) { - ret = ERR_VERSION_INVALID; - break; + ACCESS *access = LIST_DATA(h->AccessList, i); + + if (IsEmptyStr(access->RedirectUrl) == false) + { + ret = ERR_VERSION_INVALID; + break; + } } } } @@ -5580,19 +6649,16 @@ UINT StAddAccess(ADMIN *a, RPC_ADD_ACCESS *t) if (no_include) { - if (no_include) + if (StartWith(t->Access.SrcUsername, ACCESS_LIST_INCLUDED_PREFIX) || + StartWith(t->Access.SrcUsername, ACCESS_LIST_EXCLUDED_PREFIX)) { - if (StartWith(t->Access.SrcUsername, ACCESS_LIST_INCLUDED_PREFIX) || - StartWith(t->Access.SrcUsername, ACCESS_LIST_EXCLUDED_PREFIX)) - { - ClearStr(t->Access.SrcUsername, sizeof(t->Access.SrcUsername)); - } + ClearStr(t->Access.SrcUsername, sizeof(t->Access.SrcUsername)); + } - if (StartWith(t->Access.DestUsername, ACCESS_LIST_INCLUDED_PREFIX) || - StartWith(t->Access.DestUsername, ACCESS_LIST_EXCLUDED_PREFIX)) - { - ClearStr(t->Access.DestUsername, sizeof(t->Access.DestUsername)); - } + if (StartWith(t->Access.DestUsername, ACCESS_LIST_INCLUDED_PREFIX) || + StartWith(t->Access.DestUsername, ACCESS_LIST_EXCLUDED_PREFIX)) + { + ClearStr(t->Access.DestUsername, sizeof(t->Access.DestUsername)); } } @@ -6558,6 +7624,7 @@ UINT StGetCa(ADMIN *a, RPC_HUB_GET_CA *t) FreeRpcHubGetCa(t); Zero(t, sizeof(RPC_HUB_GET_CA)); + t->Key = key; StrCpy(t->HubName, sizeof(t->HubName), hubname); CHECK_RIGHT; @@ -7153,6 +8220,7 @@ UINT StGetSecureNATStatus(ADMIN *a, RPC_NAT_STATUS *t) ReleaseHub(h); + StrCpy(t->HubName, sizeof(t->HubName), hubname); ret = ERR_NO_ERROR; return ret; @@ -8004,6 +9072,13 @@ UINT StSetHub(ADMIN *a, RPC_CREATE_HUB *t) return ERR_NOT_SUPPORTED; } + // For JSON-RPC + if (StrLen(t->AdminPasswordPlainText) != 0) + { + Sha0(t->HashedPassword, t->AdminPasswordPlainText, StrLen(t->AdminPasswordPlainText)); + HashPassword(t->SecurePassword, ADMINISTRATOR_USERNAME, t->AdminPasswordPlainText); + } + if (IsZero(t->HashedPassword, sizeof(t->HashedPassword)) == false && IsZero(t->SecurePassword, sizeof(t->SecurePassword)) == false) { @@ -8174,6 +9249,15 @@ UINT StCreateHub(ADMIN *a, RPC_CREATE_HUB *t) ALog(a, NULL, "LA_CREATE_HUB", t->HubName); + // For JSON-RPC + if ((IsZero(t->HashedPassword, sizeof(t->HashedPassword)) && + IsZero(t->SecurePassword, sizeof(t->SecurePassword))) || + StrLen(t->AdminPasswordPlainText) != 0) + { + Sha0(t->HashedPassword, t->AdminPasswordPlainText, StrLen(t->AdminPasswordPlainText)); + HashPassword(t->SecurePassword, ADMINISTRATOR_USERNAME, t->AdminPasswordPlainText); + } + h = NewHub(c, t->HubName, &o); Copy(h->HashedPassword, t->HashedPassword, SHA1_SIZE); Copy(h->SecurePassword, t->SecurePassword, SHA1_SIZE); @@ -8248,6 +9332,43 @@ UINT StGetServerCipher(ADMIN *a, RPC_STR *t) return ERR_NO_ERROR; } +// Get list of available ciphers for SSL +UINT StGetServerCipherList(ADMIN *a, RPC_STR *t) +{ + SERVER *s = a->Server; + CEDAR *c = s->Cedar; + + FreeRpcStr(t); + Zero(t, sizeof(RPC_STR)); + + Lock(c->lock); + { + UINT i; + TOKEN_LIST *ciphers = GetCipherList(); + if (ciphers->NumTokens > 0) + { + UINT size = StrSize(ciphers->Token[0]); + t->String = Malloc(size); + StrCpy(t->String, size, ciphers->Token[0]); + i = 1; + + for (; i < ciphers->NumTokens; i++) + { + // We use StrSize() because we need the extra space for ';' + size += StrSize(ciphers->Token[i]); + t->String = ReAlloc(t->String, size); + StrCat(t->String, size, ";"); + StrCat(t->String, size, ciphers->Token[i]); + } + } + + FreeToken(ciphers); + } + Unlock(c->lock); + + return ERR_NO_ERROR; +} + // Get the server certification UINT StGetServerCert(ADMIN *a, RPC_KEY_PAIR *t) { @@ -8590,6 +9711,11 @@ UINT StSetServerPassword(ADMIN *a, RPC_SET_PASSWORD *t) { SERVER_ADMIN_ONLY; + if (IsZero(t->HashedPassword, sizeof(t->HashedPassword))) + { + // For JSON-RPC + HashAdminPassword(t->HashedPassword, t->PlainTextPassword); + } Copy(a->Server->HashedPassword, t->HashedPassword, SHA1_SIZE); @@ -8922,6 +10048,8 @@ void InOpenVpnSstpConfig(OPENVPN_SSTP_CONFIG *t, PACK *p) t->EnableOpenVPN = PackGetBool(p, "EnableOpenVPN"); t->EnableSSTP = PackGetBool(p, "EnableSSTP"); PackGetStr(p, "OpenVPNPortList", t->OpenVPNPortList, sizeof(t->OpenVPNPortList)); + t->OpenVPNObfuscation= PackGetBool(p, "OpenVPNObfuscation"); + PackGetStr(p, "OpenVPNObfuscationMask", t->OpenVPNObfuscationMask, sizeof(t->OpenVPNObfuscationMask)); } void OutOpenVpnSstpConfig(PACK *p, OPENVPN_SSTP_CONFIG *t) { @@ -8934,6 +10062,8 @@ void OutOpenVpnSstpConfig(PACK *p, OPENVPN_SSTP_CONFIG *t) PackAddBool(p, "EnableOpenVPN", t->EnableOpenVPN); PackAddBool(p, "EnableSSTP", t->EnableSSTP); PackAddStr(p, "OpenVPNPortList", t->OpenVPNPortList); + PackAddBool(p, "OpenVPNObfuscation", t->OpenVPNObfuscation); + PackAddStr(p, "OpenVPNObfuscationMask", t->OpenVPNObfuscationMask); } // DDNS_CLIENT_STATUS @@ -8955,6 +10085,8 @@ void InDDnsClientStatus(DDNS_CLIENT_STATUS *t, PACK *p) PackGetStr(p, "DnsSuffix", t->DnsSuffix, sizeof(t->DnsSuffix)); PackGetStr(p, "CurrentIPv4", t->CurrentIPv4, sizeof(t->CurrentIPv4)); PackGetStr(p, "CurrentIPv6", t->CurrentIPv6, sizeof(t->CurrentIPv6)); + PackGetUniStr(p, "ErrStr_IPv4", t->ErrStr_IPv4, sizeof(t->ErrStr_IPv4)); + PackGetUniStr(p, "ErrStr_IPv6", t->ErrStr_IPv6, sizeof(t->ErrStr_IPv6)); } void OutDDnsClientStatus(PACK *p, DDNS_CLIENT_STATUS *t) { @@ -8971,6 +10103,8 @@ void OutDDnsClientStatus(PACK *p, DDNS_CLIENT_STATUS *t) PackAddStr(p, "DnsSuffix", t->DnsSuffix); PackAddStr(p, "CurrentIPv4", t->CurrentIPv4); PackAddStr(p, "CurrentIPv6", t->CurrentIPv6); + PackAddUniStr(p, "ErrStr_IPv4", t->ErrStr_IPv4); + PackAddUniStr(p, "ErrStr_IPv6", t->ErrStr_IPv6); } // INTERNET_SETTING @@ -8987,6 +10121,7 @@ void InRpcInternetSetting(INTERNET_SETTING *t, PACK *p) t->ProxyPort = PackGetInt(p, "ProxyPort"); PackGetStr(p, "ProxyUsername", t->ProxyUsername, sizeof(t->ProxyUsername)); PackGetStr(p, "ProxyPassword", t->ProxyPassword, sizeof(t->ProxyPassword)); + PackGetStr(p, "CustomHttpHeader", t->CustomHttpHeader, sizeof(t->CustomHttpHeader)); } void OutRpcInternetSetting(PACK *p, INTERNET_SETTING *t) { @@ -9001,6 +10136,7 @@ void OutRpcInternetSetting(PACK *p, INTERNET_SETTING *t) PackAddInt(p, "ProxyPort", t->ProxyPort); PackAddStr(p, "ProxyUsername", t->ProxyUsername); PackAddStr(p, "ProxyPassword", t->ProxyPassword); + PackAddStr(p, "CustomHttpHeader", t->CustomHttpHeader); } // RPC_AZURE_STATUS @@ -9122,6 +10258,7 @@ void OutRpcEnumEtherIpId(PACK *p, RPC_ENUM_ETHERIP_ID *t) PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "Settings"); for (i = 0;i < t->NumItem;i++) { ETHERIP_ID *e = &t->IdList[i]; @@ -9131,6 +10268,7 @@ void OutRpcEnumEtherIpId(PACK *p, RPC_ENUM_ETHERIP_ID *t) PackAddStrEx(p, "UserName", e->UserName, i, t->NumItem); PackAddStrEx(p, "Password", e->Password, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumEtherIpId(RPC_ENUM_ETHERIP_ID *t) { @@ -9301,6 +10439,7 @@ void OutRpcEnumEthVLan(PACK *p, RPC_ENUM_ETH_VLAN *t) return; } + PackSetCurrentJsonGroupName(p, "Devices"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_ETH_VLAN_ITEM *e = &t->Items[i]; @@ -9313,6 +10452,7 @@ void OutRpcEnumEthVLan(PACK *p, RPC_ENUM_ETH_VLAN *t) PackAddBoolEx(p, "Support", e->Support, i, t->NumItem); PackAddBoolEx(p, "Enabled", e->Enabled, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumEthVLan(RPC_ENUM_ETH_VLAN *t) { @@ -9360,6 +10500,7 @@ void OutRpcEnumLogFile(PACK *p, RPC_ENUM_LOG_FILE *t) PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "LogFiles"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_LOG_FILE_ITEM *e = &t->Items[i]; @@ -9367,8 +10508,9 @@ void OutRpcEnumLogFile(PACK *p, RPC_ENUM_LOG_FILE *t) PackAddStrEx(p, "FilePath", e->FilePath, i, t->NumItem); PackAddStrEx(p, "ServerName", e->ServerName, i, t->NumItem); PackAddIntEx(p, "FileSize", e->FileSize, i, t->NumItem); - PackAddInt64Ex(p, "UpdatedTime", e->UpdatedTime, i, t->NumItem); + PackAddTime64Ex(p, "UpdatedTime", e->UpdatedTime, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumLogFile(RPC_ENUM_LOG_FILE *t) { @@ -9503,12 +10645,13 @@ void InRpcAcList(RPC_AC_LIST *t, PACK *p) o = NewAcList(); PackGetStr(p, "HubName", t->HubName, sizeof(t->HubName)); - num = PackGetInt(p, "NumItem"); + num = PackGetIndexCount(p, "IpAddress"); for (i = 0;i < num;i++) { AC *ac = ZeroMalloc(sizeof(AC)); + ac->Id = PackGetIntEx(p, "Id", i); ac->Deny = PackGetBoolEx(p, "Deny", i); PackGetIpEx(p, "IpAddress", &ac->IpAddress, i); ac->Masked = PackGetBoolEx(p, "Masked", i); @@ -9544,10 +10687,12 @@ void OutRpcAcList(PACK *p, RPC_AC_LIST *t) PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "ACList"); for (i = 0;i < num;i++) { AC *ac = LIST_DATA(o, i); + PackAddIntEx(p, "Id", ac->Id, i, num); PackAddBoolEx(p, "Deny", ac->Deny, i, num); PackAddIpEx(p, "IpAddress", &ac->IpAddress, i, num); PackAddBoolEx(p, "Masked", ac->Masked, i, num); @@ -9556,6 +10701,7 @@ void OutRpcAcList(PACK *p, RPC_AC_LIST *t) PackAddIntEx(p, "Priority", ac->Priority, i, num); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcAcList(RPC_AC_LIST *t) { @@ -9626,6 +10772,7 @@ void OutRpcEnumCrl(PACK *p, RPC_ENUM_CRL *t) PackAddStr(p, "HubName", t->HubName); PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "CRLList"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_CRL_ITEM *e = &t->Items[i]; @@ -9633,6 +10780,7 @@ void OutRpcEnumCrl(PACK *p, RPC_ENUM_CRL *t) PackAddIntEx(p, "Key", e->Key, i, t->NumItem); PackAddUniStrEx(p, "CrlInfo", e->CrlInfo, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumCrl(RPC_ENUM_CRL *t) { @@ -9805,6 +10953,7 @@ void OutRpcEnumL3Table(PACK *p, RPC_ENUM_L3TABLE *t) PackAddInt(p, "NumItem", t->NumItem); PackAddStr(p, "Name", t->Name); + PackSetCurrentJsonGroupName(p, "L3Table"); for (i = 0;i < t->NumItem;i++) { RPC_L3TABLE *e = &t->Items[i]; @@ -9814,6 +10963,7 @@ void OutRpcEnumL3Table(PACK *p, RPC_ENUM_L3TABLE *t) PackAddIp32Ex(p, "GatewayAddress", e->GatewayAddress, i, t->NumItem); PackAddIntEx(p, "Metric", e->Metric, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumL3Table(RPC_ENUM_L3TABLE *t) { @@ -9887,6 +11037,7 @@ void OutRpcEnumL3If(PACK *p, RPC_ENUM_L3IF *t) PackAddInt(p, "NumItem", t->NumItem); PackAddStr(p, "Name", t->Name); + PackSetCurrentJsonGroupName(p, "L3IFList"); for (i = 0;i < t->NumItem;i++) { RPC_L3IF *f = &t->Items[i]; @@ -9895,6 +11046,7 @@ void OutRpcEnumL3If(PACK *p, RPC_ENUM_L3IF *t) PackAddIp32Ex(p, "IpAddress", f->IpAddress, i, t->NumItem); PackAddIp32Ex(p, "SubnetMask", f->SubnetMask, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumL3If(RPC_ENUM_L3IF *t) { @@ -9995,6 +11147,7 @@ void OutRpcEnumL3Sw(PACK *p, RPC_ENUM_L3SW *t) PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "L3SWList"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_L3SW_ITEM *s = &t->Items[i]; @@ -10005,6 +11158,7 @@ void OutRpcEnumL3Sw(PACK *p, RPC_ENUM_L3SW *t) PackAddBoolEx(p, "Active", s->Active, i, t->NumItem); PackAddBoolEx(p, "Online", s->Online, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumL3Sw(RPC_ENUM_L3SW *t) { @@ -10049,12 +11203,14 @@ void OutRpcEnumEth(PACK *p, RPC_ENUM_ETH *t) PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "EthList"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_ETH_ITEM *e = &t->Items[i]; PackAddStrEx(p, "DeviceName", e->DeviceName, i, t->NumItem); PackAddUniStrEx(p, "NetworkConnectionName", e->NetworkConnectionName, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumEth(RPC_ENUM_ETH *t) { @@ -10130,6 +11286,7 @@ void OutRpcEnumLocalBridge(PACK *p, RPC_ENUM_LOCALBRIDGE *t) PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "LocalBridgeList"); for (i = 0;i < t->NumItem;i++) { RPC_LOCALBRIDGE *e = &t->Items[i]; @@ -10140,6 +11297,7 @@ void OutRpcEnumLocalBridge(PACK *p, RPC_ENUM_LOCALBRIDGE *t) PackAddBoolEx(p, "Active", e->Active, i, t->NumItem); PackAddBoolEx(p, "TapMode", e->TapMode, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumLocalBridge(RPC_ENUM_LOCALBRIDGE *t) { @@ -10369,8 +11527,11 @@ void SiEnumLocalSession(SERVER *s, char *hubname, RPC_ENUM_SESSION *t) StrCpy(e->Name, sizeof(e->Name), s->Name); StrCpy(e->Username, sizeof(e->Username), s->Username); e->Ip = IPToUINT(&s->Connection->ClientIp); + CopyIP(&e->ClientIP, &s->Connection->ClientIp); StrCpy(e->Hostname, sizeof(e->Hostname), s->Connection->ClientHostname); e->MaxNumTcp = s->MaxConnection; + e->CreatedTime = Tick64ToTime64(s->CreatedTime); + e->LastCommTime = Tick64ToTime64(s->LastCommTime); e->LinkMode = s->LinkModeServer; e->SecureNATMode = s->SecureNATMode; e->BridgeMode = s->BridgeMode; @@ -10466,6 +11627,8 @@ void OutRpcEnumLicenseKey(PACK *p, RPC_ENUM_LICENSE_KEY *t) } PackAddInt(p, "NumItem", t->NumItem); + + PackSetCurrentJsonGroupName(p, "LicenseKeyList"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_LICENSE_KEY_ITEM *e = &t->Items[i]; @@ -10474,12 +11637,13 @@ void OutRpcEnumLicenseKey(PACK *p, RPC_ENUM_LICENSE_KEY *t) PackAddStrEx(p, "LicenseKey", e->LicenseKey, i, t->NumItem); PackAddStrEx(p, "LicenseId", e->LicenseId, i, t->NumItem); PackAddStrEx(p, "LicenseName", e->LicenseName, i, t->NumItem); - PackAddInt64Ex(p, "Expires", e->Expires, i, t->NumItem); + PackAddTime64Ex(p, "Expires", e->Expires, i, t->NumItem); PackAddIntEx(p, "Status", e->Status, i, t->NumItem); PackAddIntEx(p, "ProductId", e->ProductId, i, t->NumItem); PackAddInt64Ex(p, "SystemId", e->SystemId, i, t->NumItem); PackAddIntEx(p, "SerialId", e->SerialId, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumLicenseKey(RPC_ENUM_LICENSE_KEY *t) { @@ -10529,17 +11693,17 @@ void OutRpcLicenseStatus(PACK *p, RPC_LICENSE_STATUS *t) PackAddInt(p, "EditionId", t->EditionId); PackAddStr(p, "EditionStr", t->EditionStr); PackAddInt64(p, "SystemId", t->SystemId); - PackAddInt64(p, "SystemExpires", t->SystemExpires); + PackAddTime64(p, "SystemExpires", t->SystemExpires); PackAddInt(p, "NumClientConnectLicense", t->NumClientConnectLicense); PackAddInt(p, "NumBridgeConnectLicense", t->NumBridgeConnectLicense); // v3.0 PackAddBool(p, "NeedSubscription", t->NeedSubscription); PackAddBool(p, "AllowEnterpriseFunction", t->AllowEnterpriseFunction); - PackAddInt64(p, "SubscriptionExpires", t->SubscriptionExpires); + PackAddTime64(p, "SubscriptionExpires", t->SubscriptionExpires); PackAddBool(p, "IsSubscriptionExpired", t->IsSubscriptionExpired); PackAddInt(p, "NumUserCreationLicense", t->NumUserCreationLicense); - PackAddInt64(p, "ReleaseDate", t->ReleaseDate); + PackAddTime64(p, "ReleaseDate", t->ReleaseDate); } // RPC_ADMIN_OPTION @@ -10553,7 +11717,7 @@ void InRpcAdminOption(RPC_ADMIN_OPTION *t, PACK *p) } Zero(t, sizeof(RPC_ADMIN_OPTION)); - t->NumItem = PackGetInt(p, "NumItem"); + t->NumItem = PackGetIndexCount(p, "Name"); t->Items = ZeroMalloc(sizeof(ADMIN_OPTION) * t->NumItem); PackGetStr(p, "HubName", t->HubName, sizeof(t->HubName)); @@ -10564,6 +11728,7 @@ void InRpcAdminOption(RPC_ADMIN_OPTION *t, PACK *p) PackGetStrEx(p, "Name", o->Name, sizeof(o->Name), i); o->Value = PackGetIntEx(p, "Value", i); + PackGetUniStrEx(p, "Descrption", o->Descrption, sizeof(o->Descrption), i); } } void OutRpcAdminOption(PACK *p, RPC_ADMIN_OPTION *t) @@ -10579,13 +11744,16 @@ void OutRpcAdminOption(PACK *p, RPC_ADMIN_OPTION *t) PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "AdminOptionList"); for (i = 0;i < t->NumItem;i++) { ADMIN_OPTION *o = &t->Items[i]; PackAddStrEx(p, "Name", o->Name, i, t->NumItem); PackAddIntEx(p, "Value", o->Value, i, t->NumItem); + PackAddUniStrEx(p, "Descrption", o->Descrption, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcAdminOption(RPC_ADMIN_OPTION *t) { @@ -10752,7 +11920,7 @@ void OutRpcServerInfo(PACK *p, RPC_SERVER_INFO *t) PackAddInt(p, "ServerBuildInt", t->ServerBuildInt); PackAddStr(p, "ServerHostName", t->ServerHostName); PackAddInt(p, "ServerType", t->ServerType); - PackAddInt64(p, "ServerBuildDate", t->ServerBuildDate); + PackAddTime64(p, "ServerBuildDate", t->ServerBuildDate); PackAddStr(p, "ServerFamilyName", t->ServerFamilyName); OutRpcOsInfo(p, &t->OsInfo); } @@ -10827,13 +11995,13 @@ void OutRpcServerStatus(PACK *p, RPC_SERVER_STATUS *t) PackAddInt(p, "NumIpTables", t->NumIpTables); PackAddInt(p, "NumUsers", t->NumUsers); PackAddInt(p, "NumGroups", t->NumGroups); - PackAddInt64(p, "CurrentTime", t->CurrentTime); + PackAddTime64(p, "CurrentTime", t->CurrentTime); PackAddInt64(p, "CurrentTick", t->CurrentTick); PackAddInt(p, "AssignedBridgeLicenses", t->AssignedBridgeLicenses); PackAddInt(p, "AssignedClientLicenses", t->AssignedClientLicenses); PackAddInt(p, "AssignedBridgeLicensesTotal", t->AssignedBridgeLicensesTotal); PackAddInt(p, "AssignedClientLicensesTotal", t->AssignedClientLicensesTotal); - PackAddInt64(p, "StartTime", t->StartTime); + PackAddTime64(p, "StartTime", t->StartTime); OutRpcTraffic(p, &t->Traffic); @@ -10896,12 +12064,14 @@ void OutRpcListenerList(PACK *p, RPC_LISTENER_LIST *t) return; } + PackSetCurrentJsonGroupName(p, "ListenerList"); for (i = 0;i < t->NumPort;i++) { PackAddIntEx(p, "Ports", t->Ports[i], i, t->NumPort); PackAddBoolEx(p, "Enables", t->Enables[i], i, t->NumPort); PackAddBoolEx(p, "Errors", t->Errors[i], i, t->NumPort); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcListenerList(RPC_LISTENER_LIST *t) { @@ -10970,6 +12140,7 @@ void InRpcSetPassword(RPC_SET_PASSWORD *t, PACK *p) Zero(t, sizeof(RPC_SET_PASSWORD)); PackGetData2(p, "HashedPassword", t->HashedPassword, sizeof(t->HashedPassword)); + PackGetStr(p, "PlainTextPassword", t->PlainTextPassword, sizeof(t->PlainTextPassword)); } void OutRpcSetPassword(PACK *p, RPC_SET_PASSWORD *t) { @@ -10980,6 +12151,7 @@ void OutRpcSetPassword(PACK *p, RPC_SET_PASSWORD *t) } PackAddData(p, "HashedPassword", t->HashedPassword, sizeof(t->HashedPassword)); + PackAddStr(p, "PlainTextPassword", t->PlainTextPassword); } // RPC_FARM @@ -11004,6 +12176,7 @@ void InRpcFarm(RPC_FARM *t, PACK *p) PackGetStr(p, "ControllerName", t->ControllerName, sizeof(t->ControllerName)); t->ControllerPort = PackGetInt(p, "ControllerPort"); PackGetData2(p, "MemberPassword", t->MemberPassword, sizeof(t->MemberPassword)); + PackGetStr(p, "MemberPasswordPlaintext", t->MemberPasswordPlaintext, sizeof(t->MemberPasswordPlaintext)); t->Weight = PackGetInt(p, "Weight"); t->ControllerOnly = PackGetBool(p, "ControllerOnly"); } @@ -11025,6 +12198,7 @@ void OutRpcFarm(PACK *p, RPC_FARM *t) PackAddStr(p, "ControllerName", t->ControllerName); PackAddInt(p, "ControllerPort", t->ControllerPort); PackAddData(p, "MemberPassword", t->MemberPassword, sizeof(t->MemberPassword)); + PackAddStr(p, "MemberPasswordPlaintext", t->MemberPasswordPlaintext); PackAddInt(p, "Weight", t->Weight); PackAddBool(p, "ControllerOnly", t->ControllerOnly); } @@ -11110,7 +12284,7 @@ void OutRpcFarmInfo(PACK *p, RPC_FARM_INFO *t) PackAddInt(p, "Id", t->Id); PackAddBool(p, "Controller", t->Controller); - PackAddInt64(p, "ConnectedTime", t->ConnectedTime); + PackAddTime64(p, "ConnectedTime", t->ConnectedTime); PackAddIp32(p, "Ip", t->Ip); PackAddStr(p, "Hostname", t->Hostname); PackAddInt(p, "Point", t->Point); @@ -11119,11 +12293,15 @@ void OutRpcFarmInfo(PACK *p, RPC_FARM_INFO *t) PackAddIntEx(p, "Ports", t->Ports[i], i, t->NumPort); } PackAddX(p, "ServerCert", t->ServerCert); + + PackSetCurrentJsonGroupName(p, "HubsList"); for (i = 0;i < t->NumFarmHub;i++) { PackAddStrEx(p, "HubName", t->FarmHubs[i].HubName, i, t->NumFarmHub); PackAddBoolEx(p, "DynamicHub", t->FarmHubs[i].DynamicHub, i, t->NumFarmHub); } + PackSetCurrentJsonGroupName(p, NULL); + PackAddInt(p, "NumSessions", t->NumSessions); PackAddInt(p, "NumTcpConnections", t->NumTcpConnections); PackAddInt(p, "Weight", t->Weight); @@ -11180,13 +12358,14 @@ void OutRpcEnumFarm(PACK *p, RPC_ENUM_FARM *t) return; } + PackSetCurrentJsonGroupName(p, "FarmMemberList"); for (i = 0;i < t->NumFarm;i++) { RPC_ENUM_FARM_ITEM *e = &t->Farms[i]; PackAddIntEx(p, "Id", e->Id, i, t->NumFarm); PackAddBoolEx(p, "Controller", e->Controller, i, t->NumFarm); - PackAddInt64Ex(p, "ConnectedTime", e->ConnectedTime, i, t->NumFarm); + PackAddTime64Ex(p, "ConnectedTime", e->ConnectedTime, i, t->NumFarm); PackAddIp32Ex(p, "Ip", e->Ip, i, t->NumFarm); PackAddStrEx(p, "Hostname", e->Hostname, i, t->NumFarm); PackAddIntEx(p, "Point", e->Point, i, t->NumFarm); @@ -11196,6 +12375,7 @@ void OutRpcEnumFarm(PACK *p, RPC_ENUM_FARM *t) PackAddIntEx(p, "AssignedClientLicense", e->AssignedClientLicense, i, t->NumFarm); PackAddIntEx(p, "AssignedBridgeLicense", e->AssignedBridgeLicense, i, t->NumFarm); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumFarm(RPC_ENUM_FARM *t) { @@ -11241,9 +12421,9 @@ void OutRpcFarmConnectionStatus(PACK *p, RPC_FARM_CONNECTION_STATUS *t) PackAddInt(p, "Port", t->Port); PackAddBool(p, "Online", t->Online); PackAddInt(p, "LastError", t->LastError); - PackAddInt64(p, "StartedTime", t->StartedTime); - PackAddInt64(p, "CurrentConnectedTime", t->CurrentConnectedTime); - PackAddInt64(p, "FirstConnectedTime", t->FirstConnectedTime); + PackAddTime64(p, "StartedTime", t->StartedTime); + PackAddTime64(p, "CurrentConnectedTime", t->CurrentConnectedTime); + PackAddTime64(p, "FirstConnectedTime", t->FirstConnectedTime); PackAddInt(p, "NumConnected", t->NumConnected); PackAddInt(p, "NumTry", t->NumTry); PackAddInt(p, "NumFailed", t->NumFailed); @@ -11341,6 +12521,7 @@ void InRpcCreateHub(RPC_CREATE_HUB *t, PACK *p) PackGetStr(p, "HubName", t->HubName, sizeof(t->HubName)); PackGetData2(p, "HashedPassword", t->HashedPassword, sizeof(t->HashedPassword)); PackGetData2(p, "SecurePassword", t->SecurePassword, sizeof(t->SecurePassword)); + PackGetStr(p, "AdminPasswordPlainText", t->AdminPasswordPlainText, sizeof(t->AdminPasswordPlainText)); t->Online = PackGetBool(p, "Online"); InRpcHubOption(&t->HubOption, p); t->HubType = PackGetInt(p, "HubType"); @@ -11357,6 +12538,7 @@ void OutRpcCreateHub(PACK *p, RPC_CREATE_HUB *t) PackAddData(p, "HashedPassword", t->HashedPassword, sizeof(t->HashedPassword)); PackAddData(p, "SecurePassword", t->SecurePassword, sizeof(t->SecurePassword)); PackAddBool(p, "Online", t->Online); + PackAddStr(p, "AdminPasswordPlainText", t->AdminPasswordPlainText); OutRpcHubOption(p, &t->HubOption); PackAddInt(p, "HubType", t->HubType); } @@ -11405,6 +12587,7 @@ void OutRpcEnumHub(PACK *p, RPC_ENUM_HUB *t) return; } + PackSetCurrentJsonGroupName(p, "HubList"); for (i = 0;i < t->NumHub;i++) { RPC_ENUM_HUB_ITEM *e = &t->Hubs[i]; @@ -11417,14 +12600,15 @@ void OutRpcEnumHub(PACK *p, RPC_ENUM_HUB *t) PackAddIntEx(p, "NumGroups", e->NumGroups, i, t->NumHub); PackAddIntEx(p, "NumMacTables", e->NumMacTables, i, t->NumHub); PackAddIntEx(p, "NumIpTables", e->NumIpTables, i, t->NumHub); - PackAddInt64Ex(p, "LastCommTime", e->LastCommTime, i, t->NumHub); - PackAddInt64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumHub); - PackAddInt64Ex(p, "LastLoginTime", e->LastLoginTime, i, t->NumHub); + PackAddTime64Ex(p, "LastCommTime", e->LastCommTime, i, t->NumHub); + PackAddTime64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumHub); + PackAddTime64Ex(p, "LastLoginTime", e->LastLoginTime, i, t->NumHub); PackAddIntEx(p, "NumLogin", e->NumLogin, i, t->NumHub); PackAddBoolEx(p, "IsTrafficFilled", e->IsTrafficFilled, i, t->NumHub); OutRpcTrafficEx(&e->Traffic, p, i, t->NumHub); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumHub(RPC_ENUM_HUB *t) { @@ -11495,6 +12679,7 @@ void OutRpcEnumConnection(PACK *p, RPC_ENUM_CONNECTION *t) return; } + PackSetCurrentJsonGroupName(p, "ConnectionList"); for (i = 0;i < t->NumConnection;i++) { RPC_ENUM_CONNECTION_ITEM *e = &t->Connections[i]; @@ -11503,9 +12688,10 @@ void OutRpcEnumConnection(PACK *p, RPC_ENUM_CONNECTION *t) PackAddIntEx(p, "Port", e->Port, i, t->NumConnection); PackAddStrEx(p, "Name", e->Name, i, t->NumConnection); PackAddStrEx(p, "Hostname", e->Hostname, i, t->NumConnection); - PackAddInt64Ex(p, "ConnectedTime", e->ConnectedTime, i, t->NumConnection); + PackAddTime64Ex(p, "ConnectedTime", e->ConnectedTime, i, t->NumConnection); PackAddIntEx(p, "Type", e->Type, i, t->NumConnection); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumConnection(RPC_ENUM_CONNECTION *t) { @@ -11575,7 +12761,7 @@ void OutRpcConnectionInfo(PACK *p, RPC_CONNECTION_INFO *t) PackAddStr(p, "Name", t->Name); PackAddIp32(p, "Ip", t->Ip); PackAddInt(p, "Port", t->Port); - PackAddInt64(p, "ConnectedTime", t->ConnectedTime); + PackAddTime64(p, "ConnectedTime", t->ConnectedTime); PackAddStr(p, "Hostname", t->Hostname); PackAddStr(p, "ServerStr", t->ServerStr); PackAddStr(p, "ClientStr", t->ClientStr); @@ -11660,9 +12846,9 @@ void OutRpcHubStatus(PACK *p, RPC_HUB_STATUS *t) PackAddInt(p, "NumIpTables", t->NumIpTables); PackAddBool(p, "SecureNATEnabled", t->SecureNATEnabled); OutRpcTraffic(p, &t->Traffic); - PackAddInt64(p, "LastCommTime", t->LastCommTime); - PackAddInt64(p, "CreatedTime", t->CreatedTime); - PackAddInt64(p, "LastLoginTime", t->LastLoginTime); + PackAddTime64(p, "LastCommTime", t->LastCommTime); + PackAddTime64(p, "CreatedTime", t->CreatedTime); + PackAddTime64(p, "LastLoginTime", t->LastLoginTime); PackAddInt(p, "NumLogin", t->NumLogin); } @@ -11777,6 +12963,7 @@ void OutRpcHubEnumCa(PACK *p, RPC_HUB_ENUM_CA *t) } PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "CAList"); for (i = 0;i < t->NumCa;i++) { RPC_HUB_ENUM_CA_ITEM *e = &t->Ca[i]; @@ -11784,8 +12971,9 @@ void OutRpcHubEnumCa(PACK *p, RPC_HUB_ENUM_CA *t) PackAddIntEx(p, "Key", e->Key, i, t->NumCa); PackAddUniStrEx(p, "SubjectName", e->SubjectName, i, t->NumCa); PackAddUniStrEx(p, "IssuerName", e->IssuerName, i, t->NumCa); - PackAddInt64Ex(p, "Expires", e->Expires, i, t->NumCa); + PackAddTime64Ex(p, "Expires", e->Expires, i, t->NumCa); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcHubEnumCa(RPC_HUB_ENUM_CA *t) { @@ -11952,6 +13140,7 @@ void InRpcEnumLink(RPC_ENUM_LINK *t, PACK *p) e->ConnectedTime = PackGetInt64Ex(p, "ConnectedTime", i); e->Connected = PackGetBoolEx(p, "Connected", i); e->LastError = PackGetIntEx(p, "LastError", i); + PackGetStrEx(p, "LinkHubName", e->HubName, sizeof(e->HubName), i); } } void OutRpcEnumLink(PACK *p, RPC_ENUM_LINK *t) @@ -11965,6 +13154,7 @@ void OutRpcEnumLink(PACK *p, RPC_ENUM_LINK *t) PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "LinkList"); for (i = 0;i < t->NumLink;i++) { RPC_ENUM_LINK_ITEM *e = &t->Links[i]; @@ -11973,10 +13163,12 @@ void OutRpcEnumLink(PACK *p, RPC_ENUM_LINK *t) PackAddStrEx(p, "ConnectedHubName", e->HubName, i, t->NumLink); PackAddStrEx(p, "Hostname", e->Hostname, i, t->NumLink); PackAddBoolEx(p, "Online", e->Online, i, t->NumLink); - PackAddInt64Ex(p, "ConnectedTime", e->ConnectedTime, i, t->NumLink); + PackAddTime64Ex(p, "ConnectedTime", e->ConnectedTime, i, t->NumLink); PackAddBoolEx(p, "Connected", e->Connected, i, t->NumLink); PackAddIntEx(p, "LastError", e->LastError, i, t->NumLink); + PackAddStrEx(p, "TargetHubName", e->HubName, i, t->NumLink); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumLink(RPC_ENUM_LINK *t) { @@ -12250,12 +13442,14 @@ void OutRpcEnumAccessList(PACK *p, RPC_ENUM_ACCESS_LIST *a) } PackAddStr(p, "HubName", a->HubName); + PackSetCurrentJsonGroupName(p, "AccessList"); for (i = 0;i < a->NumAccess;i++) { ACCESS *e = &a->Accesses[i]; OutRpcAccessEx(p, e, i, a->NumAccess); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumAccessList(RPC_ENUM_ACCESS_LIST *a) { @@ -12269,7 +13463,7 @@ void FreeRpcEnumAccessList(RPC_ENUM_ACCESS_LIST *a) } // AUTHDATA -void *InRpcAuthData(PACK *p, UINT *authtype) +void *InRpcAuthData(PACK *p, UINT *authtype, char *username) { wchar_t tmp[MAX_SIZE]; AUTHPASSWORD *pw; @@ -12278,6 +13472,7 @@ void *InRpcAuthData(PACK *p, UINT *authtype) AUTHRADIUS *radius; AUTHNT *nt; BUF *b; + char plain_pw[MAX_SIZE]; // Validate arguments if (p == NULL) { @@ -12296,6 +13491,15 @@ void *InRpcAuthData(PACK *p, UINT *authtype) pw = ZeroMalloc(sizeof(AUTHPASSWORD)); PackGetData2(p, "HashedKey", pw->HashedKey, sizeof(pw->HashedKey)); PackGetData2(p, "NtLmSecureHash", pw->NtLmSecureHash, sizeof(pw->NtLmSecureHash)); + + if (PackGetStr(p, "Auth_Password", plain_pw, sizeof(plain_pw))) + { + if (IsZero(pw->HashedKey, sizeof(pw->HashedKey))) + { + HashPassword(pw->HashedKey, username, plain_pw); + GenerateNtPasswordHash(pw->NtLmSecureHash, plain_pw); + } + } return pw; case AUTHTYPE_USERCERT: @@ -12413,7 +13617,7 @@ void InRpcSetUser(RPC_SET_USER *t, PACK *p) t->CreatedTime = PackGetInt64(p, "CreatedTime"); t->UpdatedTime = PackGetInt64(p, "UpdatedTime"); t->ExpireTime = PackGetInt64(p, "ExpireTime"); - t->AuthData = InRpcAuthData(p, &t->AuthType); + t->AuthData = InRpcAuthData(p, &t->AuthType, t->Name); t->NumLogin = PackGetInt(p, "NumLogin"); InRpcTraffic(&t->Traffic, p); @@ -12437,9 +13641,9 @@ void OutRpcSetUser(PACK *p, RPC_SET_USER *t) PackAddStr(p, "GroupName", t->GroupName); PackAddUniStr(p, "Realname", t->Realname); PackAddUniStr(p, "Note", t->Note); - PackAddInt64(p, "CreatedTime", t->CreatedTime); - PackAddInt64(p, "UpdatedTime", t->UpdatedTime); - PackAddInt64(p, "ExpireTime", t->ExpireTime); + PackAddTime64(p, "CreatedTime", t->CreatedTime); + PackAddTime64(p, "UpdatedTime", t->UpdatedTime); + PackAddTime64(p, "ExpireTime", t->ExpireTime); OutRpcAuthData(p, t->AuthData, t->AuthType); PackAddInt(p, "NumLogin", t->NumLogin); OutRpcTraffic(p, &t->Traffic); @@ -12510,6 +13714,7 @@ void OutRpcEnumUser(PACK *p, RPC_ENUM_USER *t) } PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "UserList"); for (i = 0;i < t->NumUser;i++) { RPC_ENUM_USER_ITEM *e = &t->Users[i]; @@ -12519,7 +13724,7 @@ void OutRpcEnumUser(PACK *p, RPC_ENUM_USER *t) PackAddUniStrEx(p, "Realname", e->Realname, i, t->NumUser); PackAddUniStrEx(p, "Note", e->Note, i, t->NumUser); PackAddIntEx(p, "AuthType", e->AuthType, i, t->NumUser); - PackAddInt64Ex(p, "LastLoginTime", e->LastLoginTime, i, t->NumUser); + PackAddTime64Ex(p, "LastLoginTime", e->LastLoginTime, i, t->NumUser); PackAddIntEx(p, "NumLogin", e->NumLogin, i, t->NumUser); PackAddBoolEx(p, "DenyAccess", e->DenyAccess, i, t->NumUser); @@ -12527,8 +13732,9 @@ void OutRpcEnumUser(PACK *p, RPC_ENUM_USER *t) OutRpcTrafficEx(&e->Traffic, p, i, t->NumUser); PackAddBoolEx(p, "IsExpiresFilled", e->IsExpiresFilled, i, t->NumUser); - PackAddInt64Ex(p, "Expires", e->Expires, i, t->NumUser); + PackAddTime64Ex(p, "Expires", e->Expires, i, t->NumUser); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumUser(RPC_ENUM_USER *t) { @@ -12625,6 +13831,7 @@ void OutRpcEnumGroup(PACK *p, RPC_ENUM_GROUP *t) PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "GroupList"); for (i = 0;i < t->NumGroup;i++) { RPC_ENUM_GROUP_ITEM *e = &t->Groups[i]; @@ -12635,6 +13842,7 @@ void OutRpcEnumGroup(PACK *p, RPC_ENUM_GROUP *t) PackAddIntEx(p, "NumUsers", e->NumUsers, i, t->NumGroup); PackAddBoolEx(p, "DenyAccess", e->DenyAccess, i, t->NumGroup); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumGroup(RPC_ENUM_GROUP *t) { @@ -12694,6 +13902,7 @@ void InRpcEnumSession(RPC_ENUM_SESSION *t, PACK *p) PackGetStrEx(p, "Name", e->Name, sizeof(e->Name), i); PackGetStrEx(p, "Username", e->Username, sizeof(e->Username), i); e->Ip = PackGetIntEx(p, "Ip", i); + PackGetIpEx(p, "ClientIP", &e->ClientIP, i); PackGetStrEx(p, "Hostname", e->Hostname, sizeof(e->Hostname), i); e->MaxNumTcp = PackGetIntEx(p, "MaxNumTcp", i); e->CurrentNumTcp = PackGetIntEx(p, "CurrentNumTcp", i); @@ -12712,6 +13921,8 @@ void InRpcEnumSession(RPC_ENUM_SESSION *t, PACK *p) e->IsDormantEnabled = PackGetBoolEx(p, "IsDormantEnabled", i); e->IsDormant = PackGetBoolEx(p, "IsDormant", i); e->LastCommDormant = PackGetInt64Ex(p, "LastCommDormant", i); + e->CreatedTime = PackGetInt64Ex(p, "CreatedTime", i); + e->LastCommTime = PackGetInt64Ex(p, "LastCommTime", i); } } void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t) @@ -12724,6 +13935,7 @@ void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t) } PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "SessionList"); for (i = 0;i < t->NumSession;i++) { RPC_ENUM_SESSION_ITEM *e = &t->Sessions[i]; @@ -12731,6 +13943,7 @@ void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t) PackAddStrEx(p, "Name", e->Name, i, t->NumSession); PackAddStrEx(p, "Username", e->Username, i, t->NumSession); PackAddIp32Ex(p, "Ip", e->Ip, i, t->NumSession); + PackAddIpEx(p, "ClientIP", &e->ClientIP, i, t->NumSession); PackAddStrEx(p, "Hostname", e->Hostname, i, t->NumSession); PackAddIntEx(p, "MaxNumTcp", e->MaxNumTcp, i, t->NumSession); PackAddIntEx(p, "CurrentNumTcp", e->CurrentNumTcp, i, t->NumSession); @@ -12748,8 +13961,11 @@ void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t) PackAddDataEx(p, "UniqueId", e->UniqueId, sizeof(e->UniqueId), i, t->NumSession); PackAddBoolEx(p, "IsDormantEnabled", e->IsDormantEnabled, i, t->NumSession); PackAddBoolEx(p, "IsDormant", e->IsDormant, i, t->NumSession); - PackAddInt64Ex(p, "LastCommDormant", e->LastCommDormant, i, t->NumSession); + PackAddTime64Ex(p, "LastCommDormant", e->LastCommDormant, i, t->NumSession); + PackAddTime64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumSession); + PackAddTime64Ex(p, "LastCommTime", e->LastCommTime, i, t->NumSession); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumSession(RPC_ENUM_SESSION *t) { @@ -12880,6 +14096,7 @@ void InRpcSessionStatus(RPC_SESSION_STATUS *t, PACK *p) t->ClientIp = PackGetIp32(p, "SessionStatus_ClientIp"); PackGetData2(p, "SessionStatus_ClientIp6", t->ClientIp6, sizeof(t->ClientIp6)); PackGetStr(p, "SessionStatus_ClientHostName", t->ClientHostName, sizeof(t->ClientHostName)); + PackGetIp(p, "Client_Ip_Address", &t->ClientIpAddress); InRpcClientGetConnectionStatus(&t->Status, p); InRpcNodeInfo(&t->NodeInfo, p); @@ -12900,6 +14117,7 @@ void OutRpcSessionStatus(PACK *p, RPC_SESSION_STATUS *t) PackAddIp32(p, "SessionStatus_ClientIp", t->ClientIp); PackAddData(p, "SessionStatus_ClientIp6", t->ClientIp6, sizeof(t->ClientIp6)); PackAddStr(p, "SessionStatus_ClientHostName", t->ClientHostName); + PackAddIp(p, "Client_Ip_Address", &t->ClientIpAddress); OutRpcClientGetConnectionStatus(p, &t->Status); OutRpcNodeInfo(p, &t->NodeInfo); @@ -12980,6 +14198,7 @@ void OutRpcEnumMacTable(PACK *p, RPC_ENUM_MAC_TABLE *t) PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "MacTable"); for (i = 0;i < t->NumMacTable;i++) { RPC_ENUM_MAC_TABLE_ITEM *e = &t->MacTables[i]; @@ -12988,11 +14207,12 @@ void OutRpcEnumMacTable(PACK *p, RPC_ENUM_MAC_TABLE *t) PackAddStrEx(p, "SessionName", e->SessionName, i, t->NumMacTable); PackAddDataEx(p, "MacAddress", e->MacAddress, sizeof(e->MacAddress), i, t->NumMacTable); PackAddIntEx(p, "VlanId", e->VlanId, i, t->NumMacTable); - PackAddInt64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumMacTable); - PackAddInt64Ex(p, "UpdatedTime", e->UpdatedTime, i, t->NumMacTable); + PackAddTime64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumMacTable); + PackAddTime64Ex(p, "UpdatedTime", e->UpdatedTime, i, t->NumMacTable); PackAddBoolEx(p, "RemoteItem", e->RemoteItem, i, t->NumMacTable); PackAddStrEx(p, "RemoteHostname", e->RemoteHostname, i, t->NumMacTable); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumMacTable(RPC_ENUM_MAC_TABLE *t) { @@ -13031,6 +14251,7 @@ void InRpcEnumIpTable(RPC_ENUM_IP_TABLE *t, PACK *p) { UINTToIP(&e->IpV6, e->Ip); } + PackGetIp(p, "IpAddress", &e->IpAddress); e->DhcpAllocated = PackGetBoolEx(p, "DhcpAllocated", i); e->CreatedTime = PackGetInt64Ex(p, "CreatedTime", i); e->UpdatedTime = PackGetInt64Ex(p, "UpdatedTime", i); @@ -13049,6 +14270,7 @@ void OutRpcEnumIpTable(PACK *p, RPC_ENUM_IP_TABLE *t) PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "IpTable"); for (i = 0;i < t->NumIpTable;i++) { RPC_ENUM_IP_TABLE_ITEM *e = &t->IpTables[i]; @@ -13057,12 +14279,14 @@ void OutRpcEnumIpTable(PACK *p, RPC_ENUM_IP_TABLE *t) PackAddStrEx(p, "SessionName", e->SessionName, i, t->NumIpTable); PackAddIp32Ex(p, "Ip", e->Ip, i, t->NumIpTable); PackAddIpEx(p, "IpV6", &e->IpV6, i, t->NumIpTable); + PackAddIpEx(p, "IpAddress", &e->IpAddress, i, t->NumIpTable); PackAddBoolEx(p, "DhcpAllocated", e->DhcpAllocated, i, t->NumIpTable); - PackAddInt64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumIpTable); - PackAddInt64Ex(p, "UpdatedTime", e->UpdatedTime, i, t->NumIpTable); + PackAddTime64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumIpTable); + PackAddTime64Ex(p, "UpdatedTime", e->UpdatedTime, i, t->NumIpTable); PackAddBoolEx(p, "RemoteItem", e->RemoteItem, i, t->NumIpTable); PackAddStrEx(p, "RemoteHostname", e->RemoteHostname, i, t->NumIpTable); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumIpTable(RPC_ENUM_IP_TABLE *t) { diff --git a/src/Cedar/Admin.h b/src/Cedar/Admin.h index 9dd0f26d..0d58e8d6 100644 --- a/src/Cedar/Admin.h +++ b/src/Cedar/Admin.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Admin.h @@ -138,6 +32,8 @@ struct ADMIN LIST *LogFileList; // Accessible log file list UINT ClientBuild; // Build number of the client RPC_WINVER ClientWinVer; // Windows version of client + UINT MaxJsonRpcRecvSize; // Max JSON-RPC Receive Size + char dummy1[MAX_HUBNAME_LEN + 1]; // hubname buffer (dummy) }; // Test @@ -224,7 +120,8 @@ struct RPC_INT // Set Password struct RPC_SET_PASSWORD { - UCHAR HashedPassword[SHA1_SIZE]; // Hashed password + UCHAR HashedPassword[SHA1_SIZE]; // Hashed password (for traditional RPC) + char PlainTextPassword[MAX_SIZE]; // Plaintext password (for JSON-RPC) }; // Server farm configuration * @@ -237,6 +134,7 @@ struct RPC_FARM char ControllerName[MAX_HOST_NAME_LEN + 1]; // Controller name UINT ControllerPort; // Controller port UCHAR MemberPassword[SHA1_SIZE]; // Member password + char MemberPasswordPlaintext[MAX_SIZE]; // Member password (plaintext) UINT Weight; // Performance ratio bool ControllerOnly; // Only controller function }; @@ -342,6 +240,7 @@ struct RPC_CREATE_HUB char HubName[MAX_HUBNAME_LEN + 1]; // HUB Name UCHAR HashedPassword[SHA1_SIZE]; // Administrative password UCHAR SecurePassword[SHA1_SIZE]; // Administrator password + char AdminPasswordPlainText[MAX_SIZE]; // Password (plaintext) bool Online; // Online flag RPC_HUB_OPTION HubOption; // HUB options UINT HubType; // Type of HUB @@ -659,6 +558,7 @@ struct RPC_ENUM_SESSION_ITEM char RemoteHostname[MAX_HOST_NAME_LEN + 1]; // Remote server name char Username[MAX_USERNAME_LEN + 1]; // User name UINT Ip; // IP address (IPv4) + IP ClientIP; // IP address (IPv4 / IPv6) char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name UINT MaxNumTcp; // Maximum number of TCP connections UINT CurrentNumTcp; // Number of currentl TCP connections @@ -675,6 +575,8 @@ struct RPC_ENUM_SESSION_ITEM bool IsDormantEnabled; // Is the dormant state enabled bool IsDormant; // Is in the dormant state UINT64 LastCommDormant; // Last comm interval in the dormant state + UINT64 CreatedTime; // Creation date and time + UINT64 LastCommTime; // Last communication date and time }; // Disconnect the session @@ -711,8 +613,9 @@ struct RPC_ENUM_IP_TABLE_ITEM { UINT Key; // Key char SessionName[MAX_SESSION_NAME_LEN + 1]; // Session name - UINT Ip; // IP address + UINT Ip; // IPv4 address IP IpV6; // IPv6 address + IP IpAddress; // IPv4 / IPv6 Address bool DhcpAllocated; // Assigned by the DHCP UINT64 CreatedTime; // Creation date and time UINT64 UpdatedTime; // Updating date @@ -998,6 +901,10 @@ struct RPC_AZURE_STATUS bool IsConnected; // Whether it's connected }; +// Constants +#define ADMIN_RPC_MAX_POST_SIZE_BY_SERVER_ADMIN MAX_PACK_SIZE +#define ADMIN_RPC_MAX_POST_SIZE_BY_HUB_ADMIN (8 * 1024 * 1024) + // Function prototype UINT AdminAccept(CONNECTION *c, PACK *p); @@ -1022,6 +929,26 @@ BUF *DownloadFileFromServer(RPC *r, char *server_name, char *filepath, UINT tota bool CheckAdminSourceAddress(SOCK *sock, char *hubname); void SiEnumSessionMain(SERVER *s, RPC_ENUM_SESSION *t); bool SiIsEmptyPassword(void *hash_password); +void JsonRpcProcPost(CONNECTION *c, SOCK *s, HTTP_HEADER *h, UINT post_data_size); +void JsonRpcProcGet(CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_target); +void JsonRpcProcOptions(CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_target); +JSON_VALUE *JsonRpcProcRequestObject(ADMIN *admin, CONNECTION *c, SOCK *s, JSON_VALUE *json_req, char *method_name); +JSON_VALUE *JsonRpcNewError(int code, wchar_t *message); +JSON_VALUE *JsonRpcNewResponse(PACK *p); +bool HttpParseBasicAuthHeader(HTTP_HEADER *h, char *username, UINT username_size, char *password, UINT password_size); +ADMIN *JsonRpcAuthLogin(CEDAR *c, SOCK *sock, HTTP_HEADER *h); +JSON_VALUE *QueryStringToJsonListValue(char *qs); +JSON_VALUE *ConstructDummyJsonRpcRequest(char *method_name, JSON_VALUE *p); +void AdminWebProcPost(CONNECTION *c, SOCK *s, HTTP_HEADER *h, UINT post_data_size, char *url_target); +void AdminWebProcGet(CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_target); +bool AdminWebHandleFileRequest(ADMIN *a, CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_src, char *query_string, char *virtual_root_dir, char *physical_root_dir); +BUF *AdminWebProcessServerSideInclude(BUF *src_txt, char *filename, UINT depth); +bool AdminWebSendBody(SOCK *s, UINT status_code, char *status_string, UCHAR *data, UINT data_size, char *content_type, char *add_header_name, char *add_header_value, HTTP_HEADER *request_headers); +bool AdminWebSend404Error(SOCK *s, HTTP_HEADER *request_headers); +bool AdminWebSend302Redirect(SOCK *s, char *url, char *query_string, HTTP_HEADER *request_headers); +BUF *AdminWebTryFindAndReadFile(char *vroot, char *proot, char *url, char *ret_filename, UINT ret_filename_size, bool *is_index_html); +BUF *AdminWebTryOneFile(char *filename, char *ret_filename, UINT ret_filename_size); +bool AdminWebSendUnauthorized(SOCK *s, HTTP_HEADER *http_request_headers); UINT StTest(ADMIN *a, RPC_TEST *t); UINT StGetServerInfo(ADMIN *a, RPC_SERVER_INFO *t); @@ -1038,6 +965,7 @@ UINT StEnumFarmMember(ADMIN *a, RPC_ENUM_FARM *t); UINT StGetFarmConnectionStatus(ADMIN *a, RPC_FARM_CONNECTION_STATUS *t); UINT StSetServerCert(ADMIN *a, RPC_KEY_PAIR *t); UINT StGetServerCert(ADMIN *a, RPC_KEY_PAIR *t); +UINT StGetServerCipherList(ADMIN *a, RPC_STR *t); UINT StGetServerCipher(ADMIN *a, RPC_STR *t); UINT StSetServerCipher(ADMIN *a, RPC_STR *t); UINT StCreateHub(ADMIN *a, RPC_CREATE_HUB *t); @@ -1181,6 +1109,7 @@ UINT ScEnumFarmMember(RPC *r, RPC_ENUM_FARM *t); UINT ScGetFarmConnectionStatus(RPC *r, RPC_FARM_CONNECTION_STATUS *t); UINT ScSetServerCert(RPC *r, RPC_KEY_PAIR *t); UINT ScGetServerCert(RPC *r, RPC_KEY_PAIR *t); +UINT ScGetServerCipherList(RPC *r, RPC_STR *t); UINT ScGetServerCipher(RPC *r, RPC_STR *t); UINT ScSetServerCipher(RPC *r, RPC_STR *t); UINT ScCreateHub(RPC *r, RPC_CREATE_HUB *t); @@ -1395,7 +1324,7 @@ void OutRpcAccess(PACK *p, ACCESS *a); void InRpcEnumAccessList(RPC_ENUM_ACCESS_LIST *a, PACK *p); void OutRpcEnumAccessList(PACK *p, RPC_ENUM_ACCESS_LIST *a); void FreeRpcEnumAccessList(RPC_ENUM_ACCESS_LIST *a); -void *InRpcAuthData(PACK *p, UINT *authtype); +void *InRpcAuthData(PACK *p, UINT *authtype, char *username); void OutRpcAuthData(PACK *p, void *authdata, UINT authtype); void FreeRpcAuthData(void *authdata, UINT authtype); void InRpcSetUser(RPC_SET_USER *t, PACK *p); diff --git a/src/Cedar/AzureClient.c b/src/Cedar/AzureClient.c index 78d5e01b..65b0106c 100644 --- a/src/Cedar/AzureClient.c +++ b/src/Cedar/AzureClient.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // AzureClient.c @@ -522,18 +416,6 @@ void AcMainThread(THREAD *thread, void *param) } } -// Get enabled or disabled VPN Azure client -bool AcGetEnable(AZURE_CLIENT *ac) -{ - // Validate arguments - if (ac == NULL) - { - return false; - } - - return ac->IsEnabled; -} - // Enable or disable VPN Azure client void AcSetEnable(AZURE_CLIENT *ac, bool enabled) { diff --git a/src/Cedar/AzureClient.h b/src/Cedar/AzureClient.h index ac246205..6ffa8bf7 100644 --- a/src/Cedar/AzureClient.h +++ b/src/Cedar/AzureClient.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // AzureClient.h @@ -166,7 +60,6 @@ void FreeAzureClient(AZURE_CLIENT *ac); void AcApplyCurrentConfig(AZURE_CLIENT *ac, DDNS_CLIENT_STATUS *ddns_status); void AcMainThread(THREAD *thread, void *param); void AcSetEnable(AZURE_CLIENT *ac, bool enabled); -bool AcGetEnable(AZURE_CLIENT *ac); void AcWaitForRequest(AZURE_CLIENT *ac, SOCK *s, AZURE_PARAM *param); diff --git a/src/Cedar/AzureServer.c b/src/Cedar/AzureServer.c index f050dc46..0a1a000e 100644 --- a/src/Cedar/AzureServer.c +++ b/src/Cedar/AzureServer.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // AzureServer.c diff --git a/src/Cedar/AzureServer.h b/src/Cedar/AzureServer.h index e09d7fcf..6e86bd8f 100644 --- a/src/Cedar/AzureServer.h +++ b/src/Cedar/AzureServer.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // AzureServer.h diff --git a/src/Cedar/Bridge.c b/src/Cedar/Bridge.c index 073e227f..3a4ca7b2 100644 --- a/src/Cedar/Bridge.c +++ b/src/Cedar/Bridge.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Bridge.c @@ -136,19 +30,23 @@ UINT GetEthDeviceHash() { #ifdef OS_UNIX // UNIX - UINT num; + UINT num = 0; UINT i; char tmp[4096]; UCHAR hash[SHA1_SIZE]; TOKEN_LIST *t = GetEthList(); - num = t->NumTokens; tmp[0] = 0; - for (i = 0;i < t->NumTokens;i++) + + if (t != NULL) { - StrCat(tmp, sizeof(tmp), t->Token[i]); + num = t->NumTokens; + for (i = 0; i < t->NumTokens; i++) + { + StrCat(tmp, sizeof(tmp), t->Token[i]); + } + FreeToken(t); } - FreeToken(t); Sha0(hash, tmp, StrLen(tmp)); diff --git a/src/Cedar/Bridge.h b/src/Cedar/Bridge.h index e4f9a0fa..c3ff9815 100644 --- a/src/Cedar/Bridge.h +++ b/src/Cedar/Bridge.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Bridge.h diff --git a/src/Cedar/BridgeUnix.c b/src/Cedar/BridgeUnix.c index 7e4fbc29..95410787 100644 --- a/src/Cedar/BridgeUnix.c +++ b/src/Cedar/BridgeUnix.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // BridgeUnix.c @@ -270,12 +164,10 @@ bool IsEthSupported() #if defined(UNIX_LINUX) return IsEthSupportedLinux(); +#elif defined(UNIX_BSD) + return true; #elif defined(UNIX_SOLARIS) return IsEthSupportedSolaris(); -#elif defined(BRIDGE_PCAP) - return true; -#elif defined(BRIDGE_BPF) - return true; #else return false; #endif @@ -2676,6 +2568,7 @@ bool EthProcessIpPacketInnerIpRaw(ETH *e, PKT *p) void EthPutPacketLinuxIpRaw(ETH *e, void *data, UINT size) { PKT *p; + SOCK *s = NULL; // Validate arguments if (e == NULL || data == NULL) { @@ -2688,8 +2581,13 @@ void EthPutPacketLinuxIpRaw(ETH *e, void *data, UINT size) } p = ParsePacket(data, size); + if (p == NULL) + { + Free(data); + return; + } - if (p != NULL && (p->BroadcastPacket || Cmp(p->MacAddressDest, e->RawIpMyMacAddr, 6) == 0)) + if (p->BroadcastPacket || Cmp(p->MacAddressDest, e->RawIpMyMacAddr, 6) == 0) { if (IsValidUnicastMacAddress(p->MacAddressSrc)) { @@ -2705,93 +2603,88 @@ void EthPutPacketLinuxIpRaw(ETH *e, void *data, UINT size) return; } - if (p != NULL) + + if (p->TypeL3 == L3_IPV4) { - SOCK *s = NULL; - - if (p->TypeL3 == L3_IPV4) + if (p->TypeL4 == L4_TCP) { - if (p->TypeL4 == L4_TCP) + if (IsZeroIP(&e->MyPhysicalIP) == false) { - if (IsZeroIP(&e->MyPhysicalIP) == false) - { - s = e->RawTcp; - } - } - else if (p->TypeL4 == L4_UDP) - { - if (EthProcessIpPacketInnerIpRaw(e, p) == false) - { - s = e->RawUdp; - } - } - else if (p->TypeL4 == L4_ICMPV4) - { - if (IsZeroIP(&e->MyPhysicalIP) == false) - { - s = e->RawIcmp; - } - } - else if (p->TypeL4 == L4_FRAGMENT) - { - if (IsZeroIP(&e->MyPhysicalIP) == false) - { - s = e->RawIcmp; - } + s = e->RawTcp; } } - else if (p->TypeL3 == L3_ARPV4) + else if (p->TypeL4 == L4_UDP) { - EthProcessIpPacketInnerIpRaw(e, p); - } - - if (s != NULL && p->L3.IPv4Header->DstIP != 0xffffffff && p->BroadcastPacket == false && - p->L3.IPv4Header->SrcIP == IPToUINT(&e->YourIP)) - { - UCHAR *send_data = p->IPv4PayloadData; - UCHAR *head = p->PacketData; - UINT remove_header_size = (UINT)(send_data - head); - - if (p->PacketSize > remove_header_size) + if (EthProcessIpPacketInnerIpRaw(e, p) == false) { - IP dest; - UINT send_data_size = p->PacketSize - remove_header_size; - - // checksum - if (p->TypeL4 == L4_UDP) - { - p->L4.UDPHeader->Checksum = 0; - } - else if (p->TypeL4 == L4_TCP) - { - p->L4.TCPHeader->Checksum = 0; - p->L4.TCPHeader->Checksum = CalcChecksumForIPv4(IPToUINT(&e->MyPhysicalIP), - p->L3.IPv4Header->DstIP, IP_PROTO_TCP, - p->L4.TCPHeader, p->IPv4PayloadSize, 0); - } - - UINTToIP(&dest, p->L3.IPv4Header->DstIP); - - if (s->RawIP_HeaderIncludeFlag == false) - { - SendTo(s, &dest, 0, send_data, send_data_size); - } - else - { - IPV4_HEADER *ip = p->L3.IPv4Header; - - ip->SrcIP = IPToUINT(&e->MyPhysicalIP); - ip->Checksum = 0; - ip->Checksum = IpChecksum(ip, IPV4_GET_HEADER_LEN(ip) * 4); - - SendTo(s, &dest, 0, ip, ((UCHAR *)p->PacketData - (UCHAR *)ip) + p->PacketSize); - } + s = e->RawUdp; } } - - FreePacket(p); + else if (p->TypeL4 == L4_ICMPV4) + { + if (IsZeroIP(&e->MyPhysicalIP) == false) + { + s = e->RawIcmp; + } + } + else if (p->TypeL4 == L4_FRAGMENT) + { + if (IsZeroIP(&e->MyPhysicalIP) == false) + { + s = e->RawIcmp; + } + } + } + else if (p->TypeL3 == L3_ARPV4) + { + EthProcessIpPacketInnerIpRaw(e, p); } + if (s != NULL && p->L3.IPv4Header->DstIP != 0xffffffff && p->BroadcastPacket == false && + p->L3.IPv4Header->SrcIP == IPToUINT(&e->YourIP)) + { + UCHAR *send_data = p->IPv4PayloadData; + UCHAR *head = p->PacketData; + UINT remove_header_size = (UINT)(send_data - head); + + if (p->PacketSize > remove_header_size) + { + IP dest; + UINT send_data_size = p->PacketSize - remove_header_size; + + // checksum + if (p->TypeL4 == L4_UDP) + { + p->L4.UDPHeader->Checksum = 0; + } + else if (p->TypeL4 == L4_TCP) + { + p->L4.TCPHeader->Checksum = 0; + p->L4.TCPHeader->Checksum = CalcChecksumForIPv4(IPToUINT(&e->MyPhysicalIP), + p->L3.IPv4Header->DstIP, IP_PROTO_TCP, + p->L4.TCPHeader, p->IPv4PayloadSize, 0); + } + + UINTToIP(&dest, p->L3.IPv4Header->DstIP); + + if (s->RawIP_HeaderIncludeFlag == false) + { + SendTo(s, &dest, 0, send_data, send_data_size); + } + else + { + IPV4_HEADER *ip = p->L3.IPv4Header; + + ip->SrcIP = IPToUINT(&e->MyPhysicalIP); + ip->Checksum = 0; + ip->Checksum = IpChecksum(ip, IPV4_GET_HEADER_LEN(ip) * 4); + + SendTo(s, &dest, 0, ip, ((UCHAR *)p->PacketData - (UCHAR *)ip) + p->PacketSize); + } + } + } + + FreePacket(p); Free(data); } diff --git a/src/Cedar/BridgeUnix.h b/src/Cedar/BridgeUnix.h index 619cc970..7c1b7465 100644 --- a/src/Cedar/BridgeUnix.h +++ b/src/Cedar/BridgeUnix.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // BridgeUnix.h diff --git a/src/Cedar/BridgeWin32.c b/src/Cedar/BridgeWin32.c index 13cf63a3..eca7952a 100644 --- a/src/Cedar/BridgeWin32.c +++ b/src/Cedar/BridgeWin32.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // BridgeWin32.c diff --git a/src/Cedar/BridgeWin32.h b/src/Cedar/BridgeWin32.h index ba67e014..da08850d 100644 --- a/src/Cedar/BridgeWin32.h +++ b/src/Cedar/BridgeWin32.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // BridgeWin32.h diff --git a/src/Cedar/CM.c b/src/Cedar/CM.c index 0afc23e3..c908f30d 100644 --- a/src/Cedar/CM.c +++ b/src/Cedar/CM.c @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - ELIN (https://github.com/el1n) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // CM.c @@ -222,6 +114,7 @@ void CmProxyDlgSet(HWND hWnd, CLIENT_OPTION *o, CM_INTERNET_SETTING *setting) Check(hWnd, R_DIRECT_TCP, setting->ProxyType == PROXY_DIRECT); Check(hWnd, R_HTTPS, setting->ProxyType == PROXY_HTTP); Check(hWnd, R_SOCKS, setting->ProxyType == PROXY_SOCKS); + Check(hWnd, R_SOCKS5, setting->ProxyType == PROXY_SOCKS5); // Proxy Settings if(setting->ProxyType != PROXY_DIRECT) @@ -4503,9 +4396,6 @@ HMENU CmCreateRecentSubMenu(HWND hWnd, UINT start_id) UINT i; RPC_CLIENT_ENUM_ACCOUNT a; LIST *o; - bool easy; - - easy = cm->CmSetting.EasyMode; Zero(&a, sizeof(a)); @@ -4533,7 +4423,6 @@ HMENU CmCreateRecentSubMenu(HWND hWnd, UINT start_id) wchar_t tmp[MAX_PATH]; wchar_t *account_name; char *server_name; - char *hub_name; UINT pos; if (h == NULL) @@ -4543,7 +4432,6 @@ HMENU CmCreateRecentSubMenu(HWND hWnd, UINT start_id) account_name = item->AccountName; server_name = item->ServerName; - hub_name = item->HubName; UniStrCpy(tmp, sizeof(tmp), account_name); @@ -4585,7 +4473,6 @@ HMENU CmCreateTraySubMenu(HWND hWnd, bool flag, UINT start_id) if (status_str != NULL) { bool b = false; - bool is_account = false; if (UniStrCmpi(status_str, _UU("CM_ACCOUNT_OFFLINE")) == 0) { @@ -4593,8 +4480,6 @@ HMENU CmCreateTraySubMenu(HWND hWnd, bool flag, UINT start_id) { b = true; } - - is_account = true; } if (UniStrCmpi(status_str, _UU("CM_ACCOUNT_ONLINE")) == 0 || @@ -4604,8 +4489,6 @@ HMENU CmCreateTraySubMenu(HWND hWnd, bool flag, UINT start_id) { b = true; } - - is_account = true; } if (b) @@ -6906,6 +6789,10 @@ void CmEditAccountDlgUpdate(HWND hWnd, CM_ACCOUNT *a) { a->ClientOption->ProxyType = PROXY_SOCKS; } + if (IsChecked(hWnd, R_SOCKS5)) + { + a->ClientOption->ProxyType = PROXY_SOCKS5; + } // To validate the server certificate a->CheckServerCert = IsChecked(hWnd, R_CHECK_CERT); @@ -7344,6 +7231,7 @@ void CmEditAccountDlgInit(HWND hWnd, CM_ACCOUNT *a) Check(hWnd, R_DIRECT_TCP, a->ClientOption->ProxyType == PROXY_DIRECT); Check(hWnd, R_HTTPS, a->ClientOption->ProxyType == PROXY_HTTP); Check(hWnd, R_SOCKS, a->ClientOption->ProxyType == PROXY_SOCKS); + Check(hWnd, R_SOCKS5, a->ClientOption->ProxyType == PROXY_SOCKS5); // Verify the server certificate Check(hWnd, R_CHECK_CERT, a->CheckServerCert); @@ -7824,6 +7712,290 @@ UINT CmEditAccountDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, voi return 0; } +// Update the custom proxy HTTP header dialog +void CmProxyHttpHeaderDlgUpdate(HWND hWnd) +{ + UINT i = 0; + bool ok = true; + LIST *names_list; + // Validate arguments + if (hWnd == NULL) + { + return; + } + + names_list = NewList(NULL); + + for (; i < LvNum(hWnd, L_VALUES_LIST); i++) + { + wchar_t *str = LvGetStr(hWnd, L_VALUES_LIST, i, 0); + UniTrim(str); + if (IsEmptyUniStr(str) || IsInListUniStr(names_list, str)) + { + Free(str); + ok = false; + break; + } + + Add(names_list, str); + } + + FreeStrList(names_list); + SetEnable(hWnd, IDOK, ok); +} + +// Update the custom proxy HTTP header dialog content +void CmProxyHttpHeaderDlgRefresh(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d) +{ + UINT i = 0; + LIST *list; + LVB *b; + CLIENT_OPTION *a; + // Validate arguments + if (hWnd == NULL || d == NULL) + { + return; + } + + a = (CLIENT_OPTION *)d->ClientOption; + + list = NewEntryList(a->CustomHttpHeader, "\r\n", ":"); + + b = LvInsertStart(); + + for (; i < LIST_NUM(list); i++) + { + INI_ENTRY *e = LIST_DATA(list, i); + wchar_t *name = CopyStrToUni(e->Key); + wchar_t *value = CopyStrToUni(e->Value); + UniTrimLeft(value); + + LvInsertAdd(b, 0, NULL, 2, name, value); + + Free(name); + Free(value); + } + + LvInsertEnd(b, hWnd, L_VALUES_LIST); + FreeEntryList(list); +} + +// Initialize the custom proxy HTTP header dialog +void CmProxyHttpHeaderDlgInit(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d) +{ + // Validate arguments + if (hWnd == NULL || d == NULL) + { + return; + } + + LvSetEnhanced(hWnd, L_VALUES_LIST, true); + LvInitEx(hWnd, L_VALUES_LIST, true); + LvInsertColumn(hWnd, L_VALUES_LIST, 0, _UU("CM_HTTP_HEADER_COLUMN_0"), 150); + LvInsertColumn(hWnd, L_VALUES_LIST, 1, _UU("CM_HTTP_HEADER_COLUMN_1"), 150); + + LvSetStyle(hWnd, L_VALUES_LIST, LVS_EX_GRIDLINES); + + CmProxyHttpHeaderDlgRefresh(hWnd, d); +} + +// Custom proxy HTTP header dialog control +UINT CmProxyHttpHeaderDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) +{ + CM_PROXY_HTTP_HEADER_DLG *d = (CM_PROXY_HTTP_HEADER_DLG *)param; + CLIENT_OPTION *a = (d == NULL ? NULL : d->ClientOption); + UINT i = INFINITE; + // Validate arguments + if (hWnd == NULL || d == NULL || a == NULL) + { + return 0; + } + + switch (msg) + { + case WM_INITDIALOG: + CmProxyHttpHeaderDlgInit(hWnd, d); + break; + case WM_CLOSE: + EndDialog(hWnd, false); + break; + case WM_NOTIFY: + { + switch (((LPNMHDR)lParam)->code) + { + // Header divider being dragged (resizing columns) + case HDN_ITEMCHANGINGA: + case HDN_ITEMCHANGINGW: + if (d->EditBox != NULL) + { + RECT rect; + ListView_GetSubItemRect(DlgItem(hWnd, L_VALUES_LIST), d->CurrentItem, d->CurrentSubItem, LVIR_LABEL, &rect); + MoveWindow(d->EditBox, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, true); + RedrawWindow(d->EditBox, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW); + } + break; + case LVN_ITEMCHANGED: + if (((LPNMHDR)lParam)->idFrom == L_VALUES_LIST) + { + CmProxyHttpHeaderDlgUpdate(hWnd); + } + break; + case NM_DBLCLK: + { + RECT rect; + LPNMLISTVIEW list_view = (LPNMLISTVIEW)lParam; + wchar_t *str; + + d->CurrentItem = list_view->iItem; + d->CurrentSubItem = list_view->iSubItem; + str = LvGetStr(DlgItem(hWnd, L_VALUES_LIST), 0, d->CurrentItem, d->CurrentSubItem); + ListView_GetSubItemRect(DlgItem(hWnd, L_VALUES_LIST), d->CurrentItem, d->CurrentSubItem, LVIR_LABEL, &rect); + + d->EditBox = CreateWindowExW(0, L"EDIT", str, WS_BORDER | WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | ES_LEFT | ES_MULTILINE | ES_WANTRETURN, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, DlgItem(hWnd, L_VALUES_LIST), NULL, GetModuleHandle(NULL), NULL); + Free(str); + + DlgFont(d->EditBox, 0, 8, false); + EditBoxSetEnhanced(d->EditBox, 0, true); + FocusEx(d->EditBox, 0); + break; + } + case NM_CLICK: + case NM_RETURN: + if (d->EditBox != NULL) + { + wchar_t *new_name = GetText(d->EditBox, 0); + wchar_t *old_name = LvGetStr(hWnd, L_VALUES_LIST, d->CurrentItem, d->CurrentSubItem); + + if (old_name != NULL) + { + if (UniStrCmp(new_name, old_name) != 0) + { + LvSetItem(hWnd, L_VALUES_LIST, d->CurrentItem, d->CurrentSubItem, new_name); + } + + Free(old_name); + } + + Free(new_name); + + DestroyWindow(d->EditBox); + d->EditBox = NULL; + } + } + break; + } + case WM_COMMAND: + switch (wParam) + { + case B_NEW: + { + NMLISTVIEW lv; + + if (d->EditBox != NULL) + { + DestroyWindow(d->EditBox); + } + + i = LvInsertItem(hWnd, L_VALUES_LIST, 0, NULL, L""); + LvSelect(hWnd, L_VALUES_LIST, i); + + Zero(&lv, sizeof(lv)); + lv.hdr.code = NM_DBLCLK; + lv.iItem = i; + lv.iSubItem = 0; + + SendMsg(hWnd, 0, WM_NOTIFY, 0, (LPARAM)&lv); + } + break; + case B_DELETE: + if (d->EditBox != NULL) + { + DestroyWindow(d->EditBox); + } + + i = LvGetSelected(hWnd, L_VALUES_LIST); + if (i != INFINITE) + { + LvDeleteItem(hWnd, L_VALUES_LIST, i); + } + CmProxyHttpHeaderDlgUpdate(hWnd); + break; + case B_CLEAR: + if (d->EditBox != NULL) + { + DestroyWindow(d->EditBox); + } + + LvReset(hWnd, L_VALUES_LIST); + CmProxyHttpHeaderDlgUpdate(hWnd); + break; + case IDOK: + { + UINT index = 0; + char *name = NULL; + char *value = NULL; + char http_header[HTTP_CUSTOM_HEADER_MAX_SIZE]; + + Zero(http_header, sizeof(http_header)); + i = LvNum(hWnd, L_VALUES_LIST); + + for (; index < i; index++) + { + char str[HTTP_CUSTOM_HEADER_MAX_SIZE]; + name = LvGetStrA(hWnd, L_VALUES_LIST, index, 0); + value = LvGetStrA(hWnd, L_VALUES_LIST, index, 1); + + Trim(name); + TrimLeft(value); + + Format(str, sizeof(str), "%s: %s\r\n", name, value); + EnSafeHttpHeaderValueStr(str, ' '); + + Free(name); + Free(value); + + if ((StrLen(http_header) + StrLen(str)) < sizeof(a->CustomHttpHeader)) + { + StrCat(http_header, sizeof(str), str); + } + else + { + MsgBox(hWnd, MB_ICONEXCLAMATION | MB_OK, _E(ERR_TOO_MANT_ITEMS)); + return 1; + } + } + + Zero(a->CustomHttpHeader, sizeof(a->CustomHttpHeader)); + StrCpy(a->CustomHttpHeader, sizeof(a->CustomHttpHeader), http_header); + + EndDialog(hWnd, true); + break; + } + case IDCANCEL: + Close(hWnd); + } + } + + return 0; +} + +// Custom proxy HTTP header dialog +bool CmProxyHttpHeaderDlg(HWND hWnd, CLIENT_OPTION *a) +{ + CM_PROXY_HTTP_HEADER_DLG d; + // Validate arguments + if (a == NULL) + { + return false; + } + + Zero(&d, sizeof(d)); + + d.ClientOption = a; + + return Dialog(hWnd, D_CM_PROXY_HTTP_HEADER, CmProxyHttpHeaderDlgProc, &d); +} + // Update the proxy server settings void CmProxyDlgUpdate(HWND hWnd, CLIENT_OPTION *a) { @@ -7834,6 +8006,8 @@ void CmProxyDlgUpdate(HWND hWnd, CLIENT_OPTION *a) return; } + SetEnable(hWnd, B_HTTP_HEADER, a->ProxyType == PROXY_HTTP); + if (IsEmpty(hWnd, E_HOSTNAME)) { ok = false; @@ -7897,6 +8071,9 @@ UINT CmProxyDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *par switch (wParam) { + case B_HTTP_HEADER: + CmProxyHttpHeaderDlg(hWnd, a); + break; case IDOK: GetTxtA(hWnd, E_HOSTNAME, a->ProxyName, sizeof(a->ProxyName)); GetTxtA(hWnd, E_USERNAME, a->ProxyUsername, sizeof(a->ProxyUsername)); @@ -8247,10 +8424,6 @@ bool CmLoadXExW(HWND hWnd, X **x, wchar_t *filename, UINT size) } // Read the secret key -bool CmLoadK(HWND hWnd, K **k) -{ - return CmLoadKEx(hWnd, k, NULL, 0); -} bool CmLoadKEx(HWND hWnd, K **k, char *filename, UINT size) { wchar_t *filename_w = CopyStrToUni(filename); @@ -8620,6 +8793,10 @@ void CmEditAccountDlgStartEnumHub(HWND hWnd, CM_ACCOUNT *a) { a->ClientOption->ProxyType = PROXY_SOCKS; } + if (IsChecked(hWnd, R_SOCKS5)) + { + a->ClientOption->ProxyType = PROXY_SOCKS5; + } CmEnumHubStart(hWnd, a->ClientOption); @@ -9401,8 +9578,9 @@ void CmPrintStatusToListViewEx(LVB *b, RPC_CLIENT_GET_CONNECTION_STATUS *s, bool GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->StartTime), NULL); LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_START_TIME"), tmp); - GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablishedTime), NULL); - LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablishedTime == 0 ? _UU("CM_ST_NONE") : tmp); + GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablisiedTime), NULL); + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablisiedTime == 0 ? _UU("CM_ST_NONE") : tmp); if (s->Connected) { diff --git a/src/Cedar/CM.h b/src/Cedar/CM.h index 072a6b2a..f4124f30 100644 --- a/src/Cedar/CM.h +++ b/src/Cedar/CM.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // CM.h diff --git a/src/Cedar/CMInner.h b/src/Cedar/CMInner.h index 94d9f55e..90fec6d5 100644 --- a/src/Cedar/CMInner.h +++ b/src/Cedar/CMInner.h @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - ELIN (https://github.com/el1n) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // CMInner.h @@ -289,6 +181,14 @@ typedef struct CM_TRAFFIC_DLG bool CloseDialogAfter; // Flag of whether or not to close the dialog } CM_TRAFFIC_DLG; +typedef struct CM_PROXY_HTTP_HEADER_DLG +{ + CLIENT_OPTION *ClientOption; + HWND EditBox; + UINT CurrentItem; + UINT CurrentSubItem; +} CM_PROXY_HTTP_HEADER_DLG; + // Internet connection settings typedef struct CM_INTERNET_SETTING { @@ -498,7 +398,6 @@ void CmEditAccountDlgInit(HWND hWnd, CM_ACCOUNT *a); void CmEditAccountDlgOnOk(HWND hWnd, CM_ACCOUNT *a); void CmEditAccountDlgStartEnumHub(HWND hWnd, CM_ACCOUNT *a); bool CmLoadXAndK(HWND hWnd, X **x, K **k); -bool CmLoadK(HWND hWnd, K **k); bool CmLoadKEx(HWND hWnd, K **k, char *filename, UINT size); bool CmLoadKExW(HWND hWnd, K **k, wchar_t *filename, UINT size); bool CmLoadXFromFileOrSecureCard(HWND hWnd, X **x); @@ -639,4 +538,8 @@ void CmProxyDlgSet(HWND hWnd, CLIENT_OPTION *o, CM_INTERNET_SETTING *setting); bool CmGetProxyServerNameAndPortFromIeProxyRegStr(char *name, UINT name_size, UINT *port, char *str, char *server_type); void *CmUpdateJumpList(UINT start_id); - +void CmProxyHttpHeaderDlgUpdate(HWND hWnd); +void CmProxyHttpHeaderDlgRefresh(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d); +void CmProxyHttpHeaderDlgInit(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d); +UINT CmProxyHttpHeaderDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); +bool CmProxyHttpHeaderDlg(HWND hWnd, CLIENT_OPTION *a); diff --git a/src/Cedar/CMakeLists.txt b/src/Cedar/CMakeLists.txt index 19b191bf..92068c00 100644 --- a/src/Cedar/CMakeLists.txt +++ b/src/Cedar/CMakeLists.txt @@ -1,22 +1,43 @@ file(GLOB SOURCES_CEDAR "*.c") file(GLOB HEADERS_CEDAR "*.h") -add_library(cedar STATIC ${SOURCES_CEDAR} ${HEADERS_CEDAR}) +if(WIN32) + enable_language(CXX) + file(GLOB SOURCES_CEDAR_CPP "*.cpp") +endif() + +if(WIN32) + add_library(cedar STATIC ${SOURCES_CEDAR} ${SOURCES_CEDAR_CPP} ${HEADERS_CEDAR}) +else() + add_library(cedar SHARED ${SOURCES_CEDAR} ${SOURCES_CEDAR_CPP} ${HEADERS_CEDAR}) +endif() set_target_properties(cedar PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp/Cedar" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp/Cedar" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp/Cedar" + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" ) -find_library(LIB_READLINE readline) -find_package(Curses REQUIRED) +if(WIN32) + set_target_properties(cedar + PROPERTIES + COMPILE_PDB_NAME "cedar" + COMPILE_PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) -target_link_libraries(cedar ${LIB_READLINE} ${CURSES_LIBRARIES}) + target_include_directories(cedar PRIVATE winpcap) +endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - target_link_libraries(cedar pcap) +if(UNIX) + find_library(LIB_READLINE readline) + find_package(Curses REQUIRED) + + target_link_libraries(cedar PRIVATE ${LIB_READLINE} ${CURSES_LIBRARIES}) + + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + target_link_libraries(cedar PRIVATE mayaqua pcap) + endif() endif() # Version @@ -33,24 +54,21 @@ cmake_host_system_information(RESULT BUILDER_HOSTNAME QUERY HOSTNAME) add_definitions(-DBUILD_PLACE="${BUILDER_HOSTNAME}") -# Date and time -string(TIMESTAMP BUILD_DAY "%d" UTC) -string(TIMESTAMP BUILD_MONTH "%m" UTC) -string(TIMESTAMP BUILD_YEAR "%Y" UTC) -string(TIMESTAMP BUILD_HOUR "%H" UTC) -string(TIMESTAMP BUILD_MINUTE "%M" UTC) -string(TIMESTAMP BUILD_SECOND "%S" UTC) - -## Remove leading 0 -string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_DAY "${BUILD_DAY}") -string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MONTH "${BUILD_MONTH}") -string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_YEAR "${BUILD_YEAR}") -string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_HOUR "${BUILD_HOUR}") -string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MINUTE "${BUILD_MINUTE}") -string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_SECOND "${BUILD_SECOND}") - -message(STATUS "Build date: ${BUILD_DAY}/${BUILD_MONTH}/${BUILD_YEAR}") -message(STATUS "Build time: ${BUILD_HOUR}:${BUILD_MINUTE}:${BUILD_SECOND}") +# Remove leading 0 from date and time +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_DAY "${DATE_DAY}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MONTH "${DATE_MONTH}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_YEAR "${DATE_YEAR}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_HOUR "${TIME_HOUR}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_MINUTE "${TIME_MINUTE}") +string(REGEX REPLACE "^0([^ ]*)" "\\1" BUILD_SECOND "${TIME_SECOND}") add_definitions(-DBUILD_DATE_D=${BUILD_DAY} -DBUILD_DATE_M=${BUILD_MONTH} -DBUILD_DATE_Y=${BUILD_YEAR}) add_definitions(-DBUILD_DATE_HO=${BUILD_HOUR} -DBUILD_DATE_MI=${BUILD_MINUTE} -DBUILD_DATE_SE=${BUILD_SECOND}) + +if(UNIX) + install(TARGETS cedar + COMPONENT "common" + DESTINATION "${CMAKE_INSTALL_LIBDIR}" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) +endif() diff --git a/src/Cedar/Cedar.c b/src/Cedar/Cedar.c index 16694de2..b8aa5254 100644 --- a/src/Cedar/Cedar.c +++ b/src/Cedar/Cedar.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Cedar.c @@ -1522,14 +1416,7 @@ void GetCedarVersion(char *tmp, UINT size) UINT GetCedarVersionNumber() { - UINT pow = 10; - - while (CEDAR_VERSION_MAJOR >= pow) - { - pow *= 10; - } - - return CEDAR_VERSION_MAJOR * pow + CEDAR_VERSION_MINOR; + return CEDAR_VERSION_MAJOR * 100 + CEDAR_VERSION_MINOR; } // Create Cedar object @@ -1554,6 +1441,8 @@ CEDAR *NewCedar(X *server_x, K *server_k) StrCpy(c->OpenVPNDefaultClientOption, sizeof(c->OpenVPNDefaultClientOption), OVPN_DEF_CLIENT_OPTION_STRING); + c->OpenVPNPushDummyIPv4AddressOnL2Mode = true; // Default true. Override by the config file. + #ifdef BETA_NUMBER c->Beta = BETA_NUMBER; #endif // BETA_NUMBER @@ -1717,6 +1606,9 @@ void InitCedar() // Initialize protocol module InitProtocol(); + + // Initialize third-party protocol interface + ProtoInit(); } // Free Cedar communication module @@ -1727,6 +1619,9 @@ void FreeCedar() return; } + // Free third-party protocol interface + ProtoFree(); + // Free protocol module FreeProtocol(); } diff --git a/src/Cedar/Cedar.h b/src/Cedar/Cedar.h index afd2882c..408bc44e 100644 --- a/src/Cedar/Cedar.h +++ b/src/Cedar/Cedar.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Cedar.h @@ -209,6 +103,9 @@ // Hidden password string of 8 characters #define HIDDEN_PASSWORD "********" +// Default separator character for the hub name in the username +#define DEFAULT_USERNAME_HUB_SEPARATOR '@' + ////////////////////////////////////////////////////////////////////// // @@ -391,7 +288,8 @@ // Type of proxy #define PROXY_DIRECT 0 // Direct TCP connection #define PROXY_HTTP 1 // Connection via HTTP proxy server -#define PROXY_SOCKS 2 // Connection via SOCKS proxy server +#define PROXY_SOCKS 2 // Connection via SOCKS4 proxy server +#define PROXY_SOCKS5 3 // Connection via SOCKS5 proxy server // Direction of data flow #define TCP_BOTH 0 // Bi-directional @@ -407,8 +305,7 @@ #define CONNECTION_TYPE_ADMIN_RPC 5 // RPC for Management #define CONNECTION_TYPE_ENUM_HUB 6 // HUB enumeration #define CONNECTION_TYPE_PASSWORD 7 // Password change -#define CONNECTION_TYPE_SSTP 8 // SSTP -#define CONNECTION_TYPE_OPENVPN 9 // OpenVPN +#define CONNECTION_TYPE_OTHER 0xffffffff // E.g. Third-party protocol // Protocol #define CONNECTION_TCP 0 // TCP protocol @@ -537,19 +434,23 @@ #define LOG_ENGINE_BUFFER_CACHE_SIZE_MAX (10 * 1024 * 1024) // Write cache size // Constant such as a file name -#define SERVER_LOG_DIR_NAME "@server_log" +#define SERVER_LOG_DIR "server_log" +#define SERVER_LOG_DIR_NAME "@"SERVER_LOG_DIR #define BRIDGE_LOG_DIR_NAME SERVER_LOG_DIR_NAME #define SERVER_LOG_PERFIX "vpn" -#define HUB_SECURITY_LOG_DIR_NAME "@security_log" -#define HUB_SECURITY_LOG_FILE_NAME "@security_log/%s" +#define HUB_SECURITY_LOG_DIR "security_log" +#define HUB_SECURITY_LOG_DIR_NAME "@"HUB_SECURITY_LOG_DIR +#define HUB_SECURITY_LOG_FILE_NAME HUB_SECURITY_LOG_DIR_NAME"/%s" #define HUB_SECURITY_LOG_PREFIX "sec" -#define HUB_PACKET_LOG_DIR_NAME "@packet_log" -#define HUB_PACKET_LOG_FILE_NAME "@packet_log/%s" +#define HUB_PACKET_LOG_DIR "packet_log" +#define HUB_PACKET_LOG_DIR_NAME "@"HUB_PACKET_LOG_DIR +#define HUB_PACKET_LOG_FILE_NAME HUB_PACKET_LOG_DIR_NAME"/%s" #define HUB_PACKET_LOG_PREFIX "pkt" -#define NAT_LOG_DIR_NAME "@secure_nat_log" -#define NAT_LOG_FILE_NAME "@secure_nat_log/%s" +#define NAT_LOG_DIR "secure_nat_log" +#define NAT_LOG_DIR_NAME "@"NAT_LOG_DIR +#define NAT_LOG_FILE_NAME NAT_LOG_DIR_NAME"/%s" #define NAT_LOG_PREFIX "snat" #define CLIENT_LOG_DIR_NAME "@client_log" @@ -670,8 +571,9 @@ #define EL_ADMIN_PORT 22888 #define EL_CONFIG_FILENAME "@etherlogger.config" -#define EL_PACKET_LOG_DIR_NAME "@etherlogger_log" -#define EL_PACKET_LOG_FILE_NAME "@etherlogger_log/%s" +#define EL_PACKET_LOG_DIR "etherlogger_log" +#define EL_PACKET_LOG_DIR_NAME "@"EL_PACKET_LOG_DIR +#define EL_PACKET_LOG_FILE_NAME EL_PACKET_LOG_DIR_NAME"/%s" #define EL_PACKET_LOG_PREFIX "pkt" #define EL_LICENSE_CHECK_SPAN (10 * 1000) @@ -1023,6 +925,7 @@ typedef struct CEDAR COUNTER *ConnectionIncrement; // Connection increment counter X *ServerX; // Server certificate K *ServerK; // Private key of the server certificate + char UsernameHubSeparator; // Character which separates the username from the hub name char *CipherList; // List of encryption algorithms UINT Version; // Version information UINT Build; // Build Number @@ -1075,7 +978,10 @@ typedef struct CEDAR UINT FifoBudget; // Fifo budget SSL_ACCEPT_SETTINGS SslAcceptSettings; // SSL Accept Settings UINT DhParamBits; // Bits of Diffie-Hellman parameters - char OpenVPNDefaultClientOption[MAX_SIZE]; // OpenVPN Default Client Option String + char OpenVPNDefaultClientOption[MAX_SIZE]; // OpenVPN: Default Client Option String + bool OpenVPNObfuscation; // OpenVPN: Obfuscation mode + char OpenVPNObfuscationMask[MAX_SIZE]; // OpenVPN: String (mask) for XOR obfuscation + bool OpenVPNPushDummyIPv4AddressOnL2Mode; // OpenVPN: Push a dummy IPv4 address on L2 mode } CEDAR; // Type of CEDAR @@ -1129,6 +1035,7 @@ typedef struct CEDAR // Layer-2/Layer-3 converter #include // Third party protocols +#include #include #include #include diff --git a/src/Cedar/Cedar.vcproj b/src/Cedar/Cedar.vcproj index 1fa2ed21..9faa83fc 100644 --- a/src/Cedar/Cedar.vcproj +++ b/src/Cedar/Cedar.vcproj @@ -70,7 +70,7 @@ /> + + @@ -1280,6 +1284,10 @@ RelativePath=".\NullLan.h" > + + diff --git a/src/Cedar/CedarPch.c b/src/Cedar/CedarPch.c index 8c6d3a4d..722c7afa 100644 --- a/src/Cedar/CedarPch.c +++ b/src/Cedar/CedarPch.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // CedarPch.c diff --git a/src/Cedar/CedarPch.h b/src/Cedar/CedarPch.h index 298d0a83..a3eac0f6 100644 --- a/src/Cedar/CedarPch.h +++ b/src/Cedar/CedarPch.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // CedarPch.h diff --git a/src/Cedar/CedarType.h b/src/Cedar/CedarType.h index 65163cf0..8b821996 100644 --- a/src/Cedar/CedarType.h +++ b/src/Cedar/CedarType.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // CedarType.h diff --git a/src/Cedar/Client.c b/src/Cedar/Client.c index ddc391d6..d587d6e3 100644 --- a/src/Cedar/Client.c +++ b/src/Cedar/Client.c @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - nattoheaven (https://github.com/nattoheaven) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Client.c @@ -3918,14 +3810,16 @@ void OutRpcClientEnumCa(PACK *p, RPC_CLIENT_ENUM_CA *e) PackAddNum(p, "NumItem", e->NumItem); + PackSetCurrentJsonGroupName(p, "CAList"); for (i = 0;i < e->NumItem;i++) { RPC_CLIENT_ENUM_CA_ITEM *item = e->Items[i]; PackAddIntEx(p, "Key", item->Key, i, e->NumItem); PackAddUniStrEx(p, "SubjectName", item->SubjectName, i, e->NumItem); PackAddUniStrEx(p, "IssuerName", item->IssuerName, i, e->NumItem); - PackAddInt64Ex(p, "Expires", item->Expires, i, e->NumItem); + PackAddTime64Ex(p, "Expires", item->Expires, i, e->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } // RPC_GET_ISSUER @@ -4196,6 +4090,7 @@ void OutRpcClientEnumSecure(PACK *p, RPC_CLIENT_ENUM_SECURE *e) PackAddNum(p, "NumItem", e->NumItem); + PackSetCurrentJsonGroupName(p, "SecureDeviceList"); for (i = 0;i < e->NumItem;i++) { RPC_CLIENT_ENUM_SECURE_ITEM *item = e->Items[i]; @@ -4205,6 +4100,7 @@ void OutRpcClientEnumSecure(PACK *p, RPC_CLIENT_ENUM_SECURE *e) PackAddStrEx(p, "DeviceName", item->DeviceName, i, e->NumItem); PackAddStrEx(p, "Manufacturer", item->Manufacturer, i, e->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } // RPC_USE_SECURE @@ -4261,11 +4157,13 @@ void OutRpcEnumObjectInSecure(PACK *p, RPC_ENUM_OBJECT_IN_SECURE *e) PackAddNum(p, "NumItem", e->NumItem); PackAddInt(p, "hWnd", e->hWnd); + PackSetCurrentJsonGroupName(p, "ObjectList"); for (i = 0;i < e->NumItem;i++) { PackAddStrEx(p, "ItemName", e->ItemName[i], i, e->NumItem); PackAddIntEx(p, "ItemType", e->ItemType[i], i, e->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } // RPC_CLIENT_CREATE_VLAN @@ -4385,6 +4283,7 @@ void OutRpcClientEnumVLan(PACK *p, RPC_CLIENT_ENUM_VLAN *v) PackAddNum(p, "NumItem", v->NumItem); + PackSetCurrentJsonGroupName(p, "VLanList"); for (i = 0;i < v->NumItem;i++) { RPC_CLIENT_ENUM_VLAN_ITEM *item = v->Items[i]; @@ -4394,6 +4293,7 @@ void OutRpcClientEnumVLan(PACK *p, RPC_CLIENT_ENUM_VLAN *v) PackAddStrEx(p, "MacAddress", item->MacAddress, i, v->NumItem); PackAddStrEx(p, "Version", item->Version, i, v->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } // CLIENT_OPTION @@ -4424,6 +4324,7 @@ void InRpcClientOption(CLIENT_OPTION *c, PACK *p) PackGetStr(p, "ProxyName", c->ProxyName, sizeof(c->ProxyName)); PackGetStr(p, "ProxyUsername", c->ProxyUsername, sizeof(c->ProxyUsername)); PackGetStr(p, "ProxyPassword", c->ProxyPassword, sizeof(c->ProxyPassword)); + PackGetStr(p, "CustomHttpHeader", c->CustomHttpHeader, sizeof(c->CustomHttpHeader)); PackGetStr(p, "HubName", c->HubName, sizeof(c->HubName)); PackGetStr(p, "DeviceName", c->DeviceName, sizeof(c->DeviceName)); c->UseEncrypt = PackGetInt(p, "UseEncrypt") ? true : false; @@ -4449,6 +4350,7 @@ void OutRpcClientOption(PACK *p, CLIENT_OPTION *c) PackAddStr(p, "ProxyName", c->ProxyName); PackAddStr(p, "ProxyUsername", c->ProxyUsername); PackAddStr(p, "ProxyPassword", c->ProxyPassword); + PackAddStr(p, "CustomHttpHeader", c->CustomHttpHeader); PackAddStr(p, "HubName", c->HubName); PackAddStr(p, "DeviceName", c->DeviceName); PackAddInt(p, "Port", c->Port); @@ -4458,10 +4360,10 @@ void OutRpcClientOption(PACK *p, CLIENT_OPTION *c) PackAddInt(p, "NumRetry", c->NumRetry); PackAddInt(p, "RetryInterval", c->RetryInterval); PackAddInt(p, "MaxConnection", c->MaxConnection); - PackAddInt(p, "UseEncrypt", c->UseEncrypt); - PackAddInt(p, "UseCompress", c->UseCompress); - PackAddInt(p, "HalfConnection", c->HalfConnection); - PackAddInt(p, "NoRoutingTracking", c->NoRoutingTracking); + PackAddBool(p, "UseEncrypt", c->UseEncrypt); + PackAddBool(p, "UseCompress", c->UseCompress); + PackAddBool(p, "HalfConnection", c->HalfConnection); + PackAddBool(p, "NoRoutingTracking", c->NoRoutingTracking); PackAddInt(p, "AdditionalConnectionInterval", c->AdditionalConnectionInterval); PackAddInt(p, "ConnectionDisconnectSpan", c->ConnectionDisconnectSpan); PackAddBool(p, "HideStatusWindow", c->HideStatusWindow); @@ -4674,6 +4576,7 @@ void OutRpcClientEnumAccount(PACK *p, RPC_CLIENT_ENUM_ACCOUNT *e) PackAddNum(p, "NumItem", e->NumItem); + PackSetCurrentJsonGroupName(p, "AccountList"); for (i = 0;i < e->NumItem;i++) { RPC_CLIENT_ENUM_ACCOUNT_ITEM *item = e->Items[i]; @@ -4689,10 +4592,11 @@ void OutRpcClientEnumAccount(PACK *p, RPC_CLIENT_ENUM_ACCOUNT *e) PackAddBoolEx(p, "Connected", item->Connected, i, e->NumItem); PackAddIntEx(p, "Port", item->Port, i, e->NumItem); PackAddStrEx(p, "HubName", item->HubName, i, e->NumItem); - PackAddInt64Ex(p, "CreateDateTime", item->CreateDateTime, i, e->NumItem); - PackAddInt64Ex(p, "UpdateDateTime", item->UpdateDateTime, i, e->NumItem); - PackAddInt64Ex(p, "LastConnectDateTime", item->LastConnectDateTime, i, e->NumItem); + PackAddTime64Ex(p, "CreateDateTime", item->CreateDateTime, i, e->NumItem); + PackAddTime64Ex(p, "UpdateDateTime", item->UpdateDateTime, i, e->NumItem); + PackAddTime64Ex(p, "LastConnectDateTime", item->LastConnectDateTime, i, e->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } // RPC_CLIENT_DELETE_ACCOUNT @@ -4808,9 +4712,9 @@ void OutRpcClientGetAccount(PACK *p, RPC_CLIENT_GET_ACCOUNT *c) PackAddData(p, "ShortcutKey", c->ShortcutKey, SHA1_SIZE); - PackAddInt64(p, "CreateDateTime", c->CreateDateTime); - PackAddInt64(p, "UpdateDateTime", c->UpdateDateTime); - PackAddInt64(p, "LastConnectDateTime", c->LastConnectDateTime); + PackAddTime64(p, "CreateDateTime", c->CreateDateTime); + PackAddTime64(p, "UpdateDateTime", c->UpdateDateTime); + PackAddTime64(p, "LastConnectDateTime", c->LastConnectDateTime); } // RPC_CLIENT_CONNECT @@ -4898,7 +4802,8 @@ void InRpcClientGetConnectionStatus(RPC_CLIENT_GET_CONNECTION_STATUS *s, PACK *p s->NumTcpConnectionsDownload = PackGetInt(p, "NumTcpConnectionsDownload"); s->StartTime = PackGetInt64(p, "StartTime"); - s->FirstConnectionEstablishedTime = PackGetInt64(p, "FirstConnectionEstablishedTime"); + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + s->FirstConnectionEstablisiedTime = PackGetInt64(p, "FirstConnectionEstablisiedTime"); s->CurrentConnectionEstablishTime = PackGetInt64(p, "CurrentConnectionEstablishTime"); s->TotalSendSize = PackGetInt64(p, "TotalSendSize"); s->TotalRecvSize = PackGetInt64(p, "TotalRecvSize"); @@ -4958,32 +4863,32 @@ void OutRpcClientGetConnectionStatus(PACK *p, RPC_CLIENT_GET_CONNECTION_STATUS * PackAddData(p, "SessionKey", c->SessionKey, SHA1_SIZE); - PackAddInt(p, "Active", c->Active); - PackAddInt(p, "Connected", c->Connected); + PackAddBool(p, "Active", c->Active); + PackAddBool(p, "Connected", c->Connected); PackAddInt(p, "SessionStatus", c->SessionStatus); PackAddInt(p, "ServerPort", c->ServerPort); PackAddInt(p, "ServerProductVer", c->ServerProductVer); PackAddInt(p, "ServerProductBuild", c->ServerProductBuild); PackAddInt(p, "NumConnectionsEstablished", c->NumConnectionsEstablished); - PackAddInt(p, "HalfConnection", c->HalfConnection); - PackAddInt(p, "QoS", c->QoS); + PackAddBool(p, "HalfConnection", c->HalfConnection); + PackAddBool(p, "QoS", c->QoS); PackAddInt(p, "MaxTcpConnections", c->MaxTcpConnections); PackAddInt(p, "NumTcpConnections", c->NumTcpConnections); PackAddInt(p, "NumTcpConnectionsUpload", c->NumTcpConnectionsUpload); PackAddInt(p, "NumTcpConnectionsDownload", c->NumTcpConnectionsDownload); - PackAddInt(p, "UseEncrypt", c->UseEncrypt); - PackAddInt(p, "UseCompress", c->UseCompress); - PackAddInt(p, "IsRUDPSession", c->IsRUDPSession); + PackAddBool(p, "UseEncrypt", c->UseEncrypt); + PackAddBool(p, "UseCompress", c->UseCompress); + PackAddBool(p, "IsRUDPSession", c->IsRUDPSession); PackAddStr(p, "UnderlayProtocol", c->UnderlayProtocol); - PackAddInt(p, "IsUdpAccelerationEnabled", c->IsUdpAccelerationEnabled); - PackAddInt(p, "IsUsingUdpAcceleration", c->IsUsingUdpAcceleration); + PackAddBool(p, "IsUdpAccelerationEnabled", c->IsUdpAccelerationEnabled); + PackAddBool(p, "IsUsingUdpAcceleration", c->IsUsingUdpAcceleration); PackAddBool(p, "IsBridgeMode", c->IsBridgeMode); PackAddBool(p, "IsMonitorMode", c->IsMonitorMode); - PackAddInt64(p, "StartTime", c->StartTime); - PackAddInt64(p, "FirstConnectionEstablishedTime", c->FirstConnectionEstablishedTime); - PackAddInt64(p, "CurrentConnectionEstablishTime", c->CurrentConnectionEstablishTime); + PackAddTime64(p, "StartTime", c->StartTime); + PackAddTime64(p, "FirstConnectionEstablisiedTime", c->FirstConnectionEstablisiedTime); + PackAddTime64(p, "CurrentConnectionEstablishTime", c->CurrentConnectionEstablishTime); PackAddInt64(p, "TotalSendSize", c->TotalSendSize); PackAddInt64(p, "TotalRecvSize", c->TotalRecvSize); PackAddInt64(p, "TotalSendSizeReal", c->TotalSendSizeReal); @@ -5958,7 +5863,8 @@ void CiGetSessionStatus(RPC_CLIENT_GET_CONNECTION_STATUS *st, SESSION *s) // Connection start time st->StartTime = TickToTime(s->CreatedTime); // Connection completion time of the first connection - st->FirstConnectionEstablishedTime = TickToTime(s->FirstConnectionEstablishedTime); + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + st->FirstConnectionEstablisiedTime = TickToTime(s->FirstConnectionEstablisiedTime); // Number of connections have been established so far st->NumConnectionsEstablished = s->NumConnectionsEstablished; } @@ -9404,6 +9310,7 @@ CLIENT_OPTION *CiLoadClientOption(FOLDER *f) StrCpy(o->ProxyPassword, sizeof(o->ProxyPassword), s); Free(s); FreeBuf(b); + CfgGetStr(f, "CustomHttpHeader", o->CustomHttpHeader, sizeof(o->CustomHttpHeader)); o->NumRetry = CfgGetInt(f, "NumRetry"); o->RetryInterval = CfgGetInt(f, "RetryInterval"); CfgGetStr(f, "HubName", o->HubName, sizeof(o->HubName)); @@ -9729,6 +9636,8 @@ bool CiReadSettingFromCfg(CLIENT *c, FOLDER *root) FreeBuf(pw); } + CfgGetStr(proxy, "CustomHttpHeader", t.CustomHttpHeader, sizeof(t.CustomHttpHeader)); + Copy(&c->CommonProxySetting, &t, sizeof(INTERNET_SETTING)); } @@ -9938,6 +9847,7 @@ void CiWriteClientOption(FOLDER *f, CLIENT_OPTION *o) b = EncryptPassword(o->ProxyPassword); CfgAddByte(f, "ProxyPassword", b->Buf, b->Size); FreeBuf(b); + CfgAddStr(f, "CustomHttpHeader", o->CustomHttpHeader); CfgAddInt(f, "NumRetry", o->NumRetry); CfgAddInt(f, "RetryInterval", o->RetryInterval); CfgAddStr(f, "HubName", o->HubName); @@ -9982,7 +9892,7 @@ char *DecryptPassword(BUF *b) } str = ZeroMalloc(b->Size + 1); - c = NewCrypt(key, sizeof(key)); + c = NewCrypt(key, sizeof(key)); // NOTE by Daiyuu Nobori 2018-09-28: This is not a bug! Do not try to fix it!! Encrypt(c, str, b->Buf, b->Size); FreeCrypt(c); @@ -10028,7 +9938,7 @@ BUF *EncryptPassword(char *password) size = StrLen(password) + 1; tmp = ZeroMalloc(size); - c = NewCrypt(key, sizeof(key)); + c = NewCrypt(key, sizeof(key)); // NOTE by Daiyuu Nobori 2018-09-28: This is not a bug! Do not try to fix it!! Encrypt(c, tmp, password, size - 1); FreeCrypt(c); @@ -10272,6 +10182,8 @@ void CiWriteSettingToCfg(CLIENT *c, FOLDER *root) FreeBuf(pw); } + + CfgAddStr(proxy, "CustomHttpHeader", t->CustomHttpHeader); } // CA diff --git a/src/Cedar/Client.h b/src/Cedar/Client.h index 540a18f9..013ddbfb 100644 --- a/src/Cedar/Client.h +++ b/src/Cedar/Client.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Client.h @@ -431,7 +325,8 @@ struct RPC_CLIENT_GET_CONNECTION_STATUS X *ServerX; // Server certificate X *ClientX; // Client certificate UINT64 StartTime; // Connection start time - UINT64 FirstConnectionEstablishedTime; // Connection completion time of the first connection + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + UINT64 FirstConnectionEstablisiedTime; // Connection completion time of the first connection UINT64 CurrentConnectionEstablishTime; // Connection completion time of this connection UINT NumConnectionsEstablished; // Number of connections have been established so far bool HalfConnection; // Half-connection diff --git a/src/Cedar/Command.c b/src/Cedar/Command.c index 4be5e311..23dc9481 100644 --- a/src/Cedar/Command.c +++ b/src/Cedar/Command.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Command.c @@ -3054,9 +2948,13 @@ void PcMain(PC *pc) {"AccountEncryptEnable", PcAccountEncryptEnable}, {"AccountCompressEnable", PcAccountCompressEnable}, {"AccountCompressDisable", PcAccountCompressDisable}, + {"AccountHttpHeaderAdd", PcAccountHttpHeaderAdd}, + {"AccountHttpHeaderDelete", PcAccountHttpHeaderDelete}, + {"AccountHttpHeaderGet", PcAccountHttpHeaderGet}, {"AccountProxyNone", PcAccountProxyNone}, {"AccountProxyHttp", PcAccountProxyHttp}, {"AccountProxySocks", PcAccountProxySocks}, + {"AccountProxySocks5", PcAccountProxySocks5}, {"AccountServerCertEnable", PcAccountServerCertEnable}, {"AccountServerCertDisable", PcAccountServerCertDisable}, {"AccountRetryOnServerCertEnable", PcAccountRetryOnServerCertEnable}, @@ -4075,6 +3973,8 @@ wchar_t *GetProtocolName(UINT n) return _UU("PROTO_HTTP_PROXY"); case PROXY_SOCKS: return _UU("PROTO_SOCKS_PROXY"); + case PROXY_SOCKS5: + return _UU("PROTO_SOCKS5_PROXY"); } return _UU("PROTO_UNKNOWN"); @@ -5109,6 +5009,226 @@ UINT PcAccountCompressDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *pa return ret; } +UINT PcAccountHttpHeaderAdd(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_AccountHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"DATA", CmdPrompt, _UU("CMD_AccountHttpHeader_Prompt_Data"), NULL, NULL}, + }; + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + ret = CcGetAccount(pc->RemoteClient, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + HTTP_HEADER *header = NULL; + char *name = GetParamStr(o, "NAME"); + + Trim(name); + + header = NewHttpHeader("", "", ""); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + for (i = 0; i < tokens->NumTokens; i++) + { + AddHttpValueStr(header, tokens->Token[i]); + } + FreeToken(tokens); + + if (GetHttpValue(header, name) == NULL) + { + RPC_CLIENT_CREATE_ACCOUNT z; + char s[HTTP_CUSTOM_HEADER_MAX_SIZE]; + + Format(s, sizeof(s), "%s: %s\r\n", name, GetParamStr(o, "DATA")); + EnSafeHttpHeaderValueStr(s, ' '); + + if ((StrLen(s) + StrLen(t.ClientOption->CustomHttpHeader)) < sizeof(t.ClientOption->CustomHttpHeader)) { + StrCat(t.ClientOption->CustomHttpHeader, sizeof(s), s); + + Zero(&z, sizeof(z)); + z.CheckServerCert = t.CheckServerCert; + z.RetryOnServerCert = t.RetryOnServerCert; + z.ClientAuth = t.ClientAuth; + z.ClientOption = t.ClientOption; + z.ServerCert = t.ServerCert; + z.StartupAccount = t.StartupAccount; + + ret = CcSetAccount(pc->RemoteClient, &z); + } + else + { + // Error has occurred + ret = ERR_TOO_MANT_ITEMS; + } + } + else + { + // Error has occurred + ret = ERR_OBJECT_EXISTS; + } + + FreeHttpHeader(header); + } + + if (ret != ERR_NO_ERROR) + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PcAccountHttpHeaderDelete(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_AccountHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // Get the parameter list + LIST *o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + ret = CcGetAccount(pc->RemoteClient, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + RPC_CLIENT_CREATE_ACCOUNT z; + char *value = GetParamStr(o, "NAME"); + + Zero(&z, sizeof(z)); + z.CheckServerCert = t.CheckServerCert; + z.RetryOnServerCert = t.RetryOnServerCert; + z.ClientAuth = t.ClientAuth; + z.ClientOption = t.ClientOption; + z.ServerCert = t.ServerCert; + z.StartupAccount = t.StartupAccount; + + Zero(z.ClientOption->CustomHttpHeader, sizeof(z.ClientOption->CustomHttpHeader)); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + if (StartWith(tokens->Token[i], value) == false) + { + StrCat(z.ClientOption->CustomHttpHeader, sizeof(z.ClientOption->CustomHttpHeader), tokens->Token[i]); + StrCat(z.ClientOption->CustomHttpHeader, 1, "\r\n"); + } + } + + ret = CcSetAccount(pc->RemoteClient, &z); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PcAccountHttpHeaderGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // Get the parameter list + LIST *o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + ret = CcGetAccount(pc->RemoteClient, &t); + + // Release of the parameter list + FreeParamValueList(o); + + if (ret == ERR_NO_ERROR) + { + wchar_t unistr[HTTP_CUSTOM_HEADER_MAX_SIZE]; + TOKEN_LIST *tokens = NULL; + UINT i = 0; + CT *ct = CtNew(); + CtInsertColumn(ct, _UU("CMD_CT_STD_COLUMN_1"), false); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + StrToUni(unistr, sizeof(unistr), tokens->Token[i]); + CtInsert(ct, unistr); + } + + CtFreeEx(ct, c, false); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + return ret; +} + // Set the connection method of the connection settings to the direct TCP/IP connection UINT PcAccountProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -5239,7 +5359,7 @@ UINT PcAccountProxyHttp(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) return ret; } -// Set the connection method of the connection settings to the SOCKS proxy server connection +// Set the connection method of the connection settings to the SOCKS4 proxy server connection UINT PcAccountProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { LIST *o; @@ -5276,7 +5396,7 @@ UINT PcAccountProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) UINT port; // Data change - if (ParseHostPort(GetParamStr(o, "SERVER"), &host, &port, 8080)) + if (ParseHostPort(GetParamStr(o, "SERVER"), &host, &port, 1080)) { t.ClientOption->ProxyType = PROXY_SOCKS; StrCpy(t.ClientOption->ProxyName, sizeof(t.ClientOption->ProxyName), host); @@ -5311,6 +5431,78 @@ UINT PcAccountProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) return ret; } +// Set the connection method of the connection settings to the SOCKS5 proxy server connection +UINT PcAccountProxySocks5(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"SERVER", CmdPrompt, _UU("CMD_AccountProxyHttp_Prompt_Server"), CmdEvalHostAndPort, NULL}, + {"USERNAME", CmdPrompt, NULL, NULL, NULL}, + {"PASSWORD", CmdPrompt, NULL, NULL, NULL}, + }; + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + + ret = CcGetAccount(pc->RemoteClient, &t); + + if (ret == ERR_NO_ERROR) + { + RPC_CLIENT_CREATE_ACCOUNT z; + char *host; + UINT port; + + // Data change + if (ParseHostPort(GetParamStr(o, "SERVER"), &host, &port, 1080)) + { + t.ClientOption->ProxyType = PROXY_SOCKS5; + StrCpy(t.ClientOption->ProxyName, sizeof(t.ClientOption->ProxyName), host); + t.ClientOption->ProxyPort = port; + StrCpy(t.ClientOption->ProxyUsername, sizeof(t.ClientOption->ProxyName), GetParamStr(o, "USERNAME")); + StrCpy(t.ClientOption->ProxyPassword, sizeof(t.ClientOption->ProxyName), GetParamStr(o, "PASSWORD")); + Free(host); + } + + Zero(&z, sizeof(z)); + z.CheckServerCert = t.CheckServerCert; + z.RetryOnServerCert = t.RetryOnServerCert; + z.ClientAuth = t.ClientAuth; + z.ClientOption = t.ClientOption; + z.ServerCert = t.ServerCert; + z.StartupAccount = t.StartupAccount; + + ret = CcSetAccount(pc->RemoteClient, &z); + } + + if (ret != ERR_NO_ERROR) + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + // Enable validation option for server certificate of connection settings UINT PcAccountServerCertEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -7401,8 +7593,12 @@ void PsMain(PS *ps) {"CascadeCompressEnable", PsCascadeCompressEnable}, {"CascadeCompressDisable", PsCascadeCompressDisable}, {"CascadeProxyNone", PsCascadeProxyNone}, + {"CascadeHttpHeaderAdd", PsCascadeHttpHeaderAdd}, + {"CascadeHttpHeaderDelete", PsCascadeHttpHeaderDelete}, + {"CascadeHttpHeaderGet", PsCascadeHttpHeaderGet}, {"CascadeProxyHttp", PsCascadeProxyHttp}, {"CascadeProxySocks", PsCascadeProxySocks}, + {"CascadeProxySocks5", PsCascadeProxySocks5}, {"CascadeServerCertEnable", PsCascadeServerCertEnable}, {"CascadeServerCertDisable", PsCascadeServerCertDisable}, {"CascadeServerCertSet", PsCascadeServerCertSet}, @@ -7497,6 +7693,8 @@ void PsMain(PS *ps) {"OpenVpnEnable", PsOpenVpnEnable}, {"OpenVpnGet", PsOpenVpnGet}, {"OpenVpnMakeConfig", PsOpenVpnMakeConfig}, + {"OpenVpnObfuscationEnable", PsOpenVpnObfuscationEnable}, + {"OpenVpnObfuscationGet", PsOpenVpnObfuscationGet}, {"SstpEnable", PsSstpEnable}, {"SstpGet", PsSstpGet}, {"ServerCertRegenerate", PsServerCertRegenerate}, @@ -8530,23 +8728,32 @@ UINT PsServerCipherGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) return ret; } - ciphers = GetCipherList(); + UniFormat(tmp, sizeof(tmp), L" %S", t.String); + FreeRpcStr(&t); + Zero(&t, sizeof(RPC_STR)); c->Write(c, _UU("CMD_ServerCipherGet_SERVER")); - - UniFormat(tmp, sizeof(tmp), L" %S", t.String); c->Write(c, tmp); - c->Write(c, L""); - c->Write(c, _UU("CMD_ServerCipherGet_CIPHERS")); + ret = ScGetServerCipherList(ps->Rpc, &t); - for (i = 0;i < ciphers->NumTokens;i++) + if (ret == ERR_NO_ERROR) { - UniFormat(tmp, sizeof(tmp), L" %S", ciphers->Token[i]); - c->Write(c, tmp); - } + ciphers = ParseToken(t.String, ";"); - FreeRpcStr(&t); + FreeRpcStr(&t); + + c->Write(c, L""); + c->Write(c, _UU("CMD_ServerCipherGet_CIPHERS")); + + for (i = 0; i < ciphers->NumTokens; i++) + { + UniFormat(tmp, sizeof(tmp), L" %S", ciphers->Token[i]); + c->Write(c, tmp); + } + + FreeToken(ciphers); + } FreeParamValueList(o); @@ -13502,6 +13709,238 @@ UINT PsCascadeCompressDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *pa return 0; } +UINT PsCascadeHttpHeaderAdd(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = ERR_NO_ERROR; + RPC_CREATE_LINK t; + + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_CascadeHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"DATA", CmdPrompt, _UU("CMD_CascadeHttpHeader_Prompt_Data"), NULL, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + ret = ScGetLink(ps->Rpc, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + HTTP_HEADER *header = NULL; + char *name = GetParamStr(o, "NAME"); + + Trim(name); + + header = NewHttpHeader("", "", ""); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + for (i = 0; i < tokens->NumTokens; i++) + { + AddHttpValueStr(header, tokens->Token[i]); + } + FreeToken(tokens); + + if (GetHttpValue(header, name) == NULL) + { + char s[HTTP_CUSTOM_HEADER_MAX_SIZE]; + Format(s, sizeof(s), "%s: %s\r\n", name, GetParamStr(o, "DATA")); + EnSafeHttpHeaderValueStr(s, ' '); + + if ((StrLen(s) + StrLen(t.ClientOption->CustomHttpHeader)) < sizeof(t.ClientOption->CustomHttpHeader)) { + StrCat(t.ClientOption->CustomHttpHeader, sizeof(s), s); + ret = ScSetLink(ps->Rpc, &t); + } + else + { + // Error has occurred + ret = ERR_TOO_MANT_ITEMS; + } + } + else + { + // Error has occurred + ret = ERR_OBJECT_EXISTS; + } + + FreeHttpHeader(header); + } + + if (ret != ERR_NO_ERROR) + { + // Error has occurred + CmdPrintError(c, ret); + } + + FreeRpcCreateLink(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PsCascadeHttpHeaderDelete(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = ERR_NO_ERROR; + RPC_CREATE_LINK t; + + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_CascadeHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + ret = ScGetLink(ps->Rpc, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + char *value = GetParamStr(o, "NAME"); + + Zero(t.ClientOption->CustomHttpHeader, sizeof(t.ClientOption->CustomHttpHeader)); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + if (StartWith(tokens->Token[i], value) == false) + { + StrCat(t.ClientOption->CustomHttpHeader, sizeof(t.ClientOption->CustomHttpHeader), tokens->Token[i]); + StrCat(t.ClientOption->CustomHttpHeader, 1, "\r\n"); + } + } + + ret = ScSetLink(ps->Rpc, &t); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + FreeRpcCreateLink(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PsCascadeHttpHeaderGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = ERR_NO_ERROR; + RPC_CREATE_LINK t; + + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + ret = ScGetLink(ps->Rpc, &t); + + // Release of the parameter list + FreeParamValueList(o); + + if (ret == ERR_NO_ERROR) + { + wchar_t unistr[HTTP_CUSTOM_HEADER_MAX_SIZE]; + TOKEN_LIST *tokens = NULL; + UINT i = 0; + CT *ct = CtNew(); + CtInsertColumn(ct, _UU("CMD_CT_STD_COLUMN_1"), false); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + StrToUni(unistr, sizeof(unistr), tokens->Token[i]); + CtInsert(ct, unistr); + } + + CtFreeEx(ct, c, false); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + FreeRpcCreateLink(&t); + + return ret; +} + // Set the cascade connection method to the TCP/IP direct connection mode UINT PsCascadeProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -13515,7 +13954,7 @@ UINT PsCascadeProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) // "name", prompt_proc, prompt_param, eval_proc, eval_param {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, }; - + // If virtual HUB is not selected, it's an error if (ps->HubName == NULL) { @@ -13644,7 +14083,7 @@ UINT PsCascadeProxyHttp(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) return 0; } -// Set the cascade connection method as the mode via SOCKS proxy server +// Set the cascade connection method as the mode via SOCKS4 proxy server UINT PsCascadeProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { LIST *o; @@ -13695,7 +14134,7 @@ UINT PsCascadeProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) UINT port; // Data change - if (ParseHostPort(GetParamStr(o, "SERVER"), &host, &port, 8080)) + if (ParseHostPort(GetParamStr(o, "SERVER"), &host, &port, 1080)) { t.ClientOption->ProxyType = PROXY_SOCKS; StrCpy(t.ClientOption->ProxyName, sizeof(t.ClientOption->ProxyName), host); @@ -13722,6 +14161,84 @@ UINT PsCascadeProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) return 0; } +// Set the cascade connection method as the mode via SOCKS5 proxy server +UINT PsCascadeProxySocks5(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = 0; + RPC_CREATE_LINK t; + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"SERVER", CmdPrompt, _UU("CMD_CascadeProxyHttp_Prompt_Server"), CmdEvalHostAndPort, NULL}, + {"USERNAME", NULL, NULL, NULL, NULL}, + {"PASSWORD", NULL, NULL, NULL, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + + // RPC call + ret = ScGetLink(ps->Rpc, &t); + + if (ret != ERR_NO_ERROR) + { + // An error has occured + CmdPrintError(c, ret); + FreeParamValueList(o); + return ret; + } + else + { + char *host; + UINT port; + + // Data change + if (ParseHostPort(GetParamStr(o, "SERVER"), &host, &port, 1080)) + { + t.ClientOption->ProxyType = PROXY_SOCKS5; + StrCpy(t.ClientOption->ProxyName, sizeof(t.ClientOption->ProxyName), host); + t.ClientOption->ProxyPort = port; + StrCpy(t.ClientOption->ProxyUsername, sizeof(t.ClientOption->ProxyName), GetParamStr(o, "USERNAME")); + StrCpy(t.ClientOption->ProxyPassword, sizeof(t.ClientOption->ProxyName), GetParamStr(o, "PASSWORD")); + Free(host); + } + + ret = ScSetLink(ps->Rpc, &t); + if (ret != ERR_NO_ERROR) + { + // An error has occured + CmdPrintError(c, ret); + FreeParamValueList(o); + return ret; + } + + FreeRpcCreateLink(&t); + } + + FreeParamValueList(o); + + return 0; +} + // Enable the validation options for the server certificate of cascade connection UINT PsCascadeServerCertEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -14560,8 +15077,10 @@ void CmdPrintStatusToListViewEx(CT *ct, RPC_CLIENT_GET_CONNECTION_STATUS *s, boo GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->StartTime), NULL); CtInsert(ct, _UU("CM_ST_START_TIME"), tmp); - GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablishedTime), NULL); - CtInsert(ct, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablishedTime == 0 ? _UU("CM_ST_NONE") : tmp); + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablisiedTime), NULL); + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + CtInsert(ct, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablisiedTime == 0 ? _UU("CM_ST_NONE") : tmp); if (s->Connected) { @@ -21257,6 +21776,103 @@ UINT PsOpenVpnMakeConfig(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) return ret; } +// Enable / disable the OpenVPN compatible server function's obfuscation mode +UINT PsOpenVpnObfuscationEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = 0; + OPENVPN_SSTP_CONFIG t; + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[yes|no]", CmdPrompt, _UU("CMD_OpenVpnObfuscationEnable_Prompt_[yes|no]"), CmdEvalNotEmpty, NULL}, + {"MASK", CmdPrompt, _UU("CMD_OpenVpnObfuscationEnable_Prompt_MASK"), NULL, NULL}, + }; + + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + Zero(&t, sizeof(t)); + + // RPC call + ret = ScGetOpenVpnSstpConfig(ps->Rpc, &t); + + if (ret != ERR_NO_ERROR) + { + // An error has occured + CmdPrintError(c, ret); + FreeParamValueList(o); + return ret; + } + + t.OpenVPNObfuscation = GetParamYes(o, "[yes|no]"); + StrCpy(t.OpenVPNObfuscationMask, sizeof(t.OpenVPNObfuscationMask), GetParamStr(o, "MASK")); + + // RPC call + ret = ScSetOpenVpnSstpConfig(ps->Rpc, &t); + + if (ret != ERR_NO_ERROR) + { + // An error has occured + CmdPrintError(c, ret); + FreeParamValueList(o); + return ret; + } + + FreeParamValueList(o); + + return 0; +} + +// Get the current settings for the OpenVPN compatible server function's obfuscation mode +UINT PsOpenVpnObfuscationGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = 0; + OPENVPN_SSTP_CONFIG t; + + o = ParseCommandList(c, cmd_name, str, NULL, 0); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + Zero(&t, sizeof(t)); + + // RPC call + ret = ScGetOpenVpnSstpConfig(ps->Rpc, &t); + + if (ret != ERR_NO_ERROR) + { + // An error has occured + CmdPrintError(c, ret); + FreeParamValueList(o); + return ret; + } + else + { + wchar_t tmp[MAX_PATH]; + CT *ct = CtNewStandard(); + + CtInsert(ct, _UU("CMD_OpenVpnObfuscationGet_PRINT_Enabled"), _UU(t.OpenVPNObfuscation ? "SEC_YES" : "SEC_NO")); + + StrToUni(tmp, sizeof(tmp), t.OpenVPNObfuscationMask); + CtInsert(ct, _UU("CMD_OpenVpnObfuscationGet_PRINT_Mask"), tmp); + + CtFree(ct, c); + } + + FreeParamValueList(o); + + return 0; +} + // Enable / disable the Microsoft SSTP VPN compatible server function UINT PsSstpEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -22509,7 +23125,6 @@ void CtEscapeCsv(wchar_t *dst, UINT size, wchar_t *src){ } // If there is no character that need to be escaped in the input characters, copy it to the output - len = UniStrLen(src); for (i=0; iCedar->Server; - - // get a socket + // Get a socket s = c->FirstSock; AddRef(s->ref); @@ -3051,37 +2926,18 @@ void ConnectionAccept(CONNECTION *c) initial_timeout += GetMachineRand() % (CONNECTING_TIMEOUT / 2); SetTimeout(s, initial_timeout); - - // Peek whether OpenSSL packet - if (s->IsReverseAcceptedSocket == false) + // Handle third-party protocols + if (s->IsReverseAcceptedSocket == false && s->Type == SOCK_TCP) { - if (s->Type == SOCK_TCP && (c->Cedar != NULL && c->Cedar->Server != NULL && c->Cedar->Server->DisableOpenVPNServer == false)) + if (c->Cedar != NULL && c->Cedar->Server != NULL) { - if (Peek(s, openssl_check_buf, sizeof(openssl_check_buf)) == sizeof(openssl_check_buf)) + c->Type = CONNECTION_TYPE_OTHER; + + if (ProtoHandleConnection(c->Cedar, s) == true) { - if (OvsCheckTcpRecvBufIfOpenVPNProtocol(openssl_check_buf, sizeof(openssl_check_buf))) - { - // Detect OpenSSL packet - Debug("Detect OpenSSL on TCP!\n"); - - no_native = true; - - if (OvsGetNoOpenVpnTcp() == false) - { - // Do OpenSSL processing - c->Type = CONNECTION_TYPE_OPENVPN; - if (OvsPerformTcpServer(c->Cedar, s) == false) - { - error_details = "OpenVPN_TCP_Aborted"; - } - } - - goto ERROR; - } + goto FINAL; } } - - } // Specify the encryption algorithm @@ -3098,22 +2954,18 @@ void ConnectionAccept(CONNECTION *c) Unlock(c->Cedar->lock); // Start the SSL communication - Debug("StartSSL()\n"); Copy(&s->SslAcceptSettings, &c->Cedar->SslAcceptSettings, sizeof(SSL_ACCEPT_SETTINGS)); if (StartSSL(s, x, k) == false) { // Failed AddNoSsl(c->Cedar, &s->RemoteIP); - Debug("Failed to StartSSL.\n"); + Debug("ConnectionAccept(): StartSSL() failed\n"); FreeX(x); FreeK(k); - error_details = "StartSSL"; - - goto ERROR; + goto FINAL; } - FreeX(x); FreeK(k); @@ -3125,29 +2977,18 @@ void ConnectionAccept(CONNECTION *c) if (ServerAccept(c) == false) { // Failed - Debug("ServerAccept Failed. Err = %u\n", c->Err); - goto ERROR; + Debug("ConnectionAccept(): ServerAccept() failed with error %u\n", c->Err); } +FINAL: if (c->flag1 == false) { Debug("%s %u c->flag1 == false\n", __FILE__, __LINE__); Disconnect(s); } + DelConnection(c->Cedar, c); ReleaseSock(s); - - Free(peek_buf); - return; - -ERROR: - Debug("ConnectionAccept() Error.\n"); - - - Disconnect(s); - DelConnection(c->Cedar, c); - ReleaseSock(s); - Free(peek_buf); } // Stop the threads putting additional connection of all that are currently running diff --git a/src/Cedar/Connection.h b/src/Cedar/Connection.h index 2b2c570c..de6a50fd 100644 --- a/src/Cedar/Connection.h +++ b/src/Cedar/Connection.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Connection.h @@ -163,34 +57,35 @@ struct RC4_KEY_PAIR // Client Options struct CLIENT_OPTION { - wchar_t AccountName[MAX_ACCOUNT_NAME_LEN + 1]; // Connection setting name - char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name - UINT Port; // Port number - UINT PortUDP; // UDP port number (0: Use only TCP) - UINT ProxyType; // Type of proxy - char ProxyName[MAX_HOST_NAME_LEN + 1]; // Proxy server name - UINT ProxyPort; // Port number of the proxy server - char ProxyUsername[MAX_PROXY_USERNAME_LEN + 1]; // Maximum user name length - char ProxyPassword[MAX_PROXY_PASSWORD_LEN + 1]; // Maximum password length - UINT NumRetry; // Automatic retries - UINT RetryInterval; // Retry interval - char HubName[MAX_HUBNAME_LEN + 1]; // HUB name - UINT MaxConnection; // Maximum number of concurrent TCP connections - bool UseEncrypt; // Use encrypted communication - bool UseCompress; // Use data compression - bool HalfConnection; // Use half connection in TCP - bool NoRoutingTracking; // Disable the routing tracking - char DeviceName[MAX_DEVICE_NAME_LEN + 1]; // VLAN device name - UINT AdditionalConnectionInterval; // Connection attempt interval when additional connection establish - UINT ConnectionDisconnectSpan; // Disconnection interval - bool HideStatusWindow; // Hide the status window - bool HideNicInfoWindow; // Hide the NIC status window - bool RequireMonitorMode; // Monitor port mode - bool RequireBridgeRoutingMode; // Bridge or routing mode - bool DisableQoS; // Disable the VoIP / QoS function - bool FromAdminPack; // For Administration Pack - bool NoUdpAcceleration; // Do not use UDP acceleration mode - UCHAR HostUniqueKey[SHA1_SIZE]; // Host unique key + wchar_t AccountName[MAX_ACCOUNT_NAME_LEN + 1]; // Connection setting name + char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name + UINT Port; // Port number + UINT PortUDP; // UDP port number (0: Use only TCP) + UINT ProxyType; // Type of proxy + char ProxyName[MAX_HOST_NAME_LEN + 1]; // Proxy server name + UINT ProxyPort; // Port number of the proxy server + char ProxyUsername[MAX_PROXY_USERNAME_LEN + 1]; // Maximum user name length + char ProxyPassword[MAX_PROXY_PASSWORD_LEN + 1]; // Maximum password length + char CustomHttpHeader[HTTP_CUSTOM_HEADER_MAX_SIZE + 1]; // Custom HTTP proxy header + UINT NumRetry; // Automatic retries + UINT RetryInterval; // Retry interval + char HubName[MAX_HUBNAME_LEN + 1]; // HUB name + UINT MaxConnection; // Maximum number of concurrent TCP connections + bool UseEncrypt; // Use encrypted communication + bool UseCompress; // Use data compression + bool HalfConnection; // Use half connection in TCP + bool NoRoutingTracking; // Disable the routing tracking + char DeviceName[MAX_DEVICE_NAME_LEN + 1]; // VLAN device name + UINT AdditionalConnectionInterval; // Connection attempt interval when additional connection establish + UINT ConnectionDisconnectSpan; // Disconnection interval + bool HideStatusWindow; // Hide the status window + bool HideNicInfoWindow; // Hide the NIC status window + bool RequireMonitorMode; // Monitor port mode + bool RequireBridgeRoutingMode; // Bridge or routing mode + bool DisableQoS; // Disable the VoIP / QoS function + bool FromAdminPack; // For Administration Pack + bool NoUdpAcceleration; // Do not use UDP acceleration mode + UCHAR HostUniqueKey[SHA1_SIZE]; // Host unique key }; // Client authentication data @@ -312,6 +207,7 @@ struct CONNECTION void *hWndForUI; // Parent window bool IsInProc; // In-process char InProcPrefix[64]; // Prefix + UINT InProcLayer; // InProc layer UINT AdditionalConnectionFailedCounter; // Additional connection failure counter UINT64 LastCounterResetTick; // Time the counter was reset finally bool WasSstp; // Processed the SSTP @@ -321,6 +217,9 @@ struct CONNECTION UINT LastPacketQueueSize; // The last queue size of packets UINT LastRecvFifoTotalSize; // The last RecvFifo total size UINT LastRecvBlocksNum; // The last ReceivedBlocks num + bool IsJsonRpc; // Is JSON-RPC + bool JsonRpcAuthed; // JSON-RPC Authed + LISTENER *Listener; // Listener ref }; diff --git a/src/Cedar/Console.c b/src/Cedar/Console.c index 2c384fac..28d4bc57 100644 --- a/src/Cedar/Console.c +++ b/src/Cedar/Console.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Console.c diff --git a/src/Cedar/Console.h b/src/Cedar/Console.h index a5001968..0e9c2b35 100644 --- a/src/Cedar/Console.h +++ b/src/Cedar/Console.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Console.h diff --git a/src/Cedar/DDNS.c b/src/Cedar/DDNS.c index a4436daf..5a2fec7b 100644 --- a/src/Cedar/DDNS.c +++ b/src/Cedar/DDNS.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // DDNS.c @@ -143,6 +37,9 @@ void DCGetStatus(DDNS_CLIENT *c, DDNS_CLIENT_STATUS *st) Copy(&st->InternetSetting, &c->InternetSetting, sizeof(INTERNET_SETTING)); } Unlock(c->Lock); + + UniStrCpy(st->ErrStr_IPv4, sizeof(st->ErrStr_IPv4), _E(st->Err_IPv4)); + UniStrCpy(st->ErrStr_IPv6, sizeof(st->ErrStr_IPv6), _E(st->Err_IPv6)); } // Set the Internet settings @@ -493,20 +390,6 @@ void DCThread(THREAD *thread, void *param) FreeInterruptManager(interrupt); } -// Command to update immediately -void DCUpdateNow(DDNS_CLIENT *c) -{ - // Validate arguments - if (c == NULL) - { - return; - } - - c->NextRegisterTick_IPv4 = c->NextRegisterTick_IPv6 = 0; - - Set(c->Event); -} - // Execution of registration UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace_v6) { @@ -526,9 +409,6 @@ UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace char current_azure_ip[MAX_SIZE]; INTERNET_SETTING t; UINT build = 0; - bool use_https = false; - bool use_vgs = false; - bool no_cert_verify = false; char add_header_name[64]; char add_header_value[64]; // Validate arguments @@ -652,33 +532,20 @@ UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace Format(url2, sizeof(url2), "%s?v=%I64u", url, Rand64()); Format(url3, sizeof(url3), url2, key_hash_str[2], key_hash_str[3]); - if (use_https == false) - { - ReplaceStr(url3, sizeof(url3), url3, "https://", "http://"); - } + ReplaceStr(url3, sizeof(url3), url3, "https://", "http://"); ReplaceStr(url3, sizeof(url3), url3, ".servers", ".open.servers"); + cert_hash = StrToBin(DDNS_CERT_HASH); - if (no_cert_verify == false) - { - cert_hash = StrToBin(DDNS_CERT_HASH); - } - - ret = NULL; - - - if (ret == NULL) - { - Debug("WpcCall: %s\n", url3); - ret = WpcCallEx2(url3, &t, DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, "register", req, - NULL, NULL, ((cert_hash != NULL && ((cert_hash->Size % SHA1_SIZE) == 0)) ? cert_hash->Buf : NULL), - (cert_hash != NULL ? cert_hash->Size / SHA1_SIZE : 0), - NULL, DDNS_RPC_MAX_RECV_SIZE, - add_header_name, add_header_value, - DDNS_SNI_VER_STRING); - Debug("WpcCall Ret: %u\n", ret); - } + Debug("WpcCall: %s\n", url3); + ret = WpcCallEx2(url3, &t, DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, "register", req, + NULL, NULL, ((cert_hash != NULL && ((cert_hash->Size % SHA1_SIZE) == 0)) ? cert_hash->Buf : NULL), + (cert_hash != NULL ? cert_hash->Size / SHA1_SIZE : 0), + NULL, DDNS_RPC_MAX_RECV_SIZE, + add_header_name, add_header_value, + DDNS_SNI_VER_STRING); + Debug("WpcCall Ret: %u\n", ret); FreeBuf(cert_hash); @@ -828,7 +695,6 @@ UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use URL_DATA data; BUF *recv; BUF *cert_hash = NULL; - bool no_cert_verify = false; // Validate arguments if (dst == NULL || c == NULL) { @@ -872,11 +738,7 @@ UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use return ERR_INTERNAL_ERROR; } - if (no_cert_verify == false) - { - cert_hash = StrToBin(DDNS_CERT_HASH); - } - + cert_hash = StrToBin(DDNS_CERT_HASH); StrCpy(data.SniString, sizeof(data.SniString), DDNS_SNI_VER_STRING); diff --git a/src/Cedar/DDNS.h b/src/Cedar/DDNS.h index f7138fca..bd6a6fc1 100644 --- a/src/Cedar/DDNS.h +++ b/src/Cedar/DDNS.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // DDNS.h @@ -217,6 +111,8 @@ struct DDNS_REGISTER_PARAM struct DDNS_CLIENT_STATUS { UINT Err_IPv4, Err_IPv6; // Last error + wchar_t ErrStr_IPv4[MAX_SIZE]; + wchar_t ErrStr_IPv6[MAX_SIZE]; char CurrentHostName[DDNS_MAX_HOSTNAME + 1]; // Current host name char CurrentFqdn[MAX_SIZE]; // Current FQDN char DnsSuffix[MAX_SIZE]; // DNS suffix @@ -237,7 +133,6 @@ void DCThread(THREAD *thread, void *param); UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace_v6); UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use_ssl, char *replace_v6); UINT DCGetMyIp(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, char *replace_v6); -void DCUpdateNow(DDNS_CLIENT *c); void DCGetStatus(DDNS_CLIENT *c, DDNS_CLIENT_STATUS *st); UINT DCChangeHostName(DDNS_CLIENT *c, char *hostname); void DCSetInternetSetting(DDNS_CLIENT *c, INTERNET_SETTING *t); diff --git a/src/Cedar/Database.c b/src/Cedar/Database.c index 7cd721f4..321d64b0 100644 --- a/src/Cedar/Database.c +++ b/src/Cedar/Database.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Database.c diff --git a/src/Cedar/Database.h b/src/Cedar/Database.h index 651ba0e2..a413a5d5 100644 --- a/src/Cedar/Database.h +++ b/src/Cedar/Database.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Database.h diff --git a/src/Cedar/EM.c b/src/Cedar/EM.c index ea9e885f..ee529211 100644 --- a/src/Cedar/EM.c +++ b/src/Cedar/EM.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // EM.c diff --git a/src/Cedar/EM.h b/src/Cedar/EM.h index 812e3d4a..447438b7 100644 --- a/src/Cedar/EM.h +++ b/src/Cedar/EM.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // EM.h diff --git a/src/Cedar/EMInner.h b/src/Cedar/EMInner.h index eb174d5d..c4327aee 100644 --- a/src/Cedar/EMInner.h +++ b/src/Cedar/EMInner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // EMInner.h diff --git a/src/Cedar/EtherLog.c b/src/Cedar/EtherLog.c index 26a38023..dc057a97 100644 --- a/src/Cedar/EtherLog.c +++ b/src/Cedar/EtherLog.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // EtherLog.c @@ -664,6 +558,7 @@ void OutRpcEnumDevice(PACK *p, RPC_ENUM_DEVICE *t) PackAddInt(p, "NumItem", t->NumItem); + PackSetCurrentJsonGroupName(p, "DeviceList"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_DEVICE_ITEM *d = &t->Items[i]; @@ -671,6 +566,7 @@ void OutRpcEnumDevice(PACK *p, RPC_ENUM_DEVICE *t) PackAddStrEx(p, "DeviceName", d->DeviceName, i, t->NumItem); PackAddBoolEx(p, "Active", d->Active, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); PackAddBool(p, "IsLicenseSupported", t->IsLicenseSupported); } @@ -711,7 +607,7 @@ void OutRpcElLicenseStatus(PACK *p, RPC_EL_LICENSE_STATUS *t) PackAddBool(p, "Valid", t->Valid); PackAddInt64(p, "SystemId", t->SystemId); - PackAddInt64(p, "SystemExpires", t->SystemExpires); + PackAddTime64(p, "SystemExpires", t->SystemExpires); } // Listener thread diff --git a/src/Cedar/EtherLog.h b/src/Cedar/EtherLog.h index ba7e63ca..15800b41 100644 --- a/src/Cedar/EtherLog.h +++ b/src/Cedar/EtherLog.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // EtherLog.h diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c index b109cfa6..02f2de14 100644 --- a/src/Cedar/Hub.c +++ b/src/Cedar/Hub.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Hub.c @@ -168,7 +62,7 @@ UINT num_admin_options = sizeof(admin_options) / sizeof(ADMIN_OPTION); // Create an EAP client for the specified Virtual Hub -EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, char *username) +EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, char *username, char *vpn_protocol_state_str) { HUB *hub = NULL; EAP_CLIENT *ret = NULL; @@ -218,6 +112,11 @@ EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, ch if (eap != NULL) { + if (IsEmptyStr(vpn_protocol_state_str) == false) + { + StrCpy(eap->In_VpnProtocolState, sizeof(eap->In_VpnProtocolState), vpn_protocol_state_str); + } + if (use_peap == false) { // EAP @@ -787,6 +686,8 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name) { ADMIN_OPTION *a = LIST_DATA(aol, i); + UniStrCpy(a->Descrption, sizeof(a->Descrption), GetHubAdminOptionHelpString(a->Name)); + Copy(&ao->Items[i], a, sizeof(ADMIN_OPTION)); Free(a); @@ -3717,9 +3618,12 @@ bool HubPaPutPacket(SESSION *s, void *data, UINT size) CancelList(s->CancelList); // Yield - if (hub->Option != NULL && hub->Option->YieldAfterStorePacket) + if (hub != NULL) { - YieldCpu(); + if (hub->Option != NULL && hub->Option->YieldAfterStorePacket) + { + YieldCpu(); + } } return true; diff --git a/src/Cedar/Hub.h b/src/Cedar/Hub.h index f6ddedce..2c2dc66a 100644 --- a/src/Cedar/Hub.h +++ b/src/Cedar/Hub.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Hub.h @@ -393,6 +287,7 @@ struct ADMIN_OPTION { char Name[MAX_ADMIN_OPTION_NAME_LEN + 1]; // Name UINT Value; // Data + wchar_t Descrption[MAX_SIZE]; // Descrption }; // Certificate Revocation List entry @@ -637,7 +532,7 @@ bool IsUserMatchInUserList(LIST *o, char *filename, UINT64 user_hash); bool IsUserMatchInUserListWithCacheExpires(LIST *o, char *filename, UINT64 user_hash, UINT64 lifetime); bool IsUserMatchInUserListWithCacheExpiresAcl(LIST *o, char *name_in_acl, UINT64 user_hash, UINT64 lifetime); bool CheckMaxLoggedPacketsPerMinute(SESSION *s, UINT max_packets, UINT64 now); -EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, char *username); +EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, char *username, char *vpn_protocol_state_str); #endif // HUB_H diff --git a/src/Cedar/IPC.c b/src/Cedar/IPC.c index 3965226d..9263e903 100644 --- a/src/Cedar/IPC.c +++ b/src/Cedar/IPC.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // IPC.c @@ -323,7 +217,7 @@ IPC *NewIPCByParam(CEDAR *cedar, IPC_PARAM *param, UINT *error_code) param->UserName, param->Password, error_code, ¶m->ClientIp, param->ClientPort, ¶m->ServerIp, param->ServerPort, param->ClientHostname, param->CryptName, - param->BridgeMode, param->Mss, NULL, param->ClientCertificate); + param->BridgeMode, param->Mss, NULL, param->ClientCertificate, param->Layer); return ipc; } @@ -332,7 +226,8 @@ IPC *NewIPCByParam(CEDAR *cedar, IPC_PARAM *param, UINT *error_code) IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char *username, char *password, UINT *error_code, IP *client_ip, UINT client_port, IP *server_ip, UINT server_port, char *client_hostname, char *crypt_name, - bool bridge_mode, UINT mss, EAP_CLIENT *eap_client, X *client_certificate) + bool bridge_mode, UINT mss, EAP_CLIENT *eap_client, X *client_certificate, + UINT layer) { IPC *ipc; UINT dummy_int = 0; @@ -380,6 +275,12 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char ipc->Cedar = cedar; AddRef(cedar->ref); + ipc->Layer = layer; + if (ipc->Layer == 0) + { + ipc->Layer = IPC_LAYER_2; + } + ipc->FlushList = NewTubeFlushList(); StrCpy(ipc->ClientHostname, sizeof(ipc->ClientHostname), client_hostname); @@ -433,6 +334,13 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char { p = PackLoginWithPlainPassword(hubname, username, password); } + + if (p == NULL) + { + err = ERR_AUTH_FAILED; + goto LABEL_ERROR; + } + PackAddStr(p, "hello", client_name); PackAddInt(p, "client_ver", cedar->Version); PackAddInt(p, "client_build", cedar->Build); @@ -467,6 +375,7 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char PackAddStr(p, "inproc_postfix", postfix); PackAddStr(p, "inproc_cryptname", crypt_name); + PackAddInt(p, "inproc_layer", ipc->Layer); // Node information Zero(&info, sizeof(info)); diff --git a/src/Cedar/IPC.h b/src/Cedar/IPC.h index 4bbf5f57..60d54400 100644 --- a/src/Cedar/IPC.h +++ b/src/Cedar/IPC.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // IPC.h @@ -127,6 +21,9 @@ #define IPC_PASSWORD_MSCHAPV2_TAG "xH7DiNlurDhcYV4a:" +#define IPC_LAYER_2 2 +#define IPC_LAYER_3 3 + // ARP table entry struct IPC_ARP { @@ -164,6 +61,7 @@ struct IPC_PARAM UINT Mss; bool IsL3Mode; X *ClientCertificate; + UINT Layer; }; // IPC_ASYNC object @@ -208,6 +106,7 @@ struct IPC TUBE_FLUSH_LIST *FlushList; // Tube Flush List UCHAR MsChapV2_ServerResponse[20]; // Server response DHCP_CLASSLESS_ROUTE_TABLE ClasslessRoute; // Classless routing table + UINT Layer; }; // MS-CHAPv2 authentication information @@ -223,7 +122,8 @@ struct IPC_MSCHAP_V2_AUTHINFO IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char *username, char *password, UINT *error_code, IP *client_ip, UINT client_port, IP *server_ip, UINT server_port, char *client_hostname, char *crypt_name, - bool bridge_mode, UINT mss, EAP_CLIENT *eap_client, X *client_certificate); + bool bridge_mode, UINT mss, EAP_CLIENT *eap_client, X *client_certificate, + UINT layer); IPC *NewIPCByParam(CEDAR *cedar, IPC_PARAM *param, UINT *error_code); IPC *NewIPCBySock(CEDAR *cedar, SOCK *s, void *mac_address); void FreeIPC(IPC *ipc); diff --git a/src/Cedar/Layer3.c b/src/Cedar/Layer3.c index 53314575..96c5c216 100644 --- a/src/Cedar/Layer3.c +++ b/src/Cedar/Layer3.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Layer3.c diff --git a/src/Cedar/Layer3.h b/src/Cedar/Layer3.h index d4ca9d04..5e91d3a3 100644 --- a/src/Cedar/Layer3.h +++ b/src/Cedar/Layer3.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Layer3.h diff --git a/src/Cedar/Link.c b/src/Cedar/Link.c index c26307fd..5ddfe6d1 100644 --- a/src/Cedar/Link.c +++ b/src/Cedar/Link.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Link.c diff --git a/src/Cedar/Link.h b/src/Cedar/Link.h index a2b7202a..22b42999 100644 --- a/src/Cedar/Link.h +++ b/src/Cedar/Link.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Link.h diff --git a/src/Cedar/Listener.c b/src/Cedar/Listener.c index cd55b0fe..f365ddc8 100644 --- a/src/Cedar/Listener.c +++ b/src/Cedar/Listener.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Listener.c @@ -256,6 +150,9 @@ void TCPAcceptedThread(THREAD *t, void *param) // Create a connection c = NewServerConnection(r->Cedar, s, t); + AddRef(r->ref); + c->Listener = r; + // Register to Cedar as a transient connection AddConnection(c->Cedar, c); @@ -275,6 +172,8 @@ void TCPAcceptedThread(THREAD *t, void *param) // Release SLog(r->Cedar, "LS_CONNECTION_END_1", c->Name); + ReleaseListener(c->Listener); + c->Listener = NULL; ReleaseConnection(c); // Release @@ -489,12 +388,12 @@ void ListenerTCPMainLoop(LISTENER *r) } else if (r->Protocol == LISTENER_ICMP) { - s = ListenRUDP(VPN_RUDP_SVC_NAME, NULL, ListenerRUDPRpcRecvProc, NULL, MAKE_SPECIAL_PORT(IP_PROTO_ICMPV4), - true, false); + s = ListenRUDPEx(VPN_RUDP_SVC_NAME, NULL, ListenerRUDPRpcRecvProc, NULL, MAKE_SPECIAL_PORT(IP_PROTO_ICMPV4), + true, false, NULL, 0, &r->Cedar->Server->ListenIP); } else if (r->Protocol == LISTENER_DNS) { - s = ListenRUDP(VPN_RUDP_SVC_NAME, NULL, ListenerRUDPRpcRecvProc, NULL, 53, true, true); + s = ListenRUDPEx(VPN_RUDP_SVC_NAME, NULL, ListenerRUDPRpcRecvProc, NULL, 53, true, true, NULL, 0, &r->Cedar->Server->ListenIP); } else if (r->Protocol == LISTENER_REVERSE) { diff --git a/src/Cedar/Listener.h b/src/Cedar/Listener.h index 808c97d1..9ef8a1d8 100644 --- a/src/Cedar/Listener.h +++ b/src/Cedar/Listener.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Listener.h diff --git a/src/Cedar/Logging.c b/src/Cedar/Logging.c index a770f9e6..c172e6bf 100644 --- a/src/Cedar/Logging.c +++ b/src/Cedar/Logging.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Logging.c @@ -120,11 +14,11 @@ static char *delete_targets[] = "backup.vpn_server.config", "backup.vpn_gate_svc.config", "backup.etherlogger.config", - "packet_log", - "etherlogger_log", + HUB_PACKET_LOG_DIR, + EL_PACKET_LOG_DIR, "secure_nat_log", - "security_log", - "server_log", + HUB_SECURITY_LOG_DIR, + SERVER_LOG_DIR, "bridge_log", "packet_log_archive", "azure_log", @@ -2287,7 +2181,7 @@ void MakeLogFileNameStringFromTick(LOG *g, char *str, UINT size, UINT64 tick, UI break; default: // Without switching - snprintf(str, size, ""); + snprintf(str, size, "%s"); break; } diff --git a/src/Cedar/Logging.h b/src/Cedar/Logging.h index 81220af1..b59be053 100644 --- a/src/Cedar/Logging.h +++ b/src/Cedar/Logging.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Logging.h diff --git a/src/Cedar/NM.c b/src/Cedar/NM.c index fca3c162..61c98f0e 100644 --- a/src/Cedar/NM.c +++ b/src/Cedar/NM.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NM.c diff --git a/src/Cedar/NM.h b/src/Cedar/NM.h index 39be93bb..375594a2 100644 --- a/src/Cedar/NM.h +++ b/src/Cedar/NM.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NM.h diff --git a/src/Cedar/NMInner.h b/src/Cedar/NMInner.h index d762ca64..ab9b6a22 100644 --- a/src/Cedar/NMInner.h +++ b/src/Cedar/NMInner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NMInner.h diff --git a/src/Cedar/Nat.c b/src/Cedar/Nat.c index eb8893e1..63852fb5 100644 --- a/src/Cedar/Nat.c +++ b/src/Cedar/Nat.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Nat.c @@ -903,18 +797,20 @@ void OutRpcEnumDhcp(PACK *p, RPC_ENUM_DHCP *t) PackAddInt(p, "NumItem", t->NumItem); PackAddStr(p, "HubName", t->HubName); + PackSetCurrentJsonGroupName(p, "DhcpTable"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_DHCP_ITEM *e = &t->Items[i]; PackAddIntEx(p, "Id", e->Id, i, t->NumItem); - PackAddInt64Ex(p, "LeasedTime", e->LeasedTime, i, t->NumItem); - PackAddInt64Ex(p, "ExpireTime", e->ExpireTime, i, t->NumItem); + PackAddTime64Ex(p, "LeasedTime", e->LeasedTime, i, t->NumItem); + PackAddTime64Ex(p, "ExpireTime", e->ExpireTime, i, t->NumItem); PackAddDataEx(p, "MacAddress", e->MacAddress, 6, i, t->NumItem); PackAddIp32Ex(p, "IpAddress", e->IpAddress, i, t->NumItem); PackAddIntEx(p, "Mask", e->Mask, i, t->NumItem); PackAddStrEx(p, "Hostname", e->Hostname, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumDhcp(RPC_ENUM_DHCP *t) { @@ -971,6 +867,8 @@ void OutRpcEnumNat(PACK *p, RPC_ENUM_NAT *t) PackAddInt(p, "NumItem", t->NumItem); PackAddStr(p, "HubName", t->HubName); + + PackSetCurrentJsonGroupName(p, "NatTable"); for (i = 0;i < t->NumItem;i++) { RPC_ENUM_NAT_ITEM *e = &t->Items[i]; @@ -983,12 +881,13 @@ void OutRpcEnumNat(PACK *p, RPC_ENUM_NAT *t) PackAddIp32Ex(p, "DestIp", e->DestIp, i, t->NumItem); PackAddStrEx(p, "DestHost", e->DestHost, i, t->NumItem); PackAddIntEx(p, "DestPort", e->DestPort, i, t->NumItem); - PackAddInt64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumItem); - PackAddInt64Ex(p, "LastCommTime", e->LastCommTime, i, t->NumItem); + PackAddTime64Ex(p, "CreatedTime", e->CreatedTime, i, t->NumItem); + PackAddTime64Ex(p, "LastCommTime", e->LastCommTime, i, t->NumItem); PackAddInt64Ex(p, "SendSize", e->SendSize, i, t->NumItem); PackAddInt64Ex(p, "RecvSize", e->RecvSize, i, t->NumItem); PackAddIntEx(p, "TcpStatus", e->TcpStatus, i, t->NumItem); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcEnumNat(RPC_ENUM_NAT *t) { diff --git a/src/Cedar/Nat.h b/src/Cedar/Nat.h index e0e39913..2cb23090 100644 --- a/src/Cedar/Nat.h +++ b/src/Cedar/Nat.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Nat.h diff --git a/src/Cedar/NativeStack.c b/src/Cedar/NativeStack.c index 6493e546..afd01afe 100644 --- a/src/Cedar/NativeStack.c +++ b/src/Cedar/NativeStack.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NativeStack.c diff --git a/src/Cedar/NativeStack.h b/src/Cedar/NativeStack.h index 7e84175c..23142d8a 100644 --- a/src/Cedar/NativeStack.h +++ b/src/Cedar/NativeStack.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NativeStack.h diff --git a/src/Cedar/NullLan.c b/src/Cedar/NullLan.c index 6b9849ec..1e2606a0 100644 --- a/src/Cedar/NullLan.c +++ b/src/Cedar/NullLan.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NullLan.c diff --git a/src/Cedar/NullLan.h b/src/Cedar/NullLan.h index 63b3b886..16267f55 100644 --- a/src/Cedar/NullLan.h +++ b/src/Cedar/NullLan.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NullLan.h diff --git a/src/Cedar/Proto.c b/src/Cedar/Proto.c new file mode 100644 index 00000000..084632b6 --- /dev/null +++ b/src/Cedar/Proto.c @@ -0,0 +1,271 @@ +#include "CedarPch.h" + +#include "Proto_OpenVPN.h" + +static LIST *protocols = NULL; + +int ProtoCompare(void *p1, void *p2) +{ + PROTO *proto_1, *proto_2; + + if (p1 == NULL || p2 == NULL) + { + return 0; + } + + proto_1 = (PROTO *)p1; + proto_2 = (PROTO *)p2; + + if (StrCmp(proto_1->impl->Name(), proto_2->impl->Name()) == 0) + { + return true; + } + + return false; +} + +void ProtoInit() +{ + if (protocols != NULL) + { + ProtoFree(); + } + + protocols = NewList(ProtoCompare); + + // OpenVPN + ProtoAdd(OvsGetProtoImpl()); +} + +void ProtoFree() +{ + UINT i; + PROTO_IMPL *impl; + + for (i = 0; i < ProtoNum(); ++i) + { + PROTO *proto = ProtoGet(i); + impl = proto->impl; + Free(proto); + } + + ReleaseList(protocols); + protocols = NULL; +} + +bool ProtoAdd(PROTO_IMPL *impl) +{ + PROTO *proto; + + if (protocols == NULL || impl == NULL) + { + return false; + } + + proto = Malloc(sizeof(PROTO)); + proto->impl = impl; + + Add(protocols, proto); + + Debug("ProtoAdd(): added %s\n", proto->impl->Name()); + + return true; +} + +UINT ProtoNum() +{ + return LIST_NUM(protocols); +} + +PROTO *ProtoGet(const UINT index) +{ + return LIST_DATA(protocols, index); +} + +PROTO *ProtoDetect(SOCK *sock) +{ + UCHAR buf[PROTO_CHECK_BUFFER_SIZE]; + UINT i; + + if (sock == NULL) + { + return NULL; + } + + if (Peek(sock, buf, sizeof(buf)) == 0) + { + return false; + } + + for (i = 0; i < ProtoNum(); ++i) + { + PROTO *p = ProtoGet(i); + if (p->impl->IsPacketForMe(buf, sizeof(buf))) + { + Debug("ProtoDetect(): %s detected\n", p->impl->Name()); + return p; + } + } + + return NULL; +} + +bool ProtoHandleConnection(CEDAR *cedar, SOCK *sock) +{ + void *impl_data; + const PROTO_IMPL *impl; + const PROTO *proto; + + UCHAR *buf; + TCP_RAW_DATA *recv_raw_data; + FIFO *send_fifo; + INTERRUPT_MANAGER *im; + SOCK_EVENT *se; + + const UINT64 giveup = Tick64() + (UINT64)OPENVPN_NEW_SESSION_DEADLINE_TIMEOUT; + + if (cedar == NULL || sock == NULL) + { + return false; + } + + proto = ProtoDetect(sock); + + if (proto == NULL) + { + Debug("ProtoHandleConnection(): unrecognized protocol\n"); + return false; + } + + impl = proto->impl; + + if (StrCmp(impl->Name(), "OpenVPN") == 0 && cedar->Server->DisableOpenVPNServer == true) + { + Debug("ProtoHandleConnection(): OpenVPN detected, but it's disabled\n"); + return false; + } + + if ((impl->SupportedModes() & PROTO_MODE_TCP) == false) + { + return false; + } + + im = NewInterruptManager(); + se = NewSockEvent(); + + if (impl->Init != NULL && impl->Init(&impl_data, cedar, im, se) == false) + { + Debug("ProtoHandleConnection(): failed to initialize %s\n", impl->Name()); + FreeInterruptManager(im); + ReleaseSockEvent(se); + return false; + } + + SetTimeout(sock, TIMEOUT_INFINITE); + JoinSockToSockEvent(sock, se); + + recv_raw_data = NewTcpRawData(&sock->RemoteIP, sock->RemotePort, &sock->LocalIP, sock->LocalPort); + send_fifo = NewFifoFast(); + + buf = Malloc(PROTO_TCP_BUFFER_SIZE); + + Debug("ProtoHandleConnection(): entering main loop\n"); + + // Receive data from the TCP socket + while (true) + { + UINT next_interval; + bool stop = false; + + while (true) + { + const UINT ret = Recv(sock, buf, PROTO_TCP_BUFFER_SIZE, false); + + if (ret == SOCK_LATER) + { + // No more data to read + break; + } + else if (ret == 0) + { + // Disconnected + stop = true; + break; + } + else + { + // Write the received data into the FIFO + WriteFifo(recv_raw_data->Data, buf, ret); + } + } + + if (impl->ProcessData(impl_data, recv_raw_data, send_fifo) == false) + { + stop = true; + } + + // Send data to the TCP socket + while (FifoSize(send_fifo) >= 1) + { + const UINT ret = Send(sock, FifoPtr(send_fifo), FifoSize(send_fifo), false); + + if (ret == SOCK_LATER) + { + // Can not write anymore + break; + } + else if (ret == 0) + { + // Disconnected + stop = true; + break; + } + else + { + // Remove data that has been sent from the FIFO + ReadFifo(send_fifo, NULL, ret); + } + } + + impl->BufferLimit(impl_data, FifoSize(send_fifo) > MAX_BUFFERING_PACKET_SIZE); + + if (impl->IsOk(impl_data) == false) + { + if (impl->EstablishedSessions(impl_data) == 0) + { + if (Tick64() >= giveup) + { + Debug("ProtoHandleConnection(): I waited too much for the session to start, I give up!\n"); + stop = true; + } + } + else + { + Debug("ProtoHandleConnection(): implementation not OK, stopping the server\n"); + stop = true; + } + } + + if (stop) + { + // Error or disconnection occurs + Debug("ProtoHandleConnection(): breaking main loop\n"); + break; + } + + // Wait until the next event occurs + next_interval = GetNextIntervalForInterrupt(im); + next_interval = MIN(next_interval, UDPLISTENER_WAIT_INTERVAL); + WaitSockEvent(se, next_interval); + } + + impl->Free(impl_data); + + FreeInterruptManager(im); + ReleaseSockEvent(se); + FreeTcpRawData(recv_raw_data); + ReleaseFifo(send_fifo); + Free(buf); + + return true; +} diff --git a/src/Cedar/Proto.h b/src/Cedar/Proto.h new file mode 100644 index 00000000..e2a89a25 --- /dev/null +++ b/src/Cedar/Proto.h @@ -0,0 +1,44 @@ +#ifndef PROTO_H +#define PROTO_H + +// OpenVPN sends 2 bytes, thus this is the buffer size. +// If another protocol requires more bytes to be detected, the buffer size must be increased. +#define PROTO_CHECK_BUFFER_SIZE 2 + +#define PROTO_TCP_BUFFER_SIZE (128 * 1024) + +#define PROTO_MODE_TCP 1 +#define PROTO_MODE_UDP 2 + +typedef struct PROTO_IMPL +{ + bool (*Init)(void **param, CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se); + void (*Free)(void *param); + char *(*Name)(); + UINT (*SupportedModes)(); + bool (*IsPacketForMe)(const UCHAR *data, const UINT size); + bool (*ProcessData)(void *param, TCP_RAW_DATA *received_data, FIFO *data_to_send); + void (*BufferLimit)(void *param, const bool reached); + bool (*IsOk)(void *param); + UINT (*EstablishedSessions)(void *param); +} PROTO_IMPL; + +typedef struct PROTO +{ + PROTO_IMPL *impl; +} PROTO; + +int ProtoCompare(void *p1, void *p2); + +void ProtoInit(); +void ProtoFree(); + +bool ProtoAdd(PROTO_IMPL *impl); + +UINT ProtoNum(); +PROTO *ProtoGet(const UINT index); +PROTO *ProtoDetect(SOCK *sock); + +bool ProtoHandleConnection(CEDAR *cedar, SOCK *sock); + +#endif diff --git a/src/Cedar/Proto_EtherIP.c b/src/Cedar/Proto_EtherIP.c index 6d7b1a50..60d4616e 100644 --- a/src/Cedar/Proto_EtherIP.c +++ b/src/Cedar/Proto_EtherIP.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_EtherIP.c @@ -170,7 +64,7 @@ void EtherIPIpcConnectThread(THREAD *t, void *p) &s->ClientIP, s->ClientPort, &s->ServerIP, s->ServerPort, tmp, - s->CryptName, true, mss, NULL, NULL); + s->CryptName, true, mss, NULL, NULL, IPC_LAYER_2); if (ipc != NULL) { diff --git a/src/Cedar/Proto_EtherIP.h b/src/Cedar/Proto_EtherIP.h index 8bdc00b6..c540bc68 100644 --- a/src/Cedar/Proto_EtherIP.h +++ b/src/Cedar/Proto_EtherIP.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_EtherIP.h diff --git a/src/Cedar/Proto_IKE.c b/src/Cedar/Proto_IKE.c index 06c79911..94d53771 100644 --- a/src/Cedar/Proto_IKE.c +++ b/src/Cedar/Proto_IKE.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_IKE.c diff --git a/src/Cedar/Proto_IKE.h b/src/Cedar/Proto_IKE.h index 072d6767..c32b55fc 100644 --- a/src/Cedar/Proto_IKE.h +++ b/src/Cedar/Proto_IKE.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_IKE.h diff --git a/src/Cedar/Proto_IPsec.c b/src/Cedar/Proto_IPsec.c index 0672ff2a..3128ffff 100644 --- a/src/Cedar/Proto_IPsec.c +++ b/src/Cedar/Proto_IPsec.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_IPsec.c @@ -116,13 +10,6 @@ static bool ipsec_disable = false; -// Disabling whole IPsec -void IPSecSetDisable(bool b) -{ - ipsec_disable = b; -} - - // Monitor the IPsec service of the OS, and stop it if it will conflict void IPsecOsServiceCheckThread(THREAD *t, void *p) { diff --git a/src/Cedar/Proto_IPsec.h b/src/Cedar/Proto_IPsec.h index 20b484ce..7be62430 100644 --- a/src/Cedar/Proto_IPsec.h +++ b/src/Cedar/Proto_IPsec.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_IPsec.h @@ -198,7 +92,6 @@ void AddEtherIPId(IPSEC_SERVER *s, ETHERIP_ID *id); bool DeleteEtherIPId(IPSEC_SERVER *s, char *id_str); void IPsecOsServiceCheckThread(THREAD *t, void *p); bool IPsecCheckOsService(IPSEC_SERVER *s); -void IPSecSetDisable(bool b); #endif // PROTO_IPSEC_H diff --git a/src/Cedar/Proto_IkePacket.c b/src/Cedar/Proto_IkePacket.c index 4554ae91..f3e837af 100644 --- a/src/Cedar/Proto_IkePacket.c +++ b/src/Cedar/Proto_IkePacket.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_IkePacket.c @@ -138,86 +32,6 @@ BUF *IkeStrToPassword(char *str) return b; } -// Phase 1: Convert the encryption algorithm name to key size -UINT IkePhase1CryptIdToKeySize(UCHAR id) -{ - switch (id) - { - case IKE_P1_CRYPTO_3DES_CBC: - return DES3_KEY_SIZE; - - case IKE_P1_CRYPTO_DES_CBC: - return DES_KEY_SIZE; - } - - return 0; -} - -// Phase 2: Convert the encryption algorithm name to key size -UINT IkePhase2CryptIdToKeySize(UCHAR id) -{ - switch (id) - { - case IKE_TRANSFORM_ID_P2_ESP_3DES: - return DES3_KEY_SIZE; - - case IKE_TRANSFORM_ID_P2_ESP_DES: - return DES_KEY_SIZE; - } - - return 0; -} - -// Convert a string to an algorithm name -UCHAR IkeStrToPhase1CryptId(char *name) -{ - if (StartWith(name, "3DES") || StartWith("3DES", name)) - { - return IKE_P1_CRYPTO_3DES_CBC; - } - else if (StartWith(name, "DES") || StartWith("DES", name)) - { - return IKE_P1_CRYPTO_DES_CBC; - } - else - { - return 0; - } -} -UCHAR IkeStrToPhase1HashId(char *name) -{ - if (StartWith(name, "SHA-1") || StartWith("SHA-1", name)) - { - return IKE_P1_HASH_SHA1; - } - - return 0; -} -UCHAR IkeStrToPhase2CryptId(char *name) -{ - if (StartWith(name, "3DES") || StartWith("3DES", name)) - { - return IKE_TRANSFORM_ID_P2_ESP_3DES; - } - else if (StartWith(name, "DES") || StartWith("DES", name)) - { - return IKE_TRANSFORM_ID_P2_ESP_DES; - } - else - { - return 0; - } -} -UCHAR IkeStrToPhase2HashId(char *name) -{ - if (StartWith(name, "SHA-1") || StartWith("SHA-1", name)) - { - return IKE_P2_HMAC_SHA1_96; - } - - return 0; -} - // Build a data payload BUF *IkeBuildDataPayload(IKE_PACKET_DATA_PAYLOAD *t) { @@ -871,23 +685,6 @@ IKE_PACKET_PAYLOAD *IkeNewNoticeErrorInvalidCookiePayload(UINT64 init_cookie, UI return ret; } -// Create an Invalid Exchange Type Payload -IKE_PACKET_PAYLOAD *IkeNewNoticeErrorInvalidExchangeTypePayload(UINT64 init_cookie, UINT64 resp_cookie, UCHAR exchange_type) -{ - IKE_PACKET_PAYLOAD *ret; - BUF *b = NewBuf(); - - WriteBufInt64(b, init_cookie); - WriteBufInt64(b, resp_cookie); - - ret = IkeNewNoticePayload(IKE_PROTOCOL_ID_IKE, IKE_NOTICE_ERROR_INVALID_EXCHANGE_TYPE, b->Buf, b->Size, - &exchange_type, 1); - - FreeBuf(b); - - return ret; -} - // Create an Invalid SPI payload IKE_PACKET_PAYLOAD *IkeNewNoticeErrorInvalidSpiPayload(UINT spi) { @@ -938,38 +735,6 @@ IKE_PACKET_PAYLOAD *IkeNewNoticeDpdPayload(bool ack, UINT64 init_cookie, UINT64 return ret; } -// Create a Certificate Request Payload -IKE_PACKET_PAYLOAD *IkeNewCertRequestPayload(UCHAR cert_type, void *data, UINT size) -{ - IKE_PACKET_PAYLOAD *p; - if (data == NULL && size != 0) - { - return NULL; - } - - p = IkeNewPayload(IKE_PAYLOAD_CERT_REQUEST); - p->Payload.CertRequest.CertType = cert_type; - p->Payload.CertRequest.Data = MemToBuf(data, size); - - return p; -} - -// Create a Certificate payload -IKE_PACKET_PAYLOAD *IkeNewCertPayload(UCHAR cert_type, void *cert_data, UINT cert_size) -{ - IKE_PACKET_PAYLOAD *p; - if (cert_data == NULL && cert_size != 0) - { - return NULL; - } - - p = IkeNewPayload(IKE_PAYLOAD_CERT); - p->Payload.Cert.CertType = cert_type; - p->Payload.Cert.CertData = MemToBuf(cert_data, cert_size); - - return p; -} - // Create an ID payload IKE_PACKET_PAYLOAD *IkeNewIdPayload(UCHAR id_type, UCHAR protocol_id, USHORT port, void *id_data, UINT id_size) { @@ -2292,12 +2057,7 @@ void IkeDebugUdpSendRawPacket(IKE_PACKET *p) p->FlagEncrypted = false; - b = NULL; - - if (b == NULL) - { - b = IkeBuildEx(p, NULL, true); - } + b = IkeBuildEx(p, NULL, true); if (b == NULL) { @@ -2538,21 +2298,6 @@ IKE_PACKET *IkeNew(UINT64 init_cookie, UINT64 resp_cookie, UCHAR exchange_type, return p; } -// Create a new SPI value -UINT IkeNewSpi() -{ - while (true) - { - UINT i = Rand32(); - - if (i >= 4096) - { - return i; - } - } -} - - // Create an encryption engine for IKE IKE_ENGINE *NewIkeEngine() { diff --git a/src/Cedar/Proto_IkePacket.h b/src/Cedar/Proto_IkePacket.h index 4292e535..c02bba32 100644 --- a/src/Cedar/Proto_IkePacket.h +++ b/src/Cedar/Proto_IkePacket.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_IkePacket.h @@ -698,15 +592,12 @@ IKE_PACKET_PAYLOAD *IkeNewProposalPayload(UCHAR number, UCHAR protocol_id, void IKE_PACKET_PAYLOAD *IkeNewTransformPayload(UCHAR number, UCHAR transform_id, LIST *value_list); IKE_PACKET_TRANSFORM_VALUE *IkeNewTransformValue(UCHAR type, UINT value); IKE_PACKET_PAYLOAD *IkeNewIdPayload(UCHAR id_type, UCHAR protocol_id, USHORT port, void *id_data, UINT id_size); -IKE_PACKET_PAYLOAD *IkeNewCertPayload(UCHAR cert_type, void *cert_data, UINT cert_size); -IKE_PACKET_PAYLOAD *IkeNewCertRequestPayload(UCHAR cert_type, void *data, UINT size); IKE_PACKET_PAYLOAD *IkeNewNoticePayload(UCHAR protocol_id, USHORT message_type, void *spi, UINT spi_size, void *message, UINT message_size); IKE_PACKET_PAYLOAD *IkeNewDeletePayload(UCHAR protocol_id, LIST *spi_list); IKE_PACKET_PAYLOAD *IkeNewNoticeErrorInvalidCookiePayload(UINT64 init_cookie, UINT64 resp_cookie); -IKE_PACKET_PAYLOAD *IkeNewNoticeErrorInvalidExchangeTypePayload(UINT64 init_cookie, UINT64 resp_cookie, UCHAR exchange_type); IKE_PACKET_PAYLOAD *IkeNewNoticeErrorInvalidSpiPayload(UINT spi); IKE_PACKET_PAYLOAD *IkeNewNoticeErrorNoProposalChosenPayload(bool quick_mode, UINT64 init_cookie, UINT64 resp_cookie); IKE_PACKET_PAYLOAD *IkeNewNoticeDpdPayload(bool ack, UINT64 init_cookie, UINT64 resp_cookie, UINT seq_no); @@ -732,15 +623,7 @@ BUF *IkeBuildTransformPayload(IKE_PACKET_TRANSFORM_PAYLOAD *t); UINT IkeGetTransformValue(IKE_PACKET_TRANSFORM_PAYLOAD *t, UINT type, UINT index); UINT IkeGetTransformValueNum(IKE_PACKET_TRANSFORM_PAYLOAD *t, UINT type); -UCHAR IkeStrToPhase1CryptId(char *name); -UCHAR IkeStrToPhase1HashId(char *name); -UCHAR IkeStrToPhase2CryptId(char *name); -UCHAR IkeStrToPhase2HashId(char *name); BUF *IkeStrToPassword(char *str); -UINT IkePhase1CryptIdToKeySize(UCHAR id); -UINT IkePhase2CryptIdToKeySize(UCHAR id); - -UINT IkeNewSpi(); IKE_ENGINE *NewIkeEngine(); IKE_CRYPTO *NewIkeCrypto(IKE_ENGINE *e, UINT crypto_id, char *name, UINT *key_sizes, UINT num_key_sizes, UINT block_size); diff --git a/src/Cedar/Proto_L2TP.c b/src/Cedar/Proto_L2TP.c index 2a6911a7..960103ca 100644 --- a/src/Cedar/Proto_L2TP.c +++ b/src/Cedar/Proto_L2TP.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_L2TP.c diff --git a/src/Cedar/Proto_L2TP.h b/src/Cedar/Proto_L2TP.h index c6842d10..1cd9767b 100644 --- a/src/Cedar/Proto_L2TP.h +++ b/src/Cedar/Proto_L2TP.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_L2TP.h diff --git a/src/Cedar/Proto_OpenVPN.c b/src/Cedar/Proto_OpenVPN.c index 34f4c2c2..7900935c 100644 --- a/src/Cedar/Proto_OpenVPN.c +++ b/src/Cedar/Proto_OpenVPN.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_OpenVPN.c @@ -113,10 +7,6 @@ #include "CedarPch.h" - -static bool g_no_openvpn_tcp = false; -static bool g_no_openvpn_udp = false; - // Ping signature of the OpenVPN protocol static UCHAR ping_signature[] = { @@ -124,18 +14,210 @@ static UCHAR ping_signature[] = 0x07, 0xed, 0x2d, 0x0a, 0x98, 0x1f, 0xc7, 0x48 }; -// Get the OpenVPN over TCP disabling flag -bool OvsGetNoOpenVpnTcp() +PROTO_IMPL *OvsGetProtoImpl() { - return g_no_openvpn_tcp; + static PROTO_IMPL impl = + { + OvsInit, + OvsFree, + OvsName, + OvsSupportedModes, + OvsIsPacketForMe, + OvsProcessData, + OvsBufferLimit, + OvsIsOk, + OvsEstablishedSessions + }; + + return &impl; } -// Get the OpenVPN over UDP disabling flag -bool OvsGetNoOpenVpnUdp() +bool OvsInit(void **param, CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se) { - return g_no_openvpn_udp; + if (param == NULL || cedar == NULL || im == NULL || se == NULL) + { + return false; + } + + *param = NewOpenVpnServer(cedar, im, se); + + return true; } +void OvsFree(void *param) +{ + FreeOpenVpnServer(param); +} + +// Return the protocol name +char *OvsName() +{ + return "OpenVPN"; +} + +// Return the supported modes (TCP & UDP) +UINT OvsSupportedModes() +{ + return PROTO_MODE_TCP | PROTO_MODE_UDP; +} + +// Check whether it's an OpenVPN packet +bool OvsIsPacketForMe(const UCHAR *buf, const UINT size) +{ + if (buf == NULL || size != 2) + { + return false; + } + + if (buf[0] == 0x00 && buf[1] == 0x0E) + { + return true; + } + + return false; +} + +bool OvsProcessData(void *param, TCP_RAW_DATA *received_data, FIFO *data_to_send) +{ + bool ret = true; + UINT i; + OPENVPN_SERVER *server; + UCHAR buf[OPENVPN_TCP_MAX_PACKET_SIZE]; + + if (param == NULL || received_data == NULL || data_to_send == NULL) + { + return false; + } + + server = param; + + // Separate to a list of datagrams by interpreting the data received from the TCP socket + while (true) + { + UDPPACKET *packet; + USHORT payload_size, packet_size; + FIFO *fifo = received_data->Data; + const UINT fifo_size = FifoSize(fifo); + + if (fifo_size < sizeof(USHORT)) + { + // Non-arrival + break; + } + + // The beginning of a packet contains the data size + payload_size = READ_USHORT(FifoPtr(fifo)); + packet_size = payload_size + sizeof(USHORT); + + if (payload_size == 0 || packet_size > sizeof(buf)) + { + ret = false; + Debug("OvsProcessData(): Invalid payload size: %u bytes\n", payload_size); + break; + } + + if (fifo_size < packet_size) + { + // Non-arrival + break; + } + + if (ReadFifo(fifo, buf, packet_size) != packet_size) + { + ret = false; + Debug("OvsProcessData(): ReadFifo() failed to read the packet\n"); + break; + } + + // Insert packet into the list + packet = NewUdpPacket(&received_data->SrcIP, received_data->SrcPort, &received_data->DstIP, received_data->DstPort, Clone(buf + sizeof(USHORT), payload_size), payload_size); + packet->Type = OPENVPN_PROTOCOL_TCP; + Add(server->RecvPacketList, packet); + } + + // Process the list of received datagrams + OvsRecvPacket(server, server->RecvPacketList); + + // Release the received packet list + for (i = 0; i < LIST_NUM(server->RecvPacketList); ++i) + { + UDPPACKET *p = LIST_DATA(server->RecvPacketList, i); + FreeUdpPacket(p); + } + + DeleteAll(server->RecvPacketList); + + // Store in the queue by getting a list of the datagrams to be transmitted from the OpenVPN server + for (i = 0; i < LIST_NUM(server->SendPacketList); ++i) + { + UDPPACKET *p = LIST_DATA(server->SendPacketList, i); + + // Store the size in the TCP send queue first + USHORT us = Endian16((USHORT)p->Size); + + WriteFifo(data_to_send, &us, sizeof(USHORT)); + + // Write the data body + WriteFifo(data_to_send, p->Data, p->Size); + + // Packet release + FreeUdpPacket(p); + } + + DeleteAll(server->SendPacketList); + + return ret; +} + +void OvsBufferLimit(void *param, const bool reached) +{ + if (param == NULL) + { + return; + } + + ((OPENVPN_SERVER *)param)->SupressSendPacket = reached; +} + +bool OvsIsOk(void *param) +{ + OPENVPN_SERVER *s; + + if (param == NULL) + { + return false; + } + + s = param; + + return (s->DisconnectCount < 1) && (s->SessionEstablishedCount > 0); +} + +UINT OvsEstablishedSessions(void *param) +{ + LIST *sessions; + UINT i; + UINT established_sessions = 0; + + if (param == NULL) + { + return 0; + } + + sessions = ((OPENVPN_SERVER *)param)->SessionList; + + for (i = 0;i < LIST_NUM(sessions);i++) + { + OPENVPN_SESSION *se = LIST_DATA(sessions, i); + + if (se->Established) + { + ++established_sessions; + } + } + + return established_sessions; +} // Write the OpenVPN log void OvsLog(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c, char *name, ...) @@ -175,9 +257,281 @@ void OvsLog(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c, char *na WriteServerLog(s->Cedar, prefix); } -// Process the received packet -void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p, UINT protocol) +// Encrypt the data +UINT OvsEncrypt(CIPHER *cipher, MD *md, UCHAR *iv, UCHAR *tag, UCHAR *dest, UCHAR *src, UINT src_size, UCHAR *aad, UINT aad_size) { + // Validate arguments + if (cipher == NULL || (cipher->IsAeadCipher == false && md == NULL)) + { + return 0; + } + + if (cipher->IsAeadCipher) + { + // Encrypt in AEAD mode (no HMAC) + UINT dest_size = CipherProcessAead(cipher, iv, tag, 16, dest, src, src_size, aad, aad_size); + if (dest_size == 0) + { + Debug("OvsEncrypt(): CipherProcessAead() failed!\n"); + return 0; + } + + return dest_size; + } + else + { + // Encrypt in non-AEAD mode (with HMAC) + UINT ret; + UINT dest_size = CipherProcess(cipher, iv, dest + md->Size + cipher->IvSize, src, src_size); + if (dest_size == 0) + { + Debug("OvsEncrypt(): CipherProcess() failed!\n"); + return 0; + } + + // Copy the IV + Copy(dest + md->Size, iv, cipher->IvSize); + dest_size += cipher->IvSize; + + // Calculate the HMAC + ret = MdProcess(md, dest, dest + md->Size, dest_size); + if (ret == 0) + { + Debug("OvsEncrypt(): MdProcess() failed!\n"); + return 0; + } + + return dest_size + ret; + } +} + +// Decrypt the data +UINT OvsDecrypt(CIPHER *cipher, MD *md, UCHAR *iv, UCHAR *dest, UCHAR *src, UINT size) +{ + // Validate arguments + if (cipher == NULL) + { + return 0; + } + + if (cipher->IsAeadCipher) + { + UCHAR *tag = src; + + if (iv == NULL || size <= OPENVPN_TAG_SIZE) + { + return 0; + } + + src += OPENVPN_TAG_SIZE; + size -= OPENVPN_TAG_SIZE; + + // Payload + if (size >= 1 && (cipher->BlockSize == 0 || (size % cipher->BlockSize) == 0)) + { + // Decryption + UINT ret = CipherProcessAead(cipher, iv, tag, OPENVPN_TAG_SIZE, dest, src, size, iv, sizeof(UINT)); + if (ret == 0) + { + Debug("OvsDecrypt(): CipherProcessAead() failed!\n"); + } + + return ret; + } + } + else + { + UCHAR *hmac; + UCHAR hmac_test[128]; + + if (md == NULL || iv == NULL || size < (md->Size + cipher->IvSize + sizeof(UINT))) + { + return 0; + } + + // HMAC + hmac = src; + src += md->Size; + size -= md->Size; + + if (MdProcess(md, hmac_test, src, size) == 0) + { + Debug("OvsDecrypt(): MdProcess() failed!\n"); + return 0; + } + + if (Cmp(hmac_test, hmac, md->Size) != 0) + { + Debug("OvsDecrypt(): HMAC verification failed!\n"); + return 0; + } + + // IV + Copy(iv, src, cipher->IvSize); + src += cipher->IvSize; + size -= cipher->IvSize; + + // Payload + if (size >= 1 && (cipher->BlockSize == 0 || (size % cipher->BlockSize) == 0)) + { + // Decryption + UINT ret = CipherProcess(cipher, iv, dest, src, size); + if (ret == 0) + { + Debug("OvsDecrypt(): CipherProcess() failed!\n"); + } + + return ret; + } + } + + return 0; +} + +// XOR the bytes with the specified string +void OvsDataXorMask(void *data, const UINT data_size, const char *mask, const UINT mask_size) +{ + UINT i; + UCHAR *buf; + // Validate arguments + if (data == NULL || data_size == 0 || mask == NULL || mask_size == 0) + { + return; + } + + for (i = 0, buf = data; i < data_size; i++, buf++) + { + *buf = *buf ^ mask[i % mask_size]; + } +} + +// XOR each byte with its position within the buffer +void OvsDataXorPtrPos(void *data, const UINT size) +{ + UINT i; + UCHAR *buf; + // Validate arguments + if (data == NULL || size == 0) + { + return; + } + + for (i = 0, buf = data; i < size; i++, buf++) + { + *buf = *buf ^ i + 1; + } +} + +// Reverse bytes order if they're more than 2, keeping the first byte unchanged +void OvsDataReverse(void *data, const UINT size) +{ + UINT i; + UCHAR tmp; + UCHAR *buf_start, *buf_end; + // Validate arguments + if (data == NULL || size < 3) + { + return; + } + + for (i = 0, buf_start = (UCHAR *)data + 1, buf_end = (UCHAR *)data + (size - 1); i < (size - 1 ) / 2; i++, buf_start++, buf_end--) + { + tmp = *buf_start; + *buf_start = *buf_end; + *buf_end = tmp; + } +} + +// Detects the method used to obfuscate the packet +UINT OvsDetectObfuscation(void *data, UINT size, char *xormask) +{ + UINT ret; + void *tmp; + OPENVPN_PACKET *parsed_packet; + // Validate arguments + if (data == NULL || size == 0) + { + return INFINITE; + } + + ret = INFINITE; + tmp = NULL; + + // OPENVPN_SCRAMBLE_MODE_DISABLED + parsed_packet = OvsParsePacket(data, size); + if (parsed_packet != NULL) + { + ret = OPENVPN_SCRAMBLE_MODE_DISABLED; + goto final; + } + + // OPENVPN_SCRAMBLE_MODE_XORMASK + tmp = Clone(data, size); + + OvsDataXorMask(tmp, size, xormask, StrLen(xormask)); + + parsed_packet = OvsParsePacket(tmp, size); + if (parsed_packet != NULL) + { + ret = OPENVPN_SCRAMBLE_MODE_XORMASK; + goto final; + } + + Free(tmp); + + // OPENVPN_SCRAMBLE_MODE_XORPTRPOS + tmp = Clone(data, size); + + OvsDataXorPtrPos(tmp, size); + + parsed_packet = OvsParsePacket(tmp, size); + if (parsed_packet != NULL) + { + ret = OPENVPN_SCRAMBLE_MODE_XORPTRPOS; + goto final; + } + + Free(tmp); + + // OPENVPN_SCRAMBLE_MODE_REVERSE + tmp = Clone(data, size); + + OvsDataReverse(tmp, size); + + parsed_packet = OvsParsePacket(tmp, size); + if (parsed_packet != NULL) + { + ret = OPENVPN_SCRAMBLE_MODE_REVERSE; + goto final; + } + + Free(tmp); + + // OPENVPN_SCRAMBLE_MODE_OBFUSCATE + tmp = Clone(data, size); + + OvsDataXorMask(tmp, size, xormask, StrLen(xormask)); + OvsDataXorPtrPos(tmp, size); + OvsDataReverse(tmp, size); + OvsDataXorPtrPos(tmp, size); + + parsed_packet = OvsParsePacket(tmp, size); + if (parsed_packet != NULL) + { + ret = OPENVPN_SCRAMBLE_MODE_OBFUSCATE; + goto final; + } + +final: + OvsFreePacket(parsed_packet); + Free(tmp); + return ret; +} + +// Process the received packet +void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p) +{ + OPENVPN_CHANNEL *c; OPENVPN_SESSION *se; OPENVPN_PACKET *recv_packet; // Validate arguments @@ -186,43 +540,79 @@ void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p, UINT protocol) return; } - // Search for the session - se = OvsFindOrCreateSession(s, &p->DstIP, p->DestPort, &p->SrcIP, p->SrcPort, protocol); + se = OvsFindOrCreateSession(s, &p->DstIP, p->DestPort, &p->SrcIP, p->SrcPort, p->Type); if (se == NULL) { return; } + // Detect obfuscation mode and save it for the next packets in the same session + if (se->ObfuscationMode == INFINITE) + { + se->ObfuscationMode = OvsDetectObfuscation(p->Data, p->Size, s->Cedar->OpenVPNObfuscationMask); + if (se->ObfuscationMode != INFINITE) + { + Debug("OvsProceccRecvPacket(): detected packet obfuscation/scrambling mode: %u\n", se->ObfuscationMode); + } + else + { + Debug("OvsProceccRecvPacket(): failed to detect packet obfuscation/scrambling mode!\n"); + return; + } + } + + // Handle scrambled packet + switch (se->ObfuscationMode) + { + case OPENVPN_SCRAMBLE_MODE_DISABLED: + break; + case OPENVPN_SCRAMBLE_MODE_XORMASK: + OvsDataXorMask(p->Data, p->Size, s->Cedar->OpenVPNObfuscationMask, StrLen(s->Cedar->OpenVPNObfuscationMask)); + break; + case OPENVPN_SCRAMBLE_MODE_XORPTRPOS: + OvsDataXorPtrPos(p->Data, p->Size); + break; + case OPENVPN_SCRAMBLE_MODE_REVERSE: + OvsDataReverse(p->Data, p->Size); + break; + case OPENVPN_SCRAMBLE_MODE_OBFUSCATE: + OvsDataXorMask(p->Data, p->Size, s->Cedar->OpenVPNObfuscationMask, StrLen(s->Cedar->OpenVPNObfuscationMask)); + OvsDataXorPtrPos(p->Data, p->Size); + OvsDataReverse(p->Data, p->Size); + OvsDataXorPtrPos(p->Data, p->Size); + } + // Parse the packet recv_packet = OvsParsePacket(p->Data, p->Size); - - if (recv_packet != NULL) + if (recv_packet == NULL) { - OPENVPN_CHANNEL *c = NULL; - if (recv_packet->OpCode != OPENVPN_P_DATA_V1 && recv_packet->MySessionId != 0) - { - Debug("RECV PACKET: %u %I64u\n", recv_packet->KeyId, recv_packet->MySessionId); - } - if (recv_packet->OpCode != OPENVPN_P_DATA_V1) - { - Debug(" PKT %u %u\n", recv_packet->OpCode, recv_packet->KeyId); - } + Debug("OvsProceccRecvPacket(): OvsParsePacket() returned NULL!\n"); + return; + } - if (recv_packet->OpCode != OPENVPN_P_DATA_V1) + c = se->Channels[recv_packet->KeyId]; + + if (recv_packet->OpCode != OPENVPN_P_DATA_V1) + { + // Control packet + Debug("OvsProceccRecvPacket(): Received control packet. PacketId: %u, OpCode: %u, KeyId: %u, MySessionId: %I64u\n", + recv_packet->PacketId, recv_packet->OpCode, recv_packet->KeyId, recv_packet->MySessionId); + + if (recv_packet->OpCode == OPENVPN_P_CONTROL_HARD_RESET_CLIENT_V2 || + recv_packet->OpCode == OPENVPN_P_CONTROL_SOFT_RESET_V1) { - // Control packet - if (recv_packet->OpCode == OPENVPN_P_CONTROL_HARD_RESET_CLIENT_V2 || - recv_packet->OpCode == OPENVPN_P_CONTROL_SOFT_RESET_V1) + // Connection request packet + if (c != NULL && c->Status == OPENVPN_CHANNEL_STATUS_ESTABLISHED) { - // Connection request packet - if (se->Channels[recv_packet->KeyId] != NULL) - { - // Release when there is a channel data already - OvsFreeChannel(se->Channels[recv_packet->KeyId]); - se->Channels[recv_packet->KeyId] = NULL; - } + // If there's already an established data channel, release it + OvsFreeChannel(se->Channels[recv_packet->KeyId]); + c = se->Channels[recv_packet->KeyId] = NULL; + Debug("OvsProceccRecvPacket(): Released established data channel: %u\n", recv_packet->KeyId); + } + if (c == NULL) + { // Create a new channel c = OvsNewChannel(se, recv_packet->KeyId); if (se->ClientSessionId == 0) @@ -230,139 +620,95 @@ void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p, UINT protocol) se->ClientSessionId = recv_packet->MySessionId; } se->Channels[recv_packet->KeyId] = c; - Debug("OpenVPN New Channel :%u\n", recv_packet->KeyId); + Debug("OvsProceccRecvPacket(): Created a new channel: %u\n", recv_packet->KeyId); OvsLog(s, se, c, "LO_NEW_CHANNEL"); } -/* else if (recv_packet->OpCode == OPENVPN_P_CONTROL_SOFT_RESET_V1) + } +/* else if (recv_packet->OpCode == OPENVPN_P_CONTROL_SOFT_RESET_V1) + { + // Response to soft reset request packet + OPENVPN_PACKET *p; + + p = OvsNewControlPacket(OPENVPN_P_CONTROL_SOFT_RESET_V1, recv_packet->KeyId, se->ServerSessionId, + 0, NULL, 0, 0, 0, NULL); + + OvsSendPacketNow(s, se, p); + + OvsFreePacket(p); + } +*/ + if (c != NULL) + { + // Delete the send packet list by looking the packet ID in the ACK list of arrived packet + OvsDeleteFromSendingControlPacketList(c, recv_packet->NumAck, recv_packet->AckPacketId); + + if (recv_packet->OpCode != OPENVPN_P_ACK_V1) { - // Response to soft reset request packet - OPENVPN_PACKET *p; + // Add the Packet ID of arrived packet to the list + InsertIntDistinct(c->AckReplyList, recv_packet->PacketId); - p = OvsNewControlPacket(OPENVPN_P_CONTROL_SOFT_RESET_V1, recv_packet->KeyId, se->ServerSessionId, - 0, NULL, 0, 0, 0, NULL); + if ((recv_packet->PacketId > c->MaxRecvPacketId) + || (recv_packet->OpCode == OPENVPN_P_CONTROL_HARD_RESET_CLIENT_V2) + || (recv_packet->OpCode == OPENVPN_P_CONTROL_SOFT_RESET_V1)) + { + c->MaxRecvPacketId = recv_packet->PacketId; - OvsSendPacketNow(s, se, p); + // Process the received control packet + OvsProcessRecvControlPacket(s, se, c, recv_packet); + } + } + } + } + else + { + // Data packet + if (c != NULL && c->Status == OPENVPN_CHANNEL_STATUS_ESTABLISHED) + { + UINT size; + UCHAR *data = s->TmpBuf; + if (c->CipherDecrypt->IsAeadCipher) + { + // Update variable part (packet ID) of IV + Copy(c->IvRecv, recv_packet->Data, sizeof(recv_packet->PacketId)); - OvsFreePacket(p); - }*/ + // Decrypt + size = OvsDecrypt(c->CipherDecrypt, NULL, c->IvRecv, data, recv_packet->Data + sizeof(UINT), recv_packet->DataSize - sizeof(UINT)); + } else { - // Packet other than the connection request - if (se->Channels[recv_packet->KeyId] != NULL) + // Decrypt + size = OvsDecrypt(c->CipherDecrypt, c->MdRecv, c->IvRecv, data, recv_packet->Data, recv_packet->DataSize); + if (size > sizeof(UINT)) { - c = se->Channels[recv_packet->KeyId]; + // Seek buffer after the packet ID + data += sizeof(UINT); + size -= sizeof(UINT); } } - if (c != NULL) + // Update of last communication time + se->LastCommTick = s->Now; + + if (size < sizeof(ping_signature) || Cmp(data, ping_signature, sizeof(ping_signature)) != 0) { - // Delete the send packet list by looking the packet ID in the ACK list of arrived packet - OvsDeleteFromSendingControlPacketList(c, recv_packet->NumAck, recv_packet->AckPacketId); - - if (recv_packet->OpCode != OPENVPN_P_ACK_V1) + // Receive a packet! + if (se->Ipc != NULL) { - // Add the Packet ID of arrived packet to the list - InsertIntDistinct(c->AckReplyList, recv_packet->PacketId); - Debug("Recv Packet ID (c=%u): %u\n", c->KeyId, recv_packet->PacketId); - - if ((recv_packet->PacketId > c->MaxRecvPacketId) - || (recv_packet->OpCode == OPENVPN_P_CONTROL_HARD_RESET_CLIENT_V2) - || (recv_packet->OpCode == OPENVPN_P_CONTROL_SOFT_RESET_V1)) + switch (se->Mode) { - c->MaxRecvPacketId = recv_packet->PacketId; - - // Process the received control packet - OvsProcessRecvControlPacket(s, se, c, recv_packet); + case OPENVPN_MODE_L2: // Send an Ethernet packet to a session + IPCSendL2(se->Ipc, data, size); + break; + case OPENVPN_MODE_L3: // Send an IPv4 packet to a session + IPCSendIPv4(se->Ipc, data, size); + break; } } } } - else - { - // Data packet - if (se->Channels[recv_packet->KeyId] != NULL) - { - OPENVPN_CHANNEL *c = se->Channels[recv_packet->KeyId]; - if (c->Status == OPENVPN_CHANNEL_STATUS_ESTABLISHED) - { - UCHAR *data; - UINT size; - - data = recv_packet->Data; - size = recv_packet->DataSize; - - if (size >= (c->MdRecv->Size + c->CipherDecrypt->IvSize + sizeof(UINT))) - { - UCHAR *hmac; - UCHAR *iv; - UCHAR hmac_test[128]; - - // HMAC - hmac = data; - data += c->MdRecv->Size; - size -= c->MdRecv->Size; - - // Confirmation of HMAC - MdProcess(c->MdRecv, hmac_test, data, size); - if (Cmp(hmac_test, hmac, c->MdRecv->Size) == 0) - { - // Update of last communication time - se->LastCommTick = s->Now; - - // IV - iv = data; - data += c->CipherDecrypt->IvSize; - size -= c->CipherDecrypt->IvSize; - - // Payload - if (size >= 1 && (c->CipherDecrypt->BlockSize == 0 || (size % c->CipherDecrypt->BlockSize) == 0)) - { - UINT data_packet_id; - - // Decryption - size = CipherProcess(c->CipherDecrypt, iv, s->TmpBuf, data, size); - - data = s->TmpBuf; - - if (size >= sizeof(UINT)) - { - data_packet_id = READ_UINT(data); - - data += sizeof(UINT); - size -= sizeof(UINT); - - if (size < sizeof(ping_signature) || - Cmp(data, ping_signature, sizeof(ping_signature)) != 0) - { - // Receive a packet!! - if (se->Ipc != NULL) - { - switch (se->Mode) - { - case OPENVPN_MODE_L2: // Send an Ethernet packet to a session - IPCSendL2(se->Ipc, data, size); - break; - - case OPENVPN_MODE_L3: // Send an IPv4 packet to a session - IPCSendIPv4(se->Ipc, data, size); - break; - } - } - } - } - } - } - else - { -// Debug("HMAC Failed (c=%u)\n", c->KeyId); - } - } - } - } - } - - OvsFreePacket(recv_packet); } + + OvsFreePacket(recv_packet); } // Remove a packet which the opponent has received from the transmission list @@ -474,7 +820,7 @@ void OvsProcessRecvControlPacket(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN case OPENVPN_P_CONTROL_HARD_RESET_CLIENT_V2: // New connection (hard reset) - OvsSendControlPacket(c, OPENVPN_P_CONTROL_HARD_RESET_SERVER_V2, NULL, 0); + OvsSendControlPacketEx(c, OPENVPN_P_CONTROL_HARD_RESET_SERVER_V2, NULL, 0, true); c->Status = OPENVPN_CHANNEL_STATUS_TLS_WAIT_CLIENT_KEY; break; @@ -690,19 +1036,19 @@ void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, O // if the option --push-peer-info is enabled. // It also sends all of the client's environment // variables whose names start with "UV_". - pi = OvsParseData(c->ClientKey.PeerInfo, OPENVPN_DATA_PEERINFO); + pi = NewEntryList(c->ClientKey.PeerInfo, "\n", "=\t"); // Check presence of custom hostname - if (OvsHasEntry(pi, "UV_HOSTNAME")) + if (EntryListHasKey(pi, "UV_HOSTNAME")) { - StrCpy(p.ClientHostname, sizeof(p.ClientHostname), IniStrValue(pi, "UV_HOSTNAME")); + StrCpy(p.ClientHostname, sizeof(p.ClientHostname), EntryListStrValue(pi, "UV_HOSTNAME")); } else // Use the default gateway's MAC address { - StrCpy(p.ClientHostname, sizeof(p.ClientHostname), IniStrValue(pi, "IV_HWADDR")); + StrCpy(p.ClientHostname, sizeof(p.ClientHostname), EntryListStrValue(pi, "IV_HWADDR")); } - OvsFreeList(pi); + FreeEntryList(pi); if (se->Mode == OPENVPN_MODE_L3) { @@ -715,11 +1061,17 @@ void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, O p.BridgeMode = true; } - if (c->ClientCert.X != NULL) + if (IsEmptyStr(c->ClientKey.Username) || IsEmptyStr(c->ClientKey.Password)) { - p.ClientCertificate = c->ClientCert.X; + // OpenVPN X.509 certificate authentication will be used only when no username / password is specified + if (c->ClientCert.X != NULL) + { + p.ClientCertificate = c->ClientCert.X; + } } + p.Layer = (se->Mode == OPENVPN_MODE_L2) ? IPC_LAYER_2 : IPC_LAYER_3; + // Calculate the MSS p.Mss = OvsCalcTcpMss(s, se, c); Debug("MSS=%u\n", p.Mss); @@ -773,7 +1125,7 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C LIST *o; BUF *b; char opt_str[MAX_SIZE]; - char *cipher_name; + char *cipher_name, *md_name; // Validate arguments if (s == NULL || se == NULL || c == NULL || data == NULL) { @@ -814,13 +1166,13 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C StrCpy(opt_str, sizeof(opt_str), s->Cedar->OpenVPNDefaultClientOption); } - o = OvsParseData(opt_str, OPENVPN_DATA_OPTIONS); + o = NewEntryList(opt_str, ",", " \t"); if (se->Mode == OPENVPN_MODE_UNKNOWN) { UINT mtu; // Layer - if (StrCmpi(IniStrValue(o, "dev-type"), "tun") == 0) + if (StrCmpi(EntryListStrValue(o, "dev-type"), "tun") == 0) { // L3 se->Mode = OPENVPN_MODE_L3; @@ -832,7 +1184,7 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C } // Link MTU - mtu = IniIntValue(o, "link-mtu"); + mtu = EntryListIntValue(o, "link-mtu"); if (mtu == 0) { mtu = OPENVPN_MTU_LINK; @@ -840,7 +1192,7 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C se->LinkMtu = mtu; // Tun MTU - mtu = IniIntValue(o, "tun-mtu"); + mtu = EntryListIntValue(o, "tun-mtu"); if (mtu == 0) { mtu = OPENVPN_MTU_TUN; @@ -852,7 +1204,6 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C if (se->Protocol == OPENVPN_PROTOCOL_TCP) { // TCP - // UDP if (IsIP6(&se->ClientIp) == false) { StrCpy(c->Proto, sizeof(c->Proto), "TCPv4_SERVER"); @@ -876,13 +1227,10 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C } // Encryption algorithm - cipher_name = IniStrValue(o, "cipher"); - c->CipherEncrypt = OvsGetCipher(cipher_name); - c->CipherDecrypt = OvsGetCipher(cipher_name); + cipher_name = EntryListStrValue(o, "cipher"); // Hash algorithm - c->MdSend = OvsGetMd(IniStrValue(o, "auth")); - c->MdRecv = NewMd(c->MdSend->Name); + md_name = EntryListStrValue(o, "auth"); // Random number generation Rand(c->ServerKey.Random1, sizeof(c->ServerKey.Random1)); @@ -909,13 +1257,26 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C c->ExpansionKey, sizeof(c->ExpansionKey)); FreeBuf(b); - // Set the key + // Set up the encryption algorithm + c->CipherEncrypt = OvsGetCipher(cipher_name); + c->CipherDecrypt = OvsGetCipher(cipher_name); SetCipherKey(c->CipherDecrypt, c->ExpansionKey + 0, false); SetCipherKey(c->CipherEncrypt, c->ExpansionKey + 128, true); - SetMdKey(c->MdRecv, c->ExpansionKey + 64, c->MdRecv->Size); - SetMdKey(c->MdSend, c->ExpansionKey + 192, c->MdSend->Size); - OvsFreeList(o); + if (c->CipherDecrypt->IsAeadCipher) + { + // In AEAD mode the IV is composed by the packet ID and a part of the HMAC key + Copy(c->IvRecv + sizeof(c->LastDataPacketId), c->ExpansionKey + 64, c->CipherDecrypt->IvSize - sizeof(c->LastDataPacketId)); + Copy(c->IvSend + sizeof(c->LastDataPacketId), c->ExpansionKey + 192, c->CipherEncrypt->IvSize - sizeof(c->LastDataPacketId)); + } + else + { + // Set up the hash algorithm + c->MdSend = OvsGetMd(md_name); + c->MdRecv = OvsGetMd(md_name); + SetMdKey(c->MdRecv, c->ExpansionKey + 64, c->MdRecv->Size); + SetMdKey(c->MdSend, c->ExpansionKey + 192, c->MdSend->Size); + } // We pass the cipher name sent from the OpenVPN client, unless it's a different cipher, to prevent a message such as: // WARNING: 'cipher' is used inconsistently, local='cipher AES-128-GCM', remote='cipher aes-128-gcm' @@ -934,9 +1295,11 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C se->LinkMtu, se->TunMtu, c->Proto, - cipher_name, c->MdSend->Name, c->CipherEncrypt->KeySize * 8); - Debug("Building OptionStr: %s\n", c->ServerKey.OptionString); + cipher_name, md_name, c->CipherEncrypt->KeySize * 8); + FreeEntryList(o); + + Debug("OvsSetupSessionParameters(): Built OptionString: %s\n", c->ServerKey.OptionString); OvsLog(s, se, c, "LO_OPTION_STR_SEND", c->ServerKey.OptionString); } @@ -982,70 +1345,6 @@ MD *OvsGetMd(char *name) return m; } -// Parse data string -LIST *OvsParseData(char *str, int type) -{ - LIST *o = NewListFast(NULL); - TOKEN_LIST *t; - - t = ParseTokenWithoutNullStr(str, type == OPENVPN_DATA_OPTIONS ? "," : "\n"); - if (t != NULL) - { - UINT i; - - for (i = 0;i < t->NumTokens;i++) - { - char key[MAX_SIZE]; - char value[MAX_SIZE]; - char *line = t->Token[i]; - Trim(line); - - if (GetKeyAndValue(line, key, sizeof(key), value, sizeof(value), type == OPENVPN_DATA_OPTIONS ? " \t" : "=\t")) - { - INI_ENTRY *e = ZeroMalloc(sizeof(INI_ENTRY)); - - e->Key = CopyStr(key); - e->Value = CopyStr(value); - - Add(o, e); - } - } - - FreeToken(t); - } - - return o; -} - -// Release the option list -void OvsFreeList(LIST *o) -{ - // Validate arguments - if (o == NULL) - { - return; - } - - FreeIni(o); -} - -// Confirm whether there is specified option key string -bool OvsHasEntry(LIST *o, char *key) -{ - // Validate arguments - if (o == NULL || key == NULL) - { - return false; - } - - if (GetIniEntry(o, key) != NULL) - { - return true; - } - - return false; -} - // Build the data from KEY_METHOD2 BUF *OvsBuildKeyMethod2(OPENVPN_KEY_METHOD_2 *d) { @@ -1252,6 +1551,10 @@ void OvsSendControlPacketWithAutoSplit(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR * // Send the control packet void OvsSendControlPacket(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR *data, UINT data_size) +{ + OvsSendControlPacketEx(c, opcode, data, data_size, false); +} +void OvsSendControlPacketEx(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR *data, UINT data_size, bool no_resend) { OPENVPN_CONTROL_PACKET *p; // Validate arguments @@ -1262,6 +1565,8 @@ void OvsSendControlPacket(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR *data, UINT da p = ZeroMalloc(sizeof(OPENVPN_CONTROL_PACKET)); + p->NoResend = no_resend; + p->OpCode = opcode; p->PacketId = c->NextSendPacketId++; @@ -1398,7 +1703,8 @@ OPENVPN_CHANNEL *OvsNewChannel(OPENVPN_SESSION *se, UCHAR key_id) c->KeyId = key_id; - Rand(c->NextIv, sizeof(c->NextIv)); + Rand(c->IvSend, sizeof(c->IvSend)); + Rand(c->IvRecv, sizeof(c->IvRecv)); //c->NextRekey = se->Server->Now + (UINT64)5000; @@ -1446,53 +1752,72 @@ UINT64 OvsNewServerSessionId(OPENVPN_SERVER *s) // Build and submit the OpenVPN data packet void OvsSendDataPacket(OPENVPN_CHANNEL *c, UCHAR key_id, UINT data_packet_id, void *data, UINT data_size) { - UCHAR uc; - UCHAR *encrypted_data; - UINT encrypted_size; + const UCHAR op = ((OPENVPN_P_DATA_V1 << 3) & 0xF8) | (key_id & 0x07); UCHAR *dest_data; UINT dest_size; - UINT r; - // Validate arguments if (c == NULL || data == NULL || data_size == 0) { return; } - uc = ((OPENVPN_P_DATA_V1 << 3) & 0xF8) | (key_id & 0x07); + // [ xxx ] = unprotected + // [ - xxx - ] = authenticated + // [ * xxx * ] = encrypted and authenticated - // Generate the data to be encrypted + if (c->CipherEncrypt->IsAeadCipher) + { + // [ opcode ] [ - packet ID - ] [ TAG ] [ * packet payload * ] + UCHAR tag[16]; - encrypted_size = sizeof(UINT) + data_size; - encrypted_data = ZeroMalloc(encrypted_size); + // Update variable part (packet ID) of IV + WRITE_UINT(c->IvSend, data_packet_id); - WRITE_UINT(encrypted_data, data_packet_id); - Copy(encrypted_data + sizeof(UINT), data, data_size); + // Prepare a buffer to store the results + dest_data = Malloc(sizeof(op) + sizeof(data_packet_id) + sizeof(tag) + data_size + 256); - // Prepare a buffer to store the results - dest_data = Malloc(sizeof(UCHAR) + c->MdSend->Size + c->CipherEncrypt->IvSize + encrypted_size + 256); + // Set data size to the maximum known + dest_size = sizeof(op) + sizeof(data_packet_id) + sizeof(tag); - // Encrypt - r = CipherProcess(c->CipherEncrypt, c->NextIv, dest_data + sizeof(UCHAR) + c->MdSend->Size + c->CipherEncrypt->IvSize, - encrypted_data, encrypted_size); - dest_size = sizeof(UCHAR) + c->MdSend->Size + c->CipherEncrypt->IvSize + r; + // Write opcode + dest_data[0] = op; - // Copy the IV - Copy(dest_data + sizeof(UCHAR) + c->MdSend->Size, c->NextIv, c->CipherEncrypt->IvSize); + // Write packet ID + WRITE_UINT(dest_data + sizeof(op), data_packet_id); - // Calculate the HMAC - MdProcess(c->MdSend, dest_data + sizeof(UCHAR), dest_data + sizeof(UCHAR) + c->MdSend->Size, - dest_size - sizeof(UCHAR) - c->MdSend->Size); + // Write encrypted payload + dest_size += OvsEncrypt(c->CipherEncrypt, NULL, c->IvSend, tag, dest_data + dest_size, data, data_size, c->IvSend, sizeof(data_packet_id)); - // Update the NextIV - Copy(c->NextIv, dest_data + dest_size - c->CipherEncrypt->IvSize, c->CipherEncrypt->IvSize); + // Write authentication tag + Copy(dest_data + sizeof(op) + sizeof(data_packet_id), tag, sizeof(tag)); + } + else + { + // [ opcode ] [ HMAC ] [ - IV - ] [ * packet ID * ] [ * packet payload * ] + UINT encrypted_size = sizeof(data_packet_id) + data_size; + UCHAR *encrypted_data = ZeroMalloc(encrypted_size); + WRITE_UINT(encrypted_data, data_packet_id); + Copy(encrypted_data + sizeof(data_packet_id), data, data_size); - // Op-code - dest_data[0] = uc; + // Prepare a buffer to store the results + dest_data = Malloc(sizeof(op) + c->MdSend->Size + c->CipherEncrypt->IvSize + encrypted_size + 256); + + // Set data size to the maximum known + dest_size = sizeof(op); + + // Write opcode + dest_data[0] = op; + + // Write IV, encrypted packet ID and payload + dest_size += OvsEncrypt(c->CipherEncrypt, c->MdSend, c->IvSend, NULL, dest_data + sizeof(op), encrypted_data, encrypted_size, NULL, 0); + + Free(encrypted_data); + + // Update the IV + Copy(c->IvSend, dest_data + dest_size - c->CipherEncrypt->IvSize, c->CipherEncrypt->IvSize); + } OvsSendPacketRawNow(c->Server, c->Session, dest_data, dest_size); - - Free(encrypted_data); } // Build an OpenVPN control packet @@ -1660,7 +1985,6 @@ OPENVPN_PACKET *OvsParsePacket(UCHAR *data, UINT size) return ret; LABEL_ERROR: - Debug("OvsParsePacket Error.\n"); OvsFreePacket(ret); return NULL; } @@ -1765,6 +2089,8 @@ OPENVPN_SESSION *OvsNewSession(OPENVPN_SERVER *s, IP *server_ip, UINT server_por Copy(&se->ServerIp, server_ip, sizeof(IP)); se->ServerPort = server_port; + se->ObfuscationMode = s->Cedar->OpenVPNObfuscation ? INFINITE : OPENVPN_SCRAMBLE_MODE_DISABLED; + se->LastCommTick = s->Now; se->Protocol = protocol; @@ -1861,7 +2187,7 @@ OPENVPN_SESSION *OvsSearchSession(OPENVPN_SERVER *s, IP *server_ip, UINT server_ } // Receive packets in the OpenVPN server -void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list, UINT protocol) +void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list) { UINT i, j; LIST *delete_session_list = NULL; @@ -1893,7 +2219,7 @@ void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list, UINT protocol) { UDPPACKET *p = LIST_DATA(recv_packet_list, i); - OvsProceccRecvPacket(s, p, protocol); + OvsProceccRecvPacket(s, p); } // Treat for all sessions and all channels @@ -2121,6 +2447,18 @@ void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list, UINT protocol) OvsLog(s, se, c, "LP_SET_IPV4_PARAM", ip_client, ip_subnet_mask, ip_defgw, ip_dns1, ip_dns2, ip_wins1, ip_wins2); } + else + { + // OpenVPN L2 mode. To fix the bug of OpenVPN 2.4.6 and particular version of kernel mode TAP driver + // on Linux, the TAP device must be up after the OpenVPN client is connected. + // However there is no direct push instruction to do so to OpenVPN client. + // Therefore we push the dummy IPv4 address (RFC7600) to the OpenVPN client. + + if (s->Cedar->OpenVPNPushDummyIPv4AddressOnL2Mode) + { + StrCat(option_str, sizeof(option_str), ",ifconfig 192.0.0.8 255.255.255.240"); + } + } WriteFifo(c->SslPipe->SslInOut->SendFifo, option_str, StrSize(option_str)); @@ -2226,20 +2564,25 @@ void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list, UINT protocol) if (cp->NextSendTime <= s->Now) { - OPENVPN_PACKET *p; + if (cp->NoResend == false || cp->NumSent == 0) // To address the UDP reflection amplification attack: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1001 + { + OPENVPN_PACKET *p; - num = OvsGetAckReplyList(c, acks); + cp->NumSent++; - p = OvsNewControlPacket(cp->OpCode, j, se->ServerSessionId, num, acks, - se->ClientSessionId, cp->PacketId, cp->DataSize, cp->Data); + num = OvsGetAckReplyList(c, acks); - OvsSendPacketNow(s, se, p); + p = OvsNewControlPacket(cp->OpCode, j, se->ServerSessionId, num, acks, + se->ClientSessionId, cp->PacketId, cp->DataSize, cp->Data); - OvsFreePacket(p); + OvsSendPacketNow(s, se, p); - cp->NextSendTime = s->Now + (UINT64)OPENVPN_CONTROL_PACKET_RESEND_INTERVAL; + OvsFreePacket(p); - AddInterrupt(s->Interrupt, cp->NextSendTime); + cp->NextSendTime = s->Now + (UINT64)OPENVPN_CONTROL_PACKET_RESEND_INTERVAL; + + AddInterrupt(s->Interrupt, cp->NextSendTime); + } } } @@ -2443,6 +2786,27 @@ void OvsSendPacketRawNow(OPENVPN_SERVER *s, OPENVPN_SESSION *se, void *data, UIN return; } + // Scramble the packet + switch (se->ObfuscationMode) + { + case OPENVPN_SCRAMBLE_MODE_DISABLED: + break; + case OPENVPN_SCRAMBLE_MODE_XORMASK: + OvsDataXorMask(data, size, s->Cedar->OpenVPNObfuscationMask, StrLen(s->Cedar->OpenVPNObfuscationMask)); + break; + case OPENVPN_SCRAMBLE_MODE_XORPTRPOS: + OvsDataXorPtrPos(data, size); + break; + case OPENVPN_SCRAMBLE_MODE_REVERSE: + OvsDataReverse(data, size); + break; + case OPENVPN_SCRAMBLE_MODE_OBFUSCATE: + OvsDataXorPtrPos(data, size); + OvsDataReverse(data, size); + OvsDataXorPtrPos(data, size); + OvsDataXorMask(data, size, s->Cedar->OpenVPNObfuscationMask, StrLen(s->Cedar->OpenVPNObfuscationMask)); + } + u = NewUdpPacket(&se->ServerIp, se->ServerPort, &se->ClientIp, se->ClientPort, data, size); @@ -2541,24 +2905,17 @@ OPENVPN_SERVER *NewOpenVpnServer(CEDAR *cedar, INTERRUPT_MANAGER *interrupt, SOC s = ZeroMalloc(sizeof(OPENVPN_SERVER)); s->Cedar = cedar; - - AddRef(s->Cedar->ref); - s->Interrupt = interrupt; + s->SockEvent = sock_event; s->SessionList = NewList(OvsCompareSessionList); + s->RecvPacketList = NewListFast(NULL); s->SendPacketList = NewListFast(NULL); s->Now = Tick64(); s->NextSessionId = 1; - if (sock_event != NULL) - { - s->SockEvent = sock_event; - AddRef(s->SockEvent->ref); - } - OvsLog(s, NULL, NULL, "LO_START"); s->Dh = DhNewFromBits(DH_PARAM_BITS_DEFAULT); @@ -2578,33 +2935,33 @@ void FreeOpenVpnServer(OPENVPN_SERVER *s) OvsLog(s, NULL, NULL, "LO_STOP"); - // Release the session list - for (i = 0;i < LIST_NUM(s->SessionList);i++) + // Release the sessions list + for (i = 0; i < LIST_NUM(s->SessionList); ++i) { OPENVPN_SESSION *se = LIST_DATA(s->SessionList, i); - OvsFreeSession(se); } ReleaseList(s->SessionList); - // Release the packet which is attempting to send - for (i = 0;i < LIST_NUM(s->SendPacketList);i++) + // Release the incoming packets list + for (i = 0; i < LIST_NUM(s->RecvPacketList); ++i) + { + UDPPACKET *p = LIST_DATA(s->RecvPacketList, i); + FreeUdpPacket(p); + } + + ReleaseList(s->RecvPacketList); + + // Release the outgoing packets list + for (i = 0; i < LIST_NUM(s->SendPacketList); ++i) { UDPPACKET *p = LIST_DATA(s->SendPacketList, i); - FreeUdpPacket(p); } ReleaseList(s->SendPacketList); - ReleaseCedar(s->Cedar); - - if (s->SockEvent != NULL) - { - ReleaseSockEvent(s->SockEvent); - } - DhFree(s->Dh); Free(s); @@ -2622,12 +2979,6 @@ void OpenVpnServerUdpListenerProc(UDPLISTENER *u, LIST *packet_list) us = (OPENVPN_SERVER_UDP *)u->Param; - if (OvsGetNoOpenVpnUdp()) - { - // OpenVPN over UDP is disabled - return; - } - if (us->OpenVpnServer != NULL) { { @@ -2636,7 +2987,7 @@ void OpenVpnServerUdpListenerProc(UDPLISTENER *u, LIST *packet_list) ClearStr(us->Cedar->OpenVPNPublicPorts, sizeof(us->Cedar->OpenVPNPublicPorts)); } - OvsRecvPacket(us->OpenVpnServer, packet_list, OPENVPN_PROTOCOL_UDP); + OvsRecvPacket(us->OpenVpnServer, packet_list); UdpListenerSendPackets(u, us->OpenVpnServer->SendPacketList); DeleteAll(us->OpenVpnServer->SendPacketList); @@ -2660,7 +3011,7 @@ OPENVPN_SERVER_UDP *NewOpenVpnServerUdp(CEDAR *cedar) AddRef(u->Cedar->ref); // Create a UDP listener - u->UdpListener = NewUdpListener(OpenVpnServerUdpListenerProc, u, &cedar->Server->ListenIP); + u->UdpListener = NewUdpListenerEx(OpenVpnServerUdpListenerProc, u, &cedar->Server->ListenIP, OPENVPN_PROTOCOL_UDP); // Create an OpenVPN server u->OpenVpnServer = NewOpenVpnServer(cedar, u->UdpListener->Interrupts, u->UdpListener->Event); @@ -2735,269 +3086,3 @@ void FreeOpenVpnServerUdp(OPENVPN_SERVER_UDP *u) Free(u); } - -// Check whether it's OpenSSL protocol by looking the first receive buffer of the TCP -bool OvsCheckTcpRecvBufIfOpenVPNProtocol(UCHAR *buf, UINT size) -{ - if (buf == NULL || size != 2) - { - return false; - } - - if (buf[0] == 0x00 && buf[1] == 0x0E) - { - return true; - } - - return false; -} - -// Run the OpenVPN server in TCP mode -bool OvsPerformTcpServer(CEDAR *cedar, SOCK *sock) -{ - OPENVPN_SERVER *s; - INTERRUPT_MANAGER *im; - SOCK_EVENT *se; - FIFO *tcp_recv_fifo; - FIFO *tcp_send_fifo; - UINT buf_size = (128 * 1024); - UCHAR *buf; - UINT64 giveup_time = Tick64() + (UINT64)OPENVPN_NEW_SESSION_DEADLINE_TIMEOUT; - LIST *ovs_recv_packet; - UINT i; - bool ret = false; - // Validate arguments - if (cedar == NULL || sock == NULL) - { - return false; - } - - // Initialize - buf = Malloc(buf_size); - im = NewInterruptManager(); - se = NewSockEvent(); - SetTimeout(sock, TIMEOUT_INFINITE); - JoinSockToSockEvent(sock, se); - - tcp_recv_fifo = NewFifoFast(); - tcp_send_fifo = NewFifoFast(); - - ovs_recv_packet = NewListFast(NULL); - - // Create an OpenVPN server - s = NewOpenVpnServer(cedar, im, se); - - // Main loop - Debug("Entering OpenVPN TCP Server Main Loop.\n"); - while (true) - { - UINT next_interval; - bool disconnected = false; - UINT64 now = Tick64(); - - // Receive data from a TCP socket - while (true) - { - UINT r = Recv(sock, buf, buf_size, false); - if (r == SOCK_LATER) - { - // Can not read any more - break; - } - else if (r == 0) - { - // Disconnected - disconnected = true; - break; - } - else - { - // Read - WriteFifo(tcp_recv_fifo, buf, r); - } - } - - // Separate to a list of datagrams by interpreting the data received from the TCP socket - while (true) - { - UINT r = FifoSize(tcp_recv_fifo); - if (r >= sizeof(USHORT)) - { - void *ptr = FifoPtr(tcp_recv_fifo); - USHORT packet_size = READ_USHORT(ptr); - if (packet_size != 0 && packet_size <= OPENVPN_TCP_MAX_PACKET_SIZE) - { - UINT total_len = (UINT)packet_size + sizeof(USHORT); - if (r >= total_len) - { - if (ReadFifo(tcp_recv_fifo, buf, total_len) != total_len) - { - // Mismatch - disconnected = true; - break; - } - else - { - // Read one packet - UINT payload_len = packet_size; - UCHAR *payload_ptr = buf + sizeof(USHORT); - - // Pass the packet to the OpenVPN server - Add(ovs_recv_packet, NewUdpPacket(&sock->RemoteIP, sock->RemotePort, - &sock->LocalIP, sock->LocalPort, - Clone(payload_ptr, payload_len), payload_len)); - } - } - else - { - // Non-arrival - break; - } - } - else - { - // Invalid packet size - disconnected = true; - break; - } - } - else - { - // Non-arrival - break; - } - } - - // Pass a list of received datagrams to the OpenVPN server - OvsRecvPacket(s, ovs_recv_packet, OPENVPN_PROTOCOL_TCP); - - // Release the received packet list - for (i = 0;i < LIST_NUM(ovs_recv_packet);i++) - { - UDPPACKET *p = LIST_DATA(ovs_recv_packet, i); - - FreeUdpPacket(p); - } - - DeleteAll(ovs_recv_packet); - - // Store in the queue by getting a list of the datagrams to be transmitted from the OpenVPN server - for (i = 0;i < LIST_NUM(s->SendPacketList);i++) - { - UDPPACKET *p = LIST_DATA(s->SendPacketList, i); - // Store the size to the TCP send queue first - USHORT us = (USHORT)p->Size; - //Debug(" *** TCP SEND %u\n", us); - us = Endian16(us); - WriteFifo(tcp_send_fifo, &us, sizeof(USHORT)); - - // Write the data body - WriteFifo(tcp_send_fifo, p->Data, p->Size); - - // Packet release - FreeUdpPacket(p); - } - DeleteAll(s->SendPacketList); - - // Send data to the TCP socket - while (FifoSize(tcp_send_fifo) >= 1) - { - UINT r = Send(sock, FifoPtr(tcp_send_fifo), FifoSize(tcp_send_fifo), false); - - if (r == SOCK_LATER) - { - // Can not write any more - break; - } - else if (r == 0) - { - // Disconnected - disconnected = true; - break; - } - else - { - // Wrote out - ReadFifo(tcp_send_fifo, NULL, r); - } - } - - if (FifoSize(tcp_send_fifo) > MAX_BUFFERING_PACKET_SIZE) - { - s->SupressSendPacket = true; - } - else - { - s->SupressSendPacket = false; - } - - if (s->DisconnectCount >= 1) - { - // Session disconnection has occurred on OpenVPN server-side - disconnected = true; - } - - if (giveup_time <= now) - { - UINT i; - UINT num_established_sessions = 0; - for (i = 0;i < LIST_NUM(s->SessionList);i++) - { - OPENVPN_SESSION *se = LIST_DATA(s->SessionList, i); - - if (se->Established) - { - num_established_sessions++; - } - } - - if (num_established_sessions == 0) - { - // If the number of sessions is 0 even if wait a certain period of time after the start of server, abort - disconnected = true; - } - } - - if (disconnected) - { - // Error or disconnect occurs - Debug("Breaking OpenVPN TCP Server Main Loop.\n"); - break; - } - - // Wait until the next event occurs - next_interval = GetNextIntervalForInterrupt(im); - next_interval = MIN(next_interval, UDPLISTENER_WAIT_INTERVAL); - WaitSockEvent(se, next_interval); - } - - if (s != NULL && s->SessionEstablishedCount != 0) - { - ret = true; - } - - // Release the OpenVPN server - FreeOpenVpnServer(s); - - // Release object - FreeInterruptManager(im); - ReleaseSockEvent(se); - ReleaseFifo(tcp_recv_fifo); - ReleaseFifo(tcp_send_fifo); - Free(buf); - - // Release the received packet list - for (i = 0;i < LIST_NUM(ovs_recv_packet);i++) - { - UDPPACKET *p = LIST_DATA(ovs_recv_packet, i); - - FreeUdpPacket(p); - } - - ReleaseList(ovs_recv_packet); - - return ret; -} - - - diff --git a/src/Cedar/Proto_OpenVPN.h b/src/Cedar/Proto_OpenVPN.h index 811d0cf7..8fae45f3 100644 --- a/src/Cedar/Proto_OpenVPN.h +++ b/src/Cedar/Proto_OpenVPN.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_OpenVPN.h @@ -127,6 +21,7 @@ #define OPENVPN_MAX_SSL_RECV_BUF_SIZE (256 * 1024) // SSL receive buffer maximum length #define OPENVPN_MAX_KEY_SIZE 64 // Maximum key size +#define OPENVPN_TAG_SIZE 16 // Tag size (for packet authentication in AEAD mode) #define OPENVPN_TMP_BUFFER_SIZE (65536 + 256) // Temporary buffer size @@ -184,10 +79,12 @@ #define OPENVPN_MODE_L2 1 // TAP (Ethernet) #define OPENVPN_MODE_L3 2 // TUN (IP) -// Data -#define OPENVPN_DATA_OPTIONS 0 -#define OPENVPN_DATA_PEERINFO 1 - +// Scramble mode +#define OPENVPN_SCRAMBLE_MODE_DISABLED 0 // No scramble +#define OPENVPN_SCRAMBLE_MODE_XORMASK 1 // XOR the bytes with the specified string +#define OPENVPN_SCRAMBLE_MODE_XORPTRPOS 2 // XOR each byte with its position in the buffer +#define OPENVPN_SCRAMBLE_MODE_REVERSE 3 // Reverses bytes order, keeping the first byte unchanged +#define OPENVPN_SCRAMBLE_MODE_OBFUSCATE 4 // Performs the above steps using the specified string for xormask //// Type @@ -211,6 +108,8 @@ struct OPENVPN_CONTROL_PACKET UINT DataSize; // Data size UCHAR *Data; // Data body UINT64 NextSendTime; // Scheduled next transmission time + bool NoResend; // Disable re-sending + UINT NumSent; // How many times we have sent this packet }; // OpenVPN packet @@ -245,9 +144,10 @@ struct OPENVPN_CHANNEL CIPHER *CipherDecrypt; // Decryption algorithm MD *MdSend; // Transmission MD algorithm MD *MdRecv; // Reception MD algorithm + UCHAR IvSend[64]; // Transmission IV + UCHAR IvRecv[64]; // Reception IV UCHAR MasterSecret[48]; // Master Secret UCHAR ExpansionKey[256]; // Expansion Key - UCHAR NextIv[64]; // Next IV UINT LastDataPacketId; // Previous Data Packet ID UINT64 EstablishedTick; // Established time UCHAR KeyId; // KEY ID @@ -273,6 +173,7 @@ struct OPENVPN_SESSION OPENVPN_CHANNEL *Channels[OPENVPN_NUM_CHANNELS]; // Channels (up to 8) UINT LastCreatedChannelIndex; // Channel number that is created in the last UINT Mode; // Mode (L3 or L2) + UINT ObfuscationMode; // Packet obfuscation/scrambling mode UINT LinkMtu; // link-mtu UINT TunMtu; // tun-mtu IPC_ASYNC *IpcAsync; // Asynchronous IPC connection @@ -289,6 +190,7 @@ struct OPENVPN_SERVER { CEDAR *Cedar; INTERRUPT_MANAGER *Interrupt; // Interrupt manager + LIST *RecvPacketList; // Received packets list LIST *SendPacketList; // Transmission packet list LIST *SessionList; // Session list UINT64 Now; // Current time @@ -313,8 +215,18 @@ struct OPENVPN_SERVER_UDP // OpenVPN Default Client Option String #define OVPN_DEF_CLIENT_OPTION_STRING "dev-type tun,link-mtu 1500,tun-mtu 1500,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-client" - //// Function prototype +PROTO_IMPL *OvsGetProtoImpl(); +bool OvsInit(void **param, CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se); +void OvsFree(void *param); +char *OvsName(); +UINT OvsSupportedModes(); +bool OvsIsPacketForMe(const UCHAR *buf, const UINT size); +bool OvsProcessData(void *param, TCP_RAW_DATA *received_data, FIFO *data_to_send); +void OvsBufferLimit(void *param, const bool reached); +bool OvsIsOk(void *param); +UINT OvsEstablishedSessions(void *param); + OPENVPN_SERVER_UDP *NewOpenVpnServerUdp(CEDAR *cedar); void FreeOpenVpnServerUdp(OPENVPN_SERVER_UDP *u); void OpenVpnServerUdpListenerProc(UDPLISTENER *u, LIST *packet_list); @@ -322,8 +234,8 @@ void OvsApplyUdpPortList(OPENVPN_SERVER_UDP *u, char *port_list, IP *listen_ip); OPENVPN_SERVER *NewOpenVpnServer(CEDAR *cedar, INTERRUPT_MANAGER *interrupt, SOCK_EVENT *sock_event); void FreeOpenVpnServer(OPENVPN_SERVER *s); -void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list, UINT protocol); -void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p, UINT protocol); +void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list); +void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p); int OvsCompareSessionList(void *p1, void *p2); OPENVPN_SESSION *OvsSearchSession(OPENVPN_SERVER *s, IP *server_ip, UINT server_port, IP *client_ip, UINT client_port, UINT protocol); OPENVPN_SESSION *OvsNewSession(OPENVPN_SERVER *s, IP *server_ip, UINT server_port, IP *client_ip, UINT client_port, UINT protocol); @@ -350,6 +262,7 @@ void OvsSendPacketRawNow(OPENVPN_SERVER *s, OPENVPN_SESSION *se, void *data, UIN void OvsProcessRecvControlPacket(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c, OPENVPN_PACKET *p); void OvsSendControlPacket(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR *data, UINT data_size); +void OvsSendControlPacketEx(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR *data, UINT data_size, bool no_resend); void OvsSendControlPacketWithAutoSplit(OPENVPN_CHANNEL *c, UCHAR opcode, UCHAR *data, UINT data_size); void OvsFreeControlPacket(OPENVPN_CONTROL_PACKET *p); void OvsDeleteFromSendingControlPacketList(OPENVPN_CHANNEL *c, UINT num_acks, UINT *acks); @@ -359,25 +272,13 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C BUF *OvsBuildKeyMethod2(OPENVPN_KEY_METHOD_2 *d); void OvsWriteStringToBuf(BUF *b, char *str, UINT max_size); -LIST *OvsParseData(char *str, int type); -void OvsFreeList(LIST *o); -bool OvsHasEntry(LIST *o, char *key); UINT OvsPeekStringFromFifo(FIFO *f, char *str, UINT str_size); void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c); UINT OvsCalcTcpMss(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c); CIPHER *OvsGetCipher(char *name); MD *OvsGetMd(char *name); -bool OvsCheckTcpRecvBufIfOpenVPNProtocol(UCHAR *buf, UINT size); - -bool OvsPerformTcpServer(CEDAR *cedar, SOCK *sock); - -void OvsSetReplyForVgsPollEnable(bool b); - -bool OvsGetNoOpenVpnTcp(); void OpenVpnServerUdpSetDhParam(OPENVPN_SERVER_UDP *u, DH_CTX *dh); - - #endif // PROTO_OPENVPN_H diff --git a/src/Cedar/Proto_PPP.c b/src/Cedar/Proto_PPP.c index d18db762..71ab6a33 100644 --- a/src/Cedar/Proto_PPP.c +++ b/src/Cedar/Proto_PPP.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_PPP.c @@ -308,7 +202,7 @@ void PPPThread(THREAD *thread, void *param) IPToStr(client_ip_tmp, sizeof(client_ip_tmp), &p->ClientIP); - eap = HubNewEapClient(p->Cedar, hub, client_ip_tmp, id); + eap = HubNewEapClient(p->Cedar, hub, client_ip_tmp, id, "L3:PPP"); if (eap) { @@ -390,7 +284,9 @@ void PPPThread(THREAD *thread, void *param) // Notify the IP address of the PPP server c = NewPPPLCP(PPP_LCP_CODE_REQ, 0); - ui = Endian32(0x01000001); // 1.0.0.1 + // SoftEther VPN is L2-based VPN, so there is no concept of gateway IP address. + // We always push 192.0.0.8, which is defined in RFC7600 as dummy IPv4 address. + ui = Endian32(0xc0000008); Add(c->OptionList, NewPPPOption(PPP_IPCP_OPTION_IP, &ui, sizeof(UINT))); ret = PPPSendRequest(p, PPP_PROTOCOL_IPCP, c); FreePPPLCP(c); @@ -805,14 +701,14 @@ bool PPPParseUsername(CEDAR *cedar, char *src_username, ETHERIP_ID *dst) } else { - // Search for the last "@" in the string + // Search for the separator character's last position in the string len = StrLen(src); last_at = INFINITE; for (i = 0;i < len;i++) { char c = src[i]; - if (c == '@') + if (c == cedar->UsernameHubSeparator) { last_at = i; } @@ -823,12 +719,11 @@ bool PPPParseUsername(CEDAR *cedar, char *src_username, ETHERIP_ID *dst) if (last_at == INFINITE) { - // "@" is not specified + // The separator character is not specified StrCpy(token1, sizeof(token1), src); } else { - // Split with last "@" StrCpy(token1, sizeof(token1), src); token1[last_at] = 0; @@ -1018,7 +913,8 @@ PPP_PACKET *PPPProcessRequestPacket(PPP_SESSION *p, PPP_PACKET *req) // Attempt to connect with IPC ipc = NewIPC(p->Cedar, p->ClientSoftwareName, p->Postfix, hub, id, password, &error_code, &p->ClientIP, p->ClientPort, &p->ServerIP, p->ServerPort, - p->ClientHostname, p->CryptName, false, p->AdjustMss, p->EapClient, NULL); + p->ClientHostname, p->CryptName, false, p->AdjustMss, p->EapClient, NULL, + IPC_LAYER_3); if (ipc != NULL) { @@ -1151,7 +1047,8 @@ PPP_PACKET *PPPProcessRequestPacket(PPP_SESSION *p, PPP_PACKET *req) ipc = NewIPC(p->Cedar, p->ClientSoftwareName, p->Postfix, hub, id, password, &error_code, &p->ClientIP, p->ClientPort, &p->ServerIP, p->ServerPort, - p->ClientHostname, p->CryptName, false, p->AdjustMss, NULL, NULL); + p->ClientHostname, p->CryptName, false, p->AdjustMss, NULL, NULL, + IPC_LAYER_3); if (ipc != NULL) { diff --git a/src/Cedar/Proto_PPP.h b/src/Cedar/Proto_PPP.h index 578205ad..4b598d60 100644 --- a/src/Cedar/Proto_PPP.h +++ b/src/Cedar/Proto_PPP.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_PPP.h diff --git a/src/Cedar/Proto_SSTP.c b/src/Cedar/Proto_SSTP.c index cbdda0df..cd9c7e86 100644 --- a/src/Cedar/Proto_SSTP.c +++ b/src/Cedar/Proto_SSTP.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_SSTP.c @@ -122,12 +16,6 @@ bool GetNoSstp() return g_no_sstp; } -// Set the SSTP disabling flag -void SetNoSstp(bool b) -{ - g_no_sstp = b; -} - // Process the SSTP control packet reception void SstpProcessControlPacket(SSTP_SERVER *s, SSTP_PACKET *p) { diff --git a/src/Cedar/Proto_SSTP.h b/src/Cedar/Proto_SSTP.h index da6b7392..ed722734 100644 --- a/src/Cedar/Proto_SSTP.h +++ b/src/Cedar/Proto_SSTP.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_SSTP.h @@ -257,6 +151,5 @@ SSTP_PACKET *SstpNewControlPacket(USHORT message_type); SSTP_PACKET *SstpNewControlPacketWithAnAttribute(USHORT message_type, SSTP_ATTRIBUTE *a); void SstpSendPacket(SSTP_SERVER *s, SSTP_PACKET *p); bool GetNoSstp(); -void SetNoSstp(bool b); #endif // PROTO_SSTP_H diff --git a/src/Cedar/Proto_Win7.c b/src/Cedar/Proto_Win7.c index fd1e76ce..48b23aee 100644 --- a/src/Cedar/Proto_Win7.c +++ b/src/Cedar/Proto_Win7.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_Win7.c diff --git a/src/Cedar/Proto_Win7.h b/src/Cedar/Proto_Win7.h index fc9dbd90..33d585b1 100644 --- a/src/Cedar/Proto_Win7.h +++ b/src/Cedar/Proto_Win7.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_Win7.h diff --git a/src/Cedar/Proto_Win7Inner.h b/src/Cedar/Proto_Win7Inner.h index 3b544f95..7a8767be 100644 --- a/src/Cedar/Proto_Win7Inner.h +++ b/src/Cedar/Proto_Win7Inner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Proto_Win7Inner.h diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index dc47c39d..3bdecd91 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Protocol.c @@ -768,15 +662,12 @@ void UpdateClientThreadProc(THREAD *thread, void *param) // Update the configuration of the update client void SetUpdateClientSetting(UPDATE_CLIENT *c, UPDATE_CLIENT_SETTING *s) { - bool old_disable; // Validate arguments if (c == NULL || s == NULL) { return; } - old_disable = c->Setting.DisableCheck; - Copy(&c->Setting, s, sizeof(UPDATE_CLIENT_SETTING)); Set(c->HaltEvent); @@ -903,95 +794,6 @@ void NodeInfoToStr(wchar_t *str, UINT size, NODE_INFO *info) info->HubName, unique_id); } -// Comparison of node information -bool CompareNodeInfo(NODE_INFO *a, NODE_INFO *b) -{ - // Validate arguments - if (a == NULL || b == NULL) - { - return false; - } - - if (StrCmp(a->ClientProductName, b->ClientProductName) != 0) - { - return false; - } - if (a->ClientProductVer != b->ClientProductVer) - { - return false; - } - if (a->ClientProductBuild != b->ClientProductBuild) - { - return false; - } - if (StrCmp(a->ServerProductName, b->ServerProductName) != 0) - { - return false; - } - if (a->ServerProductVer != b->ServerProductVer) - { - return false; - } - if (a->ServerProductBuild != b->ServerProductBuild) - { - return false; - } - if (StrCmp(a->ClientOsName, b->ClientOsName) != 0) - { - return false; - } - if (StrCmp(a->ClientOsVer, b->ClientOsVer) != 0) - { - return false; - } - if (StrCmp(a->ClientOsProductId, b->ClientOsProductId) != 0) - { - return false; - } - if (StrCmp(a->ClientHostname, b->ClientHostname) != 0) - { - return false; - } - if (a->ClientIpAddress != b->ClientIpAddress) - { - return false; - } - if (StrCmp(a->ServerHostname, b->ServerHostname) != 0) - { - return false; - } - if (a->ServerIpAddress != b->ServerIpAddress) - { - return false; - } - if (a->ServerPort != b->ServerPort) - { - return false; - } - if (StrCmp(a->ProxyHostname, b->ProxyHostname) != 0) - { - return false; - } - if (a->ProxyIpAddress != b->ProxyIpAddress) - { - return false; - } - if (a->ProxyPort != b->ProxyPort) - { - return false; - } - if (StrCmp(a->HubName, b->HubName) != 0) - { - return false; - } - if (Cmp(a->UniqueId, b->UniqueId, 16) != 0) - { - return false; - } - - return true; -} - // Accept the password change UINT ChangePasswordAccept(CONNECTION *c, PACK *p) { @@ -1005,7 +807,6 @@ UINT ChangePasswordAccept(CONNECTION *c, PACK *p) UCHAR check_secure_old_password[SHA1_SIZE]; UINT ret = ERR_NO_ERROR; HUB *hub; - bool save = false; // Validate arguments if (c == NULL || p == NULL) { @@ -1107,7 +908,6 @@ UINT ChangePasswordAccept(CONNECTION *c, PACK *p) Copy(pw->NtLmSecureHash, new_password_ntlm, MD5_SIZE); } HLog(hub, "LH_CHANGE_PASSWORD_5", c->Name, username); - save = true; } } else @@ -1268,6 +1068,7 @@ bool ServerAccept(CONNECTION *c) UINT authtype; POLICY *policy; UINT assigned_vlan_id = 0; + UCHAR assigned_ipc_mac_address[6]; HUB *hub; SESSION *s = NULL; UINT64 user_expires = 0; @@ -1336,6 +1137,8 @@ bool ServerAccept(CONNECTION *c) Zero(ctoken_hash_str, sizeof(ctoken_hash_str)); + Zero(assigned_ipc_mac_address, sizeof(assigned_ipc_mac_address)); + Zero(mschap_v2_server_response_20, sizeof(mschap_v2_server_response_20)); Zero(&udp_acceleration_client_ip, sizeof(udp_acceleration_client_ip)); @@ -1383,6 +1186,11 @@ bool ServerAccept(CONNECTION *c) error_detail_2 = NULL; if (ServerDownloadSignature(c, &error_detail_2) == false) { + if (c->Type == CONNECTION_TYPE_ADMIN_RPC) + { + c->Err = ERR_NO_ERROR; + } + if (error_detail_2 == NULL) { error_detail = "ServerDownloadSignature"; @@ -1665,6 +1473,7 @@ bool ServerAccept(CONNECTION *c) PackGetStr(p, "inproc_postfix", c->InProcPrefix, sizeof(c->InProcPrefix)); Zero(tmp, sizeof(tmp)); PackGetStr(p, "inproc_cryptname", tmp, sizeof(tmp)); + c->InProcLayer = PackGetInt(p, "inproc_layer"); if (c->FirstSock != NULL) { @@ -1689,6 +1498,9 @@ bool ServerAccept(CONNECTION *c) } use_udp_acceleration_client = false; + + Format(radius_login_opt.In_VpnProtocolState, sizeof(radius_login_opt.In_VpnProtocolState), + "L%u:%s", c->InProcLayer, c->InProcPrefix); } else { @@ -1702,6 +1514,9 @@ bool ServerAccept(CONNECTION *c) { c->CipherName = CopyStr(c->FirstSock->CipherName); } + + Format(radius_login_opt.In_VpnProtocolState, sizeof(radius_login_opt.In_VpnProtocolState), + "L%u:%s", IPC_LAYER_2, "SEVPN"); } if (support_bulk_on_rudp && c->FirstSock != NULL && c->FirstSock->IsRUDPSocket && @@ -2259,11 +2074,19 @@ bool ServerAccept(CONNECTION *c) } } + // Check the assigned MAC Address + if (radius_login_opt.Out_IsRadiusLogin) + { + Copy(assigned_ipc_mac_address, radius_login_opt.Out_VirtualMacAddress, 6); + } + if (StrCmpi(username, ADMINISTRATOR_USERNAME) != 0) { // Get the policy if (farm_member == false) { + bool is_asterisk_user = false; + // In the case of not a farm member user = AcGetUser(hub, username); if (user == NULL) @@ -2278,12 +2101,29 @@ bool ServerAccept(CONNECTION *c) error_detail = "AcGetUser"; goto CLEANUP; } + + is_asterisk_user = true; } policy = NULL; Lock(user->lock); { + if (is_asterisk_user == false) + { + UCHAR associated_mac_address[6]; + + // Get the associated virtual MAC address + if (GetUserMacAddressFromUserNote(associated_mac_address, user->Note)) + { + if (IsZero(assigned_ipc_mac_address, 6)) + { + WHERE; + Copy(assigned_ipc_mac_address, associated_mac_address, 6); + } + } + } + // Get the expiration date user_expires = user->ExpireTime; @@ -2953,7 +2793,8 @@ bool ServerAccept(CONNECTION *c) // Create a Session StrLower(username); - s = NewServerSessionEx(c->Cedar, c, hub, username, policy, c->IsInProc); + s = NewServerSessionEx(c->Cedar, c, hub, username, policy, c->IsInProc, + (c->IsInProc && IsZero(assigned_ipc_mac_address, 6) == false) ? assigned_ipc_mac_address : NULL); s->EnableUdpRecovery = enable_udp_recovery; s->LocalHostSession = local_host_session; @@ -3162,7 +3003,7 @@ bool ServerAccept(CONNECTION *c) PackAddBool(p, "suppress_client_update_notification", suppress_client_update_notification); - if (s->InProcMode) + if (s != NULL && s->InProcMode) { if (IsZero(mschap_v2_server_response_20, sizeof(mschap_v2_server_response_20)) == false) { @@ -3794,7 +3635,6 @@ void CreateNodeInfo(NODE_INFO *info, CONNECTION *c) OS_INFO *os; char *product_id; IP ip; - bool is_vgc = false; // Validate arguments if (c == NULL) { @@ -3982,216 +3822,6 @@ SOCK *ClientAdditionalConnectToServer(CONNECTION *c) return s; } -// Remove the key and certificate in the secure device -UINT SecureDelete(UINT device_id, char *pin, char *cert_name, char *key_name) -{ - SECURE *sec; - // Validate arguments - if (pin == NULL || device_id == 0) - { - return ERR_INTERNAL_ERROR; - } - - // Open the device - sec = OpenSec(device_id); - if (sec == NULL) - { - return ERR_SECURE_DEVICE_OPEN_FAILED; - } - - // Open the session - if (OpenSecSession(sec, 0) == false) - { - CloseSec(sec); - return ERR_SECURE_DEVICE_OPEN_FAILED; - } - - // Login - if (LoginSec(sec, pin) == false) - { - CloseSecSession(sec); - CloseSec(sec); - return ERR_SECURE_PIN_LOGIN_FAILED; - } - - // Delete the certificate - if (cert_name != NULL) - { - DeleteSecCert(sec, cert_name); - } - - // Delete the Private key - if (key_name != NULL) - { - DeleteSecKey(sec, key_name); - } - - // Log out - LogoutSec(sec); - - // Close the session - CloseSecSession(sec); - - // Close the device - CloseSec(sec); - - return ERR_NO_ERROR; -} - -// Enumerate certificates and keys in the secure device -UINT SecureEnum(UINT device_id, char *pin, TOKEN_LIST **cert_list, TOKEN_LIST **key_list) -{ - SECURE *sec; - LIST *o; - LIST *cert_name_list, *key_name_list; - // Validate arguments - if (pin == NULL || device_id == 0 || cert_list == NULL || key_list == NULL) - { - return ERR_INTERNAL_ERROR; - } - - // Open the device - sec = OpenSec(device_id); - if (sec == NULL) - { - return ERR_SECURE_DEVICE_OPEN_FAILED; - } - - // Open the session - if (OpenSecSession(sec, 0) == false) - { - CloseSec(sec); - return ERR_SECURE_DEVICE_OPEN_FAILED; - } - - // Login - if (LoginSec(sec, pin) == false) - { - CloseSecSession(sec); - CloseSec(sec); - return ERR_SECURE_PIN_LOGIN_FAILED; - } - - // Enumerate objects - if ((o = EnumSecObject(sec)) != NULL) - { - UINT i; - - cert_name_list = NewList(CompareStr); - key_name_list = NewList(CompareStr); - - for (i = 0;i < LIST_NUM(o);i++) - { - SEC_OBJ *obj = LIST_DATA(o, i); - - if (obj->Type == SEC_X) - { - Add(cert_name_list, CopyStr(obj->Name)); - } - else if (obj->Type == SEC_K) - { - Add(key_name_list, CopyStr(obj->Name)); - } - } - - Sort(cert_name_list); - Sort(key_name_list); - - *cert_list = ListToTokenList(cert_name_list); - *key_list = ListToTokenList(key_name_list); - - // Release the memory - FreeStrList(cert_name_list); - FreeStrList(key_name_list); - FreeEnumSecObject(o); - } - else - { - *cert_list = NullToken(); - *key_list = NullToken(); - } - - // Log out - LogoutSec(sec); - - // Close the session - CloseSecSession(sec); - - // Close the device - CloseSec(sec); - - return ERR_NO_ERROR; -} - -// Record the certificate and key to secure device -UINT SecureWrite(UINT device_id, char *cert_name, X *x, char *key_name, K *k, char *pin) -{ - SECURE *sec; - bool failed; - // Validate arguments - if (pin == NULL || device_id == 0 || cert_name == NULL || x == NULL || key_name == NULL || k == NULL) - { - return ERR_INTERNAL_ERROR; - } - - // Open the device - sec = OpenSec(device_id); - if (sec == NULL) - { - return ERR_SECURE_DEVICE_OPEN_FAILED; - } - - // Open the session - if (OpenSecSession(sec, 0) == false) - { - CloseSec(sec); - return ERR_SECURE_DEVICE_OPEN_FAILED; - } - - // Login - if (LoginSec(sec, pin) == false) - { - CloseSecSession(sec); - CloseSec(sec); - return ERR_SECURE_PIN_LOGIN_FAILED; - } - - // Registration - failed = false; - - // Register the certificate - if (WriteSecCert(sec, true, cert_name, x) == false) - { - failed = true; - } - - // Register the private key - if (WriteSecKey(sec, true, key_name, k) == false) - { - failed = true; - } - - // Log out - LogoutSec(sec); - - // Close the session - CloseSecSession(sec); - - // Close the device - CloseSec(sec); - - if (failed == false) - { - // Success - return ERR_NO_ERROR; - } - else - { - // Failure - return ERR_SECURE_CANT_WRITE; - } -} - // Attempt to sign by the secure device UINT SecureSign(SECURE_SIGN *sign, UINT device_id, char *pin) { @@ -5456,11 +5086,11 @@ PACK *PackWelcome(SESSION *s) } #define PACK_ADD_POLICY_BOOL(name, value) \ - PackAddInt(p, "policy:" name, y->value == false ? 0 : 1) + PackAddBool(p, "policy:" name, y->value == false ? 0 : 1) #define PACK_ADD_POLICY_UINT(name, value) \ PackAddInt(p, "policy:" name, y->value) #define PACK_GET_POLICY_BOOL(name, value) \ - y->value = (PackGetInt(p, "policy:" name) == 0 ? false : true) + y->value = (PackGetBool(p, "policy:" name)) #define PACK_GET_POLICY_UINT(name, value) \ y->value = PackGetInt(p, "policy:" name) @@ -5971,6 +5601,10 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) if (h == NULL) { c->Err = ERR_CLIENT_IS_NOT_VPN; + if (c->IsJsonRpc) + { + c->Err = ERR_DISCONNECTED; + } return false; } @@ -5979,6 +5613,43 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) { // Receive the data since it's POST data_size = GetContentLength(h); + + if (server->DisableJsonRpcWebApi == false) + { + if (StrCmpi(h->Target, "/api") == 0 || StrCmpi(h->Target, "/api/") == 0) + { + c->IsJsonRpc = true; + c->Type = CONNECTION_TYPE_ADMIN_RPC; + + JsonRpcProcPost(c, s, h, data_size); + + FreeHttpHeader(h); + + if (c->JsonRpcAuthed) + { + num = 0; + } + + continue; + } + else if (StartWith(h->Target, "/admin")) + { + c->IsJsonRpc = true; + c->Type = CONNECTION_TYPE_ADMIN_RPC; + + AdminWebProcPost(c, s, h, data_size, h->Target); + + FreeHttpHeader(h); + + if (c->JsonRpcAuthed) + { + num = 0; + } + + continue; + } + } + if ((data_size > MAX_WATERMARK_SIZE || data_size < SizeOfWaterMark()) && (data_size != StrLen(HTTP_VPN_TARGET_POSTDATA))) { // Data is too large @@ -6011,7 +5682,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) { // Compare posted data with the WaterMark if ((data_size == StrLen(HTTP_VPN_TARGET_POSTDATA) && (Cmp(data, HTTP_VPN_TARGET_POSTDATA, data_size) == 0)) - || (Cmp(data, WaterMark, SizeOfWaterMark()) == 0)) + || ((data_size >= SizeOfWaterMark()) && Cmp(data, WaterMark, SizeOfWaterMark()) == 0)) { // Check the WaterMark Free(data); @@ -6027,6 +5698,25 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) } } } + else if (StrCmpi(h->Method, "OPTIONS") == 0) + { + if (server->DisableJsonRpcWebApi == false) + { + if (StrCmpi(h->Target, "/api") == 0 || StrCmpi(h->Target, "/api/") == 0 || StartWith(h->Target, "/admin")) + { + c->IsJsonRpc = true; + c->Type = CONNECTION_TYPE_ADMIN_RPC; + + JsonRpcProcOptions(c, s, h, h->Target); + + FreeHttpHeader(h); + + num = 0; + + continue; + } + } + } else if (StrCmpi(h->Method, "SSTP_DUPLEX_POST") == 0 && (server->DisableSSTPServer == false || s->IsReverseAcceptedSocket ) && GetServerCapsBool(server, "b_support_sstp") && GetNoSstp() == false) @@ -6038,7 +5728,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) { bool sstp_ret; // Accept the SSTP connection - c->Type = CONNECTION_TYPE_SSTP; + c->Type = CONNECTION_TYPE_OTHER; sstp_ret = AcceptSstp(c); @@ -6081,8 +5771,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) if (StrCmpi(h->Target, "/") == 0) { // Root directory - SERVER *s = c->Cedar->Server; - *error_detail_str = "HTTP_ROOT"; { @@ -6146,6 +5834,45 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) } } + if (b == false) + { + if (server->DisableJsonRpcWebApi == false) + { + if (StartWith(h->Target, "/api?") || StartWith(h->Target, "/api/") || StrCmpi(h->Target, "/api") == 0) + { + c->IsJsonRpc = true; + c->Type = CONNECTION_TYPE_ADMIN_RPC; + + JsonRpcProcGet(c, s, h, h->Target); + + if (c->JsonRpcAuthed) + { + num = 0; + } + + FreeHttpHeader(h); + + continue; + } + else if (StartWith(h->Target, "/admin")) + { + c->IsJsonRpc = true; + c->Type = CONNECTION_TYPE_ADMIN_RPC; + + AdminWebProcGet(c, s, h, h->Target); + + if (c->JsonRpcAuthed) + { + num = 0; + } + + FreeHttpHeader(h); + + continue; + } + } + } + if (b == false) { // Not Found @@ -6271,8 +5998,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) { SOCK *s = NULL; CLIENT_OPTION *o; - char *host_for_direct_connection; - UINT port_for_direct_connection; + WPC_CONNECT w; wchar_t tmp[MAX_SIZE]; SESSION *sess; volatile bool *cancel_flag = NULL; @@ -6288,6 +6014,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) } Zero(&ret_ip, sizeof(IP)); + Zero(&w, sizeof(w)); sess = c->Session; @@ -6323,21 +6050,27 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) c->ServerPort = o->Port; } - host_for_direct_connection = c->ServerName; - port_for_direct_connection = c->ServerPort; + StrCpy(w.HostName, sizeof(w.HostName), c->ServerName); + w.Port = c->ServerPort; + StrCpy(w.ProxyHostName, sizeof(w.ProxyHostName), o->ProxyName); + w.ProxyPort = o->ProxyPort; + StrCpy(w.ProxyUsername, sizeof(w.ProxyUsername), o->ProxyUsername); + StrCpy(w.ProxyPassword, sizeof(w.ProxyPassword), o->ProxyPassword); + StrCpy(w.CustomHttpHeader, sizeof(w.CustomHttpHeader), o->CustomHttpHeader); switch (o->ProxyType) { case PROXY_DIRECT: // TCP/IP - UniFormat(tmp, sizeof(tmp), _UU("STATUS_4"), c->ServerName); + UniFormat(tmp, sizeof(tmp), _UU("STATUS_4"), w.HostName); PrintStatus(sess, tmp); + // Production job if (o->PortUDP == 0) { { // If additional_connect == false, enable trying to NAT-T connection // If additional_connect == true, follow the IsRUDPSession setting in this session - s = TcpIpConnectEx(host_for_direct_connection, port_for_direct_connection, + s = TcpIpConnectEx(w.HostName, w.Port, (bool *)cancel_flag, hWnd, &nat_t_err, (additional_connect ? (!is_additional_rudp_session) : false), true, &ret_ip); } @@ -6376,17 +6109,11 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) break; case PROXY_HTTP: // HTTP Proxy - host_for_direct_connection = o->ProxyName; - port_for_direct_connection = o->ProxyPort; - - UniFormat(tmp, sizeof(tmp), _UU("STATUS_2"), c->ServerName, o->ProxyName); + UniFormat(tmp, sizeof(tmp), _UU("STATUS_2"), w.HostName, w.ProxyHostName); PrintStatus(sess, tmp); - // Proxy connection - s = ProxyConnectEx(c, host_for_direct_connection, port_for_direct_connection, - c->ServerName, c->ServerPort, o->ProxyUsername, o->ProxyPassword, - additional_connect, (bool *)cancel_flag, hWnd); + s = ProxyConnectEx3(c, &w, additional_connect, (bool *)cancel_flag, hWnd, 0); if (s == NULL) { // Connection failure @@ -6394,19 +6121,27 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) } break; - case PROXY_SOCKS: // SOCKS Proxy - host_for_direct_connection = o->ProxyName; - - port_for_direct_connection = o->ProxyPort; - - UniFormat(tmp, sizeof(tmp), _UU("STATUS_2"), c->ServerName, o->ProxyName); + case PROXY_SOCKS: // SOCKS4 Proxy + UniFormat(tmp, sizeof(tmp), _UU("STATUS_2"), w.HostName, w.ProxyHostName); PrintStatus(sess, tmp); + // SOCKS4 connection + s = SocksConnectEx2(c, w.ProxyHostName, w.ProxyPort, + w.HostName, w.Port, w.ProxyUsername, additional_connect, (bool *)cancel_flag, + hWnd, 0, &ret_ip); + if (s == NULL) + { + // Connection failure + return NULL; + } + break; - // SOCKS connection - s = SocksConnectEx2(c, host_for_direct_connection, port_for_direct_connection, - c->ServerName, c->ServerPort, o->ProxyUsername, - additional_connect, (bool *)cancel_flag, hWnd, 0, &ret_ip); + case PROXY_SOCKS5: // SOCKS5 Proxy + UniFormat(tmp, sizeof(tmp), _UU("STATUS_2"), w.HostName, w.ProxyHostName); + PrintStatus(sess, tmp); + + // SOCKS5 connection + s = Socks5Connect(c, &w, additional_connect, (bool *)cancel_flag, hWnd, 0, &ret_ip); if (s == NULL) { // Connection failure @@ -6426,7 +6161,8 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) // Keep a note of the IP address if (additional_connect == false || IsZeroIP(&s->RemoteIP)) { - if (((s->IsRUDPSocket || s->IPv6) && IsZeroIP(&s->RemoteIP) == false && o->ProxyType == PROXY_DIRECT) || GetIP(&c->Session->ServerIP, host_for_direct_connection) == false) + char *hostname = o->ProxyType == PROXY_DIRECT ? w.HostName : w.ProxyHostName; + if (((s->IsRUDPSocket || s->IPv6) && IsZeroIP(&s->RemoteIP) == false && o->ProxyType == PROXY_DIRECT) || GetIP(&c->Session->ServerIP, hostname) == false) { Copy(&c->Session->ServerIP, &s->RemoteIP, sizeof(IP)); } @@ -6449,23 +6185,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) return s; } -// Connect via SOCKS -SOCK *SocksConnect(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, bool additional_connect) -{ - return SocksConnectEx(c, proxy_host_name, proxy_port, - server_host_name, server_port, username, additional_connect, NULL, NULL); -} -SOCK *SocksConnectEx(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, bool additional_connect, - bool *cancel_flag, void *hWnd) -{ - return SocksConnectEx2(c, proxy_host_name, proxy_port, - server_host_name, server_port, username, additional_connect, cancel_flag, - hWnd, 0, NULL); -} +// Connect via SOCKS4 SOCK *SocksConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, bool additional_connect, @@ -6547,11 +6267,10 @@ SOCK *SocksConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, return s; } -// Receive a SOCKS response packet +// Receive a SOCKS4 response packet bool SocksRecvResponsePacket(CONNECTION *c, SOCK *s) { BUF *b; - UINT size = 8; UCHAR tmp[8]; UCHAR vn, cd; // Validate arguments @@ -6599,7 +6318,7 @@ bool SocksRecvResponsePacket(CONNECTION *c, SOCK *s) } } -// Send a SOCKS request packet +// Send a SOCKS4 request packet bool SocksSendRequestPacket(CONNECTION *c, SOCK *s, UINT dest_port, IP *dest_ip, char *userid) { BUF *b; @@ -6639,27 +6358,342 @@ bool SocksSendRequestPacket(CONNECTION *c, SOCK *s, UINT dest_port, IP *dest_ip, return ret; } +// Connect via SOCKS5 (RFC1928) +SOCK *Socks5Connect(CONNECTION *c, WPC_CONNECT *w, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout, IP *ret_ip) +{ + UCHAR tmp, recv_buf[2], *recv_buf_final; + USHORT port; + bool ret; + SOCK *s; + BUF *b; + IP ip; + // Validate arguments + if (c == NULL || w == NULL || w->Port == 0 || w->ProxyPort == 0 || IsEmptyStr(w->HostName) || IsEmptyStr(w->ProxyHostName)) + { + if (c != NULL) + { + c->Err = ERR_PROXY_CONNECT_FAILED; + } + return NULL; + } + + if (c->Halt) + { + // Stop + c->Err = ERR_USER_CANCEL; + return NULL; + } + + // Open TCP connection to the proxy server + s = TcpConnectEx3(w->ProxyHostName, w->ProxyPort, timeout, cancel_flag, hWnd, true, NULL, false, ret_ip); + if (s == NULL) + { + // Failure + c->Err = ERR_PROXY_CONNECT_FAILED; + return NULL; + } + + // Set the timeout setting + SetTimeout(s, MIN(CONNECTING_TIMEOUT_PROXY, (timeout == 0 ? INFINITE : timeout))); + + if (additional_connect == false) + { + c->FirstSock = s; + } + + // +----+----------+----------+ + // |VER | NMETHODS | METHODS | + // +----+----------+----------+ + // | 1 | 1 | 1 to 255 | + // +----+----------+----------+ + // + // X'00' NO AUTHENTICATION REQUIRED + // X'01' GSSAPI + // X'02' USERNAME/PASSWORD + // X'03' to X'7F' IANA ASSIGNED + // X'80' to X'FE' RESERVED FOR PRIVATE METHODS + // X'FF' NO ACCEPTABLE METHOD + + b = NewBuf(); + tmp = 5; + WriteBuf(b, &tmp, sizeof(tmp)); // SOCKS version + tmp = 2; + WriteBuf(b, &tmp, sizeof(tmp)); // Number of supported methods + tmp = 0; + WriteBuf(b, &tmp, sizeof(tmp)); // No authentication + tmp = 2; + WriteBuf(b, &tmp, sizeof(tmp)); // Username/password + + ret = SendAll(s, b->Buf, b->Size, false); + FreeBuf(b); + + if (ret == false) + { + Debug("Socks5Connect(): [Phase 1] Failed to send initial data to the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + // +----+--------+ + // |VER | METHOD | + // +----+--------+ + // | 1 | 1 | + // +----+--------+ + + if (RecvAll(s, recv_buf, sizeof(recv_buf), false) == false) + { + Debug("Socks5Connect(): [Phase 1] Failed to receive initial data response from the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + if (recv_buf[0] != 5) + { + Debug("Socks5Connect(): [Phase 1] Unmatching version: %u.\n", recv_buf[0]); + c->Err = ERR_PROXY_ERROR; + goto failure; + } + + // Username/password authentication (RFC1929) + if (recv_buf[1] == 2) + { + // +----+------+----------+------+----------+ + // |VER | ULEN | UNAME | PLEN | PASSWD | + // +----+------+----------+------+----------+ + // | 1 | 1 | 1 to 255 | 1 | 1 to 255 | + // +----+------+----------+------+----------+ + + b = NewBuf(); + tmp = 1; + WriteBuf(b, &tmp, sizeof(tmp)); // Authentication protocol version + tmp = StrLen(w->ProxyUsername); + WriteBuf(b, &tmp, sizeof(tmp)); // Username length + WriteBuf(b, w->ProxyUsername, tmp); // Username + tmp = StrLen(w->ProxyPassword); + WriteBuf(b, &tmp, sizeof(tmp)); // Password length + WriteBuf(b, w->ProxyPassword, tmp); // Password + + ret = SendAll(s, b->Buf, b->Size, false); + FreeBuf(b); + + if (ret == false) + { + Debug("Socks5Connect(): [Phase 1] Failed to send authentication data to the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + // +----+--------+ + // |VER | STATUS | + // +----+--------+ + // | 1 | 1 | + // +----+--------+ + + if (RecvAll(s, recv_buf, sizeof(recv_buf), false) == false) + { + Debug("Socks5Connect(): [Phase 1] Failed to receive authentication data response from the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + if (recv_buf[1] != 0) + { + Debug("Socks5Connect(): [Phase 1] Authentication failure error code sent by the server: %u.\n", recv_buf[1]); + c->Err = ERR_PROXY_AUTH_FAILED; + goto failure; + } + } + + // +----+-----+-------+------+----------+----------+ + // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT | + // +----+-----+-------+------+----------+----------+ + // | 1 | 1 | X'00' | 1 | Variable | 2 | + // +----+-----+-------+------+----------+----------+ + // + // VER protocol version: X'05' + // CMD + // CONNECT X'01' + // BIND X'02' + // UDP ASSOCIATE X'03' + // RSV RESERVED + // ATYP address type of following address + // IP V4 address X'01' + // DOMAINNAME X'03' + // IP V6 address X'04' + // DST.ADDR desired destination address + // DST.PORT desired destination port in network octet order + + // Prepare data to send + b = NewBuf(); + tmp = 5; + WriteBuf(b, &tmp, sizeof(tmp)); // SOCKS version + tmp = 1; + WriteBuf(b, &tmp, sizeof(tmp)); // Command + tmp = 0; + WriteBuf(b, &tmp, sizeof(tmp)); // Reserved byte + + // Convert the hostname to an IP structure (if it's an IP address) + StrToIP(&ip, w->HostName); + + // If the IP structure doesn't contain an IP address, it means that the string is an hostname + if (IsZeroIp(&ip)) + { + UCHAR dest_length = StrLen(w->HostName); + tmp = 3; + WriteBuf(b, &tmp, sizeof(tmp)); // Destination type (hostname) + WriteBuf(b, &dest_length, sizeof(dest_length)); // Destination hostname length + WriteBuf(b, w->HostName, dest_length); // Destination hostname + } + else + { + if (IsIP6(&ip)) + { + tmp = 4; + WriteBuf(b, &tmp, sizeof(tmp)); // Destination type (IPv6) + WriteBuf(b, ip.ipv6_addr, sizeof(ip.ipv6_addr)); // Destination IPv6 address + } + else + { + tmp = 1; + WriteBuf(b, &tmp, sizeof(tmp)); // Destination type (IPv4) + WriteBuf(b, ip.addr, sizeof(ip.addr)); // Destination IPv4 address + } + } + + // Convert the port in network octet order + port = Endian16((USHORT)w->Port); + WriteBuf(b, &port, sizeof(port)); // Destination port + + // Send data + ret = SendAll(s, b->Buf, b->Size, false); + FreeBuf(b); + + if (ret == false) + { + Debug("Socks5Connect(): [Phase 2] Failed to send data to the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + // +----+-----+-------+------+----------+----------+ + // |VER | REP | RSV | ATYP | BND.ADDR | BND.PORT | + // +----+-----+-------+------+----------+----------+ + // | 1 | 1 | X’00’ | 1 | Variable | 2 | + // +----+-----+-------+------+----------+----------+ + // + // VER protocol version: X’05’ + // REP Reply field: + // X’00’ succeeded + // X’01’ general SOCKS server failure + // X’02’ connection not allowed by ruleset + // X’03’ Network unreachable + // X’04’ Host unreachable + // X’05’ Connection refused + // X’06’ TTL expired + // X’07’ Command not supported + // X’08’ Address type not supported + // X’09’ to X’FF’ unassigned + + // The packet sent by the server should always have the same size as the one we sent to it. + // However, there are some implementations which send fixed values (aside from the first 2 bytes). + // In order to support such implementations, we read the first 4 bytes in order to know the address type before trying to read the rest of the packet. + recv_buf_final = Malloc(4); + + if (RecvAll(s, recv_buf_final, 4, false) == false) + { + Free(recv_buf_final); + Debug("Socks5Connect(): [Phase 2] Failed to receive response from the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + // We only need the first two bytes (version and response code), but we have to read the entire packet from the socket + recv_buf[0] = recv_buf_final[0]; + recv_buf[1] = recv_buf_final[1]; + + // We receive the rest of the packet by knowing the size according to the address type + switch (recv_buf_final[3]) + { + case 1: + // IPv4 + recv_buf_final = ReAlloc(recv_buf_final, 6); // 4 bytes (IPv4) + 2 bytes (port) + ret = RecvAll(s, recv_buf_final, 6, false); + break; + case 4: + // IPv6 + recv_buf_final = ReAlloc(recv_buf_final, 18); // 4 bytes (IPv4) + 2 bytes (port) + ret = RecvAll(s, recv_buf_final, 18, false); + break; + case 3: + // Hostname + ret = RecvAll(s, &tmp, 1, false); + if (ret == true) + { + recv_buf_final = ReAlloc(recv_buf_final, tmp + 2); // Hostname length + 2 bytes (port) + ret = RecvAll(s, recv_buf_final, tmp + 2, false); + } + } + + Free(recv_buf_final); + + if (ret == false) + { + Debug("Socks5Connect(): [Phase 2] Malformed response received from the server.\n"); + c->Err = ERR_DISCONNECTED; + goto failure; + } + + if (recv_buf[0] != 5) + { + Debug("Socks5Connect(): [Phase 2] Unmatching version: %u.\n", recv_buf_final[0]); + c->Err = ERR_PROXY_ERROR; + goto failure; + } + + if (recv_buf[1] == 0) + { + // Success + SetTimeout(s, INFINITE); + return s; + } + else + { + Debug("Socks5Connect(): [Phase 2] Connection failed with error: %u\n", recv_buf[1]); + c->Err = ERR_PROXY_ERROR; + } + +failure: + if (additional_connect == false) + { + c->FirstSock = NULL; + } + + Disconnect(s); + ReleaseSock(s); + return NULL; +} + // Connect through a proxy -SOCK *ProxyConnect(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, char *password, bool additional_connect) -{ - return ProxyConnectEx(c, proxy_host_name, proxy_port, - server_host_name, server_port, username, password, additional_connect, NULL, NULL); -} -SOCK *ProxyConnectEx(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, char *password, bool additional_connect, - bool *cancel_flag, void *hWnd) -{ - return ProxyConnectEx2(c, proxy_host_name, proxy_port, - server_host_name, server_port, username, password, additional_connect, - cancel_flag, hWnd, 0); -} SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, char *password, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout) +{ + WPC_CONNECT wpc_connect; + Zero(&wpc_connect, sizeof(wpc_connect)); + + StrCpy(wpc_connect.ProxyHostName, sizeof(wpc_connect.ProxyHostName), proxy_host_name); + wpc_connect.ProxyPort = proxy_port; + StrCpy(wpc_connect.HostName, sizeof(wpc_connect.HostName), server_host_name); + wpc_connect.Port = server_port; + StrCpy(wpc_connect.ProxyUsername, sizeof(wpc_connect.ProxyUsername), username); + StrCpy(wpc_connect.ProxyPassword, sizeof(wpc_connect.ProxyPassword), password); + + return ProxyConnectEx3(c, &wpc_connect, additional_connect, cancel_flag, hWnd, timeout); +} +SOCK *ProxyConnectEx3(CONNECTION *c, WPC_CONNECT *wpc_connect, + bool additional_connect, bool *cancel_flag, void *hWnd, + UINT timeout) { SOCK *s = NULL; bool use_auth = false; @@ -6671,17 +6705,16 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char server_host_name_tmp[256]; UINT i, len; // Validate arguments - if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL || - server_port == 0) + if (c == NULL || IsEmptyStr(wpc_connect->ProxyHostName) || wpc_connect->ProxyPort == 0 || IsEmptyStr(wpc_connect->HostName) || wpc_connect->Port == 0) { - if( c != NULL) + if (c != NULL) { c->Err = ERR_PROXY_CONNECT_FAILED; } return NULL; } - if (username != NULL && password != NULL && - (StrLen(username) != 0 || StrLen(password) != 0)) + + if ((IsEmptyStr(wpc_connect->ProxyUsername) || IsEmptyStr(wpc_connect->ProxyPassword)) == false) { use_auth = true; } @@ -6694,7 +6727,7 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, } Zero(server_host_name_tmp, sizeof(server_host_name_tmp)); - StrCpy(server_host_name_tmp, sizeof(server_host_name_tmp), server_host_name); + StrCpy(server_host_name_tmp, sizeof(server_host_name_tmp), wpc_connect->HostName); len = StrLen(server_host_name_tmp); @@ -6707,7 +6740,7 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, } // Connection - s = TcpConnectEx3(proxy_host_name, proxy_port, timeout, cancel_flag, hWnd, true, NULL, false, NULL); + s = TcpConnectEx3(wpc_connect->ProxyHostName, wpc_connect->ProxyPort, timeout, cancel_flag, hWnd, true, NULL, false, NULL); if (s == NULL) { // Failure @@ -6732,27 +6765,61 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, StrToIP(&ip, server_host_name_tmp); IPToStr(iptmp, sizeof(iptmp), &ip); - Format(tmp, sizeof(tmp), "[%s]:%u", iptmp, server_port); + Format(tmp, sizeof(tmp), "[%s]:%u", iptmp, wpc_connect->Port); } else { - Format(tmp, sizeof(tmp), "%s:%u", server_host_name_tmp, server_port); + Format(tmp, sizeof(tmp), "%s:%u", server_host_name_tmp, wpc_connect->Port); } h = NewHttpHeader("CONNECT", tmp, "HTTP/1.0"); - AddHttpValue(h, NewHttpValue("User-Agent", (c->Cedar == NULL ? DEFAULT_USER_AGENT : c->Cedar->HttpUserAgent))); - AddHttpValue(h, NewHttpValue("Host", server_host_name_tmp)); - AddHttpValue(h, NewHttpValue("Content-Length", "0")); - AddHttpValue(h, NewHttpValue("Proxy-Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Pragma", "no-cache")); - if (use_auth) + if (IsEmptyStr(wpc_connect->CustomHttpHeader) == false) + { + TOKEN_LIST *tokens = ParseToken(wpc_connect->CustomHttpHeader, "\r\n"); + if (tokens != NULL) + { + for (i = 0; i < tokens->NumTokens; i++) + { + AddHttpValueStr(h, tokens->Token[i]); + } + + FreeToken(tokens); + } + } + + if (GetHttpValue(h, "User-Agent") == NULL) + { + AddHttpValue(h, NewHttpValue("User-Agent", (c->Cedar == NULL ? DEFAULT_USER_AGENT : c->Cedar->HttpUserAgent))); + } + + if (GetHttpValue(h, "Host") == NULL) + { + AddHttpValue(h, NewHttpValue("Host", server_host_name_tmp)); + } + + if (GetHttpValue(h, "Content-Length") == NULL) + { + AddHttpValue(h, NewHttpValue("Content-Length", "0")); + } + + if (GetHttpValue(h, "Proxy-Connection") == NULL) + { + AddHttpValue(h, NewHttpValue("Proxy-Connection", "Keep-Alive")); + } + + if (GetHttpValue(h, "Pragma") == NULL) + { + AddHttpValue(h, NewHttpValue("Pragma", "no-cache")); + } + + if (use_auth && GetHttpValue(h, "Proxy-Authorization") == NULL) { wchar_t tmp[MAX_SIZE]; UniFormat(tmp, sizeof(tmp), _UU("STATUS_3"), server_host_name_tmp); // Generate the authentication string Format(auth_tmp_str, sizeof(auth_tmp_str), "%s:%s", - username, password); + wpc_connect->ProxyUsername, wpc_connect->ProxyPassword); // Base64 encode Zero(auth_b64_str, sizeof(auth_b64_str)); @@ -6857,10 +6924,6 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, } // TCP connection function -SOCK *TcpConnectEx2(char *hostname, UINT port, UINT timeout, bool *cancel_flag, void *hWnd, bool try_start_ssl) -{ - return TcpConnectEx3(hostname, port, timeout, cancel_flag, hWnd, false, NULL, try_start_ssl, NULL); -} SOCK *TcpConnectEx3(char *hostname, UINT port, UINT timeout, bool *cancel_flag, void *hWnd, bool no_nat_t, UINT *nat_t_error_code, bool try_start_ssl, IP *ret_ip) { #ifdef OS_WIN32 @@ -6878,10 +6941,6 @@ SOCK *TcpConnectEx3(char *hostname, UINT port, UINT timeout, bool *cancel_flag, } // Connect with TCP/IP -SOCK *TcpIpConnect(char *hostname, UINT port, bool try_start_ssl) -{ - return TcpIpConnectEx(hostname, port, NULL, NULL, NULL, false, try_start_ssl, NULL); -} SOCK *TcpIpConnectEx(char *hostname, UINT port, bool *cancel_flag, void *hWnd, UINT *nat_t_error_code, bool no_nat_t, bool try_start_ssl, IP *ret_ip) { SOCK *s = NULL; @@ -7092,10 +7151,10 @@ PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x) { if (x->subject_name == NULL) { + FreePack(p); return NULL; } - wcstombs(cn_username, x->subject_name->CommonName, 127); - cn_username[127] = '\0'; + UniToStr(cn_username, sizeof(cn_username), x->subject_name->CommonName); PackAddStr(p, "username", cn_username); } else diff --git a/src/Cedar/Protocol.h b/src/Cedar/Protocol.h index 2fd47973..fabc0887 100644 --- a/src/Cedar/Protocol.h +++ b/src/Cedar/Protocol.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Protocol.h @@ -217,7 +111,6 @@ UINT64 ShortStrToDate64(char *str); bool ServerAccept(CONNECTION *c); bool ClientConnect(CONNECTION *c); SOCK *ClientConnectToServer(CONNECTION *c); -SOCK *TcpIpConnect(char *hostname, UINT port, bool try_start_ssl); SOCK *TcpIpConnectEx(char *hostname, UINT port, bool *cancel_flag, void *hWnd, UINT *nat_t_error_code, bool no_nat_t, bool try_start_ssl, IP *ret_ip); bool ClientUploadSignature(SOCK *s); bool ClientDownloadHello(CONNECTION *c, SOCK *s); @@ -225,7 +118,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str); bool ServerUploadHello(CONNECTION *c); bool ClientUploadAuth(CONNECTION *c); SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect); -SOCK *TcpConnectEx2(char *hostname, UINT port, UINT timeout, bool *cancel_flag, void *hWnd, bool try_start_ssl); SOCK *TcpConnectEx3(char *hostname, UINT port, UINT timeout, bool *cancel_flag, void *hWnd, bool no_nat_t, UINT *nat_t_error_code, bool try_start_ssl, IP *ret_ip); void InitProtocol(); @@ -259,30 +151,20 @@ SOCK *ClientAdditionalConnectToServer(CONNECTION *c); bool ClientUploadAuth2(CONNECTION *c, SOCK *s); bool GetSessionKeyFromPack(PACK *p, UCHAR *session_key, UINT *session_key_32); -SOCK *ProxyConnect(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, char *password, bool additional_connect); -SOCK *ProxyConnectEx(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, char *password, bool additional_connect, - bool *cancel_flag, void *hWnd); SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, char *password, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout); -SOCK *SocksConnect(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, bool additional_connect); -SOCK *SocksConnectEx(CONNECTION *c, char *proxy_host_name, UINT proxy_port, - char *server_host_name, UINT server_port, - char *username, bool additional_connect, - bool *cancel_flag, void *hWnd); +SOCK *ProxyConnectEx3(CONNECTION *c, WPC_CONNECT *wpc_connect, + bool additional_connect, bool *cancel_flag, void *hWnd, + UINT timeout); SOCK *SocksConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout, IP *ret_ip); bool SocksSendRequestPacket(CONNECTION *c, SOCK *s, UINT dest_port, IP *dest_ip, char *userid); bool SocksRecvResponsePacket(CONNECTION *c, SOCK *s); +SOCK *Socks5Connect(CONNECTION *c, WPC_CONNECT *w, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout, IP *ret_ip); void CreateNodeInfo(NODE_INFO *info, CONNECTION *c); UINT SecureSign(SECURE_SIGN *sign, UINT device_id, char *pin); void ClientUploadNoop(CONNECTION *c); @@ -290,9 +172,6 @@ bool ClientCheckServerCert(CONNECTION *c, bool *expired); void ClientCheckServerCertThread(THREAD *thread, void *param); bool ClientSecureSign(CONNECTION *c, UCHAR *sign, UCHAR *random, X **x); void ClientSecureSignThread(THREAD *thread, void *param); -UINT SecureWrite(UINT device_id, char *cert_name, X *x, char *key_name, K *k, char *pin); -UINT SecureEnum(UINT device_id, char *pin, TOKEN_LIST **cert_list, TOKEN_LIST **key_list); -UINT SecureDelete(UINT device_id, char *pin, char *cert_name, char *key_name); TOKEN_LIST *EnumHub(SESSION *s); UINT ChangePasswordAccept(CONNECTION *c, PACK *p); UINT ChangePassword(CEDAR *cedar, CLIENT_OPTION *o, char *hubname, char *username, char *old_pass, char *new_pass); @@ -312,5 +191,4 @@ bool TryGetRootCertChain(LIST *o, X *x, bool auto_save, X **found_root_x); bool TryGetParentCertFromCertList(LIST *o, X *x, LIST *found_chain); bool DownloadAndSaveIntermediateCertificatesIfNecessary(X *x); - #endif // PROTOCOL_H diff --git a/src/Cedar/Radius.c b/src/Cedar/Radius.c index 2b269c76..864e3a0e 100644 --- a/src/Cedar/Radius.c +++ b/src/Cedar/Radius.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Radius.c @@ -323,11 +217,11 @@ bool SendPeapRawPacket(EAP_CLIENT *e, UCHAR *peap_data, UINT peap_size) fragments = NewListFast(NULL); for (num = 0;;num++) { - UCHAR tmp[1024]; + UCHAR tmp[200]; EAP_PEAP *send_peap_message; UINT sz; - sz = ReadBuf(buf, tmp, 1024); + sz = ReadBuf(buf, tmp, 200); if (sz == 0) { @@ -699,6 +593,11 @@ void EapSetRadiusGeneralAttributes(RADIUS_PACKET *r, EAP_CLIENT *e) Add(r->AvpList, NewRadiusAvp(RADIUS_ATTRIBUTE_NAS_ID, 0, 0, CEDAR_SERVER_STR, StrLen(CEDAR_SERVER_STR))); + if (IsEmptyStr(e->In_VpnProtocolState) == false) + { + Add(r->AvpList, NewRadiusAvp(RADIUS_ATTRIBUTE_PROXY_STATE, 0, 0, e->In_VpnProtocolState, StrLen(e->In_VpnProtocolState))); + } + ui = Endian32(2); Add(r->AvpList, NewRadiusAvp(RADIUS_ATTRIBUTE_VENDOR_SPECIFIC, RADIUS_VENDOR_MICROSOFT, RADIUS_MS_NETWORK_ACCESS_SERVER_TYPE, &ui, sizeof(UINT))); @@ -1020,11 +919,27 @@ RADIUS_PACKET *EapSendPacketAndRecvResponse(EAP_CLIENT *e, RADIUS_PACKET *r) { RADIUS_AVP *eap_msg = GetRadiusAvp(rp, RADIUS_ATTRIBUTE_EAP_MESSAGE); RADIUS_AVP *vlan_avp = GetRadiusAvp(rp, RADIUS_ATTRIBUTE_VLAN_ID); + RADIUS_AVP *framed_interface_id_avp = GetRadiusAvp(rp, RADIUS_ATTRIBUTE_FRAMED_INTERFACE_ID); if (eap_msg != NULL) { e->LastRecvEapId = ((EAP_MESSAGE *)(eap_msg->Data))->Id; } + if (framed_interface_id_avp != NULL) + { + // FRAMED_INTERFACE_ID + char tmp_str[64]; + UCHAR mac_address[6]; + + Zero(tmp_str, sizeof(tmp_str)); + Copy(tmp_str, framed_interface_id_avp->Data, MIN(framed_interface_id_avp->DataSize, sizeof(tmp_str) - 1)); + + if (StrToMac(mac_address, tmp_str)) + { + Copy(e->LastRecvVirtualMacAddress, mac_address, 6); + } + } + if (vlan_avp != NULL) { // VLAN ID @@ -1748,6 +1663,11 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec // Try the EAP authentication for RADIUS first EAP_CLIENT *eap = mschap.MsChapV2_EapClient; + if (IsEmptyStr(opt->In_VpnProtocolState) == false) + { + StrCpy(eap->In_VpnProtocolState, sizeof(eap->In_VpnProtocolState), opt->In_VpnProtocolState); + } + if (eap->PeapMode == false) { ret = EapClientSendMsChapv2AuthClientResponse(eap, mschap.MsChapV2_ClientResponse, @@ -1768,6 +1688,8 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec opt->Out_VLanId = eap->LastRecvVLanId; } + Copy(opt->Out_VirtualMacAddress, eap->LastRecvVirtualMacAddress, 6); + return true; } else @@ -1882,31 +1804,31 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec // Service-Type ui = Endian32(2); - RadiusAddValue(p, 6, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_SERVICE_TYPE, 0, 0, &ui, sizeof(ui)); // NAS-Port-Type ui = Endian32(5); - RadiusAddValue(p, 61, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_NAS_PORT_TYPE, 0, 0, &ui, sizeof(ui)); // Tunnel-Type ui = Endian32(1); - RadiusAddValue(p, 64, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_TUNNEL_TYPE, 0, 0, &ui, sizeof(ui)); // Tunnel-Medium-Type ui = Endian32(1); - RadiusAddValue(p, 65, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_TUNNEL_MEDIUM_TYPE, 0, 0, &ui, sizeof(ui)); // Called-Station-ID - VPN Hub Name if (IsEmptyStr(hubname) == false) { - RadiusAddValue(p, 30, 0, 0, hubname, StrLen(hubname)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_CALLED_STATION_ID, 0, 0, hubname, StrLen(hubname)); } // Calling-Station-Id - RadiusAddValue(p, 31, 0, 0, client_ip_str, StrLen(client_ip_str)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_CALLING_STATION_ID, 0, 0, client_ip_str, StrLen(client_ip_str)); // Tunnel-Client-Endpoint - RadiusAddValue(p, 66, 0, 0, client_ip_str, StrLen(client_ip_str)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_TUNNEL_CLIENT_ENDPOINT, 0, 0, client_ip_str, StrLen(client_ip_str)); } else { @@ -1920,69 +1842,74 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec // Acct-Session-Id us = Endian16(session_id % 254 + 1); session_id++; - RadiusAddValue(p, 44, 0, 0, &us, sizeof(us)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_ACCT_SESSION_ID, 0, 0, &us, sizeof(us)); // NAS-IP-Address if (c != NULL && c->FirstSock != NULL && c->FirstSock->IPv6 == false) { ui = IPToUINT(&c->FirstSock->LocalIP); - RadiusAddValue(p, 4, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_NAS_IP, 0, 0, &ui, sizeof(ui)); } // Service-Type ui = Endian32(2); - RadiusAddValue(p, 6, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_SERVICE_TYPE, 0, 0, &ui, sizeof(ui)); // MS-RAS-Vendor - ui = Endian32(311); - RadiusAddValue(p, 26, 311, 9, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_VENDOR_SPECIFIC, RADIUS_VENDOR_MICROSOFT, RADIUS_MS_VERSION, ms_ras_version, StrLen(ms_ras_version)); // MS-RAS-Version RadiusAddValue(p, 26, 311, 18, ms_ras_version, StrLen(ms_ras_version)); // NAS-Port-Type ui = Endian32(5); - RadiusAddValue(p, 61, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_NAS_PORT_TYPE, 0, 0, &ui, sizeof(ui)); // Tunnel-Type ui = Endian32(1); - RadiusAddValue(p, 64, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_TUNNEL_TYPE, 0, 0, &ui, sizeof(ui)); // Tunnel-Medium-Type ui = Endian32(1); - RadiusAddValue(p, 65, 0, 0, &ui, sizeof(ui)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_TUNNEL_MEDIUM_TYPE, 0, 0, &ui, sizeof(ui)); // Called-Station-ID - VPN Hub Name if (IsEmptyStr(hubname) == false) { - RadiusAddValue(p, 30, 0, 0, hubname, StrLen(hubname)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_CALLED_STATION_ID, 0, 0, hubname, StrLen(hubname)); } // Calling-Station-Id - RadiusAddValue(p, 31, 0, 0, client_ip_str, StrLen(client_ip_str)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_CALLING_STATION_ID, 0, 0, client_ip_str, StrLen(client_ip_str)); // Tunnel-Client-Endpoint - RadiusAddValue(p, 66, 0, 0, client_ip_str, StrLen(client_ip_str)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_TUNNEL_CLIENT_ENDPOINT, 0, 0, client_ip_str, StrLen(client_ip_str)); // MS-RAS-Client-Version - RadiusAddValue(p, 26, 311, 35, ms_ras_version, StrLen(ms_ras_version)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_VENDOR_SPECIFIC, RADIUS_VENDOR_MICROSOFT, RADIUS_MS_RAS_CLIENT_VERSION, ms_ras_version, StrLen(ms_ras_version)); // MS-RAS-Client-Name - RadiusAddValue(p, 26, 311, 34, client_ip_str, StrLen(client_ip_str)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_VENDOR_SPECIFIC, RADIUS_VENDOR_MICROSOFT, RADIUS_MS_RAS_CLIENT_NAME, client_ip_str, StrLen(client_ip_str)); // MS-CHAP-Challenge - RadiusAddValue(p, 26, 311, 11, mschap.MsChapV2_ServerChallenge, sizeof(mschap.MsChapV2_ServerChallenge)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_VENDOR_SPECIFIC, RADIUS_VENDOR_MICROSOFT, RADIUS_MS_CHAP_CHALLENGE, mschap.MsChapV2_ServerChallenge, sizeof(mschap.MsChapV2_ServerChallenge)); // MS-CHAP2-Response Zero(ms_chapv2_response, sizeof(ms_chapv2_response)); Copy(ms_chapv2_response + 2, mschap.MsChapV2_ClientChallenge, 16); Copy(ms_chapv2_response + 2 + 16 + 8, mschap.MsChapV2_ClientResponse, 24); - RadiusAddValue(p, 26, 311, 25, ms_chapv2_response, sizeof(ms_chapv2_response)); + RadiusAddValue(p, RADIUS_ATTRIBUTE_VENDOR_SPECIFIC, RADIUS_VENDOR_MICROSOFT, RADIUS_MS_CHAP2_RESPONSE, ms_chapv2_response, sizeof(ms_chapv2_response)); // NAS-ID WriteBuf(p, nas_id->Buf, nas_id->Size); } + if (IsEmptyStr(opt->In_VpnProtocolState) == false) + { + // Proxy state as protocol details + RadiusAddValue(p, RADIUS_ATTRIBUTE_PROXY_STATE, 0, 0, opt->In_VpnProtocolState, StrLen(opt->In_VpnProtocolState)); + } + SeekBuf(p, 0, 0); WRITE_USHORT(((UCHAR *)p->Buf) + 2, (USHORT)p->Size); @@ -2073,6 +2000,9 @@ RECV_RETRY: // Success if (recv_buf[0] == 2) { + LIST *o; + BUF *buf = NewBufFromMemory(recv_buf, recv_size); + ret = true; if (is_mschap && mschap_v2_server_response_20 != NULL) @@ -2110,12 +2040,26 @@ RECV_RETRY: } } - if (opt->In_CheckVLanId) + o = RadiusParseOptions(buf); + if (o != NULL) { - BUF *buf = NewBufFromMemory(recv_buf, recv_size); - LIST *o = RadiusParseOptions(buf); + DHCP_OPTION *framed_interface_id_option = GetDhcpOption(o, RADIUS_ATTRIBUTE_FRAMED_INTERFACE_ID); - if (o != NULL) + if (framed_interface_id_option != NULL) + { + char tmp_str[64]; + UCHAR mac_address[6]; + + Zero(tmp_str, sizeof(tmp_str)); + Copy(tmp_str, framed_interface_id_option->Data, MIN(framed_interface_id_option->Size, sizeof(tmp_str) - 1)); + + if (StrToMac(mac_address, tmp_str)) + { + Copy(opt->Out_VirtualMacAddress, mac_address, 6); + } + } + + if (opt->In_CheckVLanId) { DHCP_OPTION *vlan_option = GetDhcpOption(o, RADIUS_ATTRIBUTE_VLAN_ID); @@ -2134,9 +2078,10 @@ RECV_RETRY: } } - FreeBuf(buf); FreeDhcpOptions(o); } + + FreeBuf(buf); } break; } diff --git a/src/Cedar/Radius.h b/src/Cedar/Radius.h index eaae6c38..fb077c31 100644 --- a/src/Cedar/Radius.h +++ b/src/Cedar/Radius.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Radius.h @@ -142,6 +36,7 @@ #define RADIUS_ATTRIBUTE_EAP_MESSAGE 79 #define RADIUS_ATTRIBUTE_EAP_AUTHENTICATOR 80 #define RADIUS_ATTRIBUTE_VLAN_ID 81 +#define RADIUS_ATTRIBUTE_FRAMED_INTERFACE_ID 96 #define RADIUS_MAX_NAS_ID_LEN 253 // RADIUS codes @@ -336,6 +231,9 @@ struct EAP_CLIENT UCHAR RecvLastCode; UINT LastRecvVLanId; + UCHAR LastRecvVirtualMacAddress[6]; + + char In_VpnProtocolState[64]; }; void FreeRadiusPacket(RADIUS_PACKET *p); @@ -374,6 +272,8 @@ struct RADIUS_LOGIN_OPTION UINT Out_VLanId; bool Out_IsRadiusLogin; char NasId[RADIUS_MAX_NAS_ID_LEN + 1]; // NAS-Identifier + char Out_VirtualMacAddress[6]; + char In_VpnProtocolState[64]; }; // Function prototype diff --git a/src/Cedar/Remote.c b/src/Cedar/Remote.c index 85189dfd..742c83c3 100644 --- a/src/Cedar/Remote.c +++ b/src/Cedar/Remote.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Remote.c @@ -121,6 +15,10 @@ void EndRpc(RPC *rpc) // Release the RPC void RpcFree(RPC *rpc) +{ + RpcFreeEx(rpc, false); +} +void RpcFreeEx(RPC *rpc, bool no_disconnect) { // Validate arguments if (rpc == NULL) @@ -128,7 +26,11 @@ void RpcFree(RPC *rpc) return; } - Disconnect(rpc->Sock); + if (no_disconnect == false) + { + Disconnect(rpc->Sock); + } + ReleaseSock(rpc->Sock); DeleteLock(rpc->Lock); diff --git a/src/Cedar/Remote.h b/src/Cedar/Remote.h index 819c7502..49de5056 100644 --- a/src/Cedar/Remote.h +++ b/src/Cedar/Remote.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Remote.h @@ -148,6 +42,7 @@ bool RpcIsOk(PACK *p); UINT RpcGetError(PACK *p); void EndRpc(RPC *rpc); void RpcFree(RPC *rpc); +void RpcFreeEx(RPC *rpc, bool no_disconnect); #endif // REMOTE_H diff --git a/src/Cedar/SM.c b/src/Cedar/SM.c index 7e7fafe6..7276f289 100644 --- a/src/Cedar/SM.c +++ b/src/Cedar/SM.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SM.c @@ -160,6 +54,7 @@ void SmProxyDlgInit(HWND hWnd, INTERNET_SETTING *t) Check(hWnd, R_DIRECT_TCP, t->ProxyType == PROXY_DIRECT); Check(hWnd, R_HTTPS, t->ProxyType == PROXY_HTTP); Check(hWnd, R_SOCKS, t->ProxyType == PROXY_SOCKS); + Check(hWnd, R_SOCKS5, t->ProxyType == PROXY_SOCKS5); SmProxyDlgUpdate(hWnd, t); } @@ -226,6 +121,10 @@ UINT SmProxyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) { t->ProxyType = PROXY_SOCKS; } + else if (IsChecked(hWnd, R_SOCKS5)) + { + t->ProxyType = PROXY_SOCKS5; + } else { t->ProxyType = PROXY_DIRECT; @@ -242,6 +141,7 @@ UINT SmProxyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) a.ProxyPort = t->ProxyPort; StrCpy(a.ProxyUsername, sizeof(a.ProxyUsername), t->ProxyUsername); StrCpy(a.ProxyPassword, sizeof(a.ProxyPassword), t->ProxyPassword); + StrCpy(a.CustomHttpHeader, sizeof(a.CustomHttpHeader), t->CustomHttpHeader); if (CmProxyDlg(hWnd, &a)) { @@ -250,6 +150,7 @@ UINT SmProxyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) t->ProxyPort = a.ProxyPort; StrCpy(t->ProxyUsername, sizeof(t->ProxyUsername), a.ProxyUsername); StrCpy(t->ProxyPassword, sizeof(t->ProxyPassword), a.ProxyPassword); + StrCpy(t->CustomHttpHeader, sizeof(t->CustomHttpHeader), a.CustomHttpHeader); } SmProxyDlgUpdate(hWnd, t); @@ -17011,23 +16912,34 @@ void SmSslDlgInit(HWND hWnd, SM_SSL *s) return; } - // Set the encryption algorithm list - cipher_list = GetCipherList(); - SetFont(hWnd, C_CIPHER, GetFont("Tahoma", 8, false, false, false, false)); - CbSetHeight(hWnd, C_CIPHER, 18); - for (i = 0;i < cipher_list->NumTokens;i++) - { - wchar_t tmp[MAX_SIZE]; - char *name = cipher_list->Token[i]; - StrToUni(tmp, sizeof(tmp), name); - CbAddStr(hWnd, C_CIPHER, tmp, 0); - } - if (s->p != NULL) { - // Get the encryption algorithm name from the server RPC_STR t; Zero(&t, sizeof(t)); + + SetFont(hWnd, C_CIPHER, GetFont("Tahoma", 8, false, false, false, false)); + CbSetHeight(hWnd, C_CIPHER, 18); + + // Get the list of available encryption algorithms from the server + if (ScGetServerCipherList(s->p->Rpc, &t) == ERR_NO_ERROR) + { + cipher_list = ParseToken(t.String, ";"); + + FreeRpcStr(&t); + Zero(&t, sizeof(t)); + + for (i = 0; i < cipher_list->NumTokens; i++) + { + wchar_t tmp[MAX_SIZE]; + char *name = cipher_list->Token[i]; + StrToUni(tmp, sizeof(tmp), name); + CbAddStr(hWnd, C_CIPHER, tmp, 0); + } + + FreeToken(cipher_list); + } + + // Get the current encryption algorithm's name from the server if (CALL(hWnd, ScGetServerCipher(s->p->Rpc, &t))) { wchar_t tmp[MAX_SIZE]; @@ -19434,6 +19346,7 @@ void SmEditSettingDlgInit(HWND hWnd, SM_EDIT_SETTING *p) Check(hWnd, R_DIRECT_TCP, s->ClientOption.ProxyType == PROXY_DIRECT); Check(hWnd, R_HTTPS, s->ClientOption.ProxyType == PROXY_HTTP); Check(hWnd, R_SOCKS, s->ClientOption.ProxyType == PROXY_SOCKS); + Check(hWnd, R_SOCKS5, s->ClientOption.ProxyType == PROXY_SOCKS5); // Management mode setting Check(hWnd, R_SERVER_ADMIN, s->ServerAdminMode); diff --git a/src/Cedar/SM.h b/src/Cedar/SM.h index c256fb9c..aaa0efc9 100644 --- a/src/Cedar/SM.h +++ b/src/Cedar/SM.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SM.h diff --git a/src/Cedar/SMInner.h b/src/Cedar/SMInner.h index 6e54bfc0..03372889 100644 --- a/src/Cedar/SMInner.h +++ b/src/Cedar/SMInner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SMInner.h diff --git a/src/Cedar/SW.c b/src/Cedar/SW.c index 5ef29a47..26c8ebd0 100644 --- a/src/Cedar/SW.c +++ b/src/Cedar/SW.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SW.c @@ -783,8 +677,11 @@ UINT SWExec() MayaquaMinimalMode(); } -#ifdef DEBUG - InitMayaqua(true, true, 0, NULL); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, 0, NULL); #else InitMayaqua(false, false, 0, NULL); #endif @@ -5743,6 +5640,15 @@ UINT SwWelcomeDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, WIZARD *wiz break; } + if (MsIsKB3033929RequiredAndMissing()) + { + // KB3033929 is missing + if (MsgBoxEx(hWnd, MB_ICONINFORMATION | MB_OKCANCEL, _UU("SW_KB3033929_REQUIRED")) == IDCANCEL) + { + break; + } + } + if (sw->DoubleClickBlocker) { break; diff --git a/src/Cedar/SW.h b/src/Cedar/SW.h index ed1d2c18..718ee3f2 100644 --- a/src/Cedar/SW.h +++ b/src/Cedar/SW.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SW.h diff --git a/src/Cedar/SWInner.h b/src/Cedar/SWInner.h index 86ede1a0..a1617ddf 100644 --- a/src/Cedar/SWInner.h +++ b/src/Cedar/SWInner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SWInner.h diff --git a/src/Cedar/Sam.c b/src/Cedar/Sam.c index ad964f7b..49eeb575 100644 --- a/src/Cedar/Sam.c +++ b/src/Cedar/Sam.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Sam.c @@ -301,13 +195,13 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna return false; } - if (base64_enc_len(strlen(name)) < sizeof(buffer)-1 && - base64_enc_len(strlen(password)) < sizeof(buffer)-1 && - base64_enc_len(strlen(domainname)) < sizeof(buffer)-1) + if (base64_enc_len((unsigned int)strlen(name)) < sizeof(buffer)-1 && + base64_enc_len((unsigned int)strlen(password)) < sizeof(buffer)-1 && + base64_enc_len((unsigned int)strlen(domainname)) < sizeof(buffer)-1) { char answer[300]; - unsigned int end = B64_Encode(buffer, name, strlen(name)); + unsigned int end = B64_Encode(buffer, name, (int)strlen(name)); buffer[end] = '\0'; fputs("Username:: ", out); fputs(buffer, out); @@ -315,7 +209,7 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna Debug("Username: %s\n", buffer); buffer[0] = 0; - end = B64_Encode(buffer, domainname, strlen(domainname)); + end = B64_Encode(buffer, domainname, (int)strlen(domainname)); buffer[end] = '\0'; fputs("NT-Domain:: ", out); fputs(buffer, out); @@ -326,7 +220,7 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna if (password[0] != '\0') { Debug("Password authentication\n"); - end = B64_Encode(buffer, password, strlen(password)); + end = B64_Encode(buffer, password, (int)strlen(password)); buffer[end] = '\0'; fputs("Password:: ", out); fputs(buffer, out); diff --git a/src/Cedar/Sam.h b/src/Cedar/Sam.h index 8c298cf6..88a9bac6 100644 --- a/src/Cedar/Sam.h +++ b/src/Cedar/Sam.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Sam.h diff --git a/src/Cedar/SeLowUser.c b/src/Cedar/SeLowUser.c index 5cfeb6dd..e8b45014 100644 --- a/src/Cedar/SeLowUser.c +++ b/src/Cedar/SeLowUser.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // SeLow: SoftEther Lightweight Network Protocol -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SeLowUser.c diff --git a/src/Cedar/SeLowUser.h b/src/Cedar/SeLowUser.h index 7a0f0830..92ad9465 100644 --- a/src/Cedar/SeLowUser.h +++ b/src/Cedar/SeLowUser.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // SeLow: SoftEther Lightweight Network Protocol -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SeLowUser.h diff --git a/src/Cedar/SecureInfo.c b/src/Cedar/SecureInfo.c index 490cedd0..a2ece05b 100644 --- a/src/Cedar/SecureInfo.c +++ b/src/Cedar/SecureInfo.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SecureInfo.c diff --git a/src/Cedar/SecureInfo.h b/src/Cedar/SecureInfo.h index 55b9d1e0..1a7c8057 100644 --- a/src/Cedar/SecureInfo.h +++ b/src/Cedar/SecureInfo.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SecureInfo.h diff --git a/src/Cedar/SecureNAT.c b/src/Cedar/SecureNAT.c index aab4fcaf..bbcfed3a 100644 --- a/src/Cedar/SecureNAT.c +++ b/src/Cedar/SecureNAT.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SecureNAT.c diff --git a/src/Cedar/SecureNAT.h b/src/Cedar/SecureNAT.h index 6dddfd89..756a16ad 100644 --- a/src/Cedar/SecureNAT.h +++ b/src/Cedar/SecureNAT.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SecureNAT.h diff --git a/src/Cedar/Server.c b/src/Cedar/Server.c index 44857643..b47927b5 100644 --- a/src/Cedar/Server.c +++ b/src/Cedar/Server.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Server.c @@ -154,6 +48,9 @@ void SiSetOpenVPNAndSSTPConfig(SERVER *s, OPENVPN_SSTP_CONFIG *c) NormalizeIntListStr(s->OpenVpnServerUdpPorts, sizeof(s->OpenVpnServerUdpPorts), c->OpenVPNPortList, true, ", "); + s->Cedar->OpenVPNObfuscation = c->OpenVPNObfuscation; + StrCpy(s->Cedar->OpenVPNObfuscationMask, sizeof(s->Cedar->OpenVPNObfuscationMask), c->OpenVPNObfuscationMask); + // Apply the OpenVPN configuration if (s->OpenVpnServerUdp != NULL) { @@ -194,6 +91,9 @@ void SiGetOpenVPNAndSSTPConfig(SERVER *s, OPENVPN_SSTP_CONFIG *c) } StrCpy(c->OpenVPNPortList, sizeof(c->OpenVPNPortList), s->OpenVpnServerUdpPorts); + + c->OpenVPNObfuscation = s->Cedar->OpenVPNObfuscation; + StrCpy(c->OpenVPNObfuscationMask, sizeof(c->OpenVPNObfuscationMask), s->Cedar->OpenVPNObfuscationMask); } Unlock(s->OpenVpnSstpConfigLock); } @@ -1069,57 +969,75 @@ LIST *EnumLogFile(char *hubname) // Enumerate in the server_log if (hubname == NULL) { - EnumLogFileDir(o, "server_log"); + EnumLogFileDir(o, SERVER_LOG_DIR); } // Enumerate in the packet_log - Format(tmp, sizeof(tmp), "%s/packet_log", exe_dir); - dir = EnumDir(tmp); - if (dir != NULL) + Format(tmp, sizeof(tmp), "%s/"HUB_PACKET_LOG_DIR, exe_dir); + + if (hubname == NULL) { - UINT i; - for (i = 0;i < dir->NumFiles;i++) + dir = EnumDir(tmp); + if (dir != NULL) { - DIRENT *e = dir->File[i]; - - if (e->Folder) + UINT i; + for (i = 0;i < dir->NumFiles;i++) { - char dir_name[MAX_PATH]; + DIRENT *e = dir->File[i]; - if (hubname == NULL || StrCmpi(hubname, e->FileName) == 0) + if (e->Folder) { - Format(dir_name, sizeof(dir_name), "packet_log/%s", e->FileName); + char dir_name[MAX_PATH]; + Format(dir_name, sizeof(dir_name), HUB_PACKET_LOG_DIR"/%s", e->FileName); EnumLogFileDir(o, dir_name); } } - } - FreeDir(dir); + FreeDir(dir); + } + } + else + { + char dir_name[MAX_PATH]; + + Format(dir_name, sizeof(dir_name), HUB_PACKET_LOG_DIR"/%s", hubname); + + EnumLogFileDir(o, dir_name); } // Enumerate in the security_log - Format(tmp, sizeof(tmp), "%s/security_log", exe_dir); - dir = EnumDir(tmp); - if (dir != NULL) + Format(tmp, sizeof(tmp), "%s/"HUB_SECURITY_LOG_DIR, exe_dir); + + if (hubname == NULL) { - UINT i; - for (i = 0;i < dir->NumFiles;i++) + dir = EnumDir(tmp); + if (dir != NULL) { - DIRENT *e = dir->File[i]; - - if (e->Folder) + UINT i; + for (i = 0;i < dir->NumFiles;i++) { - char dir_name[MAX_PATH]; + DIRENT *e = dir->File[i]; - if (hubname == NULL || StrCmpi(hubname, e->FileName) == 0) + if (e->Folder) { - Format(dir_name, sizeof(dir_name), "security_log/%s", e->FileName); + char dir_name[MAX_PATH]; + + Format(dir_name, sizeof(dir_name), HUB_SECURITY_LOG_DIR"/%s", e->FileName); + EnumLogFileDir(o, dir_name); } } - } - FreeDir(dir); + FreeDir(dir); + } + } + else + { + char dir_name[MAX_PATH]; + + Format(dir_name, sizeof(dir_name), HUB_SECURITY_LOG_DIR"/%s", hubname); + + EnumLogFileDir(o, dir_name); } return o; @@ -1831,14 +1749,37 @@ void OutRpcCapsList(PACK *p, CAPSLIST *t) return; } + PackSetCurrentJsonGroupName(p, "CapsList"); for (i = 0;i < LIST_NUM(t->CapsList);i++) { char tmp[MAX_SIZE]; + char ct_key[MAX_PATH]; + wchar_t ct_description[MAX_PATH]; + wchar_t *w; CAPS *c = LIST_DATA(t->CapsList, i); Format(tmp, sizeof(tmp), "caps_%s", c->Name); + + Format(ct_key, sizeof(ct_key), "CT_%s", c->Name); + + Zero(ct_description, sizeof(ct_description)); + w = _UU(ct_key); + if (UniIsEmptyStr(w) == false) + { + UniStrCpy(ct_description, sizeof(ct_description), w); + } + else + { + StrToUni(ct_description, sizeof(ct_description), c->Name); + } + PackAddInt(p, tmp, c->Value); + + PackAddStrEx(p, "CapsName", c->Name, i, LIST_NUM(t->CapsList)); + PackAddIntEx(p, "CapsValue", c->Value, i, LIST_NUM(t->CapsList)); + PackAddUniStrEx(p, "CapsDescrption", ct_description, i, LIST_NUM(t->CapsList)); } + PackSetCurrentJsonGroupName(p, NULL); } void FreeRpcCapsList(CAPSLIST *t) { @@ -2054,6 +1995,12 @@ UINT SiCalcPoint(SERVER *s, UINT num, UINT weight) server_max_sessions = GetServerCapsInt(s, "i_max_sessions"); + if (server_max_sessions == 0) + { + // Avoid divide by zero + server_max_sessions = 1; + } + return (UINT)(((double)server_max_sessions - MIN((double)num * 100.0 / (double)weight, (double)server_max_sessions)) * (double)FARM_BASE_POINT / (double)server_max_sessions); @@ -2528,6 +2475,9 @@ void SiLoadInitialConfiguration(SERVER *s) // Set the server certificate to default SiInitDefaultServerCert(s); + // Set the character which separates the username from the hub name + s->Cedar->UsernameHubSeparator = DEFAULT_USERNAME_HUB_SEPARATOR; + // Create a default HUB { SiInitDefaultHubList(s); @@ -2563,6 +2513,8 @@ void SiLoadInitialConfiguration(SERVER *s) ToStr(c.OpenVPNPortList, OPENVPN_UDP_PORT); } + c.OpenVPNObfuscation = false; + SiSetOpenVPNAndSSTPConfig(s, &c); { @@ -2928,6 +2880,8 @@ bool SiLoadConfigurationCfg(SERVER *s, FOLDER *root) FreeBuf(pw); } + CfgGetStr(f8, "CustomHttpHeader", t.CustomHttpHeader, sizeof(t.CustomHttpHeader)); + GetMachineHostName(machine_name, sizeof(machine_name)); CfgGetStr(f8, "LocalHostname", machine_name2, sizeof(machine_name2)); @@ -3297,6 +3251,8 @@ FOLDER *SiWriteConfigurationToCfg(SERVER *s) FreeBuf(pw); } + + CfgAddStr(ddns_folder, "CustomHttpHeader", t->CustomHttpHeader); } } @@ -5851,6 +5807,17 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f) } } + // OpenVPN Push a dummy IPv4 address on L2 mode + if (CfgIsItem(f, "OpenVPNPushDummyIPv4AddressOnL2Mode") == false) + { + // Default enable + c->OpenVPNPushDummyIPv4AddressOnL2Mode = true; + } + else + { + c->OpenVPNPushDummyIPv4AddressOnL2Mode = CfgGetBool(f, "OpenVPNPushDummyIPv4AddressOnL2Mode"); + } + // Disable the NAT-traversal feature s->DisableNatTraversal = CfgGetBool(f, "DisableNatTraversal"); @@ -5922,6 +5889,12 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f) FreeK(k); } + // Character which separates the username from the hub name + if (CfgGetStr(f, "UsernameHubSeparator", tmp, sizeof(tmp))) + { + c->UsernameHubSeparator = IsPrintableAsciiChar(tmp[0]) ? tmp[0] : DEFAULT_USERNAME_HUB_SEPARATOR; + } + // Cipher Name if (CfgGetStr(f, "CipherName", tmp, sizeof(tmp))) { @@ -5994,6 +5967,16 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f) config.EnableSSTP = !s->DisableSSTPServer; StrCpy(config.OpenVPNPortList, sizeof(config.OpenVPNPortList), tmp); + config.OpenVPNObfuscation = CfgGetBool(f, "OpenVPNObfuscation"); + + if (CfgGetStr(f, "OpenVPNObfuscationMask", tmp, sizeof(tmp))) + { + if (IsEmptyStr(tmp) == false) + { + StrCpy(config.OpenVPNObfuscationMask, sizeof(config.OpenVPNObfuscationMask), tmp); + } + } + SiSetOpenVPNAndSSTPConfig(s, &config); if (s->ServerType == SERVER_TYPE_FARM_MEMBER) @@ -6040,7 +6023,11 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f) c->SslAcceptSettings.Tls_Disable1_2 = CfgGetBool(f, "Tls_Disable1_2"); s->StrictSyslogDatetimeFormat = CfgGetBool(f, "StrictSyslogDatetimeFormat"); - // Bits of Diffie-Hellman parameters + + // Disable JSON-RPC Web API + s->DisableJsonRpcWebApi = CfgGetBool(f, "DisableJsonRpcWebApi"); + + // Bits of Diffie-Hellman parameters c->DhParamBits = CfgGetInt(f, "DhParamBits"); if (c->DhParamBits == 0) { @@ -6252,6 +6239,8 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s) CfgAddStr(f, "OpenVPNDefaultClientOption", c->OpenVPNDefaultClientOption); + CfgAddBool(f, "OpenVPNPushDummyIPv4AddressOnL2Mode", c->OpenVPNPushDummyIPv4AddressOnL2Mode); + if (c->Bridge == false) { OPENVPN_SSTP_CONFIG config; @@ -6265,6 +6254,9 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s) SiGetOpenVPNAndSSTPConfig(s, &config); CfgAddStr(f, "OpenVPN_UdpPortList", config.OpenVPNPortList); + + CfgAddBool(f, "OpenVPNObfuscation", config.OpenVPNObfuscation); + CfgAddStr(f, "OpenVPNObfuscationMask", config.OpenVPNObfuscationMask); } // WebTimePage @@ -6286,6 +6278,13 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s) CfgAddBuf(f, "ServerKey", b); FreeBuf(b); + { + // Character which separates the username from the hub name + char str[2]; + StrCpy(str, sizeof(str), &c->UsernameHubSeparator); + CfgAddStr(f, "UsernameHubSeparator", str); + } + // Traffic information Lock(c->TrafficLock); { @@ -6360,6 +6359,9 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s) CfgAddBool(f, "DisableSessionReconnect", GetGlobalServerFlag(GSF_DISABLE_SESSION_RECONNECT)); CfgAddBool(f, "StrictSyslogDatetimeFormat", s->StrictSyslogDatetimeFormat); + + // Disable JSON-RPC Web API + CfgAddBool(f, "DisableJsonRpcWebApi", s->DisableJsonRpcWebApi); } Unlock(c->lock); } @@ -7077,7 +7079,7 @@ FARM_MEMBER *SiGetNextFarmMember(SERVER *s, CONNECTION *c, HUB *h) PackAddIntEx(p, "NumTcpConnections", f->NumTcpConnections, i, num); PackAddIntEx(p, "NumHubs", LIST_NUM(f->HubList), i, num); PackAddBoolEx(p, "Me", f->Me, i, num); - PackAddInt64Ex(p, "ConnectedTime", f->ConnectedTime, i, num); + PackAddTime64Ex(p, "ConnectedTime", f->ConnectedTime, i, num); PackAddInt64Ex(p, "SystemId", f->SystemId, i, num); PackAddBoolEx(p, "DoNotSelect", do_not_select, i, num); } @@ -7106,7 +7108,7 @@ FARM_MEMBER *SiGetNextFarmMember(SERVER *s, CONNECTION *c, HUB *h) PackAddStr(p, "CipherName", c->CipherName); PackAddStr(p, "ClientStr", c->ClientStr); PackAddInt(p, "ClientVer", c->ClientVer); - PackAddInt64(p, "ConnectedTime", Tick64ToTime64(c->ConnectedTick)); + PackAddTime64(p, "ConnectedTime", Tick64ToTime64(c->ConnectedTick)); PackAddStr(p, "HubName", h->Name); PackAddBool(p, "StaticHub", h->Type == HUB_TYPE_FARM_STATIC); @@ -7246,8 +7248,8 @@ void SiCalledEnumHub(SERVER *s, PACK *p, PACK *req) PackAddIntEx(p, "NumIpTables", LIST_NUM(h->IpTable), i, num); - PackAddInt64Ex(p, "LastCommTime", h->LastCommTime, i, num); - PackAddInt64Ex(p, "CreatedTime", h->CreatedTime, i, num); + PackAddTime64Ex(p, "LastCommTime", h->LastCommTime, i, num); + PackAddTime64Ex(p, "CreatedTime", h->CreatedTime, i, num); } Unlock(h->lock); } @@ -10097,12 +10099,17 @@ void SiFarmServMain(SERVER *server, SOCK *sock, FARM_MEMBER *f) } // Receive - p = HttpServerRecv(sock); + p = HttpServerRecvEx(sock, FIRM_SERV_RECV_PACK_MAX_SIZE); t->Response = p; Set(t->CompleteEvent); - send_noop = false; + if (p == NULL) + { + // Avoid infinite loop + Disconnect(sock); + goto DISCONNECTED; + } } } while (t != NULL); diff --git a/src/Cedar/Server.h b/src/Cedar/Server.h index bc911443..eaaac853 100644 --- a/src/Cedar/Server.h +++ b/src/Cedar/Server.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Server.h @@ -158,6 +52,7 @@ extern char *SERVER_CONFIG_FILE_NAME; #define MEMBER_SELECTOR_CONNECT_TIMEOUT 2000 #define MEMBER_SELECTOR_DATA_TIMEOUT 5000 +#define FIRM_SERV_RECV_PACK_MAX_SIZE (100 * 1024 * 1024) // Virtual HUB list hosted by each farm member struct HUB_LIST @@ -253,6 +148,8 @@ struct OPENVPN_SSTP_CONFIG { bool EnableOpenVPN; // OpenVPN is enabled char OpenVPNPortList[MAX_SIZE]; // OpenVPN UDP port number list + bool OpenVPNObfuscation; // OpenVPN: Obfuscation mode + char OpenVPNObfuscationMask[MAX_SIZE]; // OpenVPN: String (mask) for XOR obfuscation bool EnableSSTP; // SSTP is enabled }; @@ -371,6 +268,7 @@ struct SERVER IP ListenIP; // Listen IP bool StrictSyslogDatetimeFormat; // Make syslog datetime format strict RFC3164 + bool DisableJsonRpcWebApi; // Disable JSON-RPC Web API }; @@ -394,6 +292,7 @@ struct RPC_SESSION_STATUS RPC_CLIENT_GET_CONNECTION_STATUS Status; // Status UINT ClientIp; // Client IP address UCHAR ClientIp6[16]; // Client IPv6 address + IP ClientIpAddress; // Client IP address (IPv4/IPv6) char ClientHostName[MAX_HOST_NAME_LEN + 1]; // Client host name NODE_INFO NodeInfo; // Node information }; diff --git a/src/Cedar/Session.c b/src/Cedar/Session.c index 453399de..88e96f2d 100644 --- a/src/Cedar/Session.c +++ b/src/Cedar/Session.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Session.c @@ -214,9 +108,9 @@ void SessionMain(SESSION *s) s->NumConnectionsEstablished++; s->CurrentConnectionEstablishTime = Tick64(); - if (s->FirstConnectionEstablishedTime == 0) + if (s->FirstConnectionEstablisiedTime == 0) /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ { - s->FirstConnectionEstablishedTime = Tick64(); + s->FirstConnectionEstablisiedTime = Tick64(); /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ } if (s->ServerMode == false && s->Cedar->Client != NULL) @@ -1264,7 +1158,10 @@ void StopSessionEx(SESSION *s, bool no_wait) // Server and client mode if (s->Connection) { - StopConnection(s->Connection, no_wait); + CONNECTION *c = s->Connection; + AddRef(c->ref); + StopConnection(c, no_wait); + ReleaseConnection(c); } // Wait until the stop @@ -2150,9 +2047,9 @@ void if_free(SESSION *s); // Create a server session SESSION *NewServerSession(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy) { - return NewServerSessionEx(cedar, c, h, username, policy, false); + return NewServerSessionEx(cedar, c, h, username, policy, false, NULL); } -SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy, bool inproc_mode) +SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy, bool inproc_mode, UCHAR *ipc_mac_address) { SESSION *s; char name[MAX_SIZE]; @@ -2273,28 +2170,35 @@ SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, // Generate a MAC address for IPC if (s->InProcMode) { - char tmp[MAX_SIZE]; - char machine[MAX_SIZE]; - UCHAR hash[SHA1_SIZE]; + if (ipc_mac_address != NULL) + { + Copy(s->IpcMacAddress, ipc_mac_address, 6); + } + else + { + char tmp[MAX_SIZE]; + char machine[MAX_SIZE]; + UCHAR hash[SHA1_SIZE]; - GetMachineName(machine, sizeof(machine)); + GetMachineName(machine, sizeof(machine)); - Format(tmp, sizeof(tmp), "%s@%s@%u", machine, h->Name, s->UniqueId); + Format(tmp, sizeof(tmp), "%s@%s@%u", machine, h->Name, s->UniqueId); - StrUpper(tmp); - Trim(tmp); + StrUpper(tmp); + Trim(tmp); - Sha0(hash, tmp, StrLen(tmp)); + Sha0(hash, tmp, StrLen(tmp)); - s->IpcMacAddress[0] = 0xCA; - s->IpcMacAddress[1] = hash[1]; - s->IpcMacAddress[2] = hash[2]; - s->IpcMacAddress[3] = hash[3]; - s->IpcMacAddress[4] = hash[4]; - s->IpcMacAddress[5] = hash[5]; + s->IpcMacAddress[0] = 0xCA; + s->IpcMacAddress[1] = hash[1]; + s->IpcMacAddress[2] = hash[2]; + s->IpcMacAddress[3] = hash[3]; + s->IpcMacAddress[4] = hash[4]; + s->IpcMacAddress[5] = hash[5]; - MacToStr(tmp, sizeof(tmp), s->IpcMacAddress); - Debug("MAC Address for IPC: %s\n", tmp); + MacToStr(tmp, sizeof(tmp), s->IpcMacAddress); + Debug("MAC Address for IPC: %s\n", tmp); + } } return s; diff --git a/src/Cedar/Session.h b/src/Cedar/Session.h index c7f8ef7a..2c980248 100644 --- a/src/Cedar/Session.h +++ b/src/Cedar/Session.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Session.h @@ -263,7 +157,8 @@ struct SESSION UINT NumDisconnected; // Number of socket disconnection bool NoReconnectToSession; // Disable to reconnect to the session char UnderlayProtocol[64]; // Physical communication protocol - UINT64 FirstConnectionEstablishedTime; // Connection completion time of the first connection + /* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */ + UINT64 FirstConnectionEstablisiedTime; // Connection completion time of the first connection UINT64 CurrentConnectionEstablishTime; // Completion time of this connection UINT NumConnectionsEstablished; // Number of connections established so far UINT AdjustMss; // MSS adjustment value @@ -405,7 +300,7 @@ SESSION *NewRpcSession(CEDAR *cedar, CLIENT_OPTION *option); SESSION *NewRpcSessionEx(CEDAR *cedar, CLIENT_OPTION *option, UINT *err, char *client_str); SESSION *NewRpcSessionEx2(CEDAR *cedar, CLIENT_OPTION *option, UINT *err, char *client_str, void *hWnd); SESSION *NewServerSession(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy); -SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy, bool inproc_mode); +SESSION *NewServerSessionEx(CEDAR *cedar, CONNECTION *c, HUB *h, char *username, POLICY *policy, bool inproc_mode, UCHAR *ipc_mac_address); void ClientThread(THREAD *t, void *param); void ReleaseSession(SESSION *s); void CleanupSession(SESSION *s); @@ -432,7 +327,6 @@ LIST *NewCancelList(); void ReleaseCancelList(LIST *o); void AddCancelList(LIST *o, CANCEL *c); void CancelList(LIST *o); -bool CompareNodeInfo(NODE_INFO *a, NODE_INFO *b); bool IsPriorityHighestPacketForQoS(void *data, UINT size); UINT GetNextDelayedPacketTickDiff(SESSION *s); diff --git a/src/Cedar/UT.c b/src/Cedar/UT.c index 7c97bb9c..27873169 100644 --- a/src/Cedar/UT.c +++ b/src/Cedar/UT.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // UT.c @@ -406,10 +300,6 @@ UINT UtSpeedMeterDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void } // Speedometer -void UtSpeedMeter() -{ - UtSpeedMeterEx(NULL); -} void UtSpeedMeterEx(void *hWnd) { Dialog((HWND)hWnd, D_SPEEDMETER, UtSpeedMeterDlgProc, NULL); diff --git a/src/Cedar/UT.h b/src/Cedar/UT.h index 51877e94..d4415a6e 100644 --- a/src/Cedar/UT.h +++ b/src/Cedar/UT.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // UT.h @@ -131,7 +25,6 @@ void UtSpeedMeterDlgRefreshStatus(HWND hWnd); #endif // UT_C // Function prototype -void UtSpeedMeter(); void UtSpeedMeterEx(void *hWnd); #endif // UT_H diff --git a/src/Cedar/UdpAccel.c b/src/Cedar/UdpAccel.c index e7b96e36..1e2e943b 100644 --- a/src/Cedar/UdpAccel.c +++ b/src/Cedar/UdpAccel.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // UdpAccel.c diff --git a/src/Cedar/UdpAccel.h b/src/Cedar/UdpAccel.h index cebaecf9..35e787c4 100644 --- a/src/Cedar/UdpAccel.h +++ b/src/Cedar/UdpAccel.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // UdpAccel.h diff --git a/src/Cedar/VG.c b/src/Cedar/VG.c index bbe5d0a0..8c930e7e 100644 --- a/src/Cedar/VG.c +++ b/src/Cedar/VG.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VG.c diff --git a/src/Cedar/VG.h b/src/Cedar/VG.h index eecc22c5..cf01357e 100644 --- a/src/Cedar/VG.h +++ b/src/Cedar/VG.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VG.h diff --git a/src/Cedar/VLan.c b/src/Cedar/VLan.c index d1469c41..0d7a9f01 100644 --- a/src/Cedar/VLan.c +++ b/src/Cedar/VLan.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VLan.c diff --git a/src/Cedar/VLan.h b/src/Cedar/VLan.h index 251a1d4d..51408422 100644 --- a/src/Cedar/VLan.h +++ b/src/Cedar/VLan.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VLan.h diff --git a/src/Cedar/VLanUnix.c b/src/Cedar/VLanUnix.c index b9dfde18..2af36793 100644 --- a/src/Cedar/VLanUnix.c +++ b/src/Cedar/VLanUnix.c @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - nattoheaven (https://github.com/nattoheaven) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VLanUnix.c diff --git a/src/Cedar/VLanUnix.h b/src/Cedar/VLanUnix.h index 89ae9c2d..04b1c8d3 100644 --- a/src/Cedar/VLanUnix.h +++ b/src/Cedar/VLanUnix.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VLanUnix.h diff --git a/src/Cedar/VLanWin32.c b/src/Cedar/VLanWin32.c index 083dc9a9..5932af27 100644 --- a/src/Cedar/VLanWin32.c +++ b/src/Cedar/VLanWin32.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VLanWin32.c diff --git a/src/Cedar/VLanWin32.h b/src/Cedar/VLanWin32.h index 914d60d1..2e8c092c 100644 --- a/src/Cedar/VLanWin32.h +++ b/src/Cedar/VLanWin32.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // VLanWin32.h diff --git a/src/Cedar/Virtual.c b/src/Cedar/Virtual.c index 4ba884ab..512449b6 100644 --- a/src/Cedar/Virtual.c +++ b/src/Cedar/Virtual.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Virtual.c @@ -5307,7 +5201,7 @@ TCP_RESET: seq64 = n->RecvSeq + (UINT64)seq - (n->RecvSeqInit + n->RecvSeq) % X32; if ((n->RecvSeqInit + n->RecvSeq) % X32 > seq) { - if (((n->RecvSeqInit + n->RecvSeq) % X32 - ack) >= 0x80000000) + if (((n->RecvSeqInit + n->RecvSeq) % X32 - seq) >= 0x80000000) { seq64 = n->RecvSeq + (UINT64)seq + X32 - (n->RecvSeqInit + n->RecvSeq) % X32; } @@ -6224,7 +6118,7 @@ void EncodeNetBiosName(UCHAR *dst, char *src) copy_len = 16; } - Copy(tmp, src, StrLen(src)); + Copy(tmp, src, copy_len); wp = 0; @@ -9062,8 +8956,8 @@ void FreeDhcpServer(VH *v) return; } - // Remove the all lease entries - for (i = 0;i < LIST_NUM(v->DhcpLeaseList);i++) + // Empty the leases lists + for (i = 0; i < LIST_NUM(v->DhcpLeaseList); ++i) { DHCP_LEASE *d = LIST_DATA(v->DhcpLeaseList, i); FreeDhcpLease(d); @@ -9071,6 +8965,15 @@ void FreeDhcpServer(VH *v) ReleaseList(v->DhcpLeaseList); v->DhcpLeaseList = NULL; + + for (i = 0; i < LIST_NUM(v->DhcpPendingLeaseList); ++i) + { + DHCP_LEASE *d = LIST_DATA(v->DhcpPendingLeaseList, i); + FreeDhcpLease(d); + } + + ReleaseList(v->DhcpPendingLeaseList); + v->DhcpPendingLeaseList = NULL; } // Initialize the DHCP server @@ -9084,6 +8987,29 @@ void InitDhcpServer(VH *v) // Create a list v->DhcpLeaseList = NewList(CompareDhcpLeaseList); + v->DhcpPendingLeaseList = NewList(CompareDhcpLeaseList); +} + +// Search for a pending DHCP lease item by the IP address +DHCP_LEASE *SearchDhcpPendingLeaseByIp(VH *v, UINT ip) +{ + UINT i; + // Validate arguments + if (v == NULL) + { + return NULL; + } + + for (i = 0; i < LIST_NUM(v->DhcpPendingLeaseList); ++i) + { + DHCP_LEASE *d = LIST_DATA(v->DhcpPendingLeaseList, i); + if (d->IpAddress == ip) + { + return d; + } + } + + return NULL; } // Search for a DHCP lease item by the IP address @@ -9096,7 +9022,7 @@ DHCP_LEASE *SearchDhcpLeaseByIp(VH *v, UINT ip) return NULL; } - for (i = 0;i < LIST_NUM(v->DhcpLeaseList);i++) + for (i = 0; i < LIST_NUM(v->DhcpLeaseList); ++i) { DHCP_LEASE *d = LIST_DATA(v->DhcpLeaseList, i); if (d->IpAddress == ip) @@ -9108,6 +9034,22 @@ DHCP_LEASE *SearchDhcpLeaseByIp(VH *v, UINT ip) return NULL; } +// Search for a pending DHCP lease item by the MAC address +DHCP_LEASE *SearchDhcpPendingLeaseByMac(VH *v, UCHAR *mac) +{ + DHCP_LEASE *d, t; + // Validate arguments + if (v == NULL || mac == NULL) + { + return NULL; + } + + Copy(&t.MacAddress, mac, 6); + d = Search(v->DhcpPendingLeaseList, &t); + + return d; +} + // Search for a DHCP lease item by the MAC address DHCP_LEASE *SearchDhcpLeaseByMac(VH *v, UCHAR *mac) { @@ -9205,9 +9147,8 @@ void PollingDhcpServer(VH *v) } v->LastDhcpPolling = v->Now; - // Remove expired entries -FIRST_LIST: - for (i = 0;i < LIST_NUM(v->DhcpLeaseList);i++) +LIST_CLEANUP: + for (i = 0; i < LIST_NUM(v->DhcpLeaseList); ++i) { DHCP_LEASE *d = LIST_DATA(v->DhcpLeaseList, i); @@ -9215,7 +9156,21 @@ FIRST_LIST: { FreeDhcpLease(d); Delete(v->DhcpLeaseList, d); - goto FIRST_LIST; + goto LIST_CLEANUP; + } + } + +PENDING_LIST_CLEANUP: + // Remove expired entries + for (i = 0; i < LIST_NUM(v->DhcpPendingLeaseList); ++i) + { + DHCP_LEASE *d = LIST_DATA(v->DhcpPendingLeaseList, i); + + if (d->ExpireTime < v->Now) + { + FreeDhcpLease(d); + Delete(v->DhcpPendingLeaseList, d); + goto PENDING_LIST_CLEANUP; } } } @@ -9257,6 +9212,11 @@ UINT ServeDhcpDiscover(VH *v, UCHAR *mac, UINT request_ip) { // IP address is specified DHCP_LEASE *d = SearchDhcpLeaseByIp(v, request_ip); + if (d == NULL) + { + d = SearchDhcpPendingLeaseByIp(v, request_ip); + } + if (d != NULL) { // If an entry for the same IP address already exists, @@ -9293,6 +9253,11 @@ UINT ServeDhcpDiscover(VH *v, UCHAR *mac, UINT request_ip) // If there is any entry with the same MAC address // that are already registered, use it with priority DHCP_LEASE *d = SearchDhcpLeaseByMac(v, mac); + if (d == NULL) + { + d = SearchDhcpPendingLeaseByMac(v, mac); + } + if (d != NULL) { // Examine whether the found IP address is in the allocation region @@ -9340,7 +9305,7 @@ UINT GetFreeDhcpIpAddress(VH *v) for (i = ip_start; i <= ip_end;i++) { UINT ip = Endian32(i); - if (SearchDhcpLeaseByIp(v, ip) == NULL) + if (SearchDhcpLeaseByIp(v, ip) == NULL && SearchDhcpPendingLeaseByIp(v, ip) == NULL) { // A free IP address is found return ip; @@ -9390,7 +9355,7 @@ UINT GetFreeDhcpIpAddressByRandom(VH *v, UCHAR *mac) new_ip = Endian32(ip_start + (rand_int % (ip_end - ip_start + 1))); - if (SearchDhcpLeaseByIp(v, new_ip) == NULL) + if (SearchDhcpLeaseByIp(v, new_ip) == NULL && SearchDhcpPendingLeaseByIp(v, new_ip) == NULL) { // A free IP address is found return new_ip; @@ -9507,8 +9472,9 @@ void VirtualDhcpServer(VH *v, PKT *p) if (opt->Opcode == DHCP_REQUEST) { DHCP_LEASE *d; - char mac[MAX_SIZE]; - char str[MAX_SIZE]; + char client_mac[MAX_SIZE]; + char client_ip[MAX_SIZE]; + // Remove old records with the same IP address d = SearchDhcpLeaseByIp(v, ip); if (d != NULL) @@ -9517,17 +9483,22 @@ void VirtualDhcpServer(VH *v, PKT *p) Delete(v->DhcpLeaseList, d); } + d = SearchDhcpPendingLeaseByIp(v, ip); + if (d != NULL) + { + FreeDhcpLease(d); + Delete(v->DhcpPendingLeaseList, d); + } + // Create a new entry - d = NewDhcpLease(v->DhcpExpire, p->MacAddressSrc, - ip, v->DhcpMask, - opt->Hostname); + d = NewDhcpLease(v->DhcpExpire, p->MacAddressSrc, ip, v->DhcpMask, opt->Hostname); d->Id = ++v->DhcpId; Add(v->DhcpLeaseList, d); - MacToStr(mac, sizeof(mac), d->MacAddress); - IPToStr32(str, sizeof(str), d->IpAddress); + MacToStr(client_mac, sizeof(client_mac), d->MacAddress); + IPToStr32(client_ip, sizeof(client_ip), d->IpAddress); - NLog(v, "LH_NAT_DHCP_CREATED", d->Id, mac, str, d->Hostname, v->DhcpExpire / 1000); + NLog(v, "LH_NAT_DHCP_CREATED", d->Id, client_mac, client_ip, d->Hostname, v->DhcpExpire / 1000); } // Respond @@ -9616,12 +9587,25 @@ void VirtualDhcpServer(VH *v, PKT *p) char client_mac[MAX_SIZE]; char client_ip[64]; IP ips; + BinToStr(client_mac, sizeof(client_mac), p->MacAddressSrc, 6); UINTToIP(&ips, ip); IPToStr(client_ip, sizeof(client_ip), &ips); - Debug("DHCP %s : %s given %s\n", - ret.Opcode == DHCP_OFFER ? "DHCP_OFFER" : "DHCP_ACK", - client_mac, client_ip); + + if (ret.Opcode == DHCP_OFFER) + { + // DHCP_OFFER + DHCP_LEASE *d = NewDhcpLease(5000, p->MacAddressSrc, ip, v->DhcpMask, opt->Hostname); + d->Id = LIST_NUM(v->DhcpPendingLeaseList); + Add(v->DhcpPendingLeaseList, d); + + Debug("VirtualDhcpServer(): %s has been marked as pending for %s\n", client_ip, client_mac); + } + else + { + // DHCP_ACK + Debug("VirtualDhcpServer(): %s has been assigned to %s\n", client_ip, client_mac); + } } // Build a DHCP option diff --git a/src/Cedar/Virtual.h b/src/Cedar/Virtual.h index 54f14591..80c71463 100644 --- a/src/Cedar/Virtual.h +++ b/src/Cedar/Virtual.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Virtual.h @@ -402,6 +296,7 @@ struct VH UINT DhcpDns2; // DNS server address 2 char DhcpDomain[MAX_HOST_NAME_LEN + 1]; // Assigned domain name LIST *DhcpLeaseList; // DHCP lease list + LIST *DhcpPendingLeaseList; // Pending DHCP lease list UINT64 LastDhcpPolling; // Time which the DHCP list polled last bool SaveLog; // Save a log DHCP_CLASSLESS_ROUTE_TABLE PushRoute; // Pushing routing table @@ -617,7 +512,9 @@ int CompareDhcpLeaseList(void *p1, void *p2); DHCP_LEASE *NewDhcpLease(UINT expire, UCHAR *mac_address, UINT ip, UINT mask, char *hostname); void FreeDhcpLease(DHCP_LEASE *d); DHCP_LEASE *SearchDhcpLeaseByMac(VH *v, UCHAR *mac); +DHCP_LEASE *SearchDhcpPendingLeaseByMac(VH *v, UCHAR *mac); DHCP_LEASE *SearchDhcpLeaseByIp(VH *v, UINT ip); +DHCP_LEASE *SearchDhcpPendingLeaseByIp(VH *v, UINT ip); UINT ServeDhcpDiscover(VH *v, UCHAR *mac, UINT request_ip); UINT GetFreeDhcpIpAddress(VH *v); UINT GetFreeDhcpIpAddressByRandom(VH *v, UCHAR *mac); diff --git a/src/Cedar/WaterMark.c b/src/Cedar/WaterMark.c index 88c98e58..c039bb92 100644 --- a/src/Cedar/WaterMark.c +++ b/src/Cedar/WaterMark.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WaterMark.c diff --git a/src/Cedar/WaterMark.h b/src/Cedar/WaterMark.h index 8764b2bb..964d86d8 100644 --- a/src/Cedar/WaterMark.h +++ b/src/Cedar/WaterMark.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WaterMark.h diff --git a/src/Cedar/WebUI.c b/src/Cedar/WebUI.c index ef5a8c87..3d94a7f1 100644 --- a/src/Cedar/WebUI.c +++ b/src/Cedar/WebUI.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Tetsuo Sugiyama -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WebUI.c @@ -1222,7 +1116,7 @@ static wchar_t *WpSecureNAT(WEBUI *wu, LIST *params) // Get the enable / disable state of the current SecureNAT { RPC_HUB_STATUS t; - Zero(&t, sizeof(&t)); + Zero(&t, sizeof(t)); StrCpy(t.HubName, sizeof(t.HubName), hubname); retcode = StGetHubStatus(context->Admin, &t); @@ -1649,7 +1543,7 @@ static LIST *WuAnalyzeTarget(char *target,char *filename, UINT size) while(*body != '=' && *body != '\0') { - *body ++; + body++; } if(*body == '=') { diff --git a/src/Cedar/WebUI.h b/src/Cedar/WebUI.h index ccb1d5b3..78e3afd7 100644 --- a/src/Cedar/WebUI.h +++ b/src/Cedar/WebUI.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Tetsuo Sugiyama -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WebUI.h diff --git a/src/Cedar/Win32Com.cpp b/src/Cedar/Win32Com.cpp index c7791fc2..9120a4a2 100644 --- a/src/Cedar/Win32Com.cpp +++ b/src/Cedar/Win32Com.cpp @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Win32Com.c diff --git a/src/Cedar/Win32Com.h b/src/Cedar/Win32Com.h index 00831d7f..1bf12477 100644 --- a/src/Cedar/Win32Com.h +++ b/src/Cedar/Win32Com.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Win32Com.h diff --git a/src/Cedar/WinJumpList.cpp b/src/Cedar/WinJumpList.cpp index af658717..8ccc736d 100644 --- a/src/Cedar/WinJumpList.cpp +++ b/src/Cedar/WinJumpList.cpp @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WinJumpList.cpp diff --git a/src/Cedar/WinUi.c b/src/Cedar/WinUi.c index 5ba696fc..3d2c0044 100644 --- a/src/Cedar/WinUi.c +++ b/src/Cedar/WinUi.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WinUi.c @@ -1964,6 +1858,9 @@ void RegistWindowsFirewallAllEx(char *dir) MsRegistWindowsFirewallEx2(CEDAR_CUI_STR, "vpncmd.exe", dir); MsRegistWindowsFirewallEx2(CEDAR_CUI_STR, "vpncmd_x64.exe", dir); + + MsRegistWindowsFirewallEx2(CEDAR_PRODUCT_STR, "vpntest.exe", dir); + MsRegistWindowsFirewallEx2(CEDAR_PRODUCT_STR, "vpntest_x64.exe", dir); } // Check whether the notification service is already running @@ -4083,6 +3980,186 @@ void LvRename(HWND hWnd, UINT id, UINT pos) ListView_EditLabel(DlgItem(hWnd, id), pos); } +// Enhanced function +LRESULT CALLBACK LvEnhancedProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + WNDPROC func = NULL; + + if (MsIsNt()) + { + func = (WNDPROC)GetPropW(hWnd, L"ORIGINAL_FUNC"); + } + else + { + func = (WNDPROC)GetPropA(hWnd, "ORIGINAL_FUNC"); + } + + if (func == NULL) + { + Debug("LvEnhancedProc(): GetProp() returned NULL!\n"); + return 1; + } + + switch (msg) + { + case WM_HSCROLL: + case WM_VSCROLL: + case WM_MOUSEWHEEL: + { + // Prevent graphical glitches with the edit box by sending the NM_RETURN signal + // to the parent dialog (the parent dialog has to delete the edit box on NM_RETURN) + NMHDR nmh; + nmh.code = NM_RETURN; + nmh.idFrom = GetDlgCtrlID(hWnd); + nmh.hwndFrom = hWnd; + SendMsg(GetParent(hWnd), 0, WM_NOTIFY, nmh.idFrom, (LPARAM)&nmh); + + break; + } + case WM_CLOSE: + // Prevent list view from disappearing after pressing ESC in an edit box + return 0; + case WM_NCDESTROY: + // Restore original function during destruction + LvSetEnhanced(hWnd, 0, false); + } + + if (MsIsNt()) + { + return CallWindowProcW(func, hWnd, msg, wParam, lParam); + } + else + { + return CallWindowProcA(func, hWnd, msg, wParam, lParam); + } +} + +// Toggle enhanced function +void LvSetEnhanced(HWND hWnd, UINT id, bool enable) +{ + // Validate arguments + if (hWnd == NULL) + { + return; + } + + if (enable) + { + if (MsIsNt()) + { + const HANDLE fn = (HANDLE)SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)LvEnhancedProc); + SetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC", fn); + } + else + { + const HANDLE fn = (HANDLE)SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)LvEnhancedProc); + SetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC", fn); + } + } + else + { + if (MsIsNt()) + { + SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC")); + RemovePropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC"); + } + else + { + SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC")); + RemovePropA(DlgItem(hWnd, id), "ORIGINAL_FUNC"); + } + } +} + +// Enhanced function +LRESULT CALLBACK EditBoxEnhancedProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + WNDPROC func = NULL; + + if (MsIsNt()) + { + func = (WNDPROC)GetPropW(hWnd, L"ORIGINAL_FUNC"); + } + else + { + func = (WNDPROC)GetPropA(hWnd, "ORIGINAL_FUNC"); + } + + if (func == NULL) + { + Debug("EditBoxEnhancedProc(): GetProp() returned NULL!\n"); + return 1; + } + + switch (msg) + { + case WM_CHAR: + switch (wParam) + { + // CTRL + A + case 1: + SelectEdit(hWnd, 0); + return 0; + case VK_RETURN: + SendMsg(GetParent(hWnd), 0, WM_KEYDOWN, VK_RETURN, 0); + return 0; + case VK_ESCAPE: + DestroyWindow(hWnd); + return 0; + } + break; + case WM_NCDESTROY: + // Restore original function during destruction + EditBoxSetEnhanced(hWnd, 0, false); + } + + if (MsIsNt()) + { + return CallWindowProcW(func, hWnd, msg, wParam, lParam); + } + else + { + return CallWindowProcA(func, hWnd, msg, wParam, lParam); + } +} + +// Toggle enhanced function +void EditBoxSetEnhanced(HWND hWnd, UINT id, bool enable) +{ + // Validate arguments + if (hWnd == NULL) + { + return; + } + + if (enable) + { + if (MsIsNt()) + { + const HANDLE fn = (HANDLE)SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)EditBoxEnhancedProc); + SetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC", fn); + } + else + { + const HANDLE fn = (HANDLE)SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)EditBoxEnhancedProc); + SetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC", fn); + } + } + else + { + if (MsIsNt()) + { + SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC")); + RemovePropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC"); + } + else + { + SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC")); + RemovePropA(DlgItem(hWnd, id), "ORIGINAL_FUNC"); + } + } +} + // Show the menu void PrintMenu(HWND hWnd, HMENU hMenu) { diff --git a/src/Cedar/WinUi.h b/src/Cedar/WinUi.h index b9cb29e0..e7d2f235 100644 --- a/src/Cedar/WinUi.h +++ b/src/Cedar/WinUi.h @@ -1,111 +1,6 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. + // WinUi.h @@ -776,6 +671,8 @@ void RemoveShortcutKeyStrFromMenu(HMENU hMenu); UINT GetMenuNum(HMENU hMenu); void PrintMenu(HWND hWnd, HMENU hMenu); void LvRename(HWND hWnd, UINT id, UINT pos); +void LvSetEnhanced(HWND hWnd, UINT id, bool enable); +void EditBoxSetEnhanced(HWND hWnd, UINT id, bool enable); void AllowFGWindow(UINT process_id); HWND SearchWindow(wchar_t *caption); char *RemoteDlg(HWND hWnd, char *regkey, UINT icon, wchar_t *caption, wchar_t *title, char *default_host); diff --git a/src/Cedar/Wpc.c b/src/Cedar/Wpc.c index 9ae5f8e5..22faaf5e 100644 --- a/src/Cedar/Wpc.c +++ b/src/Cedar/Wpc.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Wpc.c @@ -631,9 +525,7 @@ SOCK *WpcSockConnectEx(WPC_CONNECT *param, UINT *error_code, UINT timeout, bool break; case PROXY_HTTP: - sock = ProxyConnectEx2(&c, param->ProxyHostName, param->ProxyPort, - param->HostName, param->Port, - param->ProxyUsername, param->ProxyPassword, false, cancel, NULL, timeout); + sock = ProxyConnectEx3(&c, param, false, cancel, NULL, timeout); if (sock == NULL) { err = c.Err; @@ -641,6 +533,7 @@ SOCK *WpcSockConnectEx(WPC_CONNECT *param, UINT *error_code, UINT timeout, bool break; case PROXY_SOCKS: + // SOCKS4 connection sock = SocksConnectEx2(&c, param->ProxyHostName, param->ProxyPort, param->HostName, param->Port, param->ProxyUsername, false, cancel, NULL, timeout, NULL); @@ -649,6 +542,14 @@ SOCK *WpcSockConnectEx(WPC_CONNECT *param, UINT *error_code, UINT timeout, bool err = c.Err; } break; + + case PROXY_SOCKS5: + // SOCKS5 connection + sock = Socks5Connect(&c, param, false, cancel, NULL, timeout, NULL); + if (sock == NULL) + { + err = c.Err; + } } if (error_code != NULL) @@ -678,6 +579,7 @@ SOCK *WpcSockConnect2(char *hostname, UINT port, INTERNET_SETTING *t, UINT *erro c.ProxyPort = t->ProxyPort; StrCpy(c.ProxyUsername, sizeof(c.ProxyUsername), t->ProxyUsername); StrCpy(c.ProxyPassword, sizeof(c.ProxyPassword), t->ProxyPassword); + StrCpy(c.CustomHttpHeader, sizeof(c.CustomHttpHeader), t->CustomHttpHeader); return WpcSockConnect(&c, error_code, timeout); } @@ -770,6 +672,7 @@ BUF *HttpRequestEx3(URL_DATA *data, INTERNET_SETTING *setting, con.ProxyPort = setting->ProxyPort; StrCpy(con.ProxyUsername, sizeof(con.ProxyUsername), setting->ProxyUsername); StrCpy(con.ProxyPassword, sizeof(con.ProxyPassword), setting->ProxyPassword); + StrCpy(con.CustomHttpHeader, sizeof(con.CustomHttpHeader), setting->CustomHttpHeader); if (setting->ProxyType != PROXY_HTTP || data->Secure) { diff --git a/src/Cedar/Wpc.h b/src/Cedar/Wpc.h index 99bf4cb4..016cd72c 100644 --- a/src/Cedar/Wpc.h +++ b/src/Cedar/Wpc.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Wpc.h @@ -126,25 +20,27 @@ // Connection parameters struct WPC_CONNECT { - char HostName[MAX_HOST_NAME_LEN + 1]; // Host name - UINT Port; // Port number - UINT ProxyType; // Type of proxy server - char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name - UINT ProxyPort; // Proxy server port number - char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name - char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password - bool UseCompress; // Use of compression - bool DontCheckCert; // Do not check the certificate + char HostName[MAX_HOST_NAME_LEN + 1]; // Host name + UINT Port; // Port number + UINT ProxyType; // Type of proxy server + char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name + UINT ProxyPort; // Proxy server port number + char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name + char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password + char CustomHttpHeader[HTTP_CUSTOM_HEADER_MAX_SIZE + 1]; // Custom HTTP header + bool UseCompress; // Use of compression + bool DontCheckCert; // Do not check the certificate }; // Internet connection settings struct INTERNET_SETTING { - UINT ProxyType; // Type of proxy server - char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name - UINT ProxyPort; // Proxy server port number - char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name - char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password + UINT ProxyType; // Type of proxy server + char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name + UINT ProxyPort; // Proxy server port number + char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name + char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password + char CustomHttpHeader[HTTP_CUSTOM_HEADER_MAX_SIZE + 1]; // Custom HTTP header }; // URL diff --git a/src/CurrentBuild.txt b/src/CurrentBuild.txt index ca4d8e5b..be51626c 100644 --- a/src/CurrentBuild.txt +++ b/src/CurrentBuild.txt @@ -1,5 +1,5 @@ VERSION_MAJOR 5 VERSION_MINOR 1 -VERSION_BUILD 9657 +VERSION_BUILD 9671 BUILD_NAME unstable -BUILD_DATE 20180113_003620 +BUILD_DATE 20190710_000000 diff --git a/src/GlobalConst.h b/src/GlobalConst.h index 2ba06c54..b7662d3b 100644 --- a/src/GlobalConst.h +++ b/src/GlobalConst.h @@ -1,112 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Global Constants Header -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. - #pragma warning(disable : 4819) diff --git a/src/Mayaqua/cpu_features b/src/Mayaqua/3rdparty/cpu_features similarity index 100% rename from src/Mayaqua/cpu_features rename to src/Mayaqua/3rdparty/cpu_features diff --git a/src/Mayaqua/3rdparty/zlib b/src/Mayaqua/3rdparty/zlib new file mode 160000 index 00000000..cacf7f1d --- /dev/null +++ b/src/Mayaqua/3rdparty/zlib @@ -0,0 +1 @@ +Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f diff --git a/src/Mayaqua/CMakeLists.txt b/src/Mayaqua/CMakeLists.txt index 1117f637..b4a536c3 100644 --- a/src/Mayaqua/CMakeLists.txt +++ b/src/Mayaqua/CMakeLists.txt @@ -1,34 +1,93 @@ file(GLOB SOURCES_MAYAQUA "*.c") file(GLOB HEADERS_MAYAQUA "*.h") -add_library(mayaqua STATIC ${SOURCES_MAYAQUA} ${HEADERS_MAYAQUA}) +if(WIN32) + add_library(mayaqua STATIC ${SOURCES_MAYAQUA} ${HEADERS_MAYAQUA}) +else() + add_library(mayaqua SHARED ${SOURCES_MAYAQUA} ${HEADERS_MAYAQUA}) +endif() target_include_directories(mayaqua PUBLIC .) set_target_properties(mayaqua PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp/Mayaqua" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp/Mayaqua" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp/Mayaqua" + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" ) -find_package(OpenSSL REQUIRED) -find_package(Threads REQUIRED) -find_package(ZLIB REQUIRED) +if(WIN32) + set_target_properties(mayaqua + PROPERTIES + COMPILE_PDB_NAME "mayaqua" + COMPILE_PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) -# In some cases libiconv is not included in libc -find_library(LIB_ICONV iconv) + add_subdirectory(3rdparty/zlib) -add_subdirectory(cpu_features) + target_include_directories(mayaqua PRIVATE win32_inc) + target_include_directories(mayaqua PRIVATE 3rdparty/zlib) -target_include_directories(mayaqua PRIVATE cpu_features/include) + if(${COMPILER_ARCHITECTURE} STREQUAL "x64") + find_library(LIB_SSL + NAMES libssl ssleay32 + HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}" + ) -target_link_libraries(mayaqua cpu_features OpenSSL::SSL OpenSSL::Crypto Threads::Threads ZLIB::ZLIB) + find_library(LIB_CRYPTO + NAMES libcrypto libeay32 + HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}" + ) + else() + find_library(LIB_SSL + NAMES libssl ssleay32 + HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}" + ) -if(LIB_ICONV) - target_link_libraries(mayaqua ${LIB_ICONV}) + find_library(LIB_CRYPTO + NAMES libcrypto libeay32 + HINTS "${TOP_DIRECTORY}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}" + ) + endif() + + target_link_libraries(mayaqua PRIVATE zlibstatic ${LIB_SSL} ${LIB_CRYPTO}) endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") - target_link_libraries(mayaqua nsl socket) +if(UNIX) + find_package(OpenSSL REQUIRED) + find_package(Threads REQUIRED) + find_package(ZLIB REQUIRED) + + # In some cases libiconv is not included in libc + find_library(LIB_ICONV iconv) + + find_library(LIB_RT rt) + + target_link_libraries(mayaqua PRIVATE OpenSSL::SSL OpenSSL::Crypto Threads::Threads ZLIB::ZLIB) + + if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7l|aarch64|s390x)$" OR NOT HAVE_SYS_AUXV) + add_definitions(-DSKIP_CPU_FEATURES) + else() + add_subdirectory(3rdparty/cpu_features) + set_property(TARGET cpu_features PROPERTY POSITION_INDEPENDENT_CODE ON) + target_link_libraries(mayaqua PRIVATE cpu_features) + endif() + + if(LIB_RT) + target_link_libraries(mayaqua PRIVATE rt) + endif() + + if(LIB_ICONV) + target_link_libraries(mayaqua PRIVATE ${LIB_ICONV}) + endif() + + if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + target_link_libraries(mayaqua PRIVATE nsl socket) + endif() + + install(TARGETS mayaqua + COMPONENT "common" + DESTINATION "${CMAKE_INSTALL_LIBDIR}" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) endif() diff --git a/src/Mayaqua/Cfg.c b/src/Mayaqua/Cfg.c index 8dd2f1d2..4407ed04 100644 --- a/src/Mayaqua/Cfg.c +++ b/src/Mayaqua/Cfg.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Cfg.c @@ -244,10 +138,6 @@ CFG_RW *NewCfgRw(FOLDER **root, char *cfg_name) { return NewCfgRwEx(root, cfg_name, false); } -CFG_RW *NewCfgRwW(FOLDER **root, wchar_t *cfg_name) -{ - return NewCfgRwExW(root, cfg_name, false); -} CFG_RW *NewCfgRwEx(FOLDER **root, char *cfg_name, bool dont_backup) { wchar_t *cfg_name_w = CopyStrToUni(cfg_name); @@ -556,7 +446,6 @@ FOLDER *CfgReadW(wchar_t *name) FOLDER *f; bool delete_new = false; bool binary_file = false; - bool invalid_file = false; UCHAR header[8]; bool has_eof = false; // Validate arguments @@ -613,11 +502,6 @@ FOLDER *CfgReadW(wchar_t *name) { // Read the original file too if the size of temporary file is 0 if (FileSize(o) == 0) - { - invalid_file = true; - } - - if (invalid_file) { FileClose(o); o = FileOpenW(name, false); @@ -666,7 +550,6 @@ FOLDER *CfgReadW(wchar_t *name) if (Cmp(hash1, hash2, SHA1_SIZE) != 0) { // Corrupted file - invalid_file = true; FreeBuf(b); return NULL; } @@ -700,46 +583,6 @@ FOLDER *CfgReadW(wchar_t *name) return f; } -// Test of Cfg -void CfgTest2(FOLDER *f, UINT n) -{ -} - -void CfgTest() -{ -#if 0 - FOLDER *root; - BUF *b; - Debug("\nCFG Test Begin\n"); - - root = CfgCreateFolder(NULL, TAG_ROOT); - CfgTest2(root, 5); - - b = CfgFolderToBufText(root); - //Print("%s\n", b->Buf); - SeekBuf(b, 0, 0); - - CfgDeleteFolder(root); - - DumpBuf(b, "test1.config"); - - root = CfgBufTextToFolder(b); - - FreeBuf(b); - - b = CfgFolderToBufText(root); -// Print("%s\n", b->Buf); - DumpBuf(b, "test2.config"); - FreeBuf(b); - - CfgSave(root, "test.txt"); - - CfgDeleteFolder(root); - - Debug("\nCFG Test End\n"); -#endif -} - // Read one line char *CfgReadNextLine(BUF *b) { @@ -1111,10 +954,6 @@ BUF *CfgFolderToBufBin(FOLDER *f) } // Convert the folder to a stream text -BUF *CfgFolderToBufText(FOLDER *f) -{ - return CfgFolderToBufTextEx(f, false); -} BUF *CfgFolderToBufTextEx(FOLDER *f, bool no_banner) { BUF *b; @@ -1421,17 +1260,6 @@ void CfgAddData(BUF *b, UINT type, char *name, char *data, char *sub, UINT depth Free(tmp); } -// Convert the data type string to an integer value -UINT CfgStrToType(char *str) -{ - if (!StrCmpi(str, TAG_INT)) return ITEM_TYPE_INT; - if (!StrCmpi(str, TAG_INT64)) return ITEM_TYPE_INT64; - if (!StrCmpi(str, TAG_BYTE)) return ITEM_TYPE_BYTE; - if (!StrCmpi(str, TAG_STRING)) return ITEM_TYPE_STRING; - if (!StrCmpi(str, TAG_BOOL)) return ITEM_TYPE_BOOL; - return 0; -} - // Convert the type of data to a string char *CfgTypeToStr(UINT type) { @@ -2101,14 +1929,12 @@ ITEM *CfgAddInt(FOLDER *f, char *name, UINT i) // Adding a bool type ITEM *CfgAddBool(FOLDER *f, char *name, bool b) { - bool v; // Validate arguments if (f == NULL || name == NULL) { return NULL; } - v = b ? 1 : 0; return CfgCreateItem(f, name, ITEM_TYPE_BOOL, &b, sizeof(bool)); } diff --git a/src/Mayaqua/Cfg.h b/src/Mayaqua/Cfg.h index 2ffe4fb5..339753d6 100644 --- a/src/Mayaqua/Cfg.h +++ b/src/Mayaqua/Cfg.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Cfg.h @@ -210,14 +104,11 @@ BUF *CfgGetBuf(FOLDER *f, char *name); bool CfgGetStr(FOLDER *f, char *name, char *str, UINT size); bool CfgGetUniStr(FOLDER *f, char *name, wchar_t *str, UINT size); bool CfgIsItem(FOLDER *f, char *name); -void CfgTest(); -void CfgTest2(FOLDER *f, UINT n); char *CfgEscape(char *name); bool CfgCheckCharForName(char c); char *CfgUnescape(char *str); BUF *CfgFolderToBuf(FOLDER *f, bool textmode); BUF *CfgFolderToBufEx(FOLDER *f, bool textmode, bool no_banner); -BUF *CfgFolderToBufText(FOLDER *f); BUF *CfgFolderToBufTextEx(FOLDER *f, bool no_banner); BUF *CfgFolderToBufBin(FOLDER *f); void CfgOutputFolderText(BUF *b, FOLDER *f, UINT depth); @@ -226,7 +117,6 @@ void CfgAddLine(BUF *b, char *str, UINT depth); void CfgAddDeclare(BUF *b, char *name, UINT depth); void CfgAddEnd(BUF *b, UINT depth); void CfgAddData(BUF *b, UINT type, char *name, char *data, char *sub, UINT depth); -UINT CfgStrToType(char *str); char *CfgTypeToStr(UINT type); void CfgAddItemText(BUF *b, ITEM *t, UINT depth); bool CfgEnumFolderProc(FOLDER *f, void *param); @@ -248,7 +138,6 @@ FOLDER *CfgCreateRoot(); void CfgTest(); void CfgTest2(FOLDER *f, UINT n); CFG_RW *NewCfgRw(FOLDER **root, char *cfg_name); -CFG_RW *NewCfgRwW(FOLDER **root, wchar_t *cfg_name); CFG_RW *NewCfgRwEx(FOLDER **root, char *cfg_name, bool dont_backup); CFG_RW *NewCfgRwExW(FOLDER **root, wchar_t *cfg_name, bool dont_backup); CFG_RW *NewCfgRwEx2W(FOLDER **root, wchar_t *cfg_name, bool dont_backup, wchar_t *template_name); diff --git a/src/Mayaqua/Encrypt.c b/src/Mayaqua/Encrypt.c index 249ab5ab..502aa8d5 100644 --- a/src/Mayaqua/Encrypt.c +++ b/src/Mayaqua/Encrypt.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Encrypt.c @@ -124,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -139,7 +34,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -148,7 +45,11 @@ #ifdef _MSC_VER #include // For __cpuid() #else // _MSC_VER + +#ifndef SKIP_CPU_FEATURES #include "cpu_features_macros.h" +#endif + #if defined(CPU_FEATURES_ARCH_X86) #include "cpuinfo_x86.h" #elif defined(CPU_FEATURES_ARCH_ARM) @@ -461,6 +362,13 @@ UINT MdProcess(MD *md, void *dest, void *src, UINT size) if (md->IsHMac) { + // WARNING: Do not remove the call to HMAC_Init_ex(), it's required even if the context is initialized by SetMdKey()! + if (HMAC_Init_ex(md->Ctx, NULL, 0, NULL, NULL) == false) + { + Debug("MdProcess(): HMAC_Init_ex() failed with error: %s\n", OpenSSL_Error()); + return 0; + } + if (HMAC_Update(md->Ctx, src, size) == false) { Debug("MdProcess(): HMAC_Update() failed with error: %s\n", OpenSSL_Error()); @@ -559,6 +467,7 @@ CIPHER *NewCipher(char *name) EVP_CIPHER_CTX_init(c->Ctx); #endif + c->IsAeadCipher = EVP_CIPHER_flags(c->Cipher) & EVP_CIPH_FLAG_AEAD_CIPHER; c->BlockSize = EVP_CIPHER_block_size(c->Cipher); c->KeySize = EVP_CIPHER_key_length(c->Cipher); c->IvSize = EVP_CIPHER_iv_length(c->Cipher); @@ -623,6 +532,74 @@ UINT CipherProcess(CIPHER *c, void *iv, void *dest, void *src, UINT size) return r + r2; } +// Process encryption / decryption (AEAD) +UINT CipherProcessAead(CIPHER *c, void *iv, void *tag, UINT tag_size, void *dest, void *src, UINT src_size, void *aad, UINT aad_size) +{ + int r = src_size; + int r2 = 0; + // Validate arguments + if (c == NULL) + { + return 0; + } + else if (c->IsNullCipher) + { + Copy(dest, src, src_size); + return src_size; + } + else if (c->IsAeadCipher == false || iv == NULL || tag == NULL || tag_size == 0 || dest == NULL || src == NULL || src_size == 0) + { + return 0; + } + + if (EVP_CipherInit_ex(c->Ctx, NULL, NULL, NULL, iv, c->Encrypt) == false) + { + Debug("CipherProcessAead(): EVP_CipherInit_ex() failed with error: %s\n", OpenSSL_Error()); + return 0; + } + + if (c->Encrypt == false) + { + if (EVP_CIPHER_CTX_ctrl(c->Ctx, EVP_CTRL_AEAD_SET_TAG, tag_size, tag) == false) + { + Debug("CipherProcessAead(): EVP_CIPHER_CTX_ctrl() failed to set the tag!\n"); + return 0; + } + } + + if (aad != NULL && aad_size != 0) + { + if (EVP_CipherUpdate(c->Ctx, NULL, &r, aad, aad_size) == false) + { + Debug("CipherProcessAead(): EVP_CipherUpdate() failed with error: %s\n", OpenSSL_Error()); + return 0; + } + } + + if (EVP_CipherUpdate(c->Ctx, dest, &r, src, src_size) == false) + { + Debug("CipherProcessAead(): EVP_CipherUpdate() failed with error: %s\n", OpenSSL_Error()); + return 0; + } + + if (EVP_CipherFinal_ex(c->Ctx, ((UCHAR *)dest) + (UINT)r, &r2) == false) + { + Debug("CipherProcessAead(): EVP_CipherFinal_ex() failed with error: %s\n", OpenSSL_Error()); + return 0; + } + + if (c->Encrypt) + { + if (EVP_CIPHER_CTX_ctrl(c->Ctx, EVP_CTRL_AEAD_GET_TAG, tag_size, tag) == false) + { + Debug("CipherProcessAead(): EVP_CIPHER_CTX_ctrl() failed to get the tag!\n"); + return 0; + } + } + + return r + r2; +} + // Release of the cipher object void FreeCipher(CIPHER *c) { @@ -781,9 +758,18 @@ BUF *BigNumToBuf(const BIGNUM *bn) return b; } +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +// Return the thread ID +static void OpenSSL_Id(CRYPTO_THREADID *id) +{ + CRYPTO_THREADID_set_numeric(id, (unsigned long)ThreadId()); +} +#endif + // Initialization of the lock of OpenSSL void OpenSSL_InitLock() { +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) UINT i; // Initialization of the lock object @@ -796,12 +782,14 @@ void OpenSSL_InitLock() // Setting the lock function CRYPTO_set_locking_callback(OpenSSL_Lock); - CRYPTO_set_id_callback(OpenSSL_Id); + CRYPTO_THREADID_set_callback(OpenSSL_Id); +#endif } // Release of the lock of OpenSSL void OpenSSL_FreeLock() { +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) UINT i; for (i = 0;i < ssl_lock_num;i++) @@ -812,12 +800,14 @@ void OpenSSL_FreeLock() ssl_lock_obj = NULL; CRYPTO_set_locking_callback(NULL); - CRYPTO_set_id_callback(NULL); + CRYPTO_THREADID_set_callback(NULL); +#endif } // Lock function for OpenSSL void OpenSSL_Lock(int mode, int n, const char *file, int line) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) LOCK *lock = ssl_lock_obj[n]; if (mode & CRYPTO_LOCK) @@ -830,12 +820,7 @@ void OpenSSL_Lock(int mode, int n, const char *file, int line) // Unlock Unlock(lock); } -} - -// Return the thread ID -unsigned long OpenSSL_Id(void) -{ - return (unsigned long)ThreadId(); +#endif } char *OpenSSL_Error() @@ -1629,7 +1614,7 @@ X509 *NewX509(K *pub, K *priv, X *ca, NAME *name, UINT days, X_SERIAL *serial) { X509 *x509; UINT64 notBefore, notAfter; - ASN1_TIME *t1, *t2; + const ASN1_TIME *t1, *t2; X509_NAME *subject_name, *issuer_name; X509_EXTENSION *ex = NULL; X509_EXTENSION *eku = NULL; @@ -1663,14 +1648,14 @@ X509 *NewX509(K *pub, K *priv, X *ca, NAME *name, UINT days, X_SERIAL *serial) X509_set_version(x509, 2L); // Set the Expiration - t1 = X509_get_notBefore(x509); - t2 = X509_get_notAfter(x509); - if (!UINT64ToAsn1Time(t1, notBefore)) + t1 = X509_get0_notBefore(x509); + t2 = X509_get0_notAfter(x509); + if (!UINT64ToAsn1Time((void *)t1, notBefore)) { FreeX509(x509); return NULL; } - if (!UINT64ToAsn1Time(t2, notAfter)) + if (!UINT64ToAsn1Time((void *)t2, notAfter)) { FreeX509(x509); return NULL; @@ -1767,7 +1752,7 @@ X509 *NewRootX509(K *pub, K *priv, NAME *name, UINT days, X_SERIAL *serial) { X509 *x509; UINT64 notBefore, notAfter; - ASN1_TIME *t1, *t2; + const ASN1_TIME *t1, *t2; X509_NAME *subject_name, *issuer_name; X509_EXTENSION *ex = NULL; X509_EXTENSION *eku = NULL; @@ -1805,14 +1790,14 @@ X509 *NewRootX509(K *pub, K *priv, NAME *name, UINT days, X_SERIAL *serial) X509_set_version(x509, 2L); // Set the Expiration - t1 = X509_get_notBefore(x509); - t2 = X509_get_notAfter(x509); - if (!UINT64ToAsn1Time(t1, notBefore)) + t1 = X509_get0_notBefore(x509); + t2 = X509_get0_notAfter(x509); + if (!UINT64ToAsn1Time((void *)t1, notBefore)) { FreeX509(x509); return NULL; } - if (!UINT64ToAsn1Time(t2, notAfter)) + if (!UINT64ToAsn1Time((void *)t2, notAfter)) { FreeX509(x509); return NULL; @@ -2222,7 +2207,9 @@ bool RsaVerify(void *data, UINT data_size, void *sign, K *k) bool RsaVerifyEx(void *data, UINT data_size, void *sign, K *k, UINT bits) { UCHAR hash_data[SIGN_HASH_SIZE]; - UCHAR decrypt_data[SIGN_HASH_SIZE]; + UCHAR *decrypt_data; + RSA *rsa; + UINT rsa_size; // Validate arguments if (data == NULL || sign == NULL || k == NULL || k->private_key != false) { @@ -2233,24 +2220,38 @@ bool RsaVerifyEx(void *data, UINT data_size, void *sign, K *k, UINT bits) bits = RSA_KEY_SIZE; } + rsa = EVP_PKEY_get0_RSA(k->pkey); + if (rsa == NULL) + { + return false; + } + // Hash the data if (HashForSign(hash_data, sizeof(hash_data), data, data_size) == false) { return false; } + rsa_size = RSA_size(rsa); + rsa_size = MAX(rsa_size, 1024); // For just in case + decrypt_data = ZeroMalloc(rsa_size); + // Decode the signature - if (RSA_public_decrypt(bits / 8, sign, decrypt_data, EVP_PKEY_get0_RSA(k->pkey), RSA_PKCS1_PADDING) <= 0) + if (RSA_public_decrypt(bits / 8, sign, decrypt_data, rsa, RSA_PKCS1_PADDING) <= 0) { + Free(decrypt_data); return false; } // Comparison if (Cmp(decrypt_data, hash_data, SIGN_HASH_SIZE) != 0) { + Free(decrypt_data); return false; } + Free(decrypt_data); + return true; } @@ -2346,6 +2347,7 @@ bool RsaCheck() ret = BN_set_word(e, RSA_F4); if (ret == 0) { + BN_free(e); Debug("BN_set_word: err=%s\n", ERR_error_string(ERR_get_error(), errbuf)); return false; } @@ -2355,6 +2357,7 @@ bool RsaCheck() { rsa = RSA_new(); ret = RSA_generate_key_ex(rsa, bit, e, NULL); + BN_free(e); } Unlock(openssl_lock); if (ret == 0) @@ -2427,6 +2430,7 @@ bool RsaGen(K **priv, K **pub, UINT bit) ret = BN_set_word(e, RSA_F4); if (ret == 0) { + BN_free(e); Debug("BN_set_word: err=%s\n", ERR_error_string(ERR_get_error(), errbuf)); return false; } @@ -2436,6 +2440,7 @@ bool RsaGen(K **priv, K **pub, UINT bit) { rsa = RSA_new(); ret = RSA_generate_key_ex(rsa, bit, e, NULL); + BN_free(e); } Unlock(openssl_lock); if (ret == 0) @@ -3706,6 +3711,10 @@ void FreeOpenSSLThreadState() #if OPENSSL_VERSION_NUMBER < 0x10100000L CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); +#else +#ifndef LIBRESSL_VERSION_NUMBER + OPENSSL_thread_stop(); +#endif #endif } @@ -3722,11 +3731,13 @@ void FreeCryptLibrary() openssl_lock = NULL; // RAND_Free_For_SoftEther(); OpenSSL_FreeLock(); - +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #ifdef OPENSSL_FIPS FIPS_mode_set(0); #endif +#ifndef OPENSSL_NO_ENGINE ENGINE_cleanup(); +#endif CONF_modules_unload(1); EVP_cleanup(); @@ -3737,6 +3748,7 @@ void FreeCryptLibrary() #ifndef OPENSSL_NO_COMP SSL_COMP_free_compression_methods(); #endif +#endif } // Initialize the Crypt library @@ -3744,6 +3756,7 @@ void InitCryptLibrary() { char tmp[16]; +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) // RAND_Init_For_SoftEther() openssl_lock = NewLock(); SSL_library_init(); @@ -3752,6 +3765,7 @@ void InitCryptLibrary() OpenSSL_add_all_digests(); ERR_load_crypto_strings(); SSL_load_error_strings(); +#endif ssl_clientcert_index = SSL_get_ex_new_index(0, "struct SslClientCertInfo *", NULL, NULL, NULL); @@ -4418,7 +4432,7 @@ static UINT Internal_HMac(const EVP_MD *md, void *dest, void *key, UINT key_size goto final; } - len = MdProcess(m, dest, src, src_size); + len = MdProcess(m, dest, (void *)src, src_size); if (len == 0) { Debug("Internal_HMac(): MdProcess() returned 0!\n"); @@ -4432,308 +4446,144 @@ final: ///////////////////////// // SHA0 implementation // ///////////////////////// -// -// From: https://bitbucket.org/Polarina/ampheck/src/097585ce2a74/src/ + +// Source codes from: +// https://android.googlesource.com/platform/system/core/+/81df1cc77722000f8d0025c1ab00ced123aa573c/libmincrypt/sha.c +// https://android.googlesource.com/platform/system/core/+/81df1cc77722000f8d0025c1ab00ced123aa573c/include/mincrypt/hash-internal.h +// https://android.googlesource.com/platform/system/core/+/81df1cc77722000f8d0025c1ab00ced123aa573c/include/mincrypt/sha.h + /* - Copyright (C) 2009 Gabriel A. Petursson - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ + * Copyright 2013 The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Google Inc. nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL Google Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -struct ampheck_sha0 -{ - UINT h[5]; - UCHAR buffer[64]; - UINT64 length; -}; -#define ROR(x, y) (((x) >> (y)) ^ ((x) << ((sizeof(x) * 8) - (y)))) -#define ROL(x, y) (((x) << (y)) ^ ((x) >> ((sizeof(x) * 8) - (y)))) -#define UNPACK_32_BE(x, str) { \ - *((str)) = (UCHAR) ((x) >> 24); \ - *((str) + 1) = (UCHAR) ((x) >> 16); \ - *((str) + 2) = (UCHAR) ((x) >> 8); \ - *((str) + 3) = (UCHAR) (x); \ -} -#define UNPACK_64_BE(x, str) { \ - *((str)) = (UCHAR) ((x) >> 56); \ - *((str) + 1) = (UCHAR) ((x) >> 48); \ - *((str) + 2) = (UCHAR) ((x) >> 40); \ - *((str) + 3) = (UCHAR) ((x) >> 32); \ - *((str) + 4) = (UCHAR) ((x) >> 24); \ - *((str) + 5) = (UCHAR) ((x) >> 16); \ - *((str) + 6) = (UCHAR) ((x) >> 8); \ - *((str) + 7) = (UCHAR) (x); \ -} -#define PACK_32_BE(str, x) { \ - *(x) = ((UINT) *((str) ) << 24) \ - ^ ((UINT) *((str) + 1) << 16) \ - ^ ((UINT) *((str) + 2) << 8) \ - ^ ((UINT) *((str) + 3)); \ -} -#define PACK_64_BE(str, x) { \ - *(x) = ((UINT64) *((str) ) << 56) \ - ^ ((UINT64) *((str) + 1) << 48) \ - ^ ((UINT64) *((str) + 2) << 40) \ - ^ ((UINT64) *((str) + 3) << 32) \ - ^ ((UINT64) *((str) + 4) << 24) \ - ^ ((UINT64) *((str) + 5) << 16) \ - ^ ((UINT64) *((str) + 6) << 8) \ - ^ ((UINT64) *((str) + 7)); \ -} -#define UNPACK_32_LE(x, str) { \ - *((str)) = (UCHAR) (x); \ - *((str) + 1) = (UCHAR) ((x) >> 8); \ - *((str) + 2) = (UCHAR) ((x) >> 16); \ - *((str) + 3) = (UCHAR) ((x) >> 24); \ -} -#define UNPACK_64_LE(x, str) { \ - *((str)) = (UCHAR) (x); \ - *((str) + 1) = (UCHAR) ((x) >> 8); \ - *((str) + 2) = (UCHAR) ((x) >> 16); \ - *((str) + 3) = (UCHAR) ((x) >> 24); \ - *((str) + 4) = (UCHAR) ((x) >> 32); \ - *((str) + 5) = (UCHAR) ((x) >> 40); \ - *((str) + 6) = (UCHAR) ((x) >> 48); \ - *((str) + 7) = (UCHAR) ((x) >> 56); \ -} -#define PACK_32_LE(str, x) { \ - *(x) = ((UINT) *((str) )) \ - ^ ((UINT) *((str) + 1) << 8) \ - ^ ((UINT) *((str) + 2) << 16) \ - ^ ((UINT) *((str) + 3) << 24); \ -} -#define PACK_64_LE(str, x) { \ - *(x) = ((UINT64) *((str) )) \ - ^ ((UINT64) *((str) + 1) << 8) \ - ^ ((UINT64) *((str) + 2) << 16) \ - ^ ((UINT64) *((str) + 3) << 24) \ - ^ ((UINT64) *((str) + 4) << 32) \ - ^ ((UINT64) *((str) + 5) << 40) \ - ^ ((UINT64) *((str) + 6) << 48) \ - ^ ((UINT64) *((str) + 7) << 56); \ -} -#define SHA0_R1(x, y, z) ((z ^ (x & (y ^ z))) + 0x5a827999) -#define SHA0_R2(x, y, z) ((x ^ y ^ z) + 0x6ed9eba1) -#define SHA0_R3(x, y, z) (((x & y) | (z & (x | y))) + 0x8f1bbcdc) -#define SHA0_R4(x, y, z) ((x ^ y ^ z) + 0xca62c1d6) -#define SHA0_PRC(a, b, c, d, e, idx, rnd) { \ - wv[e] += ROR(wv[a], 27) + SHA0_R##rnd(wv[b], wv[c], wv[d]) + idx; \ - wv[b] = ROR(wv[b], 2); \ -} -#define SHA0_EXT(i) ( \ - w[i] ^= w[(i - 3) & 0x0F] ^ w[(i - 8) & 0x0F] ^ w[(i - 14) & 0x0F] \ - ) -static void ampheck_sha0_init(struct ampheck_sha0 *ctx); -static void ampheck_sha0_update(struct ampheck_sha0 *ctx, const UCHAR *data, UINT length); -static void ampheck_sha0_finish(const struct ampheck_sha0 *ctx, UCHAR *digest); -static void ampheck_sha0_init(struct ampheck_sha0 *ctx) -{ - ctx->h[0] = 0x67452301; - ctx->h[1] = 0xefcdab89; - ctx->h[2] = 0x98badcfe; - ctx->h[3] = 0x10325476; - ctx->h[4] = 0xc3d2e1f0; - ctx->length = 0; +#define rol(bits, value) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +typedef struct MY_SHA0_CTX { +// const HASH_VTAB * f; + UINT64 count; + UCHAR buf[64]; + UINT state[8]; // upto SHA2 +} MY_SHA0_CTX; + +#define MY_SHA0_DIGEST_SIZE 20 + +static void MY_SHA0_Transform(MY_SHA0_CTX* ctx) { + UINT W[80]; + UINT A, B, C, D, E; + UCHAR* p = ctx->buf; + int t; + for(t = 0; t < 16; ++t) { + UINT tmp = *p++ << 24; + tmp |= *p++ << 16; + tmp |= *p++ << 8; + tmp |= *p++; + W[t] = tmp; + } + for(; t < 80; t++) { + //W[t] = rol(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]); + W[t] = (1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]); + } + A = ctx->state[0]; + B = ctx->state[1]; + C = ctx->state[2]; + D = ctx->state[3]; + E = ctx->state[4]; + for(t = 0; t < 80; t++) { + UINT tmp = rol(5,A) + E + W[t]; + if (t < 20) + tmp += (D^(B&(C^D))) + 0x5A827999; + else if ( t < 40) + tmp += (B^C^D) + 0x6ED9EBA1; + else if ( t < 60) + tmp += ((B&C)|(D&(B|C))) + 0x8F1BBCDC; + else + tmp += (B^C^D) + 0xCA62C1D6; + E = D; + D = C; + C = rol(30,B); + B = A; + A = tmp; + } + ctx->state[0] += A; + ctx->state[1] += B; + ctx->state[2] += C; + ctx->state[3] += D; + ctx->state[4] += E; } - -static void ampheck_sha0_transform(struct ampheck_sha0 *ctx, const UCHAR *data, UINT blocks) -{ - UINT i; - for (i = 0; i < blocks; ++i) - { - UINT wv[5]; - UINT w[16]; - - PACK_32_BE(&data[(i << 6) ], &w[ 0]); - PACK_32_BE(&data[(i << 6) + 4], &w[ 1]); - PACK_32_BE(&data[(i << 6) + 8], &w[ 2]); - PACK_32_BE(&data[(i << 6) + 12], &w[ 3]); - PACK_32_BE(&data[(i << 6) + 16], &w[ 4]); - PACK_32_BE(&data[(i << 6) + 20], &w[ 5]); - PACK_32_BE(&data[(i << 6) + 24], &w[ 6]); - PACK_32_BE(&data[(i << 6) + 28], &w[ 7]); - PACK_32_BE(&data[(i << 6) + 32], &w[ 8]); - PACK_32_BE(&data[(i << 6) + 36], &w[ 9]); - PACK_32_BE(&data[(i << 6) + 40], &w[10]); - PACK_32_BE(&data[(i << 6) + 44], &w[11]); - PACK_32_BE(&data[(i << 6) + 48], &w[12]); - PACK_32_BE(&data[(i << 6) + 52], &w[13]); - PACK_32_BE(&data[(i << 6) + 56], &w[14]); - PACK_32_BE(&data[(i << 6) + 60], &w[15]); - - wv[0] = ctx->h[0]; - wv[1] = ctx->h[1]; - wv[2] = ctx->h[2]; - wv[3] = ctx->h[3]; - wv[4] = ctx->h[4]; - - SHA0_PRC(0, 1, 2, 3, 4, w[ 0], 1); - SHA0_PRC(4, 0, 1, 2, 3, w[ 1], 1); - SHA0_PRC(3, 4, 0, 1, 2, w[ 2], 1); - SHA0_PRC(2, 3, 4, 0, 1, w[ 3], 1); - SHA0_PRC(1, 2, 3, 4, 0, w[ 4], 1); - SHA0_PRC(0, 1, 2, 3, 4, w[ 5], 1); - SHA0_PRC(4, 0, 1, 2, 3, w[ 6], 1); - SHA0_PRC(3, 4, 0, 1, 2, w[ 7], 1); - SHA0_PRC(2, 3, 4, 0, 1, w[ 8], 1); - SHA0_PRC(1, 2, 3, 4, 0, w[ 9], 1); - SHA0_PRC(0, 1, 2, 3, 4, w[10], 1); - SHA0_PRC(4, 0, 1, 2, 3, w[11], 1); - SHA0_PRC(3, 4, 0, 1, 2, w[12], 1); - SHA0_PRC(2, 3, 4, 0, 1, w[13], 1); - SHA0_PRC(1, 2, 3, 4, 0, w[14], 1); - SHA0_PRC(0, 1, 2, 3, 4, w[15], 1); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 0), 1); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 1), 1); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 2), 1); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 3), 1); - - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 4), 2); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 5), 2); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 6), 2); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 7), 2); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 8), 2); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 9), 2); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT(10), 2); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT(11), 2); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT(12), 2); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT(13), 2); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT(14), 2); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT(15), 2); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 0), 2); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 1), 2); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 2), 2); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 3), 2); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 4), 2); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 5), 2); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 6), 2); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 7), 2); - - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 8), 3); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 9), 3); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT(10), 3); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT(11), 3); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT(12), 3); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT(13), 3); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT(14), 3); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT(15), 3); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 0), 3); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 1), 3); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 2), 3); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 3), 3); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 4), 3); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 5), 3); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 6), 3); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 7), 3); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 8), 3); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 9), 3); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT(10), 3); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT(11), 3); - - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT(12), 4); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT(13), 4); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT(14), 4); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT(15), 4); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 0), 4); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 1), 4); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 2), 4); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 3), 4); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 4), 4); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT( 5), 4); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT( 6), 4); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT( 7), 4); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT( 8), 4); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT( 9), 4); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT(10), 4); - SHA0_PRC(0, 1, 2, 3, 4, SHA0_EXT(11), 4); - SHA0_PRC(4, 0, 1, 2, 3, SHA0_EXT(12), 4); - SHA0_PRC(3, 4, 0, 1, 2, SHA0_EXT(13), 4); - SHA0_PRC(2, 3, 4, 0, 1, SHA0_EXT(14), 4); - SHA0_PRC(1, 2, 3, 4, 0, SHA0_EXT(15), 4); - - ctx->h[0] += wv[0]; - ctx->h[1] += wv[1]; - ctx->h[2] += wv[2]; - ctx->h[3] += wv[3]; - ctx->h[4] += wv[4]; +void MY_SHA0_init(MY_SHA0_CTX* ctx) { + //ctx->f = &SHA_VTAB; + ctx->state[0] = 0x67452301; + ctx->state[1] = 0xEFCDAB89; + ctx->state[2] = 0x98BADCFE; + ctx->state[3] = 0x10325476; + ctx->state[4] = 0xC3D2E1F0; + ctx->count = 0; +} +void MY_SHA0_update(MY_SHA0_CTX* ctx, const void* data, int len) { + int i = (int) (ctx->count & 63); + const UCHAR* p = (const UCHAR*)data; + ctx->count += len; + while (len--) { + ctx->buf[i++] = *p++; + if (i == 64) { + MY_SHA0_Transform(ctx); + i = 0; + } } } - -static void ampheck_sha0_update(struct ampheck_sha0 *ctx, const UCHAR *data, UINT size) -{ - UINT tmp = size; - - if (size >= 64 - ctx->length % 64) - { - memcpy(&ctx->buffer[ctx->length % 64], data, 64 - ctx->length % 64); - - data += 64 - ctx->length % 64; - size -= 64 - ctx->length % 64; - - ampheck_sha0_transform(ctx, ctx->buffer, 1); - ampheck_sha0_transform(ctx, data, size / 64); - - data += size & ~63; - size %= 64; - - memcpy(ctx->buffer, data, size); +const UCHAR* MY_SHA0_final(MY_SHA0_CTX* ctx) { + UCHAR *p = ctx->buf; + UINT64 cnt = ctx->count * 8; + int i; + MY_SHA0_update(ctx, (UCHAR*)"\x80", 1); + while ((ctx->count & 63) != 56) { + MY_SHA0_update(ctx, (UCHAR*)"\0", 1); } - else - { - memcpy(&ctx->buffer[ctx->length % 64], data, size); + for (i = 0; i < 8; ++i) { + UCHAR tmp = (UCHAR) (cnt >> ((7 - i) * 8)); + MY_SHA0_update(ctx, &tmp, 1); } - - ctx->length += tmp; + for (i = 0; i < 5; i++) { + UINT tmp = ctx->state[i]; + *p++ = tmp >> 24; + *p++ = tmp >> 16; + *p++ = tmp >> 8; + *p++ = tmp >> 0; + } + return ctx->buf; } - -static void ampheck_sha0_finish(const struct ampheck_sha0 *ctx, UCHAR *digest) -{ - struct ampheck_sha0 tmp; - - memcpy(tmp.h, ctx->h, 5 * sizeof(UINT)); - memcpy(tmp.buffer, ctx->buffer, ctx->length % 64); - - tmp.buffer[ctx->length % 64] = 0x80; - - if (ctx->length % 64 < 56) - { - memset(&tmp.buffer[ctx->length % 64 + 1], 0x00, 55 - ctx->length % 64); - } - else - { - memset(&tmp.buffer[ctx->length % 64 + 1], 0x00, 63 - ctx->length % 64); - ampheck_sha0_transform(&tmp, tmp.buffer, 1); - - memset(tmp.buffer, 0x00, 56); - } - - UNPACK_64_BE(ctx->length * 8, &tmp.buffer[56]); - ampheck_sha0_transform(&tmp, tmp.buffer, 1); - - UNPACK_32_BE(tmp.h[0], &digest[ 0]); - UNPACK_32_BE(tmp.h[1], &digest[ 4]); - UNPACK_32_BE(tmp.h[2], &digest[ 8]); - UNPACK_32_BE(tmp.h[3], &digest[12]); - UNPACK_32_BE(tmp.h[4], &digest[16]); +/* Convenience function */ +const UCHAR* MY_SHA0_hash(const void* data, int len, UCHAR* digest) { + MY_SHA0_CTX ctx; + MY_SHA0_init(&ctx); + MY_SHA0_update(&ctx, data, len); + memcpy(digest, MY_SHA0_final(&ctx), MY_SHA0_DIGEST_SIZE); + return digest; } - static void Internal_Sha0(unsigned char *dest, const unsigned char *src, const UINT size) { - struct ampheck_sha0 c; - - ampheck_sha0_init(&c); - ampheck_sha0_update(&c, src, size); - ampheck_sha0_finish(&c, dest); + MY_SHA0_hash(src, (int)size, dest); } diff --git a/src/Mayaqua/Encrypt.h b/src/Mayaqua/Encrypt.h index 1b2c0ff9..dc82c562 100644 --- a/src/Mayaqua/Encrypt.h +++ b/src/Mayaqua/Encrypt.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Encrypt.h @@ -246,6 +140,14 @@ void RAND_Free_For_SoftEther(); # define X509_get_serialNumber(x509) ((x509)->cert_info->serialNumber) #endif +#ifndef EVP_CTRL_AEAD_GET_TAG +# define EVP_CTRL_AEAD_GET_TAG EVP_CTRL_GCM_GET_TAG +#endif + +#ifndef EVP_CTRL_AEAD_SET_TAG +# define EVP_CTRL_AEAD_SET_TAG EVP_CTRL_GCM_SET_TAG +#endif + // Crypt context struct CRYPT { @@ -348,7 +250,7 @@ struct DH_CTX struct CIPHER { char Name[MAX_PATH]; - bool IsNullCipher; + bool IsNullCipher, IsAeadCipher; const struct evp_cipher_st *Cipher; struct evp_cipher_ctx_st *Ctx; bool Encrypt; @@ -514,7 +416,6 @@ bool IsAesNiSupported(); void OpenSSL_InitLock(); void OpenSSL_FreeLock(); void OpenSSL_Lock(int mode, int n, const char *file, int line); -unsigned long OpenSSL_Id(void); void FreeOpenSSLThreadState(); char *OpenSSL_Error(); @@ -523,6 +424,7 @@ CIPHER *NewCipher(char *name); void FreeCipher(CIPHER *c); void SetCipherKey(CIPHER *c, void *key, bool enc); UINT CipherProcess(CIPHER *c, void *iv, void *dest, void *src, UINT size); +UINT CipherProcessAead(CIPHER *c, void *iv, void *tag, UINT tag_size, void *dest, void *src, UINT src_size, void *aad, UINT aad_size); // Hashing MD *NewMd(char *name); diff --git a/src/Mayaqua/FileIO.c b/src/Mayaqua/FileIO.c index 9e089283..2868de18 100644 --- a/src/Mayaqua/FileIO.c +++ b/src/Mayaqua/FileIO.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // FileIO.c @@ -1233,6 +1127,12 @@ void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only) } } + if (InStr(rpath, "\\node_modules\\")) + { + // Exclude node_modules in the hamcore\webroot + ok = false; + } + if (ok) { b = ReadDump(s); @@ -2079,17 +1979,6 @@ void NormalizePath(char *dst, UINT size, char *src) } // Rename the file -bool FileRename(char *old_name, char *new_name) -{ - wchar_t *old_name_w = CopyStrToUni(old_name); - wchar_t *new_name_w = CopyStrToUni(new_name); - bool ret = FileRenameW(old_name_w, new_name_w); - - Free(old_name_w); - Free(new_name_w); - - return ret; -} bool FileRenameW(wchar_t *old_name, wchar_t *new_name) { wchar_t tmp1[MAX_SIZE]; diff --git a/src/Mayaqua/FileIO.h b/src/Mayaqua/FileIO.h index 452cb759..436aabe7 100644 --- a/src/Mayaqua/FileIO.h +++ b/src/Mayaqua/FileIO.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // FileIO.h @@ -307,7 +201,6 @@ IO *FileOpenEx(char *name, bool write_mode, bool read_lock); IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock); void ConvertPathW(wchar_t *path); bool FileRenameInnerW(wchar_t *old_name, wchar_t *new_name); -bool FileRename(char *old_name, char *new_name); bool FileRenameW(wchar_t *old_name, wchar_t *new_name); void NormalizePath(char *dst, UINT size, char *src); void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src); diff --git a/src/Mayaqua/HTTP.c b/src/Mayaqua/HTTP.c new file mode 100644 index 00000000..7869a55c --- /dev/null +++ b/src/Mayaqua/HTTP.c @@ -0,0 +1,1577 @@ +#include + +#include + +static char http_404_str[] = "\r\n\r\n404 Not Found\r\n\r\n

Not Found

\r\nThe requested URL $TARGET$ was not found on this server.

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; +static char http_403_str[] = "\r\n\r\n403 Forbidden\r\n\r\n

Forbidden

\r\nYou don't have permission to access $TARGET$\r\non this server.

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; +static char http_500_str[] = "\r\n\r\n500 Server Error\r\n\r\n

Server Error

\r\nServer Error

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; +static char http_501_str[] = "\r\n\r\n501 Method Not Implemented\r\n\r\n

Method Not Implemented

\r\n$METHOD$ to $TARGET$ not supported.

\r\nInvalid method in request $METHOD$ $TARGET$ $VERSION$

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; + +// MIME list from https://www.freeformatter.com/mime-types-list.html +static const HTTP_MIME_TYPE http_mime_types[] = +{ + {".x3d", "application/vnd.hzn-3d-crossword"}, + {".3gp", "video/3gpp"}, + {".3g2", "video/3gpp2"}, + {".mseq", "application/vnd.mseq"}, + {".pwn", "application/vnd.3m.post-it-notes"}, + {".plb", "application/vnd.3gpp.pic-bw-large"}, + {".psb", "application/vnd.3gpp.pic-bw-small"}, + {".pvb", "application/vnd.3gpp.pic-bw-var"}, + {".tcap", "application/vnd.3gpp2.tcap"}, + {".7z", "application/x-7z-compressed"}, + {".abw", "application/x-abiword"}, + {".ace", "application/x-ace-compressed"}, + {".acc", "application/vnd.americandynamics.acc"}, + {".acu", "application/vnd.acucobol"}, + {".atc", "application/vnd.acucorp"}, + {".adp", "audio/adpcm"}, + {".aab", "application/x-authorware-bin"}, + {".aam", "application/x-authorware-map"}, + {".aas", "application/x-authorware-seg"}, + {".air", "application/vnd.adobe.air-application-installer-package+zip"}, + {".swf", "application/x-shockwave-flash"}, + {".fxp", "application/vnd.adobe.fxp"}, + {".pdf", "application/pdf"}, + {".ppd", "application/vnd.cups-ppd"}, + {".dir", "application/x-director"}, + {".xdp", "application/vnd.adobe.xdp+xml"}, + {".xfdf", "application/vnd.adobe.xfdf"}, + {".aac", "audio/x-aac"}, + {".ahead", "application/vnd.ahead.space"}, + {".azf", "application/vnd.airzip.filesecure.azf"}, + {".azs", "application/vnd.airzip.filesecure.azs"}, + {".azw", "application/vnd.amazon.ebook"}, + {".ami", "application/vnd.amiga.ami"}, + {".apk", "application/vnd.android.package-archive"}, + {".cii", "application/vnd.anser-web-certificate-issue-initiation"}, + {".fti", "application/vnd.anser-web-funds-transfer-initiation"}, + {".atx", "application/vnd.antix.game-component"}, + {".dmg", "application/x-apple-diskimage"}, + {".mpkg", "application/vnd.apple.installer+xml"}, + {".aw", "application/applixware"}, + {".les", "application/vnd.hhe.lesson-player"}, + {".swi", "application/vnd.aristanetworks.swi"}, + {".s", "text/x-asm"}, + {".atomcat", "application/atomcat+xml"}, + {".atomsvc", "application/atomsvc+xml"}, + {".atom", "application/atom+xml"}, + {".ac", "application/pkix-attr-cert"}, + {".aif", "audio/x-aiff"}, + {".avi", "video/x-msvideo"}, + {".aep", "application/vnd.audiograph"}, + {".dxf", "image/vnd.dxf"}, + {".dwf", "model/vnd.dwf"}, + {".par", "text/plain-bas"}, + {".bcpio", "application/x-bcpio"}, + {".bin", "application/octet-stream"}, + {".bmp", "image/bmp"}, + {".torrent", "application/x-bittorrent"}, + {".cod", "application/vnd.rim.cod"}, + {".mpm", "application/vnd.blueice.multipass"}, + {".bmi", "application/vnd.bmi"}, + {".sh", "application/x-sh"}, + {".btif", "image/prs.btif"}, + {".rep", "application/vnd.businessobjects"}, + {".bz", "application/x-bzip"}, + {".bz2", "application/x-bzip2"}, + {".csh", "application/x-csh"}, + {".c", "text/x-c"}, + {".cdxml", "application/vnd.chemdraw+xml"}, + {".css", "text/css"}, + {".cdx", "chemical/x-cdx"}, + {".cml", "chemical/x-cml"}, + {".csml", "chemical/x-csml"}, + {".cdbcmsg", "application/vnd.contact.cmsg"}, + {".cla", "application/vnd.claymore"}, + {".c4g", "application/vnd.clonk.c4group"}, + {".sub", "image/vnd.dvb.subtitle"}, + {".cdmia", "application/cdmi-capability"}, + {".cdmic", "application/cdmi-container"}, + {".cdmid", "application/cdmi-domain"}, + {".cdmio", "application/cdmi-object"}, + {".cdmiq", "application/cdmi-queue"}, + {".c11amc", "application/vnd.cluetrust.cartomobile-config"}, + {".c11amz", "application/vnd.cluetrust.cartomobile-config-pkg"}, + {".ras", "image/x-cmu-raster"}, + {".dae", "model/vnd.collada+xml"}, + {".csv", "text/csv"}, + {".cpt", "application/mac-compactpro"}, + {".wmlc", "application/vnd.wap.wmlc"}, + {".cgm", "image/cgm"}, + {".ice", "x-conference/x-cooltalk"}, + {".cmx", "image/x-cmx"}, + {".xar", "application/vnd.xara"}, + {".cmc", "application/vnd.cosmocaller"}, + {".cpio", "application/x-cpio"}, + {".clkx", "application/vnd.crick.clicker"}, + {".clkk", "application/vnd.crick.clicker.keyboard"}, + {".clkp", "application/vnd.crick.clicker.palette"}, + {".clkt", "application/vnd.crick.clicker.template"}, + {".clkw", "application/vnd.crick.clicker.wordbank"}, + {".wbs", "application/vnd.criticaltools.wbs+xml"}, + {".cryptonote", "application/vnd.rig.cryptonote"}, + {".cif", "chemical/x-cif"}, + {".cmdf", "chemical/x-cmdf"}, + {".cu", "application/cu-seeme"}, + {".cww", "application/prs.cww"}, + {".curl", "text/vnd.curl"}, + {".dcurl", "text/vnd.curl.dcurl"}, + {".mcurl", "text/vnd.curl.mcurl"}, + {".scurl", "text/vnd.curl.scurl"}, + {".car", "application/vnd.curl.car"}, + {".pcurl", "application/vnd.curl.pcurl"}, + {".cmp", "application/vnd.yellowriver-custom-menu"}, + {".dssc", "application/dssc+der"}, + {".xdssc", "application/dssc+xml"}, + {".deb", "application/x-debian-package"}, + {".uva", "audio/vnd.dece.audio"}, + {".uvi", "image/vnd.dece.graphic"}, + {".uvh", "video/vnd.dece.hd"}, + {".uvm", "video/vnd.dece.mobile"}, + {".uvu", "video/vnd.uvvu.mp4"}, + {".uvp", "video/vnd.dece.pd"}, + {".uvs", "video/vnd.dece.sd"}, + {".uvv", "video/vnd.dece.video"}, + {".dvi", "application/x-dvi"}, + {".seed", "application/vnd.fdsn.seed"}, + {".dtb", "application/x-dtbook+xml"}, + {".res", "application/x-dtbresource+xml"}, + {".ait", "application/vnd.dvb.ait"}, + {".svc", "application/vnd.dvb.service"}, + {".eol", "audio/vnd.digital-winds"}, + {".djvu", "image/vnd.djvu"}, + {".dtd", "application/xml-dtd"}, + {".mlp", "application/vnd.dolby.mlp"}, + {".wad", "application/x-doom"}, + {".dpg", "application/vnd.dpgraph"}, + {".dra", "audio/vnd.dra"}, + {".dfac", "application/vnd.dreamfactory"}, + {".dts", "audio/vnd.dts"}, + {".dtshd", "audio/vnd.dts.hd"}, + {".dwg", "image/vnd.dwg"}, + {".geo", "application/vnd.dynageo"}, + {".es", "application/ecmascript"}, + {".mag", "application/vnd.ecowin.chart"}, + {".mmr", "image/vnd.fujixerox.edmics-mmr"}, + {".rlc", "image/vnd.fujixerox.edmics-rlc"}, + {".exi", "application/exi"}, + {".mgz", "application/vnd.proteus.magazine"}, + {".epub", "application/epub+zip"}, + {".eml", "message/rfc822"}, + {".nml", "application/vnd.enliven"}, + {".xpr", "application/vnd.is-xpr"}, + {".xif", "image/vnd.xiff"}, + {".xfdl", "application/vnd.xfdl"}, + {".emma", "application/emma+xml"}, + {".ez2", "application/vnd.ezpix-album"}, + {".ez3", "application/vnd.ezpix-package"}, + {".fst", "image/vnd.fst"}, + {".fvt", "video/vnd.fvt"}, + {".fbs", "image/vnd.fastbidsheet"}, + {".fe_launch", "application/vnd.denovo.fcselayout-link"}, + {".f4v", "video/x-f4v"}, + {".flv", "video/x-flv"}, + {".fpx", "image/vnd.fpx"}, + {".npx", "image/vnd.net-fpx"}, + {".flx", "text/vnd.fmi.flexstor"}, + {".fli", "video/x-fli"}, + {".ftc", "application/vnd.fluxtime.clip"}, + {".fdf", "application/vnd.fdf"}, + {".f", "text/x-fortran"}, + {".mif", "application/vnd.mif"}, + {".fm", "application/vnd.framemaker"}, + {".fh", "image/x-freehand"}, + {".fsc", "application/vnd.fsc.weblaunch"}, + {".fnc", "application/vnd.frogans.fnc"}, + {".ltf", "application/vnd.frogans.ltf"}, + {".ddd", "application/vnd.fujixerox.ddd"}, + {".xdw", "application/vnd.fujixerox.docuworks"}, + {".xbd", "application/vnd.fujixerox.docuworks.binder"}, + {".oas", "application/vnd.fujitsu.oasys"}, + {".oa2", "application/vnd.fujitsu.oasys2"}, + {".oa3", "application/vnd.fujitsu.oasys3"}, + {".fg5", "application/vnd.fujitsu.oasysgp"}, + {".bh2", "application/vnd.fujitsu.oasysprs"}, + {".spl", "application/x-futuresplash"}, + {".fzs", "application/vnd.fuzzysheet"}, + {".g3", "image/g3fax"}, + {".gmx", "application/vnd.gmx"}, + {".gtw", "model/vnd.gtw"}, + {".txd", "application/vnd.genomatix.tuxedo"}, + {".ggb", "application/vnd.geogebra.file"}, + {".ggt", "application/vnd.geogebra.tool"}, + {".gdl", "model/vnd.gdl"}, + {".gex", "application/vnd.geometry-explorer"}, + {".gxt", "application/vnd.geonext"}, + {".g2w", "application/vnd.geoplan"}, + {".g3w", "application/vnd.geospace"}, + {".gsf", "application/x-font-ghostscript"}, + {".bdf", "application/x-font-bdf"}, + {".gtar", "application/x-gtar"}, + {".texinfo", "application/x-texinfo"}, + {".gnumeric", "application/x-gnumeric"}, + {".kml", "application/vnd.google-earth.kml+xml"}, + {".kmz", "application/vnd.google-earth.kmz"}, + {".gqf", "application/vnd.grafeq"}, + {".gif", "image/gif"}, + {".gv", "text/vnd.graphviz"}, + {".gac", "application/vnd.groove-account"}, + {".ghf", "application/vnd.groove-help"}, + {".gim", "application/vnd.groove-identity-message"}, + {".grv", "application/vnd.groove-injector"}, + {".gtm", "application/vnd.groove-tool-message"}, + {".tpl", "application/vnd.groove-tool-template"}, + {".vcg", "application/vnd.groove-vcard"}, + {".h261", "video/h261"}, + {".h263", "video/h263"}, + {".h264", "video/h264"}, + {".hpid", "application/vnd.hp-hpid"}, + {".hps", "application/vnd.hp-hps"}, + {".hdf", "application/x-hdf"}, + {".rip", "audio/vnd.rip"}, + {".hbci", "application/vnd.hbci"}, + {".jlt", "application/vnd.hp-jlyt"}, + {".pcl", "application/vnd.hp-pcl"}, + {".hpgl", "application/vnd.hp-hpgl"}, + {".hvs", "application/vnd.yamaha.hv-script"}, + {".hvd", "application/vnd.yamaha.hv-dic"}, + {".hvp", "application/vnd.yamaha.hv-voice"}, + {".sfd-hdstx", "application/vnd.hydrostatix.sof-data"}, + {".stk", "application/hyperstudio"}, + {".hal", "application/vnd.hal+xml"}, + {".htm", "text/html; charset=utf-8"}, + {".html", "text/html; charset=utf-8"}, + {".irm", "application/vnd.ibm.rights-management"}, + {".sc", "application/vnd.ibm.secure-container"}, + {".ics", "text/calendar"}, + {".icc", "application/vnd.iccprofile"}, + {".ico", "image/x-icon"}, + {".igl", "application/vnd.igloader"}, + {".ief", "image/ief"}, + {".ivp", "application/vnd.immervision-ivp"}, + {".ivu", "application/vnd.immervision-ivu"}, + {".rif", "application/reginfo+xml"}, + {".3dml", "text/vnd.in3d.3dml"}, + {".spot", "text/vnd.in3d.spot"}, + {".igs", "model/iges"}, + {".i2g", "application/vnd.intergeo"}, + {".cdy", "application/vnd.cinderella"}, + {".xpw", "application/vnd.intercon.formnet"}, + {".fcs", "application/vnd.isac.fcs"}, + {".ipfix", "application/ipfix"}, + {".cer", "application/pkix-cert"}, + {".pki", "application/pkixcmp"}, + {".crl", "application/pkix-crl"}, + {".pkipath", "application/pkix-pkipath"}, + {".igm", "application/vnd.insors.igm"}, + {".rcprofile", "application/vnd.ipunplugged.rcprofile"}, + {".irp", "application/vnd.irepository.package+xml"}, + {".jad", "text/vnd.sun.j2me.app-descriptor"}, + {".jar", "application/java-archive"}, + {".class", "application/java-vm"}, + {".jnlp", "application/x-java-jnlp-file"}, + {".ser", "application/java-serialized-object"}, + {".java", "text/x-java-source"}, + {".js", "application/javascript"}, + {".json", "application/json"}, + {".joda", "application/vnd.joost.joda-archive"}, + {".jpm", "video/jpm"}, + {".jpg", "image/jpeg"}, + {".jpeg", "image/jpeg"}, + {".pjpeg", "image/pjpeg"}, + {".jpgv", "video/jpeg"}, + {".ktz", "application/vnd.kahootz"}, + {".mmd", "application/vnd.chipnuts.karaoke-mmd"}, + {".karbon", "application/vnd.kde.karbon"}, + {".chrt", "application/vnd.kde.kchart"}, + {".kfo", "application/vnd.kde.kformula"}, + {".flw", "application/vnd.kde.kivio"}, + {".kon", "application/vnd.kde.kontour"}, + {".kpr", "application/vnd.kde.kpresenter"}, + {".ksp", "application/vnd.kde.kspread"}, + {".kwd", "application/vnd.kde.kword"}, + {".htke", "application/vnd.kenameaapp"}, + {".kia", "application/vnd.kidspiration"}, + {".kne", "application/vnd.kinar"}, + {".sse", "application/vnd.kodak-descriptor"}, + {".lasxml", "application/vnd.las.las+xml"}, + {".latex", "application/x-latex"}, + {".lbd", "application/vnd.llamagraphics.life-balance.desktop"}, + {".lbe", "application/vnd.llamagraphics.life-balance.exchange+xml"}, + {".jam", "application/vnd.jam"}, + {"0.123", "application/vnd.lotus-1-2-3"}, + {".apr", "application/vnd.lotus-approach"}, + {".pre", "application/vnd.lotus-freelance"}, + {".nsf", "application/vnd.lotus-notes"}, + {".org", "application/vnd.lotus-organizer"}, + {".scm", "application/vnd.lotus-screencam"}, + {".lwp", "application/vnd.lotus-wordpro"}, + {".lvp", "audio/vnd.lucent.voice"}, + {".m3u", "audio/x-mpegurl"}, + {".m4v", "video/x-m4v"}, + {".hqx", "application/mac-binhex40"}, + {".portpkg", "application/vnd.macports.portpkg"}, + {".mgp", "application/vnd.osgeo.mapguide.package"}, + {".mrc", "application/marc"}, + {".mrcx", "application/marcxml+xml"}, + {".mxf", "application/mxf"}, + {".nbp", "application/vnd.wolfram.player"}, + {".ma", "application/mathematica"}, + {".mathml", "application/mathml+xml"}, + {".mbox", "application/mbox"}, + {".mc1", "application/vnd.medcalcdata"}, + {".mscml", "application/mediaservercontrol+xml"}, + {".cdkey", "application/vnd.mediastation.cdkey"}, + {".mwf", "application/vnd.mfer"}, + {".mfm", "application/vnd.mfmp"}, + {".msh", "model/mesh"}, + {".mads", "application/mads+xml"}, + {".mets", "application/mets+xml"}, + {".mods", "application/mods+xml"}, + {".meta4", "application/metalink4+xml"}, + {".mcd", "application/vnd.mcd"}, + {".flo", "application/vnd.micrografx.flo"}, + {".igx", "application/vnd.micrografx.igx"}, + {".es3", "application/vnd.eszigno3+xml"}, + {".mdb", "application/x-msaccess"}, + {".asf", "video/x-ms-asf"}, + {".exe", "application/x-msdownload"}, + {".cil", "application/vnd.ms-artgalry"}, + {".cab", "application/vnd.ms-cab-compressed"}, + {".ims", "application/vnd.ms-ims"}, + {".application", "application/x-ms-application"}, + {".clp", "application/x-msclip"}, + {".mdi", "image/vnd.ms-modi"}, + {".eot", "application/vnd.ms-fontobject"}, + {".xls", "application/vnd.ms-excel"}, + {".xlam", "application/vnd.ms-excel.addin.macroenabled.12"}, + {".xlsb", "application/vnd.ms-excel.sheet.binary.macroenabled.12"}, + {".xltm", "application/vnd.ms-excel.template.macroenabled.12"}, + {".xlsm", "application/vnd.ms-excel.sheet.macroenabled.12"}, + {".chm", "application/vnd.ms-htmlhelp"}, + {".crd", "application/x-mscardfile"}, + {".lrm", "application/vnd.ms-lrm"}, + {".mvb", "application/x-msmediaview"}, + {".mny", "application/x-msmoney"}, + {".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"}, + {".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"}, + {".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"}, + {".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"}, + {".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}, + {".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"}, + {".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"}, + {".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"}, + {".obd", "application/x-msbinder"}, + {".thmx", "application/vnd.ms-officetheme"}, + {".onetoc", "application/onenote"}, + {".pya", "audio/vnd.ms-playready.media.pya"}, + {".pyv", "video/vnd.ms-playready.media.pyv"}, + {".ppt", "application/vnd.ms-powerpoint"}, + {".ppam", "application/vnd.ms-powerpoint.addin.macroenabled.12"}, + {".sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12"}, + {".pptm", "application/vnd.ms-powerpoint.presentation.macroenabled.12"}, + {".ppsm", "application/vnd.ms-powerpoint.slideshow.macroenabled.12"}, + {".potm", "application/vnd.ms-powerpoint.template.macroenabled.12"}, + {".mpp", "application/vnd.ms-project"}, + {".pub", "application/x-mspublisher"}, + {".scd", "application/x-msschedule"}, + {".xap", "application/x-silverlight-app"}, + {".stl", "application/vnd.ms-pki.stl"}, + {".cat", "application/vnd.ms-pki.seccat"}, + {".vsd", "application/vnd.visio"}, + {".vsdx", "application/vnd.visio2013"}, + {".wm", "video/x-ms-wm"}, + {".wma", "audio/x-ms-wma"}, + {".wax", "audio/x-ms-wax"}, + {".wmx", "video/x-ms-wmx"}, + {".wmd", "application/x-ms-wmd"}, + {".wpl", "application/vnd.ms-wpl"}, + {".wmz", "application/x-ms-wmz"}, + {".wmv", "video/x-ms-wmv"}, + {".wvx", "video/x-ms-wvx"}, + {".wmf", "application/x-msmetafile"}, + {".trm", "application/x-msterminal"}, + {".doc", "application/msword"}, + {".docm", "application/vnd.ms-word.document.macroenabled.12"}, + {".dotm", "application/vnd.ms-word.template.macroenabled.12"}, + {".wri", "application/x-mswrite"}, + {".wps", "application/vnd.ms-works"}, + {".xbap", "application/x-ms-xbap"}, + {".xps", "application/vnd.ms-xpsdocument"}, + {".mid", "audio/midi"}, + {".mpy", "application/vnd.ibm.minipay"}, + {".afp", "application/vnd.ibm.modcap"}, + {".rms", "application/vnd.jcp.javame.midlet-rms"}, + {".tmo", "application/vnd.tmobile-livetv"}, + {".prc", "application/x-mobipocket-ebook"}, + {".mbk", "application/vnd.mobius.mbk"}, + {".dis", "application/vnd.mobius.dis"}, + {".plc", "application/vnd.mobius.plc"}, + {".mqy", "application/vnd.mobius.mqy"}, + {".msl", "application/vnd.mobius.msl"}, + {".txf", "application/vnd.mobius.txf"}, + {".daf", "application/vnd.mobius.daf"}, + {".fly", "text/vnd.fly"}, + {".mpc", "application/vnd.mophun.certificate"}, + {".mpn", "application/vnd.mophun.application"}, + {".mj2", "video/mj2"}, + {".mpga", "audio/mpeg"}, + {".mxu", "video/vnd.mpegurl"}, + {".mpeg", "video/mpeg"}, + {".m21", "application/mp21"}, + {".mp4a", "audio/mp4"}, + {".mp4", "video/mp4"}, + {".mp4", "application/mp4"}, + {".m3u8", "application/vnd.apple.mpegurl"}, + {".mus", "application/vnd.musician"}, + {".msty", "application/vnd.muvee.style"}, + {".mxml", "application/xv+xml"}, + {".ngdat", "application/vnd.nokia.n-gage.data"}, + {".n-gage", "application/vnd.nokia.n-gage.symbian.install"}, + {".ncx", "application/x-dtbncx+xml"}, + {".nc", "application/x-netcdf"}, + {".nlu", "application/vnd.neurolanguage.nlu"}, + {".dna", "application/vnd.dna"}, + {".nnd", "application/vnd.noblenet-directory"}, + {".nns", "application/vnd.noblenet-sealer"}, + {".nnw", "application/vnd.noblenet-web"}, + {".rpst", "application/vnd.nokia.radio-preset"}, + {".rpss", "application/vnd.nokia.radio-presets"}, + {".n3", "text/n3"}, + {".edm", "application/vnd.novadigm.edm"}, + {".edx", "application/vnd.novadigm.edx"}, + {".ext", "application/vnd.novadigm.ext"}, + {".gph", "application/vnd.flographit"}, + {".ecelp4800", "audio/vnd.nuera.ecelp4800"}, + {".ecelp7470", "audio/vnd.nuera.ecelp7470"}, + {".ecelp9600", "audio/vnd.nuera.ecelp9600"}, + {".oda", "application/oda"}, + {".ogx", "application/ogg"}, + {".oga", "audio/ogg"}, + {".ogv", "video/ogg"}, + {".dd2", "application/vnd.oma.dd2+xml"}, + {".oth", "application/vnd.oasis.opendocument.text-web"}, + {".opf", "application/oebps-package+xml"}, + {".qbo", "application/vnd.intu.qbo"}, + {".oxt", "application/vnd.openofficeorg.extension"}, + {".osf", "application/vnd.yamaha.openscoreformat"}, + {".weba", "audio/webm"}, + {".webm", "video/webm"}, + {".odc", "application/vnd.oasis.opendocument.chart"}, + {".otc", "application/vnd.oasis.opendocument.chart-template"}, + {".odb", "application/vnd.oasis.opendocument.database"}, + {".odf", "application/vnd.oasis.opendocument.formula"}, + {".odft", "application/vnd.oasis.opendocument.formula-template"}, + {".odg", "application/vnd.oasis.opendocument.graphics"}, + {".otg", "application/vnd.oasis.opendocument.graphics-template"}, + {".odi", "application/vnd.oasis.opendocument.image"}, + {".oti", "application/vnd.oasis.opendocument.image-template"}, + {".odp", "application/vnd.oasis.opendocument.presentation"}, + {".otp", "application/vnd.oasis.opendocument.presentation-template"}, + {".ods", "application/vnd.oasis.opendocument.spreadsheet"}, + {".ots", "application/vnd.oasis.opendocument.spreadsheet-template"}, + {".odt", "application/vnd.oasis.opendocument.text"}, + {".odm", "application/vnd.oasis.opendocument.text-master"}, + {".ott", "application/vnd.oasis.opendocument.text-template"}, + {".ktx", "image/ktx"}, + {".sxc", "application/vnd.sun.xml.calc"}, + {".stc", "application/vnd.sun.xml.calc.template"}, + {".sxd", "application/vnd.sun.xml.draw"}, + {".std", "application/vnd.sun.xml.draw.template"}, + {".sxi", "application/vnd.sun.xml.impress"}, + {".sti", "application/vnd.sun.xml.impress.template"}, + {".sxm", "application/vnd.sun.xml.math"}, + {".sxw", "application/vnd.sun.xml.writer"}, + {".sxg", "application/vnd.sun.xml.writer.global"}, + {".stw", "application/vnd.sun.xml.writer.template"}, + {".otf", "application/x-font-otf"}, + {".osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml"}, + {".dp", "application/vnd.osgi.dp"}, + {".pdb", "application/vnd.palm"}, + {".p", "text/x-pascal"}, + {".paw", "application/vnd.pawaafile"}, + {".pclxl", "application/vnd.hp-pclxl"}, + {".efif", "application/vnd.picsel"}, + {".pcx", "image/x-pcx"}, + {".psd", "image/vnd.adobe.photoshop"}, + {".prf", "application/pics-rules"}, + {".pic", "image/x-pict"}, + {".chat", "application/x-chat"}, + {".p10", "application/pkcs10"}, + {".p12", "application/x-pkcs12"}, + {".p7m", "application/pkcs7-mime"}, + {".p7s", "application/pkcs7-signature"}, + {".p7r", "application/x-pkcs7-certreqresp"}, + {".p7b", "application/x-pkcs7-certificates"}, + {".p8", "application/pkcs8"}, + {".plf", "application/vnd.pocketlearn"}, + {".pnm", "image/x-portable-anymap"}, + {".pbm", "image/x-portable-bitmap"}, + {".pcf", "application/x-font-pcf"}, + {".pfr", "application/font-tdpfr"}, + {".pgn", "application/x-chess-pgn"}, + {".pgm", "image/x-portable-graymap"}, + {".png", "image/png"}, + {".png", "image/x-citrix-png"}, + {".png", "image/x-png"}, + {".ppm", "image/x-portable-pixmap"}, + {".pskcxml", "application/pskc+xml"}, + {".pml", "application/vnd.ctc-posml"}, + {".ai", "application/postscript"}, + {".pfa", "application/x-font-type1"}, + {".pbd", "application/vnd.powerbuilder6"}, + {".pgp", "application/pgp-encrypted"}, + {".pgp", "application/pgp-signature"}, + {".box", "application/vnd.previewsystems.box"}, + {".ptid", "application/vnd.pvi.ptid1"}, + {".pls", "application/pls+xml"}, + {".str", "application/vnd.pg.format"}, + {".ei6", "application/vnd.pg.osasli"}, + {".dsc", "text/prs.lines.tag"}, + {".psf", "application/x-font-linux-psf"}, + {".qps", "application/vnd.publishare-delta-tree"}, + {".wg", "application/vnd.pmi.widget"}, + {".qxd", "application/vnd.quark.quarkxpress"}, + {".esf", "application/vnd.epson.esf"}, + {".msf", "application/vnd.epson.msf"}, + {".ssf", "application/vnd.epson.ssf"}, + {".qam", "application/vnd.epson.quickanime"}, + {".qfx", "application/vnd.intu.qfx"}, + {".qt", "video/quicktime"}, + {".rar", "application/x-rar-compressed"}, + {".ram", "audio/x-pn-realaudio"}, + {".rmp", "audio/x-pn-realaudio-plugin"}, + {".rsd", "application/rsd+xml"}, + {".rm", "application/vnd.rn-realmedia"}, + {".bed", "application/vnd.realvnc.bed"}, + {".mxl", "application/vnd.recordare.musicxml"}, + {".musicxml", "application/vnd.recordare.musicxml+xml"}, + {".rnc", "application/relax-ng-compact-syntax"}, + {".rdz", "application/vnd.data-vision.rdz"}, + {".rdf", "application/rdf+xml"}, + {".rp9", "application/vnd.cloanto.rp9"}, + {".jisp", "application/vnd.jisp"}, + {".rtf", "application/rtf"}, + {".rtx", "text/richtext"}, + {".link66", "application/vnd.route66.link66+xml"}, + {".rss", "application/rss+xml"}, + {".shf", "application/shf+xml"}, + {".st", "application/vnd.sailingtracker.track"}, + {".svg", "image/svg+xml"}, + {".sus", "application/vnd.sus-calendar"}, + {".sru", "application/sru+xml"}, + {".setpay", "application/set-payment-initiation"}, + {".setreg", "application/set-registration-initiation"}, + {".sema", "application/vnd.sema"}, + {".semd", "application/vnd.semd"}, + {".semf", "application/vnd.semf"}, + {".see", "application/vnd.seemail"}, + {".snf", "application/x-font-snf"}, + {".spq", "application/scvp-vp-request"}, + {".spp", "application/scvp-vp-response"}, + {".scq", "application/scvp-cv-request"}, + {".scs", "application/scvp-cv-response"}, + {".sdp", "application/sdp"}, + {".etx", "text/x-setext"}, + {".movie", "video/x-sgi-movie"}, + {".ifm", "application/vnd.shana.informed.formdata"}, + {".itp", "application/vnd.shana.informed.formtemplate"}, + {".iif", "application/vnd.shana.informed.interchange"}, + {".ipk", "application/vnd.shana.informed.package"}, + {".tfi", "application/thraud+xml"}, + {".shar", "application/x-shar"}, + {".rgb", "image/x-rgb"}, + {".slt", "application/vnd.epson.salt"}, + {".aso", "application/vnd.accpac.simply.aso"}, + {".imp", "application/vnd.accpac.simply.imp"}, + {".twd", "application/vnd.simtech-mindmapper"}, + {".csp", "application/vnd.commonspace"}, + {".saf", "application/vnd.yamaha.smaf-audio"}, + {".mmf", "application/vnd.smaf"}, + {".spf", "application/vnd.yamaha.smaf-phrase"}, + {".teacher", "application/vnd.smart.teacher"}, + {".svd", "application/vnd.svd"}, + {".rq", "application/sparql-query"}, + {".srx", "application/sparql-results+xml"}, + {".gram", "application/srgs"}, + {".grxml", "application/srgs+xml"}, + {".ssml", "application/ssml+xml"}, + {".skp", "application/vnd.koan"}, + {".sgml", "text/sgml"}, + {".sdc", "application/vnd.stardivision.calc"}, + {".sda", "application/vnd.stardivision.draw"}, + {".sdd", "application/vnd.stardivision.impress"}, + {".smf", "application/vnd.stardivision.math"}, + {".sdw", "application/vnd.stardivision.writer"}, + {".sgl", "application/vnd.stardivision.writer-global"}, + {".sm", "application/vnd.stepmania.stepchart"}, + {".sit", "application/x-stuffit"}, + {".sitx", "application/x-stuffitx"}, + {".sdkm", "application/vnd.solent.sdkm+xml"}, + {".xo", "application/vnd.olpc-sugar"}, + {".au", "audio/basic"}, + {".wqd", "application/vnd.wqd"}, + {".sis", "application/vnd.symbian.install"}, + {".smi", "application/smil+xml"}, + {".xsm", "application/vnd.syncml+xml"}, + {".bdm", "application/vnd.syncml.dm+wbxml"}, + {".xdm", "application/vnd.syncml.dm+xml"}, + {".sv4cpio", "application/x-sv4cpio"}, + {".sv4crc", "application/x-sv4crc"}, + {".sbml", "application/sbml+xml"}, + {".tsv", "text/tab-separated-values"}, + {".tiff", "image/tiff"}, + {".tao", "application/vnd.tao.intent-module-archive"}, + {".tar", "application/x-tar"}, + {".tcl", "application/x-tcl"}, + {".tex", "application/x-tex"}, + {".tfm", "application/x-tex-tfm"}, + {".tei", "application/tei+xml"}, + {".txt", "text/plain; charset=utf-8"}, + {".md", "text/markdown; charset=utf-8"}, + {".dxp", "application/vnd.spotfire.dxp"}, + {".sfs", "application/vnd.spotfire.sfs"}, + {".tsd", "application/timestamped-data"}, + {".tpt", "application/vnd.trid.tpt"}, + {".mxs", "application/vnd.triscape.mxs"}, + {".t", "text/troff"}, + {".tra", "application/vnd.trueapp"}, + {".ttf", "application/x-font-ttf"}, + {".ttl", "text/turtle"}, + {".umj", "application/vnd.umajin"}, + {".uoml", "application/vnd.uoml+xml"}, + {".unityweb", "application/vnd.unity"}, + {".ufd", "application/vnd.ufdl"}, + {".uri", "text/uri-list"}, + {".utz", "application/vnd.uiq.theme"}, + {".ustar", "application/x-ustar"}, + {".uu", "text/x-uuencode"}, + {".vcs", "text/x-vcalendar"}, + {".vcf", "text/x-vcard"}, + {".vcd", "application/x-cdlink"}, + {".vsf", "application/vnd.vsf"}, + {".wrl", "model/vrml"}, + {".vcx", "application/vnd.vcx"}, + {".mts", "model/vnd.mts"}, + {".vtu", "model/vnd.vtu"}, + {".vis", "application/vnd.visionary"}, + {".viv", "video/vnd.vivo"}, + {".ccxml", "application/ccxml+xml"}, + {".vxml", "application/voicexml+xml"}, + {".src", "application/x-wais-source"}, + {".wbxml", "application/vnd.wap.wbxml"}, + {".wbmp", "image/vnd.wap.wbmp"}, + {".wav", "audio/x-wav"}, + {".davmount", "application/davmount+xml"}, + {".woff", "application/x-font-woff"}, + {".wspolicy", "application/wspolicy+xml"}, + {".webp", "image/webp"}, + {".wtb", "application/vnd.webturbo"}, + {".wgt", "application/widget"}, + {".hlp", "application/winhlp"}, + {".wml", "text/vnd.wap.wml"}, + {".wmls", "text/vnd.wap.wmlscript"}, + {".wmlsc", "application/vnd.wap.wmlscriptc"}, + {".wpd", "application/vnd.wordperfect"}, + {".stf", "application/vnd.wt.stf"}, + {".wsdl", "application/wsdl+xml"}, + {".xbm", "image/x-xbitmap"}, + {".xpm", "image/x-xpixmap"}, + {".xwd", "image/x-xwindowdump"}, + {".der", "application/x-x509-ca-cert"}, + {".fig", "application/x-xfig"}, + {".xhtml", "application/xhtml+xml"}, + {".xml", "application/xml"}, + {".xdf", "application/xcap-diff+xml"}, + {".xenc", "application/xenc+xml"}, + {".xer", "application/patch-ops-error+xml"}, + {".rl", "application/resource-lists+xml"}, + {".rs", "application/rls-services+xml"}, + {".rld", "application/resource-lists-diff+xml"}, + {".xslt", "application/xslt+xml"}, + {".xop", "application/xop+xml"}, + {".xpi", "application/x-xpinstall"}, + {".xspf", "application/xspf+xml"}, + {".xul", "application/vnd.mozilla.xul+xml"}, + {".xyz", "chemical/x-xyz"}, + {".yaml", "text/yaml"}, + {".yang", "application/yang"}, + {".yin", "application/yin+xml"}, + {".zir", "application/vnd.zul"}, + {".zip", "application/zip"}, + {".zmm", "application/vnd.handheld-entertainment+xml"}, + {".zaz", "application/vnd.zzazz.deck+xml"}, +}; + +// Detect HTTP MIME type from filename +char *GetMimeTypeFromFileName(char *filename) +{ + UINT i; + const UINT num = sizeof(http_mime_types) / sizeof(HTTP_MIME_TYPE); + if (filename == NULL) + { + return NULL; + } + + for (i = 0; i < num; ++i) + { + const HTTP_MIME_TYPE *a = &http_mime_types[i]; + + if (EndWith(filename, a->Extension)) + { + return a->MimeType; + } + } + + return NULL; +} + +// Generate the date and time string for the HTTP header +void GetHttpDateStr(char *str, UINT size, UINT64 t) +{ + SYSTEMTIME s; + static char *wday[] = + { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", + }; + static char *month[] = + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", + "Nov", "Dec", + }; + // Validate arguments + if (str == NULL) + { + return; + } + UINT64ToSystem(&s, t); + + Format(str, size, "%s, %02u %s %04u %02u:%02u:%02u GMT", + wday[s.wDayOfWeek], s.wDay, month[s.wMonth - 1], s.wYear, + s.wHour, s.wMinute, s.wSecond); +} + +// Replace unsafe characters in target +void ReplaceUnsafeCharInHttpTarget(char *target) +{ + UINT i; + for(i = 0; target[i] ; i++) { + if(target[i] == '<') + target[i] = '('; + else if(target[i] == '>') + target[i] = ')'; + } +} + +// Create an HTTP header +HTTP_HEADER *NewHttpHeader(char *method, char *target, char *version) +{ + return NewHttpHeaderEx(method, target, version, false); +} +HTTP_HEADER *NewHttpHeaderEx(char *method, char *target, char *version, bool no_sort) +{ + HTTP_HEADER *header; + // Validate arguments + if (method == NULL || target == NULL || version == NULL) + { + return NULL; + } + + header = ZeroMalloc(sizeof(HTTP_HEADER)); + + header->Method = CopyStr(method); + header->Target = CopyStr(target); + header->Version = CopyStr(version); + header->ValueList = NewListFast(no_sort ? NULL : CompareHttpValue); + + return header; +} + +// Release the HTTP header +void FreeHttpHeader(HTTP_HEADER *header) +{ + UINT i; + HTTP_VALUE **values; + // Validate arguments + if (header == NULL) + { + return; + } + + Free(header->Method); + Free(header->Target); + Free(header->Version); + + values = ToArray(header->ValueList); + for (i = 0;i < LIST_NUM(header->ValueList);i++) + { + FreeHttpValue(values[i]); + } + Free(values); + + ReleaseList(header->ValueList); + + Free(header); +} + +// Create a new HTTP value +HTTP_VALUE *NewHttpValue(char *name, char *data) +{ + HTTP_VALUE *v; + // Validate arguments + if (name == NULL || data == NULL) + { + return NULL; + } + + v = ZeroMalloc(sizeof(HTTP_VALUE)); + + v->Name = CopyStr(name); + v->Data = CopyStr(data); + + Trim(v->Name); + Trim(v->Data); + + return v; +} + +// Release the HTTP value +void FreeHttpValue(HTTP_VALUE *value) +{ + // Validate arguments + if (value == NULL) + { + return; + } + + Free(value->Data); + Free(value->Name); + + Free(value); +} + +// Comparison function of the HTTP value +int CompareHttpValue(void *p1, void *p2) +{ + HTTP_VALUE *v1, *v2; + if (p1 == NULL || p2 == NULL) + { + return 0; + } + v1 = *(HTTP_VALUE **)p1; + v2 = *(HTTP_VALUE **)p2; + if (v1 == NULL || v2 == NULL) + { + return 0; + } + return StrCmpi(v1->Name, v2->Name); +} + +// Look for an HTTP value in an HTTP header +HTTP_VALUE *GetHttpValue(HTTP_HEADER *header, char *name) +{ + HTTP_VALUE *v, t; + // Validate arguments + if (header == NULL || name == NULL) + { + return NULL; + } + + t.Name = name; + v = Search(header->ValueList, &t); + if (v == NULL) + { + return NULL; + } + + return v; +} + +// Add an HTTP value to the HTTP header +void AddHttpValue(HTTP_HEADER *header, HTTP_VALUE *value) +{ + // Validate arguments + if (header == NULL || value == NULL) + { + return; + } + + if (LIST_NUM(header->ValueList) < HTTP_HEADER_MAX_LINES) + { + Insert(header->ValueList, value); + } + else + { + FreeHttpValue(value); + } +} + +// Adds the HTTP value contained in the string to the HTTP header +bool AddHttpValueStr(HTTP_HEADER* header, char *string) +{ + HTTP_VALUE *value = NULL; + UINT pos = 0; + char *value_name = NULL; + char *value_data = NULL; + + // Validate arguments + if (header == NULL || IsEmptyStr(string)) + { + return false; + } + + // Sanitize string + EnSafeHttpHeaderValueStr(string, ' '); + + // Get the position of the colon + pos = SearchStr(string, ":", 0); + if (pos == INFINITE) + { + // The colon does not exist + return false; + } + + if ((pos + 1) >= StrLen(string)) + { + // There is no data + return false; + } + + // Divide into the name and the data + value_name = Malloc(pos + 1); + Copy(value_name, string, pos); + value_name[pos] = 0; + value_data = &string[pos + 1]; + + value = NewHttpValue(value_name, value_data); + if (value == NULL) + { + Free(value_name); + return false; + } + + Free(value_name); + + AddHttpValue(header, value); + + return true; +} + +// Get the Content-Length value from the HTTP header +UINT GetContentLength(HTTP_HEADER *header) +{ + UINT ret; + HTTP_VALUE *v; + // Validate arguments + if (header == NULL) + { + return 0; + } + + v = GetHttpValue(header, "Content-Length"); + if (v == NULL) + { + return 0; + } + + ret = ToInt(v->Data); + + return ret; +} + +// Send HTTP data +bool PostHttp(SOCK *s, HTTP_HEADER *header, void *post_data, UINT post_size) +{ + char *header_str; + BUF *b; + bool ret; + // Validate arguments + if (s == NULL || header == NULL || (post_size != 0 && post_data == NULL)) + { + return false; + } + + // Check whether the Content-Length exists? + if (GetHttpValue(header, "Content-Length") == NULL) + { + char tmp[MAX_SIZE]; + // Add because it does not exist + ToStr(tmp, post_size); + AddHttpValue(header, NewHttpValue("Content-Length", tmp)); + } + + // Convert the header to string + header_str = HttpHeaderToStr(header); + if (header_str == NULL) + { + return false; + } + b = NewBuf(); + WriteBuf(b, header_str, StrLen(header_str)); + Free(header_str); + + // Append the data + WriteBuf(b, post_data, post_size); + + // Send + ret = SendAll(s, b->Buf, b->Size, s->SecureMode); + + FreeBuf(b); + + return ret; +} + +// Convert an HTTP header to a string +char *HttpHeaderToStr(HTTP_HEADER *header) +{ + BUF *b; + char *tmp; + UINT i; + char *s; + // Validate arguments + if (header == NULL) + { + return NULL; + } + + tmp = Malloc(HTTP_HEADER_LINE_MAX_SIZE); + b = NewBuf(); + + // Header + Format(tmp, HTTP_HEADER_LINE_MAX_SIZE, + "%s %s %s\r\n", header->Method, header->Target, header->Version); + WriteBuf(b, tmp, StrLen(tmp)); + + // Value + for (i = 0;i < LIST_NUM(header->ValueList);i++) + { + HTTP_VALUE *v = (HTTP_VALUE *)LIST_DATA(header->ValueList, i); + Format(tmp, HTTP_HEADER_LINE_MAX_SIZE, + "%s: %s\r\n", v->Name, v->Data); + WriteBuf(b, tmp, StrLen(tmp)); + } + + // Trailing newline + WriteBuf(b, "\r\n", 2); + s = Malloc(b->Size + 1); + Copy(s, b->Buf, b->Size); + s[b->Size] = 0; + + FreeBuf(b); + Free(tmp); + + return s; +} + +// Send the HTTP header +bool SendHttpHeader(SOCK *s, HTTP_HEADER *header) +{ + char *str; + bool ret; + // Validate arguments + if (s == NULL || header == NULL) + { + return false; + } + + // Convert to string + str = HttpHeaderToStr(header); + + // Transmission + ret = SendAll(s, str, StrLen(str), s->SecureMode); + + Free(str); + + return ret; +} + +// Receive an HTTP header +HTTP_HEADER *RecvHttpHeader(SOCK *s) +{ + TOKEN_LIST *token = NULL; + char *str = NULL; + HTTP_HEADER *header = NULL; + // Validate arguments + if (s == NULL) + { + return NULL; + } + + // Get the first line + str = RecvLine(s, HTTP_HEADER_LINE_MAX_SIZE); + if (str == NULL) + { + return NULL; + } + + // Split into tokens + token = ParseToken(str, " "); + + FreeSafe(PTR_TO_PTR(str)); + + if (token->NumTokens < 3) + { + FreeToken(token); + return NULL; + } + + // Creating a header object + header = NewHttpHeader(token->Token[0], token->Token[1], token->Token[2]); + FreeToken(token); + + if (StrCmpi(header->Version, "HTTP/0.9") == 0) + { + // The header ends with this line + return header; + } + + // Get the subsequent lines + while (true) + { + str = RecvLine(s, HTTP_HEADER_LINE_MAX_SIZE); + Trim(str); + if (IsEmptyStr(str)) + { + // End of header + FreeSafe(PTR_TO_PTR(str)); + break; + } + + if (AddHttpValueStr(header, str) == false) + { + FreeSafe(PTR_TO_PTR(str)); + FreeHttpHeader(header); + header = NULL; + break; + } + + FreeSafe(PTR_TO_PTR(str)); + } + + return header; +} + +// Send a PACK to the server +bool HttpClientSend(SOCK *s, PACK *p) +{ + BUF *b; + bool ret; + HTTP_HEADER *h; + char date_str[MAX_SIZE]; + char ip_str[MAX_SIZE]; + + // Validate arguments + if (s == NULL || p == NULL) + { + return false; + } + + IPToStr(ip_str, sizeof(ip_str), &s->RemoteIP); + + CreateDummyValue(p); + + b = PackToBuf(p); + if (b == NULL) + { + return false; + } + + h = NewHttpHeader("POST", HTTP_VPN_TARGET, "HTTP/1.1"); + + GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); + AddHttpValue(h, NewHttpValue("Date", date_str)); + AddHttpValue(h, NewHttpValue("Host", ip_str)); + AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); + AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); + AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE2)); + + ret = PostHttp(s, h, b->Buf, b->Size); + + FreeHttpHeader(h); + FreeBuf(b); + + return ret; +} + +// Receive a PACK from the server +PACK *HttpClientRecv(SOCK *s) +{ + BUF *b; + PACK *p; + HTTP_HEADER *h; + UINT size; + UCHAR *tmp; + HTTP_VALUE *v; + // Validate arguments + if (s == NULL) + { + return NULL; + } + + h = RecvHttpHeader(s); + if (h == NULL) + { + return NULL; + } + + if (StrCmpi(h->Method, "HTTP/1.1") != 0 || + StrCmpi(h->Target, "200") != 0) + { + FreeHttpHeader(h); + return NULL; + } + + v = GetHttpValue(h, "Content-Type"); + if (v == NULL || StrCmpi(v->Data, HTTP_CONTENT_TYPE2) != 0) + { + FreeHttpHeader(h); + return NULL; + } + + size = GetContentLength(h); + if (size == 0 || size > MAX_PACK_SIZE) + { + FreeHttpHeader(h); + return NULL; + } + + tmp = MallocEx(size, true); + if (RecvAll(s, tmp, size, s->SecureMode) == false) + { + Free(tmp); + FreeHttpHeader(h); + return NULL; + } + + b = NewBuf(); + WriteBuf(b, tmp, size); + Free(tmp); + FreeHttpHeader(h); + + SeekBuf(b, 0, 0); + p = BufToPack(b); + FreeBuf(b); + + return p; +} + +// Send a PACK to the client +bool HttpServerSend(SOCK *s, PACK *p) +{ + BUF *b; + bool ret; + HTTP_HEADER *h; + char date_str[MAX_SIZE]; + // Validate arguments + if (s == NULL || p == NULL) + { + return false; + } + + CreateDummyValue(p); + + b = PackToBuf(p); + if (b == NULL) + { + return false; + } + + h = NewHttpHeader("HTTP/1.1", "200", "OK"); + + GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); + AddHttpValue(h, NewHttpValue("Date", date_str)); + AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); + AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); + AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE2)); + + ret = PostHttp(s, h, b->Buf, b->Size); + + FreeHttpHeader(h); + FreeBuf(b); + + return ret; +} + +// Receive a PACK from the client +PACK *HttpServerRecv(SOCK *s) +{ + return HttpServerRecvEx(s, 0); +} +PACK *HttpServerRecvEx(SOCK *s, UINT max_data_size) +{ + BUF *b; + PACK *p; + HTTP_HEADER *h; + UINT size; + UCHAR *tmp; + HTTP_VALUE *v; + UINT num_noop = 0; + if (max_data_size == 0) max_data_size = HTTP_PACK_MAX_SIZE; + // Validate arguments + if (s == NULL) + { + return NULL; + } + +START: + h = RecvHttpHeader(s); + if (h == NULL) + { + goto BAD_REQUEST; + } + + if (StrCmpi(h->Method, "POST") != 0 || + StrCmpi(h->Target, HTTP_VPN_TARGET) != 0 || + StrCmpi(h->Version, "HTTP/1.1") != 0) + { + FreeHttpHeader(h); + goto BAD_REQUEST; + } + + v = GetHttpValue(h, "Content-Type"); + if (v == NULL || StrCmpi(v->Data, HTTP_CONTENT_TYPE2) != 0) + { + FreeHttpHeader(h); + goto BAD_REQUEST; + } + + size = GetContentLength(h); + if (size == 0 || (size > max_data_size)) + { + FreeHttpHeader(h); + goto BAD_REQUEST; + } + + tmp = MallocEx(size, true); + if (RecvAll(s, tmp, size, s->SecureMode) == false) + { + Free(tmp); + FreeHttpHeader(h); + return NULL; + } + + b = NewBuf(); + WriteBuf(b, tmp, size); + Free(tmp); + FreeHttpHeader(h); + + SeekBuf(b, 0, 0); + p = BufToPack(b); + FreeBuf(b); + + // Determine whether it's a NOOP + if (PackGetInt(p, "noop") != 0) + { + Debug("recv: noop\n"); + FreePack(p); + + p = PackError(0); + PackAddInt(p, "noop", 1); + if (HttpServerSend(s, p) == false) + { + FreePack(p); + return NULL; + } + + FreePack(p); + + num_noop++; + + if (num_noop > MAX_NOOP_PER_SESSION) + { + return NULL; + } + + goto START; + } + + return p; + +BAD_REQUEST: + // Return an error + return NULL; +} + +// Send "403 Forbidden" error +bool HttpSendForbidden(SOCK *s, char *target, char *server_id) +{ + HTTP_HEADER *h; + char date_str[MAX_SIZE]; + char *str; + UINT str_size; + char port_str[MAX_SIZE]; + bool ret; + char host[MAX_SIZE]; + UINT port; + // Validate arguments + if (s == NULL || target == NULL) + { + return false; + } + + // Get the host name + //GetMachineName(host, MAX_SIZE); + Zero(host, sizeof(host)); + IPToStr(host, sizeof(host), &s->LocalIP); + // Get the port number + port = s->LocalPort; + + // Creating a header + GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); + + h = NewHttpHeader("HTTP/1.1", "403", "Forbidden"); + + AddHttpValue(h, NewHttpValue("Date", date_str)); + AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); + AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); + AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE)); + + // Creating a Data + str_size = sizeof(http_403_str) * 2 + StrLen(target) + StrLen(host); + str = Malloc(str_size); + StrCpy(str, str_size, http_403_str); + + // TARGET + ReplaceUnsafeCharInHttpTarget(target); + ReplaceStri(str, str_size, str, "$TARGET$", target); + + // HOST + ReplaceStri(str, str_size, str, "$HOST$", host); + + // PORT + ToStr(port_str, port); + ReplaceStri(str, str_size, str, "$PORT$", port_str); + + // Transmission + ret = PostHttp(s, h, str, StrLen(str)); + + FreeHttpHeader(h); + Free(str); + + return ret; +} + +// Send "404 Not Found" error +bool HttpSendNotFound(SOCK *s, char *target) +{ + HTTP_HEADER *h; + char date_str[MAX_SIZE]; + char *str; + UINT str_size; + char port_str[MAX_SIZE]; + bool ret; + char host[MAX_SIZE]; + UINT port; + // Validate arguments + if (s == NULL || target == NULL) + { + return false; + } + + // Get the host name + //GetMachineName(host, MAX_SIZE); + Zero(host, sizeof(host)); + IPToStr(host, sizeof(host), &s->LocalIP); + // Get the port number + port = s->LocalPort; + + // Creating a header + GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); + + h = NewHttpHeader("HTTP/1.1", "404", "Not Found"); + + AddHttpValue(h, NewHttpValue("Date", date_str)); + AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); + AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); + AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE)); + + // Creating a Data + str_size = sizeof(http_404_str) * 2 + StrLen(target) + StrLen(host); + str = Malloc(str_size); + StrCpy(str, str_size, http_404_str); + + // TARGET + ReplaceUnsafeCharInHttpTarget(target); + ReplaceStri(str, str_size, str, "$TARGET$", target); + + // HOST + ReplaceStri(str, str_size, str, "$HOST$", host); + + // PORT + ToStr(port_str, port); + ReplaceStri(str, str_size, str, "$PORT$", port_str); + + // Transmission + ret = PostHttp(s, h, str, StrLen(str)); + + FreeHttpHeader(h); + Free(str); + + return ret; +} + +// Send "501 Not Implemented" error +bool HttpSendNotImplemented(SOCK *s, char *method, char *target, char *version) +{ + HTTP_HEADER *h; + char date_str[MAX_SIZE]; + char *str; + UINT str_size; + char port_str[MAX_SIZE]; + bool ret; + char host[MAX_SIZE]; + UINT port; + // Validate arguments + if (s == NULL || target == NULL) + { + return false; + } + + // Get the host name + //GetMachineName(host, MAX_SIZE); + Zero(host, sizeof(host)); + IPToStr(host, sizeof(host), &s->LocalIP); + // Get the port number + port = s->LocalPort; + + // Creating a header + GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); + + h = NewHttpHeader("HTTP/1.1", "501", "Method Not Implemented"); + + AddHttpValue(h, NewHttpValue("Date", date_str)); + AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); + AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); + AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE)); + + // Creating a Data + str_size = sizeof(http_501_str) * 2 + StrLen(target) + StrLen(host) + StrLen(method) + StrLen(version); + str = Malloc(str_size); + StrCpy(str, str_size, http_501_str); + + // TARGET + ReplaceUnsafeCharInHttpTarget(target); + ReplaceStri(str, str_size, str, "$TARGET$", target); + + // HOST + ReplaceStri(str, str_size, str, "$HOST$", host); + + // PORT + ToStr(port_str, port); + ReplaceStri(str, str_size, str, "$PORT$", port_str); + + // METHOD + ReplaceStri(str, str_size, str, "$METHOD$", method); + + // VERSION + ReplaceStri(str, str_size, str, "$VERSION$", version); + + // Transmission + ret = PostHttp(s, h, str, StrLen(str)); + + FreeHttpHeader(h); + Free(str); + + return ret; +} diff --git a/src/Mayaqua/HTTP.h b/src/Mayaqua/HTTP.h new file mode 100644 index 00000000..84814a8d --- /dev/null +++ b/src/Mayaqua/HTTP.h @@ -0,0 +1,78 @@ +#ifndef HTTP_H +#define HTTP_H + +#define DEFAULT_USER_AGENT "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0" +#define DEFAULT_ACCEPT "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, */*" +#define DEFAULT_ENCODING "gzip, deflate" +#define HTTP_CONTENT_TYPE "text/html; charset=iso-8859-1" +#define HTTP_CONTENT_TYPE2 "application/octet-stream" +#define HTTP_CONTENT_TYPE3 "image/jpeg" +#define HTTP_CONTENT_TYPE4 "text/html" +#define HTTP_CONTENT_TYPE5 "message/rfc822" +#define HTTP_KEEP_ALIVE "timeout=15; max=19" +#define HTTP_VPN_TARGET "/vpnsvc/vpn.cgi" +#define HTTP_VPN_TARGET2 "/vpnsvc/connect.cgi" +#define HTTP_VPN_TARGET_POSTDATA "VPNCONNECT" +#define HTTP_SAITAMA "/saitama.jpg" +#define HTTP_PICTURES "/picture" +// Maximum size of the custom HTTP header +#define HTTP_CUSTOM_HEADER_MAX_SIZE 1024 +// Maximum size of a single line in the HTTP header +#define HTTP_HEADER_LINE_MAX_SIZE 4096 +// Maximum number of lines in the HTTP header +#define HTTP_HEADER_MAX_LINES 128 +// Maximum size of the random number to be included in the PACK +#define HTTP_PACK_RAND_SIZE_MAX 1000 +// Maximum PACK size in the HTTP +#define HTTP_PACK_MAX_SIZE 65536 + +// HTTP value +struct HTTP_VALUE +{ + char *Name; // Name + char *Data; // Data +}; + +// HTTP header +struct HTTP_HEADER +{ + char *Method; // Method + char *Target; // Target + char *Version; // Version + LIST *ValueList; // Value list +}; + +// MIME type +struct HTTP_MIME_TYPE +{ + char *Extension; + char *MimeType; +}; + +char *GetMimeTypeFromFileName(char *filename); +void GetHttpDateStr(char *str, UINT size, UINT64 t); +void ReplaceUnsafeCharInHttpTarget(char *target); +HTTP_HEADER *NewHttpHeader(char *method, char *target, char *version); +HTTP_HEADER *NewHttpHeaderEx(char *method, char *target, char *version, bool no_sort); +void FreeHttpHeader(HTTP_HEADER *header); +HTTP_VALUE *NewHttpValue(char *name, char *data); +void FreeHttpValue(HTTP_VALUE *value); +int CompareHttpValue(void *p1, void *p2); +HTTP_VALUE *GetHttpValue(HTTP_HEADER *header, char *name); +void AddHttpValue(HTTP_HEADER *header, HTTP_VALUE *value); +bool AddHttpValueStr(HTTP_HEADER* header, char *string); +UINT GetContentLength(HTTP_HEADER *header); +bool PostHttp(SOCK *s, HTTP_HEADER *header, void *post_data, UINT post_size); +char *HttpHeaderToStr(HTTP_HEADER *header); +bool SendHttpHeader(SOCK *s, HTTP_HEADER *header); +HTTP_HEADER *RecvHttpHeader(SOCK *s); +bool HttpClientSend(SOCK *s, PACK *p); +PACK *HttpClientRecv(SOCK *s); +bool HttpServerSend(SOCK *s, PACK *p); +PACK *HttpServerRecv(SOCK *s); +PACK *HttpServerRecvEx(SOCK *s, UINT max_data_size); +bool HttpSendForbidden(SOCK *s, char *target, char *server_id); +bool HttpSendNotFound(SOCK *s, char *target); +bool HttpSendNotImplemented(SOCK *s, char *method, char *target, char *version); + +#endif diff --git a/src/Mayaqua/Internat.c b/src/Mayaqua/Internat.c index 98f96100..7cb8a982 100644 --- a/src/Mayaqua/Internat.c +++ b/src/Mayaqua/Internat.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Internat.c diff --git a/src/Mayaqua/Internat.h b/src/Mayaqua/Internat.h index 149e8245..199dfa70 100644 --- a/src/Mayaqua/Internat.h +++ b/src/Mayaqua/Internat.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Internat.h diff --git a/src/Mayaqua/Kernel.c b/src/Mayaqua/Kernel.c index 1340c35f..3d1ee3d2 100644 --- a/src/Mayaqua/Kernel.c +++ b/src/Mayaqua/Kernel.c @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - nattoheaven (https://github.com/nattoheaven) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Kernel.c @@ -513,7 +405,7 @@ void GetHomeDirW(wchar_t *path, UINT size) if (GetEnvW(L"HOMEDRIVE", drive, sizeof(drive)) && GetEnvW(L"HOMEPATH", hpath, sizeof(hpath))) { - UniFormat(path, sizeof(path), L"%s%s", drive, hpath); + UniFormat(path, size, L"%s%s", drive, hpath); } else { @@ -1516,11 +1408,103 @@ void GetDateTimeStrMilli(char *str, UINT size, SYSTEMTIME *st) st->wMilliseconds); } + +// Convert string RFC3339 format (example: 2017-09-27T18:25:55.434-9:00) to UINT64 +UINT64 DateTimeStrRFC3339ToSystemTime64(char *str) +{ + SYSTEMTIME st; + if (DateTimeStrRFC3339ToSystemTime(&st, str)) + { + return SystemToUINT64(&st); + } + else + { + return 0; + } +} + +// Convert string RFC3339 format (example: 2017-09-27T18:25:55.434-9:00) to SYSTEMTIME +bool DateTimeStrRFC3339ToSystemTime(SYSTEMTIME *st, char *str) +{ + bool ok = false; + UINT index_plus; + char tmp[MAX_PATH]; + Zero(st, sizeof(SYSTEMTIME)); + if (st == NULL || str == NULL) + { + return false; + } + + StrCpy(tmp, sizeof(tmp), str); + + index_plus = SearchStrEx(tmp, "+", 0, false); + if (index_plus != INFINITE) + { + tmp[index_plus] = 0; + } + + if (StrLen(tmp) >= 19) + { + if (tmp[4] == '-' && tmp[7] == '-' && tmp[10] == 'T' && tmp[13] == ':' && + tmp[16] == ':') + { + char str_year[16], str_month[16], str_day[16], str_hour[16], str_minute[16], + str_second[16], str_msec[16]; + + StrCpy(str_year, sizeof(str_year), tmp + 0); + str_year[4] = 0; + + StrCpy(str_month, sizeof(str_month), tmp + 5); + str_month[2] = 0; + + StrCpy(str_day, sizeof(str_day), tmp + 8); + str_day[2] = 0; + + StrCpy(str_hour, sizeof(str_hour), tmp + 11); + str_hour[2] = 0; + + StrCpy(str_minute, sizeof(str_minute), tmp + 14); + str_minute[2] = 0; + + StrCpy(str_second, sizeof(str_second), tmp + 17); + str_second[2] = 0; + + str_msec[0] = 0; + + if (StrLen(tmp) >= 21 && tmp[19] == '.') + { + StrCpy(str_msec, sizeof(str_msec), tmp + 20); + str_msec[StrLen(tmp) - 21] = 0; + while (StrLen(str_msec) < 3) + { + StrCat(str_msec, sizeof(str_msec), "0"); + } + str_msec[3] = 0; + } + + st->wYear = ToInt(str_year); + st->wMonth = ToInt(str_month); + st->wDay = ToInt(str_day); + st->wHour = ToInt(str_hour); + st->wMinute = ToInt(str_minute); + st->wSecond = ToInt(str_second); + st->wMilliseconds = ToInt(str_msec); + + NormalizeSystem(st); + + ok = true; + } + } + + return ok; +} + // Get the date and time string in RFC3339 format (example: 2017-09-27T18:25:55.434-9:00) void GetDateTimeStrRFC3339(char *str, UINT size, SYSTEMTIME *st, int timezone_min){ // Validate arguments if (str == NULL || st == NULL) { + ClearStr(str, size); return; } diff --git a/src/Mayaqua/Kernel.h b/src/Mayaqua/Kernel.h index 58e3c825..f2db8e22 100644 --- a/src/Mayaqua/Kernel.h +++ b/src/Mayaqua/Kernel.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. #ifndef KERNEL_H @@ -243,6 +137,8 @@ void GetDateTimeStrEx64(wchar_t *str, UINT size, UINT64 sec64, LOCALE *locale); void GetDateStrEx64(wchar_t *str, UINT size, UINT64 sec64, LOCALE *locale); void GetTimeStrMilli64(char *str, UINT size, UINT64 sec64); void GetDateTimeStrRFC3339(char *str, UINT size, SYSTEMTIME *st, int timezone_min); +bool DateTimeStrRFC3339ToSystemTime(SYSTEMTIME *st, char *str); +UINT64 DateTimeStrRFC3339ToSystemTime64(char *str); UINT64 SafeTime64(UINT64 sec64); bool Run(char *filename, char *arg, bool hide, bool wait); bool RunW(wchar_t *filename, wchar_t *arg, bool hide, bool wait); diff --git a/src/Mayaqua/MayaType.h b/src/Mayaqua/MayaType.h index 3223a726..8f4cdece 100644 --- a/src/Mayaqua/MayaType.h +++ b/src/Mayaqua/MayaType.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // MayaType.h @@ -227,13 +121,28 @@ typedef int (COMPARE)(void *p1, void *p2); #define GET_ABS(a) ((a) >= 0 ? (a) : -(a)) // Convert the pointer to UINT -#define POINTER_TO_KEY(p) ((sizeof(void *) == sizeof(UINT)) ? (UINT)(p) : HashPtrToUINT(p)) +#ifdef CPU_64 +#define POINTER_TO_KEY(p) HashPtrToUINT(p) +#else +#define POINTER_TO_KEY(p) (UINT)(p) +#endif + // Compare the pointer and UINT #define COMPARE_POINTER_AND_KEY(p, i) (POINTER_TO_KEY(p) == (i)) + // Convert the pointer to UINT64 -#define POINTER_TO_UINT64(p) (((sizeof(void *) == sizeof(UINT64)) ? (UINT64)(p) : (UINT64)((UINT)(p)))) +#ifdef CPU_64 +#define POINTER_TO_UINT64(p) (UINT64)(p) +#else +#define POINTER_TO_UINT64(p) (UINT64)((UINT)(p)) +#endif + // Convert a UINT64 to pointer -#define UINT64_TO_POINTER(i) ((sizeof(void *) == sizeof(UINT64)) ? (void *)(i) : (void *)((UINT)(i))) +#ifdef CPU_64 +#define UINT64_TO_POINTER(i) (void *)(i) +#else +#define UINT64_TO_POINTER(i) (void *)((UINT)(i)) +#endif // Add the value #define UINT_ADD(i, j) ((i == INFINITE || i == 0x7fffffff) ? (i) : (i += j)) @@ -438,6 +347,9 @@ typedef struct PRAND PRAND; // Str.h typedef struct TOKEN_LIST TOKEN_LIST; typedef struct INI_ENTRY INI_ENTRY; +typedef struct JSON_OBJECT JSON_OBJECT; +typedef struct JSON_ARRAY JSON_ARRAY; +typedef struct JSON_VALUE JSON_VALUE; // Internat.h typedef struct UNI_TOKEN_LIST UNI_TOKEN_LIST; @@ -474,6 +386,8 @@ typedef struct INSTANCE INSTANCE; typedef struct VALUE VALUE; typedef struct ELEMENT ELEMENT; typedef struct PACK PACK; +typedef struct JSONPACKHINT JSONPACKHINT; +typedef struct JSONPACKHINT_ITEM JSONPACKHINT_ITEM; // Cfg.h typedef struct FOLDER FOLDER; @@ -507,6 +421,7 @@ typedef struct TUBEPAIR_DATA TUBEPAIR_DATA; typedef struct UDPLISTENER UDPLISTENER; typedef struct UDPLISTENER_SOCK UDPLISTENER_SOCK; typedef struct UDPPACKET UDPPACKET; +typedef struct TCP_RAW_DATA TCP_RAW_DATA; typedef struct INTERRUPT_MANAGER INTERRUPT_MANAGER; typedef struct TUBE_FLUSH_LIST TUBE_FLUSH_LIST; typedef struct ICMP_RESULT ICMP_RESULT; @@ -592,7 +507,8 @@ typedef struct DHCP_MODIFY_OPTION DHCP_MODIFY_OPTION; typedef struct NBTDG_HEADER NBTDG_HEADER; typedef struct IKE_HEADER IKE_HEADER; - +// HTTP.h +typedef struct HTTP_MIME_TYPE HTTP_MIME_TYPE; #endif // MAYATYPE_H diff --git a/src/Mayaqua/Mayaqua.c b/src/Mayaqua/Mayaqua.c index a452ac91..38bae62f 100644 --- a/src/Mayaqua/Mayaqua.c +++ b/src/Mayaqua/Mayaqua.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Mayaqua.c @@ -434,12 +328,6 @@ bool Is32() return Is64() ? false : true; } -// .NET mode -void MayaquaDotNetMode() -{ - dot_net_mode = true; -} - // Acquisition whether in .NET mode bool MayaquaIsDotNetMode() { @@ -480,18 +368,6 @@ bool IsNt() return is_nt; } -// Whether the Unicode is supported -bool IsUnicode() -{ -#ifdef OS_WIN32 - // Windows - return IsNt(); -#else // OS_WIN32 - // UNIX - return true; -#endif // OS_WIN32 -} - // Initialization of Mayaqua library void InitMayaqua(bool memcheck, bool debug, int argc, char **argv) { @@ -552,8 +428,11 @@ void InitMayaqua(bool memcheck, bool debug, int argc, char **argv) // Initialize the Kernel status InitKernelStatus(); - // Initialize the tracking - InitTracking(); + if (IsTrackingEnabled()) + { + // Initialize the tracking + InitTracking(); + } // Initialization of thread pool InitThreading(); @@ -687,31 +566,32 @@ void FreeMayaqua() // Release of real-time clock FreeTick64(); - // Release of crypt library - FreeCryptLibrary(); - // Release of the string library FreeStringLibrary(); // Release of thread pool FreeThreading(); -#ifndef VPN_SPEED - // Show the kernel status - if (g_debug) - { - PrintKernelStatus(); - } + // Release of crypt library + FreeCryptLibrary(); - // Display the debug information - if (g_memcheck) + if (IsTrackingEnabled()) { - PrintDebugInformation(); - } -#endif // VPN_SPEED + // Show the kernel status + if (g_debug) + { + PrintKernelStatus(); + } - // Release the tracking - FreeTracking(); + // Display the debug information + if (g_memcheck) + { + PrintDebugInformation(); + } + + // Release the tracking + FreeTracking(); + } // Release of the kernel status FreeKernelStatus(); @@ -746,7 +626,6 @@ void CheckUnixTempDir() { Print("Unable to use /tmp.\n\n"); exit(0); - return; } } @@ -766,53 +645,6 @@ void AlertW(wchar_t *msg, wchar_t *caption) OSAlertW(msg, caption); } -// Display of OS information -void PrintOsInfo(OS_INFO *info) -{ - // Validate arguments - if (info == NULL) - { - return; - } - - Print( - "OS Type : %u\n" - "OS Service Pack : %u\n" - "os_is_windows : %s\n" - "os_is_windows_nt : %s\n" - "OS System Name : %s\n" - "OS Product Name : %s\n" - "OS Vendor Name : %s\n" - "OS Version : %s\n" - "Kernel Name : %s\n" - "Kernel Version : %s\n", - info->OsType, - info->OsServicePack, - OS_IS_WINDOWS(info->OsType) ? "true" : "false", - OS_IS_WINDOWS_NT(info->OsType) ? "true" : "false", - info->OsSystemName, - info->OsProductName, - info->OsVendorName, - info->OsVersion, - info->KernelName, - info->KernelVersion); - -#ifdef OS_WIN32 - { - char *exe, *dir; - exe = MsGetExeFileName(); - dir = MsGetExeDirName(); - - Print( - "EXE File Path : %s\n" - "EXE Dir Path : %s\n" - "Process Id : %u\n" - "Process Handle : 0x%X\n", - exe, dir, MsGetCurrentProcessId(), MsGetCurrentProcess()); - } -#endif // OS_WIN32 -} - // Get the OS type UINT GetOsType() { @@ -1151,6 +983,11 @@ void PrintKernelStatus() Print(" !!! MEMORY LEAKS DETECTED !!!\n\n"); if (g_memcheck == false) { + if (IsHamMode()) + { + Print(" Enable /memcheck startup option to see the leaking memory heap.\n"); + Print(" Press Enter key to exit the process.\n"); + } GetLine(NULL, 0); } } diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h index c4ba1db7..2d88536f 100644 --- a/src/Mayaqua/Mayaqua.h +++ b/src/Mayaqua/Mayaqua.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Mayaqua.h @@ -114,6 +8,10 @@ #ifndef MAYAQUA_H #define MAYAQUA_H +#include +#include +#include + // PenCore.dll related #define PENCORE_DLL_NAME "|PenCore.dll" // #define PENCORE_DLL_NAME_X64 "|PenCore_x64.dll" // commonized to x86 @@ -125,10 +23,8 @@ // Macro for the release flag #ifdef VPN_SPEED -#define DONT_USE_KERNEL_STATUS // Do not update the kernel status #define WIN32_USE_HEAP_API_FOR_MEMORY // Use the heap API to allocate memory #define WIN32_NO_DEBUG_HELP_DLL // Do not call the DLL for debugging -#define DONT_CHECK_HEAP // Do not check the status of the heap #define DONT_ALLOW_RUN_ON_DEBUGGER // Do not allow running on the debugger #endif // VPN_SPEED @@ -265,8 +161,8 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) #ifdef UNIX_SOLARIS #include #endif // UNIX_SOLARIS -#include #include +#include #include #ifdef UNIX_LINUX #include @@ -378,6 +274,9 @@ int iconv_close (iconv_t __cd); // TCP/IP #include +// HTTP +#include + // 64 bit real-time clock #include @@ -412,43 +311,35 @@ extern BOOL kernel_status_inited; #define KS_GETMAX64(id) (kernel_status_max[id]) #define KS_GETMAX(id) ((UINT)KS_GETMAX64(id)) -#ifdef DONT_USE_KERNEL_STATUS -// Disable operations of the kernel status -#define KS_INC(id) -#define KS_DEC(id) -#define KS_ADD(id, n) -#define KS_SUB(id, n) -#else // DONT_USE_KERNEL_STATUS -// Enable operations of the kernel status -#define KS_INC(id) \ -if (kernel_status_inited) { \ - KS_LOCK(id); \ - kernel_status[id]++; \ +// Operations of the kernel status +#define KS_INC(id) \ +if (IsTrackingEnabled()) { \ + KS_LOCK(id); \ + kernel_status[id]++; \ kernel_status_max[id] = MAX(kernel_status_max[id], kernel_status[id]); \ - KS_UNLOCK(id); \ + KS_UNLOCK(id); \ } -#define KS_DEC(id) \ -if (kernel_status_inited) { \ - KS_LOCK(id); \ - kernel_status[id]--; \ +#define KS_DEC(id) \ +if (IsTrackingEnabled()) { \ + KS_LOCK(id); \ + kernel_status[id]--; \ kernel_status_max[id] = MAX(kernel_status_max[id], kernel_status[id]); \ - KS_UNLOCK(id); \ + KS_UNLOCK(id); \ } -#define KS_ADD(id, n) \ -if (kernel_status_inited) { \ - KS_LOCK(id); \ - kernel_status[id] += n; \ +#define KS_ADD(id, n) \ +if (IsTrackingEnabled()) { \ + KS_LOCK(id); \ + kernel_status[id] += n; \ kernel_status_max[id] = MAX(kernel_status_max[id], kernel_status[id]); \ - KS_UNLOCK(id); \ + KS_UNLOCK(id); \ } -#define KS_SUB(id, n) \ -if (kernel_status_inited) { \ - KS_LOCK(id); \ - kernel_status[id] -= n; \ +#define KS_SUB(id, n) \ +if (IsTrackingEnabled()) { \ + KS_LOCK(id); \ + kernel_status[id] -= n; \ kernel_status_max[id] = MAX(kernel_status_max[id], kernel_status[id]); \ - KS_UNLOCK(id); \ + KS_UNLOCK(id); \ } -#endif // DONT_USE_KERNEL_STATUS // Kernel status // String related @@ -550,8 +441,6 @@ if (kernel_status_inited) { \ void InitMayaqua(bool memcheck, bool debug, int argc, char **argv); void FreeMayaqua(); bool IsNt(); -bool IsUnicode(); -void MayaquaDotNetMode(); bool MayaquaIsDotNetMode(); void MayaquaMinimalMode(); bool MayaquaIsMinimalMode(); @@ -581,7 +470,6 @@ void Alert(char *msg, char *caption); void AlertW(wchar_t *msg, wchar_t *caption); OS_INFO *GetOsInfo(); UINT GetOsType(); -void PrintOsInfo(OS_INFO *info); void CheckEndian(); void CheckUnixTempDir(); void TimeCheck(); diff --git a/src/Mayaqua/Mayaqua.vcproj b/src/Mayaqua/Mayaqua.vcproj index c17e9f68..efd2aa72 100644 --- a/src/Mayaqua/Mayaqua.vcproj +++ b/src/Mayaqua/Mayaqua.vcproj @@ -70,7 +70,7 @@
+ + @@ -416,6 +420,10 @@ RelativePath=".\FileIO.h" > + + diff --git a/src/Mayaqua/Memory.c b/src/Mayaqua/Memory.c index f208400b..506103de 100644 --- a/src/Mayaqua/Memory.c +++ b/src/Mayaqua/Memory.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Memory.c @@ -972,10 +866,6 @@ SK *NewSkEx(bool no_compact) s->p = Malloc(sizeof(void *) * s->num_reserved); s->no_compact = no_compact; -#ifndef DONT_USE_KERNEL_STATUS -// TrackNewObj(POINTER_TO_UINT64(s), "SK", 0); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_NEWSK_COUNT); @@ -1011,10 +901,6 @@ void CleanupSk(SK *s) DeleteLock(s->lock); Free(s); -#ifndef DONT_USE_KERNEL_STATUS -// TrackDeleteObj(POINTER_TO_UINT64(s)); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_FREESK_COUNT); } @@ -1278,10 +1164,6 @@ void CleanupQueue(QUEUE *q) DeleteLock(q->lock); Free(q); -#ifndef DONT_USE_KERNEL_STATUS -// TrackDeleteObj(POINTER_TO_UINT64(q)); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_FREEQUEUE_COUNT); } @@ -1297,10 +1179,6 @@ QUEUE *NewQueue() q->num_item = 0; q->fifo = NewFifo(); -#ifndef DONT_USE_KERNEL_STATUS -// TrackNewObj(POINTER_TO_UINT64(q), "QUEUE", 0); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_NEWQUEUE_COUNT); @@ -1316,10 +1194,6 @@ QUEUE *NewQueueFast() q->num_item = 0; q->fifo = NewFifoFast(); -#ifndef DONT_USE_KERNEL_STATUS -// TrackNewObj(POINTER_TO_UINT64(q), "QUEUE", 0); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_NEWQUEUE_COUNT); @@ -1539,6 +1413,48 @@ bool ReplaceListPointer(LIST *o, void *oldptr, void *newptr) return false; } +// New string list +LIST *NewStrList() +{ + return NewListFast(CompareStr); +} + +// Release string list +void ReleaseStrList(LIST *o) +{ + UINT i; + if (o == NULL) + { + return; + } + + for (i = 0;i < LIST_NUM(o);i++) + { + char *s = LIST_DATA(o, i); + Free(s); + } + + ReleaseList(o); +} + +// Add a string distinct to the string list +bool AddStrToStrListDistinct(LIST *o, char *str) +{ + if (o == NULL || str == NULL) + { + return false; + } + + if (IsInListStr(o, str) == false) + { + Add(o, CopyStr(str)); + + return true; + } + + return false; +} + // Examine whether a string items are present in the list bool IsInListStr(LIST *o, char *str) { @@ -1562,6 +1478,28 @@ bool IsInListStr(LIST *o, char *str) return false; } +bool IsInListUniStr(LIST *o, wchar_t *str) +{ + UINT i; + // Validate arguments + if (o == NULL || str == NULL) + { + return false; + } + + for (i = 0; i < LIST_NUM(o); i++) + { + wchar_t *s = LIST_DATA(o, i); + + if (UniStrCmpi(s, str) == 0) + { + return true; + } + } + + return false; +} + // Get the pointer by scanning by UINT pointer in the list void *ListKeyToPointer(LIST *o, UINT key) { @@ -1783,10 +1721,6 @@ void CleanupList(LIST *o) // KS KS_INC(KS_FREELIST_COUNT); - -#ifndef DONT_USE_KERNEL_STATUS -// TrackDeleteObj(POINTER_TO_UINT64(o)); -#endif // DONT_USE_KERNEL_STATUS } // Check whether the specified number is already in the list @@ -2145,16 +2079,87 @@ LIST *NewListEx2(COMPARE *cmp, bool fast, bool fast_malloc) o->cmp = cmp; o->sorted = true; -#ifndef DONT_USE_KERNEL_STATUS -// TrackNewObj(POINTER_TO_UINT64(o), "LIST", 0); -#endif //DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_NEWLIST_COUNT); return o; } +// Parses a string by identifying its parts using the specified separators +LIST *NewEntryList(char *src, char *key_separator, char *value_separator) +{ + LIST *o = NewListFast(NULL); + TOKEN_LIST *t; + + t = ParseTokenWithoutNullStr(src, key_separator); + if (t != NULL) + { + UINT i; + + for (i = 0; i < t->NumTokens; i++) + { + char key[MAX_SIZE]; + char value[MAX_SIZE]; + char *line = t->Token[i]; + Trim(line); + + if (GetKeyAndValue(line, key, sizeof(key), value, sizeof(value), value_separator)) + { + INI_ENTRY *e = ZeroMalloc(sizeof(INI_ENTRY)); + + e->Key = CopyStr(key); + e->Value = CopyStr(value); + + Add(o, e); + } + } + + FreeToken(t); + } + + return o; +} + +// Checks whether the list contains the specified entry +bool EntryListHasKey(LIST *o, char *key) +{ + // Validate arguments + if (o == NULL || key == NULL) + { + return false; + } + + if (GetIniEntry(o, key) != NULL) + { + return true; + } + + return false; +} + +// Gets the value of the specified key from the entry list +char *EntryListStrValue(LIST *o, char *key) +{ + return IniStrValue(o, key); +} + +UINT EntryListIntValue(LIST *o, char *key) +{ + return IniIntValue(o, key); +} + +// Release the entry list +void FreeEntryList(LIST *o) +{ + // Validate arguments + if (o == NULL) + { + return; + } + + FreeIni(o); +} + // Read all data from FIFO BUF *ReadFifoAll(FIFO *f) { @@ -2347,10 +2352,6 @@ void CleanupFifo(FIFO *f) Free(f->p); Free(f); -#ifndef DONT_USE_KERNEL_STATUS -// TrackDeleteObj(POINTER_TO_UINT64(f)); -#endif //DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_FREEFIFO_COUNT); } @@ -2397,10 +2398,6 @@ FIFO *NewFifoEx2(bool fast, bool fixed) f->p = Malloc(FIFO_INIT_MEM_SIZE); f->fixed = false; -#ifndef DONT_USE_KERNEL_STATUS -// TrackNewObj(POINTER_TO_UINT64(f), "FIFO", 0); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_NEWFIFO_COUNT); @@ -2718,10 +2715,6 @@ BUF *NewBuf() b->Current = 0; b->SizeReserved = INIT_BUF_SIZE; -#ifndef DONT_USE_KERNEL_STATUS -// TrackNewObj(POINTER_TO_UINT64(b), "BUF", 0); -#endif // DONT_USE_KERNEL_STATUS - // KS KS_INC(KS_NEWBUF_COUNT); KS_INC(KS_CURRENT_BUF_COUNT); @@ -2997,6 +2990,43 @@ void WriteBufBuf(BUF *b, BUF *bb) WriteBuf(b, bb->Buf, bb->Size); } +// Write the buffer (from the offset) to a buffer +void WriteBufBufWithOffset(BUF *b, BUF *bb) +{ + // Validate arguments + if (b == NULL || bb == NULL) + { + return; + } + + WriteBuf(b, ((UCHAR *)bb->Buf) + bb->Current, bb->Size - bb->Current); +} + +// Skip UTF-8 BOM +bool BufSkipUtf8Bom(BUF *b) +{ + if (b == NULL) + { + return false; + } + + SeekBufToBegin(b); + + if (b->Size >= 3) + { + UCHAR *data = b->Buf; + + if (data[0] == 0xEF && data[1] == 0xBB && data[2] == 0xBF) + { + SeekBuf(b, 3, 1); + + return true; + } + } + + return false; +} + // Read into a buffer from the buffer BUF *ReadBufFromBuf(BUF *b, UINT size) { @@ -3166,10 +3196,6 @@ void FreeBuf(BUF *b) // KS KS_INC(KS_FREEBUF_COUNT); KS_DEC(KS_CURRENT_BUF_COUNT); - -#ifndef DONT_USE_KERNEL_STATUS -// TrackDeleteObj(POINTER_TO_UINT64(b)); -#endif // DONT_USE_KERNEL_STATUS } // Compare BUFs whether two are identical @@ -3724,10 +3750,21 @@ void Free(void *addr) InternalFree(tag); } +// Free and set pointer's value to NULL +void FreeSafe(void **addr) +{ + Free(*addr); + *addr = NULL; +} + // Check the memtag void CheckMemTag(MEMTAG *tag) { -#ifndef DONT_CHECK_HEAP + if (IsTrackingEnabled() == false) + { + return; + } + // Validate arguments if (tag == NULL) { @@ -3740,7 +3777,6 @@ void CheckMemTag(MEMTAG *tag) AbortExitEx("CheckMemTag: tag->Magic != MEMTAG_MAGIC"); return; } -#endif // DONT_CHECK_HEAP } // ZeroMalloc @@ -3784,9 +3820,7 @@ void *InternalMalloc(UINT size) OSSleep(MEMORY_SLEEP_TIME); } -#ifndef DONT_USE_KERNEL_STATUS TrackNewObj(POINTER_TO_UINT64(addr), "MEM", size); -#endif //DONT_USE_KERNEL_STATUS return addr; } @@ -3804,9 +3838,7 @@ void InternalFree(void *addr) KS_DEC(KS_CURRENT_MEM_COUNT); KS_INC(KS_FREE_COUNT); -#ifndef DONT_USE_KERNEL_STATUS TrackDeleteObj(POINTER_TO_UINT64(addr)); -#endif // DONT_USE_KERNEL_STATUS // Memory release OSMemoryFree(addr); @@ -3839,9 +3871,7 @@ void *InternalReAlloc(void *addr, UINT size) OSSleep(MEMORY_SLEEP_TIME); } -#ifndef DONT_USE_KERNEL_STATUS - TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr); -#endif // DONT_USE_KERNEL_STATUS + TrackChangeObjSize(POINTER_TO_UINT64(addr), size, POINTER_TO_UINT64(new_addr)); return new_addr; } diff --git a/src/Mayaqua/Memory.h b/src/Mayaqua/Memory.h index 11f9fa2e..acf32089 100644 --- a/src/Mayaqua/Memory.h +++ b/src/Mayaqua/Memory.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Memory.h @@ -128,6 +22,7 @@ #define MEMTAG_TO_POINTER(p) ((void *)(((UCHAR *)(p)) + sizeof(MEMTAG))) #define POINTER_TO_MEMTAG(p) ((MEMTAG *)(((UCHAR *)(p)) - sizeof(MEMTAG))) #define IS_NULL_POINTER(p) (((p) == NULL) || ((POINTER_TO_UINT64(p) == (UINT64)sizeof(MEMTAG)))) +#define PTR_TO_PTR(p) ((void **)(&p)) // Fixed size of a block of memory pool #define MEMPOOL_MAX_SIZE 3000 @@ -276,6 +171,7 @@ void *ZeroMalloc(UINT size); void *ZeroMallocEx(UINT size, bool zero_clear_when_free); void *ReAlloc(void *addr, UINT size); void Free(void *addr); +void FreeSafe(void **addr); void CheckMemTag(MEMTAG *tag); UINT GetMemSize(void *addr); @@ -312,7 +208,9 @@ BUF *NewBufFromMemory(void *buf, UINT size); void ClearBuf(BUF *b); void WriteBuf(BUF *b, void *buf, UINT size); void WriteBufBuf(BUF *b, BUF *bb); +void WriteBufBufWithOffset(BUF *b, BUF *bb); UINT ReadBuf(BUF *b, void *buf, UINT size); +bool BufSkipUtf8Bom(BUF *b); BUF *ReadBufFromBuf(BUF *b, UINT size); void AdjustBufSize(BUF *b, UINT new_size); void SeekBuf(BUF *b, UINT offset, int mode); @@ -380,6 +278,11 @@ LIST *NewListFast(COMPARE *cmp); LIST *NewListEx(COMPARE *cmp, bool fast); LIST *NewListEx2(COMPARE *cmp, bool fast, bool fast_malloc); LIST *NewListSingle(void *p); +LIST *NewEntryList(char *src, char *key_separator, char *value_separator); +bool EntryListHasKey(LIST *o, char *key); +char *EntryListStrValue(LIST *o, char *key); +UINT EntryListIntValue(LIST *o, char *key); +void FreeEntryList(LIST *o); LIST *CloneList(LIST *o); void CopyToArray(LIST *o, void *p); void *ToArray(LIST *o); @@ -391,6 +294,7 @@ bool IsInList(LIST *o, void *p); bool IsInListKey(LIST *o, UINT key); void *ListKeyToPointer(LIST *o, UINT key); bool IsInListStr(LIST *o, char *str); +bool IsInListUniStr(LIST *o, wchar_t *str); bool ReplaceListPointer(LIST *o, void *oldptr, void *newptr); void AddInt(LIST *o, UINT i); void AddInt64(LIST *o, UINT64 i); @@ -455,5 +359,9 @@ void CleanupSharedBuffer(SHARED_BUFFER *b); void AppendBufUtf8(BUF *b, wchar_t *str); void AppendBufStr(BUF *b, char *str); +LIST *NewStrList(); +void ReleaseStrList(LIST *o); +bool AddStrToStrListDistinct(LIST *o, char *str); + #endif // MEMORY_H diff --git a/src/Mayaqua/Microsoft.c b/src/Mayaqua/Microsoft.c index fbcf12b9..0dbfc24e 100644 --- a/src/Mayaqua/Microsoft.c +++ b/src/Mayaqua/Microsoft.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Microsoft.c @@ -1823,6 +1717,59 @@ HANDLE MsCreateUserToken() return hNewToken; } +// Check whether SHA-2 kernel mode signature is supported +bool MsIsSha2KernelModeSignatureSupported() +{ + HINSTANCE hDll; + bool ret = false; + + if (MsIsWindows8()) + { + return true; + } + + hDll = LoadLibrary("Wintrust.dll"); + if (hDll == NULL) + { + return false; + } + + if (GetProcAddress(hDll, "CryptCATAdminAcquireContext2") != NULL) + { + ret = true; + } + + FreeLibrary(hDll); + + return ret; +} + +// Check whether KB3033929 is required +bool MsIsKB3033929RequiredAndMissing() +{ + OS_INFO *info = GetOsInfo(); + + if (info == NULL) + { + return false; + } + + if (OS_IS_WINDOWS_NT(info->OsType)) + { + if (GET_KETA(info->OsType, 100) == 6) + { + if (MsIsX64()) + { + if (MsIsSha2KernelModeSignatureSupported() == false) + { + return true; + } + } + } + } + + return false; +} // Check the digital signature of the file bool MsCheckFileDigitalSignatureW(HWND hWnd, wchar_t *name, bool *danger) @@ -3119,6 +3066,10 @@ wchar_t *MsGetAdapterTypeStr(UINT type) switch (type) { + case IF_TYPE_PROP_VIRTUAL: + ret = _UU("MS_VIRTUAL"); + break; + case MIB_IF_TYPE_ETHERNET: ret = _UU("MS_ETHERNET"); break; @@ -4565,8 +4516,11 @@ void CALLBACK MsServiceDispatcher(DWORD argc, LPTSTR *argv) //// Initialization // Start of the Mayaqua -#ifdef DEBUG - InitMayaqua(true, true, 0, NULL); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, 0, NULL); #else InitMayaqua(false, false, 0, NULL); #endif @@ -4744,8 +4698,11 @@ UINT MsService(char *name, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT } // Start of the Mayaqua -#ifdef DEBUG - InitMayaqua(true, true, 0, NULL); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, 0, NULL); #else InitMayaqua(false, false, 0, NULL); #endif @@ -12381,6 +12338,12 @@ bool MsGetMsiInstalledDir(char *component_code, wchar_t *dir, UINT dir_size) return ret; } +// Determine whether minidump is enabled +bool MsIsMinidumpEnabled() +{ + return ms->MiniDumpEnabled; +} + // Determine whether to create a minidump void MsSetEnableMinidump(bool enabled) { diff --git a/src/Mayaqua/Microsoft.h b/src/Mayaqua/Microsoft.h index 09dc0146..405a8802 100644 --- a/src/Mayaqua/Microsoft.h +++ b/src/Mayaqua/Microsoft.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Microsoft.h @@ -953,6 +847,8 @@ bool MsIsInfCatalogRequired(); bool MsCheckFileDigitalSignatureW(HWND hWnd, wchar_t *name, bool *danger); +bool MsIsKB3033929RequiredAndMissing(); +bool MsIsSha2KernelModeSignatureSupported(); bool MsGetProcessExeName(char *path, UINT size, UINT id); bool MsGetWindowOwnerProcessExeName(char *path, UINT size, HWND hWnd); @@ -990,6 +886,7 @@ bool MsIsWinXPOrWinVista(); bool MsGetFileInformation(void *h, void *info); void MsSetErrorModeToSilent(); void MsSetEnableMinidump(bool enabled); +bool MsIsMinidumpEnabled(); void MsWriteMinidump(wchar_t *filename, void *ex); diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index 1b77f891..ce9cf798 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -1,113 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Contributors: -// - nattoheaven (https://github.com/nattoheaven) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Network.c @@ -184,13 +76,7 @@ struct ROUTE_CHANGE_DATA #endif // IPV6_V6ONLY #endif // UNIX_SOLARIS - - // HTTP constant -static char http_404_str[] = "\r\n\r\n404 Not Found\r\n\r\n

Not Found

\r\nThe requested URL $TARGET$ was not found on this server.

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; -static char http_403_str[] = "\r\n\r\n403 Forbidden\r\n\r\n

Forbidden

\r\nYou don't have permission to access $TARGET$\r\non this server.

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; -static char http_500_str[] = "\r\n\r\n500 Server Error\r\n\r\n

Server Error

\r\nServer Error

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; -static char http_501_str[] = "\r\n\r\n501 Method Not Implemented\r\n\r\n

Method Not Implemented

\r\n$METHOD$ to $TARGET$ not supported.

\r\nInvalid method in request $METHOD$ $TARGET$ $VERSION$

\r\n


\r\n
HTTP Server at $HOST$ Port $PORT$
\r\n\r\n"; static char http_detect_server_startwith[] = "\r\n\r\n403 Forbidden\r\n\r\n

Forbidden

\r\nYou don't have permission to access "; static char http_detect_server_tag_future[] = "9C37197CA7C2428388C2E6E59B829B30"; @@ -205,7 +91,6 @@ static LOCK *socket_library_lock = NULL; extern LOCK *openssl_lock; static LOCK *ssl_accept_lock = NULL; static LOCK *ssl_connect_lock = NULL; -static TOKEN_LIST *cipher_list_token = NULL; static COUNTER *num_tcp_connections = NULL; static LOCK *dns_lock = NULL; static LOCK *unix_dns_server_addr_lock = NULL; @@ -233,12 +118,6 @@ static COUNTER *getip_thread_counter = NULL; static UINT max_getip_thread = 0; -static char *cipher_list = "RC4-MD5 RC4-SHA AES128-SHA AES256-SHA DES-CBC-SHA DES-CBC3-SHA DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA AES128-GCM-SHA256 AES128-SHA256 AES256-GCM-SHA384 AES256-SHA256 DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES128-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-SHA384" -#if OPENSSL_VERSION_NUMBER >= 0x10100000L - " DHE-RSA-CHACHA20-POLY1305 ECDHE-RSA-CHACHA20-POLY1305"; -#endif -; - static LIST *ip_clients = NULL; static LIST *local_mac_list = NULL; @@ -5678,7 +5557,7 @@ int SslCertVerifyCallback(int preverify_ok, X509_STORE_CTX *ctx) if (!preverify_ok) { const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr); - StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg); + StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, (char *)msg); Debug("SslCertVerifyCallback preverify error: '%s'\n", msg); } else @@ -7344,6 +7223,12 @@ bool IsIP4(IP *ip) return (IsIP6(ip) ? false : true); } +// Copy the IP address +void CopyIP(IP *dst, IP *src) +{ + Copy(dst, src, sizeof(IP)); +} + // Get the number of clients connected from the specified IP address UINT GetNumIpClient(IP *ip) { @@ -10707,36 +10592,40 @@ void FreeRouteTable(ROUTE_TABLE *t) // UDP receiving UINT RecvFrom(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) { - SOCKET s; - int ret, sz; struct sockaddr_in addr; + int ret = 0; +#ifdef OS_WIN32 + int socklen = sizeof(addr); +#else + socklen_t socklen = sizeof(addr); +#endif + // Validate arguments if (sock != NULL) { + if (sock->IPv6) + { + return RecvFrom6(sock, src_addr, src_port, data, size); + } + sock->IgnoreRecvErr = false; } - if (sock == NULL || src_addr == NULL || src_port == NULL || data == NULL) + else { - return false; + return 0; } + + if (src_addr == NULL || src_port == NULL || data == NULL || size == 0) + { + return 0; + } + if (sock->Type != SOCK_UDP || sock->socket == INVALID_SOCKET) { - return false; - } - if (size == 0) - { - return false; + return 0; } - if (sock->IPv6) - { - return RecvFrom6(sock, src_addr, src_port, data, size); - } - - s = sock->socket; - - sz = sizeof(addr); - ret = recvfrom(s, data, size, 0, (struct sockaddr *)&addr, (int *)&sz); + ret = recvfrom(sock->socket, data, size, 0, (struct sockaddr *)&addr, &socklen); if (ret > 0) { InAddrToIP(src_addr, &addr.sin_addr); @@ -10744,13 +10633,6 @@ UINT RecvFrom(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) if (sock->IsRawSocket) { *src_port = sock->LocalPort; -/* - { - char tmp[MAX_SIZE]; - - IPToStr(tmp, sizeof(tmp), &sock->LocalIP); - Debug("Raw: %u from %s\n", sock->LocalPort, tmp); - }*/ } Lock(sock->lock); @@ -10760,14 +10642,10 @@ UINT RecvFrom(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) } Unlock(sock->lock); - // Debug("UDP RecvFrom: %u\n", ret); - return (UINT)ret; } else { - sock->IgnoreRecvErr = false; - #ifdef OS_WIN32 if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAENETRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH || WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEHOSTUNREACH || WSAGetLastError() == WSAEUSERS || WSAGetLastError() == WSAEADDRNOTAVAIL || WSAGetLastError() == WSAEADDRNOTAVAIL) @@ -10780,10 +10658,9 @@ UINT RecvFrom(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) } else { - UINT e = WSAGetLastError(); -// Debug("RecvFrom Error: %u\n", e); + Debug("RecvFrom(): recvfrom() failed with error: %u\n", WSAGetLastError()); } -#else // OS_WIN32 +#else if (errno == ECONNREFUSED || errno == ECONNRESET || errno == EMSGSIZE || errno == ENOBUFS || errno == ENOMEM || errno == EINTR) { sock->IgnoreRecvErr = true; @@ -10792,37 +10669,46 @@ UINT RecvFrom(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) { return SOCK_LATER; } -#endif // OS_WIN32 + else + { + Debug("RecvFrom(): recvfrom() failed with error: %s\n", strerror(errno)); + } +#endif return 0; } } UINT RecvFrom6(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) { - SOCKET s; - int ret, sz; struct sockaddr_in6 addr; + int ret = 0; +#ifdef OS_WIN32 + int socklen = sizeof(addr); +#else + socklen_t socklen = sizeof(addr); +#endif + // Validate arguments if (sock != NULL) { sock->IgnoreRecvErr = false; } - if (sock == NULL || src_addr == NULL || src_port == NULL || data == NULL) + else { - return false; + return 0; } + + if (src_addr == NULL || src_port == NULL || data == NULL || size == 0) + { + return 0; + } + if (sock->Type != SOCK_UDP || sock->socket == INVALID_SOCKET) { - return false; - } - if (size == 0) - { - return false; + return 0; } - s = sock->socket; - sz = sizeof(addr); - ret = recvfrom(s, data, size, 0, (struct sockaddr *)&addr, (int *)&sz); + ret = recvfrom(sock->socket, data, size, 0, (struct sockaddr *)&addr, &socklen); if (ret > 0) { InAddrToIP6(src_addr, &addr.sin6_addr); @@ -10840,14 +10726,10 @@ UINT RecvFrom6(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) } Unlock(sock->lock); - // Debug("UDP RecvFrom: %u\n", ret); - return (UINT)ret; } else { - sock->IgnoreRecvErr = false; - #ifdef OS_WIN32 if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAENETRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH || WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEHOSTUNREACH || WSAGetLastError() == WSAEUSERS || WSAGetLastError() == WSAEADDRNOTAVAIL || WSAGetLastError() == WSAEADDRNOTAVAIL) @@ -10860,10 +10742,9 @@ UINT RecvFrom6(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) } else { - UINT e = WSAGetLastError(); - // Debug("RecvFrom Error: %u\n", e); + Debug("RecvFrom(): recvfrom() failed with error: %u\n", WSAGetLastError()); } -#else // OS_WIN32 +#else if (errno == ECONNREFUSED || errno == ECONNRESET || errno == EMSGSIZE || errno == ENOBUFS || errno == ENOMEM || errno == EINTR) { sock->IgnoreRecvErr = true; @@ -10872,7 +10753,11 @@ UINT RecvFrom6(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) { return SOCK_LATER; } -#endif // OS_WIN32 + else + { + Debug("RecvFrom(): recvfrom() failed with error: %s\n", strerror(errno)); + } +#endif return 0; } } @@ -11483,6 +11368,50 @@ void InitSockSet(SOCKSET *set) Zero(set, sizeof(SOCKSET)); } +// Receive data and discard all of them +bool RecvAllWithDiscard(SOCK *sock, UINT size, bool secure) +{ + static UCHAR buffer[4096]; + UINT recv_size, sz, ret; + if (sock == NULL) + { + return false; + } + if (size == 0) + { + return true; + } + if (sock->AsyncMode) + { + return false; + } + + recv_size = 0; + + while (true) + { + sz = MIN(size - recv_size, sizeof(buffer)); + ret = Recv(sock, buffer, sz, secure); + if (ret == 0) + { + return false; + } + if (ret == SOCK_LATER) + { + // I suppose that this is safe because the RecvAll() function is used only + // if the sock->AsyncMode == true. And the Recv() function may return + // SOCK_LATER only if the sock->AsyncMode == false. Therefore the call of + // Recv() function in the RecvAll() function never returns SOCK_LATER. + return false; + } + recv_size += ret; + if (recv_size >= size) + { + return true; + } + } +} + // Receive all by TCP bool RecvAll(SOCK *sock, void *data, UINT size, bool secure) { @@ -12327,7 +12256,7 @@ UINT SecureSend(SOCK *sock, void *data, UINT size) if (sock->Connected == false) { Unlock(sock->ssl_lock); - Debug("%s %u SecureRecv() Disconnect\n", __FILE__, __LINE__); + Debug("%s %u SecureSend() Disconnect\n", __FILE__, __LINE__); return 0; } @@ -12357,7 +12286,7 @@ UINT SecureSend(SOCK *sock, void *data, UINT size) if (ret == 0) { // Disconnect - Debug("%s %u SecureRecv() Disconnect\n", __FILE__, __LINE__); + Debug("%s %u SecureSend() Disconnect\n", __FILE__, __LINE__); Disconnect(sock); return 0; } @@ -12372,7 +12301,7 @@ UINT SecureSend(SOCK *sock, void *data, UINT size) } Debug("%s %u e=%u\n", __FILE__, __LINE__, e); } - //Debug("%s %u SecureRecv() Disconnect\n", __FILE__, __LINE__); + //Debug("%s %u SecureSend() Disconnect\n", __FILE__, __LINE__); Disconnect(sock); return 0; } @@ -15081,7 +15010,7 @@ void GetMachineNameEx(char *name, UINT size, bool no_load_hosts) { if (GetMachineNameFromHosts(tmp2, sizeof(tmp2))) { - StrCpy(name, sizeof(name), tmp2); + StrCpy(name, size, tmp2); } } } @@ -16532,8 +16461,6 @@ void InitNetwork() Zero(&unix_dns_server, sizeof(unix_dns_server)); local_mac_list_lock = NewLock(); - cipher_list_token = ParseToken(cipher_list, " "); - current_global_ip_lock = NewLock(); current_fqdn_lock = NewLock(); current_global_ip_set = false; @@ -16566,7 +16493,67 @@ bool IsNetworkNameCacheEnabled() // Get the cipher algorithm list TOKEN_LIST *GetCipherList() { - return cipher_list_token; + UINT i; + SSL *ssl; + SSL_CTX *ctx; + const char *name; + STACK_OF(SSL_CIPHER) *sk; + + TOKEN_LIST *ciphers = ZeroMalloc(sizeof(TOKEN_LIST)); + + ctx = NewSSLCtx(true); + if (ctx == NULL) + { + return ciphers; + } + + SSL_CTX_set_ssl_version(ctx, SSLv23_server_method()); + +#ifdef SSL_OP_NO_SSLv3 + SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3); +#endif + + ssl = SSL_new(ctx); + if (ssl == NULL) + { + FreeSSLCtx(ctx); + return ciphers; + } + +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + sk = SSL_get1_supported_ciphers(ssl); +#else + sk = SSL_get_ciphers(ssl); +#endif + + for (i = 0; i < (UINT)sk_SSL_CIPHER_num(sk); i++) + { + const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i); + + name = SSL_CIPHER_get_name(c); + if (IsEmptyStr((char *)name)) + { + break; + } + + ciphers->NumTokens++; + + if (ciphers->Token != NULL) + { + ciphers->Token = ReAlloc(ciphers->Token, sizeof(char *) * ciphers->NumTokens); + } + else + { + ciphers->Token = Malloc(sizeof(char *)); + } + + ciphers->Token[i] = CopyStr((char *)name); + } + + sk_SSL_CIPHER_free(sk); + SSL_free(ssl); + + return ciphers; } // Get the TCP connections counter @@ -16954,9 +16941,6 @@ void FreeNetwork() // Release of thread-related FreeWaitThread(); - FreeToken(cipher_list_token); - cipher_list_token = NULL; - Zero(&unix_dns_server, sizeof(unix_dns_server)); // Release the locks @@ -18711,16 +18695,9 @@ LABEL_RESTART: // Create a thread to get a NAT-T IP address if necessary if (u->GetNatTIpThread == NULL) { - // Create a thread to get a NAT-T IP address if necessary - if (u->GetNatTIpThread == NULL) - { - char natt_hostname[MAX_SIZE]; - - RUDPGetRegisterHostNameByIP(natt_hostname, sizeof(natt_hostname), NULL); - - u->GetNatTIpThread = NewQueryIpThread(natt_hostname, QUERYIPTHREAD_INTERVAL_LAST_OK, QUERYIPTHREAD_INTERVAL_LAST_NG); - } - + char natt_hostname[MAX_SIZE]; + RUDPGetRegisterHostNameByIP(natt_hostname, sizeof(natt_hostname), NULL); + u->GetNatTIpThread = NewQueryIpThread(natt_hostname, QUERYIPTHREAD_INTERVAL_LAST_OK, QUERYIPTHREAD_INTERVAL_LAST_NG); GetQueryIpThreadResult(u->GetNatTIpThread, &nat_t_ip); } } @@ -18809,6 +18786,8 @@ LABEL_FATAL_ERROR: p->SrcPort = p->DestPort = MAKE_SPECIAL_PORT(50); } + p->Type = u->PacketType; + Add(recv_list, p); } @@ -18997,6 +18976,40 @@ UDPLISTENER_SOCK *DetermineUdpSocketForSending(UDPLISTENER *u, UDPPACKET *p) return NULL; } +void FreeTcpRawData(TCP_RAW_DATA *trd) +{ + // Validate arguments + if (trd == NULL) + { + return; + } + + ReleaseFifo(trd->Data); + Free(trd); +} + +TCP_RAW_DATA *NewTcpRawData(IP *src_ip, UINT src_port, IP *dst_ip, UINT dst_port) +{ + TCP_RAW_DATA *trd; + // Validate arguments + if (dst_ip == NULL || dst_port == 0) + { + return NULL; + } + + trd = ZeroMalloc(sizeof(TCP_RAW_DATA)); + + Copy(&trd->SrcIP, src_ip, sizeof(IP)); + trd->SrcPort = src_port; + + Copy(&trd->DstIP, dst_ip, sizeof(IP)); + trd->DstPort = dst_port; + + trd->Data = NewFifoFast(); + + return trd; +} + // Release of the UDP packet void FreeUdpPacket(UDPPACKET *p) { @@ -19067,6 +19080,11 @@ void UdpListenerSendPackets(UDPLISTENER *u, LIST *packet_list) // Creating a UDP listener UDPLISTENER *NewUdpListener(UDPLISTENER_RECV_PROC *recv_proc, void *param, IP *listen_ip) +{ + return NewUdpListenerEx(recv_proc, param, listen_ip, INFINITE); +} + +UDPLISTENER *NewUdpListenerEx(UDPLISTENER_RECV_PROC *recv_proc, void *param, IP *listen_ip, UINT packet_type) { UDPLISTENER *u; // Validate arguments @@ -19078,6 +19096,7 @@ UDPLISTENER *NewUdpListener(UDPLISTENER_RECV_PROC *recv_proc, void *param, IP *l u = ZeroMalloc(sizeof(UDPLISTENER)); u->Param = param; + u->PacketType = packet_type; u->PortList = NewList(NULL); u->Event = NewSockEvent(); @@ -19920,104 +19939,6 @@ void FlushTubeFlushList(TUBE_FLUSH_LIST *f) DeleteAll(f->List); } -// The server receives a PACK from the client -PACK *HttpServerRecv(SOCK *s) -{ - BUF *b; - PACK *p; - HTTP_HEADER *h; - UINT size; - UCHAR *tmp; - HTTP_VALUE *v; - UINT num_noop = 0; - // Validate arguments - if (s == NULL) - { - return NULL; - } - -START: - - h = RecvHttpHeader(s); - if (h == NULL) - { - goto BAD_REQUEST; - } - - if (StrCmpi(h->Method, "POST") != 0 || - StrCmpi(h->Target, HTTP_VPN_TARGET) != 0 || - StrCmpi(h->Version, "HTTP/1.1") != 0) - { - FreeHttpHeader(h); - goto BAD_REQUEST; - } - - v = GetHttpValue(h, "Content-Type"); - if (v == NULL || StrCmpi(v->Data, HTTP_CONTENT_TYPE2) != 0) - { - FreeHttpHeader(h); - goto BAD_REQUEST; - } - - size = GetContentLength(h); - if (size == 0 || size > HTTP_PACK_MAX_SIZE) - { - FreeHttpHeader(h); - goto BAD_REQUEST; - } - - tmp = MallocEx(size, true); - if (RecvAll(s, tmp, size, s->SecureMode) == false) - { - Free(tmp); - FreeHttpHeader(h); - return NULL; - } - - b = NewBuf(); - WriteBuf(b, tmp, size); - Free(tmp); - FreeHttpHeader(h); - - SeekBuf(b, 0, 0); - p = BufToPack(b); - FreeBuf(b); - - // Determine whether it's a NOOP - if (PackGetInt(p, "noop") != 0) - { - Debug("recv: noop\n"); - FreePack(p); - - p = PackError(0); - PackAddInt(p, "noop", 1); - if (HttpServerSend(s, p) == false) - { - FreePack(p); - return NULL; - } - - FreePack(p); - - num_noop++; - - if (num_noop > MAX_NOOP_PER_SESSION) - { - return NULL; - } - - goto START; - } - - return p; - -BAD_REQUEST: - // Return an error - - - return NULL; -} - // Store the error value into PACK PACK *PackError(UINT error) { @@ -20041,68 +19962,6 @@ UINT GetErrorFromPack(PACK *p) return PackGetInt(p, "error"); } -// Client receives a PACK from the server -PACK *HttpClientRecv(SOCK *s) -{ - BUF *b; - PACK *p; - HTTP_HEADER *h; - UINT size; - UCHAR *tmp; - HTTP_VALUE *v; - // Validate arguments - if (s == NULL) - { - return NULL; - } - - h = RecvHttpHeader(s); - if (h == NULL) - { - return NULL; - } - - if (StrCmpi(h->Method, "HTTP/1.1") != 0 || - StrCmpi(h->Target, "200") != 0) - { - FreeHttpHeader(h); - return NULL; - } - - v = GetHttpValue(h, "Content-Type"); - if (v == NULL || StrCmpi(v->Data, HTTP_CONTENT_TYPE2) != 0) - { - FreeHttpHeader(h); - return NULL; - } - - size = GetContentLength(h); - if (size == 0 || size > MAX_PACK_SIZE) - { - FreeHttpHeader(h); - return NULL; - } - - tmp = MallocEx(size, true); - if (RecvAll(s, tmp, size, s->SecureMode) == false) - { - Free(tmp); - FreeHttpHeader(h); - return NULL; - } - - b = NewBuf(); - WriteBuf(b, tmp, size); - Free(tmp); - FreeHttpHeader(h); - - SeekBuf(b, 0, 0); - p = BufToPack(b); - FreeBuf(b); - - return p; -} - // Create an entry to PACK for the dummy void CreateDummyValue(PACK *p) { @@ -20123,545 +19982,6 @@ void CreateDummyValue(PACK *p) Free(buf); } -// Client sends a PACK to the server -bool HttpClientSend(SOCK *s, PACK *p) -{ - BUF *b; - bool ret; - HTTP_HEADER *h; - char date_str[MAX_SIZE]; - char ip_str[MAX_SIZE]; - - // Validate arguments - if (s == NULL || p == NULL) - { - return false; - } - - IPToStr(ip_str, sizeof(ip_str), &s->RemoteIP); - - CreateDummyValue(p); - - b = PackToBuf(p); - if (b == NULL) - { - return false; - } - - h = NewHttpHeader("POST", HTTP_VPN_TARGET, "HTTP/1.1"); - - GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); - AddHttpValue(h, NewHttpValue("Date", date_str)); - AddHttpValue(h, NewHttpValue("Host", ip_str)); - AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); - AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE2)); - - ret = PostHttp(s, h, b->Buf, b->Size); - - FreeHttpHeader(h); - FreeBuf(b); - - return ret; -} - -// Server sends a PACK to the client -bool HttpServerSend(SOCK *s, PACK *p) -{ - BUF *b; - bool ret; - HTTP_HEADER *h; - char date_str[MAX_SIZE]; - // Validate arguments - if (s == NULL || p == NULL) - { - return false; - } - - CreateDummyValue(p); - - b = PackToBuf(p); - if (b == NULL) - { - return false; - } - - h = NewHttpHeader("HTTP/1.1", "200", "OK"); - - GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); - AddHttpValue(h, NewHttpValue("Date", date_str)); - AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); - AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE2)); - - ret = PostHttp(s, h, b->Buf, b->Size); - - FreeHttpHeader(h); - FreeBuf(b); - - return ret; -} - -// Replace unsafe characters in target -void ReplaceUnsafeCharInTarget(char *target){ - UINT i; - for(i = 0; target[i] ; i++) { - if(target[i] == '<') - target[i] = '('; - else if(target[i] == '>') - target[i] = ')'; - } -} - -// Sending the 501 Not Implemented error -bool HttpSendNotImplemented(SOCK *s, char *method, char *target, char *version) -{ - HTTP_HEADER *h; - char date_str[MAX_SIZE]; - char *str; - UINT str_size; - char port_str[MAX_SIZE]; - bool ret; - char host[MAX_SIZE]; - UINT port; - // Validate arguments - if (s == NULL || target == NULL) - { - return false; - } - - // Get the host name - //GetMachineName(host, MAX_SIZE); - Zero(host, sizeof(host)); - IPToStr(host, sizeof(host), &s->LocalIP); - // Get the port number - port = s->LocalPort; - - // Creating a header - GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); - - h = NewHttpHeader("HTTP/1.1", "501", "Method Not Implemented"); - - AddHttpValue(h, NewHttpValue("Date", date_str)); - AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); - AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE)); - - // Creating a Data - str_size = sizeof(http_501_str) * 2 + StrLen(target) + StrLen(host) + StrLen(method) + StrLen(version); - str = Malloc(str_size); - StrCpy(str, str_size, http_501_str); - - // TARGET - ReplaceUnsafeCharInTarget(target); - ReplaceStri(str, str_size, str, "$TARGET$", target); - - // HOST - ReplaceStri(str, str_size, str, "$HOST$", host); - - // PORT - ToStr(port_str, port); - ReplaceStri(str, str_size, str, "$PORT$", port_str); - - // METHOD - ReplaceStri(str, str_size, str, "$METHOD$", method); - - // VERSION - ReplaceStri(str, str_size, str, "$VERSION$", version); - - // Transmission - ret = PostHttp(s, h, str, StrLen(str)); - - FreeHttpHeader(h); - Free(str); - - return ret; -} - -// Sending a 404 Not Found error -bool HttpSendNotFound(SOCK *s, char *target) -{ - HTTP_HEADER *h; - char date_str[MAX_SIZE]; - char *str; - UINT str_size; - char port_str[MAX_SIZE]; - bool ret; - char host[MAX_SIZE]; - UINT port; - // Validate arguments - if (s == NULL || target == NULL) - { - return false; - } - - // Get the host name - //GetMachineName(host, MAX_SIZE); - Zero(host, sizeof(host)); - IPToStr(host, sizeof(host), &s->LocalIP); - // Get the port number - port = s->LocalPort; - - // Creating a header - GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); - - h = NewHttpHeader("HTTP/1.1", "404", "Not Found"); - - AddHttpValue(h, NewHttpValue("Date", date_str)); - AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); - AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE)); - - // Creating a Data - str_size = sizeof(http_404_str) * 2 + StrLen(target) + StrLen(host); - str = Malloc(str_size); - StrCpy(str, str_size, http_404_str); - - // TARGET - ReplaceUnsafeCharInTarget(target); - ReplaceStri(str, str_size, str, "$TARGET$", target); - - // HOST - ReplaceStri(str, str_size, str, "$HOST$", host); - - // PORT - ToStr(port_str, port); - ReplaceStri(str, str_size, str, "$PORT$", port_str); - - // Transmission - ret = PostHttp(s, h, str, StrLen(str)); - - FreeHttpHeader(h); - Free(str); - - return ret; -} - -// Sending a 403 Forbidden error -bool HttpSendForbidden(SOCK *s, char *target, char *server_id) -{ - HTTP_HEADER *h; - char date_str[MAX_SIZE]; - char *str; - UINT str_size; - char port_str[MAX_SIZE]; - bool ret; - char host[MAX_SIZE]; - UINT port; - // Validate arguments - if (s == NULL || target == NULL) - { - return false; - } - - // Get the host name - //GetMachineName(host, MAX_SIZE); - Zero(host, sizeof(host)); - IPToStr(host, sizeof(host), &s->LocalIP); - // Get the port number - port = s->LocalPort; - - // Creating a header - GetHttpDateStr(date_str, sizeof(date_str), SystemTime64()); - - h = NewHttpHeader("HTTP/1.1", "403", "Forbidden"); - - AddHttpValue(h, NewHttpValue("Date", date_str)); - AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE)); - AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE)); - - // Creating a Data - str_size = sizeof(http_403_str) * 2 + StrLen(target) + StrLen(host); - str = Malloc(str_size); - StrCpy(str, str_size, http_403_str); - - // TARGET - ReplaceUnsafeCharInTarget(target); - ReplaceStri(str, str_size, str, "$TARGET$", target); - - // HOST - ReplaceStri(str, str_size, str, "$HOST$", host); - - // PORT - ToStr(port_str, port); - ReplaceStri(str, str_size, str, "$PORT$", port_str); - - // Transmission - ret = PostHttp(s, h, str, StrLen(str)); - - FreeHttpHeader(h); - Free(str); - - return ret; -} - -// Get the date and time string for the HTTP header -void GetHttpDateStr(char *str, UINT size, UINT64 t) -{ - SYSTEMTIME s; - static char *wday[] = - { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", - }; - static char *month[] = - { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", - "Nov", "Dec", - }; - // Validate arguments - if (str == NULL) - { - return; - } - UINT64ToSystem(&s, t); - - Format(str, size, "%s, %02u %s %04u %02u:%02u:%02u GMT", - wday[s.wDayOfWeek], s.wDay, month[s.wMonth - 1], s.wYear, - s.wHour, s.wMinute, s.wSecond); -} - -// Get the Content-Length from the HTTP header -UINT GetContentLength(HTTP_HEADER *header) -{ - UINT ret; - HTTP_VALUE *v; - // Validate arguments - if (header == NULL) - { - return 0; - } - - v = GetHttpValue(header, "Content-Length"); - if (v == NULL) - { - return 0; - } - - ret = ToInt(v->Data); - - return ret; -} - -// Send the data in the HTTP -bool PostHttp(SOCK *s, HTTP_HEADER *header, void *post_data, UINT post_size) -{ - char *header_str; - BUF *b; - bool ret; - // Validate arguments - if (s == NULL || header == NULL || (post_size != 0 && post_data == NULL)) - { - return false; - } - - // Check whether the Content-Length exists? - if (GetHttpValue(header, "Content-Length") == NULL) - { - char tmp[MAX_SIZE]; - // Add because it does not exist - ToStr(tmp, post_size); - AddHttpValue(header, NewHttpValue("Content-Length", tmp)); - } - - // Convert the header to string - header_str = HttpHeaderToStr(header); - if (header_str == NULL) - { - return false; - } - b = NewBuf(); - WriteBuf(b, header_str, StrLen(header_str)); - Free(header_str); - - // Append the data - WriteBuf(b, post_data, post_size); - - // Send - ret = SendAll(s, b->Buf, b->Size, s->SecureMode); - - FreeBuf(b); - - return ret; -} - -// Convert a HTTP header to a string -char *HttpHeaderToStr(HTTP_HEADER *header) -{ - BUF *b; - char *tmp; - UINT i; - char *s; - // Validate arguments - if (header == NULL) - { - return NULL; - } - - tmp = Malloc(HTTP_HEADER_LINE_MAX_SIZE); - b = NewBuf(); - - // Header - Format(tmp, HTTP_HEADER_LINE_MAX_SIZE, - "%s %s %s\r\n", header->Method, header->Target, header->Version); - WriteBuf(b, tmp, StrLen(tmp)); - - // Value - for (i = 0;i < LIST_NUM(header->ValueList);i++) - { - HTTP_VALUE *v = (HTTP_VALUE *)LIST_DATA(header->ValueList, i); - Format(tmp, HTTP_HEADER_LINE_MAX_SIZE, - "%s: %s\r\n", v->Name, v->Data); - WriteBuf(b, tmp, StrLen(tmp)); - } - - // Trailing newline - WriteBuf(b, "\r\n", 2); - s = Malloc(b->Size + 1); - Copy(s, b->Buf, b->Size); - s[b->Size] = 0; - - FreeBuf(b); - Free(tmp); - - return s; -} - -// Send the HTTP header -bool SendHttpHeader(SOCK *s, HTTP_HEADER *header) -{ - char *str; - bool ret; - // Validate arguments - if (s == NULL || header == NULL) - { - return false; - } - - // Convert to string - str = HttpHeaderToStr(header); - - // Transmission - ret = SendAll(s, str, StrLen(str), s->SecureMode); - - Free(str); - - return ret; -} - -// Receive an HTTP header -HTTP_HEADER *RecvHttpHeader(SOCK *s) -{ - TOKEN_LIST *token = NULL; - char *str = NULL; - HTTP_HEADER *header = NULL; - // Validate arguments - if (s == NULL) - { - return NULL; - } - - // Get the first line - str = RecvLine(s, HTTP_HEADER_LINE_MAX_SIZE); - if (str == NULL) - { - goto LABEL_ERROR; - } - - // Split into tokens - token = ParseToken(str, " "); - if (token->NumTokens < 3) - { - goto LABEL_ERROR; - } - - Free(str); - str = NULL; - - // Creating a header object - header = NewHttpHeader(token->Token[0], token->Token[1], token->Token[2]); - - if (StrCmpi(header->Version, "HTTP/0.9") == 0) - { - // The header ends with this line - FreeToken(token); - return header; - } - - // Get the subsequent lines - while (true) - { - UINT pos; - HTTP_VALUE *v; - char *value_name, *value_data; - str = RecvLine(s, HTTP_HEADER_LINE_MAX_SIZE); - if (str == NULL) - { - goto LABEL_ERROR; - } - Trim(str); - - if (StrLen(str) == 0) - { - // End of header - Free(str); - str = NULL; - break; - } - - // Get the position of the colon - pos = SearchStr(str, ":", 0); - if (pos == INFINITE) - { - // The colon does not exist - goto LABEL_ERROR; - } - if ((pos + 1) >= StrLen(str)) - { - // There is no data - goto LABEL_ERROR; - } - - // Divide into the name and the data - value_name = Malloc(pos + 1); - Copy(value_name, str, pos); - value_name[pos] = 0; - value_data = &str[pos + 1]; - - v = NewHttpValue(value_name, value_data); - if (v == NULL) - { - Free(value_name); - goto LABEL_ERROR; - } - - Free(value_name); - - AddHttpValue(header, v); - Free(str); - } - - FreeToken(token); - - return header; - -LABEL_ERROR: - // Memory release - if (token) - { - FreeToken(token); - } - if (str) - { - Free(str); - } - if (header) - { - FreeHttpHeader(header); - } - return NULL; -} - // Receive a line char *RecvLine(SOCK *s, UINT max_size) { @@ -20713,149 +20033,6 @@ char *RecvLine(SOCK *s, UINT max_size) } } -// Creating a new HTTP value -HTTP_VALUE *NewHttpValue(char *name, char *data) -{ - HTTP_VALUE *v; - // Validate arguments - if (name == NULL || data == NULL) - { - return NULL; - } - - v = ZeroMalloc(sizeof(HTTP_VALUE)); - - v->Name = CopyStr(name); - v->Data = CopyStr(data); - - Trim(v->Name); - Trim(v->Data); - - return v; -} - -// Look for the HTTP value from the HTTP header -HTTP_VALUE *GetHttpValue(HTTP_HEADER *header, char *name) -{ - HTTP_VALUE *v, t; - // Validate arguments - if (header == NULL || name == NULL) - { - return NULL; - } - - t.Name = name; - v = Search(header->ValueList, &t); - if (v == NULL) - { - return NULL; - } - - return v; -} - -// Add a HTTP value to the HTTP header -void AddHttpValue(HTTP_HEADER *header, HTTP_VALUE *value) -{ - // Validate arguments - if (header == NULL || value == NULL) - { - return; - } - - if (LIST_NUM(header->ValueList) < HTTP_HEADER_MAX_LINES) - { - Insert(header->ValueList, value); - } - else - { - FreeHttpValue(value); - } -} - -// Create an HTTP header -HTTP_HEADER *NewHttpHeader(char *method, char *target, char *version) -{ - return NewHttpHeaderEx(method, target, version, false); -} -HTTP_HEADER *NewHttpHeaderEx(char *method, char *target, char *version, bool no_sort) -{ - HTTP_HEADER *header; - // Validate arguments - if (method == NULL || target == NULL || version == NULL) - { - return NULL; - } - - header = ZeroMalloc(sizeof(HTTP_HEADER)); - - header->Method = CopyStr(method); - header->Target = CopyStr(target); - header->Version = CopyStr(version); - header->ValueList = NewListFast(no_sort ? NULL : CompareHttpValue); - - return header; -} - -// Comparison function of the HTTP value -int CompareHttpValue(void *p1, void *p2) -{ - HTTP_VALUE *v1, *v2; - if (p1 == NULL || p2 == NULL) - { - return 0; - } - v1 = *(HTTP_VALUE **)p1; - v2 = *(HTTP_VALUE **)p2; - if (v1 == NULL || v2 == NULL) - { - return 0; - } - return StrCmpi(v1->Name, v2->Name); -} - -// Release the HTTP value -void FreeHttpValue(HTTP_VALUE *value) -{ - // Validate arguments - if (value == NULL) - { - return; - } - - Free(value->Data); - Free(value->Name); - - Free(value); -} - -// Release the HTTP header -void FreeHttpHeader(HTTP_HEADER *header) -{ - UINT i; - HTTP_VALUE **values; - // Validate arguments - if (header == NULL) - { - return; - } - - Free(header->Method); - Free(header->Target); - Free(header->Version); - - values = ToArray(header->ValueList); - for (i = 0;i < LIST_NUM(header->ValueList);i++) - { - FreeHttpValue(values[i]); - } - Free(values); - - ReleaseList(header->ValueList); - - Free(header); -} - // Receive a PACK PACK *RecvPack(SOCK *s) { diff --git a/src/Mayaqua/Network.h b/src/Mayaqua/Network.h index f2e47ae8..06dbc6fd 100644 --- a/src/Mayaqua/Network.h +++ b/src/Mayaqua/Network.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Network.h @@ -562,6 +456,16 @@ struct TUBEPAIR_DATA SOCK_EVENT *SockEvent1, *SockEvent2; // SockEvent }; +// TCP raw data +struct TCP_RAW_DATA +{ + IP SrcIP; // Source IP address + IP DstIP; // Destination IP address + UINT SrcPort; // Source port + UINT DstPort; // Destination port + FIFO *Data; // Data body +}; + // UDP listener socket entry struct UDPLISTENER_SOCK { @@ -602,6 +506,7 @@ struct UDPLISTENER UINT64 LastCheckTick; // Time which the socket list was checked last UDPLISTENER_RECV_PROC *RecvProc; // Receive procedure LIST *SendPacketList; // Transmission packet list + UINT PacketType; // The type to set when creating an UDPPACKET void *Param; // Parameters INTERRUPT_MANAGER *Interrupts; // Interrupt manager bool HostIPAddressListChanged; // IP address list of the host has changed @@ -969,51 +874,6 @@ struct NIC_ENTRY UCHAR MacAddress[6]; }; - -// HTTP value -struct HTTP_VALUE -{ - char *Name; // Name - char *Data; // Data -}; - -// HTTP header -struct HTTP_HEADER -{ - char *Method; // Method - char *Target; // Target - char *Version; // Version - LIST *ValueList; // Value list -}; - -// HTTPS server / client related string constant -#define DEFAULT_USER_AGENT "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0" -#define DEFAULT_ACCEPT "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, */*" -#define DEFAULT_ENCODING "gzip, deflate" -#define HTTP_CONTENT_TYPE "text/html; charset=iso-8859-1" -#define HTTP_CONTENT_TYPE2 "application/octet-stream" -#define HTTP_CONTENT_TYPE3 "image/jpeg" -#define HTTP_CONTENT_TYPE4 "text/html" -#define HTTP_CONTENT_TYPE5 "message/rfc822" -#define HTTP_KEEP_ALIVE "timeout=15; max=19" -#define HTTP_VPN_TARGET "/vpnsvc/vpn.cgi" -#define HTTP_VPN_TARGET2 "/vpnsvc/connect.cgi" -#define HTTP_VPN_TARGET_POSTDATA "VPNCONNECT" -#define HTTP_SAITAMA "/saitama.jpg" -#define HTTP_PICTURES "/picture" -// Maximum size of a single line in the HTTP header -#define HTTP_HEADER_LINE_MAX_SIZE 4096 -// Maximum number of lines in the HTTP header -#define HTTP_HEADER_MAX_LINES 128 -// Maximum size of the random number to be included in the PACK -#define HTTP_PACK_RAND_SIZE_MAX 1000 -// Maximum PACK size in the HTTP -#define HTTP_PACK_MAX_SIZE 65536 - - - - - int GetCurrentTimezone(); bool GetSniNameFromSslPacket(UCHAR *packet_buf, UINT packet_size, char *sni, UINT sni_size); @@ -1027,14 +887,6 @@ bool IsUseAlternativeHostname(); int GetCurrentTimezoneWin32(); #endif // OS_WIN32 -HTTP_VALUE *GetHttpValue(HTTP_HEADER *header, char *name); -void AddHttpValue(HTTP_HEADER *header, HTTP_VALUE *value); -HTTP_HEADER *NewHttpHeader(char *method, char *target, char *version); -HTTP_HEADER *NewHttpHeaderEx(char *method, char *target, char *version, bool no_sort); -int CompareHttpValue(void *p1, void *p2); -void FreeHttpValue(HTTP_VALUE *value); -void FreeHttpHeader(HTTP_HEADER *header); - bool SendPack(SOCK *s, PACK *p); PACK *RecvPack(SOCK *s); PACK *RecvPackWithHash(SOCK *s); @@ -1045,21 +897,7 @@ PACK *PackError(UINT error); void CreateDummyValue(PACK *p); -HTTP_VALUE *NewHttpValue(char *name, char *data); char *RecvLine(SOCK *s, UINT max_size); -HTTP_HEADER *RecvHttpHeader(SOCK *s); -bool SendHttpHeader(SOCK *s, HTTP_HEADER *header); -char *HttpHeaderToStr(HTTP_HEADER *header); -bool PostHttp(SOCK *s, HTTP_HEADER *header, void *post_data, UINT post_size); -UINT GetContentLength(HTTP_HEADER *header); -void GetHttpDateStr(char *str, UINT size, UINT64 t); -bool HttpSendForbidden(SOCK *s, char *target, char *server_id); -bool HttpSendNotFound(SOCK *s, char *target); -bool HttpSendNotImplemented(SOCK *s, char *method, char *target, char *version); -bool HttpServerSend(SOCK *s, PACK *p); -bool HttpClientSend(SOCK *s, PACK *p); -PACK *HttpServerRecv(SOCK *s); -PACK *HttpClientRecv(SOCK *s); bool GetIPViaDnsProxyForJapanFlets(IP *ip_ret, char *hostname, bool ipv6, UINT timeout, bool *cancel, char *dns_proxy_hostname); bool GetDnsProxyIPAddressForJapanBFlets(IP *ip_ret, UINT timeout, bool *cancel); @@ -1295,6 +1133,7 @@ void SendAdd(SOCK *sock, void *data, UINT size); bool SendNow(SOCK *sock, int secure); bool RecvAll(SOCK *sock, void *data, UINT size, bool secure); bool RecvAllEx(SOCK *sock, void **data_new_ptr, UINT size, bool secure); +bool RecvAllWithDiscard(SOCK *sock, UINT size, bool secure); void InitSockSet(SOCKSET *set); void AddSockSet(SOCKSET *set, SOCK *sock); CANCEL *NewCancel(); @@ -1410,6 +1249,7 @@ void SocketTimeoutThread(THREAD *t, void *param); SOCKET_TIMEOUT_PARAM *NewSocketTimeout(SOCK *sock); void FreeSocketTimeout(SOCKET_TIMEOUT_PARAM *ttp); +void CopyIP(IP *dst, IP *src); bool IsIP6(IP *ip); bool IsIP4(IP *ip); void IPv6AddrToIP(IP *ip, IPV6_ADDR *addr); @@ -1504,12 +1344,15 @@ int CmpIpAddressList(void *p1, void *p2); UINT64 GetHostIPAddressListHash(); UDPLISTENER *NewUdpListener(UDPLISTENER_RECV_PROC *recv_proc, void *param, IP *listen_ip); +UDPLISTENER *NewUdpListenerEx(UDPLISTENER_RECV_PROC *recv_proc, void *param, IP *listen_ip, UINT packet_type); void UdpListenerThread(THREAD *thread, void *param); void FreeUdpListener(UDPLISTENER *u); void AddPortToUdpListener(UDPLISTENER *u, UINT port); void DeletePortFromUdpListener(UDPLISTENER *u, UINT port); void DeleteAllPortFromUdpListener(UDPLISTENER *u); void UdpListenerSendPackets(UDPLISTENER *u, LIST *packet_list); +TCP_RAW_DATA *NewTcpRawData(IP *src_ip, UINT src_port, IP *dst_ip, UINT dst_port); +void FreeTcpRawData(TCP_RAW_DATA *trd); UDPPACKET *NewUdpPacket(IP *src_ip, UINT src_port, IP *dst_ip, UINT dst_port, void *data, UINT size); void FreeUdpPacket(UDPPACKET *p); UDPLISTENER_SOCK *DetermineUdpSocketForSending(UDPLISTENER *u, UDPPACKET *p); diff --git a/src/Mayaqua/OS.c b/src/Mayaqua/OS.c index bbb0f4e8..272a9eeb 100644 --- a/src/Mayaqua/OS.c +++ b/src/Mayaqua/OS.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // OS.c @@ -328,10 +222,6 @@ UINT OSThreadId() } // Rename -bool OSFileRename(char *old_name, char *new_name) -{ - return os->FileRename(old_name, new_name); -} bool OSFileRenameW(wchar_t *old_name, wchar_t *new_name) { return os->FileRenameW(old_name, new_name); @@ -350,50 +240,30 @@ bool OSFileSeek(void *pData, UINT mode, int offset) } // Delete the file -bool OSFileDelete(char *name) -{ - return os->FileDelete(name); -} bool OSFileDeleteW(wchar_t *name) { return os->FileDeleteW(name); } // Create a directory -bool OSMakeDir(char *name) -{ - return os->MakeDir(name); -} bool OSMakeDirW(wchar_t *name) { return os->MakeDirW(name); } // Delete the directory -bool OSDeleteDir(char *name) -{ - return os->DeleteDir(name); -} bool OSDeleteDirW(wchar_t *name) { return os->DeleteDirW(name); } // Open the file -void *OSFileOpen(char *name, bool write_mode, bool read_lock) -{ - return os->FileOpen(name, write_mode, read_lock); -} void *OSFileOpenW(wchar_t *name, bool write_mode, bool read_lock) { return os->FileOpenW(name, write_mode, read_lock); } // Create a file -void *OSFileCreate(char *name) -{ - return os->FileCreate(name); -} void *OSFileCreateW(wchar_t *name) { return os->FileCreateW(name); @@ -483,18 +353,6 @@ void OSGetSystemTime(SYSTEMTIME *system_time) os->GetSystemTime(system_time); } -// 32bit increment -void OSInc32(UINT *value) -{ - os->Inc32(value); -} - -// 32bit decrement -void OSDec32(UINT *value) -{ - os->Dec32(value); -} - // Sleep the thread void OSSleep(UINT time) { @@ -537,12 +395,6 @@ void OSSetEvent(EVENT *event) os->SetEvent(event); } -// Reset event -void OSResetEvent(EVENT *event) -{ - os->ResetEvent(event); -} - // Wait for event bool OSWaitEvent(EVENT *event, UINT timeout) { diff --git a/src/Mayaqua/OS.h b/src/Mayaqua/OS.h index 71691639..247eed1e 100644 --- a/src/Mayaqua/OS.h +++ b/src/Mayaqua/OS.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // OS.h @@ -124,8 +18,6 @@ void *OSMemoryReAlloc(void *addr, UINT size); void OSMemoryFree(void *addr); UINT OSGetTick(); void OSGetSystemTime(SYSTEMTIME *system_time); -void OSInc32(UINT *value); -void OSDec32(UINT *value); void OSSleep(UINT time); LOCK *OSNewLock(); bool OSLock(LOCK *lock); @@ -133,15 +25,12 @@ void OSUnlock(LOCK *lock); void OSDeleteLock(LOCK *lock); void OSInitEvent(EVENT *event); void OSSetEvent(EVENT *event); -void OSResetEvent(EVENT *event); bool OSWaitEvent(EVENT *event, UINT timeout); void OSFreeEvent(EVENT *event); bool OSWaitThread(THREAD *t); void OSFreeThread(THREAD *t); bool OSInitThread(THREAD *t); -void *OSFileOpen(char *name, bool write_mode, bool read_lock); void *OSFileOpenW(wchar_t *name, bool write_mode, bool read_lock); -void *OSFileCreate(char *name); void *OSFileCreateW(wchar_t *name); bool OSFileWrite(void *pData, void *buf, UINT size); bool OSFileRead(void *pData, void *buf, UINT size); @@ -149,15 +38,11 @@ void OSFileClose(void *pData, bool no_flush); void OSFileFlush(void *pData); UINT64 OSFileSize(void *pData); bool OSFileSeek(void *pData, UINT mode, int offset); -bool OSFileDelete(char *name); bool OSFileDeleteW(wchar_t *name); -bool OSMakeDir(char *name); bool OSMakeDirW(wchar_t *name); -bool OSDeleteDir(char *name); bool OSDeleteDirW(wchar_t *name); CALLSTACK_DATA *OSGetCallStack(); bool OSGetCallStackSymbolInfo(CALLSTACK_DATA *s); -bool OSFileRename(char *old_name, char *new_name); bool OSFileRenameW(wchar_t *old_name, wchar_t *new_name); UINT OSThreadId(); bool OSRun(char *filename, char *arg, bool hide, bool wait); diff --git a/src/Mayaqua/Object.c b/src/Mayaqua/Object.c index 71de8622..904aa344 100644 --- a/src/Mayaqua/Object.c +++ b/src/Mayaqua/Object.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Object.c @@ -315,14 +209,7 @@ UINT Count(COUNTER *c) Lock(c->lock); { - if (c->Ready == false) - { - ret = 0; - } - else - { - ret = c->c; - } + ret = c->c; } Unlock(c->lock); @@ -345,15 +232,8 @@ UINT Inc(COUNTER *c) Lock(c->lock); { - if (c->Ready == false) - { - ret = 0; - } - else - { - c->c++; - ret = c->c; - } + c->c++; + ret = c->c; } Unlock(c->lock); @@ -380,21 +260,14 @@ UINT Dec(COUNTER *c) Lock(c->lock); { - if (c->Ready == false) + if (c->c != 0) { - ret = 0; + c->c--; + ret = c->c; } else { - if (c->c != 0) - { - c->c--; - ret = c->c; - } - else - { - ret = 0; - } + ret = 0; } } Unlock(c->lock); diff --git a/src/Mayaqua/Object.h b/src/Mayaqua/Object.h index 903a6631..1215c954 100644 --- a/src/Mayaqua/Object.h +++ b/src/Mayaqua/Object.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Object.h diff --git a/src/Mayaqua/Pack.c b/src/Mayaqua/Pack.c index 7cc67058..7d5b137b 100644 --- a/src/Mayaqua/Pack.c +++ b/src/Mayaqua/Pack.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Pack.c @@ -750,13 +644,13 @@ ELEMENT *NewElement(char *name, UINT type, UINT num_value, VALUE **values) } // Memory allocation - e = Malloc(sizeof(ELEMENT)); + e = ZeroMalloc(sizeof(ELEMENT)); StrCpy(e->name, sizeof(e->name), name); e->num_value = num_value; e->type = type; // Copy of the pointer list to the element - e->values = (VALUE **)Malloc(sizeof(VALUE *) * num_value); + e->values = (VALUE **)ZeroMalloc(sizeof(VALUE *) * num_value); for (i = 0;i < e->num_value;i++) { e->values[i] = values[i]; @@ -871,6 +765,9 @@ bool AddElement(PACK *p, ELEMENT *e) return false; } + // Set JsonHint_GroupName + StrCpy(e->JsonHint_GroupName, sizeof(e->JsonHint_GroupName), p->CurrentJsonHint_GroupName); + // Adding Add(p->elements, e); return true; @@ -894,6 +791,11 @@ void FreePack(PACK *p) } Free(elements); + if (p->json_subitem_names != NULL) + { + FreeStrList(p->json_subitem_names); + } + ReleaseList(p->elements); Free(p); } @@ -904,7 +806,7 @@ PACK *NewPack() PACK *p; // Memory allocation - p = MallocEx(sizeof(PACK), true); + p = ZeroMallocEx(sizeof(PACK), true); // Creating a List p->elements = NewListFast(ComparePackName); @@ -930,6 +832,12 @@ K *PackGetK(PACK *p, char *name) } k = BufToK(b, true, false, NULL); + + if (k == NULL) + { + k = BufToK(b, true, true, NULL); + } + FreeBuf(b); return k; @@ -953,49 +861,61 @@ X *PackGetX(PACK *p, char *name) } x = BufToX(b, false); + + if (x == NULL) + { + x = BufToX(b, true); + } + FreeBuf(b); return x; } // Add the K to the PACK -void PackAddK(PACK *p, char *name, K *k) +ELEMENT *PackAddK(PACK *p, char *name, K *k) { BUF *b; + ELEMENT *e = NULL; // Validate arguments if (p == NULL || name == NULL || k == NULL) { - return; + return NULL; } b = KToBuf(k, false, NULL); if (b == NULL) { - return; + return NULL; } - PackAddBuf(p, name, b); + e = PackAddBuf(p, name, b); FreeBuf(b); + + return e; } // Add an X into the PACK -void PackAddX(PACK *p, char *name, X *x) +ELEMENT *PackAddX(PACK *p, char *name, X *x) { BUF *b; + ELEMENT *e = NULL; // Validate arguments if (p == NULL || name == NULL || x == NULL) { - return; + return NULL; } b = XToBuf(x, false); if (b == NULL) { - return; + return NULL; } - PackAddBuf(p, name, b); + e = PackAddBuf(p, name, b); FreeBuf(b); + + return e; } // Get a buffer from the PACK @@ -1158,30 +1078,65 @@ bool PackGetBoolEx(PACK *p, char *name, UINT index) return PackGetIntEx(p, name, index) == 0 ? false : true; } -// Add a bool type into the PACK -void PackAddBool(PACK *p, char *name, bool b) +// Set CurrentJsonHint_GroupName to PACK +void PackSetCurrentJsonGroupName(PACK *p, char *json_group_name) { - PackAddInt(p, name, b ? 1 : 0); -} -void PackAddBoolEx(PACK *p, char *name, bool b, UINT index, UINT total) -{ - PackAddIntEx(p, name, b ? 1 : 0, index, total); -} - -// Add the IPV6_ADDR to the PACK -void PackAddIp6AddrEx(PACK *p, char *name, IPV6_ADDR *addr, UINT index, UINT total) -{ - // Validate arguments - if (p == NULL || name == NULL || addr == NULL) + if (p == NULL) { return; } - PackAddDataEx(p, name, addr, sizeof(IPV6_ADDR), index, total); + if (json_group_name == NULL) + { + ClearStr(p->CurrentJsonHint_GroupName, sizeof(p->CurrentJsonHint_GroupName)); + } + else + { + StrCpy(p->CurrentJsonHint_GroupName, sizeof(p->CurrentJsonHint_GroupName), json_group_name); + + if (p->json_subitem_names == NULL) + { + p->json_subitem_names = NewStrList(); + } + + AddStrToStrListDistinct(p->json_subitem_names, json_group_name); + } } -void PackAddIp6Addr(PACK *p, char *name, IPV6_ADDR *addr) + +// Add a bool type into the PACK +ELEMENT *PackAddBool(PACK *p, char *name, bool b) { - PackAddIp6AddrEx(p, name, addr, 0, 1); + ELEMENT *e = PackAddInt(p, name, b ? 1 : 0); + if (e != NULL) + { + e->JsonHint_IsBool = true; + } + return e; +} +ELEMENT *PackAddBoolEx(PACK *p, char *name, bool b, UINT index, UINT total) +{ + ELEMENT *e = PackAddIntEx(p, name, b ? 1 : 0, index, total); + if (e != NULL) + { + e->JsonHint_IsBool = true; + } + return e; +} + +// Add the IPV6_ADDR to the PACK +ELEMENT *PackAddIp6AddrEx(PACK *p, char *name, IPV6_ADDR *addr, UINT index, UINT total) +{ + // Validate arguments + if (p == NULL || name == NULL || addr == NULL) + { + return NULL; + } + + return PackAddDataEx(p, name, addr, sizeof(IPV6_ADDR), index, total); +} +ELEMENT *PackAddIp6Addr(PACK *p, char *name, IPV6_ADDR *addr) +{ + return PackAddIp6AddrEx(p, name, addr, 0, 1); } // Get an IPV6_ADDR from the PACK @@ -1203,6 +1158,10 @@ bool PackGetIp6Addr(PACK *p, char *name, IPV6_ADDR *addr) // Add the IP to the PACK void PackAddIp32Ex(PACK *p, char *name, UINT ip32, UINT index, UINT total) +{ + PackAddIp32Ex2(p, name, ip32, index, total, false); +} +void PackAddIp32Ex2(PACK *p, char *name, UINT ip32, UINT index, UINT total, bool is_single) { IP ip; // Validate arguments @@ -1213,32 +1172,45 @@ void PackAddIp32Ex(PACK *p, char *name, UINT ip32, UINT index, UINT total) UINTToIP(&ip, ip32); - PackAddIpEx(p, name, &ip, index, total); + PackAddIpEx2(p, name, &ip, index, total, is_single); } void PackAddIp32(PACK *p, char *name, UINT ip32) { - PackAddIp32Ex(p, name, ip32, 0, 1); + PackAddIp32Ex2(p, name, ip32, 0, 1, true); } void PackAddIpEx(PACK *p, char *name, IP *ip, UINT index, UINT total) +{ + PackAddIpEx2(p, name, ip, index, total, false); +} +void PackAddIpEx2(PACK *p, char *name, IP *ip, UINT index, UINT total, bool is_single) { UINT i; bool b = false; char tmp[MAX_PATH]; + ELEMENT *e; // Validate arguments if (p == NULL || name == NULL || ip == NULL) { return; } + if (total >= 2) + { + is_single = false; + } b = IsIP6(ip); Format(tmp, sizeof(tmp), "%s@ipv6_bool", name); - PackAddBoolEx(p, tmp, b, index, total); + e = PackAddBoolEx(p, tmp, b, index, total); + if (e != NULL && is_single) e->JsonHint_IsArray = false; + if (e != NULL) e->JsonHint_IsIP = true; Format(tmp, sizeof(tmp), "%s@ipv6_array", name); if (b) { - PackAddDataEx(p, tmp, ip->ipv6_addr, sizeof(ip->ipv6_addr), index, total); + e = PackAddDataEx(p, tmp, ip->ipv6_addr, sizeof(ip->ipv6_addr), index, total); + if (e != NULL && is_single) e->JsonHint_IsArray = false; + if (e != NULL) e->JsonHint_IsIP = true; } else { @@ -1246,17 +1218,23 @@ void PackAddIpEx(PACK *p, char *name, IP *ip, UINT index, UINT total) Zero(dummy, sizeof(dummy)); - PackAddDataEx(p, tmp, dummy, sizeof(dummy), index, total); + e = PackAddDataEx(p, tmp, dummy, sizeof(dummy), index, total); + if (e != NULL && is_single) e->JsonHint_IsArray = false; + if (e != NULL) e->JsonHint_IsIP = true; } Format(tmp, sizeof(tmp), "%s@ipv6_scope_id", name); if (b) { - PackAddIntEx(p, tmp, ip->ipv6_scope_id, index, total); + e = PackAddIntEx(p, tmp, ip->ipv6_scope_id, index, total); + if (e != NULL && is_single) e->JsonHint_IsArray = false; + if (e != NULL) e->JsonHint_IsIP = true; } else { - PackAddIntEx(p, tmp, 0, index, total); + e = PackAddIntEx(p, tmp, 0, index, total); + if (e != NULL && is_single) e->JsonHint_IsArray = false; + if (e != NULL) e->JsonHint_IsIP = true; } i = IPToUINT(ip); @@ -1266,11 +1244,13 @@ void PackAddIpEx(PACK *p, char *name, IP *ip, UINT index, UINT total) i = Swap32(i); } - PackAddIntEx(p, name, i, index, total); + e = PackAddIntEx(p, name, i, index, total); + if (e != NULL && is_single) e->JsonHint_IsArray = false; + if (e != NULL) e->JsonHint_IsIP = true; } void PackAddIp(PACK *p, char *name, IP *ip) { - PackAddIpEx(p, name, ip, 0, 1); + PackAddIpEx2(p, name, ip, 0, 1, true); } // Get an IP from the PACK @@ -1450,34 +1430,35 @@ bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index) } // Add the buffer to the PACK (array) -void PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total) +ELEMENT *PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total) { // Validate arguments if (p == NULL || name == NULL || b == NULL || total == 0) { - return; + return NULL; } - PackAddDataEx(p, name, b->Buf, b->Size, index, total); + return PackAddDataEx(p, name, b->Buf, b->Size, index, total); } // Add the data to the PACK (array) -void PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT total) +ELEMENT *PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT total) { VALUE *v; ELEMENT *e; // Validate arguments if (p == NULL || data == NULL || name == NULL || total == 0) { - return; + return NULL; } v = NewDataValue(data, size); e = GetElement(p, name, VALUE_DATA); if (e != NULL) { - if (e->num_value <= total) + if (e->num_value >= total) { + FreeValue(e->values[index], VALUE_DATA); e->values[index] = v; } else @@ -1493,53 +1474,68 @@ void PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT e->type = VALUE_DATA; e->values = ZeroMallocEx(sizeof(VALUE *) * total, true); e->values[index] = v; - AddElement(p, e); + if (AddElement(p, e) == false) + { + return NULL; + } } + + e->JsonHint_IsArray = true; + + return e; } // Add the buffer to the PACK -void PackAddBuf(PACK *p, char *name, BUF *b) +ELEMENT *PackAddBuf(PACK *p, char *name, BUF *b) { // Validate arguments if (p == NULL || name == NULL || b == NULL) { - return; + return NULL; } - PackAddData(p, name, b->Buf, b->Size); + return PackAddData(p, name, b->Buf, b->Size); } // Add the data to the PACK -void PackAddData(PACK *p, char *name, void *data, UINT size) +ELEMENT *PackAddData(PACK *p, char *name, void *data, UINT size) { VALUE *v; + ELEMENT *e; // Validate arguments if (p == NULL || data == NULL || name == NULL) { - return; + return NULL; } v = NewDataValue(data, size); - AddElement(p, NewElement(name, VALUE_DATA, 1, &v)); + e = NewElement(name, VALUE_DATA, 1, &v); + if (AddElement(p, e) == false) + { + return NULL; + } + + return e; } // Add a 64 bit integer (array) to the PACK -void PackAddInt64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total) +ELEMENT *PackAddInt64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total) { VALUE *v; ELEMENT *e; // Validate arguments if (p == NULL || name == NULL || total == 0) { - return; + return NULL; } v = NewInt64Value(i); e = GetElement(p, name, VALUE_INT64); if (e != NULL) { - if (e->num_value <= total) + if (e->num_value >= total) { + FreeValue(e->values[index], VALUE_INT64); e->values[index] = v; } else @@ -1555,27 +1551,36 @@ void PackAddInt64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total) e->type = VALUE_INT64; e->values = ZeroMallocEx(sizeof(VALUE *) * total, true); e->values[index] = v; - AddElement(p, e); + + if (AddElement(p, e) == false) + { + return NULL; + } } + + e->JsonHint_IsArray = true; + + return e; } // Add an integer to the PACK (array) -void PackAddIntEx(PACK *p, char *name, UINT i, UINT index, UINT total) +ELEMENT *PackAddIntEx(PACK *p, char *name, UINT i, UINT index, UINT total) { VALUE *v; ELEMENT *e; // Validate arguments if (p == NULL || name == NULL || total == 0) { - return; + return NULL; } v = NewIntValue(i); e = GetElement(p, name, VALUE_INT); if (e != NULL) { - if (e->num_value <= total) + if (e->num_value >= total) { + FreeValue(e->values[index], VALUE_INT); e->values[index] = v; } else @@ -1591,61 +1596,103 @@ void PackAddIntEx(PACK *p, char *name, UINT i, UINT index, UINT total) e->type = VALUE_INT; e->values = ZeroMallocEx(sizeof(VALUE *) * total, true); e->values[index] = v; - AddElement(p, e); + + if (AddElement(p, e) == false) + { + return NULL; + } } + + e->JsonHint_IsArray = true; + + return e; } +// Add 64 bit integer time value to the PACK +ELEMENT *PackAddTime64(PACK *p, char *name, UINT64 i) +{ + ELEMENT *e = PackAddInt64(p, name, i); + if (e != NULL) + { + e->JsonHint_IsDateTime = true; + } + return e; +} +ELEMENT *PackAddTime64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total) +{ + ELEMENT *e = PackAddInt64Ex(p, name, i, index, total); + if (e != NULL) + { + e->JsonHint_IsDateTime = true; + } + return e; +} + + // Add a 64 bit integer to the PACK -void PackAddInt64(PACK *p, char *name, UINT64 i) +ELEMENT *PackAddInt64(PACK *p, char *name, UINT64 i) { VALUE *v; + ELEMENT *e; // Validate arguments if (p == NULL || name == NULL) { - return; + return NULL; } v = NewInt64Value(i); - AddElement(p, NewElement(name, VALUE_INT64, 1, &v)); + e = NewElement(name, VALUE_INT64, 1, &v); + if (AddElement(p, e) == false) + { + return NULL; + } + return e; } // Add the number of items to the PACK -void PackAddNum(PACK *p, char *name, UINT num) +ELEMENT *PackAddNum(PACK *p, char *name, UINT num) { - PackAddInt(p, name, num); + return PackAddInt(p, name, num); } // Add an integer to the PACK -void PackAddInt(PACK *p, char *name, UINT i) +ELEMENT *PackAddInt(PACK *p, char *name, UINT i) { VALUE *v; + ELEMENT *e = NULL; // Validate arguments if (p == NULL || name == NULL) { - return; + return NULL; } v = NewIntValue(i); - AddElement(p, NewElement(name, VALUE_INT, 1, &v)); + e = NewElement(name, VALUE_INT, 1, &v); + if (AddElement(p, e) == false) + { + return NULL; + } + return e; } // Add a Unicode string (array) to the PACK -void PackAddUniStrEx(PACK *p, char *name, wchar_t *unistr, UINT index, UINT total) +ELEMENT *PackAddUniStrEx(PACK *p, char *name, wchar_t *unistr, UINT index, UINT total) { VALUE *v; ELEMENT *e; // Validate arguments if (p == NULL || name == NULL || unistr == NULL || total == 0) { - return; + return NULL; } v = NewUniStrValue(unistr); e = GetElement(p, name, VALUE_UNISTR); if (e != NULL) { - if (e->num_value <= total) + if (e->num_value >= total) { + FreeValue(e->values[index], VALUE_UNISTR); e->values[index] = v; } else @@ -1661,41 +1708,55 @@ void PackAddUniStrEx(PACK *p, char *name, wchar_t *unistr, UINT index, UINT tota e->type = VALUE_UNISTR; e->values = ZeroMallocEx(sizeof(VALUE *) * total, true); e->values[index] = v; - AddElement(p, e); + if (AddElement(p, e) == false) + { + return NULL; + } } + + e->JsonHint_IsArray = true; + + return e; } // Add a Unicode string to the PACK -void PackAddUniStr(PACK *p, char *name, wchar_t *unistr) +ELEMENT *PackAddUniStr(PACK *p, char *name, wchar_t *unistr) { VALUE *v; + ELEMENT *e = NULL; // Validate arguments if (p == NULL || name == NULL || unistr == NULL) { - return; + return NULL; } v = NewUniStrValue(unistr); - AddElement(p, NewElement(name, VALUE_UNISTR, 1, &v)); + e = NewElement(name, VALUE_UNISTR, 1, &v); + if (AddElement(p, e) == false) + { + return NULL; + } + return e; } // Add a string to the PACK (array) -void PackAddStrEx(PACK *p, char *name, char *str, UINT index, UINT total) +ELEMENT *PackAddStrEx(PACK *p, char *name, char *str, UINT index, UINT total) { VALUE *v; ELEMENT *e; // Validate arguments if (p == NULL || name == NULL || str == NULL || total == 0) { - return; + return NULL; } v = NewStrValue(str); e = GetElement(p, name, VALUE_STR); if (e != NULL) { - if (e->num_value <= total) + if (e->num_value >= total) { + FreeValue(e->values[index], VALUE_STR); e->values[index] = v; } else @@ -1711,22 +1772,701 @@ void PackAddStrEx(PACK *p, char *name, char *str, UINT index, UINT total) e->type = VALUE_STR; e->values = ZeroMallocEx(sizeof(VALUE *) * total, true); e->values[index] = v; - AddElement(p, e); + if (AddElement(p, e) == false) + { + return NULL; + } } + + e->JsonHint_IsArray = true; + + return e; } // Add a string to the PACK -void PackAddStr(PACK *p, char *name, char *str) +ELEMENT *PackAddStr(PACK *p, char *name, char *str) { VALUE *v; + ELEMENT *e = NULL; // Validate arguments if (p == NULL || name == NULL || str == NULL) + { + return NULL; + } + + v = NewStrValue(str); + e = NewElement(name, VALUE_STR, 1, &v); + if (AddElement(p, e) == false) + { + return NULL; + } + return e; +} + +// Add an element of PACK array to JSON Array +void PackArrayElementToJsonArray(JSON_ARRAY *ja, PACK *p, ELEMENT *e, UINT index) +{ + if (ja == NULL || p == NULL || e == NULL || index >= e->num_value) { return; } - v = NewStrValue(str); - AddElement(p, NewElement(name, VALUE_STR, 1, &v)); + switch (e->type) + { + case VALUE_INT: + if (e->JsonHint_IsIP) + { + if (InStr(e->name, "@") == false) + { + IP ip; + if (PackGetIpEx(p, e->name, &ip, index)) + { + char ip_str[64]; + IPToStr(ip_str, sizeof(ip_str), &ip); + JsonArrayAddStr(ja, ip_str); + } + } + } + else if (e->JsonHint_IsBool) + { + JsonArrayAddBool(ja, PackGetBoolEx(p, e->name, index)); + } + else + { + JsonArrayAddNumber(ja, PackGetIntEx(p, e->name, index)); + } + break; + case VALUE_INT64: + if (e->JsonHint_IsIP == false) + { + if (e->JsonHint_IsDateTime == false) + { + JsonArrayAddNumber(ja, PackGetInt64Ex(p, e->name, index)); + } + else + { + char dtstr[64]; + + SystemTime64ToJsonStr(dtstr, sizeof(dtstr), PackGetInt64Ex(p, e->name, index)); + JsonArrayAddStr(ja, dtstr); + } + } + break; + case VALUE_DATA: + if (e->JsonHint_IsIP == false) + { + BUF *buf = PackGetBufEx(p, e->name, index); + if (buf != NULL) + { + JsonArrayAddData(ja, buf->Buf, buf->Size); + FreeBuf(buf); + } + else + { + UCHAR zero = 0; + JsonArrayAddData(ja, &zero, 0); + } + } + break; + case VALUE_STR: + if (e->JsonHint_IsIP == false) + { + if (e->values[index] != NULL) + { + JsonArrayAddStr(ja, e->values[index]->Str); + } + else + { + JsonArrayAddStr(ja, ""); + } + } + break; + case VALUE_UNISTR: + if (e->JsonHint_IsIP == false) + { + if (e->values[index] != NULL) + { + JsonArrayAddUniStr(ja, e->values[index]->UniStr); + } + else + { + JsonArrayAddUniStr(ja, L""); + } + } + break; + } +} + +// Add an element of PACK to JSON Object +void PackElementToJsonObject(JSON_OBJECT *o, PACK *p, ELEMENT *e, UINT index) +{ + char *suffix; + char name[MAX_PATH]; + if (o == NULL || p == NULL || e == NULL) + { + return; + } + + suffix = DetermineJsonSuffixForPackElement(e); + + if (suffix == NULL) + { + return; + } + + StrCpy(name, sizeof(name), e->name); + StrCat(name, sizeof(name), suffix); + + switch (e->type) + { + case VALUE_INT: + if (e->JsonHint_IsIP) + { + if (InStr(e->name, "@") == false) + { + IP ip; + if (PackGetIpEx(p, e->name, &ip, index)) + { + char ip_str[64]; + IPToStr(ip_str, sizeof(ip_str), &ip); + JsonSetStr(o, name, ip_str); + } + } + } + else if (e->JsonHint_IsBool) + { + JsonSetBool(o, name, PackGetBoolEx(p, e->name, index)); + } + else + { + JsonSetNumber(o, name, PackGetIntEx(p, e->name, index)); + } + break; + case VALUE_INT64: + if (e->JsonHint_IsIP == false) + { + if (e->JsonHint_IsDateTime == false) + { + JsonSetNumber(o, name, PackGetInt64Ex(p, e->name, index)); + } + else + { + char dtstr[64]; + + SystemTime64ToJsonStr(dtstr, sizeof(dtstr), PackGetInt64Ex(p, e->name, index)); + JsonSetStr(o, name, dtstr); + } + } + break; + case VALUE_DATA: + if (e->JsonHint_IsIP == false) + { + BUF *buf = PackGetBufEx(p, e->name, index); + if (buf != NULL) + { + JsonSetData(o, name, buf->Buf, buf->Size); + FreeBuf(buf); + } + else + { + UCHAR zero = 0; + JsonSetData(o, name, &zero, 0); + } + } + break; + case VALUE_STR: + if (e->JsonHint_IsIP == false) + { + if (e->values[index] != NULL) + { + JsonSetStr(o, name, e->values[index]->Str); + } + else + { + JsonSetStr(o, name, ""); + } + } + break; + case VALUE_UNISTR: + if (e->JsonHint_IsIP == false) + { + if (e->values[index] != NULL) + { + JsonSetUniStr(o, name, e->values[index]->UniStr); + } + else + { + JsonSetUniStr(o, name, L""); + } + } + break; + } +} + +// Determine JSON element suffix for PACK element +char *DetermineJsonSuffixForPackElement(ELEMENT *e) +{ + switch (e->type) + { + case VALUE_INT: + if (e->JsonHint_IsIP) + { + if (InStr(e->name, "@") == false) + { + return "_ip"; + } + } + else if (e->JsonHint_IsBool) + { + return "_bool"; + } + else + { + return "_u32"; + } + break; + case VALUE_INT64: + if (e->JsonHint_IsIP == false) + { + if (e->JsonHint_IsDateTime == false) + { + return "_u64"; + } + else + { + return "_dt"; + } + } + break; + case VALUE_DATA: + if (e->JsonHint_IsIP == false) + { + return "_bin"; + } + break; + case VALUE_STR: + if (e->JsonHint_IsIP == false) + { + return "_str"; + } + break; + case VALUE_UNISTR: + if (e->JsonHint_IsIP == false) + { + return "_utf"; + } + break; + } + + return NULL; +} + +// Convert JSON to PACK +PACK *JsonToPack(JSON_VALUE *v) +{ + PACK *p = NULL; + JSON_OBJECT *jo; + if (v == NULL) + { + return NULL; + } + + p = NewPack(); + + jo = JsonValueGetObject(v); + + if (jo != NULL) + { + UINT i; + for (i = 0;i < jo->count;i++) + { + char *name = jo->names[i]; + JSON_VALUE *value = jo->values[i]; + + if (value->type == JSON_TYPE_ARRAY) + { + UINT j; + JSON_ARRAY *ja = value->value.array; + + for (j = 0;j < ja->count;j++) + { + if (ja->items[j]->type != JSON_TYPE_OBJECT) + { + JsonTryParseValueAddToPack(p, ja->items[j], name, j, ja->count, false); + } + else + { + JSON_VALUE *v = ja->items[j]; + JSON_OBJECT *o = v->value.object; + UINT k; + + for (k = 0;k < o->count;k++) + { + char *name2 = o->names[k]; + JSON_VALUE *value2 = o->values[k]; + + PackSetCurrentJsonGroupName(p, name); + JsonTryParseValueAddToPack(p, value2, name2, j, ja->count, false); + PackSetCurrentJsonGroupName(p, NULL); + } + } + } + } + else + { + JsonTryParseValueAddToPack(p, value, name, 0, 1, true); + } + } + } + + return p; +} + +ELEMENT *ElementNullSafe(ELEMENT *p) +{ + static ELEMENT dummy; + if (p == NULL) + { + Zero(&dummy, sizeof(dummy)); + return &dummy; + } + return p; +} + +bool JsonTryParseValueAddToPack(PACK *p, JSON_VALUE *v, char *v_name, UINT index, UINT total, bool is_single) +{ + char name[MAX_PATH]; + bool ok = true; + if (p == NULL || v == NULL) + { + return false; + } + + if (TrimEndWith(name, sizeof(name), v_name, "_bool")) + { + if (v->type == JSON_TYPE_BOOL) + { + ElementNullSafe(PackAddBoolEx(p, name, MAKEBOOL(v->value.boolean), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_NUMBER) + { + ElementNullSafe(PackAddBoolEx(p, name, MAKEBOOL(v->value.number), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_STRING) + { + ElementNullSafe(PackAddBoolEx(p, name, ToBool(v->value.string), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_u32")) + { + if (v->type == JSON_TYPE_BOOL) + { + ElementNullSafe(PackAddIntEx(p, name, MAKEBOOL(v->value.boolean), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_NUMBER) + { + ElementNullSafe(PackAddIntEx(p, name, (UINT)v->value.number, index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_STRING) + { + ElementNullSafe(PackAddIntEx(p, name, ToInt(v->value.string), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_u64")) + { + if (v->type == JSON_TYPE_BOOL) + { + ElementNullSafe(PackAddInt64Ex(p, name, MAKEBOOL(v->value.boolean), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_NUMBER) + { + ElementNullSafe(PackAddInt64Ex(p, name, v->value.number, index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_STRING) + { + ElementNullSafe(PackAddInt64Ex(p, name, ToInt64(v->value.string), index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_str")) + { + if (v->type == JSON_TYPE_BOOL) + { + ElementNullSafe(PackAddStrEx(p, name, MAKEBOOL(v->value.boolean) ? "true" : "false", index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_NUMBER) + { + char tmp[64]; + ToStr64(tmp, v->value.number); + ElementNullSafe(PackAddStrEx(p, name, tmp, index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_STRING) + { + ElementNullSafe(PackAddStrEx(p, name, v->value.string, index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_utf")) + { + if (v->type == JSON_TYPE_BOOL) + { + ElementNullSafe(PackAddUniStrEx(p, name, MAKEBOOL(v->value.boolean) ? L"true" : L"false", index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_NUMBER) + { + char tmp[64]; + wchar_t tmp2[64]; + ToStr64(tmp, v->value.number); + StrToUni(tmp2, sizeof(tmp2), tmp); + ElementNullSafe(PackAddUniStrEx(p, name, tmp2, index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_STRING) + { + wchar_t *uni = CopyUtfToUni(v->value.string); + ElementNullSafe(PackAddUniStrEx(p, name, uni, index, total))->JsonHint_IsArray = !is_single; + Free(uni); + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_bin")) + { + if (v->type == JSON_TYPE_STRING) + { + UINT len = StrLen(v->value.string); + UCHAR *data = ZeroMalloc(len * 4 + 64); + UINT size = B64_Decode(data, v->value.string, len); + ElementNullSafe(PackAddDataEx(p, name, data, size, index, total))->JsonHint_IsArray = !is_single; + Free(data); + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_dt")) + { + if (v->type == JSON_TYPE_NUMBER) + { + ElementNullSafe(PackAddInt64Ex(p, name, v->value.number, index, total))->JsonHint_IsArray = !is_single; + ok = true; + } + else if (v->type == JSON_TYPE_STRING) + { + UINT64 time = DateTimeStrRFC3339ToSystemTime64(v->value.string); + ELEMENT *e = PackAddInt64Ex(p, name, time, index, total); + if (e != NULL) + { + e->JsonHint_IsArray = !is_single; + e->JsonHint_IsDateTime = true; + } + ok = true; + } + } + else if (TrimEndWith(name, sizeof(name), v_name, "_ip")) + { + if (v->type == JSON_TYPE_STRING) + { + IP ip; + if (StrToIP(&ip, v->value.string)) + { + PackAddIpEx2(p, name, &ip, index, total, is_single); + ok = true; + } + } + } + + return ok; +} + +// Convert JSON string to PACK +PACK *JsonStrToPack(char *str) +{ + JSON_VALUE *v = StrToJson(str); + PACK *ret; + + if (v == NULL) + { + return NULL; + } + + ret = JsonToPack(v); + + JsonFree(v); + + return ret; +} + +// Convert PACK to JSON string +char *PackToJsonStr(PACK *p) +{ + char *ret; + JSON_VALUE *json = PackToJson(p); + + ret = JsonToStr(json); + + JsonFree(json); + + return ret; +} + +// Convert PACK to JSON +JSON_VALUE *PackToJson(PACK *p) +{ + JSON_VALUE *v; + JSON_OBJECT *o; + UINT i, j, k; + LIST *json_group_id_list; + if (p == NULL) + { + return JsonNewObject(); + } + + json_group_id_list = NewStrList(); + + for (i = 0;i < LIST_NUM(p->elements);i++) + { + ELEMENT *e = LIST_DATA(p->elements, i); + + if (e->num_value >= 2 || e->JsonHint_IsArray) + { + if (IsEmptyStr(e->JsonHint_GroupName) == false) + { + AddStrToStrListDistinct(json_group_id_list, e->JsonHint_GroupName); + } + } + } + + for (i = 0;i < LIST_NUM(p->json_subitem_names);i++) + { + char *group_name = LIST_DATA(p->json_subitem_names, i); + + if (IsEmptyStr(group_name) == false) + { + AddStrToStrListDistinct(json_group_id_list, group_name); + } + } + + v = JsonNewObject(); + o = JsonValueGetObject(v); + + for (k = 0;k < LIST_NUM(json_group_id_list);k++) + { + char *group_name = LIST_DATA(json_group_id_list, k); + UINT array_count = INFINITE; + bool ok = true; + + for (i = 0;i < LIST_NUM(p->elements);i++) + { + ELEMENT *e = LIST_DATA(p->elements, i); + + if (e->num_value >= 2 || e->JsonHint_IsArray) + { + if (StrCmpi(e->JsonHint_GroupName, group_name) == 0) + { + if (array_count == INFINITE) + { + array_count = e->num_value; + } + else + { + if (array_count != e->num_value) + { + ok = false; + } + } + } + } + } + + if (array_count == INFINITE) + { + array_count = 0; + } + + if (ok) + { + JSON_VALUE **json_objects = ZeroMalloc(sizeof(void *) * array_count); + JSON_VALUE *jav = JsonNewArray(); + JSON_ARRAY *ja = JsonArray(jav); + + JsonSet(o, group_name, jav); + + for (j = 0;j < array_count;j++) + { + json_objects[j] = JsonNewObject(); + + JsonArrayAdd(ja, json_objects[j]); + } + + for (i = 0;i < LIST_NUM(p->elements);i++) + { + ELEMENT *e = LIST_DATA(p->elements, i); + + if (e->num_value >= 2 || e->JsonHint_IsArray) + { + if (StrCmpi(e->JsonHint_GroupName, group_name) == 0) + { + for (j = 0;j < e->num_value;j++) + { + PackElementToJsonObject(JsonValueGetObject(json_objects[j]), + p, e, j); + } + } + } + } + + Free(json_objects); + } + } + + for (i = 0;i < LIST_NUM(p->elements);i++) + { + ELEMENT *e = LIST_DATA(p->elements, i); + + if (e->num_value >= 2 || e->JsonHint_IsArray) + { + if (IsEmptyStr(e->JsonHint_GroupName)) + { + char *suffix = DetermineJsonSuffixForPackElement(e); + + if (suffix != NULL) + { + JSON_VALUE *jav = JsonNewArray(); + JSON_ARRAY *ja = JsonArray(jav); + char name[MAX_PATH]; + + for (j = 0;j < e->num_value;j++) + { + PackArrayElementToJsonArray(ja, p, e, j); + } + + StrCpy(name, sizeof(name), e->name); + StrCat(name, sizeof(name), suffix); + + JsonSet(o, name, jav); + } + } + } + else if (e->num_value == 1) + { + PackElementToJsonObject(o, p, e, 0); + } + } + + ReleaseStrList(json_group_id_list); + + return v; } + + diff --git a/src/Mayaqua/Pack.h b/src/Mayaqua/Pack.h index a0009638..f0d553b8 100644 --- a/src/Mayaqua/Pack.h +++ b/src/Mayaqua/Pack.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Pack.h @@ -161,12 +55,38 @@ struct ELEMENT UINT num_value; // Number of values (>=1) UINT type; // Type VALUE **values; // List of pointers to the value + bool JsonHint_IsArray; + bool JsonHint_IsBool; + bool JsonHint_IsDateTime; + bool JsonHint_IsIP; + char JsonHint_GroupName[MAX_ELEMENT_NAME_LEN + 1]; }; // PACK object struct PACK { LIST *elements; // Element list + LIST *json_subitem_names; // JSON sub-item names + char CurrentJsonHint_GroupName[MAX_ELEMENT_NAME_LEN + 1]; +}; + + +#define MAX_JSONPACK_HINT_ITEMS 64 +#define JSONPACK_HINT_TYPE_ARRAY 1 + +// JSON/PACK converter hint element +struct JSONPACKHINT_ITEM +{ + UINT Type; + char ArrayNumNameInPack[MAX_ELEMENT_NAME_LEN + 1]; + char ArrayMembersInPack[MAX_SIZE + 1]; +}; + +// JSON/PACK converter hint +struct JSONPACKHINT +{ + UINT NumHints; + JSONPACKHINT_ITEM Hints[MAX_JSONPACK_HINT_ITEMS]; }; @@ -206,21 +126,23 @@ TOKEN_LIST *GetPackElementNames(PACK *p); X *PackGetX(PACK *p, char *name); K *PackGetK(PACK *p, char *name); -void PackAddX(PACK *p, char *name, X *x); -void PackAddK(PACK *p, char *name, K *k); -void PackAddStr(PACK *p, char *name, char *str); -void PackAddStrEx(PACK *p, char *name, char *str, UINT index, UINT total); -void PackAddUniStr(PACK *p, char *name, wchar_t *unistr); -void PackAddUniStrEx(PACK *p, char *name, wchar_t *unistr, UINT index, UINT total); -void PackAddInt(PACK *p, char *name, UINT i); -void PackAddNum(PACK *p, char *name, UINT num); -void PackAddIntEx(PACK *p, char *name, UINT i, UINT index, UINT total); -void PackAddInt64(PACK *p, char *name, UINT64 i); -void PackAddInt64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total); -void PackAddData(PACK *p, char *name, void *data, UINT size); -void PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT total); -void PackAddBuf(PACK *p, char *name, BUF *b); -void PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total); +ELEMENT *PackAddX(PACK *p, char *name, X *x); +ELEMENT *PackAddK(PACK *p, char *name, K *k); +ELEMENT *PackAddStr(PACK *p, char *name, char *str); +ELEMENT *PackAddStrEx(PACK *p, char *name, char *str, UINT index, UINT total); +ELEMENT *PackAddUniStr(PACK *p, char *name, wchar_t *unistr); +ELEMENT *PackAddUniStrEx(PACK *p, char *name, wchar_t *unistr, UINT index, UINT total); +ELEMENT *PackAddInt(PACK *p, char *name, UINT i); +ELEMENT *PackAddNum(PACK *p, char *name, UINT num); +ELEMENT *PackAddIntEx(PACK *p, char *name, UINT i, UINT index, UINT total); +ELEMENT *PackAddInt64(PACK *p, char *name, UINT64 i); +ELEMENT *PackAddInt64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total); +ELEMENT *PackAddTime64(PACK *p, char *name, UINT64 i); +ELEMENT *PackAddTime64Ex(PACK *p, char *name, UINT64 i, UINT index, UINT total); +ELEMENT *PackAddData(PACK *p, char *name, void *data, UINT size); +ELEMENT *PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT total); +ELEMENT *PackAddBuf(PACK *p, char *name, BUF *b); +ELEMENT *PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total); bool PackGetStr(PACK *p, char *name, char *str, UINT size); bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index); bool PackGetUniStr(PACK *p, char *name, wchar_t *unistr, UINT size); @@ -239,23 +161,38 @@ bool PackGetDataEx(PACK *p, char *name, void *data, UINT index); BUF *PackGetBuf(PACK *p, char *name); BUF *PackGetBufEx(PACK *p, char *name, UINT index); bool PackGetBool(PACK *p, char *name); -void PackAddBool(PACK *p, char *name, bool b); -void PackAddBoolEx(PACK *p, char *name, bool b, UINT index, UINT total); +ELEMENT *PackAddBool(PACK *p, char *name, bool b); +ELEMENT *PackAddBoolEx(PACK *p, char *name, bool b, UINT index, UINT total); bool PackGetBoolEx(PACK *p, char *name, UINT index); void PackAddIp(PACK *p, char *name, IP *ip); void PackAddIpEx(PACK *p, char *name, IP *ip, UINT index, UINT total); +void PackAddIpEx2(PACK *p, char *name, IP *ip, UINT index, UINT total, bool is_single); bool PackGetIp(PACK *p, char *name, IP *ip); bool PackGetIpEx(PACK *p, char *name, IP *ip, UINT index); UINT PackGetIp32(PACK *p, char *name); UINT PackGetIp32Ex(PACK *p, char *name, UINT index); void PackAddIp32(PACK *p, char *name, UINT ip32); void PackAddIp32Ex(PACK *p, char *name, UINT ip32, UINT index, UINT total); -void PackAddIp6AddrEx(PACK *p, char *name, IPV6_ADDR *addr, UINT index, UINT total); +void PackAddIp32Ex2(PACK *p, char *name, UINT ip32, UINT index, UINT total, bool is_single); +ELEMENT *PackAddIp6AddrEx(PACK *p, char *name, IPV6_ADDR *addr, UINT index, UINT total); bool PackGetIp6AddrEx(PACK *p, char *name, IPV6_ADDR *addr, UINT index); -void PackAddIp6Addr(PACK *p, char *name, IPV6_ADDR *addr); +ELEMENT *PackAddIp6Addr(PACK *p, char *name, IPV6_ADDR *addr); bool PackGetIp6Addr(PACK *p, char *name, IPV6_ADDR *addr); bool PackGetData2(PACK *p, char *name, void *data, UINT size); bool PackGetDataEx2(PACK *p, char *name, void *data, UINT size, UINT index); bool PackIsValueExists(PACK *p, char *name); +void PackSetCurrentJsonGroupName(PACK *p, char *json_group_name); +ELEMENT *ElementNullSafe(ELEMENT *p); + +JSON_VALUE *PackToJson(PACK *p); +char *PackToJsonStr(PACK *p); + +PACK *JsonToPack(JSON_VALUE *v); +PACK *JsonStrToPack(char *str); + +void PackArrayElementToJsonArray(JSON_ARRAY *ja, PACK *p, ELEMENT *e, UINT index); +void PackElementToJsonObject(JSON_OBJECT *o, PACK *p, ELEMENT *e, UINT index); +char *DetermineJsonSuffixForPackElement(ELEMENT *e); +bool JsonTryParseValueAddToPack(PACK *p, JSON_VALUE *v, char *v_name, UINT index, UINT total, bool is_single); #endif // PACK_H diff --git a/src/Mayaqua/Secure.c b/src/Mayaqua/Secure.c index f102595f..69eef15b 100644 --- a/src/Mayaqua/Secure.c +++ b/src/Mayaqua/Secure.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Secure.c @@ -138,6 +32,7 @@ #include #include #include +#include #include #include @@ -1824,7 +1719,7 @@ SECURE *OpenSec(UINT id) return NULL; } - sec->SlotIdList = (UINT *)ZeroMalloc(sizeof(UINT *) * sec->NumSlot); + sec->SlotIdList = (UINT *)ZeroMalloc(sizeof(UINT) * sec->NumSlot); if (sec->Api->C_GetSlotList(TRUE, sec->SlotIdList, &sec->NumSlot) != CKR_OK) { diff --git a/src/Mayaqua/Secure.h b/src/Mayaqua/Secure.h index d34c6cb3..53ccc599 100644 --- a/src/Mayaqua/Secure.h +++ b/src/Mayaqua/Secure.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Secure.h diff --git a/src/Mayaqua/Str.c b/src/Mayaqua/Str.c index 7a1c79c0..ee4d3f50 100644 --- a/src/Mayaqua/Str.c +++ b/src/Mayaqua/Str.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Str.c @@ -117,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -142,6 +37,60 @@ static BYTESTR bytestr[] = {0, "Bytes"}, }; +// Decode URL string +char *UrlDecode(char *url_str) +{ + UINT i, len; + BUF *b; + char *ret; + if (url_str == NULL) + { + return NULL; + } + + len = StrLen(url_str); + + b = NewBuf(); + + for (i = 0;i < len;i++) + { + char c = url_str[i]; + + if (c == '%' && ((i + 2) < len)) + { + char hex_str[8]; + UINT value; + + hex_str[0] = url_str[i + 1]; + hex_str[1] = url_str[i + 2]; + hex_str[2] = 0; + + value = HexToInt(hex_str); + + WriteBufChar(b, (UCHAR)value); + + i += 2; + continue; + } + else + { + if (c == '+') + { + c = ' '; + } + WriteBufChar(b, c); + } + } + + WriteBufChar(b, 0); + + ret = CopyStr(b->Buf); + + FreeBuf(b); + + return ret; +} + // Change the case of the string by the bit array void SetStrCaseAccordingToBits(char *str, UINT bits) { @@ -1514,6 +1463,74 @@ UINT64 ToInt64(char *str) return ret; } + +UINT64 Json_ToInt64Ex(char *str, char **endptr, bool *error) +{ + UINT i; + UINT64 ret = 0; + if (error != NULL) *error = true; + // Validate arguments + if (str == NULL) + { + if (endptr != NULL) + { + *endptr = NULL; + } + return 0; + } + + for (i = 0;;i++) + { + char c = str[i]; + if (endptr != NULL) + { + *endptr = &str[i]; + } + if (c == 0) + { + break; + } + if ('0' <= c && c <= '9') + { + ret = ret * (UINT64)10 + (UINT64)(c - '0'); + if (error != NULL) *error = false; + } + else + { + break; + } + } + + return ret; +} + +// Trim EndWith +bool TrimEndWith(char *dst, UINT dst_size, char *str, char *key) +{ + if (dst == NULL || str == NULL) + { + ClearStr(dst, dst_size); + return false; + } + + StrCpy(dst, dst_size, str); + + if (EndWith(str, key)) + { + UINT src_len = StrLen(str); + UINT key_len = StrLen(key); + + if (src_len >= key_len) + { + dst[src_len - key_len] = 0; + } + + return true; + } + + return false; +} + // Check whether the str ends with the key bool EndWith(char *str, char *key) { @@ -2027,6 +2044,53 @@ void EnSafeStr(char *str, char replace) } } +// Replace '\r' and '\n' with the specified character. +// If the specified character is a space (unsafe), the original character is removed. +void EnSafeHttpHeaderValueStr(char *str, char replace) +{ + UINT length = 0; + UINT index = 0; + + // Validate arguments + if (str == NULL) + { + return; + } + + length = StrLen(str); + while (index < length) + { + if (str[index] == '\r' || str[index] == '\n') + { + if (replace == ' ') + { + Move(&str[index], &str[index + 1], length - index); + } + else + { + str[index] = replace; + } + } + else if (str[index] == '\\') + { + if (str[index + 1] == 'r' || str[index + 1] == 'n') + { + if (replace == ' ') + { + Move(&str[index], &str[index + 2], length - index); + index--; + } + else + { + str[index] = str[index + 1] = replace; + index++; + } + } + } + index++; + } +} + // Operation check of string library bool CheckStringLibrary() { @@ -2412,6 +2476,33 @@ void TrimCrlf(char *str) } } +// Remove quotes at the beginning and at the end of the string +void TrimQuotes(char *str) +{ + UINT len = 0; + // Validate arguments + if (str == NULL) + { + return; + } + + len = StrLen(str); + if (len == 0) + { + return; + } + + if (str[len - 1] == '\"') + { + str[len - 1] = 0; + } + + if (str[0] == '\"') + { + Move(str, str + 1, len); + } +} + // Remove white spaces of the both side of the string void Trim(char *str) { @@ -3053,3 +3144,1996 @@ UINT StrLen(char *str) } + + + + +// *** JSON strings support +// Original source code from Parson ( http://kgabis.github.com/parson/ ) +// Modified by dnobori +/* +Parson ( http://kgabis.github.com/parson/ ) +Copyright (c) 2012 - 2017 Krzysztof Gabis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + + + +/* Apparently sscanf is not implemented in some "standard" libraries, so don't use it, if you +* don't have to. */ +#define sscanf THINK_TWICE_ABOUT_USING_SSCANF + +#define STARTING_CAPACITY 16 +#define MAX_NESTING 2048 +#define FLOAT_FORMAT "%1.17g" + +#define SIZEOF_TOKEN(a) (sizeof(a) - 1) +#define SKIP_CHAR(str) ((*str)++) +#define SKIP_WHITESPACES(str) while (isspace((unsigned char)(**str))) { SKIP_CHAR(str); } + +static JSON_Malloc_Function parson_malloc = Malloc; +static JSON_Free_Function parson_free = Free; + +#define IS_CONT(b) (((unsigned char)(b) & 0xC0) == 0x80) /* is utf-8 continuation byte */ + +/* Various */ +static void remove_comments(char *string, char *start_token, char *end_token); +static char * parson_strndup(char *string, UINT n); +static char * parson_strdup(char *string); +static int hex_char_to_int(char c); +static int parse_utf16_hex(char *string, unsigned int *result); +static int num_bytes_in_utf8_sequence(unsigned char c); +static int verify_utf8_sequence(unsigned char *string, int *len); +static int is_valid_utf8(char *string, UINT string_len); +static int is_decimal(char *string, UINT length); + +/* JSON Object */ +static JSON_OBJECT * json_object_init(JSON_VALUE *wrapping_value); +static UINT json_object_add(JSON_OBJECT *object, char *name, JSON_VALUE *value); +static UINT json_object_resize(JSON_OBJECT *object, UINT new_capacity); +static JSON_VALUE * json_object_nget_value(JSON_OBJECT *object, char *name, UINT n); +static void json_object_free(JSON_OBJECT *object); + +/* JSON Array */ +static JSON_ARRAY * json_array_init(JSON_VALUE *wrapping_value); +static UINT json_array_add(JSON_ARRAY *array, JSON_VALUE *value); +static UINT json_array_resize(JSON_ARRAY *array, UINT new_capacity); +static void json_array_free(JSON_ARRAY *array); + +/* JSON Value */ +static JSON_VALUE * json_value_init_string_no_copy(char *string); + +/* Parser */ +static UINT skip_quotes(char **string); +static int parse_utf16(char **unprocessed, char **processed); +static char * process_string(char *input, UINT len); +static char * get_quoted_string(char **string); +static JSON_VALUE * parse_object_value(char **string, UINT nesting); +static JSON_VALUE * parse_array_value(char **string, UINT nesting); +static JSON_VALUE * parse_string_value(char **string); +static JSON_VALUE * parse_boolean_value(char **string); +static JSON_VALUE * parse_number_value(char **string); +static JSON_VALUE * parse_null_value(char **string); +static JSON_VALUE * parse_value(char **string, UINT nesting); + +/* Serialization */ +static int json_serialize_to_buffer_r(JSON_VALUE *value, char *buf, int level, int is_pretty, char *num_buf); +static int json_serialize_string(char *string, char *buf); +static int append_indent(char *buf, int level); +static int append_string(char *buf, char *string); + +/* Various */ +static char * parson_strndup(char *string, UINT n) { + char *output_string = (char*)parson_malloc(n + 1); + if (!output_string) { + return NULL; + } + output_string[n] = '\0'; + strncpy(output_string, string, n); + return output_string; +} + +static char * parson_strdup(char *string) { + return parson_strndup(string, StrLen(string)); +} + +static int hex_char_to_int(char c) { + if (c >= '0' && c <= '9') { + return c - '0'; + } + else if (c >= 'a' && c <= 'f') { + return c - 'a' + 10; + } + else if (c >= 'A' && c <= 'F') { + return c - 'A' + 10; + } + return -1; +} + +static int parse_utf16_hex(char *s, unsigned int *result) { + int x1, x2, x3, x4; + if (s[0] == '\0' || s[1] == '\0' || s[2] == '\0' || s[3] == '\0') { + return 0; + } + x1 = hex_char_to_int(s[0]); + x2 = hex_char_to_int(s[1]); + x3 = hex_char_to_int(s[2]); + x4 = hex_char_to_int(s[3]); + if (x1 == -1 || x2 == -1 || x3 == -1 || x4 == -1) { + return 0; + } + *result = (unsigned int)((x1 << 12) | (x2 << 8) | (x3 << 4) | x4); + return 1; +} + +static int num_bytes_in_utf8_sequence(unsigned char c) { + if (c == 0xC0 || c == 0xC1 || c > 0xF4 || IS_CONT(c)) { + return 0; + } + else if ((c & 0x80) == 0) { /* 0xxxxxxx */ + return 1; + } + else if ((c & 0xE0) == 0xC0) { /* 110xxxxx */ + return 2; + } + else if ((c & 0xF0) == 0xE0) { /* 1110xxxx */ + return 3; + } + else if ((c & 0xF8) == 0xF0) { /* 11110xxx */ + return 4; + } + return 0; /* won't happen */ +} + +static int verify_utf8_sequence(unsigned char *string, int *len) { + unsigned int cp = 0; + *len = num_bytes_in_utf8_sequence(string[0]); + + if (*len == 1) { + cp = string[0]; + } + else if (*len == 2 && IS_CONT(string[1])) { + cp = string[0] & 0x1F; + cp = (cp << 6) | (string[1] & 0x3F); + } + else if (*len == 3 && IS_CONT(string[1]) && IS_CONT(string[2])) { + cp = ((unsigned char)string[0]) & 0xF; + cp = (cp << 6) | (string[1] & 0x3F); + cp = (cp << 6) | (string[2] & 0x3F); + } + else if (*len == 4 && IS_CONT(string[1]) && IS_CONT(string[2]) && IS_CONT(string[3])) { + cp = string[0] & 0x7; + cp = (cp << 6) | (string[1] & 0x3F); + cp = (cp << 6) | (string[2] & 0x3F); + cp = (cp << 6) | (string[3] & 0x3F); + } + else { + return 0; + } + + /* overlong encodings */ + if ((cp < 0x80 && *len > 1) || + (cp < 0x800 && *len > 2) || + (cp < 0x10000 && *len > 3)) { + return 0; + } + + /* invalid unicode */ + if (cp > 0x10FFFF) { + return 0; + } + + /* surrogate halves */ + if (cp >= 0xD800 && cp <= 0xDFFF) { + return 0; + } + + return 1; +} + +static int is_valid_utf8(char *string, UINT string_len) { + int len = 0; + char *string_end = string + string_len; + while (string < string_end) { + if (!verify_utf8_sequence((unsigned char*)string, &len)) { + return 0; + } + string += len; + } + return 1; +} + +static int is_decimal(char *string, UINT length) { + if (length > 1 && string[0] == '0' && string[1] != '.') { + return 0; + } + if (length > 2 && !strncmp(string, "-0", 2) && string[2] != '.') { + return 0; + } + while (length--) { + if (strchr("xX", string[length])) { + return 0; + } + } + return 1; +} + +static void remove_comments(char *string, char *start_token, char *end_token) { + int in_string = 0, escaped = 0; + UINT i; + char *ptr = NULL, current_char; + UINT start_token_len = StrLen(start_token); + UINT end_token_len = StrLen(end_token); + if (start_token_len == 0 || end_token_len == 0) { + return; + } + while ((current_char = *string) != '\0') { + if (current_char == '\\' && !escaped) { + escaped = 1; + string++; + continue; + } + else if (current_char == '\"' && !escaped) { + in_string = !in_string; + } + else if (!in_string && strncmp(string, start_token, start_token_len) == 0) { + for (i = 0; i < start_token_len; i++) { + string[i] = ' '; + } + string = string + start_token_len; + ptr = strstr(string, end_token); + if (!ptr) { + return; + } + for (i = 0; i < (ptr - string) + end_token_len; i++) { + string[i] = ' '; + } + string = ptr + end_token_len - 1; + } + escaped = 0; + string++; + } +} + +/* JSON Object */ +static JSON_OBJECT * json_object_init(JSON_VALUE *wrapping_value) { + JSON_OBJECT *new_obj = (JSON_OBJECT*)parson_malloc(sizeof(JSON_OBJECT)); + if (new_obj == NULL) { + return NULL; + } + new_obj->wrapping_value = wrapping_value; + new_obj->names = (char**)NULL; + new_obj->values = (JSON_VALUE**)NULL; + new_obj->capacity = 0; + new_obj->count = 0; + return new_obj; +} + +static UINT json_object_add(JSON_OBJECT *object, char *name, JSON_VALUE *value) { + UINT index = 0; + if (object == NULL || name == NULL || value == NULL) { + return JSON_RET_ERROR; + } + if (JsonGet(object, name) != NULL) { + return JSON_RET_ERROR; + } + if (object->count >= object->capacity) { + UINT new_capacity = MAX(object->capacity * 2, STARTING_CAPACITY); + if (json_object_resize(object, new_capacity) == JSON_RET_ERROR) { + return JSON_RET_ERROR; + } + } + index = object->count; + object->names[index] = parson_strdup(name); + if (object->names[index] == NULL) { + return JSON_RET_ERROR; + } + value->parent = JsonGetWrappingValue(object); + object->values[index] = value; + object->count++; + return JSON_RET_OK; +} + +static UINT json_object_resize(JSON_OBJECT *object, UINT new_capacity) { + char **temp_names = NULL; + JSON_VALUE **temp_values = NULL; + + if ((object->names == NULL && object->values != NULL) || + (object->names != NULL && object->values == NULL) || + new_capacity == 0) { + return JSON_RET_ERROR; /* Shouldn't happen */ + } + temp_names = (char**)parson_malloc(new_capacity * sizeof(char*)); + if (temp_names == NULL) { + return JSON_RET_ERROR; + } + temp_values = (JSON_VALUE**)parson_malloc(new_capacity * sizeof(JSON_VALUE*)); + if (temp_values == NULL) { + parson_free(temp_names); + return JSON_RET_ERROR; + } + if (object->names != NULL && object->values != NULL && object->count > 0) { + memcpy(temp_names, object->names, object->count * sizeof(char*)); + memcpy(temp_values, object->values, object->count * sizeof(JSON_VALUE*)); + } + parson_free(object->names); + parson_free(object->values); + object->names = temp_names; + object->values = temp_values; + object->capacity = new_capacity; + return JSON_RET_OK; +} + +static JSON_VALUE * json_object_nget_value(JSON_OBJECT *object, char *name, UINT n) { + UINT i, name_length; + for (i = 0; i < JsonGetCount(object); i++) { + name_length = StrLen(object->names[i]); + if (name_length != n) { + continue; + } + if (strncmp(object->names[i], name, n) == 0) { + return object->values[i]; + } + } + return NULL; +} + +static void json_object_free(JSON_OBJECT *object) { + UINT i; + for (i = 0; i < object->count; i++) { + parson_free(object->names[i]); + JsonFree(object->values[i]); + } + parson_free(object->names); + parson_free(object->values); + parson_free(object); +} + +/* JSON Array */ +static JSON_ARRAY * json_array_init(JSON_VALUE *wrapping_value) { + JSON_ARRAY *new_array = (JSON_ARRAY*)parson_malloc(sizeof(JSON_ARRAY)); + if (new_array == NULL) { + return NULL; + } + new_array->wrapping_value = wrapping_value; + new_array->items = (JSON_VALUE**)NULL; + new_array->capacity = 0; + new_array->count = 0; + return new_array; +} + +static UINT json_array_add(JSON_ARRAY *array, JSON_VALUE *value) { + if (array->count >= array->capacity) { + UINT new_capacity = MAX(array->capacity * 2, STARTING_CAPACITY); + if (json_array_resize(array, new_capacity) == JSON_RET_ERROR) { + return JSON_RET_ERROR; + } + } + value->parent = JsonArrayGetWrappingValue(array); + array->items[array->count] = value; + array->count++; + return JSON_RET_OK; +} + +static UINT json_array_resize(JSON_ARRAY *array, UINT new_capacity) { + JSON_VALUE **new_items = NULL; + if (new_capacity == 0) { + return JSON_RET_ERROR; + } + new_items = (JSON_VALUE**)parson_malloc(new_capacity * sizeof(JSON_VALUE*)); + if (new_items == NULL) { + return JSON_RET_ERROR; + } + if (array->items != NULL && array->count > 0) { + memcpy(new_items, array->items, array->count * sizeof(JSON_VALUE*)); + } + parson_free(array->items); + array->items = new_items; + array->capacity = new_capacity; + return JSON_RET_OK; +} + +static void json_array_free(JSON_ARRAY *array) { + UINT i; + for (i = 0; i < array->count; i++) { + JsonFree(array->items[i]); + } + parson_free(array->items); + parson_free(array); +} + +/* JSON Value */ +static JSON_VALUE * json_value_init_string_no_copy(char *string) { + JSON_VALUE *new_value = (JSON_VALUE*)parson_malloc(sizeof(JSON_VALUE)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSON_TYPE_STRING; + new_value->value.string = string; + return new_value; +} + +/* Parser */ +static UINT skip_quotes(char **string) { + if (**string != '\"') { + return JSON_RET_ERROR; + } + SKIP_CHAR(string); + while (**string != '\"') { + if (**string == '\0') { + return JSON_RET_ERROR; + } + else if (**string == '\\') { + SKIP_CHAR(string); + if (**string == '\0') { + return JSON_RET_ERROR; + } + } + SKIP_CHAR(string); + } + SKIP_CHAR(string); + return JSON_RET_OK; +} + +static int parse_utf16(char **unprocessed, char **processed) { + unsigned int cp, lead, trail; + int parse_succeeded = 0; + char *processed_ptr = *processed; + char *unprocessed_ptr = *unprocessed; + unprocessed_ptr++; /* skips u */ + parse_succeeded = parse_utf16_hex(unprocessed_ptr, &cp); + if (!parse_succeeded) { + return JSON_RET_ERROR; + } + if (cp < 0x80) { + processed_ptr[0] = (char)cp; /* 0xxxxxxx */ + } + else if (cp < 0x800) { + processed_ptr[0] = ((cp >> 6) & 0x1F) | 0xC0; /* 110xxxxx */ + processed_ptr[1] = ((cp) & 0x3F) | 0x80; /* 10xxxxxx */ + processed_ptr += 1; + } + else if (cp < 0xD800 || cp > 0xDFFF) { + processed_ptr[0] = ((cp >> 12) & 0x0F) | 0xE0; /* 1110xxxx */ + processed_ptr[1] = ((cp >> 6) & 0x3F) | 0x80; /* 10xxxxxx */ + processed_ptr[2] = ((cp) & 0x3F) | 0x80; /* 10xxxxxx */ + processed_ptr += 2; + } + else if (cp >= 0xD800 && cp <= 0xDBFF) { /* lead surrogate (0xD800..0xDBFF) */ + lead = cp; + unprocessed_ptr += 4; /* should always be within the buffer, otherwise previous sscanf would fail */ + if (*unprocessed_ptr++ != '\\' || *unprocessed_ptr++ != 'u') { + return JSON_RET_ERROR; + } + parse_succeeded = parse_utf16_hex(unprocessed_ptr, &trail); + if (!parse_succeeded || trail < 0xDC00 || trail > 0xDFFF) { /* valid trail surrogate? (0xDC00..0xDFFF) */ + return JSON_RET_ERROR; + } + cp = ((((lead - 0xD800) & 0x3FF) << 10) | ((trail - 0xDC00) & 0x3FF)) + 0x010000; + processed_ptr[0] = (((cp >> 18) & 0x07) | 0xF0); /* 11110xxx */ + processed_ptr[1] = (((cp >> 12) & 0x3F) | 0x80); /* 10xxxxxx */ + processed_ptr[2] = (((cp >> 6) & 0x3F) | 0x80); /* 10xxxxxx */ + processed_ptr[3] = (((cp) & 0x3F) | 0x80); /* 10xxxxxx */ + processed_ptr += 3; + } + else { /* trail surrogate before lead surrogate */ + return JSON_RET_ERROR; + } + unprocessed_ptr += 3; + *processed = processed_ptr; + *unprocessed = unprocessed_ptr; + return JSON_RET_OK; +} + + +/* Copies and processes passed string up to supplied length. +Example: "\u006Corem ipsum" -> lorem ipsum */ +static char* process_string(char *input, UINT len) { + char *input_ptr = input; + UINT initial_size = (len + 1) * sizeof(char); + UINT final_size = 0; + char *output = NULL, *output_ptr = NULL, *resized_output = NULL; + output = (char*)parson_malloc(initial_size); + if (output == NULL) { + goto error; + } + output_ptr = output; + while ((*input_ptr != '\0') && (UINT)(input_ptr - input) < len) { + if (*input_ptr == '\\') { + input_ptr++; + switch (*input_ptr) { + case '\"': *output_ptr = '\"'; break; + case '\\': *output_ptr = '\\'; break; + case '/': *output_ptr = '/'; break; + case 'b': *output_ptr = '\b'; break; + case 'f': *output_ptr = '\f'; break; + case 'n': *output_ptr = '\n'; break; + case 'r': *output_ptr = '\r'; break; + case 't': *output_ptr = '\t'; break; + case 'u': + if (parse_utf16(&input_ptr, &output_ptr) == JSON_RET_ERROR) { + goto error; + } + break; + default: + goto error; + } + } + else if ((unsigned char)*input_ptr < 0x20) { + goto error; /* 0x00-0x19 are invalid characters for json string (http://www.ietf.org/rfc/rfc4627.txt) */ + } + else { + *output_ptr = *input_ptr; + } + output_ptr++; + input_ptr++; + } + *output_ptr = '\0'; + /* resize to new length */ + final_size = (UINT)(output_ptr - output) + 1; + /* todo: don't resize if final_size == initial_size */ + resized_output = (char*)parson_malloc(final_size); + if (resized_output == NULL) { + goto error; + } + memcpy(resized_output, output, final_size); + parson_free(output); + return resized_output; +error: + parson_free(output); + return NULL; +} + +/* Return processed contents of a string between quotes and +skips passed argument to a matching quote. */ +static char * get_quoted_string(char **string) { + char *string_start = *string; + UINT string_len = 0; + UINT status = skip_quotes(string); + if (status != JSON_RET_OK) { + return NULL; + } + string_len = (UINT)(*string - string_start - 2); /* length without quotes */ + return process_string(string_start + 1, string_len); +} + +static JSON_VALUE * parse_value(char **string, UINT nesting) { + if (nesting > MAX_NESTING) { + return NULL; + } + SKIP_WHITESPACES(string); + switch (**string) { + case '{': + return parse_object_value(string, nesting + 1); + case '[': + return parse_array_value(string, nesting + 1); + case '\"': + return parse_string_value(string); + case 'f': case 't': + return parse_boolean_value(string); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return parse_number_value(string); + case 'n': + return parse_null_value(string); + default: + return NULL; + } +} + +static JSON_VALUE * parse_object_value(char **string, UINT nesting) { + JSON_VALUE *output_value = JsonNewObject(), *new_value = NULL; + JSON_OBJECT *output_object = JsonValueGetObject(output_value); + char *new_key = NULL; + if (output_value == NULL || **string != '{') { + return NULL; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + if (**string == '}') { /* empty object */ + SKIP_CHAR(string); + return output_value; + } + while (**string != '\0') { + new_key = get_quoted_string(string); + if (new_key == NULL) { + JsonFree(output_value); + return NULL; + } + SKIP_WHITESPACES(string); + if (**string != ':') { + parson_free(new_key); + JsonFree(output_value); + return NULL; + } + SKIP_CHAR(string); + new_value = parse_value(string, nesting); + if (new_value == NULL) { + parson_free(new_key); + JsonFree(output_value); + return NULL; + } + if (json_object_add(output_object, new_key, new_value) == JSON_RET_ERROR) { + parson_free(new_key); + JsonFree(new_value); + JsonFree(output_value); + return NULL; + } + parson_free(new_key); + SKIP_WHITESPACES(string); + if (**string != ',') { + break; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + } + SKIP_WHITESPACES(string); + if (**string != '}' || /* Trim object after parsing is over */ + json_object_resize(output_object, JsonGetCount(output_object)) == JSON_RET_ERROR) { + JsonFree(output_value); + return NULL; + } + SKIP_CHAR(string); + return output_value; +} + +static JSON_VALUE * parse_array_value(char **string, UINT nesting) { + JSON_VALUE *output_value = JsonNewArray(), *new_array_value = NULL; + JSON_ARRAY *output_array = JsonValueGetArray(output_value); + if (!output_value || **string != '[') { + return NULL; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + if (**string == ']') { /* empty array */ + SKIP_CHAR(string); + return output_value; + } + while (**string != '\0') { + new_array_value = parse_value(string, nesting); + if (new_array_value == NULL) { + JsonFree(output_value); + return NULL; + } + if (json_array_add(output_array, new_array_value) == JSON_RET_ERROR) { + JsonFree(new_array_value); + JsonFree(output_value); + return NULL; + } + SKIP_WHITESPACES(string); + if (**string != ',') { + break; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + } + SKIP_WHITESPACES(string); + if (**string != ']' || /* Trim array after parsing is over */ + json_array_resize(output_array, JsonArrayGetCount(output_array)) == JSON_RET_ERROR) { + JsonFree(output_value); + return NULL; + } + SKIP_CHAR(string); + return output_value; +} + +static JSON_VALUE * parse_string_value(char **string) { + JSON_VALUE *value = NULL; + char *new_string = get_quoted_string(string); + if (new_string == NULL) { + return NULL; + } + value = json_value_init_string_no_copy(new_string); + if (value == NULL) { + parson_free(new_string); + return NULL; + } + return value; +} + +static JSON_VALUE * parse_boolean_value(char **string) { + UINT true_token_size = SIZEOF_TOKEN("true"); + UINT false_token_size = SIZEOF_TOKEN("false"); + if (strncmp("true", *string, true_token_size) == 0) { + *string += true_token_size; + return JsonNewBool(1); + } + else if (strncmp("false", *string, false_token_size) == 0) { + *string += false_token_size; + return JsonNewBool(0); + } + return NULL; +} + +static JSON_VALUE * parse_number_value(char **string) { + char *end; + bool error = false; + UINT64 number = 0; + number = Json_ToInt64Ex(*string, &end, &error); + + if (error) + { + return NULL; + } + *string = end; + return JsonNewNumber(number); +} + +static JSON_VALUE * parse_null_value(char **string) { + UINT token_size = SIZEOF_TOKEN("null"); + if (strncmp("null", *string, token_size) == 0) { + *string += token_size; + return JsonNewNull(); + } + return NULL; +} + +/* Serialization */ +#define APPEND_STRING(str) do { written = append_string(buf, (str));\ + if (written < 0) { return -1; }\ + if (buf != NULL) { buf += written; }\ + written_total += written; } while(0) + +#define APPEND_INDENT(level) do { written = append_indent(buf, (level));\ + if (written < 0) { return -1; }\ + if (buf != NULL) { buf += written; }\ + written_total += written; } while(0) + +static int json_serialize_to_buffer_r(JSON_VALUE *value, char *buf, int level, int is_pretty, char *num_buf) +{ + char *key = NULL, *string = NULL; + JSON_VALUE *temp_value = NULL; + JSON_ARRAY *array = NULL; + JSON_OBJECT *object = NULL; + UINT i = 0, count = 0; + UINT64 num = 0; + int written = -1, written_total = 0; + char tmp[32]; + + switch (JsonValueGetType(value)) { + case JSON_TYPE_ARRAY: + array = JsonValueGetArray(value); + count = JsonArrayGetCount(array); + APPEND_STRING("["); + if (count > 0 && is_pretty) { + APPEND_STRING("\n"); + } + for (i = 0; i < count; i++) { + if (is_pretty) { + APPEND_INDENT(level + 1); + } + temp_value = JsonArrayGet(array, i); + written = json_serialize_to_buffer_r(temp_value, buf, level + 1, is_pretty, num_buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + if (i < (count - 1)) { + APPEND_STRING(","); + } + if (is_pretty) { + APPEND_STRING("\n"); + } + } + if (count > 0 && is_pretty) { + APPEND_INDENT(level); + } + APPEND_STRING("]"); + return written_total; + case JSON_TYPE_OBJECT: + object = JsonValueGetObject(value); + count = JsonGetCount(object); + APPEND_STRING("{"); + if (count > 0 && is_pretty) { + APPEND_STRING("\n"); + } + for (i = 0; i < count; i++) { + key = JsonGetName(object, i); + if (key == NULL) { + return -1; + } + if (is_pretty) { + APPEND_INDENT(level + 1); + } + written = json_serialize_string(key, buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + APPEND_STRING(":"); + if (is_pretty) { + APPEND_STRING(" "); + } + temp_value = JsonGet(object, key); + written = json_serialize_to_buffer_r(temp_value, buf, level + 1, is_pretty, num_buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + if (i < (count - 1)) { + APPEND_STRING(","); + } + if (is_pretty) { + APPEND_STRING("\n"); + } + } + if (count > 0 && is_pretty) { + APPEND_INDENT(level); + } + APPEND_STRING("}"); + return written_total; + case JSON_TYPE_STRING: + string = JsonValueGetStr(value); + if (string == NULL) { + return -1; + } + written = json_serialize_string(string, buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + return written_total; + case JSON_TYPE_BOOL: + if (JsonValueGetBool(value)) { + APPEND_STRING("true"); + } + else { + APPEND_STRING("false"); + } + return written_total; + case JSON_TYPE_NUMBER: + num = JsonValueGetNumber(value); + if (buf != NULL) { + num_buf = buf; + } + ToStr64(tmp, num); + Copy(num_buf, tmp, StrLen(tmp)); + written = StrLen(tmp); + if (buf != NULL) { + buf += written; + } + written_total += written; + return written_total; + case JSON_TYPE_NULL: + APPEND_STRING("null"); + return written_total; + case JSON_TYPE_ERROR: + return -1; + default: + return -1; + } +} + +static int json_serialize_string(char *string, char *buf) { + UINT i = 0, len = StrLen(string); + char c = '\0'; + int written = -1, written_total = 0; + APPEND_STRING("\""); + for (i = 0; i < len; i++) { + c = string[i]; + switch (c) { + case '\"': APPEND_STRING("\\\""); break; + case '\\': APPEND_STRING("\\\\"); break; + case '/': APPEND_STRING("\\/"); break; /* to make json embeddable in xml\/html */ + case '\b': APPEND_STRING("\\b"); break; + case '\f': APPEND_STRING("\\f"); break; + case '\n': APPEND_STRING("\\n"); break; + case '\r': APPEND_STRING("\\r"); break; + case '\t': APPEND_STRING("\\t"); break; + case '\x00': APPEND_STRING("\\u0000"); break; + case '\x01': APPEND_STRING("\\u0001"); break; + case '\x02': APPEND_STRING("\\u0002"); break; + case '\x03': APPEND_STRING("\\u0003"); break; + case '\x04': APPEND_STRING("\\u0004"); break; + case '\x05': APPEND_STRING("\\u0005"); break; + case '\x06': APPEND_STRING("\\u0006"); break; + case '\x07': APPEND_STRING("\\u0007"); break; + /* '\x08' duplicate: '\b' */ + /* '\x09' duplicate: '\t' */ + /* '\x0a' duplicate: '\n' */ + case '\x0b': APPEND_STRING("\\u000b"); break; + /* '\x0c' duplicate: '\f' */ + /* '\x0d' duplicate: '\r' */ + case '\x0e': APPEND_STRING("\\u000e"); break; + case '\x0f': APPEND_STRING("\\u000f"); break; + case '\x10': APPEND_STRING("\\u0010"); break; + case '\x11': APPEND_STRING("\\u0011"); break; + case '\x12': APPEND_STRING("\\u0012"); break; + case '\x13': APPEND_STRING("\\u0013"); break; + case '\x14': APPEND_STRING("\\u0014"); break; + case '\x15': APPEND_STRING("\\u0015"); break; + case '\x16': APPEND_STRING("\\u0016"); break; + case '\x17': APPEND_STRING("\\u0017"); break; + case '\x18': APPEND_STRING("\\u0018"); break; + case '\x19': APPEND_STRING("\\u0019"); break; + case '\x1a': APPEND_STRING("\\u001a"); break; + case '\x1b': APPEND_STRING("\\u001b"); break; + case '\x1c': APPEND_STRING("\\u001c"); break; + case '\x1d': APPEND_STRING("\\u001d"); break; + case '\x1e': APPEND_STRING("\\u001e"); break; + case '\x1f': APPEND_STRING("\\u001f"); break; + default: + if (buf != NULL) { + buf[0] = c; + buf += 1; + } + written_total += 1; + break; + } + } + APPEND_STRING("\""); + return written_total; +} + +static int append_indent(char *buf, int level) { + int i; + int written = -1, written_total = 0; + for (i = 0; i < level; i++) { + APPEND_STRING(" "); + } + return written_total; +} + +static int append_string(char *buf, char *string) { + if (buf == NULL) { + return (int)strlen(string); + } + return sprintf(buf, "%s", string); +} + +#undef APPEND_STRING +#undef APPEND_INDENT + +JSON_VALUE * JsonParseString(char *string) { + if (string == NULL) { + return NULL; + } + if (string[0] == '\xEF' && string[1] == '\xBB' && string[2] == '\xBF') { + string = string + 3; /* Support for UTF-8 BOM */ + } + return parse_value((char**)&string, 0); +} + +JSON_VALUE * JsonParseStringWithComments(char *string) { + JSON_VALUE *result = NULL; + char *string_mutable_copy = NULL, *string_mutable_copy_ptr = NULL; + string_mutable_copy = parson_strdup(string); + if (string_mutable_copy == NULL) { + return NULL; + } + remove_comments(string_mutable_copy, "/*", "*/"); + remove_comments(string_mutable_copy, "//", "\n"); + string_mutable_copy_ptr = string_mutable_copy; + result = parse_value((char**)&string_mutable_copy_ptr, 0); + parson_free(string_mutable_copy); + return result; +} + +/* JSON Object API */ + +JSON_VALUE * JsonGet(JSON_OBJECT *object, char *name) { + if (object == NULL || name == NULL) { + return NULL; + } + return json_object_nget_value(object, name, StrLen(name)); +} + +char * JsonGetStr(JSON_OBJECT *object, char *name) { + return JsonValueGetStr(JsonGet(object, name)); +} + +UINT64 JsonGetNumber(JSON_OBJECT *object, char *name) { + return JsonValueGetNumber(JsonGet(object, name)); +} + +JSON_OBJECT * JsonGetObj(JSON_OBJECT *object, char *name) { + return JsonValueGetObject(JsonGet(object, name)); +} + +JSON_ARRAY * JsonGetArray(JSON_OBJECT *object, char *name) { + return JsonValueGetArray(JsonGet(object, name)); +} + +bool JsonGetBool(JSON_OBJECT *object, char *name) { + return JsonValueGetBool(JsonGet(object, name)); +} + +JSON_VALUE * JsonDotGet(JSON_OBJECT *object, char *name) { + char *dot_position = strchr(name, '.'); + if (!dot_position) { + return JsonGet(object, name); + } + object = JsonValueGetObject(json_object_nget_value(object, name, (UINT)(dot_position - name))); + return JsonDotGet(object, dot_position + 1); +} + +char * JsonDotGetStr(JSON_OBJECT *object, char *name) { + return JsonValueGetStr(JsonDotGet(object, name)); +} + +UINT64 JsonDotGetNumber(JSON_OBJECT *object, char *name) { + return JsonValueGetNumber(JsonDotGet(object, name)); +} + +JSON_OBJECT * JsonDotGetObj(JSON_OBJECT *object, char *name) { + return JsonValueGetObject(JsonDotGet(object, name)); +} + +JSON_ARRAY * JsonDotGetArray(JSON_OBJECT *object, char *name) { + return JsonValueGetArray(JsonDotGet(object, name)); +} + +bool JsonDotGetBool(JSON_OBJECT *object, char *name) { + return JsonValueGetBool(JsonDotGet(object, name)); +} + +UINT JsonGetCount(JSON_OBJECT *object) { + return object ? object->count : 0; +} + +char * JsonGetName(JSON_OBJECT *object, UINT index) { + if (object == NULL || index >= JsonGetCount(object)) { + return NULL; + } + return object->names[index]; +} + +JSON_VALUE * JsonGetValueAt(JSON_OBJECT *object, UINT index) { + if (object == NULL || index >= JsonGetCount(object)) { + return NULL; + } + return object->values[index]; +} + +JSON_VALUE *JsonGetWrappingValue(JSON_OBJECT *object) { + return object->wrapping_value; +} + +int JsonIsExists(JSON_OBJECT *object, char *name) { + return JsonGet(object, name) != NULL; +} + +int JsonIsExistsWithValueType(JSON_OBJECT *object, char *name, UINT type) { + JSON_VALUE *val = JsonGet(object, name); + return val != NULL && JsonValueGetType(val) == type; +} + +int JsonDotIsExists(JSON_OBJECT *object, char *name) { + return JsonDotGet(object, name) != NULL; +} + +int JsonDotIsExistsWithValueType(JSON_OBJECT *object, char *name, UINT type) { + JSON_VALUE *val = JsonDotGet(object, name); + return val != NULL && JsonValueGetType(val) == type; +} + +/* JSON Array API */ +JSON_VALUE * JsonArrayGet(JSON_ARRAY *array, UINT index) { + if (array == NULL || index >= JsonArrayGetCount(array)) { + return NULL; + } + return array->items[index]; +} + +char * JsonArrayGetStr(JSON_ARRAY *array, UINT index) { + return JsonValueGetStr(JsonArrayGet(array, index)); +} + +UINT64 JsonArrayGetNumber(JSON_ARRAY *array, UINT index) { + return JsonValueGetNumber(JsonArrayGet(array, index)); +} + +JSON_OBJECT * JsonArrayGetObj(JSON_ARRAY *array, UINT index) { + return JsonValueGetObject(JsonArrayGet(array, index)); +} + +JSON_ARRAY * JsonArrayGetArray(JSON_ARRAY *array, UINT index) { + return JsonValueGetArray(JsonArrayGet(array, index)); +} + +bool JsonArrayGetBool(JSON_ARRAY *array, UINT index) { + return JsonValueGetBool(JsonArrayGet(array, index)); +} + +UINT JsonArrayGetCount(JSON_ARRAY *array) { + return array ? array->count : 0; +} + +JSON_VALUE * JsonArrayGetWrappingValue(JSON_ARRAY *array) { + return array->wrapping_value; +} + +/* JSON Value API */ +UINT JsonValueGetType(JSON_VALUE *value) { + return value ? value->type : JSON_TYPE_ERROR; +} + +JSON_OBJECT * JsonValueGetObject(JSON_VALUE *value) { + if (value == NULL) + { + return NULL; + } + return JsonValueGetType(value) == JSON_TYPE_OBJECT ? value->value.object : NULL; +} + +JSON_ARRAY * JsonValueGetArray(JSON_VALUE *value) { + return JsonValueGetType(value) == JSON_TYPE_ARRAY ? value->value.array : NULL; +} + +char * JsonValueGetStr(JSON_VALUE *value) { + return JsonValueGetType(value) == JSON_TYPE_STRING ? value->value.string : NULL; +} + +UINT64 JsonValueGetNumber(JSON_VALUE *value) { + return JsonValueGetType(value) == JSON_TYPE_NUMBER ? value->value.number : 0; +} + +bool JsonValueGetBool(JSON_VALUE *value) { + return JsonValueGetType(value) == JSON_TYPE_BOOL ? value->value.boolean : 0; +} + +JSON_VALUE * JsonValueGetParent(JSON_VALUE *value) { + return value ? value->parent : NULL; +} + +void JsonFree(JSON_VALUE *value) { + if (value == NULL) + { + return; + } + switch (JsonValueGetType(value)) { + case JSON_TYPE_OBJECT: + json_object_free(value->value.object); + break; + case JSON_TYPE_STRING: + parson_free(value->value.string); + break; + case JSON_TYPE_ARRAY: + json_array_free(value->value.array); + break; + default: + break; + } + parson_free(value); +} + +JSON_VALUE * JsonNewObject(void) { + JSON_VALUE *new_value = (JSON_VALUE*)parson_malloc(sizeof(JSON_VALUE)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSON_TYPE_OBJECT; + new_value->value.object = json_object_init(new_value); + if (!new_value->value.object) { + parson_free(new_value); + return NULL; + } + return new_value; +} + +JSON_VALUE * JsonNewArray(void) { + JSON_VALUE *new_value = (JSON_VALUE*)parson_malloc(sizeof(JSON_VALUE)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSON_TYPE_ARRAY; + new_value->value.array = json_array_init(new_value); + if (!new_value->value.array) { + parson_free(new_value); + return NULL; + } + return new_value; +} + +JSON_VALUE * JsonNewStr(char *string) { + char *copy = NULL; + JSON_VALUE *value; + UINT string_len = 0; + if (string == NULL) { + return NULL; + } + string_len = StrLen(string); + if (!is_valid_utf8(string, string_len)) { + return NULL; + } + copy = parson_strndup(string, string_len); + if (copy == NULL) { + return NULL; + } + value = json_value_init_string_no_copy(copy); + if (value == NULL) { + parson_free(copy); + } + return value; +} + +JSON_VALUE * JsonNewNumber(UINT64 number) { + JSON_VALUE *new_value = NULL; + new_value = (JSON_VALUE*)parson_malloc(sizeof(JSON_VALUE)); + if (new_value == NULL) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSON_TYPE_NUMBER; + new_value->value.number = number; + return new_value; +} + +JSON_VALUE * JsonNewBool(int boolean) { + JSON_VALUE *new_value = (JSON_VALUE*)parson_malloc(sizeof(JSON_VALUE)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSON_TYPE_BOOL; + new_value->value.boolean = boolean ? 1 : 0; + return new_value; +} + +JSON_VALUE * JsonNewNull(void) { + JSON_VALUE *new_value = (JSON_VALUE*)parson_malloc(sizeof(JSON_VALUE)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSON_TYPE_NULL; + return new_value; +} + +JSON_VALUE * JsonDeepCopy(JSON_VALUE *value) { + UINT i = 0; + JSON_VALUE *return_value = NULL, *temp_value_copy = NULL, *temp_value = NULL; + char *temp_string = NULL, *temp_key = NULL; + char *temp_string_copy = NULL; + JSON_ARRAY *temp_array = NULL, *temp_array_copy = NULL; + JSON_OBJECT *temp_object = NULL, *temp_object_copy = NULL; + + switch (JsonValueGetType(value)) { + case JSON_TYPE_ARRAY: + temp_array = JsonValueGetArray(value); + return_value = JsonNewArray(); + if (return_value == NULL) { + return NULL; + } + temp_array_copy = JsonValueGetArray(return_value); + for (i = 0; i < JsonArrayGetCount(temp_array); i++) { + temp_value = JsonArrayGet(temp_array, i); + temp_value_copy = JsonDeepCopy(temp_value); + if (temp_value_copy == NULL) { + JsonFree(return_value); + return NULL; + } + if (json_array_add(temp_array_copy, temp_value_copy) == JSON_RET_ERROR) { + JsonFree(return_value); + JsonFree(temp_value_copy); + return NULL; + } + } + return return_value; + case JSON_TYPE_OBJECT: + temp_object = JsonValueGetObject(value); + return_value = JsonNewObject(); + if (return_value == NULL) { + return NULL; + } + temp_object_copy = JsonValueGetObject(return_value); + for (i = 0; i < JsonGetCount(temp_object); i++) { + temp_key = JsonGetName(temp_object, i); + temp_value = JsonGet(temp_object, temp_key); + temp_value_copy = JsonDeepCopy(temp_value); + if (temp_value_copy == NULL) { + JsonFree(return_value); + return NULL; + } + if (json_object_add(temp_object_copy, temp_key, temp_value_copy) == JSON_RET_ERROR) { + JsonFree(return_value); + JsonFree(temp_value_copy); + return NULL; + } + } + return return_value; + case JSON_TYPE_BOOL: + return JsonNewBool(JsonValueGetBool(value)); + case JSON_TYPE_NUMBER: + return JsonNewNumber(JsonValueGetNumber(value)); + case JSON_TYPE_STRING: + temp_string = JsonValueGetStr(value); + if (temp_string == NULL) { + return NULL; + } + temp_string_copy = parson_strdup(temp_string); + if (temp_string_copy == NULL) { + return NULL; + } + return_value = json_value_init_string_no_copy(temp_string_copy); + if (return_value == NULL) { + parson_free(temp_string_copy); + } + return return_value; + case JSON_TYPE_NULL: + return JsonNewNull(); + case JSON_TYPE_ERROR: + return NULL; + default: + return NULL; + } +} + +UINT JsonGetSerializationSize(JSON_VALUE *value) { + char num_buf[1100]; /* recursively allocating buffer on stack is a bad idea, so let's do it only once */ + int res = json_serialize_to_buffer_r(value, NULL, 0, 0, num_buf); + return res < 0 ? 0 : (UINT)(res + 1); +} + +UINT JsonSerializeToBuffer(JSON_VALUE *value, char *buf, UINT buf_size_in_bytes) { + int written = -1; + UINT needed_size_in_bytes = JsonGetSerializationSize(value); + if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) { + return JSON_RET_ERROR; + } + written = json_serialize_to_buffer_r(value, buf, 0, 0, NULL); + if (written < 0) { + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +char * JsonSerializeToString(JSON_VALUE *value) { + UINT serialization_result = JSON_RET_ERROR; + UINT buf_size_bytes = JsonGetSerializationSize(value); + char *buf = NULL; + if (buf_size_bytes == 0) { + return NULL; + } + buf = (char*)parson_malloc(buf_size_bytes); + if (buf == NULL) { + return NULL; + } + serialization_result = JsonSerializeToBuffer(value, buf, buf_size_bytes); + if (serialization_result == JSON_RET_ERROR) { + JsonFreeString(buf); + return NULL; + } + return buf; +} + +UINT JsonGetSerializationSizePretty(JSON_VALUE *value) { + char num_buf[1100]; /* recursively allocating buffer on stack is a bad idea, so let's do it only once */ + int res = json_serialize_to_buffer_r(value, NULL, 0, 1, num_buf); + return res < 0 ? 0 : (UINT)(res + 1); +} + +UINT JsonSerializeToBufferPretty(JSON_VALUE *value, char *buf, UINT buf_size_in_bytes) { + int written = -1; + UINT needed_size_in_bytes = JsonGetSerializationSizePretty(value); + if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) { + return JSON_RET_ERROR; + } + written = json_serialize_to_buffer_r(value, buf, 0, 1, NULL); + if (written < 0) { + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +JSON_VALUE *StrToJson(char *str) +{ + if (str == NULL) + { + return NULL; + } + + return JsonParseString(str); +} + +char *JsonToStr(JSON_VALUE *v) +{ + return JsonSerializeToStringPretty(v); +} +char * JsonSerializeToStringPretty(JSON_VALUE *value) { + UINT serialization_result = JSON_RET_ERROR; + UINT buf_size_bytes = JsonGetSerializationSizePretty(value); + char *buf = NULL; + if (buf_size_bytes == 0) { + return NULL; + } + buf = (char*)parson_malloc(buf_size_bytes); + if (buf == NULL) { + return NULL; + } + serialization_result = JsonSerializeToBufferPretty(value, buf, buf_size_bytes); + if (serialization_result == JSON_RET_ERROR) { + JsonFreeString(buf); + return NULL; + } + return buf; +} + +void JsonFreeString(char *string) { + parson_free(string); +} + +UINT JsonArrayDelete(JSON_ARRAY *array, UINT ix) { + UINT to_move_bytes = 0; + if (array == NULL || ix >= JsonArrayGetCount(array)) { + return JSON_RET_ERROR; + } + JsonFree(JsonArrayGet(array, ix)); + to_move_bytes = (JsonArrayGetCount(array) - 1 - ix) * sizeof(JSON_VALUE*); + memmove(array->items + ix, array->items + ix + 1, to_move_bytes); + array->count -= 1; + return JSON_RET_OK; +} + +UINT JsonArrayReplace(JSON_ARRAY *array, UINT ix, JSON_VALUE *value) { + if (array == NULL || value == NULL || value->parent != NULL || ix >= JsonArrayGetCount(array)) { + return JSON_RET_ERROR; + } + JsonFree(JsonArrayGet(array, ix)); + value->parent = JsonArrayGetWrappingValue(array); + array->items[ix] = value; + return JSON_RET_OK; +} + +UINT JsonArrayReplaceStr(JSON_ARRAY *array, UINT i, char* string) { + JSON_VALUE *value = JsonNewStr(string); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayReplace(array, i, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayReplaceNumber(JSON_ARRAY *array, UINT i, UINT64 number) { + JSON_VALUE *value = JsonNewNumber(number); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayReplace(array, i, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayReplaceBool(JSON_ARRAY *array, UINT i, int boolean) { + JSON_VALUE *value = JsonNewBool(boolean); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayReplace(array, i, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayReplaceNull(JSON_ARRAY *array, UINT i) { + JSON_VALUE *value = JsonNewNull(); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayReplace(array, i, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayDeleteAll(JSON_ARRAY *array) { + UINT i = 0; + if (array == NULL) { + return JSON_RET_ERROR; + } + for (i = 0; i < JsonArrayGetCount(array); i++) { + JsonFree(JsonArrayGet(array, i)); + } + array->count = 0; + return JSON_RET_OK; +} + +UINT JsonArrayAdd(JSON_ARRAY *array, JSON_VALUE *value) { + if (array == NULL || value == NULL || value->parent != NULL) { + return JSON_RET_ERROR; + } + return json_array_add(array, value); +} + +UINT JsonArrayAddStr(JSON_ARRAY *array, char *string) { + JSON_VALUE *value = JsonNewStr(string); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayAdd(array, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayAddUniStr(JSON_ARRAY *array, wchar_t *string) +{ + UINT ret; + char *utf8 = CopyUniToUtf(string); + + ret = JsonArrayAddStr(array, utf8); + + Free(utf8); + return ret; +} + +UINT JsonArrayAddNumber(JSON_ARRAY *array, UINT64 number) { + JSON_VALUE *value = JsonNewNumber(number); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayAdd(array, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayAddData(JSON_ARRAY *array, void *data, UINT size) +{ + UINT ret; + char *b64 = ZeroMalloc(size * 4 + 32); + B64_Encode(b64, data, size); + + ret = JsonArrayAddStr(array, b64); + + Free(b64); + return ret; +} + +UINT JsonArrayAddBool(JSON_ARRAY *array, int boolean) { + JSON_VALUE *value = JsonNewBool(boolean); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayAdd(array, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonArrayAddNull(JSON_ARRAY *array) { + JSON_VALUE *value = JsonNewNull(); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonArrayAdd(array, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonSet(JSON_OBJECT *object, char *name, JSON_VALUE *value) { + UINT i = 0; + JSON_VALUE *old_value; + if (object == NULL || name == NULL || value == NULL || value->parent != NULL) { + return JSON_RET_ERROR; + } + old_value = JsonGet(object, name); + if (old_value != NULL) { /* free and overwrite old value */ + JsonFree(old_value); + for (i = 0; i < JsonGetCount(object); i++) { + if (strcmp(object->names[i], name) == 0) { + value->parent = JsonGetWrappingValue(object); + object->values[i] = value; + return JSON_RET_OK; + } + } + } + /* add new key value pair */ + return json_object_add(object, name, value); +} + +UINT JsonSetData(JSON_OBJECT *object, char *name, void *data, UINT size) +{ + UINT ret; + char *b64 = ZeroMalloc(size * 4 + 32); + B64_Encode(b64, data, size); + + ret = JsonSetStr(object, name, b64); + + Free(b64); + return ret; +} + +UINT JsonSetStr(JSON_OBJECT *object, char *name, char *string) { + return JsonSet(object, name, JsonNewStr(string)); +} + +UINT JsonSetUniStr(JSON_OBJECT *object, char *name, wchar_t *string) +{ + UINT ret; + char *utf8 = CopyUniToUtf(string); + + ret = JsonSetStr(object, name, utf8); + + Free(utf8); + return ret; +} + +UINT JsonSetNumber(JSON_OBJECT *object, char *name, UINT64 number) { + return JsonSet(object, name, JsonNewNumber(number)); +} + +UINT JsonSetBool(JSON_OBJECT *object, char *name, int boolean) { + return JsonSet(object, name, JsonNewBool(boolean)); +} + +UINT JsonSetNull(JSON_OBJECT *object, char *name) { + return JsonSet(object, name, JsonNewNull()); +} + +UINT JsonDotSet(JSON_OBJECT *object, char *name, JSON_VALUE *value) { + char *dot_pos = NULL; + char *current_name = NULL; + JSON_OBJECT *temp_obj = NULL; + JSON_VALUE *new_value = NULL; + if (object == NULL || name == NULL || value == NULL) { + return JSON_RET_ERROR; + } + dot_pos = strchr(name, '.'); + if (dot_pos == NULL) { + return JsonSet(object, name, value); + } + else { + current_name = parson_strndup(name, (UINT)(dot_pos - name)); + temp_obj = JsonGetObj(object, current_name); + if (temp_obj == NULL) { + new_value = JsonNewObject(); + if (new_value == NULL) { + parson_free(current_name); + return JSON_RET_ERROR; + } + if (json_object_add(object, current_name, new_value) == JSON_RET_ERROR) { + JsonFree(new_value); + parson_free(current_name); + return JSON_RET_ERROR; + } + temp_obj = JsonGetObj(object, current_name); + } + parson_free(current_name); + return JsonDotSet(temp_obj, dot_pos + 1, value); + } +} + +UINT JsonDotSetStr(JSON_OBJECT *object, char *name, char *string) { + JSON_VALUE *value = JsonNewStr(string); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonDotSet(object, name, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonDotSetNumber(JSON_OBJECT *object, char *name, UINT64 number) { + JSON_VALUE *value = JsonNewNumber(number); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonDotSet(object, name, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonDotSetBool(JSON_OBJECT *object, char *name, int boolean) { + JSON_VALUE *value = JsonNewBool(boolean); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonDotSet(object, name, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonDotSetNull(JSON_OBJECT *object, char *name) { + JSON_VALUE *value = JsonNewNull(); + if (value == NULL) { + return JSON_RET_ERROR; + } + if (JsonDotSet(object, name, value) == JSON_RET_ERROR) { + JsonFree(value); + return JSON_RET_ERROR; + } + return JSON_RET_OK; +} + +UINT JsonDelete(JSON_OBJECT *object, char *name) { + UINT i = 0, last_item_index = 0; + if (object == NULL || JsonGet(object, name) == NULL) { + return JSON_RET_ERROR; + } + last_item_index = JsonGetCount(object) - 1; + for (i = 0; i < JsonGetCount(object); i++) { + if (strcmp(object->names[i], name) == 0) { + parson_free(object->names[i]); + JsonFree(object->values[i]); + if (i != last_item_index) { /* Replace key value pair with one from the end */ + object->names[i] = object->names[last_item_index]; + object->values[i] = object->values[last_item_index]; + } + object->count -= 1; + return JSON_RET_OK; + } + } + return JSON_RET_ERROR; /* No execution path should end here */ +} + +UINT JsonDotDelete(JSON_OBJECT *object, char *name) { + char *dot_pos = strchr(name, '.'); + char *current_name = NULL; + JSON_OBJECT *temp_obj = NULL; + if (dot_pos == NULL) { + return JsonDelete(object, name); + } + else { + current_name = parson_strndup(name, (UINT)(dot_pos - name)); + temp_obj = JsonGetObj(object, current_name); + parson_free(current_name); + if (temp_obj == NULL) { + return JSON_RET_ERROR; + } + return JsonDotDelete(temp_obj, dot_pos + 1); + } +} + +UINT JsonDeleteAll(JSON_OBJECT *object) { + UINT i = 0; + if (object == NULL) { + return JSON_RET_ERROR; + } + for (i = 0; i < JsonGetCount(object); i++) { + parson_free(object->names[i]); + JsonFree(object->values[i]); + } + object->count = 0; + return JSON_RET_OK; +} + +UINT JsonValidate(JSON_VALUE *schema, JSON_VALUE *value) { + JSON_VALUE *temp_schema_value = NULL, *temp_value = NULL; + JSON_ARRAY *schema_array = NULL, *value_array = NULL; + JSON_OBJECT *schema_object = NULL, *value_object = NULL; + UINT schema_type = JSON_TYPE_ERROR, value_type = JSON_TYPE_ERROR; + char *key = NULL; + UINT i = 0, count = 0; + if (schema == NULL || value == NULL) { + return JSON_RET_ERROR; + } + schema_type = JsonValueGetType(schema); + value_type = JsonValueGetType(value); + if (schema_type != value_type && schema_type != JSON_TYPE_NULL) { /* null represents all values */ + return JSON_RET_ERROR; + } + switch (schema_type) { + case JSON_TYPE_ARRAY: + schema_array = JsonValueGetArray(schema); + value_array = JsonValueGetArray(value); + count = JsonArrayGetCount(schema_array); + if (count == 0) { + return JSON_RET_OK; /* Empty array allows all types */ + } + /* Get first value from array, rest is ignored */ + temp_schema_value = JsonArrayGet(schema_array, 0); + for (i = 0; i < JsonArrayGetCount(value_array); i++) { + temp_value = JsonArrayGet(value_array, i); + if (JsonValidate(temp_schema_value, temp_value) == JSON_RET_ERROR) { + return JSON_RET_ERROR; + } + } + return JSON_RET_OK; + case JSON_TYPE_OBJECT: + schema_object = JsonValueGetObject(schema); + value_object = JsonValueGetObject(value); + count = JsonGetCount(schema_object); + if (count == 0) { + return JSON_RET_OK; /* Empty object allows all objects */ + } + else if (JsonGetCount(value_object) < count) { + return JSON_RET_ERROR; /* Tested object mustn't have less name-value pairs than schema */ + } + for (i = 0; i < count; i++) { + key = JsonGetName(schema_object, i); + temp_schema_value = JsonGet(schema_object, key); + temp_value = JsonGet(value_object, key); + if (temp_value == NULL) { + return JSON_RET_ERROR; + } + if (JsonValidate(temp_schema_value, temp_value) == JSON_RET_ERROR) { + return JSON_RET_ERROR; + } + } + return JSON_RET_OK; + case JSON_TYPE_STRING: case JSON_TYPE_NUMBER: case JSON_TYPE_BOOL: case JSON_TYPE_NULL: + return JSON_RET_OK; /* equality already tested before switch */ + case JSON_TYPE_ERROR: default: + return JSON_RET_ERROR; + } +} + +int JsonCmp(JSON_VALUE *a, JSON_VALUE *b) { + JSON_OBJECT *a_object = NULL, *b_object = NULL; + JSON_ARRAY *a_array = NULL, *b_array = NULL; + char *a_string = NULL, *b_string = NULL; + char *key = NULL; + UINT a_count = 0, b_count = 0, i = 0; + UINT a_type, b_type; + UINT64 a_num, b_num; + a_type = JsonValueGetType(a); + b_type = JsonValueGetType(b); + if (a_type != b_type) { + return 0; + } + switch (a_type) { + case JSON_TYPE_ARRAY: + a_array = JsonValueGetArray(a); + b_array = JsonValueGetArray(b); + a_count = JsonArrayGetCount(a_array); + b_count = JsonArrayGetCount(b_array); + if (a_count != b_count) { + return 0; + } + for (i = 0; i < a_count; i++) { + if (!JsonCmp(JsonArrayGet(a_array, i), + JsonArrayGet(b_array, i))) { + return 0; + } + } + return 1; + case JSON_TYPE_OBJECT: + a_object = JsonValueGetObject(a); + b_object = JsonValueGetObject(b); + a_count = JsonGetCount(a_object); + b_count = JsonGetCount(b_object); + if (a_count != b_count) { + return 0; + } + for (i = 0; i < a_count; i++) { + key = JsonGetName(a_object, i); + if (!JsonCmp(JsonGet(a_object, key), + JsonGet(b_object, key))) { + return 0; + } + } + return 1; + case JSON_TYPE_STRING: + a_string = JsonValueGetStr(a); + b_string = JsonValueGetStr(b); + if (a_string == NULL || b_string == NULL) { + return 0; /* shouldn't happen */ + } + return strcmp(a_string, b_string) == 0; + case JSON_TYPE_BOOL: + return JsonValueGetBool(a) == JsonValueGetBool(b); + case JSON_TYPE_NUMBER: + a_num = JsonValueGetNumber(a); + b_num = JsonValueGetNumber(b); + return a_num == b_num; + case JSON_TYPE_ERROR: + return 1; + case JSON_TYPE_NULL: + return 1; + default: + return 1; + } +} + +UINT JsonType(JSON_VALUE *value) { + return JsonValueGetType(value); +} + +JSON_OBJECT * JsonObject(JSON_VALUE *value) { + return JsonValueGetObject(value); +} + +JSON_ARRAY * JsonArray(JSON_VALUE *value) { + return JsonValueGetArray(value); +} + +char * JsonString(JSON_VALUE *value) { + return JsonValueGetStr(value); +} + +UINT64 JsonNumber(JSON_VALUE *value) { + return JsonValueGetNumber(value); +} + +int JsonBool(JSON_VALUE *value) { + return JsonValueGetBool(value); +} + +void JsonSetAllocationFunctions(JSON_Malloc_Function malloc_fun, JSON_Free_Function free_fun) { + parson_malloc = malloc_fun; + parson_free = free_fun; +} + +// SYSTEMTIME to JSON string +void SystemTimeToJsonStr(char *dst, UINT size, SYSTEMTIME *t) +{ + if (dst == NULL) + { + return; + } + + if (t == NULL) + { + ClearStr(dst, size); + } + else + { + GetDateTimeStrRFC3339(dst, size, t, 0); + } +} + +// UINT64 System Time to JSON string +void SystemTime64ToJsonStr(char *dst, UINT size, UINT64 t) +{ + SYSTEMTIME st; + if (dst == NULL) + { + return; + } + + if (t == 0) + { + ClearStr(dst, size); + } + + UINT64ToSystem(&st, t); + + SystemTimeToJsonStr(dst, size, &st); +} + + + + + diff --git a/src/Mayaqua/Str.h b/src/Mayaqua/Str.h index 7a554706..6ff9051c 100644 --- a/src/Mayaqua/Str.h +++ b/src/Mayaqua/Str.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Str.h @@ -155,6 +49,7 @@ bool ToBool(char *str); int ToInti(char *str); void ToStr(char *str, UINT i); void TrimCrlf(char *str); +void TrimQuotes(char *str); void Trim(char *str); void TrimRight(char *str); void TrimLeft(char *str); @@ -176,6 +71,7 @@ void EnPrintableAsciiStr(char *str, char replace); bool IsSafeChar(char c); bool IsSafeStr(char *str); void EnSafeStr(char *str, char replace); +void EnSafeHttpHeaderValueStr(char *str, char replace); void TruncateCharFromStr(char *str, char replace); char *CopyStr(char *str); void BinToStr(char *str, UINT str_size, void *data, UINT data_size); @@ -183,7 +79,9 @@ void BinToStrW(wchar_t *str, UINT str_size, void *data, UINT data_size); void PrintBin(void *data, UINT size); bool StartWith(char *str, char *key); bool EndWith(char *str, char *key); +bool TrimEndWith(char *dst, UINT dst_size, char *str, char *key); UINT64 ToInt64(char *str); +UINT64 Json_ToInt64Ex(char *str, char **endptr, bool *error); void ToStr64(char *str, UINT64 value); TOKEN_LIST *ParseCmdLine(char *str); TOKEN_LIST *CopyToken(TOKEN_LIST *src); @@ -232,6 +130,259 @@ LIST *StrToIntList(char *str, bool sorted); void NormalizeIntListStr(char *dst, UINT dst_size, char *src, bool sorted, char *separate_str); void ClearStr(char *str, UINT str_size); void SetStrCaseAccordingToBits(char *str, UINT bits); +char *UrlDecode(char *url_str); + + +// *** JSON strings support +// Original source code from Parson ( http://kgabis.github.com/parson/ ) +// Modified by dnobori +/* +Parson ( http://kgabis.github.com/parson/ ) +Copyright (c) 2012 - 2017 Krzysztof Gabis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + + +/* Type definitions */ +typedef union JSON_VALUE_UNION { + char *string; + UINT64 number; + JSON_OBJECT *object; + JSON_ARRAY *array; + int boolean; + int null; +} JSON_VALUE_UNION; + +struct JSON_VALUE { + JSON_VALUE *parent; + UINT type; + JSON_VALUE_UNION value; +}; + +struct JSON_OBJECT { + JSON_VALUE *wrapping_value; + char **names; + JSON_VALUE **values; + UINT count; + UINT capacity; +}; + +struct JSON_ARRAY { + JSON_VALUE *wrapping_value; + JSON_VALUE **items; + UINT count; + UINT capacity; +}; + + +enum JSON_TYPES { + JSON_TYPE_ERROR = -1, + JSON_TYPE_NULL = 1, + JSON_TYPE_STRING = 2, + JSON_TYPE_NUMBER = 3, + JSON_TYPE_OBJECT = 4, + JSON_TYPE_ARRAY = 5, + JSON_TYPE_BOOL = 6 +}; +typedef unsigned int UINT; + +enum JSON_RETS { + JSON_RET_OK = 0, + JSON_RET_ERROR = -1 +}; + +typedef void * (*JSON_Malloc_Function)(UINT); +typedef void(*JSON_Free_Function)(void *); + +/* Call only once, before calling any other function from parson API. If not called, malloc and free +from stdlib will be used for all allocations */ +void JsonSetAllocationFunctions(JSON_Malloc_Function malloc_fun, JSON_Free_Function free_fun); + +/* Parses first JSON value in a string, returns NULL in case of error */ +JSON_VALUE * JsonParseString(char *string); + +/* Parses first JSON value in a string and ignores comments (/ * * / and //), +returns NULL in case of error */ +JSON_VALUE * JsonParseStringWithComments(char *string); + +/* Serialization */ +UINT JsonGetSerializationSize(JSON_VALUE *value); /* returns 0 on fail */ +UINT JsonSerializeToBuffer(JSON_VALUE *value, char *buf, UINT buf_size_in_bytes); +char * JsonSerializeToString(JSON_VALUE *value); + +/* Pretty serialization */ +UINT JsonGetSerializationSizePretty(JSON_VALUE *value); /* returns 0 on fail */ +UINT JsonSerializeToBufferPretty(JSON_VALUE *value, char *buf, UINT buf_size_in_bytes); +char * JsonSerializeToStringPretty(JSON_VALUE *value); +char *JsonToStr(JSON_VALUE *v); + +void JsonFreeString(char *string); /* frees string from json_serialize_to_string and json_serialize_to_string_pretty */ + + /* Comparing */ +int JsonCmp(JSON_VALUE *a, JSON_VALUE *b); + +/* Validation +This is *NOT* JSON Schema. It validates json by checking if object have identically +named fields with matching types. +For example schema {"name":"", "age":0} will validate +{"name":"Joe", "age":25} and {"name":"Joe", "age":25, "gender":"m"}, +but not {"name":"Joe"} or {"name":"Joe", "age":"Cucumber"}. +In case of arrays, only first value in schema is checked against all values in tested array. +Empty objects ({}) validate all objects, empty arrays ([]) validate all arrays, +null validates values of every type. +*/ +UINT JsonValidate(JSON_VALUE *schema, JSON_VALUE *value); + +/* +* JSON Object +*/ +JSON_VALUE * JsonGet(JSON_OBJECT *object, char *name); +char * JsonGetStr(JSON_OBJECT *object, char *name); +JSON_OBJECT * JsonGetObj(JSON_OBJECT *object, char *name); +JSON_ARRAY * JsonGetArray(JSON_OBJECT *object, char *name); +UINT64 JsonGetNumber(JSON_OBJECT *object, char *name); /* returns 0 on fail */ +bool JsonGetBool(JSON_OBJECT *object, char *name); /* returns 0 on fail */ + + /* dotget functions enable addressing values with dot notation in nested objects, + just like in structs or c++/java/c# objects (e.g. objectA.objectB.value). + Because valid names in JSON can contain dots, some values may be inaccessible + this way. */ +JSON_VALUE * JsonDotGet(JSON_OBJECT *object, char *name); +char * JsonDotGetStr(JSON_OBJECT *object, char *name); +JSON_OBJECT * JsonDotGetObj(JSON_OBJECT *object, char *name); +JSON_ARRAY * JsonDotGetArray(JSON_OBJECT *object, char *name); +UINT64 JsonDotGetNumber(JSON_OBJECT *object, char *name); /* returns 0 on fail */ +bool JsonDotGetBool(JSON_OBJECT *object, char *name); /* returns -1 on fail */ + + /* Functions to get available names */ +UINT JsonGetCount(JSON_OBJECT *object); +char * JsonGetName(JSON_OBJECT *object, UINT index); +JSON_VALUE * JsonGetValueAt(JSON_OBJECT *object, UINT index); +JSON_VALUE * JsonGetWrappingValue(JSON_OBJECT *object); + +/* Functions to check if object has a value with a specific name. Returned value is 1 if object has +* a value and 0 if it doesn't. dothas functions behave exactly like dotget functions. */ +int JsonIsExists(JSON_OBJECT *object, char *name); +int JsonIsExistsWithValueType(JSON_OBJECT *object, char *name, UINT type); + +int JsonDotIsExists(JSON_OBJECT *object, char *name); +int JsonDotIsExistsWithValueType(JSON_OBJECT *object, char *name, UINT type); + +/* Creates new name-value pair or frees and replaces old value with a new one. +* json_object_set_value does not copy passed value so it shouldn't be freed afterwards. */ +UINT JsonSet(JSON_OBJECT *object, char *name, JSON_VALUE *value); +UINT JsonSetStr(JSON_OBJECT *object, char *name, char *string); +UINT JsonSetUniStr(JSON_OBJECT *object, char *name, wchar_t *string); +UINT JsonSetNumber(JSON_OBJECT *object, char *name, UINT64 number); +UINT JsonSetBool(JSON_OBJECT *object, char *name, int boolean); +UINT JsonSetNull(JSON_OBJECT *object, char *name); +UINT JsonSetData(JSON_OBJECT *object, char *name, void *data, UINT size); + +/* Works like dotget functions, but creates whole hierarchy if necessary. +* json_object_dotset_value does not copy passed value so it shouldn't be freed afterwards. */ +UINT JsonDotSet(JSON_OBJECT *object, char *name, JSON_VALUE *value); +UINT JsonDotSetStr(JSON_OBJECT *object, char *name, char *string); +UINT JsonDotSetNumber(JSON_OBJECT *object, char *name, UINT64 number); +UINT JsonDotSetBool(JSON_OBJECT *object, char *name, int boolean); +UINT JsonDotSetNull(JSON_OBJECT *object, char *name); + +/* Frees and removes name-value pair */ +UINT JsonDelete(JSON_OBJECT *object, char *name); + +/* Works like dotget function, but removes name-value pair only on exact match. */ +UINT JsonDotDelete(JSON_OBJECT *object, char *key); + +/* Removes all name-value pairs in object */ +UINT JsonDeleteAll(JSON_OBJECT *object); + +/* +*JSON Array +*/ +JSON_VALUE * JsonArrayGet(JSON_ARRAY *array, UINT index); +char * JsonArrayGetStr(JSON_ARRAY *array, UINT index); +JSON_OBJECT * JsonArrayGetObj(JSON_ARRAY *array, UINT index); +JSON_ARRAY * JsonArrayGetArray(JSON_ARRAY *array, UINT index); +UINT64 JsonArrayGetNumber(JSON_ARRAY *array, UINT index); /* returns 0 on fail */ +bool JsonArrayGetBool(JSON_ARRAY *array, UINT index); /* returns 0 on fail */ +UINT JsonArrayGetCount(JSON_ARRAY *array); +JSON_VALUE * JsonArrayGetWrappingValue(JSON_ARRAY *array); + +/* Frees and removes value at given index, does nothing and returns JSONFailure if index doesn't exist. +* Order of values in array may change during execution. */ +UINT JsonArrayDelete(JSON_ARRAY *array, UINT i); + +/* Frees and removes from array value at given index and replaces it with given one. +* Does nothing and returns JSONFailure if index doesn't exist. +* json_array_replace_value does not copy passed value so it shouldn't be freed afterwards. */ +UINT JsonArrayReplace(JSON_ARRAY *array, UINT i, JSON_VALUE *value); +UINT JsonArrayReplaceStr(JSON_ARRAY *array, UINT i, char* string); +UINT JsonArrayReplaceNumber(JSON_ARRAY *array, UINT i, UINT64 number); +UINT JsonArrayReplaceBool(JSON_ARRAY *array, UINT i, int boolean); +UINT JsonArrayReplaceNull(JSON_ARRAY *array, UINT i); + +/* Frees and removes all values from array */ +UINT JsonArrayDeleteAll(JSON_ARRAY *array); + +/* Appends new value at the end of array. +* json_array_append_value does not copy passed value so it shouldn't be freed afterwards. */ +UINT JsonArrayAdd(JSON_ARRAY *array, JSON_VALUE *value); +UINT JsonArrayAddStr(JSON_ARRAY *array, char *string); +UINT JsonArrayAddUniStr(JSON_ARRAY *array, wchar_t *string); +UINT JsonArrayAddNumber(JSON_ARRAY *array, UINT64 number); +UINT JsonArrayAddData(JSON_ARRAY *array, void *data, UINT size); +UINT JsonArrayAddBool(JSON_ARRAY *array, int boolean); +UINT JsonArrayAddNull(JSON_ARRAY *array); + + +/* +*JSON Value +*/ +JSON_VALUE * JsonNewObject(void); +JSON_VALUE * JsonNewArray(void); +JSON_VALUE * JsonNewStr(char *string); /* copies passed string */ +JSON_VALUE * JsonNewNumber(UINT64 number); +JSON_VALUE * JsonNewBool(int boolean); +JSON_VALUE * JsonNewNull(void); +JSON_VALUE * JsonDeepCopy(JSON_VALUE *value); +void JsonFree(JSON_VALUE *value); + +UINT JsonValueGetType(JSON_VALUE *value); +JSON_OBJECT * JsonValueGetObject(JSON_VALUE *value); +JSON_ARRAY * JsonValueGetArray(JSON_VALUE *value); +char * JsonValueGetStr(JSON_VALUE *value); +UINT64 JsonValueGetNumber(JSON_VALUE *value); +bool JsonValueGetBool(JSON_VALUE *value); +JSON_VALUE * JsonValueGetParent(JSON_VALUE *value); + +/* Same as above, but shorter */ +UINT JsonType(JSON_VALUE *value); +JSON_OBJECT * JsonObject(JSON_VALUE *value); +JSON_ARRAY * JsonArray(JSON_VALUE *value); +char * JsonString(JSON_VALUE *value); +UINT64 JsonNumber(JSON_VALUE *value); +int JsonBool(JSON_VALUE *value); + +void SystemTimeToJsonStr(char *dst, UINT size, SYSTEMTIME *t); +void SystemTime64ToJsonStr(char *dst, UINT size, UINT64 t); + +JSON_VALUE *StrToJson(char *str); #endif // STR_H diff --git a/src/Mayaqua/Table.c b/src/Mayaqua/Table.c index e09b1e94..084b04d7 100644 --- a/src/Mayaqua/Table.c +++ b/src/Mayaqua/Table.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Table.c @@ -945,6 +839,8 @@ TABLE *ParseTableLine(char *line, char *prefix, UINT prefix_size, LIST *replace_ UniReplaceStrEx(tmp, tmp_size, tmp, (wchar_t *)r->name, r->unistr, false); } + Free(unistr); + unistr = CopyUniStr(tmp); Free(tmp); @@ -1069,8 +965,6 @@ void FreeTable() return; } - TrackingDisable(); - num = LIST_NUM(TableList); tables = ToArray(TableList); for (i = 0;i < num;i++) @@ -1086,8 +980,6 @@ void FreeTable() Free(tables); Zero(old_table_name, sizeof(old_table_name)); - - TrackingEnable(); } // Read a string table from the buffer @@ -1477,8 +1369,6 @@ bool LoadTableW(wchar_t *filename) Zero(replace_name, sizeof(replace_name)); - TrackingDisable(); - b = ReadDump("@table_name.txt"); if (b != NULL) { @@ -1498,9 +1388,5 @@ bool LoadTableW(wchar_t *filename) ret = LoadTableMain(filename); - TrackingEnable(); - return ret; } - - diff --git a/src/Mayaqua/Table.h b/src/Mayaqua/Table.h index 238b4ad9..17bf569f 100644 --- a/src/Mayaqua/Table.h +++ b/src/Mayaqua/Table.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Table.h diff --git a/src/Mayaqua/TcpIp.c b/src/Mayaqua/TcpIp.c index 5b3dfbf0..efdd96a0 100644 --- a/src/Mayaqua/TcpIp.c +++ b/src/Mayaqua/TcpIp.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // TcpIp.c @@ -999,7 +893,7 @@ BUF *BuildICMPv6NeighborSoliciation(IPV6_ADDR *src_ip, IPV6_ADDR *target_ip, UCH UCHAR IPv6GetNextHeaderFromQueue(QUEUE *q) { UINT *p; - UCHAR v; + UCHAR v = 0; // Validate arguments if (q == NULL) { @@ -1007,8 +901,11 @@ UCHAR IPv6GetNextHeaderFromQueue(QUEUE *q) } p = (UINT *)GetNext(q); - v = (UCHAR)(*p); - Free(p); + if (p != NULL) + { + v = (UCHAR)(*p); + Free(p); + } return v; } diff --git a/src/Mayaqua/TcpIp.h b/src/Mayaqua/TcpIp.h index 27c11965..8ff4f385 100644 --- a/src/Mayaqua/TcpIp.h +++ b/src/Mayaqua/TcpIp.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // TcpIp.h diff --git a/src/Mayaqua/Tick64.c b/src/Mayaqua/Tick64.c index 9ec568ae..71cecace 100644 --- a/src/Mayaqua/Tick64.c +++ b/src/Mayaqua/Tick64.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Tick64.c diff --git a/src/Mayaqua/Tick64.h b/src/Mayaqua/Tick64.h index 58e6059f..e212f8bf 100644 --- a/src/Mayaqua/Tick64.h +++ b/src/Mayaqua/Tick64.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Tick64.h diff --git a/src/Mayaqua/Tracking.c b/src/Mayaqua/Tracking.c index 3dda6c0a..884c10b2 100644 --- a/src/Mayaqua/Tracking.c +++ b/src/Mayaqua/Tracking.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Tracking.c @@ -127,27 +21,14 @@ static LOCK *obj_lock; static LOCK *obj_id_lock; static UINT obj_id; static LOCK *cs_lock; -static bool disable_tracking = false; static TRACKING_LIST **hashlist; static bool do_not_get_callstack; -// Enable the tracking -void TrackingEnable() -{ - disable_tracking = false; -} - -// Disable the tracking -void TrackingDisable() -{ - disable_tracking = true; -} - // Get whether the tracking is enabled bool IsTrackingEnabled() { - return !disable_tracking; + return (IsDebug() || IsMemCheck()) && kernel_status_inited; } // Memory debug menu @@ -157,7 +38,15 @@ void MemoryDebugMenu() TOKEN_LIST *t; char *cmd; Print("Mayaqua Kernel Memory Debug Tools\n" - "Copyright (c) SoftEther Corporation. All Rights Reserved.\n\n"); + "Copyright (c) SoftEther VPN Project. All Rights Reserved.\n\n"); + +#ifndef OS_WIN32 + Print("Unfortunately The call stack is not recorded on non-Windows systems\n"); + Print("since UnixGetCallStack() and UnixGetCallStackSymbolInfo() is not implemented.\n"); + Print("Therefore please use valgrind or other memory leak check tools\n"); + Print("to get the actual call stacks of memory leak causes.\n\n"); +#endif // OS_WIN32 + g_memcheck = false; while (true) { @@ -474,14 +363,9 @@ void TrackNewObj(UINT64 addr, char *name, UINT size) return; } - if (IsMemCheck() == false) - { - // Don't track in the release mode - return; - } - - if (disable_tracking) + if ((IsTrackingEnabled() && IsMemCheck()) == false) { + // Don't track in detail if the memory check option is not specified return; } @@ -520,14 +404,9 @@ void TrackDeleteObj(UINT64 addr) return; } - if (IsMemCheck() == false) - { - // Don't track in the release mode - return; - } - - if (disable_tracking) + if ((IsTrackingEnabled() && IsMemCheck()) == false) { + // Don't track in detail if the memory check option is not specified return; } @@ -537,11 +416,7 @@ void TrackDeleteObj(UINT64 addr) if (o == NULL) { UnlockTrackingList(); - - if (IsDebug()) - { - printf("TrackDeleteObj: 0x%x is not Object!!\n", (void *)addr); - } + Debug("TrackDeleteObj(): 0x%x not found in tracking list!\n", addr); return; } DeleteTrackingList(o, true); @@ -559,14 +434,9 @@ void TrackChangeObjSize(UINT64 addr, UINT size, UINT64 new_addr) return; } - if (IsMemCheck() == false) - { - // Don't track in the release mode - return; - } - - if (disable_tracking) + if ((IsTrackingEnabled() && IsMemCheck()) == false) { + // Don't track in detail if the memory check option is not specified return; } diff --git a/src/Mayaqua/Tracking.h b/src/Mayaqua/Tracking.h index 8706c9fe..75798164 100644 --- a/src/Mayaqua/Tracking.h +++ b/src/Mayaqua/Tracking.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Tracking.h @@ -188,10 +82,6 @@ void PrintObjectList(TRACKING_OBJECT *o); void PrintObjectInfo(TRACKING_OBJECT *o); void DebugPrintObjectInfo(UINT id); -void TrackingEnable(); -void TrackingDisable(); bool IsTrackingEnabled(); #endif // TRACKING_H - - diff --git a/src/Mayaqua/TunTap.h b/src/Mayaqua/TunTap.h index 453572f5..12f076c0 100644 --- a/src/Mayaqua/TunTap.h +++ b/src/Mayaqua/TunTap.h @@ -1,102 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// TunTap.h -// Header file of the TUN / TAP device driver -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. #ifndef TUNTAP_H @@ -106,23 +9,11 @@ // ----------------------------------------------------------------- // Tap header for Linux +// This header definitions are from Universal TUN/TAP device driver +// written by Maxim Krasnyansky . +// This definitions includes only types and constants definitions, +// and it does not include any programs. // ----------------------------------------------------------------- -/* - * Universal TUN/TAP device driver. - * Copyright (C) 1999-2000 Maxim Krasnyansky - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * $Id: if_tun.h,v 1.2 2001/10/31 15:27:57 arjanv Exp $ - */ #ifndef __IF_TUN_H #define __IF_TUN_H @@ -172,26 +63,11 @@ struct tun_pi { // ----------------------------------------------------------------- // Tap header for Solaris +// This header definitions are from Multithreaded STREAMS tun pseudo device driver +// written by Maxim Krasnyansky . +// This definitions includes only types and constants definitions, +// and it does not include any programs. // ----------------------------------------------------------------- -/* - * Universal TUN/TAP device driver. - * - * Multithreaded STREAMS tun pseudo device driver. - * - * Copyright (C) 1999-2000 Maxim Krasnyansky - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * $Id: if_tun.h,v 1.4 2000/05/01 12:23:27 maxk Exp $ - */ #ifndef _SYS_IF_TUN_H #define _SYS_IF_TUN_H diff --git a/src/Mayaqua/Unix.c b/src/Mayaqua/Unix.c index 92e835b6..ca766a23 100755 --- a/src/Mayaqua/Unix.c +++ b/src/Mayaqua/Unix.c @@ -1,114 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Authors: Daiyuu Nobori -// Contributors: -// - Melvyn (https://github.com/yaurthek) -// - nattoheaven (https://github.com/nattoheaven) -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Unix.c @@ -125,6 +16,7 @@ #include #include #include +#include #include #ifdef UNIX_MACOS @@ -906,6 +798,8 @@ void *UnixNewSingleInstance(char *instance_name) if (fcntl(fd, F_SETLK, &lock) == -1) { + close(fd); + (void)remove(name); return NULL; } else @@ -1055,6 +949,8 @@ void UnixAlert(char *msg, char *caption) // Get the information of the current OS void UnixGetOsInfo(OS_INFO *info) { + struct utsname unix_info; + // Validate arguments if (info == NULL) { @@ -1077,68 +973,75 @@ void UnixGetOsInfo(OS_INFO *info) info->OsType = OSTYPE_UNIX_UNKNOWN; #endif - info->OsServicePack = 0; + info->OsSystemName = CopyStr(OsTypeToStr(info->OsType)); + info->KernelName = CopyStr("UNIX"); - if (info->OsType != OSTYPE_LINUX) + if (uname(&unix_info) > -1) { - info->OsSystemName = CopyStr("UNIX"); - info->OsProductName = CopyStr("UNIX"); + info->OsProductName = CopyStr(unix_info.sysname); + info->OsVersion = CopyStr(unix_info.release); + info->KernelVersion = CopyStr(unix_info.version); } else { - info->OsSystemName = CopyStr("Linux"); - info->OsProductName = CopyStr("Linux"); - } + Debug("UnixGetOsInfo(): uname() failed with error: %s\n", strerror(errno)); - if (info->OsType == OSTYPE_LINUX) + info->OsProductName = CopyStr(OsTypeToStr(info->OsType)); + info->OsVersion = CopyStr("Unknown"); + info->KernelVersion = CopyStr("Unknown"); + } +#ifdef UNIX_LINUX { - // Get the distribution name on Linux - BUF *b; - b = ReadDump("/etc/redhat-release"); - if (b != NULL) + BUF *buffer = ReadDump("/etc/os-release"); + if (buffer == NULL) { - info->OsVersion = CfgReadNextLine(b); - info->OsVendorName = CopyStr("Red Hat, Inc."); - FreeBuf(b); + buffer = ReadDump("/usr/lib/os-release"); } - else + + if (buffer != NULL) { - b = ReadDump("/etc/turbolinux-release"); - if (b != NULL) + LIST *values = NewEntryList(buffer->Buf, "\n", "="); + + FreeBuf(buffer); + + if (EntryListHasKey(values, "NAME")) { - info->OsVersion = CfgReadNextLine(b); - info->OsVendorName = CopyStr("Turbolinux, Inc."); - FreeBuf(b); + char *str = EntryListStrValue(values, "NAME"); + TrimQuotes(str); + Free(info->OsProductName); + info->OsProductName = CopyStr(str); + } + + if (EntryListHasKey(values, "HOME_URL")) + { + char *str = EntryListStrValue(values, "HOME_URL"); + TrimQuotes(str); + info->OsVendorName = CopyStr(str); + } + + if (EntryListHasKey(values, "VERSION")) + { + char *str = EntryListStrValue(values, "VERSION"); + TrimQuotes(str); + Free(info->OsVersion); + info->OsVersion = CopyStr(str); } else { - info->OsVersion = CopyStr("Unknown Linux Version"); - info->OsVendorName = CopyStr("Unknown Vendor"); + // Debian testing/sid doesn't provide the version in /etc/os-release + buffer = ReadDump("/etc/debian_version"); + if (buffer != NULL) + { + Free(info->OsVersion); + info->OsVersion = CfgReadNextLine(buffer); + FreeBuf(buffer); + } } - } - info->KernelName = CopyStr("Linux Kernel"); - - b = ReadDump("/proc/sys/kernel/osrelease"); - if (b != NULL) - { - info->KernelVersion = CfgReadNextLine(b); - FreeBuf(b); - } - else - { - info->KernelVersion = CopyStr("Unknown Version"); + FreeEntryList(values); } } - else - { - // In other cases - Free(info->OsProductName); - info->OsProductName = CopyStr(OsTypeToStr(info->OsType)); - info->OsVersion = CopyStr("Unknown Version"); - info->KernelName = CopyStr(OsTypeToStr(info->OsType)); - info->KernelVersion = CopyStr("Unknown Version"); - } +#endif } // Examine whether the current OS is supported by the PacketiX VPN Kernel @@ -2754,7 +2657,10 @@ RESTART_PROCESS: else if (argc >= 3 && StrCmpi(argv[1], UNIX_SVC_ARG_START) == 0 && StrCmpi(argv[2], UNIX_SVC_ARG_FOREGROUND) == 0) { #ifdef DEBUG - InitMayaqua(true, true, argc, argv); + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, argc, argv); #else InitMayaqua(false, false, argc, argv); #endif @@ -2774,7 +2680,10 @@ void UnixServiceMain(int argc, char *argv[], char *name, SERVICE_FUNCTION *start UINT mode = 0; // Start of the Mayaqua #ifdef DEBUG - InitMayaqua(true, true, argc, argv); + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, argc, argv); #else InitMayaqua(false, false, argc, argv); #endif diff --git a/src/Mayaqua/Unix.h b/src/Mayaqua/Unix.h index fa0f27d9..63d1d334 100644 --- a/src/Mayaqua/Unix.h +++ b/src/Mayaqua/Unix.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Unix.h diff --git a/src/Mayaqua/Win32.c b/src/Mayaqua/Win32.c index 20376ada..f60d1b87 100644 --- a/src/Mayaqua/Win32.c +++ b/src/Mayaqua/Win32.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Win32.c diff --git a/src/Mayaqua/Win32.h b/src/Mayaqua/Win32.h index 09f31984..f5655854 100644 --- a/src/Mayaqua/Win32.h +++ b/src/Mayaqua/Win32.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Mayaqua Kernel -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Win32.h diff --git a/src/Mayaqua/win32_inc/openssl/aes.h b/src/Mayaqua/win32_inc/openssl/aes.h index 9b9c7319..245c552a 100644 --- a/src/Mayaqua/win32_inc/openssl/aes.h +++ b/src/Mayaqua/win32_inc/openssl/aes.h @@ -1,149 +1,92 @@ -/* crypto/aes/aes.h */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - */ - -#ifndef HEADER_AES_H -# define HEADER_AES_H - -# include - -# ifdef OPENSSL_NO_AES -# error AES is disabled. -# endif - -# include - -# define AES_ENCRYPT 1 -# define AES_DECRYPT 0 - -/* - * Because array size can't be a const in C, the following two are macros. - * Both sizes are in bytes. - */ -# define AES_MAXNR 14 -# define AES_BLOCK_SIZE 16 - -#ifdef __cplusplus -extern "C" { -#endif - -/* This should be a hidden type, but EVP requires that the size be known */ -struct aes_key_st { -# ifdef AES_LONG - unsigned long rd_key[4 * (AES_MAXNR + 1)]; -# else - unsigned int rd_key[4 * (AES_MAXNR + 1)]; -# endif - int rounds; -}; -typedef struct aes_key_st AES_KEY; - -const char *AES_options(void); - -int AES_set_encrypt_key(const unsigned char *userKey, const int bits, - AES_KEY *key); -int AES_set_decrypt_key(const unsigned char *userKey, const int bits, - AES_KEY *key); - -int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, - AES_KEY *key); -int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, - AES_KEY *key); - -void AES_encrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key); -void AES_decrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key); - -void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, - const AES_KEY *key, const int enc); -void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char *ivec, const int enc); -void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc); -void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc); -void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char *ivec, int *num, const int enc); -void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char *ivec, int *num); -void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char ivec[AES_BLOCK_SIZE], - unsigned char ecount_buf[AES_BLOCK_SIZE], - unsigned int *num); -/* NB: the IV is _two_ blocks long */ -void AES_ige_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char *ivec, const int enc); -/* NB: the IV is _four_ blocks long */ -void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - const AES_KEY *key2, const unsigned char *ivec, - const int enc); - -int AES_wrap_key(AES_KEY *key, const unsigned char *iv, - unsigned char *out, - const unsigned char *in, unsigned int inlen); -int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, - unsigned char *out, - const unsigned char *in, unsigned int inlen); - - -#ifdef __cplusplus -} -#endif - -#endif /* !HEADER_AES_H */ +/* + * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_AES_H +# define HEADER_AES_H + +# include + +# include +# ifdef __cplusplus +extern "C" { +# endif + +# define AES_ENCRYPT 1 +# define AES_DECRYPT 0 + +/* + * Because array size can't be a const in C, the following two are macros. + * Both sizes are in bytes. + */ +# define AES_MAXNR 14 +# define AES_BLOCK_SIZE 16 + +/* This should be a hidden type, but EVP requires that the size be known */ +struct aes_key_st { +# ifdef AES_LONG + unsigned long rd_key[4 * (AES_MAXNR + 1)]; +# else + unsigned int rd_key[4 * (AES_MAXNR + 1)]; +# endif + int rounds; +}; +typedef struct aes_key_st AES_KEY; + +const char *AES_options(void); + +int AES_set_encrypt_key(const unsigned char *userKey, const int bits, + AES_KEY *key); +int AES_set_decrypt_key(const unsigned char *userKey, const int bits, + AES_KEY *key); + +void AES_encrypt(const unsigned char *in, unsigned char *out, + const AES_KEY *key); +void AES_decrypt(const unsigned char *in, unsigned char *out, + const AES_KEY *key); + +void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, + const AES_KEY *key, const int enc); +void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + unsigned char *ivec, const int enc); +void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc); +void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc); +void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc); +void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + unsigned char *ivec, int *num); +/* NB: the IV is _two_ blocks long */ +void AES_ige_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + unsigned char *ivec, const int enc); +/* NB: the IV is _four_ blocks long */ +void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const AES_KEY *key, + const AES_KEY *key2, const unsigned char *ivec, + const int enc); + +int AES_wrap_key(AES_KEY *key, const unsigned char *iv, + unsigned char *out, + const unsigned char *in, unsigned int inlen); +int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, + unsigned char *out, + const unsigned char *in, unsigned int inlen); + + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/asn1.h b/src/Mayaqua/win32_inc/openssl/asn1.h index 00582414..9522eec1 100644 --- a/src/Mayaqua/win32_inc/openssl/asn1.h +++ b/src/Mayaqua/win32_inc/openssl/asn1.h @@ -1,1419 +1,886 @@ -/* crypto/asn1/asn1.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ASN1_H -# define HEADER_ASN1_H - -# include -# include -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# include - -# include - -# include -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif - -# ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# define V_ASN1_UNIVERSAL 0x00 -# define V_ASN1_APPLICATION 0x40 -# define V_ASN1_CONTEXT_SPECIFIC 0x80 -# define V_ASN1_PRIVATE 0xc0 - -# define V_ASN1_CONSTRUCTED 0x20 -# define V_ASN1_PRIMITIVE_TAG 0x1f -# define V_ASN1_PRIMATIVE_TAG 0x1f - -# define V_ASN1_APP_CHOOSE -2/* let the recipient choose */ -# define V_ASN1_OTHER -3/* used in ASN1_TYPE */ -# define V_ASN1_ANY -4/* used in ASN1 template code */ - -# define V_ASN1_NEG 0x100/* negative flag */ - -# define V_ASN1_UNDEF -1 -# define V_ASN1_EOC 0 -# define V_ASN1_BOOLEAN 1 /**/ -# define V_ASN1_INTEGER 2 -# define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG) -# define V_ASN1_BIT_STRING 3 -# define V_ASN1_OCTET_STRING 4 -# define V_ASN1_NULL 5 -# define V_ASN1_OBJECT 6 -# define V_ASN1_OBJECT_DESCRIPTOR 7 -# define V_ASN1_EXTERNAL 8 -# define V_ASN1_REAL 9 -# define V_ASN1_ENUMERATED 10 -# define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG) -# define V_ASN1_UTF8STRING 12 -# define V_ASN1_SEQUENCE 16 -# define V_ASN1_SET 17 -# define V_ASN1_NUMERICSTRING 18 /**/ -# define V_ASN1_PRINTABLESTRING 19 -# define V_ASN1_T61STRING 20 -# define V_ASN1_TELETEXSTRING 20/* alias */ -# define V_ASN1_VIDEOTEXSTRING 21 /**/ -# define V_ASN1_IA5STRING 22 -# define V_ASN1_UTCTIME 23 -# define V_ASN1_GENERALIZEDTIME 24 /**/ -# define V_ASN1_GRAPHICSTRING 25 /**/ -# define V_ASN1_ISO64STRING 26 /**/ -# define V_ASN1_VISIBLESTRING 26/* alias */ -# define V_ASN1_GENERALSTRING 27 /**/ -# define V_ASN1_UNIVERSALSTRING 28 /**/ -# define V_ASN1_BMPSTRING 30 -/* For use with d2i_ASN1_type_bytes() */ -# define B_ASN1_NUMERICSTRING 0x0001 -# define B_ASN1_PRINTABLESTRING 0x0002 -# define B_ASN1_T61STRING 0x0004 -# define B_ASN1_TELETEXSTRING 0x0004 -# define B_ASN1_VIDEOTEXSTRING 0x0008 -# define B_ASN1_IA5STRING 0x0010 -# define B_ASN1_GRAPHICSTRING 0x0020 -# define B_ASN1_ISO64STRING 0x0040 -# define B_ASN1_VISIBLESTRING 0x0040 -# define B_ASN1_GENERALSTRING 0x0080 -# define B_ASN1_UNIVERSALSTRING 0x0100 -# define B_ASN1_OCTET_STRING 0x0200 -# define B_ASN1_BIT_STRING 0x0400 -# define B_ASN1_BMPSTRING 0x0800 -# define B_ASN1_UNKNOWN 0x1000 -# define B_ASN1_UTF8STRING 0x2000 -# define B_ASN1_UTCTIME 0x4000 -# define B_ASN1_GENERALIZEDTIME 0x8000 -# define B_ASN1_SEQUENCE 0x10000 -/* For use with ASN1_mbstring_copy() */ -# define MBSTRING_FLAG 0x1000 -# define MBSTRING_UTF8 (MBSTRING_FLAG) -# define MBSTRING_ASC (MBSTRING_FLAG|1) -# define MBSTRING_BMP (MBSTRING_FLAG|2) -# define MBSTRING_UNIV (MBSTRING_FLAG|4) -# define SMIME_OLDMIME 0x400 -# define SMIME_CRLFEOL 0x800 -# define SMIME_STREAM 0x1000 - struct X509_algor_st; -DECLARE_STACK_OF(X509_ALGOR) - -# define DECLARE_ASN1_SET_OF(type)/* filled in by mkstack.pl */ -# define IMPLEMENT_ASN1_SET_OF(type)/* nothing, no longer needed */ - -/* - * We MUST make sure that, except for constness, asn1_ctx_st and - * asn1_const_ctx are exactly the same. Fortunately, as soon as the old ASN1 - * parsing macros are gone, we can throw this away as well... - */ -typedef struct asn1_ctx_st { - unsigned char *p; /* work char pointer */ - int eos; /* end of sequence read for indefinite - * encoding */ - int error; /* error code to use when returning an error */ - int inf; /* constructed if 0x20, indefinite is 0x21 */ - int tag; /* tag from last 'get object' */ - int xclass; /* class from last 'get object' */ - long slen; /* length of last 'get object' */ - unsigned char *max; /* largest value of p allowed */ - unsigned char *q; /* temporary variable */ - unsigned char **pp; /* variable */ - int line; /* used in error processing */ -} ASN1_CTX; - -typedef struct asn1_const_ctx_st { - const unsigned char *p; /* work char pointer */ - int eos; /* end of sequence read for indefinite - * encoding */ - int error; /* error code to use when returning an error */ - int inf; /* constructed if 0x20, indefinite is 0x21 */ - int tag; /* tag from last 'get object' */ - int xclass; /* class from last 'get object' */ - long slen; /* length of last 'get object' */ - const unsigned char *max; /* largest value of p allowed */ - const unsigned char *q; /* temporary variable */ - const unsigned char **pp; /* variable */ - int line; /* used in error processing */ -} ASN1_const_CTX; - -/* - * These are used internally in the ASN1_OBJECT to keep track of whether the - * names and data need to be free()ed - */ -# define ASN1_OBJECT_FLAG_DYNAMIC 0x01/* internal use */ -# define ASN1_OBJECT_FLAG_CRITICAL 0x02/* critical x509v3 object id */ -# define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04/* internal use */ -# define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08/* internal use */ -struct asn1_object_st { - const char *sn, *ln; - int nid; - int length; - const unsigned char *data; /* data remains const after init */ - int flags; /* Should we free this one */ -}; - -# define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */ -/* - * This indicates that the ASN1_STRING is not a real value but just a place - * holder for the location where indefinite length constructed data should be - * inserted in the memory buffer - */ -# define ASN1_STRING_FLAG_NDEF 0x010 - -/* - * This flag is used by the CMS code to indicate that a string is not - * complete and is a place holder for content when it had all been accessed. - * The flag will be reset when content has been written to it. - */ - -# define ASN1_STRING_FLAG_CONT 0x020 -/* - * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING - * type. - */ -# define ASN1_STRING_FLAG_MSTRING 0x040 -/* This is the base type that holds just about everything :-) */ -struct asn1_string_st { - int length; - int type; - unsigned char *data; - /* - * The value of the following field depends on the type being held. It - * is mostly being used for BIT_STRING so if the input data has a - * non-zero 'unused bits' value, it will be handled correctly - */ - long flags; -}; - -/* - * ASN1_ENCODING structure: this is used to save the received encoding of an - * ASN1 type. This is useful to get round problems with invalid encodings - * which can break signatures. - */ - -typedef struct ASN1_ENCODING_st { - unsigned char *enc; /* DER encoding */ - long len; /* Length of encoding */ - int modified; /* set to 1 if 'enc' is invalid */ -} ASN1_ENCODING; - -/* Used with ASN1 LONG type: if a long is set to this it is omitted */ -# define ASN1_LONG_UNDEF 0x7fffffffL - -# define STABLE_FLAGS_MALLOC 0x01 -# define STABLE_NO_MASK 0x02 -# define DIRSTRING_TYPE \ - (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING) -# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING) - -typedef struct asn1_string_table_st { - int nid; - long minsize; - long maxsize; - unsigned long mask; - unsigned long flags; -} ASN1_STRING_TABLE; - -DECLARE_STACK_OF(ASN1_STRING_TABLE) - -/* size limits: this stuff is taken straight from RFC2459 */ - -# define ub_name 32768 -# define ub_common_name 64 -# define ub_locality_name 128 -# define ub_state_name 128 -# define ub_organization_name 64 -# define ub_organization_unit_name 64 -# define ub_title 64 -# define ub_email_address 128 - -/* - * Declarations for template structures: for full definitions see asn1t.h - */ -typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE; -typedef struct ASN1_TLC_st ASN1_TLC; -/* This is just an opaque pointer */ -typedef struct ASN1_VALUE_st ASN1_VALUE; - -/* Declare ASN1 functions: the implement macro in in asn1t.h */ - -# define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type) - -# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \ - DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type) - -# define DECLARE_ASN1_FUNCTIONS_name(type, name) \ - DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ - DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) - -# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \ - DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ - DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) - -# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \ - type *d2i_##name(type **a, const unsigned char **in, long len); \ - int i2d_##name(type *a, unsigned char **out); \ - DECLARE_ASN1_ITEM(itname) - -# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \ - type *d2i_##name(type **a, const unsigned char **in, long len); \ - int i2d_##name(const type *a, unsigned char **out); \ - DECLARE_ASN1_ITEM(name) - -# define DECLARE_ASN1_NDEF_FUNCTION(name) \ - int i2d_##name##_NDEF(name *a, unsigned char **out); - -# define DECLARE_ASN1_FUNCTIONS_const(name) \ - DECLARE_ASN1_ALLOC_FUNCTIONS(name) \ - DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name) - -# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ - type *name##_new(void); \ - void name##_free(type *a); - -# define DECLARE_ASN1_PRINT_FUNCTION(stname) \ - DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname) - -# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \ - int fname##_print_ctx(BIO *out, stname *x, int indent, \ - const ASN1_PCTX *pctx); - -# define D2I_OF(type) type *(*)(type **,const unsigned char **,long) -# define I2D_OF(type) int (*)(type *,unsigned char **) -# define I2D_OF_const(type) int (*)(const type *,unsigned char **) - -# define CHECKED_D2I_OF(type, d2i) \ - ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0))) -# define CHECKED_I2D_OF(type, i2d) \ - ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0))) -# define CHECKED_NEW_OF(type, xnew) \ - ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0))) -# define CHECKED_PTR_OF(type, p) \ - ((void*) (1 ? p : (type*)0)) -# define CHECKED_PPTR_OF(type, p) \ - ((void**) (1 ? p : (type**)0)) - -# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long) -# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **) -# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type) - -TYPEDEF_D2I2D_OF(void); - -/*- - * The following macros and typedefs allow an ASN1_ITEM - * to be embedded in a structure and referenced. Since - * the ASN1_ITEM pointers need to be globally accessible - * (possibly from shared libraries) they may exist in - * different forms. On platforms that support it the - * ASN1_ITEM structure itself will be globally exported. - * Other platforms will export a function that returns - * an ASN1_ITEM pointer. - * - * To handle both cases transparently the macros below - * should be used instead of hard coding an ASN1_ITEM - * pointer in a structure. - * - * The structure will look like this: - * - * typedef struct SOMETHING_st { - * ... - * ASN1_ITEM_EXP *iptr; - * ... - * } SOMETHING; - * - * It would be initialised as e.g.: - * - * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...}; - * - * and the actual pointer extracted with: - * - * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr); - * - * Finally an ASN1_ITEM pointer can be extracted from an - * appropriate reference with: ASN1_ITEM_rptr(X509). This - * would be used when a function takes an ASN1_ITEM * argument. - * - */ - -# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION - -/* ASN1_ITEM pointer exported type */ -typedef const ASN1_ITEM ASN1_ITEM_EXP; - -/* Macro to obtain ASN1_ITEM pointer from exported type */ -# define ASN1_ITEM_ptr(iptr) (iptr) - -/* Macro to include ASN1_ITEM pointer from base type */ -# define ASN1_ITEM_ref(iptr) (&(iptr##_it)) - -# define ASN1_ITEM_rptr(ref) (&(ref##_it)) - -# define DECLARE_ASN1_ITEM(name) \ - OPENSSL_EXTERN const ASN1_ITEM name##_it; - -# else - -/* - * Platforms that can't easily handle shared global variables are declared as - * functions returning ASN1_ITEM pointers. - */ - -/* ASN1_ITEM pointer exported type */ -typedef const ASN1_ITEM *ASN1_ITEM_EXP (void); - -/* Macro to obtain ASN1_ITEM pointer from exported type */ -# define ASN1_ITEM_ptr(iptr) (iptr()) - -/* Macro to include ASN1_ITEM pointer from base type */ -# define ASN1_ITEM_ref(iptr) (iptr##_it) - -# define ASN1_ITEM_rptr(ref) (ref##_it()) - -# define DECLARE_ASN1_ITEM(name) \ - const ASN1_ITEM * name##_it(void); - -# endif - -/* Parameters used by ASN1_STRING_print_ex() */ - -/* - * These determine which characters to escape: RFC2253 special characters, - * control characters and MSB set characters - */ - -# define ASN1_STRFLGS_ESC_2253 1 -# define ASN1_STRFLGS_ESC_CTRL 2 -# define ASN1_STRFLGS_ESC_MSB 4 - -/* - * This flag determines how we do escaping: normally RC2253 backslash only, - * set this to use backslash and quote. - */ - -# define ASN1_STRFLGS_ESC_QUOTE 8 - -/* These three flags are internal use only. */ - -/* Character is a valid PrintableString character */ -# define CHARTYPE_PRINTABLESTRING 0x10 -/* Character needs escaping if it is the first character */ -# define CHARTYPE_FIRST_ESC_2253 0x20 -/* Character needs escaping if it is the last character */ -# define CHARTYPE_LAST_ESC_2253 0x40 - -/* - * NB the internal flags are safely reused below by flags handled at the top - * level. - */ - -/* - * If this is set we convert all character strings to UTF8 first - */ - -# define ASN1_STRFLGS_UTF8_CONVERT 0x10 - -/* - * If this is set we don't attempt to interpret content: just assume all - * strings are 1 byte per character. This will produce some pretty odd - * looking output! - */ - -# define ASN1_STRFLGS_IGNORE_TYPE 0x20 - -/* If this is set we include the string type in the output */ -# define ASN1_STRFLGS_SHOW_TYPE 0x40 - -/* - * This determines which strings to display and which to 'dump' (hex dump of - * content octets or DER encoding). We can only dump non character strings or - * everything. If we don't dump 'unknown' they are interpreted as character - * strings with 1 octet per character and are subject to the usual escaping - * options. - */ - -# define ASN1_STRFLGS_DUMP_ALL 0x80 -# define ASN1_STRFLGS_DUMP_UNKNOWN 0x100 - -/* - * These determine what 'dumping' does, we can dump the content octets or the - * DER encoding: both use the RFC2253 #XXXXX notation. - */ - -# define ASN1_STRFLGS_DUMP_DER 0x200 - -/* - * All the string flags consistent with RFC2253, escaping control characters - * isn't essential in RFC2253 but it is advisable anyway. - */ - -# define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \ - ASN1_STRFLGS_ESC_CTRL | \ - ASN1_STRFLGS_ESC_MSB | \ - ASN1_STRFLGS_UTF8_CONVERT | \ - ASN1_STRFLGS_DUMP_UNKNOWN | \ - ASN1_STRFLGS_DUMP_DER) - -DECLARE_STACK_OF(ASN1_INTEGER) -DECLARE_ASN1_SET_OF(ASN1_INTEGER) - -DECLARE_STACK_OF(ASN1_GENERALSTRING) - -typedef struct asn1_type_st { - int type; - union { - char *ptr; - ASN1_BOOLEAN boolean; - ASN1_STRING *asn1_string; - ASN1_OBJECT *object; - ASN1_INTEGER *integer; - ASN1_ENUMERATED *enumerated; - ASN1_BIT_STRING *bit_string; - ASN1_OCTET_STRING *octet_string; - ASN1_PRINTABLESTRING *printablestring; - ASN1_T61STRING *t61string; - ASN1_IA5STRING *ia5string; - ASN1_GENERALSTRING *generalstring; - ASN1_BMPSTRING *bmpstring; - ASN1_UNIVERSALSTRING *universalstring; - ASN1_UTCTIME *utctime; - ASN1_GENERALIZEDTIME *generalizedtime; - ASN1_VISIBLESTRING *visiblestring; - ASN1_UTF8STRING *utf8string; - /* - * set and sequence are left complete and still contain the set or - * sequence bytes - */ - ASN1_STRING *set; - ASN1_STRING *sequence; - ASN1_VALUE *asn1_value; - } value; -} ASN1_TYPE; - -DECLARE_STACK_OF(ASN1_TYPE) -DECLARE_ASN1_SET_OF(ASN1_TYPE) - -typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY; - -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SET_ANY) - -typedef struct NETSCAPE_X509_st { - ASN1_OCTET_STRING *header; - X509 *cert; -} NETSCAPE_X509; - -/* This is used to contain a list of bit names */ -typedef struct BIT_STRING_BITNAME_st { - int bitnum; - const char *lname; - const char *sname; -} BIT_STRING_BITNAME; - -# define M_ASN1_STRING_length(x) ((x)->length) -# define M_ASN1_STRING_length_set(x, n) ((x)->length = (n)) -# define M_ASN1_STRING_type(x) ((x)->type) -# define M_ASN1_STRING_data(x) ((x)->data) - -/* Macros for string operations */ -# define M_ASN1_BIT_STRING_new() (ASN1_BIT_STRING *)\ - ASN1_STRING_type_new(V_ASN1_BIT_STRING) -# define M_ASN1_BIT_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\ - ASN1_STRING_dup((const ASN1_STRING *)a) -# define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\ - (const ASN1_STRING *)a,(const ASN1_STRING *)b) -# define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) - -# define M_ASN1_INTEGER_new() (ASN1_INTEGER *)\ - ASN1_STRING_type_new(V_ASN1_INTEGER) -# define M_ASN1_INTEGER_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)\ - ASN1_STRING_dup((const ASN1_STRING *)a) -# define M_ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\ - (const ASN1_STRING *)a,(const ASN1_STRING *)b) - -# define M_ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\ - ASN1_STRING_type_new(V_ASN1_ENUMERATED) -# define M_ASN1_ENUMERATED_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)\ - ASN1_STRING_dup((const ASN1_STRING *)a) -# define M_ASN1_ENUMERATED_cmp(a,b) ASN1_STRING_cmp(\ - (const ASN1_STRING *)a,(const ASN1_STRING *)b) - -# define M_ASN1_OCTET_STRING_new() (ASN1_OCTET_STRING *)\ - ASN1_STRING_type_new(V_ASN1_OCTET_STRING) -# define M_ASN1_OCTET_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\ - ASN1_STRING_dup((const ASN1_STRING *)a) -# define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\ - (const ASN1_STRING *)a,(const ASN1_STRING *)b) -# define M_ASN1_OCTET_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) -# define M_ASN1_OCTET_STRING_print(a,b) ASN1_STRING_print(a,(ASN1_STRING *)b) -# define M_i2d_ASN1_OCTET_STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_OCTET_STRING,\ - V_ASN1_UNIVERSAL) - -# define B_ASN1_TIME \ - B_ASN1_UTCTIME | \ - B_ASN1_GENERALIZEDTIME - -# define B_ASN1_PRINTABLE \ - B_ASN1_NUMERICSTRING| \ - B_ASN1_PRINTABLESTRING| \ - B_ASN1_T61STRING| \ - B_ASN1_IA5STRING| \ - B_ASN1_BIT_STRING| \ - B_ASN1_UNIVERSALSTRING|\ - B_ASN1_BMPSTRING|\ - B_ASN1_UTF8STRING|\ - B_ASN1_SEQUENCE|\ - B_ASN1_UNKNOWN - -# define B_ASN1_DIRECTORYSTRING \ - B_ASN1_PRINTABLESTRING| \ - B_ASN1_TELETEXSTRING|\ - B_ASN1_BMPSTRING|\ - B_ASN1_UNIVERSALSTRING|\ - B_ASN1_UTF8STRING - -# define B_ASN1_DISPLAYTEXT \ - B_ASN1_IA5STRING| \ - B_ASN1_VISIBLESTRING| \ - B_ASN1_BMPSTRING|\ - B_ASN1_UTF8STRING - -# define M_ASN1_PRINTABLE_new() ASN1_STRING_type_new(V_ASN1_T61STRING) -# define M_ASN1_PRINTABLE_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_PRINTABLE(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\ - pp,a->type,V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_PRINTABLE(a,pp,l) \ - d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \ - B_ASN1_PRINTABLE) - -# define M_DIRECTORYSTRING_new() ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING) -# define M_DIRECTORYSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_DIRECTORYSTRING(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\ - pp,a->type,V_ASN1_UNIVERSAL) -# define M_d2i_DIRECTORYSTRING(a,pp,l) \ - d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \ - B_ASN1_DIRECTORYSTRING) - -# define M_DISPLAYTEXT_new() ASN1_STRING_type_new(V_ASN1_VISIBLESTRING) -# define M_DISPLAYTEXT_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_DISPLAYTEXT(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\ - pp,a->type,V_ASN1_UNIVERSAL) -# define M_d2i_DISPLAYTEXT(a,pp,l) \ - d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \ - B_ASN1_DISPLAYTEXT) - -# define M_ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\ - ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING) -# define M_ASN1_PRINTABLESTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_PRINTABLESTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_PRINTABLESTRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_PRINTABLESTRING(a,pp,l) \ - (ASN1_PRINTABLESTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_PRINTABLESTRING) - -# define M_ASN1_T61STRING_new() (ASN1_T61STRING *)\ - ASN1_STRING_type_new(V_ASN1_T61STRING) -# define M_ASN1_T61STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_T61STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_T61STRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_T61STRING(a,pp,l) \ - (ASN1_T61STRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_T61STRING) - -# define M_ASN1_IA5STRING_new() (ASN1_IA5STRING *)\ - ASN1_STRING_type_new(V_ASN1_IA5STRING) -# define M_ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_IA5STRING_dup(a) \ - (ASN1_IA5STRING *)ASN1_STRING_dup((const ASN1_STRING *)a) -# define M_i2d_ASN1_IA5STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_IA5STRING(a,pp,l) \ - (ASN1_IA5STRING *)d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l,\ - B_ASN1_IA5STRING) - -# define M_ASN1_UTCTIME_new() (ASN1_UTCTIME *)\ - ASN1_STRING_type_new(V_ASN1_UTCTIME) -# define M_ASN1_UTCTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)\ - ASN1_STRING_dup((const ASN1_STRING *)a) - -# define M_ASN1_GENERALIZEDTIME_new() (ASN1_GENERALIZEDTIME *)\ - ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME) -# define M_ASN1_GENERALIZEDTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\ - (const ASN1_STRING *)a) - -# define M_ASN1_TIME_new() (ASN1_TIME *)\ - ASN1_STRING_type_new(V_ASN1_UTCTIME) -# define M_ASN1_TIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_ASN1_TIME_dup(a) (ASN1_TIME *)\ - ASN1_STRING_dup((const ASN1_STRING *)a) - -# define M_ASN1_GENERALSTRING_new() (ASN1_GENERALSTRING *)\ - ASN1_STRING_type_new(V_ASN1_GENERALSTRING) -# define M_ASN1_GENERALSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_GENERALSTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_GENERALSTRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_GENERALSTRING(a,pp,l) \ - (ASN1_GENERALSTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_GENERALSTRING) - -# define M_ASN1_UNIVERSALSTRING_new() (ASN1_UNIVERSALSTRING *)\ - ASN1_STRING_type_new(V_ASN1_UNIVERSALSTRING) -# define M_ASN1_UNIVERSALSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_UNIVERSALSTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UNIVERSALSTRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_UNIVERSALSTRING(a,pp,l) \ - (ASN1_UNIVERSALSTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_UNIVERSALSTRING) - -# define M_ASN1_BMPSTRING_new() (ASN1_BMPSTRING *)\ - ASN1_STRING_type_new(V_ASN1_BMPSTRING) -# define M_ASN1_BMPSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_BMPSTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_BMPSTRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_BMPSTRING(a,pp,l) \ - (ASN1_BMPSTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_BMPSTRING) - -# define M_ASN1_VISIBLESTRING_new() (ASN1_VISIBLESTRING *)\ - ASN1_STRING_type_new(V_ASN1_VISIBLESTRING) -# define M_ASN1_VISIBLESTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_VISIBLESTRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_VISIBLESTRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_VISIBLESTRING(a,pp,l) \ - (ASN1_VISIBLESTRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_VISIBLESTRING) - -# define M_ASN1_UTF8STRING_new() (ASN1_UTF8STRING *)\ - ASN1_STRING_type_new(V_ASN1_UTF8STRING) -# define M_ASN1_UTF8STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) -# define M_i2d_ASN1_UTF8STRING(a,pp) \ - i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UTF8STRING,\ - V_ASN1_UNIVERSAL) -# define M_d2i_ASN1_UTF8STRING(a,pp,l) \ - (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ - ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) - - /* for the is_set parameter to i2d_ASN1_SET */ -# define IS_SEQUENCE 0 -# define IS_SET 1 - -DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) - -int ASN1_TYPE_get(ASN1_TYPE *a); -void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); -int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); -int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b); - -ASN1_OBJECT *ASN1_OBJECT_new(void); -void ASN1_OBJECT_free(ASN1_OBJECT *a); -int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp); -ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, - long length); -ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, - long length); - -DECLARE_ASN1_ITEM(ASN1_OBJECT) - -DECLARE_STACK_OF(ASN1_OBJECT) -DECLARE_ASN1_SET_OF(ASN1_OBJECT) - -ASN1_STRING *ASN1_STRING_new(void); -void ASN1_STRING_free(ASN1_STRING *a); -void ASN1_STRING_clear_free(ASN1_STRING *a); -int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str); -ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a); -ASN1_STRING *ASN1_STRING_type_new(int type); -int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b); - /* - * Since this is used to store all sorts of things, via macros, for now, - * make its data void * - */ -int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); -void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); -int ASN1_STRING_length(const ASN1_STRING *x); -void ASN1_STRING_length_set(ASN1_STRING *x, int n); -int ASN1_STRING_type(ASN1_STRING *x); -unsigned char *ASN1_STRING_data(ASN1_STRING *x); - -DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING) -int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp); -ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, - const unsigned char **pp, long length); -int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length); -int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); -int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); -int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a, - unsigned char *flags, int flags_len); - -# ifndef OPENSSL_NO_BIO -int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, - BIT_STRING_BITNAME *tbl, int indent); -# endif -int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl); -int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value, - BIT_STRING_BITNAME *tbl); - -int i2d_ASN1_BOOLEAN(int a, unsigned char **pp); -int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length); - -DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER) -int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp); -ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp, - long length); -ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, - long length); -ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x); -int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y); - -DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED) - -int ASN1_UTCTIME_check(const ASN1_UTCTIME *a); -ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t); -ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, - int offset_day, long offset_sec); -int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); -int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); -# if 0 -time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s); -# endif - -int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a); -ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, - time_t t); -ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, - time_t t, int offset_day, - long offset_sec); -int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); -int ASN1_TIME_diff(int *pday, int *psec, - const ASN1_TIME *from, const ASN1_TIME *to); - -DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING) -ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a); -int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a, - const ASN1_OCTET_STRING *b); -int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, - int len); - -DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING) -DECLARE_ASN1_FUNCTIONS(ASN1_NULL) -DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING) - -int UTF8_getc(const unsigned char *str, int len, unsigned long *val); -int UTF8_putc(unsigned char *str, int len, unsigned long value); - -DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE) - -DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING) -DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT) -DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING) -DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING) -DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING) -DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME) -DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME) -DECLARE_ASN1_FUNCTIONS(ASN1_TIME) - -DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF) - -ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t); -ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t, - int offset_day, long offset_sec); -int ASN1_TIME_check(ASN1_TIME *t); -ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME - **out); -int ASN1_TIME_set_string(ASN1_TIME *s, const char *str); - -int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp, - i2d_of_void *i2d, int ex_tag, int ex_class, int is_set); -STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a, - const unsigned char **pp, - long length, d2i_of_void *d2i, - void (*free_func) (OPENSSL_BLOCK), - int ex_tag, int ex_class); - -# ifndef OPENSSL_NO_BIO -int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); -int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size); -int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); -int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size); -int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a); -int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size); -int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type); -# endif -int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a); - -int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num); -ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len, - const char *sn, const char *ln); - -int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); -long ASN1_INTEGER_get(const ASN1_INTEGER *a); -ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); -BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn); - -int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); -long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a); -ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai); -BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn); - -/* General */ -/* given a string, return the correct type, max is the maximum length */ -int ASN1_PRINTABLE_type(const unsigned char *s, int max); - -int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass); -ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, - long length, int Ptag, int Pclass); -unsigned long ASN1_tag2bit(int tag); -/* type is one or more of the B_ASN1_ values. */ -ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp, - long length, int type); - -/* PARSING */ -int asn1_Finish(ASN1_CTX *c); -int asn1_const_Finish(ASN1_const_CTX *c); - -/* SPECIALS */ -int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, - int *pclass, long omax); -int ASN1_check_infinite_end(unsigned char **p, long len); -int ASN1_const_check_infinite_end(const unsigned char **p, long len); -void ASN1_put_object(unsigned char **pp, int constructed, int length, - int tag, int xclass); -int ASN1_put_eoc(unsigned char **pp); -int ASN1_object_size(int constructed, int length, int tag); - -/* Used to implement other functions */ -void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x); - -# define ASN1_dup_of(type,i2d,d2i,x) \ - ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \ - CHECKED_D2I_OF(type, d2i), \ - CHECKED_PTR_OF(type, x))) - -# define ASN1_dup_of_const(type,i2d,d2i,x) \ - ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \ - CHECKED_D2I_OF(type, d2i), \ - CHECKED_PTR_OF(const type, x))) - -void *ASN1_item_dup(const ASN1_ITEM *it, void *x); - -/* ASN1 alloc/free macros for when a type is only used internally */ - -# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type)) -# define M_ASN1_free_of(x, type) \ - ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type)) - -# ifndef OPENSSL_NO_FP_API -void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x); - -# define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ - ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \ - CHECKED_D2I_OF(type, d2i), \ - in, \ - CHECKED_PPTR_OF(type, x))) - -void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); -int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x); - -# define ASN1_i2d_fp_of(type,i2d,out,x) \ - (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \ - out, \ - CHECKED_PTR_OF(type, x))) - -# define ASN1_i2d_fp_of_const(type,i2d,out,x) \ - (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \ - out, \ - CHECKED_PTR_OF(const type, x))) - -int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); -int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); -# endif - -int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in); - -# ifndef OPENSSL_NO_BIO -void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x); - -# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ - ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \ - CHECKED_D2I_OF(type, d2i), \ - in, \ - CHECKED_PPTR_OF(type, x))) - -void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); -int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x); - -# define ASN1_i2d_bio_of(type,i2d,out,x) \ - (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \ - out, \ - CHECKED_PTR_OF(type, x))) - -# define ASN1_i2d_bio_of_const(type,i2d,out,x) \ - (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \ - out, \ - CHECKED_PTR_OF(const type, x))) - -int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); -int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a); -int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a); -int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a); -int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v); -int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); -int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, - unsigned char *buf, int off); -int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent); -int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent, - int dump); -# endif -const char *ASN1_tag2str(int tag); - -/* Used to load and write netscape format cert */ - -DECLARE_ASN1_FUNCTIONS(NETSCAPE_X509) - -int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); - -int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len); -int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len); -int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, - unsigned char *data, int len); -int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, - unsigned char *data, int max_len); - -STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len, - d2i_of_void *d2i, - void (*free_func) (OPENSSL_BLOCK)); -unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d, - unsigned char **buf, int *len); -void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); -void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); -ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, - ASN1_OCTET_STRING **oct); - -# define ASN1_pack_string_of(type,obj,i2d,oct) \ - (ASN1_pack_string(CHECKED_PTR_OF(type, obj), \ - CHECKED_I2D_OF(type, i2d), \ - oct)) - -ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, - ASN1_OCTET_STRING **oct); - -void ASN1_STRING_set_default_mask(unsigned long mask); -int ASN1_STRING_set_default_mask_asc(const char *p); -unsigned long ASN1_STRING_get_default_mask(void); -int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, - int inform, unsigned long mask); -int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, - int inform, unsigned long mask, - long minsize, long maxsize); - -ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, - const unsigned char *in, int inlen, - int inform, int nid); -ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid); -int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long); -void ASN1_STRING_TABLE_cleanup(void); - -/* ASN1 template functions */ - -/* Old API compatible functions */ -ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it); -void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it); -ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, - long len, const ASN1_ITEM *it); -int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); -int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, - const ASN1_ITEM *it); - -void ASN1_add_oid_module(void); - -ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); -ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); - -/* ASN1 Print flags */ - -/* Indicate missing OPTIONAL fields */ -# define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001 -/* Mark start and end of SEQUENCE */ -# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002 -/* Mark start and end of SEQUENCE/SET OF */ -# define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004 -/* Show the ASN1 type of primitives */ -# define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008 -/* Don't show ASN1 type of ANY */ -# define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010 -/* Don't show ASN1 type of MSTRINGs */ -# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020 -/* Don't show field names in SEQUENCE */ -# define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040 -/* Show structure names of each SEQUENCE field */ -# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080 -/* Don't show structure name even at top level */ -# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100 - -int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent, - const ASN1_ITEM *it, const ASN1_PCTX *pctx); -ASN1_PCTX *ASN1_PCTX_new(void); -void ASN1_PCTX_free(ASN1_PCTX *p); -unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p); -void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags); -unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p); -void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags); -unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p); -void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags); -unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p); -void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags); -unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p); -void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); - -BIO_METHOD *BIO_f_asn1(void); - -BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); - -int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, - const ASN1_ITEM *it); -int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, - const char *hdr, const ASN1_ITEM *it); -int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, - int ctype_nid, int econt_nid, - STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it); -ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); -int SMIME_crlf_copy(BIO *in, BIO *out, int flags); -int SMIME_text(BIO *in, BIO *out); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ASN1_strings(void); - -/* Error codes for the ASN1 functions. */ - -/* Function codes. */ -# define ASN1_F_A2D_ASN1_OBJECT 100 -# define ASN1_F_A2I_ASN1_ENUMERATED 101 -# define ASN1_F_A2I_ASN1_INTEGER 102 -# define ASN1_F_A2I_ASN1_STRING 103 -# define ASN1_F_APPEND_EXP 176 -# define ASN1_F_ASN1_BIT_STRING_SET_BIT 183 -# define ASN1_F_ASN1_CB 177 -# define ASN1_F_ASN1_CHECK_TLEN 104 -# define ASN1_F_ASN1_COLLATE_PRIMITIVE 105 -# define ASN1_F_ASN1_COLLECT 106 -# define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108 -# define ASN1_F_ASN1_D2I_FP 109 -# define ASN1_F_ASN1_D2I_READ_BIO 107 -# define ASN1_F_ASN1_DIGEST 184 -# define ASN1_F_ASN1_DO_ADB 110 -# define ASN1_F_ASN1_DUP 111 -# define ASN1_F_ASN1_ENUMERATED_SET 112 -# define ASN1_F_ASN1_ENUMERATED_TO_BN 113 -# define ASN1_F_ASN1_EX_C2I 204 -# define ASN1_F_ASN1_FIND_END 190 -# define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216 -# define ASN1_F_ASN1_GENERALIZEDTIME_SET 185 -# define ASN1_F_ASN1_GENERATE_V3 178 -# define ASN1_F_ASN1_GET_OBJECT 114 -# define ASN1_F_ASN1_HEADER_NEW 115 -# define ASN1_F_ASN1_I2D_BIO 116 -# define ASN1_F_ASN1_I2D_FP 117 -# define ASN1_F_ASN1_INTEGER_SET 118 -# define ASN1_F_ASN1_INTEGER_TO_BN 119 -# define ASN1_F_ASN1_ITEM_D2I_FP 206 -# define ASN1_F_ASN1_ITEM_DUP 191 -# define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW 121 -# define ASN1_F_ASN1_ITEM_EX_D2I 120 -# define ASN1_F_ASN1_ITEM_I2D_BIO 192 -# define ASN1_F_ASN1_ITEM_I2D_FP 193 -# define ASN1_F_ASN1_ITEM_PACK 198 -# define ASN1_F_ASN1_ITEM_SIGN 195 -# define ASN1_F_ASN1_ITEM_SIGN_CTX 220 -# define ASN1_F_ASN1_ITEM_UNPACK 199 -# define ASN1_F_ASN1_ITEM_VERIFY 197 -# define ASN1_F_ASN1_MBSTRING_NCOPY 122 -# define ASN1_F_ASN1_OBJECT_NEW 123 -# define ASN1_F_ASN1_OUTPUT_DATA 214 -# define ASN1_F_ASN1_PACK_STRING 124 -# define ASN1_F_ASN1_PCTX_NEW 205 -# define ASN1_F_ASN1_PKCS5_PBE_SET 125 -# define ASN1_F_ASN1_SEQ_PACK 126 -# define ASN1_F_ASN1_SEQ_UNPACK 127 -# define ASN1_F_ASN1_SIGN 128 -# define ASN1_F_ASN1_STR2TYPE 179 -# define ASN1_F_ASN1_STRING_SET 186 -# define ASN1_F_ASN1_STRING_TABLE_ADD 129 -# define ASN1_F_ASN1_STRING_TYPE_NEW 130 -# define ASN1_F_ASN1_TEMPLATE_EX_D2I 132 -# define ASN1_F_ASN1_TEMPLATE_NEW 133 -# define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131 -# define ASN1_F_ASN1_TIME_ADJ 217 -# define ASN1_F_ASN1_TIME_SET 175 -# define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 -# define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 -# define ASN1_F_ASN1_UNPACK_STRING 136 -# define ASN1_F_ASN1_UTCTIME_ADJ 218 -# define ASN1_F_ASN1_UTCTIME_SET 187 -# define ASN1_F_ASN1_VERIFY 137 -# define ASN1_F_B64_READ_ASN1 209 -# define ASN1_F_B64_WRITE_ASN1 210 -# define ASN1_F_BIO_NEW_NDEF 208 -# define ASN1_F_BITSTR_CB 180 -# define ASN1_F_BN_TO_ASN1_ENUMERATED 138 -# define ASN1_F_BN_TO_ASN1_INTEGER 139 -# define ASN1_F_C2I_ASN1_BIT_STRING 189 -# define ASN1_F_C2I_ASN1_INTEGER 194 -# define ASN1_F_C2I_ASN1_OBJECT 196 -# define ASN1_F_COLLECT_DATA 140 -# define ASN1_F_D2I_ASN1_BIT_STRING 141 -# define ASN1_F_D2I_ASN1_BOOLEAN 142 -# define ASN1_F_D2I_ASN1_BYTES 143 -# define ASN1_F_D2I_ASN1_GENERALIZEDTIME 144 -# define ASN1_F_D2I_ASN1_HEADER 145 -# define ASN1_F_D2I_ASN1_INTEGER 146 -# define ASN1_F_D2I_ASN1_OBJECT 147 -# define ASN1_F_D2I_ASN1_SET 148 -# define ASN1_F_D2I_ASN1_TYPE_BYTES 149 -# define ASN1_F_D2I_ASN1_UINTEGER 150 -# define ASN1_F_D2I_ASN1_UTCTIME 151 -# define ASN1_F_D2I_AUTOPRIVATEKEY 207 -# define ASN1_F_D2I_NETSCAPE_RSA 152 -# define ASN1_F_D2I_NETSCAPE_RSA_2 153 -# define ASN1_F_D2I_PRIVATEKEY 154 -# define ASN1_F_D2I_PUBLICKEY 155 -# define ASN1_F_D2I_RSA_NET 200 -# define ASN1_F_D2I_RSA_NET_2 201 -# define ASN1_F_D2I_X509 156 -# define ASN1_F_D2I_X509_CINF 157 -# define ASN1_F_D2I_X509_PKEY 159 -# define ASN1_F_I2D_ASN1_BIO_STREAM 211 -# define ASN1_F_I2D_ASN1_SET 188 -# define ASN1_F_I2D_ASN1_TIME 160 -# define ASN1_F_I2D_DSA_PUBKEY 161 -# define ASN1_F_I2D_EC_PUBKEY 181 -# define ASN1_F_I2D_PRIVATEKEY 163 -# define ASN1_F_I2D_PUBLICKEY 164 -# define ASN1_F_I2D_RSA_NET 162 -# define ASN1_F_I2D_RSA_PUBKEY 165 -# define ASN1_F_LONG_C2I 166 -# define ASN1_F_OID_MODULE_INIT 174 -# define ASN1_F_PARSE_TAGGING 182 -# define ASN1_F_PKCS5_PBE2_SET_IV 167 -# define ASN1_F_PKCS5_PBE_SET 202 -# define ASN1_F_PKCS5_PBE_SET0_ALGOR 215 -# define ASN1_F_PKCS5_PBKDF2_SET 219 -# define ASN1_F_SMIME_READ_ASN1 212 -# define ASN1_F_SMIME_TEXT 213 -# define ASN1_F_X509_CINF_NEW 168 -# define ASN1_F_X509_CRL_ADD0_REVOKED 169 -# define ASN1_F_X509_INFO_NEW 170 -# define ASN1_F_X509_NAME_ENCODE 203 -# define ASN1_F_X509_NAME_EX_D2I 158 -# define ASN1_F_X509_NAME_EX_NEW 171 -# define ASN1_F_X509_NEW 172 -# define ASN1_F_X509_PKEY_NEW 173 - -/* Reason codes. */ -# define ASN1_R_ADDING_OBJECT 171 -# define ASN1_R_ASN1_PARSE_ERROR 203 -# define ASN1_R_ASN1_SIG_PARSE_ERROR 204 -# define ASN1_R_AUX_ERROR 100 -# define ASN1_R_BAD_CLASS 101 -# define ASN1_R_BAD_OBJECT_HEADER 102 -# define ASN1_R_BAD_PASSWORD_READ 103 -# define ASN1_R_BAD_TAG 104 -# define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214 -# define ASN1_R_BN_LIB 105 -# define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 -# define ASN1_R_BUFFER_TOO_SMALL 107 -# define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108 -# define ASN1_R_CONTEXT_NOT_INITIALISED 217 -# define ASN1_R_DATA_IS_WRONG 109 -# define ASN1_R_DECODE_ERROR 110 -# define ASN1_R_DECODING_ERROR 111 -# define ASN1_R_DEPTH_EXCEEDED 174 -# define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198 -# define ASN1_R_ENCODE_ERROR 112 -# define ASN1_R_ERROR_GETTING_TIME 173 -# define ASN1_R_ERROR_LOADING_SECTION 172 -# define ASN1_R_ERROR_PARSING_SET_ELEMENT 113 -# define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114 -# define ASN1_R_EXPECTING_AN_INTEGER 115 -# define ASN1_R_EXPECTING_AN_OBJECT 116 -# define ASN1_R_EXPECTING_A_BOOLEAN 117 -# define ASN1_R_EXPECTING_A_TIME 118 -# define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119 -# define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120 -# define ASN1_R_FIELD_MISSING 121 -# define ASN1_R_FIRST_NUM_TOO_LARGE 122 -# define ASN1_R_HEADER_TOO_LONG 123 -# define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175 -# define ASN1_R_ILLEGAL_BOOLEAN 176 -# define ASN1_R_ILLEGAL_CHARACTERS 124 -# define ASN1_R_ILLEGAL_FORMAT 177 -# define ASN1_R_ILLEGAL_HEX 178 -# define ASN1_R_ILLEGAL_IMPLICIT_TAG 179 -# define ASN1_R_ILLEGAL_INTEGER 180 -# define ASN1_R_ILLEGAL_NESTED_TAGGING 181 -# define ASN1_R_ILLEGAL_NULL 125 -# define ASN1_R_ILLEGAL_NULL_VALUE 182 -# define ASN1_R_ILLEGAL_OBJECT 183 -# define ASN1_R_ILLEGAL_OPTIONAL_ANY 126 -# define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170 -# define ASN1_R_ILLEGAL_TAGGED_ANY 127 -# define ASN1_R_ILLEGAL_TIME_VALUE 184 -# define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185 -# define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 -# define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220 -# define ASN1_R_INVALID_BMPSTRING_LENGTH 129 -# define ASN1_R_INVALID_DIGIT 130 -# define ASN1_R_INVALID_MIME_TYPE 205 -# define ASN1_R_INVALID_MODIFIER 186 -# define ASN1_R_INVALID_NUMBER 187 -# define ASN1_R_INVALID_OBJECT_ENCODING 216 -# define ASN1_R_INVALID_SEPARATOR 131 -# define ASN1_R_INVALID_TIME_FORMAT 132 -# define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133 -# define ASN1_R_INVALID_UTF8STRING 134 -# define ASN1_R_IV_TOO_LARGE 135 -# define ASN1_R_LENGTH_ERROR 136 -# define ASN1_R_LIST_ERROR 188 -# define ASN1_R_MIME_NO_CONTENT_TYPE 206 -# define ASN1_R_MIME_PARSE_ERROR 207 -# define ASN1_R_MIME_SIG_PARSE_ERROR 208 -# define ASN1_R_MISSING_EOC 137 -# define ASN1_R_MISSING_SECOND_NUMBER 138 -# define ASN1_R_MISSING_VALUE 189 -# define ASN1_R_MSTRING_NOT_UNIVERSAL 139 -# define ASN1_R_MSTRING_WRONG_TAG 140 -# define ASN1_R_NESTED_ASN1_STRING 197 -# define ASN1_R_NON_HEX_CHARACTERS 141 -# define ASN1_R_NOT_ASCII_FORMAT 190 -# define ASN1_R_NOT_ENOUGH_DATA 142 -# define ASN1_R_NO_CONTENT_TYPE 209 -# define ASN1_R_NO_DEFAULT_DIGEST 201 -# define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 -# define ASN1_R_NO_MULTIPART_BODY_FAILURE 210 -# define ASN1_R_NO_MULTIPART_BOUNDARY 211 -# define ASN1_R_NO_SIG_CONTENT_TYPE 212 -# define ASN1_R_NULL_IS_WRONG_LENGTH 144 -# define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191 -# define ASN1_R_ODD_NUMBER_OF_CHARS 145 -# define ASN1_R_PRIVATE_KEY_HEADER_MISSING 146 -# define ASN1_R_SECOND_NUMBER_TOO_LARGE 147 -# define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148 -# define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149 -# define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192 -# define ASN1_R_SHORT_LINE 150 -# define ASN1_R_SIG_INVALID_MIME_TYPE 213 -# define ASN1_R_STREAMING_NOT_SUPPORTED 202 -# define ASN1_R_STRING_TOO_LONG 151 -# define ASN1_R_STRING_TOO_SHORT 152 -# define ASN1_R_TAG_VALUE_TOO_HIGH 153 -# define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154 -# define ASN1_R_TIME_NOT_ASCII_FORMAT 193 -# define ASN1_R_TOO_LONG 155 -# define ASN1_R_TYPE_NOT_CONSTRUCTED 156 -# define ASN1_R_TYPE_NOT_PRIMITIVE 218 -# define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157 -# define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158 -# define ASN1_R_UNEXPECTED_EOC 159 -# define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215 -# define ASN1_R_UNKNOWN_FORMAT 160 -# define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 -# define ASN1_R_UNKNOWN_OBJECT_TYPE 162 -# define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163 -# define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199 -# define ASN1_R_UNKNOWN_TAG 194 -# define ASN1_R_UNKOWN_FORMAT 195 -# define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164 -# define ASN1_R_UNSUPPORTED_CIPHER 165 -# define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM 166 -# define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167 -# define ASN1_R_UNSUPPORTED_TYPE 196 -# define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200 -# define ASN1_R_WRONG_TAG 168 -# define ASN1_R_WRONG_TYPE 169 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ASN1_H +# define HEADER_ASN1_H + +# include +# include +# include +# include +# include +# include +# include + +# include +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif + +# ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +# endif + +#ifdef __cplusplus +extern "C" { +#endif + +# define V_ASN1_UNIVERSAL 0x00 +# define V_ASN1_APPLICATION 0x40 +# define V_ASN1_CONTEXT_SPECIFIC 0x80 +# define V_ASN1_PRIVATE 0xc0 + +# define V_ASN1_CONSTRUCTED 0x20 +# define V_ASN1_PRIMITIVE_TAG 0x1f +# define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG + +# define V_ASN1_APP_CHOOSE -2/* let the recipient choose */ +# define V_ASN1_OTHER -3/* used in ASN1_TYPE */ +# define V_ASN1_ANY -4/* used in ASN1 template code */ + +# define V_ASN1_UNDEF -1 +/* ASN.1 tag values */ +# define V_ASN1_EOC 0 +# define V_ASN1_BOOLEAN 1 /**/ +# define V_ASN1_INTEGER 2 +# define V_ASN1_BIT_STRING 3 +# define V_ASN1_OCTET_STRING 4 +# define V_ASN1_NULL 5 +# define V_ASN1_OBJECT 6 +# define V_ASN1_OBJECT_DESCRIPTOR 7 +# define V_ASN1_EXTERNAL 8 +# define V_ASN1_REAL 9 +# define V_ASN1_ENUMERATED 10 +# define V_ASN1_UTF8STRING 12 +# define V_ASN1_SEQUENCE 16 +# define V_ASN1_SET 17 +# define V_ASN1_NUMERICSTRING 18 /**/ +# define V_ASN1_PRINTABLESTRING 19 +# define V_ASN1_T61STRING 20 +# define V_ASN1_TELETEXSTRING 20/* alias */ +# define V_ASN1_VIDEOTEXSTRING 21 /**/ +# define V_ASN1_IA5STRING 22 +# define V_ASN1_UTCTIME 23 +# define V_ASN1_GENERALIZEDTIME 24 /**/ +# define V_ASN1_GRAPHICSTRING 25 /**/ +# define V_ASN1_ISO64STRING 26 /**/ +# define V_ASN1_VISIBLESTRING 26/* alias */ +# define V_ASN1_GENERALSTRING 27 /**/ +# define V_ASN1_UNIVERSALSTRING 28 /**/ +# define V_ASN1_BMPSTRING 30 + +/* + * NB the constants below are used internally by ASN1_INTEGER + * and ASN1_ENUMERATED to indicate the sign. They are *not* on + * the wire tag values. + */ + +# define V_ASN1_NEG 0x100 +# define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG) +# define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG) + +/* For use with d2i_ASN1_type_bytes() */ +# define B_ASN1_NUMERICSTRING 0x0001 +# define B_ASN1_PRINTABLESTRING 0x0002 +# define B_ASN1_T61STRING 0x0004 +# define B_ASN1_TELETEXSTRING 0x0004 +# define B_ASN1_VIDEOTEXSTRING 0x0008 +# define B_ASN1_IA5STRING 0x0010 +# define B_ASN1_GRAPHICSTRING 0x0020 +# define B_ASN1_ISO64STRING 0x0040 +# define B_ASN1_VISIBLESTRING 0x0040 +# define B_ASN1_GENERALSTRING 0x0080 +# define B_ASN1_UNIVERSALSTRING 0x0100 +# define B_ASN1_OCTET_STRING 0x0200 +# define B_ASN1_BIT_STRING 0x0400 +# define B_ASN1_BMPSTRING 0x0800 +# define B_ASN1_UNKNOWN 0x1000 +# define B_ASN1_UTF8STRING 0x2000 +# define B_ASN1_UTCTIME 0x4000 +# define B_ASN1_GENERALIZEDTIME 0x8000 +# define B_ASN1_SEQUENCE 0x10000 +/* For use with ASN1_mbstring_copy() */ +# define MBSTRING_FLAG 0x1000 +# define MBSTRING_UTF8 (MBSTRING_FLAG) +# define MBSTRING_ASC (MBSTRING_FLAG|1) +# define MBSTRING_BMP (MBSTRING_FLAG|2) +# define MBSTRING_UNIV (MBSTRING_FLAG|4) +# define SMIME_OLDMIME 0x400 +# define SMIME_CRLFEOL 0x800 +# define SMIME_STREAM 0x1000 + struct X509_algor_st; +DEFINE_STACK_OF(X509_ALGOR) + +# define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */ +/* + * This indicates that the ASN1_STRING is not a real value but just a place + * holder for the location where indefinite length constructed data should be + * inserted in the memory buffer + */ +# define ASN1_STRING_FLAG_NDEF 0x010 + +/* + * This flag is used by the CMS code to indicate that a string is not + * complete and is a place holder for content when it had all been accessed. + * The flag will be reset when content has been written to it. + */ + +# define ASN1_STRING_FLAG_CONT 0x020 +/* + * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING + * type. + */ +# define ASN1_STRING_FLAG_MSTRING 0x040 +/* String is embedded and only content should be freed */ +# define ASN1_STRING_FLAG_EMBED 0x080 +/* String should be parsed in RFC 5280's time format */ +# define ASN1_STRING_FLAG_X509_TIME 0x100 +/* This is the base type that holds just about everything :-) */ +struct asn1_string_st { + int length; + int type; + unsigned char *data; + /* + * The value of the following field depends on the type being held. It + * is mostly being used for BIT_STRING so if the input data has a + * non-zero 'unused bits' value, it will be handled correctly + */ + long flags; +}; + +/* + * ASN1_ENCODING structure: this is used to save the received encoding of an + * ASN1 type. This is useful to get round problems with invalid encodings + * which can break signatures. + */ + +typedef struct ASN1_ENCODING_st { + unsigned char *enc; /* DER encoding */ + long len; /* Length of encoding */ + int modified; /* set to 1 if 'enc' is invalid */ +} ASN1_ENCODING; + +/* Used with ASN1 LONG type: if a long is set to this it is omitted */ +# define ASN1_LONG_UNDEF 0x7fffffffL + +# define STABLE_FLAGS_MALLOC 0x01 +/* + * A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted + * as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting + * STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias + * STABLE_FLAGS_CLEAR to reflect this. + */ +# define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC +# define STABLE_NO_MASK 0x02 +# define DIRSTRING_TYPE \ + (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING) +# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING) + +typedef struct asn1_string_table_st { + int nid; + long minsize; + long maxsize; + unsigned long mask; + unsigned long flags; +} ASN1_STRING_TABLE; + +DEFINE_STACK_OF(ASN1_STRING_TABLE) + +/* size limits: this stuff is taken straight from RFC2459 */ + +# define ub_name 32768 +# define ub_common_name 64 +# define ub_locality_name 128 +# define ub_state_name 128 +# define ub_organization_name 64 +# define ub_organization_unit_name 64 +# define ub_title 64 +# define ub_email_address 128 + +/* + * Declarations for template structures: for full definitions see asn1t.h + */ +typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE; +typedef struct ASN1_TLC_st ASN1_TLC; +/* This is just an opaque pointer */ +typedef struct ASN1_VALUE_st ASN1_VALUE; + +/* Declare ASN1 functions: the implement macro in in asn1t.h */ + +# define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type) + +# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \ + DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type) + +# define DECLARE_ASN1_FUNCTIONS_name(type, name) \ + DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ + DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) + +# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \ + DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ + DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) + +# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \ + type *d2i_##name(type **a, const unsigned char **in, long len); \ + int i2d_##name(type *a, unsigned char **out); \ + DECLARE_ASN1_ITEM(itname) + +# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \ + type *d2i_##name(type **a, const unsigned char **in, long len); \ + int i2d_##name(const type *a, unsigned char **out); \ + DECLARE_ASN1_ITEM(name) + +# define DECLARE_ASN1_NDEF_FUNCTION(name) \ + int i2d_##name##_NDEF(name *a, unsigned char **out); + +# define DECLARE_ASN1_FUNCTIONS_const(name) \ + DECLARE_ASN1_ALLOC_FUNCTIONS(name) \ + DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name) + +# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ + type *name##_new(void); \ + void name##_free(type *a); + +# define DECLARE_ASN1_PRINT_FUNCTION(stname) \ + DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname) + +# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \ + int fname##_print_ctx(BIO *out, stname *x, int indent, \ + const ASN1_PCTX *pctx); + +# define D2I_OF(type) type *(*)(type **,const unsigned char **,long) +# define I2D_OF(type) int (*)(type *,unsigned char **) +# define I2D_OF_const(type) int (*)(const type *,unsigned char **) + +# define CHECKED_D2I_OF(type, d2i) \ + ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0))) +# define CHECKED_I2D_OF(type, i2d) \ + ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0))) +# define CHECKED_NEW_OF(type, xnew) \ + ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0))) +# define CHECKED_PTR_OF(type, p) \ + ((void*) (1 ? p : (type*)0)) +# define CHECKED_PPTR_OF(type, p) \ + ((void**) (1 ? p : (type**)0)) + +# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long) +# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **) +# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type) + +TYPEDEF_D2I2D_OF(void); + +/*- + * The following macros and typedefs allow an ASN1_ITEM + * to be embedded in a structure and referenced. Since + * the ASN1_ITEM pointers need to be globally accessible + * (possibly from shared libraries) they may exist in + * different forms. On platforms that support it the + * ASN1_ITEM structure itself will be globally exported. + * Other platforms will export a function that returns + * an ASN1_ITEM pointer. + * + * To handle both cases transparently the macros below + * should be used instead of hard coding an ASN1_ITEM + * pointer in a structure. + * + * The structure will look like this: + * + * typedef struct SOMETHING_st { + * ... + * ASN1_ITEM_EXP *iptr; + * ... + * } SOMETHING; + * + * It would be initialised as e.g.: + * + * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...}; + * + * and the actual pointer extracted with: + * + * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr); + * + * Finally an ASN1_ITEM pointer can be extracted from an + * appropriate reference with: ASN1_ITEM_rptr(X509). This + * would be used when a function takes an ASN1_ITEM * argument. + * + */ + +# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION + +/* ASN1_ITEM pointer exported type */ +typedef const ASN1_ITEM ASN1_ITEM_EXP; + +/* Macro to obtain ASN1_ITEM pointer from exported type */ +# define ASN1_ITEM_ptr(iptr) (iptr) + +/* Macro to include ASN1_ITEM pointer from base type */ +# define ASN1_ITEM_ref(iptr) (&(iptr##_it)) + +# define ASN1_ITEM_rptr(ref) (&(ref##_it)) + +# define DECLARE_ASN1_ITEM(name) \ + OPENSSL_EXTERN const ASN1_ITEM name##_it; + +# else + +/* + * Platforms that can't easily handle shared global variables are declared as + * functions returning ASN1_ITEM pointers. + */ + +/* ASN1_ITEM pointer exported type */ +typedef const ASN1_ITEM *ASN1_ITEM_EXP (void); + +/* Macro to obtain ASN1_ITEM pointer from exported type */ +# define ASN1_ITEM_ptr(iptr) (iptr()) + +/* Macro to include ASN1_ITEM pointer from base type */ +# define ASN1_ITEM_ref(iptr) (iptr##_it) + +# define ASN1_ITEM_rptr(ref) (ref##_it()) + +# define DECLARE_ASN1_ITEM(name) \ + const ASN1_ITEM * name##_it(void); + +# endif + +/* Parameters used by ASN1_STRING_print_ex() */ + +/* + * These determine which characters to escape: RFC2253 special characters, + * control characters and MSB set characters + */ + +# define ASN1_STRFLGS_ESC_2253 1 +# define ASN1_STRFLGS_ESC_CTRL 2 +# define ASN1_STRFLGS_ESC_MSB 4 + +/* + * This flag determines how we do escaping: normally RC2253 backslash only, + * set this to use backslash and quote. + */ + +# define ASN1_STRFLGS_ESC_QUOTE 8 + +/* These three flags are internal use only. */ + +/* Character is a valid PrintableString character */ +# define CHARTYPE_PRINTABLESTRING 0x10 +/* Character needs escaping if it is the first character */ +# define CHARTYPE_FIRST_ESC_2253 0x20 +/* Character needs escaping if it is the last character */ +# define CHARTYPE_LAST_ESC_2253 0x40 + +/* + * NB the internal flags are safely reused below by flags handled at the top + * level. + */ + +/* + * If this is set we convert all character strings to UTF8 first + */ + +# define ASN1_STRFLGS_UTF8_CONVERT 0x10 + +/* + * If this is set we don't attempt to interpret content: just assume all + * strings are 1 byte per character. This will produce some pretty odd + * looking output! + */ + +# define ASN1_STRFLGS_IGNORE_TYPE 0x20 + +/* If this is set we include the string type in the output */ +# define ASN1_STRFLGS_SHOW_TYPE 0x40 + +/* + * This determines which strings to display and which to 'dump' (hex dump of + * content octets or DER encoding). We can only dump non character strings or + * everything. If we don't dump 'unknown' they are interpreted as character + * strings with 1 octet per character and are subject to the usual escaping + * options. + */ + +# define ASN1_STRFLGS_DUMP_ALL 0x80 +# define ASN1_STRFLGS_DUMP_UNKNOWN 0x100 + +/* + * These determine what 'dumping' does, we can dump the content octets or the + * DER encoding: both use the RFC2253 #XXXXX notation. + */ + +# define ASN1_STRFLGS_DUMP_DER 0x200 + +/* + * This flag specifies that RC2254 escaping shall be performed. + */ +#define ASN1_STRFLGS_ESC_2254 0x400 + +/* + * All the string flags consistent with RFC2253, escaping control characters + * isn't essential in RFC2253 but it is advisable anyway. + */ + +# define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \ + ASN1_STRFLGS_ESC_CTRL | \ + ASN1_STRFLGS_ESC_MSB | \ + ASN1_STRFLGS_UTF8_CONVERT | \ + ASN1_STRFLGS_DUMP_UNKNOWN | \ + ASN1_STRFLGS_DUMP_DER) + +DEFINE_STACK_OF(ASN1_INTEGER) + +DEFINE_STACK_OF(ASN1_GENERALSTRING) + +DEFINE_STACK_OF(ASN1_UTF8STRING) + +typedef struct asn1_type_st { + int type; + union { + char *ptr; + ASN1_BOOLEAN boolean; + ASN1_STRING *asn1_string; + ASN1_OBJECT *object; + ASN1_INTEGER *integer; + ASN1_ENUMERATED *enumerated; + ASN1_BIT_STRING *bit_string; + ASN1_OCTET_STRING *octet_string; + ASN1_PRINTABLESTRING *printablestring; + ASN1_T61STRING *t61string; + ASN1_IA5STRING *ia5string; + ASN1_GENERALSTRING *generalstring; + ASN1_BMPSTRING *bmpstring; + ASN1_UNIVERSALSTRING *universalstring; + ASN1_UTCTIME *utctime; + ASN1_GENERALIZEDTIME *generalizedtime; + ASN1_VISIBLESTRING *visiblestring; + ASN1_UTF8STRING *utf8string; + /* + * set and sequence are left complete and still contain the set or + * sequence bytes + */ + ASN1_STRING *set; + ASN1_STRING *sequence; + ASN1_VALUE *asn1_value; + } value; +} ASN1_TYPE; + +DEFINE_STACK_OF(ASN1_TYPE) + +typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY; + +DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SET_ANY) + +/* This is used to contain a list of bit names */ +typedef struct BIT_STRING_BITNAME_st { + int bitnum; + const char *lname; + const char *sname; +} BIT_STRING_BITNAME; + +# define B_ASN1_TIME \ + B_ASN1_UTCTIME | \ + B_ASN1_GENERALIZEDTIME + +# define B_ASN1_PRINTABLE \ + B_ASN1_NUMERICSTRING| \ + B_ASN1_PRINTABLESTRING| \ + B_ASN1_T61STRING| \ + B_ASN1_IA5STRING| \ + B_ASN1_BIT_STRING| \ + B_ASN1_UNIVERSALSTRING|\ + B_ASN1_BMPSTRING|\ + B_ASN1_UTF8STRING|\ + B_ASN1_SEQUENCE|\ + B_ASN1_UNKNOWN + +# define B_ASN1_DIRECTORYSTRING \ + B_ASN1_PRINTABLESTRING| \ + B_ASN1_TELETEXSTRING|\ + B_ASN1_BMPSTRING|\ + B_ASN1_UNIVERSALSTRING|\ + B_ASN1_UTF8STRING + +# define B_ASN1_DISPLAYTEXT \ + B_ASN1_IA5STRING| \ + B_ASN1_VISIBLESTRING| \ + B_ASN1_BMPSTRING|\ + B_ASN1_UTF8STRING + +DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) + +int ASN1_TYPE_get(const ASN1_TYPE *a); +void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); +int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b); + +ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t); +void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t); + +ASN1_OBJECT *ASN1_OBJECT_new(void); +void ASN1_OBJECT_free(ASN1_OBJECT *a); +int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp); +ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, + long length); + +DECLARE_ASN1_ITEM(ASN1_OBJECT) + +DEFINE_STACK_OF(ASN1_OBJECT) + +ASN1_STRING *ASN1_STRING_new(void); +void ASN1_STRING_free(ASN1_STRING *a); +void ASN1_STRING_clear_free(ASN1_STRING *a); +int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str); +ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a); +ASN1_STRING *ASN1_STRING_type_new(int type); +int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b); + /* + * Since this is used to store all sorts of things, via macros, for now, + * make its data void * + */ +int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); +void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); +int ASN1_STRING_length(const ASN1_STRING *x); +void ASN1_STRING_length_set(ASN1_STRING *x, int n); +int ASN1_STRING_type(const ASN1_STRING *x); +DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) +const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x); + +DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING) +int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length); +int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); +int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n); +int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a, + const unsigned char *flags, int flags_len); + +int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, + BIT_STRING_BITNAME *tbl, int indent); +int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl); +int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value, + BIT_STRING_BITNAME *tbl); + +DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER) +ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, + long length); +ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x); +int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y); + +DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED) + +int ASN1_UTCTIME_check(const ASN1_UTCTIME *a); +ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t); +ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, + int offset_day, long offset_sec); +int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); +int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); + +int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a); +ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, + time_t t); +ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, + time_t t, int offset_day, + long offset_sec); +int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); + +int ASN1_TIME_diff(int *pday, int *psec, + const ASN1_TIME *from, const ASN1_TIME *to); + +DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING) +ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a); +int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a, + const ASN1_OCTET_STRING *b); +int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, + int len); + +DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING) +DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING) +DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING) +DECLARE_ASN1_FUNCTIONS(ASN1_NULL) +DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING) + +int UTF8_getc(const unsigned char *str, int len, unsigned long *val); +int UTF8_putc(unsigned char *str, int len, unsigned long value); + +DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE) + +DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING) +DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT) +DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING) +DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING) +DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING) +DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING) +DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME) +DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME) +DECLARE_ASN1_FUNCTIONS(ASN1_TIME) + +DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF) + +ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t); +ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t, + int offset_day, long offset_sec); +int ASN1_TIME_check(const ASN1_TIME *t); +ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, + ASN1_GENERALIZEDTIME **out); +int ASN1_TIME_set_string(ASN1_TIME *s, const char *str); +int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str); +int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm); +int ASN1_TIME_normalize(ASN1_TIME *s); +int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t); +int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b); + +int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a); +int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size); +int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a); +int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size); +int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a); +int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size); +int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type); +int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a); + +int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num); +ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len, + const char *sn, const char *ln); + +int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a); +int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r); +int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a); +int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r); + +int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); +long ASN1_INTEGER_get(const ASN1_INTEGER *a); +ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); +BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn); + +int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a); +int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r); + + +int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); +long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a); +ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai); +BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn); + +/* General */ +/* given a string, return the correct type, max is the maximum length */ +int ASN1_PRINTABLE_type(const unsigned char *s, int max); + +unsigned long ASN1_tag2bit(int tag); + +/* SPECIALS */ +int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, + int *pclass, long omax); +int ASN1_check_infinite_end(unsigned char **p, long len); +int ASN1_const_check_infinite_end(const unsigned char **p, long len); +void ASN1_put_object(unsigned char **pp, int constructed, int length, + int tag, int xclass); +int ASN1_put_eoc(unsigned char **pp); +int ASN1_object_size(int constructed, int length, int tag); + +/* Used to implement other functions */ +void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x); + +# define ASN1_dup_of(type,i2d,d2i,x) \ + ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \ + CHECKED_D2I_OF(type, d2i), \ + CHECKED_PTR_OF(type, x))) + +# define ASN1_dup_of_const(type,i2d,d2i,x) \ + ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \ + CHECKED_D2I_OF(type, d2i), \ + CHECKED_PTR_OF(const type, x))) + +void *ASN1_item_dup(const ASN1_ITEM *it, void *x); + +/* ASN1 alloc/free macros for when a type is only used internally */ + +# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type)) +# define M_ASN1_free_of(x, type) \ + ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type)) + +# ifndef OPENSSL_NO_STDIO +void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x); + +# define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ + ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \ + CHECKED_D2I_OF(type, d2i), \ + in, \ + CHECKED_PPTR_OF(type, x))) + +void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); +int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x); + +# define ASN1_i2d_fp_of(type,i2d,out,x) \ + (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \ + out, \ + CHECKED_PTR_OF(type, x))) + +# define ASN1_i2d_fp_of_const(type,i2d,out,x) \ + (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \ + out, \ + CHECKED_PTR_OF(const type, x))) + +int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); +int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags); +# endif + +int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in); + +void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x); + +# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ + ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \ + CHECKED_D2I_OF(type, d2i), \ + in, \ + CHECKED_PPTR_OF(type, x))) + +void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); +int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x); + +# define ASN1_i2d_bio_of(type,i2d,out,x) \ + (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \ + out, \ + CHECKED_PTR_OF(type, x))) + +# define ASN1_i2d_bio_of_const(type,i2d,out,x) \ + (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \ + out, \ + CHECKED_PTR_OF(const type, x))) + +int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); +int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a); +int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a); +int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a); +int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v); +int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags); +int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off); +int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, + unsigned char *buf, int off); +int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent); +int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent, + int dump); +const char *ASN1_tag2str(int tag); + +/* Used to load and write Netscape format cert */ + +int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); + +int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len); +int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len); +int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, + unsigned char *data, int len); +int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num, + unsigned char *data, int max_len); + +void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it); + +ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, + ASN1_OCTET_STRING **oct); + +void ASN1_STRING_set_default_mask(unsigned long mask); +int ASN1_STRING_set_default_mask_asc(const char *p); +unsigned long ASN1_STRING_get_default_mask(void); +int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, + int inform, unsigned long mask); +int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, + int inform, unsigned long mask, + long minsize, long maxsize); + +ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, + const unsigned char *in, int inlen, + int inform, int nid); +ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid); +int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long); +void ASN1_STRING_TABLE_cleanup(void); + +/* ASN1 template functions */ + +/* Old API compatible functions */ +ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it); +void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it); +ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, + long len, const ASN1_ITEM *it); +int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); +int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, + const ASN1_ITEM *it); + +void ASN1_add_oid_module(void); +void ASN1_add_stable_module(void); + +ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf); +ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf); +int ASN1_str2mask(const char *str, unsigned long *pmask); + +/* ASN1 Print flags */ + +/* Indicate missing OPTIONAL fields */ +# define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001 +/* Mark start and end of SEQUENCE */ +# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002 +/* Mark start and end of SEQUENCE/SET OF */ +# define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004 +/* Show the ASN1 type of primitives */ +# define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008 +/* Don't show ASN1 type of ANY */ +# define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010 +/* Don't show ASN1 type of MSTRINGs */ +# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020 +/* Don't show field names in SEQUENCE */ +# define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040 +/* Show structure names of each SEQUENCE field */ +# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080 +/* Don't show structure name even at top level */ +# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100 + +int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent, + const ASN1_ITEM *it, const ASN1_PCTX *pctx); +ASN1_PCTX *ASN1_PCTX_new(void); +void ASN1_PCTX_free(ASN1_PCTX *p); +unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p); +void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags); +unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p); +void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags); +unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p); +void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags); +unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p); +void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags); +unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p); +void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); + +ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx)); +void ASN1_SCTX_free(ASN1_SCTX *p); +const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p); +const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p); +unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p); +void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data); +void *ASN1_SCTX_get_app_data(ASN1_SCTX *p); + +const BIO_METHOD *BIO_f_asn1(void); + +BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); + +int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, + const ASN1_ITEM *it); +int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, + const char *hdr, const ASN1_ITEM *it); +int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, + int ctype_nid, int econt_nid, + STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it); +ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); +int SMIME_crlf_copy(BIO *in, BIO *out, int flags); +int SMIME_text(BIO *in, BIO *out); + +const ASN1_ITEM *ASN1_ITEM_lookup(const char *name); +const ASN1_ITEM *ASN1_ITEM_get(size_t i); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/asn1_mac.h b/src/Mayaqua/win32_inc/openssl/asn1_mac.h index 27904e0a..7ac1782a 100644 --- a/src/Mayaqua/win32_inc/openssl/asn1_mac.h +++ b/src/Mayaqua/win32_inc/openssl/asn1_mac.h @@ -1,579 +1,10 @@ -/* crypto/asn1/asn1_mac.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ASN1_MAC_H -# define HEADER_ASN1_MAC_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifndef ASN1_MAC_ERR_LIB -# define ASN1_MAC_ERR_LIB ERR_LIB_ASN1 -# endif - -# define ASN1_MAC_H_err(f,r,line) \ - ERR_PUT_error(ASN1_MAC_ERR_LIB,(f),(r),__FILE__,(line)) - -# define M_ASN1_D2I_vars(a,type,func) \ - ASN1_const_CTX c; \ - type ret=NULL; \ - \ - c.pp=(const unsigned char **)pp; \ - c.q= *(const unsigned char **)pp; \ - c.error=ERR_R_NESTED_ASN1_ERROR; \ - if ((a == NULL) || ((*a) == NULL)) \ - { if ((ret=(type)func()) == NULL) \ - { c.line=__LINE__; goto err; } } \ - else ret=(*a); - -# define M_ASN1_D2I_Init() \ - c.p= *(const unsigned char **)pp; \ - c.max=(length == 0)?0:(c.p+length); - -# define M_ASN1_D2I_Finish_2(a) \ - if (!asn1_const_Finish(&c)) \ - { c.line=__LINE__; goto err; } \ - *(const unsigned char **)pp=c.p; \ - if (a != NULL) (*a)=ret; \ - return(ret); - -# define M_ASN1_D2I_Finish(a,func,e) \ - M_ASN1_D2I_Finish_2(a); \ -err:\ - ASN1_MAC_H_err((e),c.error,c.line); \ - asn1_add_error(*(const unsigned char **)pp,(int)(c.q- *pp)); \ - if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \ - return(NULL) - -# define M_ASN1_D2I_start_sequence() \ - if (!asn1_GetSequence(&c,&length)) \ - { c.line=__LINE__; goto err; } -/* Begin reading ASN1 without a surrounding sequence */ -# define M_ASN1_D2I_begin() \ - c.slen = length; - -/* End reading ASN1 with no check on length */ -# define M_ASN1_D2I_Finish_nolen(a, func, e) \ - *pp=c.p; \ - if (a != NULL) (*a)=ret; \ - return(ret); \ -err:\ - ASN1_MAC_H_err((e),c.error,c.line); \ - asn1_add_error(*pp,(int)(c.q- *pp)); \ - if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \ - return(NULL) - -# define M_ASN1_D2I_end_sequence() \ - (((c.inf&1) == 0)?(c.slen <= 0): \ - (c.eos=ASN1_const_check_infinite_end(&c.p,c.slen))) - -/* Don't use this with d2i_ASN1_BOOLEAN() */ -# define M_ASN1_D2I_get(b, func) \ - c.q=c.p; \ - if (func(&(b),&c.p,c.slen) == NULL) \ - {c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -/* Don't use this with d2i_ASN1_BOOLEAN() */ -# define M_ASN1_D2I_get_x(type,b,func) \ - c.q=c.p; \ - if (((D2I_OF(type))func)(&(b),&c.p,c.slen) == NULL) \ - {c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -/* use this instead () */ -# define M_ASN1_D2I_get_int(b,func) \ - c.q=c.p; \ - if (func(&(b),&c.p,c.slen) < 0) \ - {c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -# define M_ASN1_D2I_get_opt(b,func,type) \ - if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \ - == (V_ASN1_UNIVERSAL|(type)))) \ - { \ - M_ASN1_D2I_get(b,func); \ - } - -# define M_ASN1_D2I_get_int_opt(b,func,type) \ - if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \ - == (V_ASN1_UNIVERSAL|(type)))) \ - { \ - M_ASN1_D2I_get_int(b,func); \ - } - -# define M_ASN1_D2I_get_imp(b,func, type) \ - M_ASN1_next=(_tmp& V_ASN1_CONSTRUCTED)|type; \ - c.q=c.p; \ - if (func(&(b),&c.p,c.slen) == NULL) \ - {c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \ - c.slen-=(c.p-c.q);\ - M_ASN1_next_prev=_tmp; - -# define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \ - if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \ - (V_ASN1_CONTEXT_SPECIFIC|(tag)))) \ - { \ - unsigned char _tmp = M_ASN1_next; \ - M_ASN1_D2I_get_imp(b,func, type);\ - } - -# define M_ASN1_D2I_get_set(r,func,free_func) \ - M_ASN1_D2I_get_imp_set(r,func,free_func, \ - V_ASN1_SET,V_ASN1_UNIVERSAL); - -# define M_ASN1_D2I_get_set_type(type,r,func,free_func) \ - M_ASN1_D2I_get_imp_set_type(type,r,func,free_func, \ - V_ASN1_SET,V_ASN1_UNIVERSAL); - -# define M_ASN1_D2I_get_set_opt(r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SET)))\ - { M_ASN1_D2I_get_set(r,func,free_func); } - -# define M_ASN1_D2I_get_set_opt_type(type,r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SET)))\ - { M_ASN1_D2I_get_set_type(type,r,func,free_func); } - -# define M_ASN1_I2D_len_SET_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_len_SET(a,f); - -# define M_ASN1_I2D_put_SET_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_put_SET(a,f); - -# define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_put_SEQUENCE(a,f); - -# define M_ASN1_I2D_put_SEQUENCE_opt_type(type,a,f) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - M_ASN1_I2D_put_SEQUENCE_type(type,a,f); - -# define M_ASN1_D2I_get_IMP_set_opt(b,func,free_func,tag) \ - if ((c.slen != 0) && \ - (M_ASN1_next == \ - (V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\ - { \ - M_ASN1_D2I_get_imp_set(b,func,free_func,\ - tag,V_ASN1_CONTEXT_SPECIFIC); \ - } - -# define M_ASN1_D2I_get_IMP_set_opt_type(type,b,func,free_func,tag) \ - if ((c.slen != 0) && \ - (M_ASN1_next == \ - (V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\ - { \ - M_ASN1_D2I_get_imp_set_type(type,b,func,free_func,\ - tag,V_ASN1_CONTEXT_SPECIFIC); \ - } - -# define M_ASN1_D2I_get_seq(r,func,free_func) \ - M_ASN1_D2I_get_imp_set(r,func,free_func,\ - V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); - -# define M_ASN1_D2I_get_seq_type(type,r,func,free_func) \ - M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\ - V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL) - -# define M_ASN1_D2I_get_seq_opt(r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\ - { M_ASN1_D2I_get_seq(r,func,free_func); } - -# define M_ASN1_D2I_get_seq_opt_type(type,r,func,free_func) \ - if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \ - V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\ - { M_ASN1_D2I_get_seq_type(type,r,func,free_func); } - -# define M_ASN1_D2I_get_IMP_set(r,func,free_func,x) \ - M_ASN1_D2I_get_imp_set(r,func,free_func,\ - x,V_ASN1_CONTEXT_SPECIFIC); - -# define M_ASN1_D2I_get_IMP_set_type(type,r,func,free_func,x) \ - M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\ - x,V_ASN1_CONTEXT_SPECIFIC); - -# define M_ASN1_D2I_get_imp_set(r,func,free_func,a,b) \ - c.q=c.p; \ - if (d2i_ASN1_SET(&(r),&c.p,c.slen,(char *(*)())func,\ - (void (*)())free_func,a,b) == NULL) \ - { c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -# define M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,a,b) \ - c.q=c.p; \ - if (d2i_ASN1_SET_OF_##type(&(r),&c.p,c.slen,func,\ - free_func,a,b) == NULL) \ - { c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -# define M_ASN1_D2I_get_set_strings(r,func,a,b) \ - c.q=c.p; \ - if (d2i_ASN1_STRING_SET(&(r),&c.p,c.slen,a,b) == NULL) \ - { c.line=__LINE__; goto err; } \ - c.slen-=(c.p-c.q); - -# define M_ASN1_D2I_get_EXP_opt(r,func,tag) \ - if ((c.slen != 0L) && (M_ASN1_next == \ - (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \ - { \ - int Tinf,Ttag,Tclass; \ - long Tlen; \ - \ - c.q=c.p; \ - Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \ - if (Tinf & 0x80) \ - { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \ - c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) \ - Tlen = c.slen - (c.p - c.q) - 2; \ - if (func(&(r),&c.p,Tlen) == NULL) \ - { c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \ - Tlen = c.slen - (c.p - c.q); \ - if(!ASN1_const_check_infinite_end(&c.p, Tlen)) \ - { c.error=ERR_R_MISSING_ASN1_EOS; \ - c.line=__LINE__; goto err; } \ - }\ - c.slen-=(c.p-c.q); \ - } - -# define M_ASN1_D2I_get_EXP_set_opt(r,func,free_func,tag,b) \ - if ((c.slen != 0) && (M_ASN1_next == \ - (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \ - { \ - int Tinf,Ttag,Tclass; \ - long Tlen; \ - \ - c.q=c.p; \ - Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \ - if (Tinf & 0x80) \ - { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \ - c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) \ - Tlen = c.slen - (c.p - c.q) - 2; \ - if (d2i_ASN1_SET(&(r),&c.p,Tlen,(char *(*)())func, \ - (void (*)())free_func, \ - b,V_ASN1_UNIVERSAL) == NULL) \ - { c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \ - Tlen = c.slen - (c.p - c.q); \ - if(!ASN1_check_infinite_end(&c.p, Tlen)) \ - { c.error=ERR_R_MISSING_ASN1_EOS; \ - c.line=__LINE__; goto err; } \ - }\ - c.slen-=(c.p-c.q); \ - } - -# define M_ASN1_D2I_get_EXP_set_opt_type(type,r,func,free_func,tag,b) \ - if ((c.slen != 0) && (M_ASN1_next == \ - (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \ - { \ - int Tinf,Ttag,Tclass; \ - long Tlen; \ - \ - c.q=c.p; \ - Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \ - if (Tinf & 0x80) \ - { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \ - c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) \ - Tlen = c.slen - (c.p - c.q) - 2; \ - if (d2i_ASN1_SET_OF_##type(&(r),&c.p,Tlen,func, \ - free_func,b,V_ASN1_UNIVERSAL) == NULL) \ - { c.line=__LINE__; goto err; } \ - if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \ - Tlen = c.slen - (c.p - c.q); \ - if(!ASN1_check_infinite_end(&c.p, Tlen)) \ - { c.error=ERR_R_MISSING_ASN1_EOS; \ - c.line=__LINE__; goto err; } \ - }\ - c.slen-=(c.p-c.q); \ - } - -/* New macros */ -# define M_ASN1_New_Malloc(ret,type) \ - if ((ret=(type *)OPENSSL_malloc(sizeof(type))) == NULL) \ - { c.line=__LINE__; goto err2; } - -# define M_ASN1_New(arg,func) \ - if (((arg)=func()) == NULL) return(NULL) - -# define M_ASN1_New_Error(a) \ -/*- err: ASN1_MAC_H_err((a),ERR_R_NESTED_ASN1_ERROR,c.line); \ - return(NULL);*/ \ - err2: ASN1_MAC_H_err((a),ERR_R_MALLOC_FAILURE,c.line); \ - return(NULL) - -/* - * BIG UGLY WARNING! This is so damn ugly I wanna puke. Unfortunately, some - * macros that use ASN1_const_CTX still insist on writing in the input - * stream. ARGH! ARGH! ARGH! Let's get rid of this macro package. Please? -- - * Richard Levitte - */ -# define M_ASN1_next (*((unsigned char *)(c.p))) -# define M_ASN1_next_prev (*((unsigned char *)(c.q))) - -/*************************************************/ - -# define M_ASN1_I2D_vars(a) int r=0,ret=0; \ - unsigned char *p; \ - if (a == NULL) return(0) - -/* Length Macros */ -# define M_ASN1_I2D_len(a,f) ret+=f(a,NULL) -# define M_ASN1_I2D_len_IMP_opt(a,f) if (a != NULL) M_ASN1_I2D_len(a,f) - -# define M_ASN1_I2D_len_SET(a,f) \ - ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET); - -# define M_ASN1_I2D_len_SET_type(type,a,f) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SET, \ - V_ASN1_UNIVERSAL,IS_SET); - -# define M_ASN1_I2D_len_SEQUENCE(a,f) \ - ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); - -# define M_ASN1_I2D_len_SEQUENCE_type(type,a,f) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SEQUENCE, \ - V_ASN1_UNIVERSAL,IS_SEQUENCE) - -# define M_ASN1_I2D_len_SEQUENCE_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_len_SEQUENCE(a,f); - -# define M_ASN1_I2D_len_SEQUENCE_opt_type(type,a,f) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - M_ASN1_I2D_len_SEQUENCE_type(type,a,f); - -# define M_ASN1_I2D_len_IMP_SET(a,f,x) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET); - -# define M_ASN1_I2D_len_IMP_SET_type(type,a,f,x) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \ - V_ASN1_CONTEXT_SPECIFIC,IS_SET); - -# define M_ASN1_I2D_len_IMP_SET_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SET); - -# define M_ASN1_I2D_len_IMP_SET_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \ - V_ASN1_CONTEXT_SPECIFIC,IS_SET); - -# define M_ASN1_I2D_len_IMP_SEQUENCE(a,f,x) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); - -# define M_ASN1_I2D_len_IMP_SEQUENCE_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); - -# define M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \ - V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); - -# define M_ASN1_I2D_len_EXP_opt(a,f,mtag,v) \ - if (a != NULL)\ - { \ - v=f(a,NULL); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -# define M_ASN1_I2D_len_EXP_SET_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0))\ - { \ - v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL,IS_SET); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -# define M_ASN1_I2D_len_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0))\ - { \ - v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -# define M_ASN1_I2D_len_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_##type##_num(a) != 0))\ - { \ - v=i2d_ASN1_SET_OF_##type(a,NULL,f,tag, \ - V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); \ - ret+=ASN1_object_size(1,v,mtag); \ - } - -/* Put Macros */ -# define M_ASN1_I2D_put(a,f) f(a,&p) - -# define M_ASN1_I2D_put_IMP_opt(a,f,t) \ - if (a != NULL) \ - { \ - unsigned char *q=p; \ - f(a,&p); \ - *q=(V_ASN1_CONTEXT_SPECIFIC|t|(*q&V_ASN1_CONSTRUCTED));\ - } - -# define M_ASN1_I2D_put_SET(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SET,\ - V_ASN1_UNIVERSAL,IS_SET) -# define M_ASN1_I2D_put_SET_type(type,a,f) \ - i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET) -# define M_ASN1_I2D_put_IMP_SET(a,f,x) i2d_ASN1_SET(a,&p,f,x,\ - V_ASN1_CONTEXT_SPECIFIC,IS_SET) -# define M_ASN1_I2D_put_IMP_SET_type(type,a,f,x) \ - i2d_ASN1_SET_OF_##type(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET) -# define M_ASN1_I2D_put_IMP_SEQUENCE(a,f,x) i2d_ASN1_SET(a,&p,f,x,\ - V_ASN1_CONTEXT_SPECIFIC,IS_SEQUENCE) - -# define M_ASN1_I2D_put_SEQUENCE(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SEQUENCE,\ - V_ASN1_UNIVERSAL,IS_SEQUENCE) - -# define M_ASN1_I2D_put_SEQUENCE_type(type,a,f) \ - i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE) - -# define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - M_ASN1_I2D_put_SEQUENCE(a,f); - -# define M_ASN1_I2D_put_IMP_SET_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SET); } - -# define M_ASN1_I2D_put_IMP_SET_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - { i2d_ASN1_SET_OF_##type(a,&p,f,x, \ - V_ASN1_CONTEXT_SPECIFIC, \ - IS_SET); } - -# define M_ASN1_I2D_put_IMP_SEQUENCE_opt(a,f,x) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); } - -# define M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(type,a,f,x) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - { i2d_ASN1_SET_OF_##type(a,&p,f,x, \ - V_ASN1_CONTEXT_SPECIFIC, \ - IS_SEQUENCE); } - -# define M_ASN1_I2D_put_EXP_opt(a,f,tag,v) \ - if (a != NULL) \ - { \ - ASN1_put_object(&p,1,v,tag,V_ASN1_CONTEXT_SPECIFIC); \ - f(a,&p); \ - } - -# define M_ASN1_I2D_put_EXP_SET_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { \ - ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \ - i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SET); \ - } - -# define M_ASN1_I2D_put_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_num(a) != 0)) \ - { \ - ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \ - i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SEQUENCE); \ - } - -# define M_ASN1_I2D_put_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \ - if ((a != NULL) && (sk_##type##_num(a) != 0)) \ - { \ - ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \ - i2d_ASN1_SET_OF_##type(a,&p,f,tag,V_ASN1_UNIVERSAL, \ - IS_SEQUENCE); \ - } - -# define M_ASN1_I2D_seq_total() \ - r=ASN1_object_size(1,ret,V_ASN1_SEQUENCE); \ - if (pp == NULL) return(r); \ - p= *pp; \ - ASN1_put_object(&p,1,ret,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL) - -# define M_ASN1_I2D_INF_seq_start(tag,ctx) \ - *(p++)=(V_ASN1_CONSTRUCTED|(tag)|(ctx)); \ - *(p++)=0x80 - -# define M_ASN1_I2D_INF_seq_end() *(p++)=0x00; *(p++)=0x00 - -# define M_ASN1_I2D_finish() *pp=p; \ - return(r); - -int asn1_GetSequence(ASN1_const_CTX *c, long *length); -void asn1_add_error(const unsigned char *address, int offset); -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#error "This file is obsolete; please update your software." diff --git a/src/Mayaqua/win32_inc/openssl/asn1err.h b/src/Mayaqua/win32_inc/openssl/asn1err.h new file mode 100644 index 00000000..faed5a55 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/asn1err.h @@ -0,0 +1,256 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ASN1ERR_H +# define HEADER_ASN1ERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_ASN1_strings(void); + +/* + * ASN1 function codes. + */ +# define ASN1_F_A2D_ASN1_OBJECT 100 +# define ASN1_F_A2I_ASN1_INTEGER 102 +# define ASN1_F_A2I_ASN1_STRING 103 +# define ASN1_F_APPEND_EXP 176 +# define ASN1_F_ASN1_BIO_INIT 113 +# define ASN1_F_ASN1_BIT_STRING_SET_BIT 183 +# define ASN1_F_ASN1_CB 177 +# define ASN1_F_ASN1_CHECK_TLEN 104 +# define ASN1_F_ASN1_COLLECT 106 +# define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108 +# define ASN1_F_ASN1_D2I_FP 109 +# define ASN1_F_ASN1_D2I_READ_BIO 107 +# define ASN1_F_ASN1_DIGEST 184 +# define ASN1_F_ASN1_DO_ADB 110 +# define ASN1_F_ASN1_DO_LOCK 233 +# define ASN1_F_ASN1_DUP 111 +# define ASN1_F_ASN1_ENC_SAVE 115 +# define ASN1_F_ASN1_EX_C2I 204 +# define ASN1_F_ASN1_FIND_END 190 +# define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216 +# define ASN1_F_ASN1_GENERATE_V3 178 +# define ASN1_F_ASN1_GET_INT64 224 +# define ASN1_F_ASN1_GET_OBJECT 114 +# define ASN1_F_ASN1_GET_UINT64 225 +# define ASN1_F_ASN1_I2D_BIO 116 +# define ASN1_F_ASN1_I2D_FP 117 +# define ASN1_F_ASN1_ITEM_D2I_FP 206 +# define ASN1_F_ASN1_ITEM_DUP 191 +# define ASN1_F_ASN1_ITEM_EMBED_D2I 120 +# define ASN1_F_ASN1_ITEM_EMBED_NEW 121 +# define ASN1_F_ASN1_ITEM_FLAGS_I2D 118 +# define ASN1_F_ASN1_ITEM_I2D_BIO 192 +# define ASN1_F_ASN1_ITEM_I2D_FP 193 +# define ASN1_F_ASN1_ITEM_PACK 198 +# define ASN1_F_ASN1_ITEM_SIGN 195 +# define ASN1_F_ASN1_ITEM_SIGN_CTX 220 +# define ASN1_F_ASN1_ITEM_UNPACK 199 +# define ASN1_F_ASN1_ITEM_VERIFY 197 +# define ASN1_F_ASN1_MBSTRING_NCOPY 122 +# define ASN1_F_ASN1_OBJECT_NEW 123 +# define ASN1_F_ASN1_OUTPUT_DATA 214 +# define ASN1_F_ASN1_PCTX_NEW 205 +# define ASN1_F_ASN1_PRIMITIVE_NEW 119 +# define ASN1_F_ASN1_SCTX_NEW 221 +# define ASN1_F_ASN1_SIGN 128 +# define ASN1_F_ASN1_STR2TYPE 179 +# define ASN1_F_ASN1_STRING_GET_INT64 227 +# define ASN1_F_ASN1_STRING_GET_UINT64 230 +# define ASN1_F_ASN1_STRING_SET 186 +# define ASN1_F_ASN1_STRING_TABLE_ADD 129 +# define ASN1_F_ASN1_STRING_TO_BN 228 +# define ASN1_F_ASN1_STRING_TYPE_NEW 130 +# define ASN1_F_ASN1_TEMPLATE_EX_D2I 132 +# define ASN1_F_ASN1_TEMPLATE_NEW 133 +# define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131 +# define ASN1_F_ASN1_TIME_ADJ 217 +# define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 +# define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 +# define ASN1_F_ASN1_UTCTIME_ADJ 218 +# define ASN1_F_ASN1_VERIFY 137 +# define ASN1_F_B64_READ_ASN1 209 +# define ASN1_F_B64_WRITE_ASN1 210 +# define ASN1_F_BIO_NEW_NDEF 208 +# define ASN1_F_BITSTR_CB 180 +# define ASN1_F_BN_TO_ASN1_STRING 229 +# define ASN1_F_C2I_ASN1_BIT_STRING 189 +# define ASN1_F_C2I_ASN1_INTEGER 194 +# define ASN1_F_C2I_ASN1_OBJECT 196 +# define ASN1_F_C2I_IBUF 226 +# define ASN1_F_C2I_UINT64_INT 101 +# define ASN1_F_COLLECT_DATA 140 +# define ASN1_F_D2I_ASN1_OBJECT 147 +# define ASN1_F_D2I_ASN1_UINTEGER 150 +# define ASN1_F_D2I_AUTOPRIVATEKEY 207 +# define ASN1_F_D2I_PRIVATEKEY 154 +# define ASN1_F_D2I_PUBLICKEY 155 +# define ASN1_F_DO_BUF 142 +# define ASN1_F_DO_CREATE 124 +# define ASN1_F_DO_DUMP 125 +# define ASN1_F_DO_TCREATE 222 +# define ASN1_F_I2A_ASN1_OBJECT 126 +# define ASN1_F_I2D_ASN1_BIO_STREAM 211 +# define ASN1_F_I2D_ASN1_OBJECT 143 +# define ASN1_F_I2D_DSA_PUBKEY 161 +# define ASN1_F_I2D_EC_PUBKEY 181 +# define ASN1_F_I2D_PRIVATEKEY 163 +# define ASN1_F_I2D_PUBLICKEY 164 +# define ASN1_F_I2D_RSA_PUBKEY 165 +# define ASN1_F_LONG_C2I 166 +# define ASN1_F_NDEF_PREFIX 127 +# define ASN1_F_NDEF_SUFFIX 136 +# define ASN1_F_OID_MODULE_INIT 174 +# define ASN1_F_PARSE_TAGGING 182 +# define ASN1_F_PKCS5_PBE2_SET_IV 167 +# define ASN1_F_PKCS5_PBE2_SET_SCRYPT 231 +# define ASN1_F_PKCS5_PBE_SET 202 +# define ASN1_F_PKCS5_PBE_SET0_ALGOR 215 +# define ASN1_F_PKCS5_PBKDF2_SET 219 +# define ASN1_F_PKCS5_SCRYPT_SET 232 +# define ASN1_F_SMIME_READ_ASN1 212 +# define ASN1_F_SMIME_TEXT 213 +# define ASN1_F_STABLE_GET 138 +# define ASN1_F_STBL_MODULE_INIT 223 +# define ASN1_F_UINT32_C2I 105 +# define ASN1_F_UINT32_NEW 139 +# define ASN1_F_UINT64_C2I 112 +# define ASN1_F_UINT64_NEW 141 +# define ASN1_F_X509_CRL_ADD0_REVOKED 169 +# define ASN1_F_X509_INFO_NEW 170 +# define ASN1_F_X509_NAME_ENCODE 203 +# define ASN1_F_X509_NAME_EX_D2I 158 +# define ASN1_F_X509_NAME_EX_NEW 171 +# define ASN1_F_X509_PKEY_NEW 173 + +/* + * ASN1 reason codes. + */ +# define ASN1_R_ADDING_OBJECT 171 +# define ASN1_R_ASN1_PARSE_ERROR 203 +# define ASN1_R_ASN1_SIG_PARSE_ERROR 204 +# define ASN1_R_AUX_ERROR 100 +# define ASN1_R_BAD_OBJECT_HEADER 102 +# define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214 +# define ASN1_R_BN_LIB 105 +# define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 +# define ASN1_R_BUFFER_TOO_SMALL 107 +# define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108 +# define ASN1_R_CONTEXT_NOT_INITIALISED 217 +# define ASN1_R_DATA_IS_WRONG 109 +# define ASN1_R_DECODE_ERROR 110 +# define ASN1_R_DEPTH_EXCEEDED 174 +# define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198 +# define ASN1_R_ENCODE_ERROR 112 +# define ASN1_R_ERROR_GETTING_TIME 173 +# define ASN1_R_ERROR_LOADING_SECTION 172 +# define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114 +# define ASN1_R_EXPECTING_AN_INTEGER 115 +# define ASN1_R_EXPECTING_AN_OBJECT 116 +# define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119 +# define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120 +# define ASN1_R_FIELD_MISSING 121 +# define ASN1_R_FIRST_NUM_TOO_LARGE 122 +# define ASN1_R_HEADER_TOO_LONG 123 +# define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175 +# define ASN1_R_ILLEGAL_BOOLEAN 176 +# define ASN1_R_ILLEGAL_CHARACTERS 124 +# define ASN1_R_ILLEGAL_FORMAT 177 +# define ASN1_R_ILLEGAL_HEX 178 +# define ASN1_R_ILLEGAL_IMPLICIT_TAG 179 +# define ASN1_R_ILLEGAL_INTEGER 180 +# define ASN1_R_ILLEGAL_NEGATIVE_VALUE 226 +# define ASN1_R_ILLEGAL_NESTED_TAGGING 181 +# define ASN1_R_ILLEGAL_NULL 125 +# define ASN1_R_ILLEGAL_NULL_VALUE 182 +# define ASN1_R_ILLEGAL_OBJECT 183 +# define ASN1_R_ILLEGAL_OPTIONAL_ANY 126 +# define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170 +# define ASN1_R_ILLEGAL_PADDING 221 +# define ASN1_R_ILLEGAL_TAGGED_ANY 127 +# define ASN1_R_ILLEGAL_TIME_VALUE 184 +# define ASN1_R_ILLEGAL_ZERO_CONTENT 222 +# define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185 +# define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 +# define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220 +# define ASN1_R_INVALID_BMPSTRING_LENGTH 129 +# define ASN1_R_INVALID_DIGIT 130 +# define ASN1_R_INVALID_MIME_TYPE 205 +# define ASN1_R_INVALID_MODIFIER 186 +# define ASN1_R_INVALID_NUMBER 187 +# define ASN1_R_INVALID_OBJECT_ENCODING 216 +# define ASN1_R_INVALID_SCRYPT_PARAMETERS 227 +# define ASN1_R_INVALID_SEPARATOR 131 +# define ASN1_R_INVALID_STRING_TABLE_VALUE 218 +# define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133 +# define ASN1_R_INVALID_UTF8STRING 134 +# define ASN1_R_INVALID_VALUE 219 +# define ASN1_R_LIST_ERROR 188 +# define ASN1_R_MIME_NO_CONTENT_TYPE 206 +# define ASN1_R_MIME_PARSE_ERROR 207 +# define ASN1_R_MIME_SIG_PARSE_ERROR 208 +# define ASN1_R_MISSING_EOC 137 +# define ASN1_R_MISSING_SECOND_NUMBER 138 +# define ASN1_R_MISSING_VALUE 189 +# define ASN1_R_MSTRING_NOT_UNIVERSAL 139 +# define ASN1_R_MSTRING_WRONG_TAG 140 +# define ASN1_R_NESTED_ASN1_STRING 197 +# define ASN1_R_NESTED_TOO_DEEP 201 +# define ASN1_R_NON_HEX_CHARACTERS 141 +# define ASN1_R_NOT_ASCII_FORMAT 190 +# define ASN1_R_NOT_ENOUGH_DATA 142 +# define ASN1_R_NO_CONTENT_TYPE 209 +# define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 +# define ASN1_R_NO_MULTIPART_BODY_FAILURE 210 +# define ASN1_R_NO_MULTIPART_BOUNDARY 211 +# define ASN1_R_NO_SIG_CONTENT_TYPE 212 +# define ASN1_R_NULL_IS_WRONG_LENGTH 144 +# define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191 +# define ASN1_R_ODD_NUMBER_OF_CHARS 145 +# define ASN1_R_SECOND_NUMBER_TOO_LARGE 147 +# define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148 +# define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149 +# define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192 +# define ASN1_R_SHORT_LINE 150 +# define ASN1_R_SIG_INVALID_MIME_TYPE 213 +# define ASN1_R_STREAMING_NOT_SUPPORTED 202 +# define ASN1_R_STRING_TOO_LONG 151 +# define ASN1_R_STRING_TOO_SHORT 152 +# define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154 +# define ASN1_R_TIME_NOT_ASCII_FORMAT 193 +# define ASN1_R_TOO_LARGE 223 +# define ASN1_R_TOO_LONG 155 +# define ASN1_R_TOO_SMALL 224 +# define ASN1_R_TYPE_NOT_CONSTRUCTED 156 +# define ASN1_R_TYPE_NOT_PRIMITIVE 195 +# define ASN1_R_UNEXPECTED_EOC 159 +# define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215 +# define ASN1_R_UNKNOWN_FORMAT 160 +# define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 +# define ASN1_R_UNKNOWN_OBJECT_TYPE 162 +# define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163 +# define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199 +# define ASN1_R_UNKNOWN_TAG 194 +# define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164 +# define ASN1_R_UNSUPPORTED_CIPHER 228 +# define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167 +# define ASN1_R_UNSUPPORTED_TYPE 196 +# define ASN1_R_WRONG_INTEGER_TYPE 225 +# define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200 +# define ASN1_R_WRONG_TAG 168 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/asn1t.h b/src/Mayaqua/win32_inc/openssl/asn1t.h index 26f5ea89..a450ba0d 100644 --- a/src/Mayaqua/win32_inc/openssl/asn1t.h +++ b/src/Mayaqua/win32_inc/openssl/asn1t.h @@ -1,973 +1,945 @@ -/* asn1t.h */ -/* - * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project - * 2000. - */ -/* ==================================================================== - * Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_ASN1T_H -# define HEADER_ASN1T_H - -# include -# include -# include - -# ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -# endif - -/* ASN1 template defines, structures and functions */ - -#ifdef __cplusplus -extern "C" { -#endif - -# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION - -/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ -# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr)) - -/* Macros for start and end of ASN1_ITEM definition */ - -# define ASN1_ITEM_start(itname) \ - OPENSSL_GLOBAL const ASN1_ITEM itname##_it = { - -# define ASN1_ITEM_end(itname) \ - }; - -# else - -/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ -# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr())) - -/* Macros for start and end of ASN1_ITEM definition */ - -# define ASN1_ITEM_start(itname) \ - const ASN1_ITEM * itname##_it(void) \ - { \ - static const ASN1_ITEM local_it = { - -# define ASN1_ITEM_end(itname) \ - }; \ - return &local_it; \ - } - -# endif - -/* Macros to aid ASN1 template writing */ - -# define ASN1_ITEM_TEMPLATE(tname) \ - static const ASN1_TEMPLATE tname##_item_tt - -# define ASN1_ITEM_TEMPLATE_END(tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_PRIMITIVE,\ - -1,\ - &tname##_item_tt,\ - 0,\ - NULL,\ - 0,\ - #tname \ - ASN1_ITEM_end(tname) - -/* This is a ASN1 type which just embeds a template */ - -/*- - * This pair helps declare a SEQUENCE. We can do: - * - * ASN1_SEQUENCE(stname) = { - * ... SEQUENCE components ... - * } ASN1_SEQUENCE_END(stname) - * - * This will produce an ASN1_ITEM called stname_it - * for a structure called stname. - * - * If you want the same structure but a different - * name then use: - * - * ASN1_SEQUENCE(itname) = { - * ... SEQUENCE components ... - * } ASN1_SEQUENCE_END_name(stname, itname) - * - * This will create an item called itname_it using - * a structure called stname. - */ - -# define ASN1_SEQUENCE(tname) \ - static const ASN1_TEMPLATE tname##_seq_tt[] - -# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname) - -# define ASN1_SEQUENCE_END_name(stname, tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - NULL,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -# define ASN1_NDEF_SEQUENCE(tname) \ - ASN1_SEQUENCE(tname) - -# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \ - ASN1_SEQUENCE_cb(tname, cb) - -# define ASN1_SEQUENCE_cb(tname, cb) \ - static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ - ASN1_SEQUENCE(tname) - -# define ASN1_BROKEN_SEQUENCE(tname) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \ - ASN1_SEQUENCE(tname) - -# define ASN1_SEQUENCE_ref(tname, cb, lck) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \ - ASN1_SEQUENCE(tname) - -# define ASN1_SEQUENCE_enc(tname, enc, cb) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \ - ASN1_SEQUENCE(tname) - -# define ASN1_NDEF_SEQUENCE_END(tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_NDEF_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - NULL,\ - sizeof(tname),\ - #tname \ - ASN1_ITEM_end(tname) - -# define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname) - -# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) - -# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) - -# define ASN1_SEQUENCE_END_ref(stname, tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - &tname##_aux,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_NDEF_SEQUENCE,\ - V_ASN1_SEQUENCE,\ - tname##_seq_tt,\ - sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ - &tname##_aux,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -/*- - * This pair helps declare a CHOICE type. We can do: - * - * ASN1_CHOICE(chname) = { - * ... CHOICE options ... - * ASN1_CHOICE_END(chname) - * - * This will produce an ASN1_ITEM called chname_it - * for a structure called chname. The structure - * definition must look like this: - * typedef struct { - * int type; - * union { - * ASN1_SOMETHING *opt1; - * ASN1_SOMEOTHER *opt2; - * } value; - * } chname; - * - * the name of the selector must be 'type'. - * to use an alternative selector name use the - * ASN1_CHOICE_END_selector() version. - */ - -# define ASN1_CHOICE(tname) \ - static const ASN1_TEMPLATE tname##_ch_tt[] - -# define ASN1_CHOICE_cb(tname, cb) \ - static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ - ASN1_CHOICE(tname) - -# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname) - -# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type) - -# define ASN1_CHOICE_END_selector(stname, tname, selname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_CHOICE,\ - offsetof(stname,selname) ,\ - tname##_ch_tt,\ - sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ - NULL,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -# define ASN1_CHOICE_END_cb(stname, tname, selname) \ - ;\ - ASN1_ITEM_start(tname) \ - ASN1_ITYPE_CHOICE,\ - offsetof(stname,selname) ,\ - tname##_ch_tt,\ - sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ - &tname##_aux,\ - sizeof(stname),\ - #stname \ - ASN1_ITEM_end(tname) - -/* This helps with the template wrapper form of ASN1_ITEM */ - -# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \ - (flags), (tag), 0,\ - #name, ASN1_ITEM_ref(type) } - -/* These help with SEQUENCE or CHOICE components */ - -/* used to declare other types */ - -# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \ - (flags), (tag), offsetof(stname, field),\ - #field, ASN1_ITEM_ref(type) } - -/* used when the structure is combined with the parent */ - -# define ASN1_EX_COMBINE(flags, tag, type) { \ - (flags)|ASN1_TFLG_COMBINE, (tag), 0, NULL, ASN1_ITEM_ref(type) } - -/* implicit and explicit helper macros */ - -# define ASN1_IMP_EX(stname, field, type, tag, ex) \ - ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type) - -# define ASN1_EXP_EX(stname, field, type, tag, ex) \ - ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type) - -/* Any defined by macros: the field used is in the table itself */ - -# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION -# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } -# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } -# else -# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb } -# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb } -# endif -/* Plain simple type */ -# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type) - -/* OPTIONAL simple type */ -# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type) - -/* IMPLICIT tagged simple type */ -# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0) - -/* IMPLICIT tagged OPTIONAL simple type */ -# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) - -/* Same as above but EXPLICIT */ - -# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0) -# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) - -/* SEQUENCE OF type */ -# define ASN1_SEQUENCE_OF(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type) - -/* OPTIONAL SEQUENCE OF */ -# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) - -/* Same as above but for SET OF */ - -# define ASN1_SET_OF(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type) - -# define ASN1_SET_OF_OPT(stname, field, type) \ - ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) - -/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */ - -# define ASN1_IMP_SET_OF(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) - -# define ASN1_EXP_SET_OF(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) - -# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) - -# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) - -# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) - -# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \ - ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) - -# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) - -# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) - -/* EXPLICIT using indefinite length constructed form */ -# define ASN1_NDEF_EXP(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF) - -/* EXPLICIT OPTIONAL using indefinite length constructed form */ -# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \ - ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF) - -/* Macros for the ASN1_ADB structure */ - -# define ASN1_ADB(name) \ - static const ASN1_ADB_TABLE name##_adbtbl[] - -# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION - -# define ASN1_ADB_END(name, flags, field, app_table, def, none) \ - ;\ - static const ASN1_ADB name##_adb = {\ - flags,\ - offsetof(name, field),\ - app_table,\ - name##_adbtbl,\ - sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ - def,\ - none\ - } - -# else - -# define ASN1_ADB_END(name, flags, field, app_table, def, none) \ - ;\ - static const ASN1_ITEM *name##_adb(void) \ - { \ - static const ASN1_ADB internal_adb = \ - {\ - flags,\ - offsetof(name, field),\ - app_table,\ - name##_adbtbl,\ - sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ - def,\ - none\ - }; \ - return (const ASN1_ITEM *) &internal_adb; \ - } \ - void dummy_function(void) - -# endif - -# define ADB_ENTRY(val, template) {val, template} - -# define ASN1_ADB_TEMPLATE(name) \ - static const ASN1_TEMPLATE name##_tt - -/* - * This is the ASN1 template structure that defines a wrapper round the - * actual type. It determines the actual position of the field in the value - * structure, various flags such as OPTIONAL and the field name. - */ - -struct ASN1_TEMPLATE_st { - unsigned long flags; /* Various flags */ - long tag; /* tag, not used if no tagging */ - unsigned long offset; /* Offset of this field in structure */ -# ifndef NO_ASN1_FIELD_NAMES - const char *field_name; /* Field name */ -# endif - ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */ -}; - -/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */ - -# define ASN1_TEMPLATE_item(t) (t->item_ptr) -# define ASN1_TEMPLATE_adb(t) (t->item_ptr) - -typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE; -typedef struct ASN1_ADB_st ASN1_ADB; - -struct ASN1_ADB_st { - unsigned long flags; /* Various flags */ - unsigned long offset; /* Offset of selector field */ - STACK_OF(ASN1_ADB_TABLE) **app_items; /* Application defined items */ - const ASN1_ADB_TABLE *tbl; /* Table of possible types */ - long tblcount; /* Number of entries in tbl */ - const ASN1_TEMPLATE *default_tt; /* Type to use if no match */ - const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */ -}; - -struct ASN1_ADB_TABLE_st { - long value; /* NID for an object or value for an int */ - const ASN1_TEMPLATE tt; /* item for this value */ -}; - -/* template flags */ - -/* Field is optional */ -# define ASN1_TFLG_OPTIONAL (0x1) - -/* Field is a SET OF */ -# define ASN1_TFLG_SET_OF (0x1 << 1) - -/* Field is a SEQUENCE OF */ -# define ASN1_TFLG_SEQUENCE_OF (0x2 << 1) - -/* - * Special case: this refers to a SET OF that will be sorted into DER order - * when encoded *and* the corresponding STACK will be modified to match the - * new order. - */ -# define ASN1_TFLG_SET_ORDER (0x3 << 1) - -/* Mask for SET OF or SEQUENCE OF */ -# define ASN1_TFLG_SK_MASK (0x3 << 1) - -/* - * These flags mean the tag should be taken from the tag field. If EXPLICIT - * then the underlying type is used for the inner tag. - */ - -/* IMPLICIT tagging */ -# define ASN1_TFLG_IMPTAG (0x1 << 3) - -/* EXPLICIT tagging, inner tag from underlying type */ -# define ASN1_TFLG_EXPTAG (0x2 << 3) - -# define ASN1_TFLG_TAG_MASK (0x3 << 3) - -/* context specific IMPLICIT */ -# define ASN1_TFLG_IMPLICIT ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT - -/* context specific EXPLICIT */ -# define ASN1_TFLG_EXPLICIT ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT - -/* - * If tagging is in force these determine the type of tag to use. Otherwise - * the tag is determined by the underlying type. These values reflect the - * actual octet format. - */ - -/* Universal tag */ -# define ASN1_TFLG_UNIVERSAL (0x0<<6) -/* Application tag */ -# define ASN1_TFLG_APPLICATION (0x1<<6) -/* Context specific tag */ -# define ASN1_TFLG_CONTEXT (0x2<<6) -/* Private tag */ -# define ASN1_TFLG_PRIVATE (0x3<<6) - -# define ASN1_TFLG_TAG_CLASS (0x3<<6) - -/* - * These are for ANY DEFINED BY type. In this case the 'item' field points to - * an ASN1_ADB structure which contains a table of values to decode the - * relevant type - */ - -# define ASN1_TFLG_ADB_MASK (0x3<<8) - -# define ASN1_TFLG_ADB_OID (0x1<<8) - -# define ASN1_TFLG_ADB_INT (0x1<<9) - -/* - * This flag means a parent structure is passed instead of the field: this is - * useful is a SEQUENCE is being combined with a CHOICE for example. Since - * this means the structure and item name will differ we need to use the - * ASN1_CHOICE_END_name() macro for example. - */ - -# define ASN1_TFLG_COMBINE (0x1<<10) - -/* - * This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes - * indefinite length constructed encoding to be used if required. - */ - -# define ASN1_TFLG_NDEF (0x1<<11) - -/* This is the actual ASN1 item itself */ - -struct ASN1_ITEM_st { - char itype; /* The item type, primitive, SEQUENCE, CHOICE - * or extern */ - long utype; /* underlying type */ - const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains - * the contents */ - long tcount; /* Number of templates if SEQUENCE or CHOICE */ - const void *funcs; /* functions that handle this type */ - long size; /* Structure size (usually) */ -# ifndef NO_ASN1_FIELD_NAMES - const char *sname; /* Structure name */ -# endif -}; - -/*- - * These are values for the itype field and - * determine how the type is interpreted. - * - * For PRIMITIVE types the underlying type - * determines the behaviour if items is NULL. - * - * Otherwise templates must contain a single - * template and the type is treated in the - * same way as the type specified in the template. - * - * For SEQUENCE types the templates field points - * to the members, the size field is the - * structure size. - * - * For CHOICE types the templates field points - * to each possible member (typically a union) - * and the 'size' field is the offset of the - * selector. - * - * The 'funcs' field is used for application - * specific functions. - * - * For COMPAT types the funcs field gives a - * set of functions that handle this type, this - * supports the old d2i, i2d convention. - * - * The EXTERN type uses a new style d2i/i2d. - * The new style should be used where possible - * because it avoids things like the d2i IMPLICIT - * hack. - * - * MSTRING is a multiple string type, it is used - * for a CHOICE of character strings where the - * actual strings all occupy an ASN1_STRING - * structure. In this case the 'utype' field - * has a special meaning, it is used as a mask - * of acceptable types using the B_ASN1 constants. - * - * NDEF_SEQUENCE is the same as SEQUENCE except - * that it will use indefinite length constructed - * encoding if requested. - * - */ - -# define ASN1_ITYPE_PRIMITIVE 0x0 - -# define ASN1_ITYPE_SEQUENCE 0x1 - -# define ASN1_ITYPE_CHOICE 0x2 - -# define ASN1_ITYPE_COMPAT 0x3 - -# define ASN1_ITYPE_EXTERN 0x4 - -# define ASN1_ITYPE_MSTRING 0x5 - -# define ASN1_ITYPE_NDEF_SEQUENCE 0x6 - -/* - * Cache for ASN1 tag and length, so we don't keep re-reading it for things - * like CHOICE - */ - -struct ASN1_TLC_st { - char valid; /* Values below are valid */ - int ret; /* return value */ - long plen; /* length */ - int ptag; /* class value */ - int pclass; /* class value */ - int hdrlen; /* header length */ -}; - -/* Typedefs for ASN1 function pointers */ - -typedef ASN1_VALUE *ASN1_new_func(void); -typedef void ASN1_free_func(ASN1_VALUE *a); -typedef ASN1_VALUE *ASN1_d2i_func(ASN1_VALUE **a, const unsigned char **in, - long length); -typedef int ASN1_i2d_func(ASN1_VALUE *a, unsigned char **in); - -typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, - const ASN1_ITEM *it, int tag, int aclass, char opt, - ASN1_TLC *ctx); - -typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out, - const ASN1_ITEM *it, int tag, int aclass); -typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it); -typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it); - -typedef int ASN1_ex_print_func(BIO *out, ASN1_VALUE **pval, - int indent, const char *fname, - const ASN1_PCTX *pctx); - -typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont, - int *putype, const ASN1_ITEM *it); -typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, - int len, int utype, char *free_cont, - const ASN1_ITEM *it); -typedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval, - const ASN1_ITEM *it, int indent, - const ASN1_PCTX *pctx); - -typedef struct ASN1_COMPAT_FUNCS_st { - ASN1_new_func *asn1_new; - ASN1_free_func *asn1_free; - ASN1_d2i_func *asn1_d2i; - ASN1_i2d_func *asn1_i2d; -} ASN1_COMPAT_FUNCS; - -typedef struct ASN1_EXTERN_FUNCS_st { - void *app_data; - ASN1_ex_new_func *asn1_ex_new; - ASN1_ex_free_func *asn1_ex_free; - ASN1_ex_free_func *asn1_ex_clear; - ASN1_ex_d2i *asn1_ex_d2i; - ASN1_ex_i2d *asn1_ex_i2d; - ASN1_ex_print_func *asn1_ex_print; -} ASN1_EXTERN_FUNCS; - -typedef struct ASN1_PRIMITIVE_FUNCS_st { - void *app_data; - unsigned long flags; - ASN1_ex_new_func *prim_new; - ASN1_ex_free_func *prim_free; - ASN1_ex_free_func *prim_clear; - ASN1_primitive_c2i *prim_c2i; - ASN1_primitive_i2c *prim_i2c; - ASN1_primitive_print *prim_print; -} ASN1_PRIMITIVE_FUNCS; - -/* - * This is the ASN1_AUX structure: it handles various miscellaneous - * requirements. For example the use of reference counts and an informational - * callback. The "informational callback" is called at various points during - * the ASN1 encoding and decoding. It can be used to provide minor - * customisation of the structures used. This is most useful where the - * supplied routines *almost* do the right thing but need some extra help at - * a few points. If the callback returns zero then it is assumed a fatal - * error has occurred and the main operation should be abandoned. If major - * changes in the default behaviour are required then an external type is - * more appropriate. - */ - -typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it, - void *exarg); - -typedef struct ASN1_AUX_st { - void *app_data; - int flags; - int ref_offset; /* Offset of reference value */ - int ref_lock; /* Lock type to use */ - ASN1_aux_cb *asn1_cb; - int enc_offset; /* Offset of ASN1_ENCODING structure */ -} ASN1_AUX; - -/* For print related callbacks exarg points to this structure */ -typedef struct ASN1_PRINT_ARG_st { - BIO *out; - int indent; - const ASN1_PCTX *pctx; -} ASN1_PRINT_ARG; - -/* For streaming related callbacks exarg points to this structure */ -typedef struct ASN1_STREAM_ARG_st { - /* BIO to stream through */ - BIO *out; - /* BIO with filters appended */ - BIO *ndef_bio; - /* Streaming I/O boundary */ - unsigned char **boundary; -} ASN1_STREAM_ARG; - -/* Flags in ASN1_AUX */ - -/* Use a reference count */ -# define ASN1_AFLG_REFCOUNT 1 -/* Save the encoding of structure (useful for signatures) */ -# define ASN1_AFLG_ENCODING 2 -/* The Sequence length is invalid */ -# define ASN1_AFLG_BROKEN 4 - -/* operation values for asn1_cb */ - -# define ASN1_OP_NEW_PRE 0 -# define ASN1_OP_NEW_POST 1 -# define ASN1_OP_FREE_PRE 2 -# define ASN1_OP_FREE_POST 3 -# define ASN1_OP_D2I_PRE 4 -# define ASN1_OP_D2I_POST 5 -# define ASN1_OP_I2D_PRE 6 -# define ASN1_OP_I2D_POST 7 -# define ASN1_OP_PRINT_PRE 8 -# define ASN1_OP_PRINT_POST 9 -# define ASN1_OP_STREAM_PRE 10 -# define ASN1_OP_STREAM_POST 11 -# define ASN1_OP_DETACHED_PRE 12 -# define ASN1_OP_DETACHED_POST 13 - -/* Macro to implement a primitive type */ -# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0) -# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \ - ASN1_ITEM_start(itname) \ - ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \ - ASN1_ITEM_end(itname) - -/* Macro to implement a multi string type */ -# define IMPLEMENT_ASN1_MSTRING(itname, mask) \ - ASN1_ITEM_start(itname) \ - ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \ - ASN1_ITEM_end(itname) - -/* Macro to implement an ASN1_ITEM in terms of old style funcs */ - -# define IMPLEMENT_COMPAT_ASN1(sname) IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE) - -# define IMPLEMENT_COMPAT_ASN1_type(sname, tag) \ - static const ASN1_COMPAT_FUNCS sname##_ff = { \ - (ASN1_new_func *)sname##_new, \ - (ASN1_free_func *)sname##_free, \ - (ASN1_d2i_func *)d2i_##sname, \ - (ASN1_i2d_func *)i2d_##sname, \ - }; \ - ASN1_ITEM_start(sname) \ - ASN1_ITYPE_COMPAT, \ - tag, \ - NULL, \ - 0, \ - &sname##_ff, \ - 0, \ - #sname \ - ASN1_ITEM_end(sname) - -# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ - ASN1_ITEM_start(sname) \ - ASN1_ITYPE_EXTERN, \ - tag, \ - NULL, \ - 0, \ - &fptrs, \ - 0, \ - #sname \ - ASN1_ITEM_end(sname) - -/* Macro to implement standard functions in terms of ASN1_ITEM structures */ - -# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname) - -# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname) - -# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \ - IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname) - -# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname) - -# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname) - -# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \ - pre stname *fname##_new(void) \ - { \ - return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ - } \ - pre void fname##_free(stname *a) \ - { \ - ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ - } - -# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \ - stname *fname##_new(void) \ - { \ - return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ - } \ - void fname##_free(stname *a) \ - { \ - ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ - } - -# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) - -# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ - stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ - { \ - return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ - } \ - int i2d_##fname(stname *a, unsigned char **out) \ - { \ - return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ - } - -# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \ - int i2d_##stname##_NDEF(stname *a, unsigned char **out) \ - { \ - return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\ - } - -/* - * This includes evil casts to remove const: they will go away when full ASN1 - * constification is done. - */ -# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ - stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ - { \ - return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ - } \ - int i2d_##fname(const stname *a, unsigned char **out) \ - { \ - return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ - } - -# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \ - stname * stname##_dup(stname *x) \ - { \ - return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \ - } - -# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \ - IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname) - -# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \ - int fname##_print_ctx(BIO *out, stname *x, int indent, \ - const ASN1_PCTX *pctx) \ - { \ - return ASN1_item_print(out, (ASN1_VALUE *)x, indent, \ - ASN1_ITEM_rptr(itname), pctx); \ - } - -# define IMPLEMENT_ASN1_FUNCTIONS_const(name) \ - IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name) - -# define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ - IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) - -/* external definitions for primitive types */ - -DECLARE_ASN1_ITEM(ASN1_BOOLEAN) -DECLARE_ASN1_ITEM(ASN1_TBOOLEAN) -DECLARE_ASN1_ITEM(ASN1_FBOOLEAN) -DECLARE_ASN1_ITEM(ASN1_SEQUENCE) -DECLARE_ASN1_ITEM(CBIGNUM) -DECLARE_ASN1_ITEM(BIGNUM) -DECLARE_ASN1_ITEM(LONG) -DECLARE_ASN1_ITEM(ZLONG) - -DECLARE_STACK_OF(ASN1_VALUE) - -/* Functions used internally by the ASN1 code */ - -int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it); -void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it); -int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); -int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it); - -void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); -int ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, - const ASN1_TEMPLATE *tt); -int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, - const ASN1_ITEM *it, int tag, int aclass, char opt, - ASN1_TLC *ctx); - -int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, - const ASN1_ITEM *it, int tag, int aclass); -int ASN1_template_i2d(ASN1_VALUE **pval, unsigned char **out, - const ASN1_TEMPLATE *tt); -void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it); - -int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, - const ASN1_ITEM *it); -int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, - int utype, char *free_cont, const ASN1_ITEM *it); - -int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it); -int asn1_set_choice_selector(ASN1_VALUE **pval, int value, - const ASN1_ITEM *it); - -ASN1_VALUE **asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); - -const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, - int nullerr); - -int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it); - -void asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it); -void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it); -int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval, - const ASN1_ITEM *it); -int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, - const ASN1_ITEM *it); - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ASN1T_H +# define HEADER_ASN1T_H + +# include +# include +# include + +# ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +# endif + +/* ASN1 template defines, structures and functions */ + +#ifdef __cplusplus +extern "C" { +#endif + +# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION + +/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ +# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr)) + +/* Macros for start and end of ASN1_ITEM definition */ + +# define ASN1_ITEM_start(itname) \ + const ASN1_ITEM itname##_it = { + +# define static_ASN1_ITEM_start(itname) \ + static const ASN1_ITEM itname##_it = { + +# define ASN1_ITEM_end(itname) \ + }; + +# else + +/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ +# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)())) + +/* Macros for start and end of ASN1_ITEM definition */ + +# define ASN1_ITEM_start(itname) \ + const ASN1_ITEM * itname##_it(void) \ + { \ + static const ASN1_ITEM local_it = { + +# define static_ASN1_ITEM_start(itname) \ + static ASN1_ITEM_start(itname) + +# define ASN1_ITEM_end(itname) \ + }; \ + return &local_it; \ + } + +# endif + +/* Macros to aid ASN1 template writing */ + +# define ASN1_ITEM_TEMPLATE(tname) \ + static const ASN1_TEMPLATE tname##_item_tt + +# define ASN1_ITEM_TEMPLATE_END(tname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_PRIMITIVE,\ + -1,\ + &tname##_item_tt,\ + 0,\ + NULL,\ + 0,\ + #tname \ + ASN1_ITEM_end(tname) +# define static_ASN1_ITEM_TEMPLATE_END(tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_PRIMITIVE,\ + -1,\ + &tname##_item_tt,\ + 0,\ + NULL,\ + 0,\ + #tname \ + ASN1_ITEM_end(tname) + +/* This is a ASN1 type which just embeds a template */ + +/*- + * This pair helps declare a SEQUENCE. We can do: + * + * ASN1_SEQUENCE(stname) = { + * ... SEQUENCE components ... + * } ASN1_SEQUENCE_END(stname) + * + * This will produce an ASN1_ITEM called stname_it + * for a structure called stname. + * + * If you want the same structure but a different + * name then use: + * + * ASN1_SEQUENCE(itname) = { + * ... SEQUENCE components ... + * } ASN1_SEQUENCE_END_name(stname, itname) + * + * This will create an item called itname_it using + * a structure called stname. + */ + +# define ASN1_SEQUENCE(tname) \ + static const ASN1_TEMPLATE tname##_seq_tt[] + +# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname) + +# define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname) + +# define ASN1_SEQUENCE_END_name(stname, tname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(stname),\ + #tname \ + ASN1_ITEM_end(tname) + +# define static_ASN1_SEQUENCE_END_name(stname, tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + +# define ASN1_NDEF_SEQUENCE(tname) \ + ASN1_SEQUENCE(tname) + +# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \ + ASN1_SEQUENCE_cb(tname, cb) + +# define ASN1_SEQUENCE_cb(tname, cb) \ + static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ + ASN1_SEQUENCE(tname) + +# define ASN1_BROKEN_SEQUENCE(tname) \ + static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \ + ASN1_SEQUENCE(tname) + +# define ASN1_SEQUENCE_ref(tname, cb) \ + static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0}; \ + ASN1_SEQUENCE(tname) + +# define ASN1_SEQUENCE_enc(tname, enc, cb) \ + static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \ + ASN1_SEQUENCE(tname) + +# define ASN1_NDEF_SEQUENCE_END(tname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_NDEF_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(tname),\ + #tname \ + ASN1_ITEM_end(tname) +# define static_ASN1_NDEF_SEQUENCE_END(tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_NDEF_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(tname),\ + #tname \ + ASN1_ITEM_end(tname) + +# define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname) +# define static_ASN1_BROKEN_SEQUENCE_END(stname) \ + static_ASN1_SEQUENCE_END_ref(stname, stname) + +# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) + +# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) +# define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname) + +# define ASN1_SEQUENCE_END_ref(stname, tname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + &tname##_aux,\ + sizeof(stname),\ + #tname \ + ASN1_ITEM_end(tname) +# define static_ASN1_SEQUENCE_END_ref(stname, tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + &tname##_aux,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + +# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_NDEF_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + &tname##_aux,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + +/*- + * This pair helps declare a CHOICE type. We can do: + * + * ASN1_CHOICE(chname) = { + * ... CHOICE options ... + * ASN1_CHOICE_END(chname) + * + * This will produce an ASN1_ITEM called chname_it + * for a structure called chname. The structure + * definition must look like this: + * typedef struct { + * int type; + * union { + * ASN1_SOMETHING *opt1; + * ASN1_SOMEOTHER *opt2; + * } value; + * } chname; + * + * the name of the selector must be 'type'. + * to use an alternative selector name use the + * ASN1_CHOICE_END_selector() version. + */ + +# define ASN1_CHOICE(tname) \ + static const ASN1_TEMPLATE tname##_ch_tt[] + +# define ASN1_CHOICE_cb(tname, cb) \ + static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ + ASN1_CHOICE(tname) + +# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname) + +# define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname) + +# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type) + +# define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type) + +# define ASN1_CHOICE_END_selector(stname, tname, selname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_CHOICE,\ + offsetof(stname,selname) ,\ + tname##_ch_tt,\ + sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + +# define static_ASN1_CHOICE_END_selector(stname, tname, selname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_CHOICE,\ + offsetof(stname,selname) ,\ + tname##_ch_tt,\ + sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + +# define ASN1_CHOICE_END_cb(stname, tname, selname) \ + ;\ + ASN1_ITEM_start(tname) \ + ASN1_ITYPE_CHOICE,\ + offsetof(stname,selname) ,\ + tname##_ch_tt,\ + sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ + &tname##_aux,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + +/* This helps with the template wrapper form of ASN1_ITEM */ + +# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \ + (flags), (tag), 0,\ + #name, ASN1_ITEM_ref(type) } + +/* These help with SEQUENCE or CHOICE components */ + +/* used to declare other types */ + +# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \ + (flags), (tag), offsetof(stname, field),\ + #field, ASN1_ITEM_ref(type) } + +/* implicit and explicit helper macros */ + +# define ASN1_IMP_EX(stname, field, type, tag, ex) \ + ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type) + +# define ASN1_EXP_EX(stname, field, type, tag, ex) \ + ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type) + +/* Any defined by macros: the field used is in the table itself */ + +# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION +# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } +# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } +# else +# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb } +# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb } +# endif +/* Plain simple type */ +# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type) +/* Embedded simple type */ +# define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED,0, stname, field, type) + +/* OPTIONAL simple type */ +# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type) +# define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED, 0, stname, field, type) + +/* IMPLICIT tagged simple type */ +# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0) +# define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED) + +/* IMPLICIT tagged OPTIONAL simple type */ +# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) +# define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED) + +/* Same as above but EXPLICIT */ + +# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0) +# define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED) +# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) +# define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED) + +/* SEQUENCE OF type */ +# define ASN1_SEQUENCE_OF(stname, field, type) \ + ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type) + +/* OPTIONAL SEQUENCE OF */ +# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \ + ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) + +/* Same as above but for SET OF */ + +# define ASN1_SET_OF(stname, field, type) \ + ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type) + +# define ASN1_SET_OF_OPT(stname, field, type) \ + ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) + +/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */ + +# define ASN1_IMP_SET_OF(stname, field, type, tag) \ + ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) + +# define ASN1_EXP_SET_OF(stname, field, type, tag) \ + ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) + +# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \ + ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) + +# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \ + ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) + +# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \ + ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) + +# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \ + ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) + +# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \ + ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) + +# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \ + ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) + +/* EXPLICIT using indefinite length constructed form */ +# define ASN1_NDEF_EXP(stname, field, type, tag) \ + ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF) + +/* EXPLICIT OPTIONAL using indefinite length constructed form */ +# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \ + ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF) + +/* Macros for the ASN1_ADB structure */ + +# define ASN1_ADB(name) \ + static const ASN1_ADB_TABLE name##_adbtbl[] + +# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION + +# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ + ;\ + static const ASN1_ADB name##_adb = {\ + flags,\ + offsetof(name, field),\ + adb_cb,\ + name##_adbtbl,\ + sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ + def,\ + none\ + } + +# else + +# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ + ;\ + static const ASN1_ITEM *name##_adb(void) \ + { \ + static const ASN1_ADB internal_adb = \ + {\ + flags,\ + offsetof(name, field),\ + adb_cb,\ + name##_adbtbl,\ + sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ + def,\ + none\ + }; \ + return (const ASN1_ITEM *) &internal_adb; \ + } \ + void dummy_function(void) + +# endif + +# define ADB_ENTRY(val, template) {val, template} + +# define ASN1_ADB_TEMPLATE(name) \ + static const ASN1_TEMPLATE name##_tt + +/* + * This is the ASN1 template structure that defines a wrapper round the + * actual type. It determines the actual position of the field in the value + * structure, various flags such as OPTIONAL and the field name. + */ + +struct ASN1_TEMPLATE_st { + unsigned long flags; /* Various flags */ + long tag; /* tag, not used if no tagging */ + unsigned long offset; /* Offset of this field in structure */ + const char *field_name; /* Field name */ + ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */ +}; + +/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */ + +# define ASN1_TEMPLATE_item(t) (t->item_ptr) +# define ASN1_TEMPLATE_adb(t) (t->item_ptr) + +typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE; +typedef struct ASN1_ADB_st ASN1_ADB; + +struct ASN1_ADB_st { + unsigned long flags; /* Various flags */ + unsigned long offset; /* Offset of selector field */ + int (*adb_cb)(long *psel); /* Application callback */ + const ASN1_ADB_TABLE *tbl; /* Table of possible types */ + long tblcount; /* Number of entries in tbl */ + const ASN1_TEMPLATE *default_tt; /* Type to use if no match */ + const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */ +}; + +struct ASN1_ADB_TABLE_st { + long value; /* NID for an object or value for an int */ + const ASN1_TEMPLATE tt; /* item for this value */ +}; + +/* template flags */ + +/* Field is optional */ +# define ASN1_TFLG_OPTIONAL (0x1) + +/* Field is a SET OF */ +# define ASN1_TFLG_SET_OF (0x1 << 1) + +/* Field is a SEQUENCE OF */ +# define ASN1_TFLG_SEQUENCE_OF (0x2 << 1) + +/* + * Special case: this refers to a SET OF that will be sorted into DER order + * when encoded *and* the corresponding STACK will be modified to match the + * new order. + */ +# define ASN1_TFLG_SET_ORDER (0x3 << 1) + +/* Mask for SET OF or SEQUENCE OF */ +# define ASN1_TFLG_SK_MASK (0x3 << 1) + +/* + * These flags mean the tag should be taken from the tag field. If EXPLICIT + * then the underlying type is used for the inner tag. + */ + +/* IMPLICIT tagging */ +# define ASN1_TFLG_IMPTAG (0x1 << 3) + +/* EXPLICIT tagging, inner tag from underlying type */ +# define ASN1_TFLG_EXPTAG (0x2 << 3) + +# define ASN1_TFLG_TAG_MASK (0x3 << 3) + +/* context specific IMPLICIT */ +# define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT) + +/* context specific EXPLICIT */ +# define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT) + +/* + * If tagging is in force these determine the type of tag to use. Otherwise + * the tag is determined by the underlying type. These values reflect the + * actual octet format. + */ + +/* Universal tag */ +# define ASN1_TFLG_UNIVERSAL (0x0<<6) +/* Application tag */ +# define ASN1_TFLG_APPLICATION (0x1<<6) +/* Context specific tag */ +# define ASN1_TFLG_CONTEXT (0x2<<6) +/* Private tag */ +# define ASN1_TFLG_PRIVATE (0x3<<6) + +# define ASN1_TFLG_TAG_CLASS (0x3<<6) + +/* + * These are for ANY DEFINED BY type. In this case the 'item' field points to + * an ASN1_ADB structure which contains a table of values to decode the + * relevant type + */ + +# define ASN1_TFLG_ADB_MASK (0x3<<8) + +# define ASN1_TFLG_ADB_OID (0x1<<8) + +# define ASN1_TFLG_ADB_INT (0x1<<9) + +/* + * This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes + * indefinite length constructed encoding to be used if required. + */ + +# define ASN1_TFLG_NDEF (0x1<<11) + +/* Field is embedded and not a pointer */ +# define ASN1_TFLG_EMBED (0x1 << 12) + +/* This is the actual ASN1 item itself */ + +struct ASN1_ITEM_st { + char itype; /* The item type, primitive, SEQUENCE, CHOICE + * or extern */ + long utype; /* underlying type */ + const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains + * the contents */ + long tcount; /* Number of templates if SEQUENCE or CHOICE */ + const void *funcs; /* functions that handle this type */ + long size; /* Structure size (usually) */ + const char *sname; /* Structure name */ +}; + +/*- + * These are values for the itype field and + * determine how the type is interpreted. + * + * For PRIMITIVE types the underlying type + * determines the behaviour if items is NULL. + * + * Otherwise templates must contain a single + * template and the type is treated in the + * same way as the type specified in the template. + * + * For SEQUENCE types the templates field points + * to the members, the size field is the + * structure size. + * + * For CHOICE types the templates field points + * to each possible member (typically a union) + * and the 'size' field is the offset of the + * selector. + * + * The 'funcs' field is used for application + * specific functions. + * + * The EXTERN type uses a new style d2i/i2d. + * The new style should be used where possible + * because it avoids things like the d2i IMPLICIT + * hack. + * + * MSTRING is a multiple string type, it is used + * for a CHOICE of character strings where the + * actual strings all occupy an ASN1_STRING + * structure. In this case the 'utype' field + * has a special meaning, it is used as a mask + * of acceptable types using the B_ASN1 constants. + * + * NDEF_SEQUENCE is the same as SEQUENCE except + * that it will use indefinite length constructed + * encoding if requested. + * + */ + +# define ASN1_ITYPE_PRIMITIVE 0x0 + +# define ASN1_ITYPE_SEQUENCE 0x1 + +# define ASN1_ITYPE_CHOICE 0x2 + +# define ASN1_ITYPE_EXTERN 0x4 + +# define ASN1_ITYPE_MSTRING 0x5 + +# define ASN1_ITYPE_NDEF_SEQUENCE 0x6 + +/* + * Cache for ASN1 tag and length, so we don't keep re-reading it for things + * like CHOICE + */ + +struct ASN1_TLC_st { + char valid; /* Values below are valid */ + int ret; /* return value */ + long plen; /* length */ + int ptag; /* class value */ + int pclass; /* class value */ + int hdrlen; /* header length */ +}; + +/* Typedefs for ASN1 function pointers */ +typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, + const ASN1_ITEM *it, int tag, int aclass, char opt, + ASN1_TLC *ctx); + +typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out, + const ASN1_ITEM *it, int tag, int aclass); +typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it); +typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it); + +typedef int ASN1_ex_print_func(BIO *out, ASN1_VALUE **pval, + int indent, const char *fname, + const ASN1_PCTX *pctx); + +typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont, + int *putype, const ASN1_ITEM *it); +typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, + int len, int utype, char *free_cont, + const ASN1_ITEM *it); +typedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval, + const ASN1_ITEM *it, int indent, + const ASN1_PCTX *pctx); + +typedef struct ASN1_EXTERN_FUNCS_st { + void *app_data; + ASN1_ex_new_func *asn1_ex_new; + ASN1_ex_free_func *asn1_ex_free; + ASN1_ex_free_func *asn1_ex_clear; + ASN1_ex_d2i *asn1_ex_d2i; + ASN1_ex_i2d *asn1_ex_i2d; + ASN1_ex_print_func *asn1_ex_print; +} ASN1_EXTERN_FUNCS; + +typedef struct ASN1_PRIMITIVE_FUNCS_st { + void *app_data; + unsigned long flags; + ASN1_ex_new_func *prim_new; + ASN1_ex_free_func *prim_free; + ASN1_ex_free_func *prim_clear; + ASN1_primitive_c2i *prim_c2i; + ASN1_primitive_i2c *prim_i2c; + ASN1_primitive_print *prim_print; +} ASN1_PRIMITIVE_FUNCS; + +/* + * This is the ASN1_AUX structure: it handles various miscellaneous + * requirements. For example the use of reference counts and an informational + * callback. The "informational callback" is called at various points during + * the ASN1 encoding and decoding. It can be used to provide minor + * customisation of the structures used. This is most useful where the + * supplied routines *almost* do the right thing but need some extra help at + * a few points. If the callback returns zero then it is assumed a fatal + * error has occurred and the main operation should be abandoned. If major + * changes in the default behaviour are required then an external type is + * more appropriate. + */ + +typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it, + void *exarg); + +typedef struct ASN1_AUX_st { + void *app_data; + int flags; + int ref_offset; /* Offset of reference value */ + int ref_lock; /* Lock type to use */ + ASN1_aux_cb *asn1_cb; + int enc_offset; /* Offset of ASN1_ENCODING structure */ +} ASN1_AUX; + +/* For print related callbacks exarg points to this structure */ +typedef struct ASN1_PRINT_ARG_st { + BIO *out; + int indent; + const ASN1_PCTX *pctx; +} ASN1_PRINT_ARG; + +/* For streaming related callbacks exarg points to this structure */ +typedef struct ASN1_STREAM_ARG_st { + /* BIO to stream through */ + BIO *out; + /* BIO with filters appended */ + BIO *ndef_bio; + /* Streaming I/O boundary */ + unsigned char **boundary; +} ASN1_STREAM_ARG; + +/* Flags in ASN1_AUX */ + +/* Use a reference count */ +# define ASN1_AFLG_REFCOUNT 1 +/* Save the encoding of structure (useful for signatures) */ +# define ASN1_AFLG_ENCODING 2 +/* The Sequence length is invalid */ +# define ASN1_AFLG_BROKEN 4 + +/* operation values for asn1_cb */ + +# define ASN1_OP_NEW_PRE 0 +# define ASN1_OP_NEW_POST 1 +# define ASN1_OP_FREE_PRE 2 +# define ASN1_OP_FREE_POST 3 +# define ASN1_OP_D2I_PRE 4 +# define ASN1_OP_D2I_POST 5 +# define ASN1_OP_I2D_PRE 6 +# define ASN1_OP_I2D_POST 7 +# define ASN1_OP_PRINT_PRE 8 +# define ASN1_OP_PRINT_POST 9 +# define ASN1_OP_STREAM_PRE 10 +# define ASN1_OP_STREAM_POST 11 +# define ASN1_OP_DETACHED_PRE 12 +# define ASN1_OP_DETACHED_POST 13 + +/* Macro to implement a primitive type */ +# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0) +# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \ + ASN1_ITEM_start(itname) \ + ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \ + ASN1_ITEM_end(itname) + +/* Macro to implement a multi string type */ +# define IMPLEMENT_ASN1_MSTRING(itname, mask) \ + ASN1_ITEM_start(itname) \ + ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \ + ASN1_ITEM_end(itname) + +# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ + ASN1_ITEM_start(sname) \ + ASN1_ITYPE_EXTERN, \ + tag, \ + NULL, \ + 0, \ + &fptrs, \ + 0, \ + #sname \ + ASN1_ITEM_end(sname) + +/* Macro to implement standard functions in terms of ASN1_ITEM structures */ + +# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname) + +# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname) + +# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \ + IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname) + +# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \ + IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname) + +# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \ + IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname) + +# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \ + pre stname *fname##_new(void) \ + { \ + return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ + } \ + pre void fname##_free(stname *a) \ + { \ + ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ + } + +# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \ + stname *fname##_new(void) \ + { \ + return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ + } \ + void fname##_free(stname *a) \ + { \ + ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ + } + +# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \ + IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ + IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) + +# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ + stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ + { \ + return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ + } \ + int i2d_##fname(stname *a, unsigned char **out) \ + { \ + return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ + } + +# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \ + int i2d_##stname##_NDEF(stname *a, unsigned char **out) \ + { \ + return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\ + } + +# define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \ + static stname *d2i_##stname(stname **a, \ + const unsigned char **in, long len) \ + { \ + return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \ + ASN1_ITEM_rptr(stname)); \ + } \ + static int i2d_##stname(stname *a, unsigned char **out) \ + { \ + return ASN1_item_i2d((ASN1_VALUE *)a, out, \ + ASN1_ITEM_rptr(stname)); \ + } + +/* + * This includes evil casts to remove const: they will go away when full ASN1 + * constification is done. + */ +# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ + stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ + { \ + return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ + } \ + int i2d_##fname(const stname *a, unsigned char **out) \ + { \ + return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ + } + +# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \ + stname * stname##_dup(stname *x) \ + { \ + return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \ + } + +# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \ + IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname) + +# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \ + int fname##_print_ctx(BIO *out, stname *x, int indent, \ + const ASN1_PCTX *pctx) \ + { \ + return ASN1_item_print(out, (ASN1_VALUE *)x, indent, \ + ASN1_ITEM_rptr(itname), pctx); \ + } + +# define IMPLEMENT_ASN1_FUNCTIONS_const(name) \ + IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name) + +# define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname) \ + IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ + IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) + +/* external definitions for primitive types */ + +DECLARE_ASN1_ITEM(ASN1_BOOLEAN) +DECLARE_ASN1_ITEM(ASN1_TBOOLEAN) +DECLARE_ASN1_ITEM(ASN1_FBOOLEAN) +DECLARE_ASN1_ITEM(ASN1_SEQUENCE) +DECLARE_ASN1_ITEM(CBIGNUM) +DECLARE_ASN1_ITEM(BIGNUM) +DECLARE_ASN1_ITEM(INT32) +DECLARE_ASN1_ITEM(ZINT32) +DECLARE_ASN1_ITEM(UINT32) +DECLARE_ASN1_ITEM(ZUINT32) +DECLARE_ASN1_ITEM(INT64) +DECLARE_ASN1_ITEM(ZINT64) +DECLARE_ASN1_ITEM(UINT64) +DECLARE_ASN1_ITEM(ZUINT64) + +# if OPENSSL_API_COMPAT < 0x10200000L +/* + * LONG and ZLONG are strongly discouraged for use as stored data, as the + * underlying C type (long) differs in size depending on the architecture. + * They are designed with 32-bit longs in mind. + */ +DECLARE_ASN1_ITEM(LONG) +DECLARE_ASN1_ITEM(ZLONG) +# endif + +DEFINE_STACK_OF(ASN1_VALUE) + +/* Functions used internally by the ASN1 code */ + +int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it); +void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it); + +int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, + const ASN1_ITEM *it, int tag, int aclass, char opt, + ASN1_TLC *ctx); + +int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, + const ASN1_ITEM *it, int tag, int aclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/async.h b/src/Mayaqua/win32_inc/openssl/async.h new file mode 100644 index 00000000..7052b890 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/async.h @@ -0,0 +1,76 @@ +/* + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include + +#ifndef HEADER_ASYNC_H +# define HEADER_ASYNC_H + +#if defined(_WIN32) +# if defined(BASETYPES) || defined(_WINDEF_H) +/* application has to include to use this */ +#define OSSL_ASYNC_FD HANDLE +#define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE +# endif +#else +#define OSSL_ASYNC_FD int +#define OSSL_BAD_ASYNC_FD -1 +#endif +# include + + +# ifdef __cplusplus +extern "C" { +# endif + +typedef struct async_job_st ASYNC_JOB; +typedef struct async_wait_ctx_st ASYNC_WAIT_CTX; + +#define ASYNC_ERR 0 +#define ASYNC_NO_JOBS 1 +#define ASYNC_PAUSE 2 +#define ASYNC_FINISH 3 + +int ASYNC_init_thread(size_t max_size, size_t init_size); +void ASYNC_cleanup_thread(void); + +#ifdef OSSL_ASYNC_FD +ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void); +void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx); +int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key, + OSSL_ASYNC_FD fd, + void *custom_data, + void (*cleanup)(ASYNC_WAIT_CTX *, const void *, + OSSL_ASYNC_FD, void *)); +int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key, + OSSL_ASYNC_FD *fd, void **custom_data); +int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, + size_t *numfds); +int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd, + size_t *numaddfds, OSSL_ASYNC_FD *delfd, + size_t *numdelfds); +int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key); +#endif + +int ASYNC_is_capable(void); + +int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret, + int (*func)(void *), void *args, size_t size); +int ASYNC_pause_job(void); + +ASYNC_JOB *ASYNC_get_current_job(void); +ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job); +void ASYNC_block_pause(void); +void ASYNC_unblock_pause(void); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/asyncerr.h b/src/Mayaqua/win32_inc/openssl/asyncerr.h new file mode 100644 index 00000000..91afbbb2 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/asyncerr.h @@ -0,0 +1,42 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ASYNCERR_H +# define HEADER_ASYNCERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_ASYNC_strings(void); + +/* + * ASYNC function codes. + */ +# define ASYNC_F_ASYNC_CTX_NEW 100 +# define ASYNC_F_ASYNC_INIT_THREAD 101 +# define ASYNC_F_ASYNC_JOB_NEW 102 +# define ASYNC_F_ASYNC_PAUSE_JOB 103 +# define ASYNC_F_ASYNC_START_FUNC 104 +# define ASYNC_F_ASYNC_START_JOB 105 +# define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106 + +/* + * ASYNC reason codes. + */ +# define ASYNC_R_FAILED_TO_SET_POOL 101 +# define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 +# define ASYNC_R_INIT_FAILED 105 +# define ASYNC_R_INVALID_POOL_SIZE 103 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/bio.h b/src/Mayaqua/win32_inc/openssl/bio.h index 0c94d4db..e1fddfb7 100644 --- a/src/Mayaqua/win32_inc/openssl/bio.h +++ b/src/Mayaqua/win32_inc/openssl/bio.h @@ -1,883 +1,800 @@ -/* crypto/bio/bio.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_BIO_H -# define HEADER_BIO_H - -# include - -# ifndef OPENSSL_NO_FP_API -# include -# endif -# include - -# include - -# ifndef OPENSSL_NO_SCTP -# ifndef OPENSSL_SYS_VMS -# include -# else -# include -# endif -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* These are the 'types' of BIOs */ -# define BIO_TYPE_NONE 0 -# define BIO_TYPE_MEM (1|0x0400) -# define BIO_TYPE_FILE (2|0x0400) - -# define BIO_TYPE_FD (4|0x0400|0x0100) -# define BIO_TYPE_SOCKET (5|0x0400|0x0100) -# define BIO_TYPE_NULL (6|0x0400) -# define BIO_TYPE_SSL (7|0x0200) -# define BIO_TYPE_MD (8|0x0200)/* passive filter */ -# define BIO_TYPE_BUFFER (9|0x0200)/* filter */ -# define BIO_TYPE_CIPHER (10|0x0200)/* filter */ -# define BIO_TYPE_BASE64 (11|0x0200)/* filter */ -# define BIO_TYPE_CONNECT (12|0x0400|0x0100)/* socket - connect */ -# define BIO_TYPE_ACCEPT (13|0x0400|0x0100)/* socket for accept */ -# define BIO_TYPE_PROXY_CLIENT (14|0x0200)/* client proxy BIO */ -# define BIO_TYPE_PROXY_SERVER (15|0x0200)/* server proxy BIO */ -# define BIO_TYPE_NBIO_TEST (16|0x0200)/* server proxy BIO */ -# define BIO_TYPE_NULL_FILTER (17|0x0200) -# define BIO_TYPE_BER (18|0x0200)/* BER -> bin filter */ -# define BIO_TYPE_BIO (19|0x0400)/* (half a) BIO pair */ -# define BIO_TYPE_LINEBUFFER (20|0x0200)/* filter */ -# define BIO_TYPE_DGRAM (21|0x0400|0x0100) -# ifndef OPENSSL_NO_SCTP -# define BIO_TYPE_DGRAM_SCTP (24|0x0400|0x0100) -# endif -# define BIO_TYPE_ASN1 (22|0x0200)/* filter */ -# define BIO_TYPE_COMP (23|0x0200)/* filter */ - -# define BIO_TYPE_DESCRIPTOR 0x0100/* socket, fd, connect or accept */ -# define BIO_TYPE_FILTER 0x0200 -# define BIO_TYPE_SOURCE_SINK 0x0400 - -/* - * BIO_FILENAME_READ|BIO_CLOSE to open or close on free. - * BIO_set_fp(in,stdin,BIO_NOCLOSE); - */ -# define BIO_NOCLOSE 0x00 -# define BIO_CLOSE 0x01 - -/* - * These are used in the following macros and are passed to BIO_ctrl() - */ -# define BIO_CTRL_RESET 1/* opt - rewind/zero etc */ -# define BIO_CTRL_EOF 2/* opt - are we at the eof */ -# define BIO_CTRL_INFO 3/* opt - extra tit-bits */ -# define BIO_CTRL_SET 4/* man - set the 'IO' type */ -# define BIO_CTRL_GET 5/* man - get the 'IO' type */ -# define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */ -# define BIO_CTRL_POP 7/* opt - internal, used to signify change */ -# define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */ -# define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */ -# define BIO_CTRL_PENDING 10/* opt - is their more data buffered */ -# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */ -# define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */ -# define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */ -/* callback is int cb(BIO *bio,state,ret); */ -# define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */ -# define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */ - -# define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */ - -/* dgram BIO stuff */ -# define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */ -# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected - * socket to be passed in */ -# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */ -# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */ -# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */ -# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */ - -# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */ -# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation tiemd out */ - -/* #ifdef IP_MTU_DISCOVER */ -# define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */ -/* #endif */ - -# define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */ -# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47 -# define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */ -# define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU. - * want to use this if asking - * the kernel fails */ - -# define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was - * exceed in the previous write - * operation */ - -# define BIO_CTRL_DGRAM_GET_PEER 46 -# define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */ - -# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout - * to adjust socket timeouts */ -# define BIO_CTRL_DGRAM_SET_DONT_FRAG 48 - -# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49 - -# ifndef OPENSSL_NO_SCTP -/* SCTP stuff */ -# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 -# define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51 -# define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52 -# define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53 -# define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60 -# define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61 -# define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62 -# define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63 -# define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64 -# define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65 -# define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70 -# endif - -/* modifiers */ -# define BIO_FP_READ 0x02 -# define BIO_FP_WRITE 0x04 -# define BIO_FP_APPEND 0x08 -# define BIO_FP_TEXT 0x10 - -# define BIO_FLAGS_READ 0x01 -# define BIO_FLAGS_WRITE 0x02 -# define BIO_FLAGS_IO_SPECIAL 0x04 -# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL) -# define BIO_FLAGS_SHOULD_RETRY 0x08 -# ifndef BIO_FLAGS_UPLINK -/* - * "UPLINK" flag denotes file descriptors provided by application. It - * defaults to 0, as most platforms don't require UPLINK interface. - */ -# define BIO_FLAGS_UPLINK 0 -# endif - -/* Used in BIO_gethostbyname() */ -# define BIO_GHBN_CTRL_HITS 1 -# define BIO_GHBN_CTRL_MISSES 2 -# define BIO_GHBN_CTRL_CACHE_SIZE 3 -# define BIO_GHBN_CTRL_GET_ENTRY 4 -# define BIO_GHBN_CTRL_FLUSH 5 - -/* Mostly used in the SSL BIO */ -/*- - * Not used anymore - * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10 - * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20 - * #define BIO_FLAGS_PROTOCOL_STARTUP 0x40 - */ - -# define BIO_FLAGS_BASE64_NO_NL 0x100 - -/* - * This is used with memory BIOs: it means we shouldn't free up or change the - * data in any way. - */ -# define BIO_FLAGS_MEM_RDONLY 0x200 - -typedef struct bio_st BIO; - -void BIO_set_flags(BIO *b, int flags); -int BIO_test_flags(const BIO *b, int flags); -void BIO_clear_flags(BIO *b, int flags); - -# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0)) -# define BIO_set_retry_special(b) \ - BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY)) -# define BIO_set_retry_read(b) \ - BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY)) -# define BIO_set_retry_write(b) \ - BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY)) - -/* These are normally used internally in BIOs */ -# define BIO_clear_retry_flags(b) \ - BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) -# define BIO_get_retry_flags(b) \ - BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) - -/* These should be used by the application to tell why we should retry */ -# define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ) -# define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE) -# define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL) -# define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS) -# define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY) - -/* - * The next three are used in conjunction with the BIO_should_io_special() - * condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int - * *reason); will walk the BIO stack and return the 'reason' for the special - * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return - * the code. - */ -/* - * Returned from the SSL bio when the certificate retrieval code had an error - */ -# define BIO_RR_SSL_X509_LOOKUP 0x01 -/* Returned from the connect BIO when a connect would have blocked */ -# define BIO_RR_CONNECT 0x02 -/* Returned from the accept BIO when an accept would have blocked */ -# define BIO_RR_ACCEPT 0x03 - -/* These are passed by the BIO callback */ -# define BIO_CB_FREE 0x01 -# define BIO_CB_READ 0x02 -# define BIO_CB_WRITE 0x03 -# define BIO_CB_PUTS 0x04 -# define BIO_CB_GETS 0x05 -# define BIO_CB_CTRL 0x06 - -/* - * The callback is called before and after the underling operation, The - * BIO_CB_RETURN flag indicates if it is after the call - */ -# define BIO_CB_RETURN 0x80 -# define BIO_CB_return(a) ((a)|BIO_CB_RETURN) -# define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) -# define BIO_cb_post(a) ((a)&BIO_CB_RETURN) - -long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *, - int, long, long); -void BIO_set_callback(BIO *b, - long (*callback) (struct bio_st *, int, const char *, - int, long, long)); -char *BIO_get_callback_arg(const BIO *b); -void BIO_set_callback_arg(BIO *b, char *arg); - -const char *BIO_method_name(const BIO *b); -int BIO_method_type(const BIO *b); - -typedef void bio_info_cb (struct bio_st *, int, const char *, int, long, - long); - -typedef struct bio_method_st { - int type; - const char *name; - int (*bwrite) (BIO *, const char *, int); - int (*bread) (BIO *, char *, int); - int (*bputs) (BIO *, const char *); - int (*bgets) (BIO *, char *, int); - long (*ctrl) (BIO *, int, long, void *); - int (*create) (BIO *); - int (*destroy) (BIO *); - long (*callback_ctrl) (BIO *, int, bio_info_cb *); -} BIO_METHOD; - -struct bio_st { - BIO_METHOD *method; - /* bio, mode, argp, argi, argl, ret */ - long (*callback) (struct bio_st *, int, const char *, int, long, long); - char *cb_arg; /* first argument for the callback */ - int init; - int shutdown; - int flags; /* extra storage */ - int retry_reason; - int num; - void *ptr; - struct bio_st *next_bio; /* used by filter BIOs */ - struct bio_st *prev_bio; /* used by filter BIOs */ - int references; - unsigned long num_read; - unsigned long num_write; - CRYPTO_EX_DATA ex_data; -}; - -DECLARE_STACK_OF(BIO) - -typedef struct bio_f_buffer_ctx_struct { - /*- - * Buffers are setup like this: - * - * <---------------------- size -----------------------> - * +---------------------------------------------------+ - * | consumed | remaining | free space | - * +---------------------------------------------------+ - * <-- off --><------- len -------> - */ - /*- BIO *bio; *//* - * this is now in the BIO struct - */ - int ibuf_size; /* how big is the input buffer */ - int obuf_size; /* how big is the output buffer */ - char *ibuf; /* the char array */ - int ibuf_len; /* how many bytes are in it */ - int ibuf_off; /* write/read offset */ - char *obuf; /* the char array */ - int obuf_len; /* how many bytes are in it */ - int obuf_off; /* write/read offset */ -} BIO_F_BUFFER_CTX; - -/* Prefix and suffix callback in ASN1 BIO */ -typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen, - void *parg); - -# ifndef OPENSSL_NO_SCTP -/* SCTP parameter structs */ -struct bio_dgram_sctp_sndinfo { - uint16_t snd_sid; - uint16_t snd_flags; - uint32_t snd_ppid; - uint32_t snd_context; -}; - -struct bio_dgram_sctp_rcvinfo { - uint16_t rcv_sid; - uint16_t rcv_ssn; - uint16_t rcv_flags; - uint32_t rcv_ppid; - uint32_t rcv_tsn; - uint32_t rcv_cumtsn; - uint32_t rcv_context; -}; - -struct bio_dgram_sctp_prinfo { - uint16_t pr_policy; - uint32_t pr_value; -}; -# endif - -/* connect BIO stuff */ -# define BIO_CONN_S_BEFORE 1 -# define BIO_CONN_S_GET_IP 2 -# define BIO_CONN_S_GET_PORT 3 -# define BIO_CONN_S_CREATE_SOCKET 4 -# define BIO_CONN_S_CONNECT 5 -# define BIO_CONN_S_OK 6 -# define BIO_CONN_S_BLOCKED_CONNECT 7 -# define BIO_CONN_S_NBIO 8 -/* - * #define BIO_CONN_get_param_hostname BIO_ctrl - */ - -# define BIO_C_SET_CONNECT 100 -# define BIO_C_DO_STATE_MACHINE 101 -# define BIO_C_SET_NBIO 102 -# define BIO_C_SET_PROXY_PARAM 103 -# define BIO_C_SET_FD 104 -# define BIO_C_GET_FD 105 -# define BIO_C_SET_FILE_PTR 106 -# define BIO_C_GET_FILE_PTR 107 -# define BIO_C_SET_FILENAME 108 -# define BIO_C_SET_SSL 109 -# define BIO_C_GET_SSL 110 -# define BIO_C_SET_MD 111 -# define BIO_C_GET_MD 112 -# define BIO_C_GET_CIPHER_STATUS 113 -# define BIO_C_SET_BUF_MEM 114 -# define BIO_C_GET_BUF_MEM_PTR 115 -# define BIO_C_GET_BUFF_NUM_LINES 116 -# define BIO_C_SET_BUFF_SIZE 117 -# define BIO_C_SET_ACCEPT 118 -# define BIO_C_SSL_MODE 119 -# define BIO_C_GET_MD_CTX 120 -# define BIO_C_GET_PROXY_PARAM 121 -# define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */ -# define BIO_C_GET_CONNECT 123 -# define BIO_C_GET_ACCEPT 124 -# define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125 -# define BIO_C_GET_SSL_NUM_RENEGOTIATES 126 -# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127 -# define BIO_C_FILE_SEEK 128 -# define BIO_C_GET_CIPHER_CTX 129 -# define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input - * value */ -# define BIO_C_SET_BIND_MODE 131 -# define BIO_C_GET_BIND_MODE 132 -# define BIO_C_FILE_TELL 133 -# define BIO_C_GET_SOCKS 134 -# define BIO_C_SET_SOCKS 135 - -# define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */ -# define BIO_C_GET_WRITE_BUF_SIZE 137 -# define BIO_C_MAKE_BIO_PAIR 138 -# define BIO_C_DESTROY_BIO_PAIR 139 -# define BIO_C_GET_WRITE_GUARANTEE 140 -# define BIO_C_GET_READ_REQUEST 141 -# define BIO_C_SHUTDOWN_WR 142 -# define BIO_C_NREAD0 143 -# define BIO_C_NREAD 144 -# define BIO_C_NWRITE0 145 -# define BIO_C_NWRITE 146 -# define BIO_C_RESET_READ_REQUEST 147 -# define BIO_C_SET_MD_CTX 148 - -# define BIO_C_SET_PREFIX 149 -# define BIO_C_GET_PREFIX 150 -# define BIO_C_SET_SUFFIX 151 -# define BIO_C_GET_SUFFIX 152 - -# define BIO_C_SET_EX_ARG 153 -# define BIO_C_GET_EX_ARG 154 - -# define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg) -# define BIO_get_app_data(s) BIO_get_ex_data(s,0) - -/* BIO_s_connect() and BIO_s_socks4a_connect() */ -# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name) -# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port) -# define BIO_set_conn_ip(b,ip) BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip) -# define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port) -# define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) -# define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) -# define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2) -# define BIO_get_conn_int_port(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL) - -# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) - -/* BIO_s_accept() */ -# define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name) -# define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0) -/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */ -# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?(void *)"a":NULL) -# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio) - -# define BIO_BIND_NORMAL 0 -# define BIO_BIND_REUSEADDR_IF_UNUSED 1 -# define BIO_BIND_REUSEADDR 2 -# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) -# define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) - -/* BIO_s_accept() and BIO_s_connect() */ -# define BIO_do_connect(b) BIO_do_handshake(b) -# define BIO_do_accept(b) BIO_do_handshake(b) -# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) - -/* BIO_s_proxy_client() */ -# define BIO_set_url(b,url) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,0,(char *)(url)) -# define BIO_set_proxies(b,p) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,1,(char *)(p)) -/* BIO_set_nbio(b,n) */ -# define BIO_set_filter_bio(b,s) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,2,(char *)(s)) -/* BIO *BIO_get_filter_bio(BIO *bio); */ -# define BIO_set_proxy_cb(b,cb) BIO_callback_ctrl(b,BIO_C_SET_PROXY_PARAM,3,(void *(*cb)())) -# define BIO_set_proxy_header(b,sk) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,4,(char *)sk) -# define BIO_set_no_connect_return(b,bool) BIO_int_ctrl(b,BIO_C_SET_PROXY_PARAM,5,bool) - -# define BIO_get_proxy_header(b,skp) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,0,(char *)skp) -# define BIO_get_proxies(b,pxy_p) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,1,(char *)(pxy_p)) -# define BIO_get_url(b,url) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url)) -# define BIO_get_no_connect_return(b) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL) - -/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */ -# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) -# define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) - -/* BIO_s_file() */ -# define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp) -# define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp) - -/* BIO_s_fd() and BIO_s_file() */ -# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL) -# define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL) - -/* - * name is cast to lose const, but might be better to route through a - * function so we can do it safely - */ -# ifdef CONST_STRICT -/* - * If you are wondering why this isn't defined, its because CONST_STRICT is - * purely a compile-time kludge to allow const to be checked. - */ -int BIO_read_filename(BIO *b, const char *name); -# else -# define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_READ,(char *)name) -# endif -# define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_WRITE,name) -# define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_APPEND,name) -# define BIO_rw_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ - BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name) - -/* - * WARNING WARNING, this ups the reference count on the read bio of the SSL - * structure. This is because the ssl read BIO is now pointed to by the - * next_bio field in the bio. So when you free the BIO, make sure you are - * doing a BIO_free_all() to catch the underlying BIO. - */ -# define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl) -# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp) -# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL) -# define BIO_set_ssl_renegotiate_bytes(b,num) \ - BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL) -# define BIO_get_num_renegotiates(b) \ - BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL) -# define BIO_set_ssl_renegotiate_timeout(b,seconds) \ - BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL) - -/* defined in evp.h */ -/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */ - -# define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp) -# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)bm) -# define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp) -# define BIO_set_mem_eof_return(b,v) \ - BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL) - -/* For the BIO_f_buffer() type */ -# define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL) -# define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL) -# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0) -# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1) -# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf) - -/* Don't use the next one unless you know what you are doing :-) */ -# define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret)) - -# define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) -# define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL) -# define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL) -# define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL) -# define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) -# define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL) -/* ...pending macros have inappropriate return type */ -size_t BIO_ctrl_pending(BIO *b); -size_t BIO_ctrl_wpending(BIO *b); -# define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) -# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \ - cbp) -# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb) - -/* For the BIO_f_buffer() type */ -# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) - -/* For BIO_s_bio() */ -# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL) -# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) -# define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) -# define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) -# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) -/* macros with inappropriate type -- but ...pending macros use int too: */ -# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) -# define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) -size_t BIO_ctrl_get_write_guarantee(BIO *b); -size_t BIO_ctrl_get_read_request(BIO *b); -int BIO_ctrl_reset_read_request(BIO *b); - -/* ctrl macros for dgram */ -# define BIO_ctrl_dgram_connect(b,peer) \ - (int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)peer) -# define BIO_ctrl_set_connected(b, state, peer) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, state, (char *)peer) -# define BIO_dgram_recv_timedout(b) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL) -# define BIO_dgram_send_timedout(b) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL) -# define BIO_dgram_get_peer(b,peer) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer) -# define BIO_dgram_set_peer(b,peer) \ - (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer) -# define BIO_dgram_get_mtu_overhead(b) \ - (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL) - -/* These two aren't currently implemented */ -/* int BIO_get_ex_num(BIO *bio); */ -/* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */ -int BIO_set_ex_data(BIO *bio, int idx, void *data); -void *BIO_get_ex_data(BIO *bio, int idx); -int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -unsigned long BIO_number_read(BIO *bio); -unsigned long BIO_number_written(BIO *bio); - -/* For BIO_f_asn1() */ -int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, - asn1_ps_func *prefix_free); -int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, - asn1_ps_func **pprefix_free); -int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, - asn1_ps_func *suffix_free); -int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, - asn1_ps_func **psuffix_free); - -# ifndef OPENSSL_NO_FP_API -BIO_METHOD *BIO_s_file(void); -BIO *BIO_new_file(const char *filename, const char *mode); -BIO *BIO_new_fp(FILE *stream, int close_flag); -# define BIO_s_file_internal BIO_s_file -# endif -BIO *BIO_new(BIO_METHOD *type); -int BIO_set(BIO *a, BIO_METHOD *type); -int BIO_free(BIO *a); -void BIO_vfree(BIO *a); -int BIO_read(BIO *b, void *data, int len); -int BIO_gets(BIO *bp, char *buf, int size); -int BIO_write(BIO *b, const void *data, int len); -int BIO_puts(BIO *bp, const char *buf); -int BIO_indent(BIO *b, int indent, int max); -long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg); -long BIO_callback_ctrl(BIO *b, int cmd, - void (*fp) (struct bio_st *, int, const char *, int, - long, long)); -char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg); -long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg); -BIO *BIO_push(BIO *b, BIO *append); -BIO *BIO_pop(BIO *b); -void BIO_free_all(BIO *a); -BIO *BIO_find_type(BIO *b, int bio_type); -BIO *BIO_next(BIO *b); -BIO *BIO_get_retry_BIO(BIO *bio, int *reason); -int BIO_get_retry_reason(BIO *bio); -BIO *BIO_dup_chain(BIO *in); - -int BIO_nread0(BIO *bio, char **buf); -int BIO_nread(BIO *bio, char **buf, int num); -int BIO_nwrite0(BIO *bio, char **buf); -int BIO_nwrite(BIO *bio, char **buf, int num); - -long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, - long argl, long ret); - -BIO_METHOD *BIO_s_mem(void); -BIO *BIO_new_mem_buf(const void *buf, int len); -BIO_METHOD *BIO_s_socket(void); -BIO_METHOD *BIO_s_connect(void); -BIO_METHOD *BIO_s_accept(void); -BIO_METHOD *BIO_s_fd(void); -# ifndef OPENSSL_SYS_OS2 -BIO_METHOD *BIO_s_log(void); -# endif -BIO_METHOD *BIO_s_bio(void); -BIO_METHOD *BIO_s_null(void); -BIO_METHOD *BIO_f_null(void); -BIO_METHOD *BIO_f_buffer(void); -# ifdef OPENSSL_SYS_VMS -BIO_METHOD *BIO_f_linebuffer(void); -# endif -BIO_METHOD *BIO_f_nbio_test(void); -# ifndef OPENSSL_NO_DGRAM -BIO_METHOD *BIO_s_datagram(void); -# ifndef OPENSSL_NO_SCTP -BIO_METHOD *BIO_s_datagram_sctp(void); -# endif -# endif - -/* BIO_METHOD *BIO_f_ber(void); */ - -int BIO_sock_should_retry(int i); -int BIO_sock_non_fatal_error(int error); -int BIO_dgram_non_fatal_error(int error); - -int BIO_fd_should_retry(int i); -int BIO_fd_non_fatal_error(int error); -int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u), - void *u, const char *s, int len); -int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u), - void *u, const char *s, int len, int indent); -int BIO_dump(BIO *b, const char *bytes, int len); -int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent); -# ifndef OPENSSL_NO_FP_API -int BIO_dump_fp(FILE *fp, const char *s, int len); -int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); -# endif -int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data, - int datalen); - -struct hostent *BIO_gethostbyname(const char *name); -/*- - * We might want a thread-safe interface too: - * struct hostent *BIO_gethostbyname_r(const char *name, - * struct hostent *result, void *buffer, size_t buflen); - * or something similar (caller allocates a struct hostent, - * pointed to by "result", and additional buffer space for the various - * substructures; if the buffer does not suffice, NULL is returned - * and an appropriate error code is set). - */ -int BIO_sock_error(int sock); -int BIO_socket_ioctl(int fd, long type, void *arg); -int BIO_socket_nbio(int fd, int mode); -int BIO_get_port(const char *str, unsigned short *port_ptr); -int BIO_get_host_ip(const char *str, unsigned char *ip); -int BIO_get_accept_socket(char *host_port, int mode); -int BIO_accept(int sock, char **ip_port); -int BIO_sock_init(void); -void BIO_sock_cleanup(void); -int BIO_set_tcp_ndelay(int sock, int turn_on); - -BIO *BIO_new_socket(int sock, int close_flag); -BIO *BIO_new_dgram(int fd, int close_flag); -# ifndef OPENSSL_NO_SCTP -BIO *BIO_new_dgram_sctp(int fd, int close_flag); -int BIO_dgram_is_sctp(BIO *bio); -int BIO_dgram_sctp_notification_cb(BIO *b, - void (*handle_notifications) (BIO *bio, - void - *context, - void *buf), - void *context); -int BIO_dgram_sctp_wait_for_dry(BIO *b); -int BIO_dgram_sctp_msg_waiting(BIO *b); -# endif -BIO *BIO_new_fd(int fd, int close_flag); -BIO *BIO_new_connect(const char *host_port); -BIO *BIO_new_accept(const char *host_port); - -int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, - BIO **bio2, size_t writebuf2); -/* - * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints. - * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default - * value. - */ - -void BIO_copy_next_retry(BIO *b); - -/* - * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg); - */ - -# ifdef __GNUC__ -# define __bio_h__attr__ __attribute__ -# else -# define __bio_h__attr__(x) -# endif -int BIO_printf(BIO *bio, const char *format, ...) -__bio_h__attr__((__format__(__printf__, 2, 3))); -int BIO_vprintf(BIO *bio, const char *format, va_list args) -__bio_h__attr__((__format__(__printf__, 2, 0))); -int BIO_snprintf(char *buf, size_t n, const char *format, ...) -__bio_h__attr__((__format__(__printf__, 3, 4))); -int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) -__bio_h__attr__((__format__(__printf__, 3, 0))); -# undef __bio_h__attr__ - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_BIO_strings(void); - -/* Error codes for the BIO functions. */ - -/* Function codes. */ -# define BIO_F_ACPT_STATE 100 -# define BIO_F_BIO_ACCEPT 101 -# define BIO_F_BIO_BER_GET_HEADER 102 -# define BIO_F_BIO_CALLBACK_CTRL 131 -# define BIO_F_BIO_CTRL 103 -# define BIO_F_BIO_GETHOSTBYNAME 120 -# define BIO_F_BIO_GETS 104 -# define BIO_F_BIO_GET_ACCEPT_SOCKET 105 -# define BIO_F_BIO_GET_HOST_IP 106 -# define BIO_F_BIO_GET_PORT 107 -# define BIO_F_BIO_MAKE_PAIR 121 -# define BIO_F_BIO_NEW 108 -# define BIO_F_BIO_NEW_FILE 109 -# define BIO_F_BIO_NEW_MEM_BUF 126 -# define BIO_F_BIO_NREAD 123 -# define BIO_F_BIO_NREAD0 124 -# define BIO_F_BIO_NWRITE 125 -# define BIO_F_BIO_NWRITE0 122 -# define BIO_F_BIO_PUTS 110 -# define BIO_F_BIO_READ 111 -# define BIO_F_BIO_SOCK_INIT 112 -# define BIO_F_BIO_WRITE 113 -# define BIO_F_BUFFER_CTRL 114 -# define BIO_F_CONN_CTRL 127 -# define BIO_F_CONN_STATE 115 -# define BIO_F_DGRAM_SCTP_READ 132 -# define BIO_F_DGRAM_SCTP_WRITE 133 -# define BIO_F_FILE_CTRL 116 -# define BIO_F_FILE_READ 130 -# define BIO_F_LINEBUFFER_CTRL 129 -# define BIO_F_MEM_READ 128 -# define BIO_F_MEM_WRITE 117 -# define BIO_F_SSL_NEW 118 -# define BIO_F_WSASTARTUP 119 - -/* Reason codes. */ -# define BIO_R_ACCEPT_ERROR 100 -# define BIO_R_BAD_FOPEN_MODE 101 -# define BIO_R_BAD_HOSTNAME_LOOKUP 102 -# define BIO_R_BROKEN_PIPE 124 -# define BIO_R_CONNECT_ERROR 103 -# define BIO_R_EOF_ON_MEMORY_BIO 127 -# define BIO_R_ERROR_SETTING_NBIO 104 -# define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET 105 -# define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET 106 -# define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 -# define BIO_R_INVALID_ARGUMENT 125 -# define BIO_R_INVALID_IP_ADDRESS 108 -# define BIO_R_IN_USE 123 -# define BIO_R_KEEPALIVE 109 -# define BIO_R_NBIO_CONNECT_ERROR 110 -# define BIO_R_NO_ACCEPT_PORT_SPECIFIED 111 -# define BIO_R_NO_HOSTNAME_SPECIFIED 112 -# define BIO_R_NO_PORT_DEFINED 113 -# define BIO_R_NO_PORT_SPECIFIED 114 -# define BIO_R_NO_SUCH_FILE 128 -# define BIO_R_NULL_PARAMETER 115 -# define BIO_R_TAG_MISMATCH 116 -# define BIO_R_UNABLE_TO_BIND_SOCKET 117 -# define BIO_R_UNABLE_TO_CREATE_SOCKET 118 -# define BIO_R_UNABLE_TO_LISTEN_SOCKET 119 -# define BIO_R_UNINITIALIZED 120 -# define BIO_R_UNSUPPORTED_METHOD 121 -# define BIO_R_WRITE_TO_READ_ONLY_BIO 126 -# define BIO_R_WSASTARTUP 122 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BIO_H +# define HEADER_BIO_H + +# include + +# ifndef OPENSSL_NO_STDIO +# include +# endif +# include + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* There are the classes of BIOs */ +# define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */ +# define BIO_TYPE_FILTER 0x0200 +# define BIO_TYPE_SOURCE_SINK 0x0400 + +/* These are the 'types' of BIOs */ +# define BIO_TYPE_NONE 0 +# define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK) +# define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK) + +# define BIO_TYPE_FD ( 4|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) +# define BIO_TYPE_SOCKET ( 5|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) +# define BIO_TYPE_NULL ( 6|BIO_TYPE_SOURCE_SINK) +# define BIO_TYPE_SSL ( 7|BIO_TYPE_FILTER) +# define BIO_TYPE_MD ( 8|BIO_TYPE_FILTER) +# define BIO_TYPE_BUFFER ( 9|BIO_TYPE_FILTER) +# define BIO_TYPE_CIPHER (10|BIO_TYPE_FILTER) +# define BIO_TYPE_BASE64 (11|BIO_TYPE_FILTER) +# define BIO_TYPE_CONNECT (12|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) +# define BIO_TYPE_ACCEPT (13|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) + +# define BIO_TYPE_NBIO_TEST (16|BIO_TYPE_FILTER)/* server proxy BIO */ +# define BIO_TYPE_NULL_FILTER (17|BIO_TYPE_FILTER) +# define BIO_TYPE_BIO (19|BIO_TYPE_SOURCE_SINK)/* half a BIO pair */ +# define BIO_TYPE_LINEBUFFER (20|BIO_TYPE_FILTER) +# define BIO_TYPE_DGRAM (21|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) +# define BIO_TYPE_ASN1 (22|BIO_TYPE_FILTER) +# define BIO_TYPE_COMP (23|BIO_TYPE_FILTER) +# ifndef OPENSSL_NO_SCTP +# define BIO_TYPE_DGRAM_SCTP (24|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) +# endif + +#define BIO_TYPE_START 128 + +/* + * BIO_FILENAME_READ|BIO_CLOSE to open or close on free. + * BIO_set_fp(in,stdin,BIO_NOCLOSE); + */ +# define BIO_NOCLOSE 0x00 +# define BIO_CLOSE 0x01 + +/* + * These are used in the following macros and are passed to BIO_ctrl() + */ +# define BIO_CTRL_RESET 1/* opt - rewind/zero etc */ +# define BIO_CTRL_EOF 2/* opt - are we at the eof */ +# define BIO_CTRL_INFO 3/* opt - extra tit-bits */ +# define BIO_CTRL_SET 4/* man - set the 'IO' type */ +# define BIO_CTRL_GET 5/* man - get the 'IO' type */ +# define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */ +# define BIO_CTRL_POP 7/* opt - internal, used to signify change */ +# define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */ +# define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */ +# define BIO_CTRL_PENDING 10/* opt - is their more data buffered */ +# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */ +# define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */ +# define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */ +# define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */ +# define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */ + +# define BIO_CTRL_PEEK 29/* BIO_f_buffer special */ +# define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */ + +/* dgram BIO stuff */ +# define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */ +# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected + * socket to be passed in */ +# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */ +# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */ +# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */ +# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */ + +# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */ +# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation tiemd out */ + +/* #ifdef IP_MTU_DISCOVER */ +# define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */ +/* #endif */ + +# define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */ +# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47 +# define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */ +# define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU. + * want to use this if asking + * the kernel fails */ + +# define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was + * exceed in the previous write + * operation */ + +# define BIO_CTRL_DGRAM_GET_PEER 46 +# define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */ + +# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout + * to adjust socket timeouts */ +# define BIO_CTRL_DGRAM_SET_DONT_FRAG 48 + +# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49 + +/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */ +# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 +# ifndef OPENSSL_NO_SCTP +/* SCTP stuff */ +# define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51 +# define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52 +# define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53 +# define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60 +# define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61 +# define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62 +# define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63 +# define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64 +# define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65 +# define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70 +# endif + +# define BIO_CTRL_DGRAM_SET_PEEK_MODE 71 + +/* modifiers */ +# define BIO_FP_READ 0x02 +# define BIO_FP_WRITE 0x04 +# define BIO_FP_APPEND 0x08 +# define BIO_FP_TEXT 0x10 + +# define BIO_FLAGS_READ 0x01 +# define BIO_FLAGS_WRITE 0x02 +# define BIO_FLAGS_IO_SPECIAL 0x04 +# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL) +# define BIO_FLAGS_SHOULD_RETRY 0x08 +# ifndef BIO_FLAGS_UPLINK +/* + * "UPLINK" flag denotes file descriptors provided by application. It + * defaults to 0, as most platforms don't require UPLINK interface. + */ +# define BIO_FLAGS_UPLINK 0 +# endif + +# define BIO_FLAGS_BASE64_NO_NL 0x100 + +/* + * This is used with memory BIOs: + * BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way; + * BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset. + */ +# define BIO_FLAGS_MEM_RDONLY 0x200 +# define BIO_FLAGS_NONCLEAR_RST 0x400 + +typedef union bio_addr_st BIO_ADDR; +typedef struct bio_addrinfo_st BIO_ADDRINFO; + +int BIO_get_new_index(void); +void BIO_set_flags(BIO *b, int flags); +int BIO_test_flags(const BIO *b, int flags); +void BIO_clear_flags(BIO *b, int flags); + +# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0)) +# define BIO_set_retry_special(b) \ + BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY)) +# define BIO_set_retry_read(b) \ + BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY)) +# define BIO_set_retry_write(b) \ + BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY)) + +/* These are normally used internally in BIOs */ +# define BIO_clear_retry_flags(b) \ + BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) +# define BIO_get_retry_flags(b) \ + BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) + +/* These should be used by the application to tell why we should retry */ +# define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ) +# define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE) +# define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL) +# define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS) +# define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY) + +/* + * The next three are used in conjunction with the BIO_should_io_special() + * condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int + * *reason); will walk the BIO stack and return the 'reason' for the special + * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return + * the code. + */ +/* + * Returned from the SSL bio when the certificate retrieval code had an error + */ +# define BIO_RR_SSL_X509_LOOKUP 0x01 +/* Returned from the connect BIO when a connect would have blocked */ +# define BIO_RR_CONNECT 0x02 +/* Returned from the accept BIO when an accept would have blocked */ +# define BIO_RR_ACCEPT 0x03 + +/* These are passed by the BIO callback */ +# define BIO_CB_FREE 0x01 +# define BIO_CB_READ 0x02 +# define BIO_CB_WRITE 0x03 +# define BIO_CB_PUTS 0x04 +# define BIO_CB_GETS 0x05 +# define BIO_CB_CTRL 0x06 + +/* + * The callback is called before and after the underling operation, The + * BIO_CB_RETURN flag indicates if it is after the call + */ +# define BIO_CB_RETURN 0x80 +# define BIO_CB_return(a) ((a)|BIO_CB_RETURN) +# define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) +# define BIO_cb_post(a) ((a)&BIO_CB_RETURN) + +typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi, + long argl, long ret); +typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp, + size_t len, int argi, + long argl, int ret, size_t *processed); +BIO_callback_fn BIO_get_callback(const BIO *b); +void BIO_set_callback(BIO *b, BIO_callback_fn callback); + +BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b); +void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback); + +char *BIO_get_callback_arg(const BIO *b); +void BIO_set_callback_arg(BIO *b, char *arg); + +typedef struct bio_method_st BIO_METHOD; + +const char *BIO_method_name(const BIO *b); +int BIO_method_type(const BIO *b); + +typedef int BIO_info_cb(BIO *, int, int); +typedef BIO_info_cb bio_info_cb; /* backward compatibility */ + +DEFINE_STACK_OF(BIO) + +/* Prefix and suffix callback in ASN1 BIO */ +typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen, + void *parg); + +# ifndef OPENSSL_NO_SCTP +/* SCTP parameter structs */ +struct bio_dgram_sctp_sndinfo { + uint16_t snd_sid; + uint16_t snd_flags; + uint32_t snd_ppid; + uint32_t snd_context; +}; + +struct bio_dgram_sctp_rcvinfo { + uint16_t rcv_sid; + uint16_t rcv_ssn; + uint16_t rcv_flags; + uint32_t rcv_ppid; + uint32_t rcv_tsn; + uint32_t rcv_cumtsn; + uint32_t rcv_context; +}; + +struct bio_dgram_sctp_prinfo { + uint16_t pr_policy; + uint32_t pr_value; +}; +# endif + +/* + * #define BIO_CONN_get_param_hostname BIO_ctrl + */ + +# define BIO_C_SET_CONNECT 100 +# define BIO_C_DO_STATE_MACHINE 101 +# define BIO_C_SET_NBIO 102 +/* # define BIO_C_SET_PROXY_PARAM 103 */ +# define BIO_C_SET_FD 104 +# define BIO_C_GET_FD 105 +# define BIO_C_SET_FILE_PTR 106 +# define BIO_C_GET_FILE_PTR 107 +# define BIO_C_SET_FILENAME 108 +# define BIO_C_SET_SSL 109 +# define BIO_C_GET_SSL 110 +# define BIO_C_SET_MD 111 +# define BIO_C_GET_MD 112 +# define BIO_C_GET_CIPHER_STATUS 113 +# define BIO_C_SET_BUF_MEM 114 +# define BIO_C_GET_BUF_MEM_PTR 115 +# define BIO_C_GET_BUFF_NUM_LINES 116 +# define BIO_C_SET_BUFF_SIZE 117 +# define BIO_C_SET_ACCEPT 118 +# define BIO_C_SSL_MODE 119 +# define BIO_C_GET_MD_CTX 120 +/* # define BIO_C_GET_PROXY_PARAM 121 */ +# define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */ +# define BIO_C_GET_CONNECT 123 +# define BIO_C_GET_ACCEPT 124 +# define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125 +# define BIO_C_GET_SSL_NUM_RENEGOTIATES 126 +# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127 +# define BIO_C_FILE_SEEK 128 +# define BIO_C_GET_CIPHER_CTX 129 +# define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input + * value */ +# define BIO_C_SET_BIND_MODE 131 +# define BIO_C_GET_BIND_MODE 132 +# define BIO_C_FILE_TELL 133 +# define BIO_C_GET_SOCKS 134 +# define BIO_C_SET_SOCKS 135 + +# define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */ +# define BIO_C_GET_WRITE_BUF_SIZE 137 +# define BIO_C_MAKE_BIO_PAIR 138 +# define BIO_C_DESTROY_BIO_PAIR 139 +# define BIO_C_GET_WRITE_GUARANTEE 140 +# define BIO_C_GET_READ_REQUEST 141 +# define BIO_C_SHUTDOWN_WR 142 +# define BIO_C_NREAD0 143 +# define BIO_C_NREAD 144 +# define BIO_C_NWRITE0 145 +# define BIO_C_NWRITE 146 +# define BIO_C_RESET_READ_REQUEST 147 +# define BIO_C_SET_MD_CTX 148 + +# define BIO_C_SET_PREFIX 149 +# define BIO_C_GET_PREFIX 150 +# define BIO_C_SET_SUFFIX 151 +# define BIO_C_GET_SUFFIX 152 + +# define BIO_C_SET_EX_ARG 153 +# define BIO_C_GET_EX_ARG 154 + +# define BIO_C_SET_CONNECT_MODE 155 + +# define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg) +# define BIO_get_app_data(s) BIO_get_ex_data(s,0) + +# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) + +# ifndef OPENSSL_NO_SOCK +/* IP families we support, for BIO_s_connect() and BIO_s_accept() */ +/* Note: the underlying operating system may not support some of them */ +# define BIO_FAMILY_IPV4 4 +# define BIO_FAMILY_IPV6 6 +# define BIO_FAMILY_IPANY 256 + +/* BIO_s_connect() */ +# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0, \ + (char *)(name)) +# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1, \ + (char *)(port)) +# define BIO_set_conn_address(b,addr) BIO_ctrl(b,BIO_C_SET_CONNECT,2, \ + (char *)(addr)) +# define BIO_set_conn_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,f) +# define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)) +# define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)) +# define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)) +# define BIO_get_conn_ip_family(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL) +# define BIO_set_conn_mode(b,n) BIO_ctrl(b,BIO_C_SET_CONNECT_MODE,(n),NULL) + +/* BIO_s_accept() */ +# define BIO_set_accept_name(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0, \ + (char *)(name)) +# define BIO_set_accept_port(b,port) BIO_ctrl(b,BIO_C_SET_ACCEPT,1, \ + (char *)(port)) +# define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)) +# define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,1)) +# define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,2)) +# define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,3)) +/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */ +# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(n)?(void *)"a":NULL) +# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,3, \ + (char *)(bio)) +# define BIO_set_accept_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_ACCEPT,4,f) +# define BIO_get_accept_ip_family(b) BIO_ctrl(b,BIO_C_GET_ACCEPT,4,NULL) + +/* Aliases kept for backward compatibility */ +# define BIO_BIND_NORMAL 0 +# define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR +# define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR +# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) +# define BIO_get_bind_mode(b) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) + +/* BIO_s_accept() and BIO_s_connect() */ +# define BIO_do_connect(b) BIO_do_handshake(b) +# define BIO_do_accept(b) BIO_do_handshake(b) +# endif /* OPENSSL_NO_SOCK */ + +# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) + +/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */ +# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) +# define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)(c)) + +/* BIO_s_file() */ +# define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)(fp)) +# define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)(fpp)) + +/* BIO_s_fd() and BIO_s_file() */ +# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL) +# define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL) + +/* + * name is cast to lose const, but might be better to route through a + * function so we can do it safely + */ +# ifdef CONST_STRICT +/* + * If you are wondering why this isn't defined, its because CONST_STRICT is + * purely a compile-time kludge to allow const to be checked. + */ +int BIO_read_filename(BIO *b, const char *name); +# else +# define BIO_read_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ + BIO_CLOSE|BIO_FP_READ,(char *)(name)) +# endif +# define BIO_write_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ + BIO_CLOSE|BIO_FP_WRITE,name) +# define BIO_append_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ + BIO_CLOSE|BIO_FP_APPEND,name) +# define BIO_rw_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ + BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name) + +/* + * WARNING WARNING, this ups the reference count on the read bio of the SSL + * structure. This is because the ssl read BIO is now pointed to by the + * next_bio field in the bio. So when you free the BIO, make sure you are + * doing a BIO_free_all() to catch the underlying BIO. + */ +# define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)(ssl)) +# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)(sslp)) +# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL) +# define BIO_set_ssl_renegotiate_bytes(b,num) \ + BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL) +# define BIO_get_num_renegotiates(b) \ + BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL) +# define BIO_set_ssl_renegotiate_timeout(b,seconds) \ + BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL) + +/* defined in evp.h */ +/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */ + +# define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)(pp)) +# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)(bm)) +# define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0, \ + (char *)(pp)) +# define BIO_set_mem_eof_return(b,v) \ + BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL) + +/* For the BIO_f_buffer() type */ +# define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL) +# define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL) +# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0) +# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1) +# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf) + +/* Don't use the next one unless you know what you are doing :-) */ +# define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret)) + +# define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) +# define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL) +# define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL) +# define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL) +# define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) +# define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL) +/* ...pending macros have inappropriate return type */ +size_t BIO_ctrl_pending(BIO *b); +size_t BIO_ctrl_wpending(BIO *b); +# define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) +# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \ + cbp) +# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb) + +/* For the BIO_f_buffer() type */ +# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) +# define BIO_buffer_peek(b,s,l) BIO_ctrl(b,BIO_CTRL_PEEK,(l),(s)) + +/* For BIO_s_bio() */ +# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL) +# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) +# define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) +# define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) +# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) +/* macros with inappropriate type -- but ...pending macros use int too: */ +# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) +# define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) +size_t BIO_ctrl_get_write_guarantee(BIO *b); +size_t BIO_ctrl_get_read_request(BIO *b); +int BIO_ctrl_reset_read_request(BIO *b); + +/* ctrl macros for dgram */ +# define BIO_ctrl_dgram_connect(b,peer) \ + (int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)(peer)) +# define BIO_ctrl_set_connected(b,peer) \ + (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer)) +# define BIO_dgram_recv_timedout(b) \ + (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL) +# define BIO_dgram_send_timedout(b) \ + (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL) +# define BIO_dgram_get_peer(b,peer) \ + (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer)) +# define BIO_dgram_set_peer(b,peer) \ + (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer)) +# define BIO_dgram_get_mtu_overhead(b) \ + (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL) + +#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef) +int BIO_set_ex_data(BIO *bio, int idx, void *data); +void *BIO_get_ex_data(BIO *bio, int idx); +uint64_t BIO_number_read(BIO *bio); +uint64_t BIO_number_written(BIO *bio); + +/* For BIO_f_asn1() */ +int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, + asn1_ps_func *prefix_free); +int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, + asn1_ps_func **pprefix_free); +int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, + asn1_ps_func *suffix_free); +int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, + asn1_ps_func **psuffix_free); + +const BIO_METHOD *BIO_s_file(void); +BIO *BIO_new_file(const char *filename, const char *mode); +# ifndef OPENSSL_NO_STDIO +BIO *BIO_new_fp(FILE *stream, int close_flag); +# endif +BIO *BIO_new(const BIO_METHOD *type); +int BIO_free(BIO *a); +void BIO_set_data(BIO *a, void *ptr); +void *BIO_get_data(BIO *a); +void BIO_set_init(BIO *a, int init); +int BIO_get_init(BIO *a); +void BIO_set_shutdown(BIO *a, int shut); +int BIO_get_shutdown(BIO *a); +void BIO_vfree(BIO *a); +int BIO_up_ref(BIO *a); +int BIO_read(BIO *b, void *data, int dlen); +int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes); +int BIO_gets(BIO *bp, char *buf, int size); +int BIO_write(BIO *b, const void *data, int dlen); +int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written); +int BIO_puts(BIO *bp, const char *buf); +int BIO_indent(BIO *b, int indent, int max); +long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg); +long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp); +void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg); +long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg); +BIO *BIO_push(BIO *b, BIO *append); +BIO *BIO_pop(BIO *b); +void BIO_free_all(BIO *a); +BIO *BIO_find_type(BIO *b, int bio_type); +BIO *BIO_next(BIO *b); +void BIO_set_next(BIO *b, BIO *next); +BIO *BIO_get_retry_BIO(BIO *bio, int *reason); +int BIO_get_retry_reason(BIO *bio); +void BIO_set_retry_reason(BIO *bio, int reason); +BIO *BIO_dup_chain(BIO *in); + +int BIO_nread0(BIO *bio, char **buf); +int BIO_nread(BIO *bio, char **buf, int num); +int BIO_nwrite0(BIO *bio, char **buf); +int BIO_nwrite(BIO *bio, char **buf, int num); + +long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, + long argl, long ret); + +const BIO_METHOD *BIO_s_mem(void); +const BIO_METHOD *BIO_s_secmem(void); +BIO *BIO_new_mem_buf(const void *buf, int len); +# ifndef OPENSSL_NO_SOCK +const BIO_METHOD *BIO_s_socket(void); +const BIO_METHOD *BIO_s_connect(void); +const BIO_METHOD *BIO_s_accept(void); +# endif +const BIO_METHOD *BIO_s_fd(void); +const BIO_METHOD *BIO_s_log(void); +const BIO_METHOD *BIO_s_bio(void); +const BIO_METHOD *BIO_s_null(void); +const BIO_METHOD *BIO_f_null(void); +const BIO_METHOD *BIO_f_buffer(void); +const BIO_METHOD *BIO_f_linebuffer(void); +const BIO_METHOD *BIO_f_nbio_test(void); +# ifndef OPENSSL_NO_DGRAM +const BIO_METHOD *BIO_s_datagram(void); +int BIO_dgram_non_fatal_error(int error); +BIO *BIO_new_dgram(int fd, int close_flag); +# ifndef OPENSSL_NO_SCTP +const BIO_METHOD *BIO_s_datagram_sctp(void); +BIO *BIO_new_dgram_sctp(int fd, int close_flag); +int BIO_dgram_is_sctp(BIO *bio); +int BIO_dgram_sctp_notification_cb(BIO *b, + void (*handle_notifications) (BIO *bio, + void *context, + void *buf), + void *context); +int BIO_dgram_sctp_wait_for_dry(BIO *b); +int BIO_dgram_sctp_msg_waiting(BIO *b); +# endif +# endif + +# ifndef OPENSSL_NO_SOCK +int BIO_sock_should_retry(int i); +int BIO_sock_non_fatal_error(int error); +# endif + +int BIO_fd_should_retry(int i); +int BIO_fd_non_fatal_error(int error); +int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u), + void *u, const char *s, int len); +int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u), + void *u, const char *s, int len, int indent); +int BIO_dump(BIO *b, const char *bytes, int len); +int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent); +# ifndef OPENSSL_NO_STDIO +int BIO_dump_fp(FILE *fp, const char *s, int len); +int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); +# endif +int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data, + int datalen); + +# ifndef OPENSSL_NO_SOCK +BIO_ADDR *BIO_ADDR_new(void); +int BIO_ADDR_rawmake(BIO_ADDR *ap, int family, + const void *where, size_t wherelen, unsigned short port); +void BIO_ADDR_free(BIO_ADDR *); +void BIO_ADDR_clear(BIO_ADDR *ap); +int BIO_ADDR_family(const BIO_ADDR *ap); +int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l); +unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap); +char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric); +char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric); +char *BIO_ADDR_path_string(const BIO_ADDR *ap); + +const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai); +int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai); +int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai); +int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai); +const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai); +void BIO_ADDRINFO_free(BIO_ADDRINFO *bai); + +enum BIO_hostserv_priorities { + BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV +}; +int BIO_parse_hostserv(const char *hostserv, char **host, char **service, + enum BIO_hostserv_priorities hostserv_prio); +enum BIO_lookup_type { + BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER +}; +int BIO_lookup(const char *host, const char *service, + enum BIO_lookup_type lookup_type, + int family, int socktype, BIO_ADDRINFO **res); +int BIO_lookup_ex(const char *host, const char *service, + int lookup_type, int family, int socktype, int protocol, + BIO_ADDRINFO **res); +int BIO_sock_error(int sock); +int BIO_socket_ioctl(int fd, long type, void *arg); +int BIO_socket_nbio(int fd, int mode); +int BIO_sock_init(void); +# if OPENSSL_API_COMPAT < 0x10100000L +# define BIO_sock_cleanup() while(0) continue +# endif +int BIO_set_tcp_ndelay(int sock, int turn_on); + +DEPRECATEDIN_1_1_0(struct hostent *BIO_gethostbyname(const char *name)) +DEPRECATEDIN_1_1_0(int BIO_get_port(const char *str, unsigned short *port_ptr)) +DEPRECATEDIN_1_1_0(int BIO_get_host_ip(const char *str, unsigned char *ip)) +DEPRECATEDIN_1_1_0(int BIO_get_accept_socket(char *host_port, int mode)) +DEPRECATEDIN_1_1_0(int BIO_accept(int sock, char **ip_port)) + +union BIO_sock_info_u { + BIO_ADDR *addr; +}; +enum BIO_sock_info_type { + BIO_SOCK_INFO_ADDRESS +}; +int BIO_sock_info(int sock, + enum BIO_sock_info_type type, union BIO_sock_info_u *info); + +# define BIO_SOCK_REUSEADDR 0x01 +# define BIO_SOCK_V6_ONLY 0x02 +# define BIO_SOCK_KEEPALIVE 0x04 +# define BIO_SOCK_NONBLOCK 0x08 +# define BIO_SOCK_NODELAY 0x10 + +int BIO_socket(int domain, int socktype, int protocol, int options); +int BIO_connect(int sock, const BIO_ADDR *addr, int options); +int BIO_bind(int sock, const BIO_ADDR *addr, int options); +int BIO_listen(int sock, const BIO_ADDR *addr, int options); +int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options); +int BIO_closesocket(int sock); + +BIO *BIO_new_socket(int sock, int close_flag); +BIO *BIO_new_connect(const char *host_port); +BIO *BIO_new_accept(const char *host_port); +# endif /* OPENSSL_NO_SOCK*/ + +BIO *BIO_new_fd(int fd, int close_flag); + +int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, + BIO **bio2, size_t writebuf2); +/* + * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints. + * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default + * value. + */ + +void BIO_copy_next_retry(BIO *b); + +/* + * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg); + */ + +# define ossl_bio__attr__(x) +# if defined(__GNUC__) && defined(__STDC_VERSION__) \ + && !defined(__APPLE__) + /* + * Because we support the 'z' modifier, which made its appearance in C99, + * we can't use __attribute__ with pre C99 dialects. + */ +# if __STDC_VERSION__ >= 199901L +# undef ossl_bio__attr__ +# define ossl_bio__attr__ __attribute__ +# if __GNUC__*10 + __GNUC_MINOR__ >= 44 +# define ossl_bio__printf__ __gnu_printf__ +# else +# define ossl_bio__printf__ __printf__ +# endif +# endif +# endif +int BIO_printf(BIO *bio, const char *format, ...) +ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3))); +int BIO_vprintf(BIO *bio, const char *format, va_list args) +ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0))); +int BIO_snprintf(char *buf, size_t n, const char *format, ...) +ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4))); +int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) +ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0))); +# undef ossl_bio__attr__ +# undef ossl_bio__printf__ + + +BIO_METHOD *BIO_meth_new(int type, const char *name); +void BIO_meth_free(BIO_METHOD *biom); +int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *, int); +int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *, size_t, + size_t *); +int BIO_meth_set_write(BIO_METHOD *biom, + int (*write) (BIO *, const char *, int)); +int BIO_meth_set_write_ex(BIO_METHOD *biom, + int (*bwrite) (BIO *, const char *, size_t, size_t *)); +int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int); +int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *, size_t, size_t *); +int BIO_meth_set_read(BIO_METHOD *biom, + int (*read) (BIO *, char *, int)); +int BIO_meth_set_read_ex(BIO_METHOD *biom, + int (*bread) (BIO *, char *, size_t, size_t *)); +int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *); +int BIO_meth_set_puts(BIO_METHOD *biom, + int (*puts) (BIO *, const char *)); +int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int); +int BIO_meth_set_gets(BIO_METHOD *biom, + int (*gets) (BIO *, char *, int)); +long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *); +int BIO_meth_set_ctrl(BIO_METHOD *biom, + long (*ctrl) (BIO *, int, long, void *)); +int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *); +int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *)); +int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *); +int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *)); +long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom)) + (BIO *, int, BIO_info_cb *); +int BIO_meth_set_callback_ctrl(BIO_METHOD *biom, + long (*callback_ctrl) (BIO *, int, + BIO_info_cb *)); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/bioerr.h b/src/Mayaqua/win32_inc/openssl/bioerr.h new file mode 100644 index 00000000..46e2c96e --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/bioerr.h @@ -0,0 +1,124 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BIOERR_H +# define HEADER_BIOERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_BIO_strings(void); + +/* + * BIO function codes. + */ +# define BIO_F_ACPT_STATE 100 +# define BIO_F_ADDRINFO_WRAP 148 +# define BIO_F_ADDR_STRINGS 134 +# define BIO_F_BIO_ACCEPT 101 +# define BIO_F_BIO_ACCEPT_EX 137 +# define BIO_F_BIO_ACCEPT_NEW 152 +# define BIO_F_BIO_ADDR_NEW 144 +# define BIO_F_BIO_BIND 147 +# define BIO_F_BIO_CALLBACK_CTRL 131 +# define BIO_F_BIO_CONNECT 138 +# define BIO_F_BIO_CONNECT_NEW 153 +# define BIO_F_BIO_CTRL 103 +# define BIO_F_BIO_GETS 104 +# define BIO_F_BIO_GET_HOST_IP 106 +# define BIO_F_BIO_GET_NEW_INDEX 102 +# define BIO_F_BIO_GET_PORT 107 +# define BIO_F_BIO_LISTEN 139 +# define BIO_F_BIO_LOOKUP 135 +# define BIO_F_BIO_LOOKUP_EX 143 +# define BIO_F_BIO_MAKE_PAIR 121 +# define BIO_F_BIO_METH_NEW 146 +# define BIO_F_BIO_NEW 108 +# define BIO_F_BIO_NEW_DGRAM_SCTP 145 +# define BIO_F_BIO_NEW_FILE 109 +# define BIO_F_BIO_NEW_MEM_BUF 126 +# define BIO_F_BIO_NREAD 123 +# define BIO_F_BIO_NREAD0 124 +# define BIO_F_BIO_NWRITE 125 +# define BIO_F_BIO_NWRITE0 122 +# define BIO_F_BIO_PARSE_HOSTSERV 136 +# define BIO_F_BIO_PUTS 110 +# define BIO_F_BIO_READ 111 +# define BIO_F_BIO_READ_EX 105 +# define BIO_F_BIO_READ_INTERN 120 +# define BIO_F_BIO_SOCKET 140 +# define BIO_F_BIO_SOCKET_NBIO 142 +# define BIO_F_BIO_SOCK_INFO 141 +# define BIO_F_BIO_SOCK_INIT 112 +# define BIO_F_BIO_WRITE 113 +# define BIO_F_BIO_WRITE_EX 119 +# define BIO_F_BIO_WRITE_INTERN 128 +# define BIO_F_BUFFER_CTRL 114 +# define BIO_F_CONN_CTRL 127 +# define BIO_F_CONN_STATE 115 +# define BIO_F_DGRAM_SCTP_NEW 149 +# define BIO_F_DGRAM_SCTP_READ 132 +# define BIO_F_DGRAM_SCTP_WRITE 133 +# define BIO_F_DOAPR_OUTCH 150 +# define BIO_F_FILE_CTRL 116 +# define BIO_F_FILE_READ 130 +# define BIO_F_LINEBUFFER_CTRL 129 +# define BIO_F_LINEBUFFER_NEW 151 +# define BIO_F_MEM_WRITE 117 +# define BIO_F_NBIOF_NEW 154 +# define BIO_F_SLG_WRITE 155 +# define BIO_F_SSL_NEW 118 + +/* + * BIO reason codes. + */ +# define BIO_R_ACCEPT_ERROR 100 +# define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141 +# define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129 +# define BIO_R_BAD_FOPEN_MODE 101 +# define BIO_R_BROKEN_PIPE 124 +# define BIO_R_CONNECT_ERROR 103 +# define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 +# define BIO_R_GETSOCKNAME_ERROR 132 +# define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133 +# define BIO_R_GETTING_SOCKTYPE 134 +# define BIO_R_INVALID_ARGUMENT 125 +# define BIO_R_INVALID_SOCKET 135 +# define BIO_R_IN_USE 123 +# define BIO_R_LENGTH_TOO_LONG 102 +# define BIO_R_LISTEN_V6_ONLY 136 +# define BIO_R_LOOKUP_RETURNED_NOTHING 142 +# define BIO_R_MALFORMED_HOST_OR_SERVICE 130 +# define BIO_R_NBIO_CONNECT_ERROR 110 +# define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143 +# define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144 +# define BIO_R_NO_PORT_DEFINED 113 +# define BIO_R_NO_SUCH_FILE 128 +# define BIO_R_NULL_PARAMETER 115 +# define BIO_R_UNABLE_TO_BIND_SOCKET 117 +# define BIO_R_UNABLE_TO_CREATE_SOCKET 118 +# define BIO_R_UNABLE_TO_KEEPALIVE 137 +# define BIO_R_UNABLE_TO_LISTEN_SOCKET 119 +# define BIO_R_UNABLE_TO_NODELAY 138 +# define BIO_R_UNABLE_TO_REUSEADDR 139 +# define BIO_R_UNAVAILABLE_IP_FAMILY 145 +# define BIO_R_UNINITIALIZED 120 +# define BIO_R_UNKNOWN_INFO_TYPE 140 +# define BIO_R_UNSUPPORTED_IP_FAMILY 146 +# define BIO_R_UNSUPPORTED_METHOD 121 +# define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131 +# define BIO_R_WRITE_TO_READ_ONLY_BIO 126 +# define BIO_R_WSASTARTUP 122 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/blowfish.h b/src/Mayaqua/win32_inc/openssl/blowfish.h index 8dcd68e5..cd3e460e 100644 --- a/src/Mayaqua/win32_inc/openssl/blowfish.h +++ b/src/Mayaqua/win32_inc/openssl/blowfish.h @@ -1,130 +1,61 @@ -/* crypto/bf/blowfish.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_BLOWFISH_H -# define HEADER_BLOWFISH_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_NO_BF -# error BF is disabled. -# endif - -# define BF_ENCRYPT 1 -# define BF_DECRYPT 0 - -/*- - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! BF_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! BF_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -# if defined(__LP32__) -# define BF_LONG unsigned long -# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -# define BF_LONG unsigned long -# define BF_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ -# else -# define BF_LONG unsigned int -# endif - -# define BF_ROUNDS 16 -# define BF_BLOCK 8 - -typedef struct bf_key_st { - BF_LONG P[BF_ROUNDS + 2]; - BF_LONG S[4 * 256]; -} BF_KEY; - -# ifdef OPENSSL_FIPS -void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data); -# endif -void BF_set_key(BF_KEY *key, int len, const unsigned char *data); - -void BF_encrypt(BF_LONG *data, const BF_KEY *key); -void BF_decrypt(BF_LONG *data, const BF_KEY *key); - -void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, - const BF_KEY *key, int enc); -void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - const BF_KEY *schedule, unsigned char *ivec, int enc); -void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, const BF_KEY *schedule, - unsigned char *ivec, int *num, int enc); -void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, const BF_KEY *schedule, - unsigned char *ivec, int *num); -const char *BF_options(void); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BLOWFISH_H +# define HEADER_BLOWFISH_H + +# include + +# ifndef OPENSSL_NO_BF +# include +# ifdef __cplusplus +extern "C" { +# endif + +# define BF_ENCRYPT 1 +# define BF_DECRYPT 0 + +/*- + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * ! BF_LONG has to be at least 32 bits wide. ! + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + */ +# define BF_LONG unsigned int + +# define BF_ROUNDS 16 +# define BF_BLOCK 8 + +typedef struct bf_key_st { + BF_LONG P[BF_ROUNDS + 2]; + BF_LONG S[4 * 256]; +} BF_KEY; + +void BF_set_key(BF_KEY *key, int len, const unsigned char *data); + +void BF_encrypt(BF_LONG *data, const BF_KEY *key); +void BF_decrypt(BF_LONG *data, const BF_KEY *key); + +void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, + const BF_KEY *key, int enc); +void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, + const BF_KEY *schedule, unsigned char *ivec, int enc); +void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, const BF_KEY *schedule, + unsigned char *ivec, int *num, int enc); +void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, const BF_KEY *schedule, + unsigned char *ivec, int *num); +const char *BF_options(void); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/bn.h b/src/Mayaqua/win32_inc/openssl/bn.h index 2a05c480..8af05d00 100644 --- a/src/Mayaqua/win32_inc/openssl/bn.h +++ b/src/Mayaqua/win32_inc/openssl/bn.h @@ -1,951 +1,539 @@ -/* crypto/bn/bn.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * Portions of the attached software ("Contribution") are developed by - * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. - * - * The Contribution is licensed pursuant to the Eric Young open source - * license provided above. - * - * The binary polynomial arithmetic software is originally written by - * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. - * - */ - -#ifndef HEADER_BN_H -# define HEADER_BN_H - -# include -# include -# ifndef OPENSSL_NO_FP_API -# include /* FILE */ -# endif -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * These preprocessor symbols control various aspects of the bignum headers - * and library code. They're not defined by any "normal" configuration, as - * they are intended for development and testing purposes. NB: defining all - * three can be useful for debugging application code as well as openssl - * itself. BN_DEBUG - turn on various debugging alterations to the bignum - * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up - * mismanagement of bignum internals. You must also define BN_DEBUG. - */ -/* #define BN_DEBUG */ -/* #define BN_DEBUG_RAND */ - -# ifndef OPENSSL_SMALL_FOOTPRINT -# define BN_MUL_COMBA -# define BN_SQR_COMBA -# define BN_RECURSION -# endif - -/* - * This next option uses the C libraries (2 word)/(1 word) function. If it is - * not defined, I use my C version (which is slower). The reason for this - * flag is that when the particular C compiler library routine is used, and - * the library is linked with a different compiler, the library is missing. - * This mostly happens when the library is built with gcc and then linked - * using normal cc. This would be a common occurrence because gcc normally - * produces code that is 2 times faster than system compilers for the big - * number stuff. For machines with only one compiler (or shared libraries), - * this should be on. Again this in only really a problem on machines using - * "long long's", are 32bit, and are not using my assembler code. - */ -# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \ - defined(OPENSSL_SYS_WIN32) || defined(linux) -# ifndef BN_DIV2W -# define BN_DIV2W -# endif -# endif - -/* - * assuming long is 64bit - this is the DEC Alpha unsigned long long is only - * 64 bits :-(, don't define BN_LLONG for the DEC Alpha - */ -# ifdef SIXTY_FOUR_BIT_LONG -# define BN_ULLONG unsigned long long -# define BN_ULONG unsigned long -# define BN_LONG long -# define BN_BITS 128 -# define BN_BYTES 8 -# define BN_BITS2 64 -# define BN_BITS4 32 -# define BN_MASK (0xffffffffffffffffffffffffffffffffLL) -# define BN_MASK2 (0xffffffffffffffffL) -# define BN_MASK2l (0xffffffffL) -# define BN_MASK2h (0xffffffff00000000L) -# define BN_MASK2h1 (0xffffffff80000000L) -# define BN_TBIT (0x8000000000000000L) -# define BN_DEC_CONV (10000000000000000000UL) -# define BN_DEC_FMT1 "%lu" -# define BN_DEC_FMT2 "%019lu" -# define BN_DEC_NUM 19 -# define BN_HEX_FMT1 "%lX" -# define BN_HEX_FMT2 "%016lX" -# endif - -/* - * This is where the long long data type is 64 bits, but long is 32. For - * machines where there are 64bit registers, this is the mode to use. IRIX, - * on R4000 and above should use this mode, along with the relevant assembler - * code :-). Do NOT define BN_LLONG. - */ -# ifdef SIXTY_FOUR_BIT -# undef BN_LLONG -# undef BN_ULLONG -# define BN_ULONG unsigned long long -# define BN_LONG long long -# define BN_BITS 128 -# define BN_BYTES 8 -# define BN_BITS2 64 -# define BN_BITS4 32 -# define BN_MASK2 (0xffffffffffffffffLL) -# define BN_MASK2l (0xffffffffL) -# define BN_MASK2h (0xffffffff00000000LL) -# define BN_MASK2h1 (0xffffffff80000000LL) -# define BN_TBIT (0x8000000000000000LL) -# define BN_DEC_CONV (10000000000000000000ULL) -# define BN_DEC_FMT1 "%llu" -# define BN_DEC_FMT2 "%019llu" -# define BN_DEC_NUM 19 -# define BN_HEX_FMT1 "%llX" -# define BN_HEX_FMT2 "%016llX" -# endif - -# ifdef THIRTY_TWO_BIT -# ifdef BN_LLONG -# if defined(_WIN32) && !defined(__GNUC__) -# define BN_ULLONG unsigned __int64 -# define BN_MASK (0xffffffffffffffffI64) -# else -# define BN_ULLONG unsigned long long -# define BN_MASK (0xffffffffffffffffLL) -# endif -# endif -# define BN_ULONG unsigned int -# define BN_LONG int -# define BN_BITS 64 -# define BN_BYTES 4 -# define BN_BITS2 32 -# define BN_BITS4 16 -# define BN_MASK2 (0xffffffffL) -# define BN_MASK2l (0xffff) -# define BN_MASK2h1 (0xffff8000L) -# define BN_MASK2h (0xffff0000L) -# define BN_TBIT (0x80000000L) -# define BN_DEC_CONV (1000000000L) -# define BN_DEC_FMT1 "%u" -# define BN_DEC_FMT2 "%09u" -# define BN_DEC_NUM 9 -# define BN_HEX_FMT1 "%X" -# define BN_HEX_FMT2 "%08X" -# endif - -# define BN_DEFAULT_BITS 1280 - -# define BN_FLG_MALLOCED 0x01 -# define BN_FLG_STATIC_DATA 0x02 - -/* - * avoid leaking exponent information through timing, - * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime, - * BN_div() will call BN_div_no_branch, - * BN_mod_inverse() will call BN_mod_inverse_no_branch. - */ -# define BN_FLG_CONSTTIME 0x04 - -# ifdef OPENSSL_NO_DEPRECATED -/* deprecated name for the flag */ -# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME -/* - * avoid leaking exponent information through timings - * (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime) - */ -# endif - -# ifndef OPENSSL_NO_DEPRECATED -# define BN_FLG_FREE 0x8000 - /* used for debuging */ -# endif -# define BN_set_flags(b,n) ((b)->flags|=(n)) -# define BN_get_flags(b,n) ((b)->flags&(n)) - -/* - * get a clone of a BIGNUM with changed flags, for *temporary* use only (the - * two BIGNUMs cannot not be used in parallel!) - */ -# define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \ - (dest)->top=(b)->top, \ - (dest)->dmax=(b)->dmax, \ - (dest)->neg=(b)->neg, \ - (dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \ - | ((b)->flags & ~BN_FLG_MALLOCED) \ - | BN_FLG_STATIC_DATA \ - | (n))) - -/* Already declared in ossl_typ.h */ -# if 0 -typedef struct bignum_st BIGNUM; -/* Used for temp variables (declaration hidden in bn_lcl.h) */ -typedef struct bignum_ctx BN_CTX; -typedef struct bn_blinding_st BN_BLINDING; -typedef struct bn_mont_ctx_st BN_MONT_CTX; -typedef struct bn_recp_ctx_st BN_RECP_CTX; -typedef struct bn_gencb_st BN_GENCB; -# endif - -struct bignum_st { - BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit - * chunks. */ - int top; /* Index of last used d +1. */ - /* The next are internal book keeping for bn_expand. */ - int dmax; /* Size of the d array. */ - int neg; /* one if the number is negative */ - int flags; -}; - -/* Used for montgomery multiplication */ -struct bn_mont_ctx_st { - int ri; /* number of bits in R */ - BIGNUM RR; /* used to convert to montgomery form */ - BIGNUM N; /* The modulus */ - BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only - * stored for bignum algorithm) */ - BN_ULONG n0[2]; /* least significant word(s) of Ni; (type - * changed with 0.9.9, was "BN_ULONG n0;" - * before) */ - int flags; -}; - -/* - * Used for reciprocal division/mod functions It cannot be shared between - * threads - */ -struct bn_recp_ctx_st { - BIGNUM N; /* the divisor */ - BIGNUM Nr; /* the reciprocal */ - int num_bits; - int shift; - int flags; -}; - -/* Used for slow "generation" functions. */ -struct bn_gencb_st { - unsigned int ver; /* To handle binary (in)compatibility */ - void *arg; /* callback-specific data */ - union { - /* if(ver==1) - handles old style callbacks */ - void (*cb_1) (int, int, void *); - /* if(ver==2) - new callback style */ - int (*cb_2) (int, int, BN_GENCB *); - } cb; -}; -/* Wrapper function to make using BN_GENCB easier, */ -int BN_GENCB_call(BN_GENCB *cb, int a, int b); -/* Macro to populate a BN_GENCB structure with an "old"-style callback */ -# define BN_GENCB_set_old(gencb, callback, cb_arg) { \ - BN_GENCB *tmp_gencb = (gencb); \ - tmp_gencb->ver = 1; \ - tmp_gencb->arg = (cb_arg); \ - tmp_gencb->cb.cb_1 = (callback); } -/* Macro to populate a BN_GENCB structure with a "new"-style callback */ -# define BN_GENCB_set(gencb, callback, cb_arg) { \ - BN_GENCB *tmp_gencb = (gencb); \ - tmp_gencb->ver = 2; \ - tmp_gencb->arg = (cb_arg); \ - tmp_gencb->cb.cb_2 = (callback); } - -# define BN_prime_checks 0 /* default: select number of iterations based - * on the size of the number */ - -/* - * number of Miller-Rabin iterations for an error rate of less than 2^-80 for - * random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook of - * Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996]; - * original paper: Damgaard, Landrock, Pomerance: Average case error - * estimates for the strong probable prime test. -- Math. Comp. 61 (1993) - * 177-194) - */ -# define BN_prime_checks_for_size(b) ((b) >= 1300 ? 2 : \ - (b) >= 850 ? 3 : \ - (b) >= 650 ? 4 : \ - (b) >= 550 ? 5 : \ - (b) >= 450 ? 6 : \ - (b) >= 400 ? 7 : \ - (b) >= 350 ? 8 : \ - (b) >= 300 ? 9 : \ - (b) >= 250 ? 12 : \ - (b) >= 200 ? 15 : \ - (b) >= 150 ? 18 : \ - /* b >= 100 */ 27) - -# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) - -/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */ -# define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \ - (((w) == 0) && ((a)->top == 0))) -# define BN_is_zero(a) ((a)->top == 0) -# define BN_is_one(a) (BN_abs_is_word((a),1) && !(a)->neg) -# define BN_is_word(a,w) (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg)) -# define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1)) - -# define BN_one(a) (BN_set_word((a),1)) -# define BN_zero_ex(a) \ - do { \ - BIGNUM *_tmp_bn = (a); \ - _tmp_bn->top = 0; \ - _tmp_bn->neg = 0; \ - } while(0) -# ifdef OPENSSL_NO_DEPRECATED -# define BN_zero(a) BN_zero_ex(a) -# else -# define BN_zero(a) (BN_set_word((a),0)) -# endif - -const BIGNUM *BN_value_one(void); -char *BN_options(void); -BN_CTX *BN_CTX_new(void); -# ifndef OPENSSL_NO_DEPRECATED -void BN_CTX_init(BN_CTX *c); -# endif -void BN_CTX_free(BN_CTX *c); -void BN_CTX_start(BN_CTX *ctx); -BIGNUM *BN_CTX_get(BN_CTX *ctx); -void BN_CTX_end(BN_CTX *ctx); -int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); -int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom); -int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); -int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); -int BN_num_bits(const BIGNUM *a); -int BN_num_bits_word(BN_ULONG); -BIGNUM *BN_new(void); -void BN_init(BIGNUM *); -void BN_clear_free(BIGNUM *a); -BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); -void BN_swap(BIGNUM *a, BIGNUM *b); -BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); -int BN_bn2bin(const BIGNUM *a, unsigned char *to); -BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret); -int BN_bn2mpi(const BIGNUM *a, unsigned char *to); -int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); -/** BN_set_negative sets sign of a BIGNUM - * \param b pointer to the BIGNUM object - * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise - */ -void BN_set_negative(BIGNUM *b, int n); -/** BN_is_negative returns 1 if the BIGNUM is negative - * \param a pointer to the BIGNUM object - * \return 1 if a < 0 and 0 otherwise - */ -# define BN_is_negative(a) ((a)->neg != 0) - -int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, - BN_CTX *ctx); -# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) -int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); -int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, - BN_CTX *ctx); -int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, - BN_CTX *ctx); -int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, - BN_CTX *ctx); -int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); -int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m); -int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, - BN_CTX *ctx); -int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m); - -BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w); -BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w); -int BN_mul_word(BIGNUM *a, BN_ULONG w); -int BN_add_word(BIGNUM *a, BN_ULONG w); -int BN_sub_word(BIGNUM *a, BN_ULONG w); -int BN_set_word(BIGNUM *a, BN_ULONG w); -BN_ULONG BN_get_word(const BIGNUM *a); - -int BN_cmp(const BIGNUM *a, const BIGNUM *b); -void BN_free(BIGNUM *a); -int BN_is_bit_set(const BIGNUM *a, int n); -int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); -int BN_lshift1(BIGNUM *r, const BIGNUM *a); -int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); - -int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx); -int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); -int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *in_mont); -int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); -int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, - const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m, - BN_CTX *ctx, BN_MONT_CTX *m_ctx); -int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx); - -int BN_mask_bits(BIGNUM *a, int n); -# ifndef OPENSSL_NO_FP_API -int BN_print_fp(FILE *fp, const BIGNUM *a); -# endif -# ifdef HEADER_BIO_H -int BN_print(BIO *fp, const BIGNUM *a); -# else -int BN_print(void *fp, const BIGNUM *a); -# endif -int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx); -int BN_rshift(BIGNUM *r, const BIGNUM *a, int n); -int BN_rshift1(BIGNUM *r, const BIGNUM *a); -void BN_clear(BIGNUM *a); -BIGNUM *BN_dup(const BIGNUM *a); -int BN_ucmp(const BIGNUM *a, const BIGNUM *b); -int BN_set_bit(BIGNUM *a, int n); -int BN_clear_bit(BIGNUM *a, int n); -char *BN_bn2hex(const BIGNUM *a); -char *BN_bn2dec(const BIGNUM *a); -int BN_hex2bn(BIGNUM **a, const char *str); -int BN_dec2bn(BIGNUM **a, const char *str); -int BN_asc2bn(BIGNUM **a, const char *str); -int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns - * -2 for - * error */ -BIGNUM *BN_mod_inverse(BIGNUM *ret, - const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); -BIGNUM *BN_mod_sqrt(BIGNUM *ret, - const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); - -void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); - -/* Deprecated versions */ -# ifndef OPENSSL_NO_DEPRECATED -BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, - const BIGNUM *add, const BIGNUM *rem, - void (*callback) (int, int, void *), void *cb_arg); -int BN_is_prime(const BIGNUM *p, int nchecks, - void (*callback) (int, int, void *), - BN_CTX *ctx, void *cb_arg); -int BN_is_prime_fasttest(const BIGNUM *p, int nchecks, - void (*callback) (int, int, void *), BN_CTX *ctx, - void *cb_arg, int do_trial_division); -# endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* Newer versions */ -int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add, - const BIGNUM *rem, BN_GENCB *cb); -int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb); -int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, - int do_trial_division, BN_GENCB *cb); - -int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); - -int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, - const BIGNUM *Xp, const BIGNUM *Xp1, - const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx, - BN_GENCB *cb); -int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1, - BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e, - BN_CTX *ctx, BN_GENCB *cb); - -BN_MONT_CTX *BN_MONT_CTX_new(void); -void BN_MONT_CTX_init(BN_MONT_CTX *ctx); -int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - BN_MONT_CTX *mont, BN_CTX *ctx); -# define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ - (r),(a),&((mont)->RR),(mont),(ctx)) -int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, - BN_MONT_CTX *mont, BN_CTX *ctx); -void BN_MONT_CTX_free(BN_MONT_CTX *mont); -int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx); -BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from); -BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, - const BIGNUM *mod, BN_CTX *ctx); - -/* BN_BLINDING flags */ -# define BN_BLINDING_NO_UPDATE 0x00000001 -# define BN_BLINDING_NO_RECREATE 0x00000002 - -BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod); -void BN_BLINDING_free(BN_BLINDING *b); -int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx); -int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); -int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); -int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); -int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, - BN_CTX *); -# ifndef OPENSSL_NO_DEPRECATED -unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *); -void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long); -# endif -CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *); -unsigned long BN_BLINDING_get_flags(const BN_BLINDING *); -void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long); -BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b, - const BIGNUM *e, BIGNUM *m, BN_CTX *ctx, - int (*bn_mod_exp) (BIGNUM *r, - const BIGNUM *a, - const BIGNUM *p, - const BIGNUM *m, - BN_CTX *ctx, - BN_MONT_CTX *m_ctx), - BN_MONT_CTX *m_ctx); - -# ifndef OPENSSL_NO_DEPRECATED -void BN_set_params(int mul, int high, int low, int mont); -int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */ -# endif - -void BN_RECP_CTX_init(BN_RECP_CTX *recp); -BN_RECP_CTX *BN_RECP_CTX_new(void); -void BN_RECP_CTX_free(BN_RECP_CTX *recp); -int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx); -int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, - BN_RECP_CTX *recp, BN_CTX *ctx); -int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx); -int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, - BN_RECP_CTX *recp, BN_CTX *ctx); - -# ifndef OPENSSL_NO_EC2M - -/* - * Functions for arithmetic over binary polynomials represented by BIGNUMs. - * The BIGNUM::neg property of BIGNUMs representing binary polynomials is - * ignored. Note that input arguments are not const so that their bit arrays - * can be expanded to the appropriate size if needed. - */ - -/* - * r = a + b - */ -int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); -# define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) -/* - * r=a mod p - */ -int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); -/* r = (a * b) mod p */ -int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *p, BN_CTX *ctx); -/* r = (a * a) mod p */ -int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -/* r = (1 / b) mod p */ -int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); -/* r = (a / b) mod p */ -int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *p, BN_CTX *ctx); -/* r = (a ^ b) mod p */ -int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *p, BN_CTX *ctx); -/* r = sqrt(a) mod p */ -int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - BN_CTX *ctx); -/* r^2 + r = a mod p */ -int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - BN_CTX *ctx); -# define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) -/*- - * Some functions allow for representation of the irreducible polynomials - * as an unsigned int[], say p. The irreducible f(t) is then of the form: - * t^p[0] + t^p[1] + ... + t^p[k] - * where m = p[0] > p[1] > ... > p[k] = 0. - */ -/* r = a mod p */ -int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]); -/* r = (a * b) mod p */ -int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const int p[], BN_CTX *ctx); -/* r = (a * a) mod p */ -int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], - BN_CTX *ctx); -/* r = (1 / b) mod p */ -int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[], - BN_CTX *ctx); -/* r = (a / b) mod p */ -int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const int p[], BN_CTX *ctx); -/* r = (a ^ b) mod p */ -int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const int p[], BN_CTX *ctx); -/* r = sqrt(a) mod p */ -int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, - const int p[], BN_CTX *ctx); -/* r^2 + r = a mod p */ -int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, - const int p[], BN_CTX *ctx); -int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max); -int BN_GF2m_arr2poly(const int p[], BIGNUM *a); - -# endif - -/* - * faster mod functions for the 'NIST primes' 0 <= a < p^2 - */ -int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); -int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); - -const BIGNUM *BN_get0_nist_prime_192(void); -const BIGNUM *BN_get0_nist_prime_224(void); -const BIGNUM *BN_get0_nist_prime_256(void); -const BIGNUM *BN_get0_nist_prime_384(void); -const BIGNUM *BN_get0_nist_prime_521(void); - -/* library internal functions */ - -# define bn_expand(a,bits) \ - ( \ - bits > (INT_MAX - BN_BITS2 + 1) ? \ - NULL \ - : \ - (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) ? \ - (a) \ - : \ - bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2) \ - ) - -# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) -BIGNUM *bn_expand2(BIGNUM *a, int words); -# ifndef OPENSSL_NO_DEPRECATED -BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */ -# endif - -/*- - * Bignum consistency macros - * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from - * bignum data after direct manipulations on the data. There is also an - * "internal" macro, bn_check_top(), for verifying that there are no leading - * zeroes. Unfortunately, some auditing is required due to the fact that - * bn_fix_top() has become an overabused duct-tape because bignum data is - * occasionally passed around in an inconsistent state. So the following - * changes have been made to sort this out; - * - bn_fix_top()s implementation has been moved to bn_correct_top() - * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and - * bn_check_top() is as before. - * - if BN_DEBUG *is* defined; - * - bn_check_top() tries to pollute unused words even if the bignum 'top' is - * consistent. (ed: only if BN_DEBUG_RAND is defined) - * - bn_fix_top() maps to bn_check_top() rather than "fixing" anything. - * The idea is to have debug builds flag up inconsistent bignums when they - * occur. If that occurs in a bn_fix_top(), we examine the code in question; if - * the use of bn_fix_top() was appropriate (ie. it follows directly after code - * that manipulates the bignum) it is converted to bn_correct_top(), and if it - * was not appropriate, we convert it permanently to bn_check_top() and track - * down the cause of the bug. Eventually, no internal code should be using the - * bn_fix_top() macro. External applications and libraries should try this with - * their own code too, both in terms of building against the openssl headers - * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it - * defined. This not only improves external code, it provides more test - * coverage for openssl's own code. - */ - -# ifdef BN_DEBUG - -/* We only need assert() when debugging */ -# include - -# ifdef BN_DEBUG_RAND -/* To avoid "make update" cvs wars due to BN_DEBUG, use some tricks */ -# ifndef RAND_pseudo_bytes -int RAND_pseudo_bytes(unsigned char *buf, int num); -# define BN_DEBUG_TRIX -# endif -# define bn_pollute(a) \ - do { \ - const BIGNUM *_bnum1 = (a); \ - if(_bnum1->top < _bnum1->dmax) { \ - unsigned char _tmp_char; \ - /* We cast away const without the compiler knowing, any \ - * *genuinely* constant variables that aren't mutable \ - * wouldn't be constructed with top!=dmax. */ \ - BN_ULONG *_not_const; \ - memcpy(&_not_const, &_bnum1->d, sizeof(BN_ULONG*)); \ - /* Debug only - safe to ignore error return */ \ - RAND_pseudo_bytes(&_tmp_char, 1); \ - memset((unsigned char *)(_not_const + _bnum1->top), _tmp_char, \ - (_bnum1->dmax - _bnum1->top) * sizeof(BN_ULONG)); \ - } \ - } while(0) -# ifdef BN_DEBUG_TRIX -# undef RAND_pseudo_bytes -# endif -# else -# define bn_pollute(a) -# endif -# define bn_check_top(a) \ - do { \ - const BIGNUM *_bnum2 = (a); \ - if (_bnum2 != NULL) { \ - assert((_bnum2->top == 0) || \ - (_bnum2->d[_bnum2->top - 1] != 0)); \ - bn_pollute(_bnum2); \ - } \ - } while(0) - -# define bn_fix_top(a) bn_check_top(a) - -# define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2) -# define bn_wcheck_size(bn, words) \ - do { \ - const BIGNUM *_bnum2 = (bn); \ - assert((words) <= (_bnum2)->dmax && (words) >= (_bnum2)->top); \ - /* avoid unused variable warning with NDEBUG */ \ - (void)(_bnum2); \ - } while(0) - -# else /* !BN_DEBUG */ - -# define bn_pollute(a) -# define bn_check_top(a) -# define bn_fix_top(a) bn_correct_top(a) -# define bn_check_size(bn, bits) -# define bn_wcheck_size(bn, words) - -# endif - -# define bn_correct_top(a) \ - { \ - BN_ULONG *ftl; \ - int tmp_top = (a)->top; \ - if (tmp_top > 0) \ - { \ - for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \ - if (*(ftl--)) break; \ - (a)->top = tmp_top; \ - } \ - if ((a)->top == 0) \ - (a)->neg = 0; \ - bn_pollute(a); \ - } - -BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, - BN_ULONG w); -BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); -void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num); -BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d); -BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, - int num); -BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, - int num); - -/* Primes from RFC 2409 */ -BIGNUM *get_rfc2409_prime_768(BIGNUM *bn); -BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn); - -/* Primes from RFC 3526 */ -BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn); -BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn); - -int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_BN_strings(void); - -/* Error codes for the BN functions. */ - -/* Function codes. */ -# define BN_F_BNRAND 127 -# define BN_F_BN_BLINDING_CONVERT_EX 100 -# define BN_F_BN_BLINDING_CREATE_PARAM 128 -# define BN_F_BN_BLINDING_INVERT_EX 101 -# define BN_F_BN_BLINDING_NEW 102 -# define BN_F_BN_BLINDING_UPDATE 103 -# define BN_F_BN_BN2DEC 104 -# define BN_F_BN_BN2HEX 105 -# define BN_F_BN_CTX_GET 116 -# define BN_F_BN_CTX_NEW 106 -# define BN_F_BN_CTX_START 129 -# define BN_F_BN_DIV 107 -# define BN_F_BN_DIV_NO_BRANCH 138 -# define BN_F_BN_DIV_RECP 130 -# define BN_F_BN_EXP 123 -# define BN_F_BN_EXPAND2 108 -# define BN_F_BN_EXPAND_INTERNAL 120 -# define BN_F_BN_GF2M_MOD 131 -# define BN_F_BN_GF2M_MOD_EXP 132 -# define BN_F_BN_GF2M_MOD_MUL 133 -# define BN_F_BN_GF2M_MOD_SOLVE_QUAD 134 -# define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 135 -# define BN_F_BN_GF2M_MOD_SQR 136 -# define BN_F_BN_GF2M_MOD_SQRT 137 -# define BN_F_BN_LSHIFT 145 -# define BN_F_BN_MOD_EXP2_MONT 118 -# define BN_F_BN_MOD_EXP_MONT 109 -# define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124 -# define BN_F_BN_MOD_EXP_MONT_WORD 117 -# define BN_F_BN_MOD_EXP_RECP 125 -# define BN_F_BN_MOD_EXP_SIMPLE 126 -# define BN_F_BN_MOD_INVERSE 110 -# define BN_F_BN_MOD_INVERSE_NO_BRANCH 139 -# define BN_F_BN_MOD_LSHIFT_QUICK 119 -# define BN_F_BN_MOD_MUL_RECIPROCAL 111 -# define BN_F_BN_MOD_SQRT 121 -# define BN_F_BN_MPI2BN 112 -# define BN_F_BN_NEW 113 -# define BN_F_BN_RAND 114 -# define BN_F_BN_RAND_RANGE 122 -# define BN_F_BN_RSHIFT 146 -# define BN_F_BN_USUB 115 - -/* Reason codes. */ -# define BN_R_ARG2_LT_ARG3 100 -# define BN_R_BAD_RECIPROCAL 101 -# define BN_R_BIGNUM_TOO_LONG 114 -# define BN_R_BITS_TOO_SMALL 118 -# define BN_R_CALLED_WITH_EVEN_MODULUS 102 -# define BN_R_DIV_BY_ZERO 103 -# define BN_R_ENCODING_ERROR 104 -# define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 -# define BN_R_INPUT_NOT_REDUCED 110 -# define BN_R_INVALID_LENGTH 106 -# define BN_R_INVALID_RANGE 115 -# define BN_R_INVALID_SHIFT 119 -# define BN_R_NOT_A_SQUARE 111 -# define BN_R_NOT_INITIALIZED 107 -# define BN_R_NO_INVERSE 108 -# define BN_R_NO_SOLUTION 116 -# define BN_R_P_IS_NOT_PRIME 112 -# define BN_R_TOO_MANY_ITERATIONS 113 -# define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BN_H +# define HEADER_BN_H + +# include +# ifndef OPENSSL_NO_STDIO +# include +# endif +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * 64-bit processor with LP64 ABI + */ +# ifdef SIXTY_FOUR_BIT_LONG +# define BN_ULONG unsigned long +# define BN_BYTES 8 +# endif + +/* + * 64-bit processor other than LP64 ABI + */ +# ifdef SIXTY_FOUR_BIT +# define BN_ULONG unsigned long long +# define BN_BYTES 8 +# endif + +# ifdef THIRTY_TWO_BIT +# define BN_ULONG unsigned int +# define BN_BYTES 4 +# endif + +# define BN_BITS2 (BN_BYTES * 8) +# define BN_BITS (BN_BITS2 * 2) +# define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1)) + +# define BN_FLG_MALLOCED 0x01 +# define BN_FLG_STATIC_DATA 0x02 + +/* + * avoid leaking exponent information through timing, + * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime, + * BN_div() will call BN_div_no_branch, + * BN_mod_inverse() will call BN_mod_inverse_no_branch. + */ +# define BN_FLG_CONSTTIME 0x04 +# define BN_FLG_SECURE 0x08 + +# if OPENSSL_API_COMPAT < 0x00908000L +/* deprecated name for the flag */ +# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME +# define BN_FLG_FREE 0x8000 /* used for debugging */ +# endif + +void BN_set_flags(BIGNUM *b, int n); +int BN_get_flags(const BIGNUM *b, int n); + +/* Values for |top| in BN_rand() */ +#define BN_RAND_TOP_ANY -1 +#define BN_RAND_TOP_ONE 0 +#define BN_RAND_TOP_TWO 1 + +/* Values for |bottom| in BN_rand() */ +#define BN_RAND_BOTTOM_ANY 0 +#define BN_RAND_BOTTOM_ODD 1 + +/* + * get a clone of a BIGNUM with changed flags, for *temporary* use only (the + * two BIGNUMs cannot be used in parallel!). Also only for *read only* use. The + * value |dest| should be a newly allocated BIGNUM obtained via BN_new() that + * has not been otherwise initialised or used. + */ +void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags); + +/* Wrapper function to make using BN_GENCB easier */ +int BN_GENCB_call(BN_GENCB *cb, int a, int b); + +BN_GENCB *BN_GENCB_new(void); +void BN_GENCB_free(BN_GENCB *cb); + +/* Populate a BN_GENCB structure with an "old"-style callback */ +void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *), + void *cb_arg); + +/* Populate a BN_GENCB structure with a "new"-style callback */ +void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *), + void *cb_arg); + +void *BN_GENCB_get_arg(BN_GENCB *cb); + +# define BN_prime_checks 0 /* default: select number of iterations based + * on the size of the number */ + +/* + * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations + * that will be done for checking that a random number is probably prime. The + * error rate for accepting a composite number as prime depends on the size of + * the prime |b|. The error rates used are for calculating an RSA key with 2 primes, + * and so the level is what you would expect for a key of double the size of the + * prime. + * + * This table is generated using the algorithm of FIPS PUB 186-4 + * Digital Signature Standard (DSS), section F.1, page 117. + * (https://dx.doi.org/10.6028/NIST.FIPS.186-4) + * + * The following magma script was used to generate the output: + * securitybits:=125; + * k:=1024; + * for t:=1 to 65 do + * for M:=3 to Floor(2*Sqrt(k-1)-1) do + * S:=0; + * // Sum over m + * for m:=3 to M do + * s:=0; + * // Sum over j + * for j:=2 to m do + * s+:=(RealField(32)!2)^-(j+(k-1)/j); + * end for; + * S+:=2^(m-(m-1)*t)*s; + * end for; + * A:=2^(k-2-M*t); + * B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S; + * pkt:=2.00743*Log(2)*k*2^-k*(A+B); + * seclevel:=Floor(-Log(2,pkt)); + * if seclevel ge securitybits then + * printf "k: %5o, security: %o bits (t: %o, M: %o)\n",k,seclevel,t,M; + * break; + * end if; + * end for; + * if seclevel ge securitybits then break; end if; + * end for; + * + * It can be run online at: + * http://magma.maths.usyd.edu.au/calc + * + * And will output: + * k: 1024, security: 129 bits (t: 6, M: 23) + * + * k is the number of bits of the prime, securitybits is the level we want to + * reach. + * + * prime length | RSA key size | # MR tests | security level + * -------------+--------------|------------+--------------- + * (b) >= 6394 | >= 12788 | 3 | 256 bit + * (b) >= 3747 | >= 7494 | 3 | 192 bit + * (b) >= 1345 | >= 2690 | 4 | 128 bit + * (b) >= 1080 | >= 2160 | 5 | 128 bit + * (b) >= 852 | >= 1704 | 5 | 112 bit + * (b) >= 476 | >= 952 | 5 | 80 bit + * (b) >= 400 | >= 800 | 6 | 80 bit + * (b) >= 347 | >= 694 | 7 | 80 bit + * (b) >= 308 | >= 616 | 8 | 80 bit + * (b) >= 55 | >= 110 | 27 | 64 bit + * (b) >= 6 | >= 12 | 34 | 64 bit + */ + +# define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : \ + (b) >= 1345 ? 4 : \ + (b) >= 476 ? 5 : \ + (b) >= 400 ? 6 : \ + (b) >= 347 ? 7 : \ + (b) >= 308 ? 8 : \ + (b) >= 55 ? 27 : \ + /* b >= 6 */ 34) + +# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) + +int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w); +int BN_is_zero(const BIGNUM *a); +int BN_is_one(const BIGNUM *a); +int BN_is_word(const BIGNUM *a, const BN_ULONG w); +int BN_is_odd(const BIGNUM *a); + +# define BN_one(a) (BN_set_word((a),1)) + +void BN_zero_ex(BIGNUM *a); + +# if OPENSSL_API_COMPAT >= 0x00908000L +# define BN_zero(a) BN_zero_ex(a) +# else +# define BN_zero(a) (BN_set_word((a),0)) +# endif + +const BIGNUM *BN_value_one(void); +char *BN_options(void); +BN_CTX *BN_CTX_new(void); +BN_CTX *BN_CTX_secure_new(void); +void BN_CTX_free(BN_CTX *c); +void BN_CTX_start(BN_CTX *ctx); +BIGNUM *BN_CTX_get(BN_CTX *ctx); +void BN_CTX_end(BN_CTX *ctx); +int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); +int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom); +int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); +int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range); +int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom); +int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); +int BN_num_bits(const BIGNUM *a); +int BN_num_bits_word(BN_ULONG l); +int BN_security_bits(int L, int N); +BIGNUM *BN_new(void); +BIGNUM *BN_secure_new(void); +void BN_clear_free(BIGNUM *a); +BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); +void BN_swap(BIGNUM *a, BIGNUM *b); +BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); +int BN_bn2bin(const BIGNUM *a, unsigned char *to); +int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen); +BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); +int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen); +BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret); +int BN_bn2mpi(const BIGNUM *a, unsigned char *to); +int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); +int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); +int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); +int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); +int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); +int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); +/** BN_set_negative sets sign of a BIGNUM + * \param b pointer to the BIGNUM object + * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise + */ +void BN_set_negative(BIGNUM *b, int n); +/** BN_is_negative returns 1 if the BIGNUM is negative + * \param b pointer to the BIGNUM object + * \return 1 if a < 0 and 0 otherwise + */ +int BN_is_negative(const BIGNUM *b); + +int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, + BN_CTX *ctx); +# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) +int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); +int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, + BN_CTX *ctx); +int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const BIGNUM *m); +int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, + BN_CTX *ctx); +int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const BIGNUM *m); +int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, + BN_CTX *ctx); +int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); +int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); +int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m); +int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, + BN_CTX *ctx); +int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m); + +BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w); +BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w); +int BN_mul_word(BIGNUM *a, BN_ULONG w); +int BN_add_word(BIGNUM *a, BN_ULONG w); +int BN_sub_word(BIGNUM *a, BN_ULONG w); +int BN_set_word(BIGNUM *a, BN_ULONG w); +BN_ULONG BN_get_word(const BIGNUM *a); + +int BN_cmp(const BIGNUM *a, const BIGNUM *b); +void BN_free(BIGNUM *a); +int BN_is_bit_set(const BIGNUM *a, int n); +int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); +int BN_lshift1(BIGNUM *r, const BIGNUM *a); +int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); + +int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx); +int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); +int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *in_mont); +int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); +int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, + const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m, + BN_CTX *ctx, BN_MONT_CTX *m_ctx); +int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx); + +int BN_mask_bits(BIGNUM *a, int n); +# ifndef OPENSSL_NO_STDIO +int BN_print_fp(FILE *fp, const BIGNUM *a); +# endif +int BN_print(BIO *bio, const BIGNUM *a); +int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx); +int BN_rshift(BIGNUM *r, const BIGNUM *a, int n); +int BN_rshift1(BIGNUM *r, const BIGNUM *a); +void BN_clear(BIGNUM *a); +BIGNUM *BN_dup(const BIGNUM *a); +int BN_ucmp(const BIGNUM *a, const BIGNUM *b); +int BN_set_bit(BIGNUM *a, int n); +int BN_clear_bit(BIGNUM *a, int n); +char *BN_bn2hex(const BIGNUM *a); +char *BN_bn2dec(const BIGNUM *a); +int BN_hex2bn(BIGNUM **a, const char *str); +int BN_dec2bn(BIGNUM **a, const char *str); +int BN_asc2bn(BIGNUM **a, const char *str); +int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); +int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns + * -2 for + * error */ +BIGNUM *BN_mod_inverse(BIGNUM *ret, + const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); +BIGNUM *BN_mod_sqrt(BIGNUM *ret, + const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); + +void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); + +/* Deprecated versions */ +DEPRECATEDIN_0_9_8(BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, + const BIGNUM *add, + const BIGNUM *rem, + void (*callback) (int, int, + void *), + void *cb_arg)) +DEPRECATEDIN_0_9_8(int + BN_is_prime(const BIGNUM *p, int nchecks, + void (*callback) (int, int, void *), + BN_CTX *ctx, void *cb_arg)) +DEPRECATEDIN_0_9_8(int + BN_is_prime_fasttest(const BIGNUM *p, int nchecks, + void (*callback) (int, int, void *), + BN_CTX *ctx, void *cb_arg, + int do_trial_division)) + +/* Newer versions */ +int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add, + const BIGNUM *rem, BN_GENCB *cb); +int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb); +int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, + int do_trial_division, BN_GENCB *cb); + +int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); + +int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, + const BIGNUM *Xp, const BIGNUM *Xp1, + const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx, + BN_GENCB *cb); +int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1, + BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e, + BN_CTX *ctx, BN_GENCB *cb); + +BN_MONT_CTX *BN_MONT_CTX_new(void); +int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + BN_MONT_CTX *mont, BN_CTX *ctx); +int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, + BN_CTX *ctx); +int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, + BN_CTX *ctx); +void BN_MONT_CTX_free(BN_MONT_CTX *mont); +int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx); +BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from); +BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock, + const BIGNUM *mod, BN_CTX *ctx); + +/* BN_BLINDING flags */ +# define BN_BLINDING_NO_UPDATE 0x00000001 +# define BN_BLINDING_NO_RECREATE 0x00000002 + +BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod); +void BN_BLINDING_free(BN_BLINDING *b); +int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx); +int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); +int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); +int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); +int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, + BN_CTX *); + +int BN_BLINDING_is_current_thread(BN_BLINDING *b); +void BN_BLINDING_set_current_thread(BN_BLINDING *b); +int BN_BLINDING_lock(BN_BLINDING *b); +int BN_BLINDING_unlock(BN_BLINDING *b); + +unsigned long BN_BLINDING_get_flags(const BN_BLINDING *); +void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long); +BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b, + const BIGNUM *e, BIGNUM *m, BN_CTX *ctx, + int (*bn_mod_exp) (BIGNUM *r, + const BIGNUM *a, + const BIGNUM *p, + const BIGNUM *m, + BN_CTX *ctx, + BN_MONT_CTX *m_ctx), + BN_MONT_CTX *m_ctx); + +DEPRECATEDIN_0_9_8(void BN_set_params(int mul, int high, int low, int mont)) +DEPRECATEDIN_0_9_8(int BN_get_params(int which)) /* 0, mul, 1 high, 2 low, 3 + * mont */ + +BN_RECP_CTX *BN_RECP_CTX_new(void); +void BN_RECP_CTX_free(BN_RECP_CTX *recp); +int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx); +int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, + BN_RECP_CTX *recp, BN_CTX *ctx); +int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx); +int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, + BN_RECP_CTX *recp, BN_CTX *ctx); + +# ifndef OPENSSL_NO_EC2M + +/* + * Functions for arithmetic over binary polynomials represented by BIGNUMs. + * The BIGNUM::neg property of BIGNUMs representing binary polynomials is + * ignored. Note that input arguments are not const so that their bit arrays + * can be expanded to the appropriate size if needed. + */ + +/* + * r = a + b + */ +int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); +# define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) +/* + * r=a mod p + */ +int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); +/* r = (a * b) mod p */ +int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const BIGNUM *p, BN_CTX *ctx); +/* r = (a * a) mod p */ +int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); +/* r = (1 / b) mod p */ +int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); +/* r = (a / b) mod p */ +int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const BIGNUM *p, BN_CTX *ctx); +/* r = (a ^ b) mod p */ +int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const BIGNUM *p, BN_CTX *ctx); +/* r = sqrt(a) mod p */ +int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + BN_CTX *ctx); +/* r^2 + r = a mod p */ +int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + BN_CTX *ctx); +# define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) +/*- + * Some functions allow for representation of the irreducible polynomials + * as an unsigned int[], say p. The irreducible f(t) is then of the form: + * t^p[0] + t^p[1] + ... + t^p[k] + * where m = p[0] > p[1] > ... > p[k] = 0. + */ +/* r = a mod p */ +int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]); +/* r = (a * b) mod p */ +int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const int p[], BN_CTX *ctx); +/* r = (a * a) mod p */ +int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], + BN_CTX *ctx); +/* r = (1 / b) mod p */ +int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[], + BN_CTX *ctx); +/* r = (a / b) mod p */ +int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const int p[], BN_CTX *ctx); +/* r = (a ^ b) mod p */ +int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + const int p[], BN_CTX *ctx); +/* r = sqrt(a) mod p */ +int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, + const int p[], BN_CTX *ctx); +/* r^2 + r = a mod p */ +int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, + const int p[], BN_CTX *ctx); +int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max); +int BN_GF2m_arr2poly(const int p[], BIGNUM *a); + +# endif + +/* + * faster mod functions for the 'NIST primes' 0 <= a < p^2 + */ +int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); +int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); +int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); +int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); +int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); + +const BIGNUM *BN_get0_nist_prime_192(void); +const BIGNUM *BN_get0_nist_prime_224(void); +const BIGNUM *BN_get0_nist_prime_256(void); +const BIGNUM *BN_get0_nist_prime_384(void); +const BIGNUM *BN_get0_nist_prime_521(void); + +int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a, + const BIGNUM *field, BN_CTX *ctx); + +int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range, + const BIGNUM *priv, const unsigned char *message, + size_t message_len, BN_CTX *ctx); + +/* Primes from RFC 2409 */ +BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn); +BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn); + +/* Primes from RFC 3526 */ +BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn); +BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn); +BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn); +BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn); +BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn); +BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define get_rfc2409_prime_768 BN_get_rfc2409_prime_768 +# define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024 +# define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536 +# define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048 +# define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072 +# define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096 +# define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144 +# define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192 +# endif + +int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/bnerr.h b/src/Mayaqua/win32_inc/openssl/bnerr.h new file mode 100644 index 00000000..9f3c7cfa --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/bnerr.h @@ -0,0 +1,100 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BNERR_H +# define HEADER_BNERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_BN_strings(void); + +/* + * BN function codes. + */ +# define BN_F_BNRAND 127 +# define BN_F_BNRAND_RANGE 138 +# define BN_F_BN_BLINDING_CONVERT_EX 100 +# define BN_F_BN_BLINDING_CREATE_PARAM 128 +# define BN_F_BN_BLINDING_INVERT_EX 101 +# define BN_F_BN_BLINDING_NEW 102 +# define BN_F_BN_BLINDING_UPDATE 103 +# define BN_F_BN_BN2DEC 104 +# define BN_F_BN_BN2HEX 105 +# define BN_F_BN_COMPUTE_WNAF 142 +# define BN_F_BN_CTX_GET 116 +# define BN_F_BN_CTX_NEW 106 +# define BN_F_BN_CTX_START 129 +# define BN_F_BN_DIV 107 +# define BN_F_BN_DIV_RECP 130 +# define BN_F_BN_EXP 123 +# define BN_F_BN_EXPAND_INTERNAL 120 +# define BN_F_BN_GENCB_NEW 143 +# define BN_F_BN_GENERATE_DSA_NONCE 140 +# define BN_F_BN_GENERATE_PRIME_EX 141 +# define BN_F_BN_GF2M_MOD 131 +# define BN_F_BN_GF2M_MOD_EXP 132 +# define BN_F_BN_GF2M_MOD_MUL 133 +# define BN_F_BN_GF2M_MOD_SOLVE_QUAD 134 +# define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 135 +# define BN_F_BN_GF2M_MOD_SQR 136 +# define BN_F_BN_GF2M_MOD_SQRT 137 +# define BN_F_BN_LSHIFT 145 +# define BN_F_BN_MOD_EXP2_MONT 118 +# define BN_F_BN_MOD_EXP_MONT 109 +# define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124 +# define BN_F_BN_MOD_EXP_MONT_WORD 117 +# define BN_F_BN_MOD_EXP_RECP 125 +# define BN_F_BN_MOD_EXP_SIMPLE 126 +# define BN_F_BN_MOD_INVERSE 110 +# define BN_F_BN_MOD_INVERSE_NO_BRANCH 139 +# define BN_F_BN_MOD_LSHIFT_QUICK 119 +# define BN_F_BN_MOD_SQRT 121 +# define BN_F_BN_MONT_CTX_NEW 149 +# define BN_F_BN_MPI2BN 112 +# define BN_F_BN_NEW 113 +# define BN_F_BN_POOL_GET 147 +# define BN_F_BN_RAND 114 +# define BN_F_BN_RAND_RANGE 122 +# define BN_F_BN_RECP_CTX_NEW 150 +# define BN_F_BN_RSHIFT 146 +# define BN_F_BN_SET_WORDS 144 +# define BN_F_BN_STACK_PUSH 148 +# define BN_F_BN_USUB 115 + +/* + * BN reason codes. + */ +# define BN_R_ARG2_LT_ARG3 100 +# define BN_R_BAD_RECIPROCAL 101 +# define BN_R_BIGNUM_TOO_LONG 114 +# define BN_R_BITS_TOO_SMALL 118 +# define BN_R_CALLED_WITH_EVEN_MODULUS 102 +# define BN_R_DIV_BY_ZERO 103 +# define BN_R_ENCODING_ERROR 104 +# define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 +# define BN_R_INPUT_NOT_REDUCED 110 +# define BN_R_INVALID_LENGTH 106 +# define BN_R_INVALID_RANGE 115 +# define BN_R_INVALID_SHIFT 119 +# define BN_R_NOT_A_SQUARE 111 +# define BN_R_NOT_INITIALIZED 107 +# define BN_R_NO_INVERSE 108 +# define BN_R_NO_SOLUTION 116 +# define BN_R_PRIVATE_KEY_TOO_LARGE 117 +# define BN_R_P_IS_NOT_PRIME 112 +# define BN_R_TOO_MANY_ITERATIONS 113 +# define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/buffer.h b/src/Mayaqua/win32_inc/openssl/buffer.h index eab0d1eb..d2765766 100644 --- a/src/Mayaqua/win32_inc/openssl/buffer.h +++ b/src/Mayaqua/win32_inc/openssl/buffer.h @@ -1,125 +1,58 @@ -/* crypto/buffer/buffer.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_BUFFER_H -# define HEADER_BUFFER_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# include - -# if !defined(NO_SYS_TYPES_H) -# include -# endif - -/* Already declared in ossl_typ.h */ -/* typedef struct buf_mem_st BUF_MEM; */ - -struct buf_mem_st { - size_t length; /* current number of bytes */ - char *data; - size_t max; /* size of buffer */ -}; - -BUF_MEM *BUF_MEM_new(void); -void BUF_MEM_free(BUF_MEM *a); -int BUF_MEM_grow(BUF_MEM *str, size_t len); -int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); -size_t BUF_strnlen(const char *str, size_t maxlen); -char *BUF_strdup(const char *str); - -/* - * Like strndup, but in addition, explicitly guarantees to never read past the - * first |siz| bytes of |str|. - */ -char *BUF_strndup(const char *str, size_t siz); - -void *BUF_memdup(const void *data, size_t siz); -void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); - -/* safe string functions */ -size_t BUF_strlcpy(char *dst, const char *src, size_t siz); -size_t BUF_strlcat(char *dst, const char *src, size_t siz); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_BUF_strings(void); - -/* Error codes for the BUF functions. */ - -/* Function codes. */ -# define BUF_F_BUF_MEMDUP 103 -# define BUF_F_BUF_MEM_GROW 100 -# define BUF_F_BUF_MEM_GROW_CLEAN 105 -# define BUF_F_BUF_MEM_NEW 101 -# define BUF_F_BUF_STRDUP 102 -# define BUF_F_BUF_STRNDUP 104 - -/* Reason codes. */ - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BUFFER_H +# define HEADER_BUFFER_H + +# include +# ifndef HEADER_CRYPTO_H +# include +# endif +# include + + +#ifdef __cplusplus +extern "C" { +#endif + +# include +# include + +/* + * These names are outdated as of OpenSSL 1.1; a future release + * will move them to be deprecated. + */ +# define BUF_strdup(s) OPENSSL_strdup(s) +# define BUF_strndup(s, size) OPENSSL_strndup(s, size) +# define BUF_memdup(data, size) OPENSSL_memdup(data, size) +# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) +# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) +# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) + +struct buf_mem_st { + size_t length; /* current number of bytes */ + char *data; + size_t max; /* size of buffer */ + unsigned long flags; +}; + +# define BUF_MEM_FLAG_SECURE 0x01 + +BUF_MEM *BUF_MEM_new(void); +BUF_MEM *BUF_MEM_new_ex(unsigned long flags); +void BUF_MEM_free(BUF_MEM *a); +size_t BUF_MEM_grow(BUF_MEM *str, size_t len); +size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); +void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/buffererr.h b/src/Mayaqua/win32_inc/openssl/buffererr.h new file mode 100644 index 00000000..04f6ff7a --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/buffererr.h @@ -0,0 +1,34 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BUFERR_H +# define HEADER_BUFERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_BUF_strings(void); + +/* + * BUF function codes. + */ +# define BUF_F_BUF_MEM_GROW 100 +# define BUF_F_BUF_MEM_GROW_CLEAN 105 +# define BUF_F_BUF_MEM_NEW 101 + +/* + * BUF reason codes. + */ + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/camellia.h b/src/Mayaqua/win32_inc/openssl/camellia.h index 5feca2e2..151f3c13 100644 --- a/src/Mayaqua/win32_inc/openssl/camellia.h +++ b/src/Mayaqua/win32_inc/openssl/camellia.h @@ -1,132 +1,83 @@ -/* crypto/camellia/camellia.h */ -/* ==================================================================== - * Copyright (c) 2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - */ - -#ifndef HEADER_CAMELLIA_H -# define HEADER_CAMELLIA_H - -# include - -# ifdef OPENSSL_NO_CAMELLIA -# error CAMELLIA is disabled. -# endif - -# include - -# define CAMELLIA_ENCRYPT 1 -# define CAMELLIA_DECRYPT 0 - -/* - * Because array size can't be a const in C, the following two are macros. - * Both sizes are in bytes. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* This should be a hidden type, but EVP requires that the size be known */ - -# define CAMELLIA_BLOCK_SIZE 16 -# define CAMELLIA_TABLE_BYTE_LEN 272 -# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) - -typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match - * with WORD */ - -struct camellia_key_st { - union { - double d; /* ensures 64-bit align */ - KEY_TABLE_TYPE rd_key; - } u; - int grand_rounds; -}; -typedef struct camellia_key_st CAMELLIA_KEY; - -# ifdef OPENSSL_FIPS -int private_Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key); -# endif -int Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key); - -void Camellia_encrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key); -void Camellia_decrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key); - -void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key, const int enc); -void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const CAMELLIA_KEY *key, - unsigned char *ivec, const int enc); -void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const CAMELLIA_KEY *key, - unsigned char *ivec, int *num, const int enc); -void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const CAMELLIA_KEY *key, - unsigned char *ivec, int *num, const int enc); -void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const CAMELLIA_KEY *key, - unsigned char *ivec, int *num, const int enc); -void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const CAMELLIA_KEY *key, - unsigned char *ivec, int *num); -void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const CAMELLIA_KEY *key, - unsigned char ivec[CAMELLIA_BLOCK_SIZE], - unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], - unsigned int *num); - -#ifdef __cplusplus -} -#endif - -#endif /* !HEADER_Camellia_H */ +/* + * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CAMELLIA_H +# define HEADER_CAMELLIA_H + +# include + +# ifndef OPENSSL_NO_CAMELLIA +# include +#ifdef __cplusplus +extern "C" { +#endif + +# define CAMELLIA_ENCRYPT 1 +# define CAMELLIA_DECRYPT 0 + +/* + * Because array size can't be a const in C, the following two are macros. + * Both sizes are in bytes. + */ + +/* This should be a hidden type, but EVP requires that the size be known */ + +# define CAMELLIA_BLOCK_SIZE 16 +# define CAMELLIA_TABLE_BYTE_LEN 272 +# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) + +typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match + * with WORD */ + +struct camellia_key_st { + union { + double d; /* ensures 64-bit align */ + KEY_TABLE_TYPE rd_key; + } u; + int grand_rounds; +}; +typedef struct camellia_key_st CAMELLIA_KEY; + +int Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key); + +void Camellia_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key); +void Camellia_decrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key); + +void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key, const int enc); +void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, const int enc); +void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc); +void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc); +void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num, const int enc); +void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char *ivec, int *num); +void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const CAMELLIA_KEY *key, + unsigned char ivec[CAMELLIA_BLOCK_SIZE], + unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], + unsigned int *num); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/cast.h b/src/Mayaqua/win32_inc/openssl/cast.h index 5cf69469..2cc89ae0 100644 --- a/src/Mayaqua/win32_inc/openssl/cast.h +++ b/src/Mayaqua/win32_inc/openssl/cast.h @@ -1,107 +1,53 @@ -/* crypto/cast/cast.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_CAST_H -# define HEADER_CAST_H - -#ifdef __cplusplus -extern "C" { -#endif - -# include - -# ifdef OPENSSL_NO_CAST -# error CAST is disabled. -# endif - -# define CAST_ENCRYPT 1 -# define CAST_DECRYPT 0 - -# define CAST_LONG unsigned int - -# define CAST_BLOCK 8 -# define CAST_KEY_LENGTH 16 - -typedef struct cast_key_st { - CAST_LONG data[32]; - int short_key; /* Use reduced rounds for short key */ -} CAST_KEY; - -# ifdef OPENSSL_FIPS -void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); -# endif -void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); -void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, - const CAST_KEY *key, int enc); -void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); -void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); -void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, - long length, const CAST_KEY *ks, unsigned char *iv, - int enc); -void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, const CAST_KEY *schedule, - unsigned char *ivec, int *num, int enc); -void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, const CAST_KEY *schedule, - unsigned char *ivec, int *num); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CAST_H +# define HEADER_CAST_H + +# include + +# ifndef OPENSSL_NO_CAST +# ifdef __cplusplus +extern "C" { +# endif + +# define CAST_ENCRYPT 1 +# define CAST_DECRYPT 0 + +# define CAST_LONG unsigned int + +# define CAST_BLOCK 8 +# define CAST_KEY_LENGTH 16 + +typedef struct cast_key_st { + CAST_LONG data[32]; + int short_key; /* Use reduced rounds for short key */ +} CAST_KEY; + +void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); +void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, + const CAST_KEY *key, int enc); +void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); +void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); +void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, + long length, const CAST_KEY *ks, unsigned char *iv, + int enc); +void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, const CAST_KEY *schedule, + unsigned char *ivec, int *num, int enc); +void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, const CAST_KEY *schedule, + unsigned char *ivec, int *num); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/cmac.h b/src/Mayaqua/win32_inc/openssl/cmac.h index f81e9378..3535a9ab 100644 --- a/src/Mayaqua/win32_inc/openssl/cmac.h +++ b/src/Mayaqua/win32_inc/openssl/cmac.h @@ -1,82 +1,41 @@ -/* crypto/cmac/cmac.h */ -/* - * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL - * project. - */ -/* ==================================================================== - * Copyright (c) 2010 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - */ - -#ifndef HEADER_CMAC_H -# define HEADER_CMAC_H - -#ifdef __cplusplus -extern "C" { -#endif - -# include - -/* Opaque */ -typedef struct CMAC_CTX_st CMAC_CTX; - -CMAC_CTX *CMAC_CTX_new(void); -void CMAC_CTX_cleanup(CMAC_CTX *ctx); -void CMAC_CTX_free(CMAC_CTX *ctx); -EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); -int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); - -int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, - const EVP_CIPHER *cipher, ENGINE *impl); -int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); -int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); -int CMAC_resume(CMAC_CTX *ctx); - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CMAC_H +# define HEADER_CMAC_H + +# ifndef OPENSSL_NO_CMAC + +#ifdef __cplusplus +extern "C" { +#endif + +# include + +/* Opaque */ +typedef struct CMAC_CTX_st CMAC_CTX; + +CMAC_CTX *CMAC_CTX_new(void); +void CMAC_CTX_cleanup(CMAC_CTX *ctx); +void CMAC_CTX_free(CMAC_CTX *ctx); +EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); +int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); + +int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, + const EVP_CIPHER *cipher, ENGINE *impl); +int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); +int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); +int CMAC_resume(CMAC_CTX *ctx); + +#ifdef __cplusplus +} +#endif + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/cms.h b/src/Mayaqua/win32_inc/openssl/cms.h index 388c11ff..c7627968 100644 --- a/src/Mayaqua/win32_inc/openssl/cms.h +++ b/src/Mayaqua/win32_inc/openssl/cms.h @@ -1,555 +1,339 @@ -/* crypto/cms/cms.h */ -/* - * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL - * project. - */ -/* ==================================================================== - * Copyright (c) 2008 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - */ - -#ifndef HEADER_CMS_H -# define HEADER_CMS_H - -# include - -# ifdef OPENSSL_NO_CMS -# error CMS is disabled. -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct CMS_ContentInfo_st CMS_ContentInfo; -typedef struct CMS_SignerInfo_st CMS_SignerInfo; -typedef struct CMS_CertificateChoices CMS_CertificateChoices; -typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice; -typedef struct CMS_RecipientInfo_st CMS_RecipientInfo; -typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest; -typedef struct CMS_Receipt_st CMS_Receipt; -typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey; -typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute; - -DECLARE_STACK_OF(CMS_SignerInfo) -DECLARE_STACK_OF(GENERAL_NAMES) -DECLARE_STACK_OF(CMS_RecipientEncryptedKey) -DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) -DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest) -DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo) - -# define CMS_SIGNERINFO_ISSUER_SERIAL 0 -# define CMS_SIGNERINFO_KEYIDENTIFIER 1 - -# define CMS_RECIPINFO_NONE -1 -# define CMS_RECIPINFO_TRANS 0 -# define CMS_RECIPINFO_AGREE 1 -# define CMS_RECIPINFO_KEK 2 -# define CMS_RECIPINFO_PASS 3 -# define CMS_RECIPINFO_OTHER 4 - -/* S/MIME related flags */ - -# define CMS_TEXT 0x1 -# define CMS_NOCERTS 0x2 -# define CMS_NO_CONTENT_VERIFY 0x4 -# define CMS_NO_ATTR_VERIFY 0x8 -# define CMS_NOSIGS \ - (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY) -# define CMS_NOINTERN 0x10 -# define CMS_NO_SIGNER_CERT_VERIFY 0x20 -# define CMS_NOVERIFY 0x20 -# define CMS_DETACHED 0x40 -# define CMS_BINARY 0x80 -# define CMS_NOATTR 0x100 -# define CMS_NOSMIMECAP 0x200 -# define CMS_NOOLDMIMETYPE 0x400 -# define CMS_CRLFEOL 0x800 -# define CMS_STREAM 0x1000 -# define CMS_NOCRL 0x2000 -# define CMS_PARTIAL 0x4000 -# define CMS_REUSE_DIGEST 0x8000 -# define CMS_USE_KEYID 0x10000 -# define CMS_DEBUG_DECRYPT 0x20000 -# define CMS_KEY_PARAM 0x40000 - -const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms); - -BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); -int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); - -ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms); -int CMS_is_detached(CMS_ContentInfo *cms); -int CMS_set_detached(CMS_ContentInfo *cms, int detached); - -# ifdef HEADER_PEM_H -DECLARE_PEM_rw_const(CMS, CMS_ContentInfo) -# endif -int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms); -CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms); -int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); - -BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); -int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags); -int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, - int flags); -CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont); -int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); - -int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, - unsigned int flags); - -CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, - STACK_OF(X509) *certs, BIO *data, - unsigned int flags); - -CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, - X509 *signcert, EVP_PKEY *pkey, - STACK_OF(X509) *certs, unsigned int flags); - -int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags); -CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags); - -int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, - unsigned int flags); -CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, - unsigned int flags); - -int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, - const unsigned char *key, size_t keylen, - BIO *dcont, BIO *out, unsigned int flags); - -CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, - const unsigned char *key, - size_t keylen, unsigned int flags); - -int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, - const unsigned char *key, size_t keylen); - -int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, - X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags); - -int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, - STACK_OF(X509) *certs, - X509_STORE *store, unsigned int flags); - -STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms); - -CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in, - const EVP_CIPHER *cipher, unsigned int flags); - -int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert, - BIO *dcont, BIO *out, unsigned int flags); - -int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert); -int CMS_decrypt_set1_key(CMS_ContentInfo *cms, - unsigned char *key, size_t keylen, - unsigned char *id, size_t idlen); -int CMS_decrypt_set1_password(CMS_ContentInfo *cms, - unsigned char *pass, ossl_ssize_t passlen); - -STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms); -int CMS_RecipientInfo_type(CMS_RecipientInfo *ri); -EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri); -CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher); -CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, - X509 *recip, unsigned int flags); -int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey); -int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert); -int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, - EVP_PKEY **pk, X509 **recip, - X509_ALGOR **palg); -int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, - ASN1_OCTET_STRING **keyid, - X509_NAME **issuer, - ASN1_INTEGER **sno); - -CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, - unsigned char *key, size_t keylen, - unsigned char *id, size_t idlen, - ASN1_GENERALIZEDTIME *date, - ASN1_OBJECT *otherTypeId, - ASN1_TYPE *otherType); - -int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, - X509_ALGOR **palg, - ASN1_OCTET_STRING **pid, - ASN1_GENERALIZEDTIME **pdate, - ASN1_OBJECT **potherid, - ASN1_TYPE **pothertype); - -int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, - unsigned char *key, size_t keylen); - -int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, - const unsigned char *id, size_t idlen); - -int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri, - unsigned char *pass, - ossl_ssize_t passlen); - -CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms, - int iter, int wrap_nid, - int pbe_nid, - unsigned char *pass, - ossl_ssize_t passlen, - const EVP_CIPHER *kekciph); - -int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); -int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); - -int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, - unsigned int flags); -CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags); - -int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid); -const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms); - -CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms); -int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); -int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); -STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); - -CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms); -int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); -int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl); -STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); - -int CMS_SignedData_init(CMS_ContentInfo *cms); -CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, - X509 *signer, EVP_PKEY *pk, const EVP_MD *md, - unsigned int flags); -EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si); -EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si); -STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); - -void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); -int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, - ASN1_OCTET_STRING **keyid, - X509_NAME **issuer, ASN1_INTEGER **sno); -int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert); -int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs, - unsigned int flags); -void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, - X509 **signer, X509_ALGOR **pdig, - X509_ALGOR **psig); -ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si); -int CMS_SignerInfo_sign(CMS_SignerInfo *si); -int CMS_SignerInfo_verify(CMS_SignerInfo *si); -int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain); - -int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs); -int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, - int algnid, int keysize); -int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap); - -int CMS_signed_get_attr_count(const CMS_SignerInfo *si); -int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, - int lastpos); -int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc); -X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc); -int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); -int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, - const ASN1_OBJECT *obj, int type, - const void *bytes, int len); -int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, - int nid, int type, - const void *bytes, int len); -int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, - const char *attrname, int type, - const void *bytes, int len); -void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, - int lastpos, int type); - -int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si); -int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, - int lastpos); -int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc); -X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc); -int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); -int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, - const ASN1_OBJECT *obj, int type, - const void *bytes, int len); -int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, - int nid, int type, - const void *bytes, int len); -int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, - const char *attrname, int type, - const void *bytes, int len); -void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, - int lastpos, int type); - -# ifdef HEADER_X509V3_H - -int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr); -CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen, - int allorfirst, - STACK_OF(GENERAL_NAMES) - *receiptList, STACK_OF(GENERAL_NAMES) - *receiptsTo); -int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr); -void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, - ASN1_STRING **pcid, - int *pallorfirst, - STACK_OF(GENERAL_NAMES) **plist, - STACK_OF(GENERAL_NAMES) **prto); -# endif -int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri, - X509_ALGOR **palg, - ASN1_OCTET_STRING **pukm); -STACK_OF(CMS_RecipientEncryptedKey) -*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri); - -int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, - X509_ALGOR **pubalg, - ASN1_BIT_STRING **pubkey, - ASN1_OCTET_STRING **keyid, - X509_NAME **issuer, - ASN1_INTEGER **sno); - -int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert); - -int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek, - ASN1_OCTET_STRING **keyid, - ASN1_GENERALIZEDTIME **tm, - CMS_OtherKeyAttribute **other, - X509_NAME **issuer, ASN1_INTEGER **sno); -int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek, - X509 *cert); -int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk); -EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri); -int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms, - CMS_RecipientInfo *ri, - CMS_RecipientEncryptedKey *rek); - -int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg, - ASN1_OCTET_STRING *ukm, int keylen); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_CMS_strings(void); - -/* Error codes for the CMS functions. */ - -/* Function codes. */ -# define CMS_F_CHECK_CONTENT 99 -# define CMS_F_CMS_ADD0_CERT 164 -# define CMS_F_CMS_ADD0_RECIPIENT_KEY 100 -# define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 165 -# define CMS_F_CMS_ADD1_RECEIPTREQUEST 158 -# define CMS_F_CMS_ADD1_RECIPIENT_CERT 101 -# define CMS_F_CMS_ADD1_SIGNER 102 -# define CMS_F_CMS_ADD1_SIGNINGTIME 103 -# define CMS_F_CMS_COMPRESS 104 -# define CMS_F_CMS_COMPRESSEDDATA_CREATE 105 -# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106 -# define CMS_F_CMS_COPY_CONTENT 107 -# define CMS_F_CMS_COPY_MESSAGEDIGEST 108 -# define CMS_F_CMS_DATA 109 -# define CMS_F_CMS_DATAFINAL 110 -# define CMS_F_CMS_DATAINIT 111 -# define CMS_F_CMS_DECRYPT 112 -# define CMS_F_CMS_DECRYPT_SET1_KEY 113 -# define CMS_F_CMS_DECRYPT_SET1_PASSWORD 166 -# define CMS_F_CMS_DECRYPT_SET1_PKEY 114 -# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115 -# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116 -# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117 -# define CMS_F_CMS_DIGEST_VERIFY 118 -# define CMS_F_CMS_ENCODE_RECEIPT 161 -# define CMS_F_CMS_ENCRYPT 119 -# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120 -# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121 -# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122 -# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123 -# define CMS_F_CMS_ENVELOPEDDATA_CREATE 124 -# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125 -# define CMS_F_CMS_ENVELOPED_DATA_INIT 126 -# define CMS_F_CMS_ENV_ASN1_CTRL 171 -# define CMS_F_CMS_FINAL 127 -# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128 -# define CMS_F_CMS_GET0_CONTENT 129 -# define CMS_F_CMS_GET0_ECONTENT_TYPE 130 -# define CMS_F_CMS_GET0_ENVELOPED 131 -# define CMS_F_CMS_GET0_REVOCATION_CHOICES 132 -# define CMS_F_CMS_GET0_SIGNED 133 -# define CMS_F_CMS_MSGSIGDIGEST_ADD1 162 -# define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159 -# define CMS_F_CMS_RECEIPT_VERIFY 160 -# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134 -# define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 169 -# define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 178 -# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 175 -# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 173 -# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 172 -# define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 174 -# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135 -# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136 -# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137 -# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138 -# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139 -# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140 -# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141 -# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142 -# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143 -# define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 167 -# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144 -# define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 168 -# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145 -# define CMS_F_CMS_SD_ASN1_CTRL 170 -# define CMS_F_CMS_SET1_IAS 176 -# define CMS_F_CMS_SET1_KEYID 177 -# define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146 -# define CMS_F_CMS_SET_DETACHED 147 -# define CMS_F_CMS_SIGN 148 -# define CMS_F_CMS_SIGNED_DATA_INIT 149 -# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150 -# define CMS_F_CMS_SIGNERINFO_SIGN 151 -# define CMS_F_CMS_SIGNERINFO_VERIFY 152 -# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153 -# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154 -# define CMS_F_CMS_SIGN_RECEIPT 163 -# define CMS_F_CMS_STREAM 155 -# define CMS_F_CMS_UNCOMPRESS 156 -# define CMS_F_CMS_VERIFY 157 - -/* Reason codes. */ -# define CMS_R_ADD_SIGNER_ERROR 99 -# define CMS_R_CERTIFICATE_ALREADY_PRESENT 175 -# define CMS_R_CERTIFICATE_HAS_NO_KEYID 160 -# define CMS_R_CERTIFICATE_VERIFY_ERROR 100 -# define CMS_R_CIPHER_INITIALISATION_ERROR 101 -# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102 -# define CMS_R_CMS_DATAFINAL_ERROR 103 -# define CMS_R_CMS_LIB 104 -# define CMS_R_CONTENTIDENTIFIER_MISMATCH 170 -# define CMS_R_CONTENT_NOT_FOUND 105 -# define CMS_R_CONTENT_TYPE_MISMATCH 171 -# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106 -# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107 -# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108 -# define CMS_R_CONTENT_VERIFY_ERROR 109 -# define CMS_R_CTRL_ERROR 110 -# define CMS_R_CTRL_FAILURE 111 -# define CMS_R_DECRYPT_ERROR 112 -# define CMS_R_DIGEST_ERROR 161 -# define CMS_R_ERROR_GETTING_PUBLIC_KEY 113 -# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114 -# define CMS_R_ERROR_SETTING_KEY 115 -# define CMS_R_ERROR_SETTING_RECIPIENTINFO 116 -# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117 -# define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176 -# define CMS_R_INVALID_KEY_LENGTH 118 -# define CMS_R_MD_BIO_INIT_ERROR 119 -# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120 -# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121 -# define CMS_R_MSGSIGDIGEST_ERROR 172 -# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162 -# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163 -# define CMS_R_NEED_ONE_SIGNER 164 -# define CMS_R_NOT_A_SIGNED_RECEIPT 165 -# define CMS_R_NOT_ENCRYPTED_DATA 122 -# define CMS_R_NOT_KEK 123 -# define CMS_R_NOT_KEY_AGREEMENT 181 -# define CMS_R_NOT_KEY_TRANSPORT 124 -# define CMS_R_NOT_PWRI 177 -# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125 -# define CMS_R_NO_CIPHER 126 -# define CMS_R_NO_CONTENT 127 -# define CMS_R_NO_CONTENT_TYPE 173 -# define CMS_R_NO_DEFAULT_DIGEST 128 -# define CMS_R_NO_DIGEST_SET 129 -# define CMS_R_NO_KEY 130 -# define CMS_R_NO_KEY_OR_CERT 174 -# define CMS_R_NO_MATCHING_DIGEST 131 -# define CMS_R_NO_MATCHING_RECIPIENT 132 -# define CMS_R_NO_MATCHING_SIGNATURE 166 -# define CMS_R_NO_MSGSIGDIGEST 167 -# define CMS_R_NO_PASSWORD 178 -# define CMS_R_NO_PRIVATE_KEY 133 -# define CMS_R_NO_PUBLIC_KEY 134 -# define CMS_R_NO_RECEIPT_REQUEST 168 -# define CMS_R_NO_SIGNERS 135 -# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136 -# define CMS_R_RECEIPT_DECODE_ERROR 169 -# define CMS_R_RECIPIENT_ERROR 137 -# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138 -# define CMS_R_SIGNFINAL_ERROR 139 -# define CMS_R_SMIME_TEXT_ERROR 140 -# define CMS_R_STORE_INIT_ERROR 141 -# define CMS_R_TYPE_NOT_COMPRESSED_DATA 142 -# define CMS_R_TYPE_NOT_DATA 143 -# define CMS_R_TYPE_NOT_DIGESTED_DATA 144 -# define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145 -# define CMS_R_TYPE_NOT_ENVELOPED_DATA 146 -# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147 -# define CMS_R_UNKNOWN_CIPHER 148 -# define CMS_R_UNKNOWN_DIGEST_ALGORIHM 149 -# define CMS_R_UNKNOWN_ID 150 -# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151 -# define CMS_R_UNSUPPORTED_CONTENT_TYPE 152 -# define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153 -# define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179 -# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154 -# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE 155 -# define CMS_R_UNSUPPORTED_TYPE 156 -# define CMS_R_UNWRAP_ERROR 157 -# define CMS_R_UNWRAP_FAILURE 180 -# define CMS_R_VERIFICATION_FAILURE 158 -# define CMS_R_WRAP_ERROR 159 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CMS_H +# define HEADER_CMS_H + +# include + +# ifndef OPENSSL_NO_CMS +# include +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +typedef struct CMS_ContentInfo_st CMS_ContentInfo; +typedef struct CMS_SignerInfo_st CMS_SignerInfo; +typedef struct CMS_CertificateChoices CMS_CertificateChoices; +typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice; +typedef struct CMS_RecipientInfo_st CMS_RecipientInfo; +typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest; +typedef struct CMS_Receipt_st CMS_Receipt; +typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey; +typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute; + +DEFINE_STACK_OF(CMS_SignerInfo) +DEFINE_STACK_OF(CMS_RecipientEncryptedKey) +DEFINE_STACK_OF(CMS_RecipientInfo) +DEFINE_STACK_OF(CMS_RevocationInfoChoice) +DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) +DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest) +DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo) + +# define CMS_SIGNERINFO_ISSUER_SERIAL 0 +# define CMS_SIGNERINFO_KEYIDENTIFIER 1 + +# define CMS_RECIPINFO_NONE -1 +# define CMS_RECIPINFO_TRANS 0 +# define CMS_RECIPINFO_AGREE 1 +# define CMS_RECIPINFO_KEK 2 +# define CMS_RECIPINFO_PASS 3 +# define CMS_RECIPINFO_OTHER 4 + +/* S/MIME related flags */ + +# define CMS_TEXT 0x1 +# define CMS_NOCERTS 0x2 +# define CMS_NO_CONTENT_VERIFY 0x4 +# define CMS_NO_ATTR_VERIFY 0x8 +# define CMS_NOSIGS \ + (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY) +# define CMS_NOINTERN 0x10 +# define CMS_NO_SIGNER_CERT_VERIFY 0x20 +# define CMS_NOVERIFY 0x20 +# define CMS_DETACHED 0x40 +# define CMS_BINARY 0x80 +# define CMS_NOATTR 0x100 +# define CMS_NOSMIMECAP 0x200 +# define CMS_NOOLDMIMETYPE 0x400 +# define CMS_CRLFEOL 0x800 +# define CMS_STREAM 0x1000 +# define CMS_NOCRL 0x2000 +# define CMS_PARTIAL 0x4000 +# define CMS_REUSE_DIGEST 0x8000 +# define CMS_USE_KEYID 0x10000 +# define CMS_DEBUG_DECRYPT 0x20000 +# define CMS_KEY_PARAM 0x40000 +# define CMS_ASCIICRLF 0x80000 + +const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms); + +BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); +int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); + +ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms); +int CMS_is_detached(CMS_ContentInfo *cms); +int CMS_set_detached(CMS_ContentInfo *cms, int detached); + +# ifdef HEADER_PEM_H +DECLARE_PEM_rw_const(CMS, CMS_ContentInfo) +# endif +int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms); +CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms); +int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); + +BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); +int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags); +int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, + int flags); +CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont); +int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); + +int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, + unsigned int flags); + +CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, + STACK_OF(X509) *certs, BIO *data, + unsigned int flags); + +CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, + X509 *signcert, EVP_PKEY *pkey, + STACK_OF(X509) *certs, unsigned int flags); + +int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags); +CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags); + +int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, + unsigned int flags); +CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, + unsigned int flags); + +int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, + const unsigned char *key, size_t keylen, + BIO *dcont, BIO *out, unsigned int flags); + +CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, + const unsigned char *key, + size_t keylen, unsigned int flags); + +int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, + const unsigned char *key, size_t keylen); + +int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, + X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags); + +int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, + STACK_OF(X509) *certs, + X509_STORE *store, unsigned int flags); + +STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms); + +CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in, + const EVP_CIPHER *cipher, unsigned int flags); + +int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert, + BIO *dcont, BIO *out, unsigned int flags); + +int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert); +int CMS_decrypt_set1_key(CMS_ContentInfo *cms, + unsigned char *key, size_t keylen, + const unsigned char *id, size_t idlen); +int CMS_decrypt_set1_password(CMS_ContentInfo *cms, + unsigned char *pass, ossl_ssize_t passlen); + +STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms); +int CMS_RecipientInfo_type(CMS_RecipientInfo *ri); +EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri); +CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher); +CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, + X509 *recip, unsigned int flags); +int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey); +int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert); +int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, + EVP_PKEY **pk, X509 **recip, + X509_ALGOR **palg); +int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, + ASN1_OCTET_STRING **keyid, + X509_NAME **issuer, + ASN1_INTEGER **sno); + +CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, + unsigned char *key, size_t keylen, + unsigned char *id, size_t idlen, + ASN1_GENERALIZEDTIME *date, + ASN1_OBJECT *otherTypeId, + ASN1_TYPE *otherType); + +int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, + X509_ALGOR **palg, + ASN1_OCTET_STRING **pid, + ASN1_GENERALIZEDTIME **pdate, + ASN1_OBJECT **potherid, + ASN1_TYPE **pothertype); + +int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, + unsigned char *key, size_t keylen); + +int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, + const unsigned char *id, size_t idlen); + +int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri, + unsigned char *pass, + ossl_ssize_t passlen); + +CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms, + int iter, int wrap_nid, + int pbe_nid, + unsigned char *pass, + ossl_ssize_t passlen, + const EVP_CIPHER *kekciph); + +int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); +int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); + +int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, + unsigned int flags); +CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags); + +int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid); +const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms); + +CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms); +int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); +int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); +STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); + +CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms); +int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); +int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl); +STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); + +int CMS_SignedData_init(CMS_ContentInfo *cms); +CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, + X509 *signer, EVP_PKEY *pk, const EVP_MD *md, + unsigned int flags); +EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si); +EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si); +STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); + +void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); +int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, + ASN1_OCTET_STRING **keyid, + X509_NAME **issuer, ASN1_INTEGER **sno); +int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert); +int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs, + unsigned int flags); +void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, + X509 **signer, X509_ALGOR **pdig, + X509_ALGOR **psig); +ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si); +int CMS_SignerInfo_sign(CMS_SignerInfo *si); +int CMS_SignerInfo_verify(CMS_SignerInfo *si); +int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain); + +int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs); +int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, + int algnid, int keysize); +int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap); + +int CMS_signed_get_attr_count(const CMS_SignerInfo *si); +int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, + int lastpos); +int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, + int lastpos); +X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc); +X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc); +int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); +int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, + const ASN1_OBJECT *obj, int type, + const void *bytes, int len); +int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, + int nid, int type, + const void *bytes, int len); +int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, + const char *attrname, int type, + const void *bytes, int len); +void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid, + int lastpos, int type); + +int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si); +int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, + int lastpos); +int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, + const ASN1_OBJECT *obj, int lastpos); +X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc); +X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc); +int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); +int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, + const ASN1_OBJECT *obj, int type, + const void *bytes, int len); +int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, + int nid, int type, + const void *bytes, int len); +int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, + const char *attrname, int type, + const void *bytes, int len); +void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, + int lastpos, int type); + +int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr); +CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen, + int allorfirst, + STACK_OF(GENERAL_NAMES) + *receiptList, STACK_OF(GENERAL_NAMES) + *receiptsTo); +int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr); +void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, + ASN1_STRING **pcid, + int *pallorfirst, + STACK_OF(GENERAL_NAMES) **plist, + STACK_OF(GENERAL_NAMES) **prto); +int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri, + X509_ALGOR **palg, + ASN1_OCTET_STRING **pukm); +STACK_OF(CMS_RecipientEncryptedKey) +*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri); + +int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, + X509_ALGOR **pubalg, + ASN1_BIT_STRING **pubkey, + ASN1_OCTET_STRING **keyid, + X509_NAME **issuer, + ASN1_INTEGER **sno); + +int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert); + +int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek, + ASN1_OCTET_STRING **keyid, + ASN1_GENERALIZEDTIME **tm, + CMS_OtherKeyAttribute **other, + X509_NAME **issuer, ASN1_INTEGER **sno); +int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek, + X509 *cert); +int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk); +EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri); +int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms, + CMS_RecipientInfo *ri, + CMS_RecipientEncryptedKey *rek); + +int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg, + ASN1_OCTET_STRING *ukm, int keylen); + +/* Backward compatibility for spelling errors. */ +# define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM +# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \ + CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/cmserr.h b/src/Mayaqua/win32_inc/openssl/cmserr.h new file mode 100644 index 00000000..7dbc13dc --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/cmserr.h @@ -0,0 +1,202 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CMSERR_H +# define HEADER_CMSERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_CMS + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_CMS_strings(void); + +/* + * CMS function codes. + */ +# define CMS_F_CHECK_CONTENT 99 +# define CMS_F_CMS_ADD0_CERT 164 +# define CMS_F_CMS_ADD0_RECIPIENT_KEY 100 +# define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 165 +# define CMS_F_CMS_ADD1_RECEIPTREQUEST 158 +# define CMS_F_CMS_ADD1_RECIPIENT_CERT 101 +# define CMS_F_CMS_ADD1_SIGNER 102 +# define CMS_F_CMS_ADD1_SIGNINGTIME 103 +# define CMS_F_CMS_COMPRESS 104 +# define CMS_F_CMS_COMPRESSEDDATA_CREATE 105 +# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106 +# define CMS_F_CMS_COPY_CONTENT 107 +# define CMS_F_CMS_COPY_MESSAGEDIGEST 108 +# define CMS_F_CMS_DATA 109 +# define CMS_F_CMS_DATAFINAL 110 +# define CMS_F_CMS_DATAINIT 111 +# define CMS_F_CMS_DECRYPT 112 +# define CMS_F_CMS_DECRYPT_SET1_KEY 113 +# define CMS_F_CMS_DECRYPT_SET1_PASSWORD 166 +# define CMS_F_CMS_DECRYPT_SET1_PKEY 114 +# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115 +# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116 +# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117 +# define CMS_F_CMS_DIGEST_VERIFY 118 +# define CMS_F_CMS_ENCODE_RECEIPT 161 +# define CMS_F_CMS_ENCRYPT 119 +# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 179 +# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120 +# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121 +# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122 +# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123 +# define CMS_F_CMS_ENVELOPEDDATA_CREATE 124 +# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125 +# define CMS_F_CMS_ENVELOPED_DATA_INIT 126 +# define CMS_F_CMS_ENV_ASN1_CTRL 171 +# define CMS_F_CMS_FINAL 127 +# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128 +# define CMS_F_CMS_GET0_CONTENT 129 +# define CMS_F_CMS_GET0_ECONTENT_TYPE 130 +# define CMS_F_CMS_GET0_ENVELOPED 131 +# define CMS_F_CMS_GET0_REVOCATION_CHOICES 132 +# define CMS_F_CMS_GET0_SIGNED 133 +# define CMS_F_CMS_MSGSIGDIGEST_ADD1 162 +# define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159 +# define CMS_F_CMS_RECEIPT_VERIFY 160 +# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134 +# define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 169 +# define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 178 +# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 175 +# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 173 +# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 172 +# define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 174 +# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135 +# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136 +# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137 +# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138 +# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139 +# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140 +# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141 +# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142 +# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143 +# define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 167 +# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144 +# define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 168 +# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145 +# define CMS_F_CMS_SD_ASN1_CTRL 170 +# define CMS_F_CMS_SET1_IAS 176 +# define CMS_F_CMS_SET1_KEYID 177 +# define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146 +# define CMS_F_CMS_SET_DETACHED 147 +# define CMS_F_CMS_SIGN 148 +# define CMS_F_CMS_SIGNED_DATA_INIT 149 +# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150 +# define CMS_F_CMS_SIGNERINFO_SIGN 151 +# define CMS_F_CMS_SIGNERINFO_VERIFY 152 +# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153 +# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154 +# define CMS_F_CMS_SIGN_RECEIPT 163 +# define CMS_F_CMS_SI_CHECK_ATTRIBUTES 183 +# define CMS_F_CMS_STREAM 155 +# define CMS_F_CMS_UNCOMPRESS 156 +# define CMS_F_CMS_VERIFY 157 +# define CMS_F_KEK_UNWRAP_KEY 180 + +/* + * CMS reason codes. + */ +# define CMS_R_ADD_SIGNER_ERROR 99 +# define CMS_R_ATTRIBUTE_ERROR 161 +# define CMS_R_CERTIFICATE_ALREADY_PRESENT 175 +# define CMS_R_CERTIFICATE_HAS_NO_KEYID 160 +# define CMS_R_CERTIFICATE_VERIFY_ERROR 100 +# define CMS_R_CIPHER_INITIALISATION_ERROR 101 +# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102 +# define CMS_R_CMS_DATAFINAL_ERROR 103 +# define CMS_R_CMS_LIB 104 +# define CMS_R_CONTENTIDENTIFIER_MISMATCH 170 +# define CMS_R_CONTENT_NOT_FOUND 105 +# define CMS_R_CONTENT_TYPE_MISMATCH 171 +# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106 +# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107 +# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108 +# define CMS_R_CONTENT_VERIFY_ERROR 109 +# define CMS_R_CTRL_ERROR 110 +# define CMS_R_CTRL_FAILURE 111 +# define CMS_R_DECRYPT_ERROR 112 +# define CMS_R_ERROR_GETTING_PUBLIC_KEY 113 +# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114 +# define CMS_R_ERROR_SETTING_KEY 115 +# define CMS_R_ERROR_SETTING_RECIPIENTINFO 116 +# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117 +# define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176 +# define CMS_R_INVALID_KEY_LENGTH 118 +# define CMS_R_MD_BIO_INIT_ERROR 119 +# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120 +# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121 +# define CMS_R_MSGSIGDIGEST_ERROR 172 +# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162 +# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163 +# define CMS_R_NEED_ONE_SIGNER 164 +# define CMS_R_NOT_A_SIGNED_RECEIPT 165 +# define CMS_R_NOT_ENCRYPTED_DATA 122 +# define CMS_R_NOT_KEK 123 +# define CMS_R_NOT_KEY_AGREEMENT 181 +# define CMS_R_NOT_KEY_TRANSPORT 124 +# define CMS_R_NOT_PWRI 177 +# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125 +# define CMS_R_NO_CIPHER 126 +# define CMS_R_NO_CONTENT 127 +# define CMS_R_NO_CONTENT_TYPE 173 +# define CMS_R_NO_DEFAULT_DIGEST 128 +# define CMS_R_NO_DIGEST_SET 129 +# define CMS_R_NO_KEY 130 +# define CMS_R_NO_KEY_OR_CERT 174 +# define CMS_R_NO_MATCHING_DIGEST 131 +# define CMS_R_NO_MATCHING_RECIPIENT 132 +# define CMS_R_NO_MATCHING_SIGNATURE 166 +# define CMS_R_NO_MSGSIGDIGEST 167 +# define CMS_R_NO_PASSWORD 178 +# define CMS_R_NO_PRIVATE_KEY 133 +# define CMS_R_NO_PUBLIC_KEY 134 +# define CMS_R_NO_RECEIPT_REQUEST 168 +# define CMS_R_NO_SIGNERS 135 +# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136 +# define CMS_R_RECEIPT_DECODE_ERROR 169 +# define CMS_R_RECIPIENT_ERROR 137 +# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138 +# define CMS_R_SIGNFINAL_ERROR 139 +# define CMS_R_SMIME_TEXT_ERROR 140 +# define CMS_R_STORE_INIT_ERROR 141 +# define CMS_R_TYPE_NOT_COMPRESSED_DATA 142 +# define CMS_R_TYPE_NOT_DATA 143 +# define CMS_R_TYPE_NOT_DIGESTED_DATA 144 +# define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145 +# define CMS_R_TYPE_NOT_ENVELOPED_DATA 146 +# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147 +# define CMS_R_UNKNOWN_CIPHER 148 +# define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149 +# define CMS_R_UNKNOWN_ID 150 +# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151 +# define CMS_R_UNSUPPORTED_CONTENT_TYPE 152 +# define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153 +# define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179 +# define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155 +# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154 +# define CMS_R_UNSUPPORTED_TYPE 156 +# define CMS_R_UNWRAP_ERROR 157 +# define CMS_R_UNWRAP_FAILURE 180 +# define CMS_R_VERIFICATION_FAILURE 158 +# define CMS_R_WRAP_ERROR 159 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/comp.h b/src/Mayaqua/win32_inc/openssl/comp.h index e9ba2a0c..d814d3cf 100644 --- a/src/Mayaqua/win32_inc/openssl/comp.h +++ b/src/Mayaqua/win32_inc/openssl/comp.h @@ -1,83 +1,53 @@ - -#ifndef HEADER_COMP_H -# define HEADER_COMP_H - -# include - -# ifdef OPENSSL_NO_COMP -# error COMP is disabled. -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct comp_ctx_st COMP_CTX; - -struct comp_method_st { - int type; /* NID for compression library */ - const char *name; /* A text string to identify the library */ - int (*init) (COMP_CTX *ctx); - void (*finish) (COMP_CTX *ctx); - int (*compress) (COMP_CTX *ctx, - unsigned char *out, unsigned int olen, - unsigned char *in, unsigned int ilen); - int (*expand) (COMP_CTX *ctx, - unsigned char *out, unsigned int olen, - unsigned char *in, unsigned int ilen); - /* - * The following two do NOTHING, but are kept for backward compatibility - */ - long (*ctrl) (void); - long (*callback_ctrl) (void); -}; - -struct comp_ctx_st { - COMP_METHOD *meth; - unsigned long compress_in; - unsigned long compress_out; - unsigned long expand_in; - unsigned long expand_out; - CRYPTO_EX_DATA ex_data; -}; - -COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); -void COMP_CTX_free(COMP_CTX *ctx); -int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, - unsigned char *in, int ilen); -int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, - unsigned char *in, int ilen); -COMP_METHOD *COMP_rle(void); -COMP_METHOD *COMP_zlib(void); -void COMP_zlib_cleanup(void); - -# ifdef HEADER_BIO_H -# ifdef ZLIB -BIO_METHOD *BIO_f_zlib(void); -# endif -# endif - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_COMP_strings(void); - -/* Error codes for the COMP functions. */ - -/* Function codes. */ -# define COMP_F_BIO_ZLIB_FLUSH 99 -# define COMP_F_BIO_ZLIB_NEW 100 -# define COMP_F_BIO_ZLIB_READ 101 -# define COMP_F_BIO_ZLIB_WRITE 102 - -/* Reason codes. */ -# define COMP_R_ZLIB_DEFLATE_ERROR 99 -# define COMP_R_ZLIB_INFLATE_ERROR 100 -# define COMP_R_ZLIB_NOT_SUPPORTED 101 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_COMP_H +# define HEADER_COMP_H + +# include + +# ifndef OPENSSL_NO_COMP +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + + + +COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); +const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); +int COMP_CTX_get_type(const COMP_CTX* comp); +int COMP_get_type(const COMP_METHOD *meth); +const char *COMP_get_name(const COMP_METHOD *meth); +void COMP_CTX_free(COMP_CTX *ctx); + +int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, + unsigned char *in, int ilen); +int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, + unsigned char *in, int ilen); + +COMP_METHOD *COMP_zlib(void); + +#if OPENSSL_API_COMPAT < 0x10100000L +#define COMP_zlib_cleanup() while(0) continue +#endif + +# ifdef HEADER_BIO_H +# ifdef ZLIB +const BIO_METHOD *BIO_f_zlib(void); +# endif +# endif + + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/comperr.h b/src/Mayaqua/win32_inc/openssl/comperr.h new file mode 100644 index 00000000..90231e9a --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/comperr.h @@ -0,0 +1,44 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_COMPERR_H +# define HEADER_COMPERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_COMP + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_COMP_strings(void); + +/* + * COMP function codes. + */ +# define COMP_F_BIO_ZLIB_FLUSH 99 +# define COMP_F_BIO_ZLIB_NEW 100 +# define COMP_F_BIO_ZLIB_READ 101 +# define COMP_F_BIO_ZLIB_WRITE 102 +# define COMP_F_COMP_CTX_NEW 103 + +/* + * COMP reason codes. + */ +# define COMP_R_ZLIB_DEFLATE_ERROR 99 +# define COMP_R_ZLIB_INFLATE_ERROR 100 +# define COMP_R_ZLIB_NOT_SUPPORTED 101 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/conf.h b/src/Mayaqua/win32_inc/openssl/conf.h index d4c7d36e..7336cd2f 100644 --- a/src/Mayaqua/win32_inc/openssl/conf.h +++ b/src/Mayaqua/win32_inc/openssl/conf.h @@ -1,267 +1,168 @@ -/* crypto/conf/conf.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_CONF_H -# define HEADER_CONF_H - -# include -# include -# include -# include -# include - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - char *section; - char *name; - char *value; -} CONF_VALUE; - -DECLARE_STACK_OF(CONF_VALUE) -DECLARE_LHASH_OF(CONF_VALUE); - -struct conf_st; -struct conf_method_st; -typedef struct conf_method_st CONF_METHOD; - -struct conf_method_st { - const char *name; - CONF *(*create) (CONF_METHOD *meth); - int (*init) (CONF *conf); - int (*destroy) (CONF *conf); - int (*destroy_data) (CONF *conf); - int (*load_bio) (CONF *conf, BIO *bp, long *eline); - int (*dump) (const CONF *conf, BIO *bp); - int (*is_number) (const CONF *conf, char c); - int (*to_int) (const CONF *conf, char c); - int (*load) (CONF *conf, const char *name, long *eline); -}; - -/* Module definitions */ - -typedef struct conf_imodule_st CONF_IMODULE; -typedef struct conf_module_st CONF_MODULE; - -DECLARE_STACK_OF(CONF_MODULE) -DECLARE_STACK_OF(CONF_IMODULE) - -/* DSO module function typedefs */ -typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf); -typedef void conf_finish_func (CONF_IMODULE *md); - -# define CONF_MFLAGS_IGNORE_ERRORS 0x1 -# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2 -# define CONF_MFLAGS_SILENT 0x4 -# define CONF_MFLAGS_NO_DSO 0x8 -# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 -# define CONF_MFLAGS_DEFAULT_SECTION 0x20 - -int CONF_set_default_method(CONF_METHOD *meth); -void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash); -LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, - long *eline); -# ifndef OPENSSL_NO_FP_API -LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, - long *eline); -# endif -LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, - long *eline); -STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf, - const char *section); -char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, - const char *name); -long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, - const char *name); -void CONF_free(LHASH_OF(CONF_VALUE) *conf); -int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out); -int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out); - -void OPENSSL_config(const char *config_name); -void OPENSSL_no_config(void); - -/* - * New conf code. The semantics are different from the functions above. If - * that wasn't the case, the above functions would have been replaced - */ - -struct conf_st { - CONF_METHOD *meth; - void *meth_data; - LHASH_OF(CONF_VALUE) *data; -}; - -CONF *NCONF_new(CONF_METHOD *meth); -CONF_METHOD *NCONF_default(void); -CONF_METHOD *NCONF_WIN32(void); -# if 0 /* Just to give you an idea of what I have in - * mind */ -CONF_METHOD *NCONF_XML(void); -# endif -void NCONF_free(CONF *conf); -void NCONF_free_data(CONF *conf); - -int NCONF_load(CONF *conf, const char *file, long *eline); -# ifndef OPENSSL_NO_FP_API -int NCONF_load_fp(CONF *conf, FILE *fp, long *eline); -# endif -int NCONF_load_bio(CONF *conf, BIO *bp, long *eline); -STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, - const char *section); -char *NCONF_get_string(const CONF *conf, const char *group, const char *name); -int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, - long *result); -int NCONF_dump_fp(const CONF *conf, FILE *out); -int NCONF_dump_bio(const CONF *conf, BIO *out); - -# if 0 /* The following function has no error - * checking, and should therefore be avoided */ -long NCONF_get_number(CONF *conf, char *group, char *name); -# else -# define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) -# endif - -/* Module functions */ - -int CONF_modules_load(const CONF *cnf, const char *appname, - unsigned long flags); -int CONF_modules_load_file(const char *filename, const char *appname, - unsigned long flags); -void CONF_modules_unload(int all); -void CONF_modules_finish(void); -void CONF_modules_free(void); -int CONF_module_add(const char *name, conf_init_func *ifunc, - conf_finish_func *ffunc); - -const char *CONF_imodule_get_name(const CONF_IMODULE *md); -const char *CONF_imodule_get_value(const CONF_IMODULE *md); -void *CONF_imodule_get_usr_data(const CONF_IMODULE *md); -void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data); -CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md); -unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md); -void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags); -void *CONF_module_get_usr_data(CONF_MODULE *pmod); -void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data); - -char *CONF_get1_default_config_file(void); - -int CONF_parse_list(const char *list, int sep, int nospc, - int (*list_cb) (const char *elem, int len, void *usr), - void *arg); - -void OPENSSL_load_builtin_modules(void); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_CONF_strings(void); - -/* Error codes for the CONF functions. */ - -/* Function codes. */ -# define CONF_F_CONF_DUMP_FP 104 -# define CONF_F_CONF_LOAD 100 -# define CONF_F_CONF_LOAD_BIO 102 -# define CONF_F_CONF_LOAD_FP 103 -# define CONF_F_CONF_MODULES_LOAD 116 -# define CONF_F_CONF_PARSE_LIST 119 -# define CONF_F_DEF_LOAD 120 -# define CONF_F_DEF_LOAD_BIO 121 -# define CONF_F_MODULE_INIT 115 -# define CONF_F_MODULE_LOAD_DSO 117 -# define CONF_F_MODULE_RUN 118 -# define CONF_F_NCONF_DUMP_BIO 105 -# define CONF_F_NCONF_DUMP_FP 106 -# define CONF_F_NCONF_GET_NUMBER 107 -# define CONF_F_NCONF_GET_NUMBER_E 112 -# define CONF_F_NCONF_GET_SECTION 108 -# define CONF_F_NCONF_GET_STRING 109 -# define CONF_F_NCONF_LOAD 113 -# define CONF_F_NCONF_LOAD_BIO 110 -# define CONF_F_NCONF_LOAD_FP 114 -# define CONF_F_NCONF_NEW 111 -# define CONF_F_STR_COPY 101 - -/* Reason codes. */ -# define CONF_R_ERROR_LOADING_DSO 110 -# define CONF_R_LIST_CANNOT_BE_NULL 115 -# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 -# define CONF_R_MISSING_EQUAL_SIGN 101 -# define CONF_R_MISSING_FINISH_FUNCTION 111 -# define CONF_R_MISSING_INIT_FUNCTION 112 -# define CONF_R_MODULE_INITIALIZATION_ERROR 109 -# define CONF_R_NO_CLOSE_BRACE 102 -# define CONF_R_NO_CONF 105 -# define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 -# define CONF_R_NO_SECTION 107 -# define CONF_R_NO_SUCH_FILE 114 -# define CONF_R_NO_VALUE 108 -# define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 -# define CONF_R_UNKNOWN_MODULE_NAME 113 -# define CONF_R_VARIABLE_HAS_NO_VALUE 104 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CONF_H +# define HEADER_CONF_H + +# include +# include +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + char *section; + char *name; + char *value; +} CONF_VALUE; + +DEFINE_STACK_OF(CONF_VALUE) +DEFINE_LHASH_OF(CONF_VALUE); + +struct conf_st; +struct conf_method_st; +typedef struct conf_method_st CONF_METHOD; + +struct conf_method_st { + const char *name; + CONF *(*create) (CONF_METHOD *meth); + int (*init) (CONF *conf); + int (*destroy) (CONF *conf); + int (*destroy_data) (CONF *conf); + int (*load_bio) (CONF *conf, BIO *bp, long *eline); + int (*dump) (const CONF *conf, BIO *bp); + int (*is_number) (const CONF *conf, char c); + int (*to_int) (const CONF *conf, char c); + int (*load) (CONF *conf, const char *name, long *eline); +}; + +/* Module definitions */ + +typedef struct conf_imodule_st CONF_IMODULE; +typedef struct conf_module_st CONF_MODULE; + +DEFINE_STACK_OF(CONF_MODULE) +DEFINE_STACK_OF(CONF_IMODULE) + +/* DSO module function typedefs */ +typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf); +typedef void conf_finish_func (CONF_IMODULE *md); + +# define CONF_MFLAGS_IGNORE_ERRORS 0x1 +# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2 +# define CONF_MFLAGS_SILENT 0x4 +# define CONF_MFLAGS_NO_DSO 0x8 +# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 +# define CONF_MFLAGS_DEFAULT_SECTION 0x20 + +int CONF_set_default_method(CONF_METHOD *meth); +void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash); +LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, + long *eline); +# ifndef OPENSSL_NO_STDIO +LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, + long *eline); +# endif +LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, + long *eline); +STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf, + const char *section); +char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, + const char *name); +long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, + const char *name); +void CONF_free(LHASH_OF(CONF_VALUE) *conf); +#ifndef OPENSSL_NO_STDIO +int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out); +#endif +int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out); + +DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name)) + +#if OPENSSL_API_COMPAT < 0x10100000L +# define OPENSSL_no_config() \ + OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL) +#endif + +/* + * New conf code. The semantics are different from the functions above. If + * that wasn't the case, the above functions would have been replaced + */ + +struct conf_st { + CONF_METHOD *meth; + void *meth_data; + LHASH_OF(CONF_VALUE) *data; +}; + +CONF *NCONF_new(CONF_METHOD *meth); +CONF_METHOD *NCONF_default(void); +CONF_METHOD *NCONF_WIN32(void); +void NCONF_free(CONF *conf); +void NCONF_free_data(CONF *conf); + +int NCONF_load(CONF *conf, const char *file, long *eline); +# ifndef OPENSSL_NO_STDIO +int NCONF_load_fp(CONF *conf, FILE *fp, long *eline); +# endif +int NCONF_load_bio(CONF *conf, BIO *bp, long *eline); +STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, + const char *section); +char *NCONF_get_string(const CONF *conf, const char *group, const char *name); +int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, + long *result); +#ifndef OPENSSL_NO_STDIO +int NCONF_dump_fp(const CONF *conf, FILE *out); +#endif +int NCONF_dump_bio(const CONF *conf, BIO *out); + +#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) + +/* Module functions */ + +int CONF_modules_load(const CONF *cnf, const char *appname, + unsigned long flags); +int CONF_modules_load_file(const char *filename, const char *appname, + unsigned long flags); +void CONF_modules_unload(int all); +void CONF_modules_finish(void); +#if OPENSSL_API_COMPAT < 0x10100000L +# define CONF_modules_free() while(0) continue +#endif +int CONF_module_add(const char *name, conf_init_func *ifunc, + conf_finish_func *ffunc); + +const char *CONF_imodule_get_name(const CONF_IMODULE *md); +const char *CONF_imodule_get_value(const CONF_IMODULE *md); +void *CONF_imodule_get_usr_data(const CONF_IMODULE *md); +void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data); +CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md); +unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md); +void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags); +void *CONF_module_get_usr_data(CONF_MODULE *pmod); +void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data); + +char *CONF_get1_default_config_file(void); + +int CONF_parse_list(const char *list, int sep, int nospc, + int (*list_cb) (const char *elem, int len, void *usr), + void *arg); + +void OPENSSL_load_builtin_modules(void); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/conf_api.h b/src/Mayaqua/win32_inc/openssl/conf_api.h index 637c1d86..a0275ad7 100644 --- a/src/Mayaqua/win32_inc/openssl/conf_api.h +++ b/src/Mayaqua/win32_inc/openssl/conf_api.h @@ -1,89 +1,40 @@ -/* conf_api.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_CONF_API_H -# define HEADER_CONF_API_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Up until OpenSSL 0.9.5a, this was new_section */ -CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); -/* Up until OpenSSL 0.9.5a, this was get_section */ -CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); -/* Up until OpenSSL 0.9.5a, this was CONF_get_section */ -STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, - const char *section); - -int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); -char *_CONF_get_string(const CONF *conf, const char *section, - const char *name); -long _CONF_get_number(const CONF *conf, const char *section, - const char *name); - -int _CONF_new_data(CONF *conf); -void _CONF_free_data(CONF *conf); - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CONF_API_H +# define HEADER_CONF_API_H + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Up until OpenSSL 0.9.5a, this was new_section */ +CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); +/* Up until OpenSSL 0.9.5a, this was get_section */ +CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); +/* Up until OpenSSL 0.9.5a, this was CONF_get_section */ +STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, + const char *section); + +int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); +char *_CONF_get_string(const CONF *conf, const char *section, + const char *name); +long _CONF_get_number(const CONF *conf, const char *section, + const char *name); + +int _CONF_new_data(CONF *conf); +void _CONF_free_data(CONF *conf); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/conferr.h b/src/Mayaqua/win32_inc/openssl/conferr.h new file mode 100644 index 00000000..32b92291 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/conferr.h @@ -0,0 +1,76 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CONFERR_H +# define HEADER_CONFERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_CONF_strings(void); + +/* + * CONF function codes. + */ +# define CONF_F_CONF_DUMP_FP 104 +# define CONF_F_CONF_LOAD 100 +# define CONF_F_CONF_LOAD_FP 103 +# define CONF_F_CONF_PARSE_LIST 119 +# define CONF_F_DEF_LOAD 120 +# define CONF_F_DEF_LOAD_BIO 121 +# define CONF_F_GET_NEXT_FILE 107 +# define CONF_F_MODULE_ADD 122 +# define CONF_F_MODULE_INIT 115 +# define CONF_F_MODULE_LOAD_DSO 117 +# define CONF_F_MODULE_RUN 118 +# define CONF_F_NCONF_DUMP_BIO 105 +# define CONF_F_NCONF_DUMP_FP 106 +# define CONF_F_NCONF_GET_NUMBER_E 112 +# define CONF_F_NCONF_GET_SECTION 108 +# define CONF_F_NCONF_GET_STRING 109 +# define CONF_F_NCONF_LOAD 113 +# define CONF_F_NCONF_LOAD_BIO 110 +# define CONF_F_NCONF_LOAD_FP 114 +# define CONF_F_NCONF_NEW 111 +# define CONF_F_PROCESS_INCLUDE 116 +# define CONF_F_SSL_MODULE_INIT 123 +# define CONF_F_STR_COPY 101 + +/* + * CONF reason codes. + */ +# define CONF_R_ERROR_LOADING_DSO 110 +# define CONF_R_LIST_CANNOT_BE_NULL 115 +# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 +# define CONF_R_MISSING_EQUAL_SIGN 101 +# define CONF_R_MISSING_INIT_FUNCTION 112 +# define CONF_R_MODULE_INITIALIZATION_ERROR 109 +# define CONF_R_NO_CLOSE_BRACE 102 +# define CONF_R_NO_CONF 105 +# define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 +# define CONF_R_NO_SECTION 107 +# define CONF_R_NO_SUCH_FILE 114 +# define CONF_R_NO_VALUE 108 +# define CONF_R_NUMBER_TOO_LARGE 121 +# define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111 +# define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 +# define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 +# define CONF_R_SSL_SECTION_EMPTY 119 +# define CONF_R_SSL_SECTION_NOT_FOUND 120 +# define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 +# define CONF_R_UNKNOWN_MODULE_NAME 113 +# define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116 +# define CONF_R_VARIABLE_HAS_NO_VALUE 104 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/crypto.h b/src/Mayaqua/win32_inc/openssl/crypto.h index ba645141..7d0b5262 100644 --- a/src/Mayaqua/win32_inc/openssl/crypto.h +++ b/src/Mayaqua/win32_inc/openssl/crypto.h @@ -1,661 +1,445 @@ -/* crypto/crypto.h */ -/* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECDH support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_CRYPTO_H -# define HEADER_CRYPTO_H - -# include - -# include - -# ifndef OPENSSL_NO_FP_API -# include -# endif - -# include -# include -# include -# include - -# ifdef CHARSET_EBCDIC -# include -# endif - -/* - * Resolve problems on some operating systems with symbol names that clash - * one way or another - */ -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Backward compatibility to SSLeay */ -/* - * This is more to be used to check the correct DLL is being used in the MS - * world. - */ -# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER -# define SSLEAY_VERSION 0 -/* #define SSLEAY_OPTIONS 1 no longer supported */ -# define SSLEAY_CFLAGS 2 -# define SSLEAY_BUILT_ON 3 -# define SSLEAY_PLATFORM 4 -# define SSLEAY_DIR 5 - -/* Already declared in ossl_typ.h */ -# if 0 -typedef struct crypto_ex_data_st CRYPTO_EX_DATA; -/* Called when a new object is created */ -typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -/* Called when an object is free()ed */ -typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -/* Called when we need to dup an object */ -typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, - void *from_d, int idx, long argl, void *argp); -# endif - -/* A generic structure to pass assorted data in a expandable way */ -typedef struct openssl_item_st { - int code; - void *value; /* Not used for flag attributes */ - size_t value_size; /* Max size of value for output, length for - * input */ - size_t *value_length; /* Returned length of value for output */ -} OPENSSL_ITEM; - -/* - * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock - * names in cryptlib.c - */ - -# define CRYPTO_LOCK_ERR 1 -# define CRYPTO_LOCK_EX_DATA 2 -# define CRYPTO_LOCK_X509 3 -# define CRYPTO_LOCK_X509_INFO 4 -# define CRYPTO_LOCK_X509_PKEY 5 -# define CRYPTO_LOCK_X509_CRL 6 -# define CRYPTO_LOCK_X509_REQ 7 -# define CRYPTO_LOCK_DSA 8 -# define CRYPTO_LOCK_RSA 9 -# define CRYPTO_LOCK_EVP_PKEY 10 -# define CRYPTO_LOCK_X509_STORE 11 -# define CRYPTO_LOCK_SSL_CTX 12 -# define CRYPTO_LOCK_SSL_CERT 13 -# define CRYPTO_LOCK_SSL_SESSION 14 -# define CRYPTO_LOCK_SSL_SESS_CERT 15 -# define CRYPTO_LOCK_SSL 16 -# define CRYPTO_LOCK_SSL_METHOD 17 -# define CRYPTO_LOCK_RAND 18 -# define CRYPTO_LOCK_RAND2 19 -# define CRYPTO_LOCK_MALLOC 20 -# define CRYPTO_LOCK_BIO 21 -# define CRYPTO_LOCK_GETHOSTBYNAME 22 -# define CRYPTO_LOCK_GETSERVBYNAME 23 -# define CRYPTO_LOCK_READDIR 24 -# define CRYPTO_LOCK_RSA_BLINDING 25 -# define CRYPTO_LOCK_DH 26 -# define CRYPTO_LOCK_MALLOC2 27 -# define CRYPTO_LOCK_DSO 28 -# define CRYPTO_LOCK_DYNLOCK 29 -# define CRYPTO_LOCK_ENGINE 30 -# define CRYPTO_LOCK_UI 31 -# define CRYPTO_LOCK_ECDSA 32 -# define CRYPTO_LOCK_EC 33 -# define CRYPTO_LOCK_ECDH 34 -# define CRYPTO_LOCK_BN 35 -# define CRYPTO_LOCK_EC_PRE_COMP 36 -# define CRYPTO_LOCK_STORE 37 -# define CRYPTO_LOCK_COMP 38 -# define CRYPTO_LOCK_FIPS 39 -# define CRYPTO_LOCK_FIPS2 40 -# define CRYPTO_NUM_LOCKS 41 - -# define CRYPTO_LOCK 1 -# define CRYPTO_UNLOCK 2 -# define CRYPTO_READ 4 -# define CRYPTO_WRITE 8 - -# ifndef OPENSSL_NO_LOCKING -# ifndef CRYPTO_w_lock -# define CRYPTO_w_lock(type) \ - CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) -# define CRYPTO_w_unlock(type) \ - CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) -# define CRYPTO_r_lock(type) \ - CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__) -# define CRYPTO_r_unlock(type) \ - CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__) -# define CRYPTO_add(addr,amount,type) \ - CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__) -# endif -# else -# define CRYPTO_w_lock(a) -# define CRYPTO_w_unlock(a) -# define CRYPTO_r_lock(a) -# define CRYPTO_r_unlock(a) -# define CRYPTO_add(a,b,c) ((*(a))+=(b)) -# endif - -/* - * Some applications as well as some parts of OpenSSL need to allocate and - * deallocate locks in a dynamic fashion. The following typedef makes this - * possible in a type-safe manner. - */ -/* struct CRYPTO_dynlock_value has to be defined by the application. */ -typedef struct { - int references; - struct CRYPTO_dynlock_value *data; -} CRYPTO_dynlock; - -/* - * The following can be used to detect memory leaks in the SSLeay library. It - * used, it turns on malloc checking - */ - -# define CRYPTO_MEM_CHECK_OFF 0x0/* an enume */ -# define CRYPTO_MEM_CHECK_ON 0x1/* a bit */ -# define CRYPTO_MEM_CHECK_ENABLE 0x2/* a bit */ -# define CRYPTO_MEM_CHECK_DISABLE 0x3/* an enume */ - -/* - * The following are bit values to turn on or off options connected to the - * malloc checking functionality - */ - -/* Adds time to the memory checking information */ -# define V_CRYPTO_MDEBUG_TIME 0x1/* a bit */ -/* Adds thread number to the memory checking information */ -# define V_CRYPTO_MDEBUG_THREAD 0x2/* a bit */ - -# define V_CRYPTO_MDEBUG_ALL (V_CRYPTO_MDEBUG_TIME | V_CRYPTO_MDEBUG_THREAD) - -/* predec of the BIO type */ -typedef struct bio_st BIO_dummy; - -struct crypto_ex_data_st { - STACK_OF(void) *sk; - /* gcc is screwing up this data structure :-( */ - int dummy; -}; -DECLARE_STACK_OF(void) - -/* - * This stuff is basically class callback functions The current classes are - * SSL_CTX, SSL, SSL_SESSION, and a few more - */ - -typedef struct crypto_ex_data_func_st { - long argl; /* Arbitary long */ - void *argp; /* Arbitary void * */ - CRYPTO_EX_new *new_func; - CRYPTO_EX_free *free_func; - CRYPTO_EX_dup *dup_func; -} CRYPTO_EX_DATA_FUNCS; - -DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) - -/* - * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA - * entry. - */ - -# define CRYPTO_EX_INDEX_BIO 0 -# define CRYPTO_EX_INDEX_SSL 1 -# define CRYPTO_EX_INDEX_SSL_CTX 2 -# define CRYPTO_EX_INDEX_SSL_SESSION 3 -# define CRYPTO_EX_INDEX_X509_STORE 4 -# define CRYPTO_EX_INDEX_X509_STORE_CTX 5 -# define CRYPTO_EX_INDEX_RSA 6 -# define CRYPTO_EX_INDEX_DSA 7 -# define CRYPTO_EX_INDEX_DH 8 -# define CRYPTO_EX_INDEX_ENGINE 9 -# define CRYPTO_EX_INDEX_X509 10 -# define CRYPTO_EX_INDEX_UI 11 -# define CRYPTO_EX_INDEX_ECDSA 12 -# define CRYPTO_EX_INDEX_ECDH 13 -# define CRYPTO_EX_INDEX_COMP 14 -# define CRYPTO_EX_INDEX_STORE 15 - -/* - * Dynamically assigned indexes start from this value (don't use directly, - * use via CRYPTO_ex_data_new_class). - */ -# define CRYPTO_EX_INDEX_USER 100 - -/* - * This is the default callbacks, but we can have others as well: this is - * needed in Win32 where the application malloc and the library malloc may - * not be the same. - */ -# define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\ - malloc, realloc, free) - -# if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD -# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */ -# define CRYPTO_MDEBUG -# endif -# endif - -/* - * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG - * is defined) - */ -# define CRYPTO_malloc_debug_init() do {\ - CRYPTO_set_mem_debug_functions(\ - CRYPTO_dbg_malloc,\ - CRYPTO_dbg_realloc,\ - CRYPTO_dbg_free,\ - CRYPTO_dbg_set_options,\ - CRYPTO_dbg_get_options);\ - } while(0) - -int CRYPTO_mem_ctrl(int mode); -int CRYPTO_is_mem_check_on(void); - -/* for applications */ -# define MemCheck_start() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) -# define MemCheck_stop() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF) - -/* for library-internal use */ -# define MemCheck_on() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE) -# define MemCheck_off() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE) -# define is_MemCheck_on() CRYPTO_is_mem_check_on() - -# define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) -# define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__) -# define OPENSSL_realloc(addr,num) \ - CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) -# define OPENSSL_realloc_clean(addr,old_num,num) \ - CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__) -# define OPENSSL_remalloc(addr,num) \ - CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__) -# define OPENSSL_freeFunc CRYPTO_free -# define OPENSSL_free(addr) CRYPTO_free(addr) - -# define OPENSSL_malloc_locked(num) \ - CRYPTO_malloc_locked((int)num,__FILE__,__LINE__) -# define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr) - -const char *SSLeay_version(int type); -unsigned long SSLeay(void); - -int OPENSSL_issetugid(void); - -/* An opaque type representing an implementation of "ex_data" support */ -typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL; -/* Return an opaque pointer to the current "ex_data" implementation */ -const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void); -/* Sets the "ex_data" implementation to be used (if it's not too late) */ -int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i); -/* Get a new "ex_data" class, and return the corresponding "class_index" */ -int CRYPTO_ex_data_new_class(void); -/* Within a given class, get/register a new index */ -int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, - CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); -/* - * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a - * given class (invokes whatever per-class callbacks are applicable) - */ -int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); -int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to, - CRYPTO_EX_DATA *from); -void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); -/* - * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular - * index (relative to the class type involved) - */ -int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val); -void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx); -/* - * This function cleans up all "ex_data" state. It mustn't be called under - * potential race-conditions. - */ -void CRYPTO_cleanup_all_ex_data(void); - -int CRYPTO_get_new_lockid(char *name); - -int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */ -void CRYPTO_lock(int mode, int type, const char *file, int line); -void CRYPTO_set_locking_callback(void (*func) (int mode, int type, - const char *file, int line)); -void (*CRYPTO_get_locking_callback(void)) (int mode, int type, - const char *file, int line); -void CRYPTO_set_add_lock_callback(int (*func) - (int *num, int mount, int type, - const char *file, int line)); -int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type, - const char *file, int line); - -/* Don't use this structure directly. */ -typedef struct crypto_threadid_st { - void *ptr; - unsigned long val; -} CRYPTO_THREADID; -/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */ -void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val); -void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr); -int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *)); -void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *); -void CRYPTO_THREADID_current(CRYPTO_THREADID *id); -int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b); -void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src); -unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id); -# ifndef OPENSSL_NO_DEPRECATED -void CRYPTO_set_id_callback(unsigned long (*func) (void)); -unsigned long (*CRYPTO_get_id_callback(void)) (void); -unsigned long CRYPTO_thread_id(void); -# endif - -const char *CRYPTO_get_lock_name(int type); -int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file, - int line); - -int CRYPTO_get_new_dynlockid(void); -void CRYPTO_destroy_dynlockid(int i); -struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i); -void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value - *(*dyn_create_function) (const char - *file, - int line)); -void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function) - (int mode, - struct CRYPTO_dynlock_value *l, - const char *file, int line)); -void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function) - (struct CRYPTO_dynlock_value *l, - const char *file, int line)); -struct CRYPTO_dynlock_value -*(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line); -void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode, - struct CRYPTO_dynlock_value - *l, const char *file, - int line); -void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value - *l, const char *file, - int line); - -/* - * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call - * the latter last if you need different functions - */ -int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t), - void (*f) (void *)); -int CRYPTO_set_locked_mem_functions(void *(*m) (size_t), - void (*free_func) (void *)); -int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int), - void *(*r) (void *, size_t, const char *, - int), void (*f) (void *)); -int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int), - void (*free_func) (void *)); -int CRYPTO_set_mem_debug_functions(void (*m) - (void *, int, const char *, int, int), - void (*r) (void *, void *, int, - const char *, int, int), - void (*f) (void *, int), void (*so) (long), - long (*go) (void)); -void CRYPTO_get_mem_functions(void *(**m) (size_t), - void *(**r) (void *, size_t), - void (**f) (void *)); -void CRYPTO_get_locked_mem_functions(void *(**m) (size_t), - void (**f) (void *)); -void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int), - void *(**r) (void *, size_t, const char *, - int), void (**f) (void *)); -void CRYPTO_get_locked_mem_ex_functions(void - *(**m) (size_t, const char *, int), - void (**f) (void *)); -void CRYPTO_get_mem_debug_functions(void (**m) - (void *, int, const char *, int, int), - void (**r) (void *, void *, int, - const char *, int, int), - void (**f) (void *, int), - void (**so) (long), long (**go) (void)); - -void *CRYPTO_malloc_locked(int num, const char *file, int line); -void CRYPTO_free_locked(void *ptr); -void *CRYPTO_malloc(int num, const char *file, int line); -char *CRYPTO_strdup(const char *str, const char *file, int line); -void CRYPTO_free(void *ptr); -void *CRYPTO_realloc(void *addr, int num, const char *file, int line); -void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file, - int line); -void *CRYPTO_remalloc(void *addr, int num, const char *file, int line); - -void OPENSSL_cleanse(void *ptr, size_t len); - -void CRYPTO_set_mem_debug_options(long bits); -long CRYPTO_get_mem_debug_options(void); - -# define CRYPTO_push_info(info) \ - CRYPTO_push_info_(info, __FILE__, __LINE__); -int CRYPTO_push_info_(const char *info, const char *file, int line); -int CRYPTO_pop_info(void); -int CRYPTO_remove_all_info(void); - -/* - * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro; - * used as default in CRYPTO_MDEBUG compilations): - */ -/*- - * The last argument has the following significance: - * - * 0: called before the actual memory allocation has taken place - * 1: called after the actual memory allocation has taken place - */ -void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, - int before_p); -void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file, - int line, int before_p); -void CRYPTO_dbg_free(void *addr, int before_p); -/*- - * Tell the debugging code about options. By default, the following values - * apply: - * - * 0: Clear all options. - * V_CRYPTO_MDEBUG_TIME (1): Set the "Show Time" option. - * V_CRYPTO_MDEBUG_THREAD (2): Set the "Show Thread Number" option. - * V_CRYPTO_MDEBUG_ALL (3): 1 + 2 - */ -void CRYPTO_dbg_set_options(long bits); -long CRYPTO_dbg_get_options(void); - -# ifndef OPENSSL_NO_FP_API -void CRYPTO_mem_leaks_fp(FILE *); -# endif -void CRYPTO_mem_leaks(struct bio_st *bio); -/* unsigned long order, char *file, int line, int num_bytes, char *addr */ -typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int, - void *); -void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); - -/* die if we have to */ -void OpenSSLDie(const char *file, int line, const char *assertion); -# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1)) - -unsigned long *OPENSSL_ia32cap_loc(void); -# define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc())) -int OPENSSL_isservice(void); - -int FIPS_mode(void); -int FIPS_mode_set(int r); - -void OPENSSL_init(void); - -# define fips_md_init(alg) fips_md_init_ctx(alg, alg) - -# ifdef OPENSSL_FIPS -# define fips_md_init_ctx(alg, cx) \ - int alg##_Init(cx##_CTX *c) \ - { \ - if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \ - "Low level API call to digest " #alg " forbidden in FIPS mode!"); \ - return private_##alg##_Init(c); \ - } \ - int private_##alg##_Init(cx##_CTX *c) - -# define fips_cipher_abort(alg) \ - if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \ - "Low level API call to cipher " #alg " forbidden in FIPS mode!") - -# else -# define fips_md_init_ctx(alg, cx) \ - int alg##_Init(cx##_CTX *c) -# define fips_cipher_abort(alg) while(0) -# endif - -/* - * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. - * It takes an amount of time dependent on |len|, but independent of the - * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements - * into a defined order as the return value when a != b is undefined, other - * than to be non-zero. - */ -int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_CRYPTO_strings(void); - -/* Error codes for the CRYPTO functions. */ - -/* Function codes. */ -# define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 -# define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID 103 -# define CRYPTO_F_CRYPTO_GET_NEW_LOCKID 101 -# define CRYPTO_F_CRYPTO_SET_EX_DATA 102 -# define CRYPTO_F_DEF_ADD_INDEX 104 -# define CRYPTO_F_DEF_GET_CLASS 105 -# define CRYPTO_F_FIPS_MODE_SET 109 -# define CRYPTO_F_INT_DUP_EX_DATA 106 -# define CRYPTO_F_INT_FREE_EX_DATA 107 -# define CRYPTO_F_INT_NEW_EX_DATA 108 - -/* Reason codes. */ -# define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 -# define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CRYPTO_H +# define HEADER_CRYPTO_H + +# include +# include + +# include + +# ifndef OPENSSL_NO_STDIO +# include +# endif + +# include +# include +# include +# include +# include + +# ifdef CHARSET_EBCDIC +# include +# endif + +/* + * Resolve problems on some operating systems with symbol names that clash + * one way or another + */ +# include + +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif + +#ifdef __cplusplus +extern "C" { +#endif + +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSLeay OpenSSL_version_num +# define SSLeay_version OpenSSL_version +# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER +# define SSLEAY_VERSION OPENSSL_VERSION +# define SSLEAY_CFLAGS OPENSSL_CFLAGS +# define SSLEAY_BUILT_ON OPENSSL_BUILT_ON +# define SSLEAY_PLATFORM OPENSSL_PLATFORM +# define SSLEAY_DIR OPENSSL_DIR + +/* + * Old type for allocating dynamic locks. No longer used. Use the new thread + * API instead. + */ +typedef struct { + int dummy; +} CRYPTO_dynlock; + +# endif /* OPENSSL_API_COMPAT */ + +typedef void CRYPTO_RWLOCK; + +CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void); +int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock); +int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock); +int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock); +void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock); + +int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock); + +/* + * The following can be used to detect memory leaks in the library. If + * used, it turns on malloc checking + */ +# define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */ +# define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */ +# define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */ +# define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */ + +struct crypto_ex_data_st { + STACK_OF(void) *sk; +}; +DEFINE_STACK_OF(void) + +/* + * Per class, we have a STACK of function pointers. + */ +# define CRYPTO_EX_INDEX_SSL 0 +# define CRYPTO_EX_INDEX_SSL_CTX 1 +# define CRYPTO_EX_INDEX_SSL_SESSION 2 +# define CRYPTO_EX_INDEX_X509 3 +# define CRYPTO_EX_INDEX_X509_STORE 4 +# define CRYPTO_EX_INDEX_X509_STORE_CTX 5 +# define CRYPTO_EX_INDEX_DH 6 +# define CRYPTO_EX_INDEX_DSA 7 +# define CRYPTO_EX_INDEX_EC_KEY 8 +# define CRYPTO_EX_INDEX_RSA 9 +# define CRYPTO_EX_INDEX_ENGINE 10 +# define CRYPTO_EX_INDEX_UI 11 +# define CRYPTO_EX_INDEX_BIO 12 +# define CRYPTO_EX_INDEX_APP 13 +# define CRYPTO_EX_INDEX_UI_METHOD 14 +# define CRYPTO_EX_INDEX_DRBG 15 +# define CRYPTO_EX_INDEX__COUNT 16 + +/* No longer needed, so this is a no-op */ +#define OPENSSL_malloc_init() while(0) continue + +int CRYPTO_mem_ctrl(int mode); + +# define OPENSSL_malloc(num) \ + CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_zalloc(num) \ + CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_realloc(addr, num) \ + CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_clear_realloc(addr, old_num, num) \ + CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_clear_free(addr, num) \ + CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_free(addr) \ + CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_memdup(str, s) \ + CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_strdup(str) \ + CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_strndup(str, n) \ + CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_secure_malloc(num) \ + CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_secure_zalloc(num) \ + CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_secure_free(addr) \ + CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_secure_clear_free(addr, num) \ + CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_secure_actual_size(ptr) \ + CRYPTO_secure_actual_size(ptr) + +size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz); +size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz); +size_t OPENSSL_strnlen(const char *str, size_t maxlen); +char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len); +unsigned char *OPENSSL_hexstr2buf(const char *str, long *len); +int OPENSSL_hexchar2int(unsigned char c); + +# define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type)) + +unsigned long OpenSSL_version_num(void); +const char *OpenSSL_version(int type); +# define OPENSSL_VERSION 0 +# define OPENSSL_CFLAGS 1 +# define OPENSSL_BUILT_ON 2 +# define OPENSSL_PLATFORM 3 +# define OPENSSL_DIR 4 +# define OPENSSL_ENGINES_DIR 5 + +int OPENSSL_issetugid(void); + +typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad, + int idx, long argl, void *argp); +typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad, + int idx, long argl, void *argp); +typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, + void *from_d, int idx, long argl, void *argp); +__owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, + CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, + CRYPTO_EX_free *free_func); +/* No longer use an index. */ +int CRYPTO_free_ex_index(int class_index, int idx); + +/* + * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a + * given class (invokes whatever per-class callbacks are applicable) + */ +int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); +int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to, + const CRYPTO_EX_DATA *from); + +void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); + +/* + * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular + * index (relative to the class type involved) + */ +int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val); +void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx); + +# if OPENSSL_API_COMPAT < 0x10100000L +/* + * This function cleans up all "ex_data" state. It mustn't be called under + * potential race-conditions. + */ +# define CRYPTO_cleanup_all_ex_data() while(0) continue + +/* + * The old locking functions have been removed completely without compatibility + * macros. This is because the old functions either could not properly report + * errors, or the returned error values were not clearly documented. + * Replacing the locking functions with no-ops would cause race condition + * issues in the affected applications. It is far better for them to fail at + * compile time. + * On the other hand, the locking callbacks are no longer used. Consequently, + * the callback management functions can be safely replaced with no-op macros. + */ +# define CRYPTO_num_locks() (1) +# define CRYPTO_set_locking_callback(func) +# define CRYPTO_get_locking_callback() (NULL) +# define CRYPTO_set_add_lock_callback(func) +# define CRYPTO_get_add_lock_callback() (NULL) + +/* + * These defines where used in combination with the old locking callbacks, + * they are not called anymore, but old code that's not called might still + * use them. + */ +# define CRYPTO_LOCK 1 +# define CRYPTO_UNLOCK 2 +# define CRYPTO_READ 4 +# define CRYPTO_WRITE 8 + +/* This structure is no longer used */ +typedef struct crypto_threadid_st { + int dummy; +} CRYPTO_THREADID; +/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */ +# define CRYPTO_THREADID_set_numeric(id, val) +# define CRYPTO_THREADID_set_pointer(id, ptr) +# define CRYPTO_THREADID_set_callback(threadid_func) (0) +# define CRYPTO_THREADID_get_callback() (NULL) +# define CRYPTO_THREADID_current(id) +# define CRYPTO_THREADID_cmp(a, b) (-1) +# define CRYPTO_THREADID_cpy(dest, src) +# define CRYPTO_THREADID_hash(id) (0UL) + +# if OPENSSL_API_COMPAT < 0x10000000L +# define CRYPTO_set_id_callback(func) +# define CRYPTO_get_id_callback() (NULL) +# define CRYPTO_thread_id() (0UL) +# endif /* OPENSSL_API_COMPAT < 0x10000000L */ + +# define CRYPTO_set_dynlock_create_callback(dyn_create_function) +# define CRYPTO_set_dynlock_lock_callback(dyn_lock_function) +# define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function) +# define CRYPTO_get_dynlock_create_callback() (NULL) +# define CRYPTO_get_dynlock_lock_callback() (NULL) +# define CRYPTO_get_dynlock_destroy_callback() (NULL) +# endif /* OPENSSL_API_COMPAT < 0x10100000L */ + +int CRYPTO_set_mem_functions( + void *(*m) (size_t, const char *, int), + void *(*r) (void *, size_t, const char *, int), + void (*f) (void *, const char *, int)); +int CRYPTO_set_mem_debug(int flag); +void CRYPTO_get_mem_functions( + void *(**m) (size_t, const char *, int), + void *(**r) (void *, size_t, const char *, int), + void (**f) (void *, const char *, int)); + +void *CRYPTO_malloc(size_t num, const char *file, int line); +void *CRYPTO_zalloc(size_t num, const char *file, int line); +void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line); +char *CRYPTO_strdup(const char *str, const char *file, int line); +char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line); +void CRYPTO_free(void *ptr, const char *file, int line); +void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line); +void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line); +void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num, + const char *file, int line); + +int CRYPTO_secure_malloc_init(size_t sz, int minsize); +int CRYPTO_secure_malloc_done(void); +void *CRYPTO_secure_malloc(size_t num, const char *file, int line); +void *CRYPTO_secure_zalloc(size_t num, const char *file, int line); +void CRYPTO_secure_free(void *ptr, const char *file, int line); +void CRYPTO_secure_clear_free(void *ptr, size_t num, + const char *file, int line); +int CRYPTO_secure_allocated(const void *ptr); +int CRYPTO_secure_malloc_initialized(void); +size_t CRYPTO_secure_actual_size(void *ptr); +size_t CRYPTO_secure_used(void); + +void OPENSSL_cleanse(void *ptr, size_t len); + +# ifndef OPENSSL_NO_CRYPTO_MDEBUG +# define OPENSSL_mem_debug_push(info) \ + CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE) +# define OPENSSL_mem_debug_pop() \ + CRYPTO_mem_debug_pop() +int CRYPTO_mem_debug_push(const char *info, const char *file, int line); +int CRYPTO_mem_debug_pop(void); +void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount); + +/*- + * Debugging functions (enabled by CRYPTO_set_mem_debug(1)) + * The flag argument has the following significance: + * 0: called before the actual memory allocation has taken place + * 1: called after the actual memory allocation has taken place + */ +void CRYPTO_mem_debug_malloc(void *addr, size_t num, int flag, + const char *file, int line); +void CRYPTO_mem_debug_realloc(void *addr1, void *addr2, size_t num, int flag, + const char *file, int line); +void CRYPTO_mem_debug_free(void *addr, int flag, + const char *file, int line); + +int CRYPTO_mem_leaks_cb(int (*cb) (const char *str, size_t len, void *u), + void *u); +# ifndef OPENSSL_NO_STDIO +int CRYPTO_mem_leaks_fp(FILE *); +# endif +int CRYPTO_mem_leaks(BIO *bio); +# endif + +/* die if we have to */ +ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line); +# if OPENSSL_API_COMPAT < 0x10100000L +# define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l)) +# endif +# define OPENSSL_assert(e) \ + (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1)) + +int OPENSSL_isservice(void); + +int FIPS_mode(void); +int FIPS_mode_set(int r); + +void OPENSSL_init(void); +# ifdef OPENSSL_SYS_UNIX +void OPENSSL_fork_prepare(void); +void OPENSSL_fork_parent(void); +void OPENSSL_fork_child(void); +# endif + +struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result); +int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec); +int OPENSSL_gmtime_diff(int *pday, int *psec, + const struct tm *from, const struct tm *to); + +/* + * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. + * It takes an amount of time dependent on |len|, but independent of the + * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements + * into a defined order as the return value when a != b is undefined, other + * than to be non-zero. + */ +int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len); + +/* Standard initialisation options */ +# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L +# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L +# define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L +# define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L +# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L +# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L +# define OPENSSL_INIT_LOAD_CONFIG 0x00000040L +# define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L +# define OPENSSL_INIT_ASYNC 0x00000100L +# define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L +# define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L +# define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L +# define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L +# define OPENSSL_INIT_ENGINE_CAPI 0x00002000L +# define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L +# define OPENSSL_INIT_ENGINE_AFALG 0x00008000L +/* OPENSSL_INIT_ZLIB 0x00010000L */ +# define OPENSSL_INIT_ATFORK 0x00020000L +/* OPENSSL_INIT_BASE_ONLY 0x00040000L */ +# define OPENSSL_INIT_NO_ATEXIT 0x00080000L +/* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */ +/* Max OPENSSL_INIT flag value is 0x80000000 */ + +/* openssl and dasync not counted as builtin */ +# define OPENSSL_INIT_ENGINE_ALL_BUILTIN \ + (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \ + | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \ + OPENSSL_INIT_ENGINE_PADLOCK) + + +/* Library initialisation functions */ +void OPENSSL_cleanup(void); +int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); +int OPENSSL_atexit(void (*handler)(void)); +void OPENSSL_thread_stop(void); + +/* Low-level control of initialization */ +OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void); +# ifndef OPENSSL_NO_STDIO +int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings, + const char *config_filename); +void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings, + unsigned long flags); +int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings, + const char *config_appname); +# endif +void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings); + +# if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) +# if defined(_WIN32) +# if defined(BASETYPES) || defined(_WINDEF_H) +/* application has to include in order to use this */ +typedef DWORD CRYPTO_THREAD_LOCAL; +typedef DWORD CRYPTO_THREAD_ID; + +typedef LONG CRYPTO_ONCE; +# define CRYPTO_ONCE_STATIC_INIT 0 +# endif +# else +# include +typedef pthread_once_t CRYPTO_ONCE; +typedef pthread_key_t CRYPTO_THREAD_LOCAL; +typedef pthread_t CRYPTO_THREAD_ID; + +# define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT +# endif +# endif + +# if !defined(CRYPTO_ONCE_STATIC_INIT) +typedef unsigned int CRYPTO_ONCE; +typedef unsigned int CRYPTO_THREAD_LOCAL; +typedef unsigned int CRYPTO_THREAD_ID; +# define CRYPTO_ONCE_STATIC_INIT 0 +# endif + +int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void)); + +int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *)); +void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key); +int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val); +int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key); + +CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void); +int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/cryptoerr.h b/src/Mayaqua/win32_inc/openssl/cryptoerr.h new file mode 100644 index 00000000..3db5a4ee --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/cryptoerr.h @@ -0,0 +1,57 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CRYPTOERR_H +# define HEADER_CRYPTOERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_CRYPTO_strings(void); + +/* + * CRYPTO function codes. + */ +# define CRYPTO_F_CMAC_CTX_NEW 120 +# define CRYPTO_F_CRYPTO_DUP_EX_DATA 110 +# define CRYPTO_F_CRYPTO_FREE_EX_DATA 111 +# define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 +# define CRYPTO_F_CRYPTO_MEMDUP 115 +# define CRYPTO_F_CRYPTO_NEW_EX_DATA 112 +# define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 121 +# define CRYPTO_F_CRYPTO_OCB128_INIT 122 +# define CRYPTO_F_CRYPTO_SET_EX_DATA 102 +# define CRYPTO_F_FIPS_MODE_SET 109 +# define CRYPTO_F_GET_AND_LOCK 113 +# define CRYPTO_F_OPENSSL_ATEXIT 114 +# define CRYPTO_F_OPENSSL_BUF2HEXSTR 117 +# define CRYPTO_F_OPENSSL_FOPEN 119 +# define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 +# define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 +# define CRYPTO_F_OPENSSL_LH_NEW 126 +# define CRYPTO_F_OPENSSL_SK_DEEP_COPY 127 +# define CRYPTO_F_OPENSSL_SK_DUP 128 +# define CRYPTO_F_PKEY_HMAC_INIT 123 +# define CRYPTO_F_PKEY_POLY1305_INIT 124 +# define CRYPTO_F_PKEY_SIPHASH_INIT 125 +# define CRYPTO_F_SK_RESERVE 129 + +/* + * CRYPTO reason codes. + */ +# define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 +# define CRYPTO_R_ILLEGAL_HEX_DIGIT 102 +# define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ct.h b/src/Mayaqua/win32_inc/openssl/ct.h new file mode 100644 index 00000000..d4262fa0 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/ct.h @@ -0,0 +1,476 @@ +/* + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CT_H +# define HEADER_CT_H + +# include + +# ifndef OPENSSL_NO_CT +# include +# include +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + + +/* Minimum RSA key size, from RFC6962 */ +# define SCT_MIN_RSA_BITS 2048 + +/* All hashes are SHA256 in v1 of Certificate Transparency */ +# define CT_V1_HASHLEN SHA256_DIGEST_LENGTH + +typedef enum { + CT_LOG_ENTRY_TYPE_NOT_SET = -1, + CT_LOG_ENTRY_TYPE_X509 = 0, + CT_LOG_ENTRY_TYPE_PRECERT = 1 +} ct_log_entry_type_t; + +typedef enum { + SCT_VERSION_NOT_SET = -1, + SCT_VERSION_V1 = 0 +} sct_version_t; + +typedef enum { + SCT_SOURCE_UNKNOWN, + SCT_SOURCE_TLS_EXTENSION, + SCT_SOURCE_X509V3_EXTENSION, + SCT_SOURCE_OCSP_STAPLED_RESPONSE +} sct_source_t; + +typedef enum { + SCT_VALIDATION_STATUS_NOT_SET, + SCT_VALIDATION_STATUS_UNKNOWN_LOG, + SCT_VALIDATION_STATUS_VALID, + SCT_VALIDATION_STATUS_INVALID, + SCT_VALIDATION_STATUS_UNVERIFIED, + SCT_VALIDATION_STATUS_UNKNOWN_VERSION +} sct_validation_status_t; + +DEFINE_STACK_OF(SCT) +DEFINE_STACK_OF(CTLOG) + +/****************************************** + * CT policy evaluation context functions * + ******************************************/ + +/* + * Creates a new, empty policy evaluation context. + * The caller is responsible for calling CT_POLICY_EVAL_CTX_free when finished + * with the CT_POLICY_EVAL_CTX. + */ +CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void); + +/* Deletes a policy evaluation context and anything it owns. */ +void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx); + +/* Gets the peer certificate that the SCTs are for */ +X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx); + +/* + * Sets the certificate associated with the received SCTs. + * Increments the reference count of cert. + * Returns 1 on success, 0 otherwise. + */ +int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert); + +/* Gets the issuer of the aforementioned certificate */ +X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx); + +/* + * Sets the issuer of the certificate associated with the received SCTs. + * Increments the reference count of issuer. + * Returns 1 on success, 0 otherwise. + */ +int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer); + +/* Gets the CT logs that are trusted sources of SCTs */ +const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx); + +/* Sets the log store that is in use. It must outlive the CT_POLICY_EVAL_CTX. */ +void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx, + CTLOG_STORE *log_store); + +/* + * Gets the time, in milliseconds since the Unix epoch, that will be used as the + * current time when checking whether an SCT was issued in the future. + * Such SCTs will fail validation, as required by RFC6962. + */ +uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx); + +/* + * Sets the time to evaluate SCTs against, in milliseconds since the Unix epoch. + * If an SCT's timestamp is after this time, it will be interpreted as having + * been issued in the future. RFC6962 states that "TLS clients MUST reject SCTs + * whose timestamp is in the future", so an SCT will not validate in this case. + */ +void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms); + +/***************** + * SCT functions * + *****************/ + +/* + * Creates a new, blank SCT. + * The caller is responsible for calling SCT_free when finished with the SCT. + */ +SCT *SCT_new(void); + +/* + * Creates a new SCT from some base64-encoded strings. + * The caller is responsible for calling SCT_free when finished with the SCT. + */ +SCT *SCT_new_from_base64(unsigned char version, + const char *logid_base64, + ct_log_entry_type_t entry_type, + uint64_t timestamp, + const char *extensions_base64, + const char *signature_base64); + +/* + * Frees the SCT and the underlying data structures. + */ +void SCT_free(SCT *sct); + +/* + * Free a stack of SCTs, and the underlying SCTs themselves. + * Intended to be compatible with X509V3_EXT_FREE. + */ +void SCT_LIST_free(STACK_OF(SCT) *a); + +/* + * Returns the version of the SCT. + */ +sct_version_t SCT_get_version(const SCT *sct); + +/* + * Set the version of an SCT. + * Returns 1 on success, 0 if the version is unrecognized. + */ +__owur int SCT_set_version(SCT *sct, sct_version_t version); + +/* + * Returns the log entry type of the SCT. + */ +ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct); + +/* + * Set the log entry type of an SCT. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type); + +/* + * Gets the ID of the log that an SCT came from. + * Ownership of the log ID remains with the SCT. + * Returns the length of the log ID. + */ +size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id); + +/* + * Set the log ID of an SCT to point directly to the *log_id specified. + * The SCT takes ownership of the specified pointer. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len); + +/* + * Set the log ID of an SCT. + * This makes a copy of the log_id. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set1_log_id(SCT *sct, const unsigned char *log_id, + size_t log_id_len); + +/* + * Returns the timestamp for the SCT (epoch time in milliseconds). + */ +uint64_t SCT_get_timestamp(const SCT *sct); + +/* + * Set the timestamp of an SCT (epoch time in milliseconds). + */ +void SCT_set_timestamp(SCT *sct, uint64_t timestamp); + +/* + * Return the NID for the signature used by the SCT. + * For CT v1, this will be either NID_sha256WithRSAEncryption or + * NID_ecdsa_with_SHA256 (or NID_undef if incorrect/unset). + */ +int SCT_get_signature_nid(const SCT *sct); + +/* + * Set the signature type of an SCT + * For CT v1, this should be either NID_sha256WithRSAEncryption or + * NID_ecdsa_with_SHA256. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set_signature_nid(SCT *sct, int nid); + +/* + * Set *ext to point to the extension data for the SCT. ext must not be NULL. + * The SCT retains ownership of this pointer. + * Returns length of the data pointed to. + */ +size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext); + +/* + * Set the extensions of an SCT to point directly to the *ext specified. + * The SCT takes ownership of the specified pointer. + */ +void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len); + +/* + * Set the extensions of an SCT. + * This takes a copy of the ext. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set1_extensions(SCT *sct, const unsigned char *ext, + size_t ext_len); + +/* + * Set *sig to point to the signature for the SCT. sig must not be NULL. + * The SCT retains ownership of this pointer. + * Returns length of the data pointed to. + */ +size_t SCT_get0_signature(const SCT *sct, unsigned char **sig); + +/* + * Set the signature of an SCT to point directly to the *sig specified. + * The SCT takes ownership of the specified pointer. + */ +void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len); + +/* + * Set the signature of an SCT to be a copy of the *sig specified. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set1_signature(SCT *sct, const unsigned char *sig, + size_t sig_len); + +/* + * The origin of this SCT, e.g. TLS extension, OCSP response, etc. + */ +sct_source_t SCT_get_source(const SCT *sct); + +/* + * Set the origin of this SCT, e.g. TLS extension, OCSP response, etc. + * Returns 1 on success, 0 otherwise. + */ +__owur int SCT_set_source(SCT *sct, sct_source_t source); + +/* + * Returns a text string describing the validation status of |sct|. + */ +const char *SCT_validation_status_string(const SCT *sct); + +/* + * Pretty-prints an |sct| to |out|. + * It will be indented by the number of spaces specified by |indent|. + * If |logs| is not NULL, it will be used to lookup the CT log that the SCT came + * from, so that the log name can be printed. + */ +void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs); + +/* + * Pretty-prints an |sct_list| to |out|. + * It will be indented by the number of spaces specified by |indent|. + * SCTs will be delimited by |separator|. + * If |logs| is not NULL, it will be used to lookup the CT log that each SCT + * came from, so that the log names can be printed. + */ +void SCT_LIST_print(const STACK_OF(SCT) *sct_list, BIO *out, int indent, + const char *separator, const CTLOG_STORE *logs); + +/* + * Gets the last result of validating this SCT. + * If it has not been validated yet, returns SCT_VALIDATION_STATUS_NOT_SET. + */ +sct_validation_status_t SCT_get_validation_status(const SCT *sct); + +/* + * Validates the given SCT with the provided context. + * Sets the "validation_status" field of the SCT. + * Returns 1 if the SCT is valid and the signature verifies. + * Returns 0 if the SCT is invalid or could not be verified. + * Returns -1 if an error occurs. + */ +__owur int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx); + +/* + * Validates the given list of SCTs with the provided context. + * Sets the "validation_status" field of each SCT. + * Returns 1 if there are no invalid SCTs and all signatures verify. + * Returns 0 if at least one SCT is invalid or could not be verified. + * Returns a negative integer if an error occurs. + */ +__owur int SCT_LIST_validate(const STACK_OF(SCT) *scts, + CT_POLICY_EVAL_CTX *ctx); + + +/********************************* + * SCT parsing and serialisation * + *********************************/ + +/* + * Serialize (to TLS format) a stack of SCTs and return the length. + * "a" must not be NULL. + * If "pp" is NULL, just return the length of what would have been serialized. + * If "pp" is not NULL and "*pp" is null, function will allocate a new pointer + * for data that caller is responsible for freeing (only if function returns + * successfully). + * If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring + * that "*pp" is large enough to accept all of the serialized data. + * Returns < 0 on error, >= 0 indicating bytes written (or would have been) + * on success. + */ +__owur int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp); + +/* + * Convert TLS format SCT list to a stack of SCTs. + * If "a" or "*a" is NULL, a new stack will be created that the caller is + * responsible for freeing (by calling SCT_LIST_free). + * "**pp" and "*pp" must not be NULL. + * Upon success, "*pp" will point to after the last bytes read, and a stack + * will be returned. + * Upon failure, a NULL pointer will be returned, and the position of "*pp" is + * not defined. + */ +STACK_OF(SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp, + size_t len); + +/* + * Serialize (to DER format) a stack of SCTs and return the length. + * "a" must not be NULL. + * If "pp" is NULL, just returns the length of what would have been serialized. + * If "pp" is not NULL and "*pp" is null, function will allocate a new pointer + * for data that caller is responsible for freeing (only if function returns + * successfully). + * If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring + * that "*pp" is large enough to accept all of the serialized data. + * Returns < 0 on error, >= 0 indicating bytes written (or would have been) + * on success. + */ +__owur int i2d_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp); + +/* + * Parses an SCT list in DER format and returns it. + * If "a" or "*a" is NULL, a new stack will be created that the caller is + * responsible for freeing (by calling SCT_LIST_free). + * "**pp" and "*pp" must not be NULL. + * Upon success, "*pp" will point to after the last bytes read, and a stack + * will be returned. + * Upon failure, a NULL pointer will be returned, and the position of "*pp" is + * not defined. + */ +STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp, + long len); + +/* + * Serialize (to TLS format) an |sct| and write it to |out|. + * If |out| is null, no SCT will be output but the length will still be returned. + * If |out| points to a null pointer, a string will be allocated to hold the + * TLS-format SCT. It is the responsibility of the caller to free it. + * If |out| points to an allocated string, the TLS-format SCT will be written + * to it. + * The length of the SCT in TLS format will be returned. + */ +__owur int i2o_SCT(const SCT *sct, unsigned char **out); + +/* + * Parses an SCT in TLS format and returns it. + * If |psct| is not null, it will end up pointing to the parsed SCT. If it + * already points to a non-null pointer, the pointer will be free'd. + * |in| should be a pointer to a string containing the TLS-format SCT. + * |in| will be advanced to the end of the SCT if parsing succeeds. + * |len| should be the length of the SCT in |in|. + * Returns NULL if an error occurs. + * If the SCT is an unsupported version, only the SCT's 'sct' and 'sct_len' + * fields will be populated (with |in| and |len| respectively). + */ +SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len); + +/******************** + * CT log functions * + ********************/ + +/* + * Creates a new CT log instance with the given |public_key| and |name|. + * Takes ownership of |public_key| but copies |name|. + * Returns NULL if malloc fails or if |public_key| cannot be converted to DER. + * Should be deleted by the caller using CTLOG_free when no longer needed. + */ +CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name); + +/* + * Creates a new CTLOG instance with the base64-encoded SubjectPublicKeyInfo DER + * in |pkey_base64|. The |name| is a string to help users identify this log. + * Returns 1 on success, 0 on failure. + * Should be deleted by the caller using CTLOG_free when no longer needed. + */ +int CTLOG_new_from_base64(CTLOG ** ct_log, + const char *pkey_base64, const char *name); + +/* + * Deletes a CT log instance and its fields. + */ +void CTLOG_free(CTLOG *log); + +/* Gets the name of the CT log */ +const char *CTLOG_get0_name(const CTLOG *log); +/* Gets the ID of the CT log */ +void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id, + size_t *log_id_len); +/* Gets the public key of the CT log */ +EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log); + +/************************** + * CT log store functions * + **************************/ + +/* + * Creates a new CT log store. + * Should be deleted by the caller using CTLOG_STORE_free when no longer needed. + */ +CTLOG_STORE *CTLOG_STORE_new(void); + +/* + * Deletes a CT log store and all of the CT log instances held within. + */ +void CTLOG_STORE_free(CTLOG_STORE *store); + +/* + * Finds a CT log in the store based on its log ID. + * Returns the CT log, or NULL if no match is found. + */ +const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store, + const uint8_t *log_id, + size_t log_id_len); + +/* + * Loads a CT log list into a |store| from a |file|. + * Returns 1 if loading is successful, or 0 otherwise. + */ +__owur int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file); + +/* + * Loads the default CT log list into a |store|. + * See internal/cryptlib.h for the environment variable and file path that are + * consulted to find the default file. + * Returns 1 if loading is successful, or 0 otherwise. + */ +__owur int CTLOG_STORE_load_default_file(CTLOG_STORE *store); + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/cterr.h b/src/Mayaqua/win32_inc/openssl/cterr.h new file mode 100644 index 00000000..feb7bc56 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/cterr.h @@ -0,0 +1,80 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CTERR_H +# define HEADER_CTERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_CT + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_CT_strings(void); + +/* + * CT function codes. + */ +# define CT_F_CTLOG_NEW 117 +# define CT_F_CTLOG_NEW_FROM_BASE64 118 +# define CT_F_CTLOG_NEW_FROM_CONF 119 +# define CT_F_CTLOG_STORE_LOAD_CTX_NEW 122 +# define CT_F_CTLOG_STORE_LOAD_FILE 123 +# define CT_F_CTLOG_STORE_LOAD_LOG 130 +# define CT_F_CTLOG_STORE_NEW 131 +# define CT_F_CT_BASE64_DECODE 124 +# define CT_F_CT_POLICY_EVAL_CTX_NEW 133 +# define CT_F_CT_V1_LOG_ID_FROM_PKEY 125 +# define CT_F_I2O_SCT 107 +# define CT_F_I2O_SCT_LIST 108 +# define CT_F_I2O_SCT_SIGNATURE 109 +# define CT_F_O2I_SCT 110 +# define CT_F_O2I_SCT_LIST 111 +# define CT_F_O2I_SCT_SIGNATURE 112 +# define CT_F_SCT_CTX_NEW 126 +# define CT_F_SCT_CTX_VERIFY 128 +# define CT_F_SCT_NEW 100 +# define CT_F_SCT_NEW_FROM_BASE64 127 +# define CT_F_SCT_SET0_LOG_ID 101 +# define CT_F_SCT_SET1_EXTENSIONS 114 +# define CT_F_SCT_SET1_LOG_ID 115 +# define CT_F_SCT_SET1_SIGNATURE 116 +# define CT_F_SCT_SET_LOG_ENTRY_TYPE 102 +# define CT_F_SCT_SET_SIGNATURE_NID 103 +# define CT_F_SCT_SET_VERSION 104 + +/* + * CT reason codes. + */ +# define CT_R_BASE64_DECODE_ERROR 108 +# define CT_R_INVALID_LOG_ID_LENGTH 100 +# define CT_R_LOG_CONF_INVALID 109 +# define CT_R_LOG_CONF_INVALID_KEY 110 +# define CT_R_LOG_CONF_MISSING_DESCRIPTION 111 +# define CT_R_LOG_CONF_MISSING_KEY 112 +# define CT_R_LOG_KEY_INVALID 113 +# define CT_R_SCT_FUTURE_TIMESTAMP 116 +# define CT_R_SCT_INVALID 104 +# define CT_R_SCT_INVALID_SIGNATURE 107 +# define CT_R_SCT_LIST_INVALID 105 +# define CT_R_SCT_LOG_ID_MISMATCH 114 +# define CT_R_SCT_NOT_SET 106 +# define CT_R_SCT_UNSUPPORTED_VERSION 115 +# define CT_R_UNRECOGNIZED_SIGNATURE_NID 101 +# define CT_R_UNSUPPORTED_ENTRY_TYPE 102 +# define CT_R_UNSUPPORTED_VERSION 103 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/des.h b/src/Mayaqua/win32_inc/openssl/des.h index d0ec4d0f..be4abbdf 100644 --- a/src/Mayaqua/win32_inc/openssl/des.h +++ b/src/Mayaqua/win32_inc/openssl/des.h @@ -1,257 +1,174 @@ -/* crypto/des/des.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_NEW_DES_H -# define HEADER_NEW_DES_H - -# include /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG - * (via openssl/opensslconf.h */ - -# ifdef OPENSSL_NO_DES -# error DES is disabled. -# endif - -# ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef unsigned char DES_cblock[8]; -typedef /* const */ unsigned char const_DES_cblock[8]; -/* - * With "const", gcc 2.8.1 on Solaris thinks that DES_cblock * and - * const_DES_cblock * are incompatible pointer types. - */ - -typedef struct DES_ks { - union { - DES_cblock cblock; - /* - * make sure things are correct size on machines with 8 byte longs - */ - DES_LONG deslong[2]; - } ks[16]; -} DES_key_schedule; - -# ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT -# ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT -# define OPENSSL_ENABLE_OLD_DES_SUPPORT -# endif -# endif - -# ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT -# include -# endif - -# define DES_KEY_SZ (sizeof(DES_cblock)) -# define DES_SCHEDULE_SZ (sizeof(DES_key_schedule)) - -# define DES_ENCRYPT 1 -# define DES_DECRYPT 0 - -# define DES_CBC_MODE 0 -# define DES_PCBC_MODE 1 - -# define DES_ecb2_encrypt(i,o,k1,k2,e) \ - DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) - -# define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ - DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) - -# define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ - DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) - -# define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ - DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) - -OPENSSL_DECLARE_GLOBAL(int, DES_check_key); /* defaults to false */ -# define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key) -OPENSSL_DECLARE_GLOBAL(int, DES_rw_mode); /* defaults to DES_PCBC_MODE */ -# define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode) - -const char *DES_options(void); -void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, - DES_key_schedule *ks1, DES_key_schedule *ks2, - DES_key_schedule *ks3, int enc); -DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output, - long length, DES_key_schedule *schedule, - const_DES_cblock *ivec); -/* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */ -void DES_cbc_encrypt(const unsigned char *input, unsigned char *output, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, int enc); -void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, int enc); -void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, const_DES_cblock *inw, - const_DES_cblock *outw, int enc); -void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, int enc); -void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, - DES_key_schedule *ks, int enc); - -/* - * This is the DES encryption function that gets called by just about every - * other DES routine in the library. You should not use this function except - * to implement 'modes' of DES. I say this because the functions that call - * this routine do the conversion from 'char *' to long, and this needs to be - * done to make sure 'non-aligned' memory access do not occur. The - * characters are loaded 'little endian'. Data is a pointer to 2 unsigned - * long's and ks is the DES_key_schedule to use. enc, is non zero specifies - * encryption, zero if decryption. - */ -void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc); - -/* - * This functions is the same as DES_encrypt1() except that the DES initial - * permutation (IP) and final permutation (FP) have been left out. As for - * DES_encrypt1(), you should not use this function. It is used by the - * routines in the library that implement triple DES. IP() DES_encrypt2() - * DES_encrypt2() DES_encrypt2() FP() is the same as DES_encrypt1() - * DES_encrypt1() DES_encrypt1() except faster :-). - */ -void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc); - -void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3); -void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3); -void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, - long length, - DES_key_schedule *ks1, DES_key_schedule *ks2, - DES_key_schedule *ks3, DES_cblock *ivec, int enc); -void DES_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out, - long length, - DES_key_schedule *ks1, DES_key_schedule *ks2, - DES_key_schedule *ks3, - DES_cblock *ivec1, DES_cblock *ivec2, int enc); -void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3, - DES_cblock *ivec, int *num, int enc); -void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out, - int numbits, long length, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3, - DES_cblock *ivec, int enc); -void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, DES_key_schedule *ks1, - DES_key_schedule *ks2, DES_key_schedule *ks3, - DES_cblock *ivec, int *num); -# if 0 -void DES_xwhite_in2out(const_DES_cblock *DES_key, const_DES_cblock *in_white, - DES_cblock *out_white); -# endif - -int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched, - DES_cblock *iv); -int DES_enc_write(int fd, const void *buf, int len, DES_key_schedule *sched, - DES_cblock *iv); -char *DES_fcrypt(const char *buf, const char *salt, char *ret); -char *DES_crypt(const char *buf, const char *salt); -void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits, - long length, DES_key_schedule *schedule, - DES_cblock *ivec); -void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, int enc); -DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], - long length, int out_count, DES_cblock *seed); -int DES_random_key(DES_cblock *ret); -void DES_set_odd_parity(DES_cblock *key); -int DES_check_key_parity(const_DES_cblock *key); -int DES_is_weak_key(const_DES_cblock *key); -/* - * DES_set_key (= set_key = DES_key_sched = key_sched) calls - * DES_set_key_checked if global variable DES_check_key is set, - * DES_set_key_unchecked otherwise. - */ -int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule); -int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule); -int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule); -void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule); -# ifdef OPENSSL_FIPS -void private_DES_set_key_unchecked(const_DES_cblock *key, - DES_key_schedule *schedule); -# endif -void DES_string_to_key(const char *str, DES_cblock *key); -void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2); -void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, int *num, int enc); -void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, DES_key_schedule *schedule, - DES_cblock *ivec, int *num); - -int DES_read_password(DES_cblock *key, const char *prompt, int verify); -int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, - const char *prompt, int verify); - -# define DES_fixup_key_parity DES_set_odd_parity - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DES_H +# define HEADER_DES_H + +# include + +# ifndef OPENSSL_NO_DES +# ifdef __cplusplus +extern "C" { +# endif +# include + +typedef unsigned int DES_LONG; + +# ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +# endif + +typedef unsigned char DES_cblock[8]; +typedef /* const */ unsigned char const_DES_cblock[8]; +/* + * With "const", gcc 2.8.1 on Solaris thinks that DES_cblock * and + * const_DES_cblock * are incompatible pointer types. + */ + +typedef struct DES_ks { + union { + DES_cblock cblock; + /* + * make sure things are correct size on machines with 8 byte longs + */ + DES_LONG deslong[2]; + } ks[16]; +} DES_key_schedule; + +# define DES_KEY_SZ (sizeof(DES_cblock)) +# define DES_SCHEDULE_SZ (sizeof(DES_key_schedule)) + +# define DES_ENCRYPT 1 +# define DES_DECRYPT 0 + +# define DES_CBC_MODE 0 +# define DES_PCBC_MODE 1 + +# define DES_ecb2_encrypt(i,o,k1,k2,e) \ + DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) + +# define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ + DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) + +# define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ + DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) + +# define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ + DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) + +OPENSSL_DECLARE_GLOBAL(int, DES_check_key); /* defaults to false */ +# define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key) + +const char *DES_options(void); +void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, + DES_key_schedule *ks1, DES_key_schedule *ks2, + DES_key_schedule *ks3, int enc); +DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output, + long length, DES_key_schedule *schedule, + const_DES_cblock *ivec); +/* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */ +void DES_cbc_encrypt(const unsigned char *input, unsigned char *output, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, int enc); +void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, int enc); +void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, const_DES_cblock *inw, + const_DES_cblock *outw, int enc); +void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, int enc); +void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, + DES_key_schedule *ks, int enc); + +/* + * This is the DES encryption function that gets called by just about every + * other DES routine in the library. You should not use this function except + * to implement 'modes' of DES. I say this because the functions that call + * this routine do the conversion from 'char *' to long, and this needs to be + * done to make sure 'non-aligned' memory access do not occur. The + * characters are loaded 'little endian'. Data is a pointer to 2 unsigned + * long's and ks is the DES_key_schedule to use. enc, is non zero specifies + * encryption, zero if decryption. + */ +void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc); + +/* + * This functions is the same as DES_encrypt1() except that the DES initial + * permutation (IP) and final permutation (FP) have been left out. As for + * DES_encrypt1(), you should not use this function. It is used by the + * routines in the library that implement triple DES. IP() DES_encrypt2() + * DES_encrypt2() DES_encrypt2() FP() is the same as DES_encrypt1() + * DES_encrypt1() DES_encrypt1() except faster :-). + */ +void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc); + +void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3); +void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3); +void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, + long length, + DES_key_schedule *ks1, DES_key_schedule *ks2, + DES_key_schedule *ks3, DES_cblock *ivec, int enc); +void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3, + DES_cblock *ivec, int *num, int enc); +void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out, + int numbits, long length, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3, + DES_cblock *ivec, int enc); +void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3, + DES_cblock *ivec, int *num); +char *DES_fcrypt(const char *buf, const char *salt, char *ret); +char *DES_crypt(const char *buf, const char *salt); +void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits, + long length, DES_key_schedule *schedule, + DES_cblock *ivec); +void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, int enc); +DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], + long length, int out_count, DES_cblock *seed); +int DES_random_key(DES_cblock *ret); +void DES_set_odd_parity(DES_cblock *key); +int DES_check_key_parity(const_DES_cblock *key); +int DES_is_weak_key(const_DES_cblock *key); +/* + * DES_set_key (= set_key = DES_key_sched = key_sched) calls + * DES_set_key_checked if global variable DES_check_key is set, + * DES_set_key_unchecked otherwise. + */ +int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule); +int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule); +int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule); +void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule); +void DES_string_to_key(const char *str, DES_cblock *key); +void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2); +void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, int *num, int enc); +void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, DES_key_schedule *schedule, + DES_cblock *ivec, int *num); + +# define DES_fixup_key_parity DES_set_odd_parity + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/des_old.h b/src/Mayaqua/win32_inc/openssl/des_old.h deleted file mode 100644 index 29713d0c..00000000 --- a/src/Mayaqua/win32_inc/openssl/des_old.h +++ /dev/null @@ -1,497 +0,0 @@ -/* crypto/des/des_old.h */ - -/*- - * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - * - * The function names in here are deprecated and are only present to - * provide an interface compatible with openssl 0.9.6 and older as - * well as libdes. OpenSSL now provides functions where "des_" has - * been replaced with "DES_" in the names, to make it possible to - * make incompatible changes that are needed for C type security and - * other stuff. - * - * This include files has two compatibility modes: - * - * - If OPENSSL_DES_LIBDES_COMPATIBILITY is defined, you get an API - * that is compatible with libdes and SSLeay. - * - If OPENSSL_DES_LIBDES_COMPATIBILITY isn't defined, you get an - * API that is compatible with OpenSSL 0.9.5x to 0.9.6x. - * - * Note that these modes break earlier snapshots of OpenSSL, where - * libdes compatibility was the only available mode or (later on) the - * prefered compatibility mode. However, after much consideration - * (and more or less violent discussions with external parties), it - * was concluded that OpenSSL should be compatible with earlier versions - * of itself before anything else. Also, in all honesty, libdes is - * an old beast that shouldn't really be used any more. - * - * Please consider starting to use the DES_ functions rather than the - * des_ ones. The des_ functions will disappear completely before - * OpenSSL 1.0! - * - * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - */ - -/* - * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project - * 2001. - */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_DES_H -# define HEADER_DES_H - -# include /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG */ - -# ifdef OPENSSL_NO_DES -# error DES is disabled. -# endif - -# ifndef HEADER_NEW_DES_H -# error You must include des.h, not des_old.h directly. -# endif - -# ifdef _KERBEROS_DES_H -# error replaces . -# endif - -# include - -# ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef _ -# undef _ -# endif - -typedef unsigned char _ossl_old_des_cblock[8]; -typedef struct _ossl_old_des_ks_struct { - union { - _ossl_old_des_cblock _; - /* - * make sure things are correct size on machines with 8 byte longs - */ - DES_LONG pad[2]; - } ks; -} _ossl_old_des_key_schedule[16]; - -# ifndef OPENSSL_DES_LIBDES_COMPATIBILITY -# define des_cblock DES_cblock -# define const_des_cblock const_DES_cblock -# define des_key_schedule DES_key_schedule -# define des_ecb3_encrypt(i,o,k1,k2,k3,e)\ - DES_ecb3_encrypt((i),(o),&(k1),&(k2),&(k3),(e)) -# define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\ - DES_ede3_cbc_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(e)) -# define des_ede3_cbcm_encrypt(i,o,l,k1,k2,k3,iv1,iv2,e)\ - DES_ede3_cbcm_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv1),(iv2),(e)) -# define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\ - DES_ede3_cfb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n),(e)) -# define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\ - DES_ede3_ofb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n)) -# define des_options()\ - DES_options() -# define des_cbc_cksum(i,o,l,k,iv)\ - DES_cbc_cksum((i),(o),(l),&(k),(iv)) -# define des_cbc_encrypt(i,o,l,k,iv,e)\ - DES_cbc_encrypt((i),(o),(l),&(k),(iv),(e)) -# define des_ncbc_encrypt(i,o,l,k,iv,e)\ - DES_ncbc_encrypt((i),(o),(l),&(k),(iv),(e)) -# define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\ - DES_xcbc_encrypt((i),(o),(l),&(k),(iv),(inw),(outw),(e)) -# define des_cfb_encrypt(i,o,n,l,k,iv,e)\ - DES_cfb_encrypt((i),(o),(n),(l),&(k),(iv),(e)) -# define des_ecb_encrypt(i,o,k,e)\ - DES_ecb_encrypt((i),(o),&(k),(e)) -# define des_encrypt1(d,k,e)\ - DES_encrypt1((d),&(k),(e)) -# define des_encrypt2(d,k,e)\ - DES_encrypt2((d),&(k),(e)) -# define des_encrypt3(d,k1,k2,k3)\ - DES_encrypt3((d),&(k1),&(k2),&(k3)) -# define des_decrypt3(d,k1,k2,k3)\ - DES_decrypt3((d),&(k1),&(k2),&(k3)) -# define des_xwhite_in2out(k,i,o)\ - DES_xwhite_in2out((k),(i),(o)) -# define des_enc_read(f,b,l,k,iv)\ - DES_enc_read((f),(b),(l),&(k),(iv)) -# define des_enc_write(f,b,l,k,iv)\ - DES_enc_write((f),(b),(l),&(k),(iv)) -# define des_fcrypt(b,s,r)\ - DES_fcrypt((b),(s),(r)) -# if 0 -# define des_crypt(b,s)\ - DES_crypt((b),(s)) -# if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__) -# define crypt(b,s)\ - DES_crypt((b),(s)) -# endif -# endif -# define des_ofb_encrypt(i,o,n,l,k,iv)\ - DES_ofb_encrypt((i),(o),(n),(l),&(k),(iv)) -# define des_pcbc_encrypt(i,o,l,k,iv,e)\ - DES_pcbc_encrypt((i),(o),(l),&(k),(iv),(e)) -# define des_quad_cksum(i,o,l,c,s)\ - DES_quad_cksum((i),(o),(l),(c),(s)) -# define des_random_seed(k)\ - _ossl_096_des_random_seed((k)) -# define des_random_key(r)\ - DES_random_key((r)) -# define des_read_password(k,p,v) \ - DES_read_password((k),(p),(v)) -# define des_read_2passwords(k1,k2,p,v) \ - DES_read_2passwords((k1),(k2),(p),(v)) -# define des_set_odd_parity(k)\ - DES_set_odd_parity((k)) -# define des_check_key_parity(k)\ - DES_check_key_parity((k)) -# define des_is_weak_key(k)\ - DES_is_weak_key((k)) -# define des_set_key(k,ks)\ - DES_set_key((k),&(ks)) -# define des_key_sched(k,ks)\ - DES_key_sched((k),&(ks)) -# define des_set_key_checked(k,ks)\ - DES_set_key_checked((k),&(ks)) -# define des_set_key_unchecked(k,ks)\ - DES_set_key_unchecked((k),&(ks)) -# define des_string_to_key(s,k)\ - DES_string_to_key((s),(k)) -# define des_string_to_2keys(s,k1,k2)\ - DES_string_to_2keys((s),(k1),(k2)) -# define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\ - DES_cfb64_encrypt((i),(o),(l),&(ks),(iv),(n),(e)) -# define des_ofb64_encrypt(i,o,l,ks,iv,n)\ - DES_ofb64_encrypt((i),(o),(l),&(ks),(iv),(n)) - -# define des_ecb2_encrypt(i,o,k1,k2,e) \ - des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) - -# define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ - des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) - -# define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ - des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) - -# define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ - des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) - -# define des_check_key DES_check_key -# define des_rw_mode DES_rw_mode -# else /* libdes compatibility */ -/* - * Map all symbol names to _ossl_old_des_* form, so we avoid all clashes with - * libdes - */ -# define des_cblock _ossl_old_des_cblock -# define des_key_schedule _ossl_old_des_key_schedule -# define des_ecb3_encrypt(i,o,k1,k2,k3,e)\ - _ossl_old_des_ecb3_encrypt((i),(o),(k1),(k2),(k3),(e)) -# define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\ - _ossl_old_des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(e)) -# define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\ - _ossl_old_des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n),(e)) -# define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\ - _ossl_old_des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n)) -# define des_options()\ - _ossl_old_des_options() -# define des_cbc_cksum(i,o,l,k,iv)\ - _ossl_old_des_cbc_cksum((i),(o),(l),(k),(iv)) -# define des_cbc_encrypt(i,o,l,k,iv,e)\ - _ossl_old_des_cbc_encrypt((i),(o),(l),(k),(iv),(e)) -# define des_ncbc_encrypt(i,o,l,k,iv,e)\ - _ossl_old_des_ncbc_encrypt((i),(o),(l),(k),(iv),(e)) -# define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\ - _ossl_old_des_xcbc_encrypt((i),(o),(l),(k),(iv),(inw),(outw),(e)) -# define des_cfb_encrypt(i,o,n,l,k,iv,e)\ - _ossl_old_des_cfb_encrypt((i),(o),(n),(l),(k),(iv),(e)) -# define des_ecb_encrypt(i,o,k,e)\ - _ossl_old_des_ecb_encrypt((i),(o),(k),(e)) -# define des_encrypt(d,k,e)\ - _ossl_old_des_encrypt((d),(k),(e)) -# define des_encrypt2(d,k,e)\ - _ossl_old_des_encrypt2((d),(k),(e)) -# define des_encrypt3(d,k1,k2,k3)\ - _ossl_old_des_encrypt3((d),(k1),(k2),(k3)) -# define des_decrypt3(d,k1,k2,k3)\ - _ossl_old_des_decrypt3((d),(k1),(k2),(k3)) -# define des_xwhite_in2out(k,i,o)\ - _ossl_old_des_xwhite_in2out((k),(i),(o)) -# define des_enc_read(f,b,l,k,iv)\ - _ossl_old_des_enc_read((f),(b),(l),(k),(iv)) -# define des_enc_write(f,b,l,k,iv)\ - _ossl_old_des_enc_write((f),(b),(l),(k),(iv)) -# define des_fcrypt(b,s,r)\ - _ossl_old_des_fcrypt((b),(s),(r)) -# define des_crypt(b,s)\ - _ossl_old_des_crypt((b),(s)) -# if 0 -# define crypt(b,s)\ - _ossl_old_crypt((b),(s)) -# endif -# define des_ofb_encrypt(i,o,n,l,k,iv)\ - _ossl_old_des_ofb_encrypt((i),(o),(n),(l),(k),(iv)) -# define des_pcbc_encrypt(i,o,l,k,iv,e)\ - _ossl_old_des_pcbc_encrypt((i),(o),(l),(k),(iv),(e)) -# define des_quad_cksum(i,o,l,c,s)\ - _ossl_old_des_quad_cksum((i),(o),(l),(c),(s)) -# define des_random_seed(k)\ - _ossl_old_des_random_seed((k)) -# define des_random_key(r)\ - _ossl_old_des_random_key((r)) -# define des_read_password(k,p,v) \ - _ossl_old_des_read_password((k),(p),(v)) -# define des_read_2passwords(k1,k2,p,v) \ - _ossl_old_des_read_2passwords((k1),(k2),(p),(v)) -# define des_set_odd_parity(k)\ - _ossl_old_des_set_odd_parity((k)) -# define des_is_weak_key(k)\ - _ossl_old_des_is_weak_key((k)) -# define des_set_key(k,ks)\ - _ossl_old_des_set_key((k),(ks)) -# define des_key_sched(k,ks)\ - _ossl_old_des_key_sched((k),(ks)) -# define des_string_to_key(s,k)\ - _ossl_old_des_string_to_key((s),(k)) -# define des_string_to_2keys(s,k1,k2)\ - _ossl_old_des_string_to_2keys((s),(k1),(k2)) -# define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\ - _ossl_old_des_cfb64_encrypt((i),(o),(l),(ks),(iv),(n),(e)) -# define des_ofb64_encrypt(i,o,l,ks,iv,n)\ - _ossl_old_des_ofb64_encrypt((i),(o),(l),(ks),(iv),(n)) - -# define des_ecb2_encrypt(i,o,k1,k2,e) \ - des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) - -# define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ - des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) - -# define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ - des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) - -# define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ - des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) - -# define des_check_key DES_check_key -# define des_rw_mode DES_rw_mode -# endif - -const char *_ossl_old_des_options(void); -void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, - _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, int enc); -DES_LONG _ossl_old_des_cbc_cksum(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec); -void _ossl_old_des_cbc_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, int enc); -void _ossl_old_des_ncbc_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, int enc); -void _ossl_old_des_xcbc_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, - _ossl_old_des_cblock *inw, - _ossl_old_des_cblock *outw, int enc); -void _ossl_old_des_cfb_encrypt(unsigned char *in, unsigned char *out, - int numbits, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, int enc); -void _ossl_old_des_ecb_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, - _ossl_old_des_key_schedule ks, int enc); -void _ossl_old_des_encrypt(DES_LONG *data, _ossl_old_des_key_schedule ks, - int enc); -void _ossl_old_des_encrypt2(DES_LONG *data, _ossl_old_des_key_schedule ks, - int enc); -void _ossl_old_des_encrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3); -void _ossl_old_des_decrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3); -void _ossl_old_des_ede3_cbc_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, - _ossl_old_des_cblock *ivec, int enc); -void _ossl_old_des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out, - long length, - _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, - _ossl_old_des_cblock *ivec, int *num, - int enc); -void _ossl_old_des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out, - long length, - _ossl_old_des_key_schedule ks1, - _ossl_old_des_key_schedule ks2, - _ossl_old_des_key_schedule ks3, - _ossl_old_des_cblock *ivec, int *num); -# if 0 -void _ossl_old_des_xwhite_in2out(_ossl_old_des_cblock (*des_key), - _ossl_old_des_cblock (*in_white), - _ossl_old_des_cblock (*out_white)); -# endif - -int _ossl_old_des_enc_read(int fd, char *buf, int len, - _ossl_old_des_key_schedule sched, - _ossl_old_des_cblock *iv); -int _ossl_old_des_enc_write(int fd, char *buf, int len, - _ossl_old_des_key_schedule sched, - _ossl_old_des_cblock *iv); -char *_ossl_old_des_fcrypt(const char *buf, const char *salt, char *ret); -char *_ossl_old_des_crypt(const char *buf, const char *salt); -# if !defined(PERL5) && !defined(NeXT) -char *_ossl_old_crypt(const char *buf, const char *salt); -# endif -void _ossl_old_des_ofb_encrypt(unsigned char *in, unsigned char *out, - int numbits, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec); -void _ossl_old_des_pcbc_encrypt(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, int enc); -DES_LONG _ossl_old_des_quad_cksum(_ossl_old_des_cblock *input, - _ossl_old_des_cblock *output, long length, - int out_count, _ossl_old_des_cblock *seed); -void _ossl_old_des_random_seed(_ossl_old_des_cblock key); -void _ossl_old_des_random_key(_ossl_old_des_cblock ret); -int _ossl_old_des_read_password(_ossl_old_des_cblock *key, const char *prompt, - int verify); -int _ossl_old_des_read_2passwords(_ossl_old_des_cblock *key1, - _ossl_old_des_cblock *key2, - const char *prompt, int verify); -void _ossl_old_des_set_odd_parity(_ossl_old_des_cblock *key); -int _ossl_old_des_is_weak_key(_ossl_old_des_cblock *key); -int _ossl_old_des_set_key(_ossl_old_des_cblock *key, - _ossl_old_des_key_schedule schedule); -int _ossl_old_des_key_sched(_ossl_old_des_cblock *key, - _ossl_old_des_key_schedule schedule); -void _ossl_old_des_string_to_key(char *str, _ossl_old_des_cblock *key); -void _ossl_old_des_string_to_2keys(char *str, _ossl_old_des_cblock *key1, - _ossl_old_des_cblock *key2); -void _ossl_old_des_cfb64_encrypt(unsigned char *in, unsigned char *out, - long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, int *num, - int enc); -void _ossl_old_des_ofb64_encrypt(unsigned char *in, unsigned char *out, - long length, - _ossl_old_des_key_schedule schedule, - _ossl_old_des_cblock *ivec, int *num); - -void _ossl_096_des_random_seed(des_cblock *key); - -/* - * The following definitions provide compatibility with the MIT Kerberos - * library. The _ossl_old_des_key_schedule structure is not binary - * compatible. - */ - -# define _KERBEROS_DES_H - -# define KRBDES_ENCRYPT DES_ENCRYPT -# define KRBDES_DECRYPT DES_DECRYPT - -# ifdef KERBEROS -# define ENCRYPT DES_ENCRYPT -# define DECRYPT DES_DECRYPT -# endif - -# ifndef NCOMPAT -# define C_Block des_cblock -# define Key_schedule des_key_schedule -# define KEY_SZ DES_KEY_SZ -# define string_to_key des_string_to_key -# define read_pw_string des_read_pw_string -# define random_key des_random_key -# define pcbc_encrypt des_pcbc_encrypt -# define set_key des_set_key -# define key_sched des_key_sched -# define ecb_encrypt des_ecb_encrypt -# define cbc_encrypt des_cbc_encrypt -# define ncbc_encrypt des_ncbc_encrypt -# define xcbc_encrypt des_xcbc_encrypt -# define cbc_cksum des_cbc_cksum -# define quad_cksum des_quad_cksum -# define check_parity des_check_key_parity -# endif - -# define des_fixup_key_parity DES_fixup_key_parity - -#ifdef __cplusplus -} -#endif - -/* for DES_read_pw_string et al */ -# include - -#endif diff --git a/src/Mayaqua/win32_inc/openssl/dh.h b/src/Mayaqua/win32_inc/openssl/dh.h index e8e6197c..3527540c 100644 --- a/src/Mayaqua/win32_inc/openssl/dh.h +++ b/src/Mayaqua/win32_inc/openssl/dh.h @@ -1,393 +1,340 @@ -/* crypto/dh/dh.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_DH_H -# define HEADER_DH_H - -# include - -# ifdef OPENSSL_NO_DH -# error DH is disabled. -# endif - -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif - -# ifndef OPENSSL_DH_MAX_MODULUS_BITS -# define OPENSSL_DH_MAX_MODULUS_BITS 10000 -# endif - -# define DH_FLAG_CACHE_MONT_P 0x01 - -/* - * new with 0.9.7h; the built-in DH - * implementation now uses constant time - * modular exponentiation for secret exponents - * by default. This flag causes the - * faster variable sliding window method to - * be used for all exponents. - */ -# define DH_FLAG_NO_EXP_CONSTTIME 0x02 - -/* - * If this flag is set the DH method is FIPS compliant and can be used in - * FIPS mode. This is set in the validated module method. If an application - * sets this flag in its own methods it is its reposibility to ensure the - * result is compliant. - */ - -# define DH_FLAG_FIPS_METHOD 0x0400 - -/* - * If this flag is set the operations normally disabled in FIPS mode are - * permitted it is then the applications responsibility to ensure that the - * usage is compliant. - */ - -# define DH_FLAG_NON_FIPS_ALLOW 0x0400 - -#ifdef __cplusplus -extern "C" { -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct dh_st DH; */ -/* typedef struct dh_method DH_METHOD; */ - -struct dh_method { - const char *name; - /* Methods here */ - int (*generate_key) (DH *dh); - int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh); - /* Can be null */ - int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a, - const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *m_ctx); - int (*init) (DH *dh); - int (*finish) (DH *dh); - int flags; - char *app_data; - /* If this is non-NULL, it will be used to generate parameters */ - int (*generate_params) (DH *dh, int prime_len, int generator, - BN_GENCB *cb); -}; - -struct dh_st { - /* - * This first argument is used to pick up errors when a DH is passed - * instead of a EVP_PKEY - */ - int pad; - int version; - BIGNUM *p; - BIGNUM *g; - long length; /* optional */ - BIGNUM *pub_key; /* g^x % p */ - BIGNUM *priv_key; /* x */ - int flags; - BN_MONT_CTX *method_mont_p; - /* Place holders if we want to do X9.42 DH */ - BIGNUM *q; - BIGNUM *j; - unsigned char *seed; - int seedlen; - BIGNUM *counter; - int references; - CRYPTO_EX_DATA ex_data; - const DH_METHOD *meth; - ENGINE *engine; -}; - -# define DH_GENERATOR_2 2 -/* #define DH_GENERATOR_3 3 */ -# define DH_GENERATOR_5 5 - -/* DH_check error codes */ -# define DH_CHECK_P_NOT_PRIME 0x01 -# define DH_CHECK_P_NOT_SAFE_PRIME 0x02 -# define DH_UNABLE_TO_CHECK_GENERATOR 0x04 -# define DH_NOT_SUITABLE_GENERATOR 0x08 -# define DH_CHECK_Q_NOT_PRIME 0x10 -# define DH_CHECK_INVALID_Q_VALUE 0x20 -# define DH_CHECK_INVALID_J_VALUE 0x40 - -/* DH_check_pub_key error codes */ -# define DH_CHECK_PUBKEY_TOO_SMALL 0x01 -# define DH_CHECK_PUBKEY_TOO_LARGE 0x02 -# define DH_CHECK_PUBKEY_INVALID 0x04 - -/* - * primes p where (p-1)/2 is prime too are called "safe"; we define this for - * backward compatibility: - */ -# define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME - -# define d2i_DHparams_fp(fp,x) (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ - (char *(*)())d2i_DHparams,(fp),(unsigned char **)(x)) -# define i2d_DHparams_fp(fp,x) ASN1_i2d_fp(i2d_DHparams,(fp), \ - (unsigned char *)(x)) -# define d2i_DHparams_bio(bp,x) ASN1_d2i_bio_of(DH,DH_new,d2i_DHparams,bp,x) -# define i2d_DHparams_bio(bp,x) ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x) - -DH *DHparams_dup(DH *); - -const DH_METHOD *DH_OpenSSL(void); - -void DH_set_default_method(const DH_METHOD *meth); -const DH_METHOD *DH_get_default_method(void); -int DH_set_method(DH *dh, const DH_METHOD *meth); -DH *DH_new_method(ENGINE *engine); - -DH *DH_new(void); -void DH_free(DH *dh); -int DH_up_ref(DH *dh); -int DH_size(const DH *dh); -int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int DH_set_ex_data(DH *d, int idx, void *arg); -void *DH_get_ex_data(DH *d, int idx); - -/* Deprecated version */ -# ifndef OPENSSL_NO_DEPRECATED -DH *DH_generate_parameters(int prime_len, int generator, - void (*callback) (int, int, void *), void *cb_arg); -# endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* New version */ -int DH_generate_parameters_ex(DH *dh, int prime_len, int generator, - BN_GENCB *cb); - -int DH_check(const DH *dh, int *codes); -int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); -int DH_generate_key(DH *dh); -int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); -int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh); -DH *d2i_DHparams(DH **a, const unsigned char **pp, long length); -int i2d_DHparams(const DH *a, unsigned char **pp); -DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length); -int i2d_DHxparams(const DH *a, unsigned char **pp); -# ifndef OPENSSL_NO_FP_API -int DHparams_print_fp(FILE *fp, const DH *x); -# endif -# ifndef OPENSSL_NO_BIO -int DHparams_print(BIO *bp, const DH *x); -# else -int DHparams_print(char *bp, const DH *x); -# endif - -/* RFC 5114 parameters */ -DH *DH_get_1024_160(void); -DH *DH_get_2048_224(void); -DH *DH_get_2048_256(void); - -/* RFC2631 KDF */ -int DH_KDF_X9_42(unsigned char *out, size_t outlen, - const unsigned char *Z, size_t Zlen, - ASN1_OBJECT *key_oid, - const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); - -# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL) - -# define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL) - -# define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL) - -# define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL) - -# define EVP_PKEY_CTX_set_dh_rfc5114(ctx, gen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) - -# define EVP_PKEY_CTX_set_dhx_rfc5114(ctx, gen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) - -# define EVP_PKEY_CTX_set_dh_kdf_type(ctx, kdf) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_DH_KDF_TYPE, kdf, NULL) - -# define EVP_PKEY_CTX_get_dh_kdf_type(ctx) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_DH_KDF_TYPE, -2, NULL) - -# define EVP_PKEY_CTX_set0_dh_kdf_oid(ctx, oid) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_DH_KDF_OID, 0, (void *)oid) - -# define EVP_PKEY_CTX_get0_dh_kdf_oid(ctx, poid) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_DH_KDF_OID, 0, (void *)poid) - -# define EVP_PKEY_CTX_set_dh_kdf_md(ctx, md) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_DH_KDF_MD, 0, (void *)md) - -# define EVP_PKEY_CTX_get_dh_kdf_md(ctx, pmd) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_DH_KDF_MD, 0, (void *)pmd) - -# define EVP_PKEY_CTX_set_dh_kdf_outlen(ctx, len) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_DH_KDF_OUTLEN, len, NULL) - -# define EVP_PKEY_CTX_get_dh_kdf_outlen(ctx, plen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN, 0, (void *)plen) - -# define EVP_PKEY_CTX_set0_dh_kdf_ukm(ctx, p, plen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_DH_KDF_UKM, plen, (void *)p) - -# define EVP_PKEY_CTX_get0_dh_kdf_ukm(ctx, p) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_DH_KDF_UKM, 0, (void *)p) - -# define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1) -# define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2) -# define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3) -# define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4) -# define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5) -# define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6) -# define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7) -# define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8) -# define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9) -# define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10) -# define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11) -# define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12) -# define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13) -# define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14) - -/* KDF types */ -# define EVP_PKEY_DH_KDF_NONE 1 -# define EVP_PKEY_DH_KDF_X9_42 2 - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_DH_strings(void); - -/* Error codes for the DH functions. */ - -/* Function codes. */ -# define DH_F_COMPUTE_KEY 102 -# define DH_F_DHPARAMS_PRINT_FP 101 -# define DH_F_DH_BUILTIN_GENPARAMS 106 -# define DH_F_DH_CMS_DECRYPT 117 -# define DH_F_DH_CMS_SET_PEERKEY 118 -# define DH_F_DH_CMS_SET_SHARED_INFO 119 -# define DH_F_DH_COMPUTE_KEY 114 -# define DH_F_DH_GENERATE_KEY 115 -# define DH_F_DH_GENERATE_PARAMETERS_EX 116 -# define DH_F_DH_NEW_METHOD 105 -# define DH_F_DH_PARAM_DECODE 107 -# define DH_F_DH_PRIV_DECODE 110 -# define DH_F_DH_PRIV_ENCODE 111 -# define DH_F_DH_PUB_DECODE 108 -# define DH_F_DH_PUB_ENCODE 109 -# define DH_F_DO_DH_PRINT 100 -# define DH_F_GENERATE_KEY 103 -# define DH_F_GENERATE_PARAMETERS 104 -# define DH_F_PKEY_DH_DERIVE 112 -# define DH_F_PKEY_DH_KEYGEN 113 - -/* Reason codes. */ -# define DH_R_BAD_GENERATOR 101 -# define DH_R_BN_DECODE_ERROR 109 -# define DH_R_BN_ERROR 106 -# define DH_R_DECODE_ERROR 104 -# define DH_R_INVALID_PUBKEY 102 -# define DH_R_KDF_PARAMETER_ERROR 112 -# define DH_R_KEYS_NOT_SET 108 -# define DH_R_KEY_SIZE_TOO_SMALL 110 -# define DH_R_MODULUS_TOO_LARGE 103 -# define DH_R_NON_FIPS_METHOD 111 -# define DH_R_NO_PARAMETERS_SET 107 -# define DH_R_NO_PRIVATE_VALUE 100 -# define DH_R_PARAMETER_ENCODING_ERROR 105 -# define DH_R_PEER_KEY_ERROR 113 -# define DH_R_SHARED_INFO_ERROR 114 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DH_H +# define HEADER_DH_H + +# include + +# ifndef OPENSSL_NO_DH +# include +# include +# include +# include +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif +# include + +# ifdef __cplusplus +extern "C" { +# endif + +# ifndef OPENSSL_DH_MAX_MODULUS_BITS +# define OPENSSL_DH_MAX_MODULUS_BITS 10000 +# endif + +# define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 + +# define DH_FLAG_CACHE_MONT_P 0x01 + +# if OPENSSL_API_COMPAT < 0x10100000L +/* + * Does nothing. Previously this switched off constant time behaviour. + */ +# define DH_FLAG_NO_EXP_CONSTTIME 0x00 +# endif + +/* + * If this flag is set the DH method is FIPS compliant and can be used in + * FIPS mode. This is set in the validated module method. If an application + * sets this flag in its own methods it is its responsibility to ensure the + * result is compliant. + */ + +# define DH_FLAG_FIPS_METHOD 0x0400 + +/* + * If this flag is set the operations normally disabled in FIPS mode are + * permitted it is then the applications responsibility to ensure that the + * usage is compliant. + */ + +# define DH_FLAG_NON_FIPS_ALLOW 0x0400 + +/* Already defined in ossl_typ.h */ +/* typedef struct dh_st DH; */ +/* typedef struct dh_method DH_METHOD; */ + +DECLARE_ASN1_ITEM(DHparams) + +# define DH_GENERATOR_2 2 +/* #define DH_GENERATOR_3 3 */ +# define DH_GENERATOR_5 5 + +/* DH_check error codes */ +# define DH_CHECK_P_NOT_PRIME 0x01 +# define DH_CHECK_P_NOT_SAFE_PRIME 0x02 +# define DH_UNABLE_TO_CHECK_GENERATOR 0x04 +# define DH_NOT_SUITABLE_GENERATOR 0x08 +# define DH_CHECK_Q_NOT_PRIME 0x10 +# define DH_CHECK_INVALID_Q_VALUE 0x20 +# define DH_CHECK_INVALID_J_VALUE 0x40 + +/* DH_check_pub_key error codes */ +# define DH_CHECK_PUBKEY_TOO_SMALL 0x01 +# define DH_CHECK_PUBKEY_TOO_LARGE 0x02 +# define DH_CHECK_PUBKEY_INVALID 0x04 + +/* + * primes p where (p-1)/2 is prime too are called "safe"; we define this for + * backward compatibility: + */ +# define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME + +# define d2i_DHparams_fp(fp,x) \ + (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ + (char *(*)())d2i_DHparams, \ + (fp), \ + (unsigned char **)(x)) +# define i2d_DHparams_fp(fp,x) \ + ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x)) +# define d2i_DHparams_bio(bp,x) \ + ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x) +# define i2d_DHparams_bio(bp,x) \ + ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x) + +# define d2i_DHxparams_fp(fp,x) \ + (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ + (char *(*)())d2i_DHxparams, \ + (fp), \ + (unsigned char **)(x)) +# define i2d_DHxparams_fp(fp,x) \ + ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x)) +# define d2i_DHxparams_bio(bp,x) \ + ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x) +# define i2d_DHxparams_bio(bp,x) \ + ASN1_i2d_bio_of_const(DH, i2d_DHxparams, bp, x) + +DH *DHparams_dup(DH *); + +const DH_METHOD *DH_OpenSSL(void); + +void DH_set_default_method(const DH_METHOD *meth); +const DH_METHOD *DH_get_default_method(void); +int DH_set_method(DH *dh, const DH_METHOD *meth); +DH *DH_new_method(ENGINE *engine); + +DH *DH_new(void); +void DH_free(DH *dh); +int DH_up_ref(DH *dh); +int DH_bits(const DH *dh); +int DH_size(const DH *dh); +int DH_security_bits(const DH *dh); +#define DH_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef) +int DH_set_ex_data(DH *d, int idx, void *arg); +void *DH_get_ex_data(DH *d, int idx); + +/* Deprecated version */ +DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator, + void (*callback) (int, int, + void *), + void *cb_arg)) + +/* New version */ +int DH_generate_parameters_ex(DH *dh, int prime_len, int generator, + BN_GENCB *cb); + +int DH_check_params_ex(const DH *dh); +int DH_check_ex(const DH *dh); +int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); +int DH_check_params(const DH *dh, int *ret); +int DH_check(const DH *dh, int *codes); +int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); +int DH_generate_key(DH *dh); +int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); +int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh); +DH *d2i_DHparams(DH **a, const unsigned char **pp, long length); +int i2d_DHparams(const DH *a, unsigned char **pp); +DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length); +int i2d_DHxparams(const DH *a, unsigned char **pp); +# ifndef OPENSSL_NO_STDIO +int DHparams_print_fp(FILE *fp, const DH *x); +# endif +int DHparams_print(BIO *bp, const DH *x); + +/* RFC 5114 parameters */ +DH *DH_get_1024_160(void); +DH *DH_get_2048_224(void); +DH *DH_get_2048_256(void); + +/* Named parameters, currently RFC7919 */ +DH *DH_new_by_nid(int nid); +int DH_get_nid(const DH *dh); + +# ifndef OPENSSL_NO_CMS +/* RFC2631 KDF */ +int DH_KDF_X9_42(unsigned char *out, size_t outlen, + const unsigned char *Z, size_t Zlen, + ASN1_OBJECT *key_oid, + const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); +# endif + +void DH_get0_pqg(const DH *dh, + const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); +int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); +void DH_get0_key(const DH *dh, + const BIGNUM **pub_key, const BIGNUM **priv_key); +int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); +const BIGNUM *DH_get0_p(const DH *dh); +const BIGNUM *DH_get0_q(const DH *dh); +const BIGNUM *DH_get0_g(const DH *dh); +const BIGNUM *DH_get0_priv_key(const DH *dh); +const BIGNUM *DH_get0_pub_key(const DH *dh); +void DH_clear_flags(DH *dh, int flags); +int DH_test_flags(const DH *dh, int flags); +void DH_set_flags(DH *dh, int flags); +ENGINE *DH_get0_engine(DH *d); +long DH_get_length(const DH *dh); +int DH_set_length(DH *dh, long length); + +DH_METHOD *DH_meth_new(const char *name, int flags); +void DH_meth_free(DH_METHOD *dhm); +DH_METHOD *DH_meth_dup(const DH_METHOD *dhm); +const char *DH_meth_get0_name(const DH_METHOD *dhm); +int DH_meth_set1_name(DH_METHOD *dhm, const char *name); +int DH_meth_get_flags(const DH_METHOD *dhm); +int DH_meth_set_flags(DH_METHOD *dhm, int flags); +void *DH_meth_get0_app_data(const DH_METHOD *dhm); +int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data); +int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *); +int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key) (DH *)); +int (*DH_meth_get_compute_key(const DH_METHOD *dhm)) + (unsigned char *key, const BIGNUM *pub_key, DH *dh); +int DH_meth_set_compute_key(DH_METHOD *dhm, + int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh)); +int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm)) + (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, + BN_CTX *, BN_MONT_CTX *); +int DH_meth_set_bn_mod_exp(DH_METHOD *dhm, + int (*bn_mod_exp) (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, + const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); +int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *); +int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *)); +int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *); +int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *)); +int (*DH_meth_get_generate_params(const DH_METHOD *dhm)) + (DH *, int, int, BN_GENCB *); +int DH_meth_set_generate_params(DH_METHOD *dhm, + int (*generate_params) (DH *, int, int, BN_GENCB *)); + + +# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL) + +# define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL) + +# define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL) + +# define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL) + +# define EVP_PKEY_CTX_set_dh_rfc5114(ctx, gen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) + +# define EVP_PKEY_CTX_set_dhx_rfc5114(ctx, gen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) + +# define EVP_PKEY_CTX_set_dh_nid(ctx, nid) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, \ + EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_DH_NID, nid, NULL) + +# define EVP_PKEY_CTX_set_dh_pad(ctx, pad) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_PAD, pad, NULL) + +# define EVP_PKEY_CTX_set_dh_kdf_type(ctx, kdf) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_KDF_TYPE, kdf, NULL) + +# define EVP_PKEY_CTX_get_dh_kdf_type(ctx) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_KDF_TYPE, -2, NULL) + +# define EVP_PKEY_CTX_set0_dh_kdf_oid(ctx, oid) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_KDF_OID, 0, (void *)(oid)) + +# define EVP_PKEY_CTX_get0_dh_kdf_oid(ctx, poid) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_DH_KDF_OID, 0, (void *)(poid)) + +# define EVP_PKEY_CTX_set_dh_kdf_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_KDF_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_get_dh_kdf_md(ctx, pmd) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_DH_KDF_MD, 0, (void *)(pmd)) + +# define EVP_PKEY_CTX_set_dh_kdf_outlen(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_KDF_OUTLEN, len, NULL) + +# define EVP_PKEY_CTX_get_dh_kdf_outlen(ctx, plen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN, 0, (void *)(plen)) + +# define EVP_PKEY_CTX_set0_dh_kdf_ukm(ctx, p, plen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_DH_KDF_UKM, plen, (void *)(p)) + +# define EVP_PKEY_CTX_get0_dh_kdf_ukm(ctx, p) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_DH_KDF_UKM, 0, (void *)(p)) + +# define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1) +# define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2) +# define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3) +# define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4) +# define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5) +# define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6) +# define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7) +# define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8) +# define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9) +# define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10) +# define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11) +# define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12) +# define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13) +# define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14) +# define EVP_PKEY_CTRL_DH_NID (EVP_PKEY_ALG_CTRL + 15) +# define EVP_PKEY_CTRL_DH_PAD (EVP_PKEY_ALG_CTRL + 16) + +/* KDF types */ +# define EVP_PKEY_DH_KDF_NONE 1 +# ifndef OPENSSL_NO_CMS +# define EVP_PKEY_DH_KDF_X9_42 2 +# endif + + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/dherr.h b/src/Mayaqua/win32_inc/openssl/dherr.h new file mode 100644 index 00000000..916b3bed --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/dherr.h @@ -0,0 +1,88 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DHERR_H +# define HEADER_DHERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_DH + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_DH_strings(void); + +/* + * DH function codes. + */ +# define DH_F_COMPUTE_KEY 102 +# define DH_F_DHPARAMS_PRINT_FP 101 +# define DH_F_DH_BUILTIN_GENPARAMS 106 +# define DH_F_DH_CHECK_EX 121 +# define DH_F_DH_CHECK_PARAMS_EX 122 +# define DH_F_DH_CHECK_PUB_KEY_EX 123 +# define DH_F_DH_CMS_DECRYPT 114 +# define DH_F_DH_CMS_SET_PEERKEY 115 +# define DH_F_DH_CMS_SET_SHARED_INFO 116 +# define DH_F_DH_METH_DUP 117 +# define DH_F_DH_METH_NEW 118 +# define DH_F_DH_METH_SET1_NAME 119 +# define DH_F_DH_NEW_BY_NID 104 +# define DH_F_DH_NEW_METHOD 105 +# define DH_F_DH_PARAM_DECODE 107 +# define DH_F_DH_PKEY_PUBLIC_CHECK 124 +# define DH_F_DH_PRIV_DECODE 110 +# define DH_F_DH_PRIV_ENCODE 111 +# define DH_F_DH_PUB_DECODE 108 +# define DH_F_DH_PUB_ENCODE 109 +# define DH_F_DO_DH_PRINT 100 +# define DH_F_GENERATE_KEY 103 +# define DH_F_PKEY_DH_CTRL_STR 120 +# define DH_F_PKEY_DH_DERIVE 112 +# define DH_F_PKEY_DH_INIT 125 +# define DH_F_PKEY_DH_KEYGEN 113 + +/* + * DH reason codes. + */ +# define DH_R_BAD_GENERATOR 101 +# define DH_R_BN_DECODE_ERROR 109 +# define DH_R_BN_ERROR 106 +# define DH_R_CHECK_INVALID_J_VALUE 115 +# define DH_R_CHECK_INVALID_Q_VALUE 116 +# define DH_R_CHECK_PUBKEY_INVALID 122 +# define DH_R_CHECK_PUBKEY_TOO_LARGE 123 +# define DH_R_CHECK_PUBKEY_TOO_SMALL 124 +# define DH_R_CHECK_P_NOT_PRIME 117 +# define DH_R_CHECK_P_NOT_SAFE_PRIME 118 +# define DH_R_CHECK_Q_NOT_PRIME 119 +# define DH_R_DECODE_ERROR 104 +# define DH_R_INVALID_PARAMETER_NAME 110 +# define DH_R_INVALID_PARAMETER_NID 114 +# define DH_R_INVALID_PUBKEY 102 +# define DH_R_KDF_PARAMETER_ERROR 112 +# define DH_R_KEYS_NOT_SET 108 +# define DH_R_MISSING_PUBKEY 125 +# define DH_R_MODULUS_TOO_LARGE 103 +# define DH_R_NOT_SUITABLE_GENERATOR 120 +# define DH_R_NO_PARAMETERS_SET 107 +# define DH_R_NO_PRIVATE_VALUE 100 +# define DH_R_PARAMETER_ENCODING_ERROR 105 +# define DH_R_PEER_KEY_ERROR 111 +# define DH_R_SHARED_INFO_ERROR 113 +# define DH_R_UNABLE_TO_CHECK_GENERATOR 121 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/dsa.h b/src/Mayaqua/win32_inc/openssl/dsa.h index 5f1dade6..822eff34 100644 --- a/src/Mayaqua/win32_inc/openssl/dsa.h +++ b/src/Mayaqua/win32_inc/openssl/dsa.h @@ -1,332 +1,238 @@ -/* crypto/dsa/dsa.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* - * The DSS routines are based on patches supplied by - * Steven Schoch . He basically did the - * work and I have just tweaked them a little to fit into my - * stylistic vision for SSLeay :-) */ - -#ifndef HEADER_DSA_H -# define HEADER_DSA_H - -# include - -# ifdef OPENSSL_NO_DSA -# error DSA is disabled. -# endif - -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# include - -# ifndef OPENSSL_NO_DEPRECATED -# include -# ifndef OPENSSL_NO_DH -# include -# endif -# endif - -# ifndef OPENSSL_DSA_MAX_MODULUS_BITS -# define OPENSSL_DSA_MAX_MODULUS_BITS 10000 -# endif - -# define DSA_FLAG_CACHE_MONT_P 0x01 -/* - * new with 0.9.7h; the built-in DSA implementation now uses constant time - * modular exponentiation for secret exponents by default. This flag causes - * the faster variable sliding window method to be used for all exponents. - */ -# define DSA_FLAG_NO_EXP_CONSTTIME 0x02 - -/* - * If this flag is set the DSA method is FIPS compliant and can be used in - * FIPS mode. This is set in the validated module method. If an application - * sets this flag in its own methods it is its reposibility to ensure the - * result is compliant. - */ - -# define DSA_FLAG_FIPS_METHOD 0x0400 - -/* - * If this flag is set the operations normally disabled in FIPS mode are - * permitted it is then the applications responsibility to ensure that the - * usage is compliant. - */ - -# define DSA_FLAG_NON_FIPS_ALLOW 0x0400 - -#ifdef __cplusplus -extern "C" { -#endif - -/* Already defined in ossl_typ.h */ -/* typedef struct dsa_st DSA; */ -/* typedef struct dsa_method DSA_METHOD; */ - -typedef struct DSA_SIG_st { - BIGNUM *r; - BIGNUM *s; -} DSA_SIG; - -struct dsa_method { - const char *name; - DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa); - int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, - BIGNUM **rp); - int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len, - DSA_SIG *sig, DSA *dsa); - int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, - BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *in_mont); - /* Can be null */ - int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - int (*init) (DSA *dsa); - int (*finish) (DSA *dsa); - int flags; - char *app_data; - /* If this is non-NULL, it is used to generate DSA parameters */ - int (*dsa_paramgen) (DSA *dsa, int bits, - const unsigned char *seed, int seed_len, - int *counter_ret, unsigned long *h_ret, - BN_GENCB *cb); - /* If this is non-NULL, it is used to generate DSA keys */ - int (*dsa_keygen) (DSA *dsa); -}; - -struct dsa_st { - /* - * This first variable is used to pick up errors where a DSA is passed - * instead of of a EVP_PKEY - */ - int pad; - long version; - int write_params; - BIGNUM *p; - BIGNUM *q; /* == 20 */ - BIGNUM *g; - BIGNUM *pub_key; /* y public key */ - BIGNUM *priv_key; /* x private key */ - BIGNUM *kinv; /* Signing pre-calc */ - BIGNUM *r; /* Signing pre-calc */ - int flags; - /* Normally used to cache montgomery values */ - BN_MONT_CTX *method_mont_p; - int references; - CRYPTO_EX_DATA ex_data; - const DSA_METHOD *meth; - /* functional reference if 'meth' is ENGINE-provided */ - ENGINE *engine; -}; - -# define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ - (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x)) -# define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \ - (unsigned char *)(x)) -# define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x) -# define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x) - -DSA *DSAparams_dup(DSA *x); -DSA_SIG *DSA_SIG_new(void); -void DSA_SIG_free(DSA_SIG *a); -int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); -DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length); - -DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); -int DSA_do_verify(const unsigned char *dgst, int dgst_len, - DSA_SIG *sig, DSA *dsa); - -const DSA_METHOD *DSA_OpenSSL(void); - -void DSA_set_default_method(const DSA_METHOD *); -const DSA_METHOD *DSA_get_default_method(void); -int DSA_set_method(DSA *dsa, const DSA_METHOD *); - -DSA *DSA_new(void); -DSA *DSA_new_method(ENGINE *engine); -void DSA_free(DSA *r); -/* "up" the DSA object's reference count */ -int DSA_up_ref(DSA *r); -int DSA_size(const DSA *); - /* next 4 return -1 on error */ -int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); -int DSA_sign(int type, const unsigned char *dgst, int dlen, - unsigned char *sig, unsigned int *siglen, DSA *dsa); -int DSA_verify(int type, const unsigned char *dgst, int dgst_len, - const unsigned char *sigbuf, int siglen, DSA *dsa); -int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int DSA_set_ex_data(DSA *d, int idx, void *arg); -void *DSA_get_ex_data(DSA *d, int idx); - -DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length); -DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length); -DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length); - -/* Deprecated version */ -# ifndef OPENSSL_NO_DEPRECATED -DSA *DSA_generate_parameters(int bits, - unsigned char *seed, int seed_len, - int *counter_ret, unsigned long *h_ret, void - (*callback) (int, int, void *), void *cb_arg); -# endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* New version */ -int DSA_generate_parameters_ex(DSA *dsa, int bits, - const unsigned char *seed, int seed_len, - int *counter_ret, unsigned long *h_ret, - BN_GENCB *cb); - -int DSA_generate_key(DSA *a); -int i2d_DSAPublicKey(const DSA *a, unsigned char **pp); -int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); -int i2d_DSAparams(const DSA *a, unsigned char **pp); - -# ifndef OPENSSL_NO_BIO -int DSAparams_print(BIO *bp, const DSA *x); -int DSA_print(BIO *bp, const DSA *x, int off); -# endif -# ifndef OPENSSL_NO_FP_API -int DSAparams_print_fp(FILE *fp, const DSA *x); -int DSA_print_fp(FILE *bp, const DSA *x, int off); -# endif - -# define DSS_prime_checks 50 -/* - * Primality test according to FIPS PUB 186[-1], Appendix 2.1: 50 rounds of - * Rabin-Miller - */ -# define DSA_is_prime(n, callback, cb_arg) \ - BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) - -# ifndef OPENSSL_NO_DH -/* - * Convert DSA structure (key or just parameters) into DH structure (be - * careful to avoid small subgroup attacks when using this!) - */ -DH *DSA_dup_DH(const DSA *r); -# endif - -# define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ - EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL) - -# define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1) -# define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) -# define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_DSA_strings(void); - -/* Error codes for the DSA functions. */ - -/* Function codes. */ -# define DSA_F_D2I_DSA_SIG 110 -# define DSA_F_DO_DSA_PRINT 104 -# define DSA_F_DSAPARAMS_PRINT 100 -# define DSA_F_DSAPARAMS_PRINT_FP 101 -# define DSA_F_DSA_BUILTIN_PARAMGEN2 126 -# define DSA_F_DSA_DO_SIGN 112 -# define DSA_F_DSA_DO_VERIFY 113 -# define DSA_F_DSA_GENERATE_KEY 124 -# define DSA_F_DSA_GENERATE_PARAMETERS_EX 123 -# define DSA_F_DSA_NEW_METHOD 103 -# define DSA_F_DSA_PARAM_DECODE 119 -# define DSA_F_DSA_PRINT_FP 105 -# define DSA_F_DSA_PRIV_DECODE 115 -# define DSA_F_DSA_PRIV_ENCODE 116 -# define DSA_F_DSA_PUB_DECODE 117 -# define DSA_F_DSA_PUB_ENCODE 118 -# define DSA_F_DSA_SIGN 106 -# define DSA_F_DSA_SIGN_SETUP 107 -# define DSA_F_DSA_SIG_NEW 109 -# define DSA_F_DSA_SIG_PRINT 125 -# define DSA_F_DSA_VERIFY 108 -# define DSA_F_I2D_DSA_SIG 111 -# define DSA_F_OLD_DSA_PRIV_DECODE 122 -# define DSA_F_PKEY_DSA_CTRL 120 -# define DSA_F_PKEY_DSA_KEYGEN 121 -# define DSA_F_SIG_CB 114 - -/* Reason codes. */ -# define DSA_R_BAD_Q_VALUE 102 -# define DSA_R_BN_DECODE_ERROR 108 -# define DSA_R_BN_ERROR 109 -# define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100 -# define DSA_R_DECODE_ERROR 104 -# define DSA_R_INVALID_DIGEST_TYPE 106 -# define DSA_R_INVALID_PARAMETERS 112 -# define DSA_R_MISSING_PARAMETERS 101 -# define DSA_R_MODULUS_TOO_LARGE 103 -# define DSA_R_NEED_NEW_SETUP_VALUES 110 -# define DSA_R_NON_FIPS_DSA_METHOD 111 -# define DSA_R_NO_PARAMETERS_SET 107 -# define DSA_R_PARAMETER_ENCODING_ERROR 105 -# define DSA_R_Q_NOT_PRIME 113 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DSA_H +# define HEADER_DSA_H + +# include + +# ifndef OPENSSL_NO_DSA +# ifdef __cplusplus +extern "C" { +# endif +# include +# include +# include +# include +# include +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif +# include + +# ifndef OPENSSL_DSA_MAX_MODULUS_BITS +# define OPENSSL_DSA_MAX_MODULUS_BITS 10000 +# endif + +# define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024 + +# define DSA_FLAG_CACHE_MONT_P 0x01 +# if OPENSSL_API_COMPAT < 0x10100000L +/* + * Does nothing. Previously this switched off constant time behaviour. + */ +# define DSA_FLAG_NO_EXP_CONSTTIME 0x00 +# endif + +/* + * If this flag is set the DSA method is FIPS compliant and can be used in + * FIPS mode. This is set in the validated module method. If an application + * sets this flag in its own methods it is its responsibility to ensure the + * result is compliant. + */ + +# define DSA_FLAG_FIPS_METHOD 0x0400 + +/* + * If this flag is set the operations normally disabled in FIPS mode are + * permitted it is then the applications responsibility to ensure that the + * usage is compliant. + */ + +# define DSA_FLAG_NON_FIPS_ALLOW 0x0400 +# define DSA_FLAG_FIPS_CHECKED 0x0800 + +/* Already defined in ossl_typ.h */ +/* typedef struct dsa_st DSA; */ +/* typedef struct dsa_method DSA_METHOD; */ + +typedef struct DSA_SIG_st DSA_SIG; + +# define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ + (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x)) +# define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \ + (unsigned char *)(x)) +# define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x) +# define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x) + +DSA *DSAparams_dup(DSA *x); +DSA_SIG *DSA_SIG_new(void); +void DSA_SIG_free(DSA_SIG *a); +int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); +DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length); +void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); +int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); + +DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); +int DSA_do_verify(const unsigned char *dgst, int dgst_len, + DSA_SIG *sig, DSA *dsa); + +const DSA_METHOD *DSA_OpenSSL(void); + +void DSA_set_default_method(const DSA_METHOD *); +const DSA_METHOD *DSA_get_default_method(void); +int DSA_set_method(DSA *dsa, const DSA_METHOD *); +const DSA_METHOD *DSA_get_method(DSA *d); + +DSA *DSA_new(void); +DSA *DSA_new_method(ENGINE *engine); +void DSA_free(DSA *r); +/* "up" the DSA object's reference count */ +int DSA_up_ref(DSA *r); +int DSA_size(const DSA *); +int DSA_bits(const DSA *d); +int DSA_security_bits(const DSA *d); + /* next 4 return -1 on error */ +DEPRECATEDIN_1_2_0(int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)) +int DSA_sign(int type, const unsigned char *dgst, int dlen, + unsigned char *sig, unsigned int *siglen, DSA *dsa); +int DSA_verify(int type, const unsigned char *dgst, int dgst_len, + const unsigned char *sigbuf, int siglen, DSA *dsa); +#define DSA_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef) +int DSA_set_ex_data(DSA *d, int idx, void *arg); +void *DSA_get_ex_data(DSA *d, int idx); + +DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length); +DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length); +DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length); + +/* Deprecated version */ +DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits, + unsigned char *seed, + int seed_len, + int *counter_ret, + unsigned long *h_ret, void + (*callback) (int, int, + void *), + void *cb_arg)) + +/* New version */ +int DSA_generate_parameters_ex(DSA *dsa, int bits, + const unsigned char *seed, int seed_len, + int *counter_ret, unsigned long *h_ret, + BN_GENCB *cb); + +int DSA_generate_key(DSA *a); +int i2d_DSAPublicKey(const DSA *a, unsigned char **pp); +int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); +int i2d_DSAparams(const DSA *a, unsigned char **pp); + +int DSAparams_print(BIO *bp, const DSA *x); +int DSA_print(BIO *bp, const DSA *x, int off); +# ifndef OPENSSL_NO_STDIO +int DSAparams_print_fp(FILE *fp, const DSA *x); +int DSA_print_fp(FILE *bp, const DSA *x, int off); +# endif + +# define DSS_prime_checks 64 +/* + * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only + * have one value here we set the number of checks to 64 which is the 128 bit + * security level that is the highest level and valid for creating a 3072 bit + * DSA key. + */ +# define DSA_is_prime(n, callback, cb_arg) \ + BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) + +# ifndef OPENSSL_NO_DH +/* + * Convert DSA structure (key or just parameters) into DH structure (be + * careful to avoid small subgroup attacks when using this!) + */ +DH *DSA_dup_DH(const DSA *r); +# endif + +# define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ + EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL) + +# define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1) +# define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) +# define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) + +void DSA_get0_pqg(const DSA *d, + const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); +int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); +void DSA_get0_key(const DSA *d, + const BIGNUM **pub_key, const BIGNUM **priv_key); +int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); +const BIGNUM *DSA_get0_p(const DSA *d); +const BIGNUM *DSA_get0_q(const DSA *d); +const BIGNUM *DSA_get0_g(const DSA *d); +const BIGNUM *DSA_get0_pub_key(const DSA *d); +const BIGNUM *DSA_get0_priv_key(const DSA *d); +void DSA_clear_flags(DSA *d, int flags); +int DSA_test_flags(const DSA *d, int flags); +void DSA_set_flags(DSA *d, int flags); +ENGINE *DSA_get0_engine(DSA *d); + +DSA_METHOD *DSA_meth_new(const char *name, int flags); +void DSA_meth_free(DSA_METHOD *dsam); +DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam); +const char *DSA_meth_get0_name(const DSA_METHOD *dsam); +int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name); +int DSA_meth_get_flags(const DSA_METHOD *dsam); +int DSA_meth_set_flags(DSA_METHOD *dsam, int flags); +void *DSA_meth_get0_app_data(const DSA_METHOD *dsam); +int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data); +DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam)) + (const unsigned char *, int, DSA *); +int DSA_meth_set_sign(DSA_METHOD *dsam, + DSA_SIG *(*sign) (const unsigned char *, int, DSA *)); +int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam)) + (DSA *, BN_CTX *, BIGNUM **, BIGNUM **); +int DSA_meth_set_sign_setup(DSA_METHOD *dsam, + int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **)); +int (*DSA_meth_get_verify(const DSA_METHOD *dsam)) + (const unsigned char *, int, DSA_SIG *, DSA *); +int DSA_meth_set_verify(DSA_METHOD *dsam, + int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *)); +int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam)) + (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, + const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *); +int DSA_meth_set_mod_exp(DSA_METHOD *dsam, + int (*mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, + const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, + BN_MONT_CTX *)); +int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam)) + (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, + BN_CTX *, BN_MONT_CTX *); +int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam, + int (*bn_mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, + const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); +int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *); +int DSA_meth_set_init(DSA_METHOD *dsam, int (*init)(DSA *)); +int (*DSA_meth_get_finish(const DSA_METHOD *dsam)) (DSA *); +int DSA_meth_set_finish(DSA_METHOD *dsam, int (*finish) (DSA *)); +int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam)) + (DSA *, int, const unsigned char *, int, int *, unsigned long *, + BN_GENCB *); +int DSA_meth_set_paramgen(DSA_METHOD *dsam, + int (*paramgen) (DSA *, int, const unsigned char *, int, int *, + unsigned long *, BN_GENCB *)); +int (*DSA_meth_get_keygen(const DSA_METHOD *dsam)) (DSA *); +int DSA_meth_set_keygen(DSA_METHOD *dsam, int (*keygen) (DSA *)); + + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/dsaerr.h b/src/Mayaqua/win32_inc/openssl/dsaerr.h new file mode 100644 index 00000000..495a1ac8 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/dsaerr.h @@ -0,0 +1,72 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DSAERR_H +# define HEADER_DSAERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_DSA + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_DSA_strings(void); + +/* + * DSA function codes. + */ +# define DSA_F_DSAPARAMS_PRINT 100 +# define DSA_F_DSAPARAMS_PRINT_FP 101 +# define DSA_F_DSA_BUILTIN_PARAMGEN 125 +# define DSA_F_DSA_BUILTIN_PARAMGEN2 126 +# define DSA_F_DSA_DO_SIGN 112 +# define DSA_F_DSA_DO_VERIFY 113 +# define DSA_F_DSA_METH_DUP 127 +# define DSA_F_DSA_METH_NEW 128 +# define DSA_F_DSA_METH_SET1_NAME 129 +# define DSA_F_DSA_NEW_METHOD 103 +# define DSA_F_DSA_PARAM_DECODE 119 +# define DSA_F_DSA_PRINT_FP 105 +# define DSA_F_DSA_PRIV_DECODE 115 +# define DSA_F_DSA_PRIV_ENCODE 116 +# define DSA_F_DSA_PUB_DECODE 117 +# define DSA_F_DSA_PUB_ENCODE 118 +# define DSA_F_DSA_SIGN 106 +# define DSA_F_DSA_SIGN_SETUP 107 +# define DSA_F_DSA_SIG_NEW 102 +# define DSA_F_OLD_DSA_PRIV_DECODE 122 +# define DSA_F_PKEY_DSA_CTRL 120 +# define DSA_F_PKEY_DSA_CTRL_STR 104 +# define DSA_F_PKEY_DSA_KEYGEN 121 + +/* + * DSA reason codes. + */ +# define DSA_R_BAD_Q_VALUE 102 +# define DSA_R_BN_DECODE_ERROR 108 +# define DSA_R_BN_ERROR 109 +# define DSA_R_DECODE_ERROR 104 +# define DSA_R_INVALID_DIGEST_TYPE 106 +# define DSA_R_INVALID_PARAMETERS 112 +# define DSA_R_MISSING_PARAMETERS 101 +# define DSA_R_MISSING_PRIVATE_KEY 111 +# define DSA_R_MODULUS_TOO_LARGE 103 +# define DSA_R_NO_PARAMETERS_SET 107 +# define DSA_R_PARAMETER_ENCODING_ERROR 105 +# define DSA_R_Q_NOT_PRIME 113 +# define DSA_R_SEED_LEN_SMALL 110 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/dso.h b/src/Mayaqua/win32_inc/openssl/dso.h deleted file mode 100644 index da6014f5..00000000 --- a/src/Mayaqua/win32_inc/openssl/dso.h +++ /dev/null @@ -1,451 +0,0 @@ -/* dso.h */ -/* - * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project - * 2000. - */ -/* ==================================================================== - * Copyright (c) 2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_DSO_H -# define HEADER_DSO_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* These values are used as commands to DSO_ctrl() */ -# define DSO_CTRL_GET_FLAGS 1 -# define DSO_CTRL_SET_FLAGS 2 -# define DSO_CTRL_OR_FLAGS 3 - -/* - * By default, DSO_load() will translate the provided filename into a form - * typical for the platform (more specifically the DSO_METHOD) using the - * dso_name_converter function of the method. Eg. win32 will transform "blah" - * into "blah.dll", and dlfcn will transform it into "libblah.so". The - * behaviour can be overriden by setting the name_converter callback in the - * DSO object (using DSO_set_name_converter()). This callback could even - * utilise the DSO_METHOD's converter too if it only wants to override - * behaviour for one or two possible DSO methods. However, the following flag - * can be set in a DSO to prevent *any* native name-translation at all - eg. - * if the caller has prompted the user for a path to a driver library so the - * filename should be interpreted as-is. - */ -# define DSO_FLAG_NO_NAME_TRANSLATION 0x01 -/* - * An extra flag to give if only the extension should be added as - * translation. This is obviously only of importance on Unix and other - * operating systems where the translation also may prefix the name with - * something, like 'lib', and ignored everywhere else. This flag is also - * ignored if DSO_FLAG_NO_NAME_TRANSLATION is used at the same time. - */ -# define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02 - -/* - * The following flag controls the translation of symbol names to upper case. - * This is currently only being implemented for OpenVMS. - */ -# define DSO_FLAG_UPCASE_SYMBOL 0x10 - -/* - * This flag loads the library with public symbols. Meaning: The exported - * symbols of this library are public to all libraries loaded after this - * library. At the moment only implemented in unix. - */ -# define DSO_FLAG_GLOBAL_SYMBOLS 0x20 - -typedef void (*DSO_FUNC_TYPE) (void); - -typedef struct dso_st DSO; - -/* - * The function prototype used for method functions (or caller-provided - * callbacks) that transform filenames. They are passed a DSO structure - * pointer (or NULL if they are to be used independantly of a DSO object) and - * a filename to transform. They should either return NULL (if there is an - * error condition) or a newly allocated string containing the transformed - * form that the caller will need to free with OPENSSL_free() when done. - */ -typedef char *(*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *); -/* - * The function prototype used for method functions (or caller-provided - * callbacks) that merge two file specifications. They are passed a DSO - * structure pointer (or NULL if they are to be used independantly of a DSO - * object) and two file specifications to merge. They should either return - * NULL (if there is an error condition) or a newly allocated string - * containing the result of merging that the caller will need to free with - * OPENSSL_free() when done. Here, merging means that bits and pieces are - * taken from each of the file specifications and added together in whatever - * fashion that is sensible for the DSO method in question. The only rule - * that really applies is that if the two specification contain pieces of the - * same type, the copy from the first string takes priority. One could see - * it as the first specification is the one given by the user and the second - * being a bunch of defaults to add on if they're missing in the first. - */ -typedef char *(*DSO_MERGER_FUNC)(DSO *, const char *, const char *); - -typedef struct dso_meth_st { - const char *name; - /* - * Loads a shared library, NB: new DSO_METHODs must ensure that a - * successful load populates the loaded_filename field, and likewise a - * successful unload OPENSSL_frees and NULLs it out. - */ - int (*dso_load) (DSO *dso); - /* Unloads a shared library */ - int (*dso_unload) (DSO *dso); - /* Binds a variable */ - void *(*dso_bind_var) (DSO *dso, const char *symname); - /* - * Binds a function - assumes a return type of DSO_FUNC_TYPE. This should - * be cast to the real function prototype by the caller. Platforms that - * don't have compatible representations for different prototypes (this - * is possible within ANSI C) are highly unlikely to have shared - * libraries at all, let alone a DSO_METHOD implemented for them. - */ - DSO_FUNC_TYPE (*dso_bind_func) (DSO *dso, const char *symname); -/* I don't think this would actually be used in any circumstances. */ -# if 0 - /* Unbinds a variable */ - int (*dso_unbind_var) (DSO *dso, char *symname, void *symptr); - /* Unbinds a function */ - int (*dso_unbind_func) (DSO *dso, char *symname, DSO_FUNC_TYPE symptr); -# endif - /* - * The generic (yuck) "ctrl()" function. NB: Negative return values - * (rather than zero) indicate errors. - */ - long (*dso_ctrl) (DSO *dso, int cmd, long larg, void *parg); - /* - * The default DSO_METHOD-specific function for converting filenames to a - * canonical native form. - */ - DSO_NAME_CONVERTER_FUNC dso_name_converter; - /* - * The default DSO_METHOD-specific function for converting filenames to a - * canonical native form. - */ - DSO_MERGER_FUNC dso_merger; - /* [De]Initialisation handlers. */ - int (*init) (DSO *dso); - int (*finish) (DSO *dso); - /* Return pathname of the module containing location */ - int (*pathbyaddr) (void *addr, char *path, int sz); - /* Perform global symbol lookup, i.e. among *all* modules */ - void *(*globallookup) (const char *symname); -} DSO_METHOD; - -/**********************************************************************/ -/* The low-level handle type used to refer to a loaded shared library */ - -struct dso_st { - DSO_METHOD *meth; - /* - * Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS doesn't use - * anything but will need to cache the filename for use in the dso_bind - * handler. All in all, let each method control its own destiny. - * "Handles" and such go in a STACK. - */ - STACK_OF(void) *meth_data; - int references; - int flags; - /* - * For use by applications etc ... use this for your bits'n'pieces, don't - * touch meth_data! - */ - CRYPTO_EX_DATA ex_data; - /* - * If this callback function pointer is set to non-NULL, then it will be - * used in DSO_load() in place of meth->dso_name_converter. NB: This - * should normally set using DSO_set_name_converter(). - */ - DSO_NAME_CONVERTER_FUNC name_converter; - /* - * If this callback function pointer is set to non-NULL, then it will be - * used in DSO_load() in place of meth->dso_merger. NB: This should - * normally set using DSO_set_merger(). - */ - DSO_MERGER_FUNC merger; - /* - * This is populated with (a copy of) the platform-independant filename - * used for this DSO. - */ - char *filename; - /* - * This is populated with (a copy of) the translated filename by which - * the DSO was actually loaded. It is NULL iff the DSO is not currently - * loaded. NB: This is here because the filename translation process may - * involve a callback being invoked more than once not only to convert to - * a platform-specific form, but also to try different filenames in the - * process of trying to perform a load. As such, this variable can be - * used to indicate (a) whether this DSO structure corresponds to a - * loaded library or not, and (b) the filename with which it was actually - * loaded. - */ - char *loaded_filename; -}; - -DSO *DSO_new(void); -DSO *DSO_new_method(DSO_METHOD *method); -int DSO_free(DSO *dso); -int DSO_flags(DSO *dso); -int DSO_up_ref(DSO *dso); -long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg); - -/* - * This function sets the DSO's name_converter callback. If it is non-NULL, - * then it will be used instead of the associated DSO_METHOD's function. If - * oldcb is non-NULL then it is set to the function pointer value being - * replaced. Return value is non-zero for success. - */ -int DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb, - DSO_NAME_CONVERTER_FUNC *oldcb); -/* - * These functions can be used to get/set the platform-independant filename - * used for a DSO. NB: set will fail if the DSO is already loaded. - */ -const char *DSO_get_filename(DSO *dso); -int DSO_set_filename(DSO *dso, const char *filename); -/* - * This function will invoke the DSO's name_converter callback to translate a - * filename, or if the callback isn't set it will instead use the DSO_METHOD's - * converter. If "filename" is NULL, the "filename" in the DSO itself will be - * used. If the DSO_FLAG_NO_NAME_TRANSLATION flag is set, then the filename is - * simply duplicated. NB: This function is usually called from within a - * DSO_METHOD during the processing of a DSO_load() call, and is exposed so - * that caller-created DSO_METHODs can do the same thing. A non-NULL return - * value will need to be OPENSSL_free()'d. - */ -char *DSO_convert_filename(DSO *dso, const char *filename); -/* - * This function will invoke the DSO's merger callback to merge two file - * specifications, or if the callback isn't set it will instead use the - * DSO_METHOD's merger. A non-NULL return value will need to be - * OPENSSL_free()'d. - */ -char *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2); -/* - * If the DSO is currently loaded, this returns the filename that it was - * loaded under, otherwise it returns NULL. So it is also useful as a test as - * to whether the DSO is currently loaded. NB: This will not necessarily - * return the same value as DSO_convert_filename(dso, dso->filename), because - * the DSO_METHOD's load function may have tried a variety of filenames (with - * and/or without the aid of the converters) before settling on the one it - * actually loaded. - */ -const char *DSO_get_loaded_filename(DSO *dso); - -void DSO_set_default_method(DSO_METHOD *meth); -DSO_METHOD *DSO_get_default_method(void); -DSO_METHOD *DSO_get_method(DSO *dso); -DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth); - -/* - * The all-singing all-dancing load function, you normally pass NULL for the - * first and third parameters. Use DSO_up and DSO_free for subsequent - * reference count handling. Any flags passed in will be set in the - * constructed DSO after its init() function but before the load operation. - * If 'dso' is non-NULL, 'flags' is ignored. - */ -DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags); - -/* This function binds to a variable inside a shared library. */ -void *DSO_bind_var(DSO *dso, const char *symname); - -/* This function binds to a function inside a shared library. */ -DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname); - -/* - * This method is the default, but will beg, borrow, or steal whatever method - * should be the default on any particular platform (including - * DSO_METH_null() if necessary). - */ -DSO_METHOD *DSO_METHOD_openssl(void); - -/* - * This method is defined for all platforms - if a platform has no DSO - * support then this will be the only method! - */ -DSO_METHOD *DSO_METHOD_null(void); - -/* - * If DSO_DLFCN is defined, the standard dlfcn.h-style functions (dlopen, - * dlclose, dlsym, etc) will be used and incorporated into this method. If - * not, this method will return NULL. - */ -DSO_METHOD *DSO_METHOD_dlfcn(void); - -/* - * If DSO_DL is defined, the standard dl.h-style functions (shl_load, - * shl_unload, shl_findsym, etc) will be used and incorporated into this - * method. If not, this method will return NULL. - */ -DSO_METHOD *DSO_METHOD_dl(void); - -/* If WIN32 is defined, use DLLs. If not, return NULL. */ -DSO_METHOD *DSO_METHOD_win32(void); - -/* If VMS is defined, use shared images. If not, return NULL. */ -DSO_METHOD *DSO_METHOD_vms(void); - -/* - * This function writes null-terminated pathname of DSO module containing - * 'addr' into 'sz' large caller-provided 'path' and returns the number of - * characters [including trailing zero] written to it. If 'sz' is 0 or - * negative, 'path' is ignored and required amount of charachers [including - * trailing zero] to accomodate pathname is returned. If 'addr' is NULL, then - * pathname of cryptolib itself is returned. Negative or zero return value - * denotes error. - */ -int DSO_pathbyaddr(void *addr, char *path, int sz); - -/* - * This function should be used with caution! It looks up symbols in *all* - * loaded modules and if module gets unloaded by somebody else attempt to - * dereference the pointer is doomed to have fatal consequences. Primary - * usage for this function is to probe *core* system functionality, e.g. - * check if getnameinfo(3) is available at run-time without bothering about - * OS-specific details such as libc.so.versioning or where does it actually - * reside: in libc itself or libsocket. - */ -void *DSO_global_lookup(const char *name); - -/* If BeOS is defined, use shared images. If not, return NULL. */ -DSO_METHOD *DSO_METHOD_beos(void); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_DSO_strings(void); - -/* Error codes for the DSO functions. */ - -/* Function codes. */ -# define DSO_F_BEOS_BIND_FUNC 144 -# define DSO_F_BEOS_BIND_VAR 145 -# define DSO_F_BEOS_LOAD 146 -# define DSO_F_BEOS_NAME_CONVERTER 147 -# define DSO_F_BEOS_UNLOAD 148 -# define DSO_F_DLFCN_BIND_FUNC 100 -# define DSO_F_DLFCN_BIND_VAR 101 -# define DSO_F_DLFCN_LOAD 102 -# define DSO_F_DLFCN_MERGER 130 -# define DSO_F_DLFCN_NAME_CONVERTER 123 -# define DSO_F_DLFCN_UNLOAD 103 -# define DSO_F_DL_BIND_FUNC 104 -# define DSO_F_DL_BIND_VAR 105 -# define DSO_F_DL_LOAD 106 -# define DSO_F_DL_MERGER 131 -# define DSO_F_DL_NAME_CONVERTER 124 -# define DSO_F_DL_UNLOAD 107 -# define DSO_F_DSO_BIND_FUNC 108 -# define DSO_F_DSO_BIND_VAR 109 -# define DSO_F_DSO_CONVERT_FILENAME 126 -# define DSO_F_DSO_CTRL 110 -# define DSO_F_DSO_FREE 111 -# define DSO_F_DSO_GET_FILENAME 127 -# define DSO_F_DSO_GET_LOADED_FILENAME 128 -# define DSO_F_DSO_GLOBAL_LOOKUP 139 -# define DSO_F_DSO_LOAD 112 -# define DSO_F_DSO_MERGE 132 -# define DSO_F_DSO_NEW_METHOD 113 -# define DSO_F_DSO_PATHBYADDR 140 -# define DSO_F_DSO_SET_FILENAME 129 -# define DSO_F_DSO_SET_NAME_CONVERTER 122 -# define DSO_F_DSO_UP_REF 114 -# define DSO_F_GLOBAL_LOOKUP_FUNC 138 -# define DSO_F_PATHBYADDR 137 -# define DSO_F_VMS_BIND_SYM 115 -# define DSO_F_VMS_LOAD 116 -# define DSO_F_VMS_MERGER 133 -# define DSO_F_VMS_UNLOAD 117 -# define DSO_F_WIN32_BIND_FUNC 118 -# define DSO_F_WIN32_BIND_VAR 119 -# define DSO_F_WIN32_GLOBALLOOKUP 142 -# define DSO_F_WIN32_GLOBALLOOKUP_FUNC 143 -# define DSO_F_WIN32_JOINER 135 -# define DSO_F_WIN32_LOAD 120 -# define DSO_F_WIN32_MERGER 134 -# define DSO_F_WIN32_NAME_CONVERTER 125 -# define DSO_F_WIN32_PATHBYADDR 141 -# define DSO_F_WIN32_SPLITTER 136 -# define DSO_F_WIN32_UNLOAD 121 - -/* Reason codes. */ -# define DSO_R_CTRL_FAILED 100 -# define DSO_R_DSO_ALREADY_LOADED 110 -# define DSO_R_EMPTY_FILE_STRUCTURE 113 -# define DSO_R_FAILURE 114 -# define DSO_R_FILENAME_TOO_BIG 101 -# define DSO_R_FINISH_FAILED 102 -# define DSO_R_INCORRECT_FILE_SYNTAX 115 -# define DSO_R_LOAD_FAILED 103 -# define DSO_R_NAME_TRANSLATION_FAILED 109 -# define DSO_R_NO_FILENAME 111 -# define DSO_R_NO_FILE_SPECIFICATION 116 -# define DSO_R_NULL_HANDLE 104 -# define DSO_R_SET_FILENAME_FAILED 112 -# define DSO_R_STACK_ERROR 105 -# define DSO_R_SYM_FAILURE 106 -# define DSO_R_UNLOAD_FAILED 107 -# define DSO_R_UNSUPPORTED 108 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/Mayaqua/win32_inc/openssl/dtls1.h b/src/Mayaqua/win32_inc/openssl/dtls1.h index 20b33483..a312e386 100644 --- a/src/Mayaqua/win32_inc/openssl/dtls1.h +++ b/src/Mayaqua/win32_inc/openssl/dtls1.h @@ -1,272 +1,55 @@ -/* ssl/dtls1.h */ -/* - * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. - */ -/* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_DTLS1_H -# define HEADER_DTLS1_H - -# include -# include -# ifdef OPENSSL_SYS_VMS -# include -# include -# endif -# ifdef OPENSSL_SYS_WIN32 -/* Needed for struct timeval */ -# include -# elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_) -# include -# else -# if defined(OPENSSL_SYS_VXWORKS) -# include -# else -# include -# endif -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# define DTLS1_VERSION 0xFEFF -# define DTLS1_2_VERSION 0xFEFD -# define DTLS_MAX_VERSION DTLS1_2_VERSION -# define DTLS1_VERSION_MAJOR 0xFE - -# define DTLS1_BAD_VER 0x0100 - -/* Special value for method supporting multiple versions */ -# define DTLS_ANY_VERSION 0x1FFFF - -# if 0 -/* this alert description is not specified anywhere... */ -# define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110 -# endif - -/* lengths of messages */ -# define DTLS1_COOKIE_LENGTH 256 - -# define DTLS1_RT_HEADER_LENGTH 13 - -# define DTLS1_HM_HEADER_LENGTH 12 - -# define DTLS1_HM_BAD_FRAGMENT -2 -# define DTLS1_HM_FRAGMENT_RETRY -3 - -# define DTLS1_CCS_HEADER_LENGTH 1 - -# ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE -# define DTLS1_AL_HEADER_LENGTH 7 -# else -# define DTLS1_AL_HEADER_LENGTH 2 -# endif - -# ifndef OPENSSL_NO_SSL_INTERN - -# ifndef OPENSSL_NO_SCTP -# define DTLS1_SCTP_AUTH_LABEL "EXPORTER_DTLS_OVER_SCTP" -# endif - -/* Max MTU overhead we know about so far is 40 for IPv6 + 8 for UDP */ -# define DTLS1_MAX_MTU_OVERHEAD 48 - -typedef struct dtls1_bitmap_st { - unsigned long map; /* track 32 packets on 32-bit systems and 64 - * - on 64-bit systems */ - unsigned char max_seq_num[8]; /* max record number seen so far, 64-bit - * value in big-endian encoding */ -} DTLS1_BITMAP; - -struct dtls1_retransmit_state { - EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ - EVP_MD_CTX *write_hash; /* used for mac generation */ -# ifndef OPENSSL_NO_COMP - COMP_CTX *compress; /* compression */ -# else - char *compress; -# endif - SSL_SESSION *session; - unsigned short epoch; -}; - -struct hm_header_st { - unsigned char type; - unsigned long msg_len; - unsigned short seq; - unsigned long frag_off; - unsigned long frag_len; - unsigned int is_ccs; - struct dtls1_retransmit_state saved_retransmit_state; -}; - -struct ccs_header_st { - unsigned char type; - unsigned short seq; -}; - -struct dtls1_timeout_st { - /* Number of read timeouts so far */ - unsigned int read_timeouts; - /* Number of write timeouts so far */ - unsigned int write_timeouts; - /* Number of alerts received so far */ - unsigned int num_alerts; -}; - -typedef struct record_pqueue_st { - unsigned short epoch; - pqueue q; -} record_pqueue; - -typedef struct hm_fragment_st { - struct hm_header_st msg_header; - unsigned char *fragment; - unsigned char *reassembly; -} hm_fragment; - -typedef struct dtls1_state_st { - unsigned int send_cookie; - unsigned char cookie[DTLS1_COOKIE_LENGTH]; - unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH]; - unsigned int cookie_len; - /* - * The current data and handshake epoch. This is initially - * undefined, and starts at zero once the initial handshake is - * completed - */ - unsigned short r_epoch; - unsigned short w_epoch; - /* records being received in the current epoch */ - DTLS1_BITMAP bitmap; - /* renegotiation starts a new set of sequence numbers */ - DTLS1_BITMAP next_bitmap; - /* handshake message numbers */ - unsigned short handshake_write_seq; - unsigned short next_handshake_write_seq; - unsigned short handshake_read_seq; - /* save last sequence number for retransmissions */ - unsigned char last_write_sequence[8]; - /* Received handshake records (processed and unprocessed) */ - record_pqueue unprocessed_rcds; - record_pqueue processed_rcds; - /* Buffered handshake messages */ - pqueue buffered_messages; - /* Buffered (sent) handshake records */ - pqueue sent_messages; - /* - * Buffered application records. Only for records between CCS and - * Finished to prevent either protocol violation or unnecessary message - * loss. - */ - record_pqueue buffered_app_data; - /* Is set when listening for new connections with dtls1_listen() */ - unsigned int listen; - unsigned int link_mtu; /* max on-the-wire DTLS packet size */ - unsigned int mtu; /* max DTLS packet size */ - struct hm_header_st w_msg_hdr; - struct hm_header_st r_msg_hdr; - struct dtls1_timeout_st timeout; - /* - * Indicates when the last handshake msg or heartbeat sent will timeout - */ - struct timeval next_timeout; - /* Timeout duration */ - unsigned short timeout_duration; - /* - * storage for Alert/Handshake protocol data received but not yet - * processed by ssl3_read_bytes: - */ - unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH]; - unsigned int alert_fragment_len; - unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH]; - unsigned int handshake_fragment_len; - unsigned int retransmitting; - /* - * Set when the handshake is ready to process peer's ChangeCipherSpec message. - * Cleared after the message has been processed. - */ - unsigned int change_cipher_spec_ok; -# ifndef OPENSSL_NO_SCTP - /* used when SSL_ST_XX_FLUSH is entered */ - int next_state; - int shutdown_received; -# endif -} DTLS1_STATE; - -typedef struct dtls1_record_data_st { - unsigned char *packet; - unsigned int packet_length; - SSL3_BUFFER rbuf; - SSL3_RECORD rrec; -# ifndef OPENSSL_NO_SCTP - struct bio_dgram_sctp_rcvinfo recordinfo; -# endif -} DTLS1_RECORD_DATA; - -# endif - -/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */ -# define DTLS1_TMO_READ_COUNT 2 -# define DTLS1_TMO_WRITE_COUNT 2 - -# define DTLS1_TMO_ALERT_COUNT 12 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DTLS1_H +# define HEADER_DTLS1_H + +#ifdef __cplusplus +extern "C" { +#endif + +# define DTLS1_VERSION 0xFEFF +# define DTLS1_2_VERSION 0xFEFD +# define DTLS_MIN_VERSION DTLS1_VERSION +# define DTLS_MAX_VERSION DTLS1_2_VERSION +# define DTLS1_VERSION_MAJOR 0xFE + +# define DTLS1_BAD_VER 0x0100 + +/* Special value for method supporting multiple versions */ +# define DTLS_ANY_VERSION 0x1FFFF + +/* lengths of messages */ +/* + * Actually the max cookie length in DTLS is 255. But we can't change this now + * due to compatibility concerns. + */ +# define DTLS1_COOKIE_LENGTH 256 + +# define DTLS1_RT_HEADER_LENGTH 13 + +# define DTLS1_HM_HEADER_LENGTH 12 + +# define DTLS1_HM_BAD_FRAGMENT -2 +# define DTLS1_HM_FRAGMENT_RETRY -3 + +# define DTLS1_CCS_HEADER_LENGTH 1 + +# define DTLS1_AL_HEADER_LENGTH 2 + +/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */ +# define DTLS1_TMO_READ_COUNT 2 +# define DTLS1_TMO_WRITE_COUNT 2 + +# define DTLS1_TMO_ALERT_COUNT 12 + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/e_os2.h b/src/Mayaqua/win32_inc/openssl/e_os2.h index a07067b7..97a776cd 100644 --- a/src/Mayaqua/win32_inc/openssl/e_os2.h +++ b/src/Mayaqua/win32_inc/openssl/e_os2.h @@ -1,333 +1,300 @@ -/* e_os2.h */ -/* ==================================================================== - * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#include - -#ifndef HEADER_E_OS2_H -# define HEADER_E_OS2_H - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * Detect operating systems. This probably needs completing. - * The result is that at least one OPENSSL_SYS_os macro should be defined. - * However, if none is defined, Unix is assumed. - **/ - -# define OPENSSL_SYS_UNIX - -/* ---------------------- Macintosh, before MacOS X ----------------------- */ -# if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_MACINTOSH_CLASSIC -# endif - -/* ---------------------- NetWare ----------------------------------------- */ -# if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_NETWARE -# endif - -/* --------------------- Microsoft operating systems ---------------------- */ - -/* - * Note that MSDOS actually denotes 32-bit environments running on top of - * MS-DOS, such as DJGPP one. - */ -# if defined(OPENSSL_SYSNAME_MSDOS) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_MSDOS -# endif - -/* - * For 32 bit environment, there seems to be the CygWin environment and then - * all the others that try to do the same thing Microsoft does... - */ -# if defined(OPENSSL_SYSNAME_UWIN) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WIN32_UWIN -# else -# if defined(__CYGWIN__) || defined(OPENSSL_SYSNAME_CYGWIN) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WIN32_CYGWIN -# else -# if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WIN32 -# endif -# if defined(_WIN64) || defined(OPENSSL_SYSNAME_WIN64) -# undef OPENSSL_SYS_UNIX -# if !defined(OPENSSL_SYS_WIN64) -# define OPENSSL_SYS_WIN64 -# endif -# endif -# if defined(OPENSSL_SYSNAME_WINNT) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WINNT -# endif -# if defined(OPENSSL_SYSNAME_WINCE) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WINCE -# endif -# endif -# endif - -/* Anything that tries to look like Microsoft is "Windows" */ -# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN64) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_WINDOWS -# ifndef OPENSSL_SYS_MSDOS -# define OPENSSL_SYS_MSDOS -# endif -# endif - -/* - * DLL settings. This part is a bit tough, because it's up to the - * application implementor how he or she will link the application, so it - * requires some macro to be used. - */ -# ifdef OPENSSL_SYS_WINDOWS -# ifndef OPENSSL_OPT_WINDLL -# if defined(_WINDLL) /* This is used when building OpenSSL to - * indicate that DLL linkage should be used */ -# define OPENSSL_OPT_WINDLL -# endif -# endif -# endif - -/* ------------------------------- OpenVMS -------------------------------- */ -# if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_VMS -# if defined(__DECC) -# define OPENSSL_SYS_VMS_DECC -# elif defined(__DECCXX) -# define OPENSSL_SYS_VMS_DECC -# define OPENSSL_SYS_VMS_DECCXX -# else -# define OPENSSL_SYS_VMS_NODECC -# endif -# endif - -/* -------------------------------- OS/2 ---------------------------------- */ -# if defined(__EMX__) || defined(__OS2__) -# undef OPENSSL_SYS_UNIX -# define OPENSSL_SYS_OS2 -# endif - -/* -------------------------------- Unix ---------------------------------- */ -# ifdef OPENSSL_SYS_UNIX -# if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX) -# define OPENSSL_SYS_LINUX -# endif -# ifdef OPENSSL_SYSNAME_MPE -# define OPENSSL_SYS_MPE -# endif -# ifdef OPENSSL_SYSNAME_SNI -# define OPENSSL_SYS_SNI -# endif -# ifdef OPENSSL_SYSNAME_ULTRASPARC -# define OPENSSL_SYS_ULTRASPARC -# endif -# ifdef OPENSSL_SYSNAME_NEWS4 -# define OPENSSL_SYS_NEWS4 -# endif -# ifdef OPENSSL_SYSNAME_MACOSX -# define OPENSSL_SYS_MACOSX -# endif -# ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY -# define OPENSSL_SYS_MACOSX_RHAPSODY -# define OPENSSL_SYS_MACOSX -# endif -# ifdef OPENSSL_SYSNAME_SUNOS -# define OPENSSL_SYS_SUNOS -# endif -# if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY) -# define OPENSSL_SYS_CRAY -# endif -# if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX) -# define OPENSSL_SYS_AIX -# endif -# endif - -/* -------------------------------- VOS ----------------------------------- */ -# if defined(__VOS__) || defined(OPENSSL_SYSNAME_VOS) -# define OPENSSL_SYS_VOS -# ifdef __HPPA__ -# define OPENSSL_SYS_VOS_HPPA -# endif -# ifdef __IA32__ -# define OPENSSL_SYS_VOS_IA32 -# endif -# endif - -/* ------------------------------ VxWorks --------------------------------- */ -# ifdef OPENSSL_SYSNAME_VXWORKS -# define OPENSSL_SYS_VXWORKS -# endif - -/* -------------------------------- BeOS ---------------------------------- */ -# if defined(__BEOS__) -# define OPENSSL_SYS_BEOS -# include -# if defined(BONE_VERSION) -# define OPENSSL_SYS_BEOS_BONE -# else -# define OPENSSL_SYS_BEOS_R5 -# endif -# endif - -/** - * That's it for OS-specific stuff - *****************************************************************************/ - -/* Specials for I/O an exit */ -# ifdef OPENSSL_SYS_MSDOS -# define OPENSSL_UNISTD_IO -# define OPENSSL_DECLARE_EXIT extern void exit(int); -# else -# define OPENSSL_UNISTD_IO OPENSSL_UNISTD -# define OPENSSL_DECLARE_EXIT /* declared in unistd.h */ -# endif - -/*- - * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare - * certain global symbols that, with some compilers under VMS, have to be - * defined and declared explicitely with globaldef and globalref. - * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare - * DLL exports and imports for compilers under Win32. These are a little - * more complicated to use. Basically, for any library that exports some - * global variables, the following code must be present in the header file - * that declares them, before OPENSSL_EXTERN is used: - * - * #ifdef SOME_BUILD_FLAG_MACRO - * # undef OPENSSL_EXTERN - * # define OPENSSL_EXTERN OPENSSL_EXPORT - * #endif - * - * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL - * have some generally sensible values, and for OPENSSL_EXTERN to have the - * value OPENSSL_IMPORT. - */ - -# if defined(OPENSSL_SYS_VMS_NODECC) -# define OPENSSL_EXPORT globalref -# define OPENSSL_IMPORT globalref -# define OPENSSL_GLOBAL globaldef -# elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) -# define OPENSSL_EXPORT extern __declspec(dllexport) -# define OPENSSL_IMPORT extern __declspec(dllimport) -# define OPENSSL_GLOBAL -# else -# define OPENSSL_EXPORT extern -# define OPENSSL_IMPORT extern -# define OPENSSL_GLOBAL -# endif -# define OPENSSL_EXTERN OPENSSL_IMPORT - -/*- - * Macros to allow global variables to be reached through function calls when - * required (if a shared library version requires it, for example. - * The way it's done allows definitions like this: - * - * // in foobar.c - * OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0) - * // in foobar.h - * OPENSSL_DECLARE_GLOBAL(int,foobar); - * #define foobar OPENSSL_GLOBAL_REF(foobar) - */ -# ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION -# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \ - type *_shadow_##name(void) \ - { static type _hide_##name=value; return &_hide_##name; } -# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) -# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) -# else -# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value; -# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name -# define OPENSSL_GLOBAL_REF(name) _shadow_##name -# endif - -# if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE) -# define ossl_ssize_t long -# endif - -# ifdef OPENSSL_SYS_MSDOS -# define ossl_ssize_t long -# endif - -# if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS) -# define ssize_t int -# endif - -# if defined(__ultrix) && !defined(ssize_t) -# define ossl_ssize_t int -# endif - -# ifndef ossl_ssize_t -# define ossl_ssize_t ssize_t -# endif - -#ifdef __cplusplus -} -#endif -#endif - -#ifndef _MSC_VER -#undef OPENSSL_SYS_WIN32 -#undef OPENSSL_SYS_WINDOWS -#endif // _MSC_VER +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_E_OS2_H +# define HEADER_E_OS2_H + +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/****************************************************************************** + * Detect operating systems. This probably needs completing. + * The result is that at least one OPENSSL_SYS_os macro should be defined. + * However, if none is defined, Unix is assumed. + **/ + +# define OPENSSL_SYS_UNIX + +/* --------------------- Microsoft operating systems ---------------------- */ + +/* + * Note that MSDOS actually denotes 32-bit environments running on top of + * MS-DOS, such as DJGPP one. + */ +# if defined(OPENSSL_SYS_MSDOS) +# undef OPENSSL_SYS_UNIX +# endif + +/* + * For 32 bit environment, there seems to be the CygWin environment and then + * all the others that try to do the same thing Microsoft does... + */ +/* + * UEFI lives here because it might be built with a Microsoft toolchain and + * we need to avoid the false positive match on Windows. + */ +# if defined(OPENSSL_SYS_UEFI) +# undef OPENSSL_SYS_UNIX +# elif defined(OPENSSL_SYS_UWIN) +# undef OPENSSL_SYS_UNIX +# define OPENSSL_SYS_WIN32_UWIN +# else +# if defined(__CYGWIN__) || defined(OPENSSL_SYS_CYGWIN) +# define OPENSSL_SYS_WIN32_CYGWIN +# else +# if defined(_WIN32) || defined(OPENSSL_SYS_WIN32) +# undef OPENSSL_SYS_UNIX +# if !defined(OPENSSL_SYS_WIN32) +# define OPENSSL_SYS_WIN32 +# endif +# endif +# if defined(_WIN64) || defined(OPENSSL_SYS_WIN64) +# undef OPENSSL_SYS_UNIX +# if !defined(OPENSSL_SYS_WIN64) +# define OPENSSL_SYS_WIN64 +# endif +# endif +# if defined(OPENSSL_SYS_WINNT) +# undef OPENSSL_SYS_UNIX +# endif +# if defined(OPENSSL_SYS_WINCE) +# undef OPENSSL_SYS_UNIX +# endif +# endif +# endif + +/* Anything that tries to look like Microsoft is "Windows" */ +# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN64) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) +# undef OPENSSL_SYS_UNIX +# define OPENSSL_SYS_WINDOWS +# ifndef OPENSSL_SYS_MSDOS +# define OPENSSL_SYS_MSDOS +# endif +# endif + +/* + * DLL settings. This part is a bit tough, because it's up to the + * application implementor how he or she will link the application, so it + * requires some macro to be used. + */ +# ifdef OPENSSL_SYS_WINDOWS +# ifndef OPENSSL_OPT_WINDLL +# if defined(_WINDLL) /* This is used when building OpenSSL to + * indicate that DLL linkage should be used */ +# define OPENSSL_OPT_WINDLL +# endif +# endif +# endif + +/* ------------------------------- OpenVMS -------------------------------- */ +# if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYS_VMS) +# if !defined(OPENSSL_SYS_VMS) +# undef OPENSSL_SYS_UNIX +# endif +# define OPENSSL_SYS_VMS +# if defined(__DECC) +# define OPENSSL_SYS_VMS_DECC +# elif defined(__DECCXX) +# define OPENSSL_SYS_VMS_DECC +# define OPENSSL_SYS_VMS_DECCXX +# else +# define OPENSSL_SYS_VMS_NODECC +# endif +# endif + +/* -------------------------------- Unix ---------------------------------- */ +# ifdef OPENSSL_SYS_UNIX +# if defined(linux) || defined(__linux__) && !defined(OPENSSL_SYS_LINUX) +# define OPENSSL_SYS_LINUX +# endif +# if defined(_AIX) && !defined(OPENSSL_SYS_AIX) +# define OPENSSL_SYS_AIX +# endif +# endif + +/* -------------------------------- VOS ----------------------------------- */ +# if defined(__VOS__) && !defined(OPENSSL_SYS_VOS) +# define OPENSSL_SYS_VOS +# ifdef __HPPA__ +# define OPENSSL_SYS_VOS_HPPA +# endif +# ifdef __IA32__ +# define OPENSSL_SYS_VOS_IA32 +# endif +# endif + +/** + * That's it for OS-specific stuff + *****************************************************************************/ + +/* Specials for I/O an exit */ +# ifdef OPENSSL_SYS_MSDOS +# define OPENSSL_UNISTD_IO +# define OPENSSL_DECLARE_EXIT extern void exit(int); +# else +# define OPENSSL_UNISTD_IO OPENSSL_UNISTD +# define OPENSSL_DECLARE_EXIT /* declared in unistd.h */ +# endif + +/*- + * OPENSSL_EXTERN is normally used to declare a symbol with possible extra + * attributes to handle its presence in a shared library. + * OPENSSL_EXPORT is used to define a symbol with extra possible attributes + * to make it visible in a shared library. + * Care needs to be taken when a header file is used both to declare and + * define symbols. Basically, for any library that exports some global + * variables, the following code must be present in the header file that + * declares them, before OPENSSL_EXTERN is used: + * + * #ifdef SOME_BUILD_FLAG_MACRO + * # undef OPENSSL_EXTERN + * # define OPENSSL_EXTERN OPENSSL_EXPORT + * #endif + * + * The default is to have OPENSSL_EXPORT and OPENSSL_EXTERN + * have some generally sensible values. + */ + +# if defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) +# define OPENSSL_EXPORT extern __declspec(dllexport) +# define OPENSSL_EXTERN extern __declspec(dllimport) +# else +# define OPENSSL_EXPORT extern +# define OPENSSL_EXTERN extern +# endif + +/*- + * Macros to allow global variables to be reached through function calls when + * required (if a shared library version requires it, for example. + * The way it's done allows definitions like this: + * + * // in foobar.c + * OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0) + * // in foobar.h + * OPENSSL_DECLARE_GLOBAL(int,foobar); + * #define foobar OPENSSL_GLOBAL_REF(foobar) + */ +# ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION +# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \ + type *_shadow_##name(void) \ + { static type _hide_##name=value; return &_hide_##name; } +# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) +# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) +# else +# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) type _shadow_##name=value; +# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name +# define OPENSSL_GLOBAL_REF(name) _shadow_##name +# endif + +# ifdef _WIN32 +# ifdef _WIN64 +# define ossl_ssize_t __int64 +# define OSSL_SSIZE_MAX _I64_MAX +# else +# define ossl_ssize_t int +# define OSSL_SSIZE_MAX INT_MAX +# endif +# endif + +# if defined(OPENSSL_SYS_UEFI) && !defined(ossl_ssize_t) +# define ossl_ssize_t INTN +# define OSSL_SSIZE_MAX MAX_INTN +# endif + +# ifndef ossl_ssize_t +# define ossl_ssize_t ssize_t +# if defined(SSIZE_MAX) +# define OSSL_SSIZE_MAX SSIZE_MAX +# elif defined(_POSIX_SSIZE_MAX) +# define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX +# else +# define OSSL_SSIZE_MAX ((ssize_t)(SIZE_MAX>>1)) +# endif +# endif + +# ifdef DEBUG_UNUSED +# define __owur __attribute__((__warn_unused_result__)) +# else +# define __owur +# endif + +/* Standard integer types */ +# if defined(OPENSSL_SYS_UEFI) +typedef INT8 int8_t; +typedef UINT8 uint8_t; +typedef INT16 int16_t; +typedef UINT16 uint16_t; +typedef INT32 int32_t; +typedef UINT32 uint32_t; +typedef INT64 int64_t; +typedef UINT64 uint64_t; +# elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + defined(__osf__) || defined(__sgi) || defined(__hpux) || \ + defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) +# include +# elif defined(_MSC_VER) && _MSC_VER<=1500 +/* + * minimally required typdefs for systems not supporting inttypes.h or + * stdint.h: currently just older VC++ + */ +typedef signed char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned int uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +# else +# include +# endif + +/* ossl_inline: portable inline definition usable in public headers */ +# if !defined(inline) && !defined(__cplusplus) +# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L + /* just use inline */ +# define ossl_inline inline +# elif defined(__GNUC__) && __GNUC__>=2 +# define ossl_inline __inline__ +# elif defined(_MSC_VER) + /* + * Visual Studio: inline is available in C++ only, however + * __inline is available for C, see + * http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx + */ +# define ossl_inline __inline +# else +# define ossl_inline +# endif +# else +# define ossl_inline inline +# endif + +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +# define ossl_noreturn _Noreturn +# elif defined(__GNUC__) && __GNUC__ >= 2 +# define ossl_noreturn __attribute__((noreturn)) +# else +# define ossl_noreturn +# endif + +/* ossl_unused: portable unused attribute for use in public headers */ +# if defined(__GNUC__) +# define ossl_unused __attribute__((unused)) +# else +# define ossl_unused +# endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ebcdic.h b/src/Mayaqua/win32_inc/openssl/ebcdic.h index 5248ce8e..aa012855 100644 --- a/src/Mayaqua/win32_inc/openssl/ebcdic.h +++ b/src/Mayaqua/win32_inc/openssl/ebcdic.h @@ -1,26 +1,33 @@ -/* crypto/ebcdic.h */ - -#ifndef HEADER_EBCDIC_H -# define HEADER_EBCDIC_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Avoid name clashes with other applications */ -# define os_toascii _openssl_os_toascii -# define os_toebcdic _openssl_os_toebcdic -# define ebcdic2ascii _openssl_ebcdic2ascii -# define ascii2ebcdic _openssl_ascii2ebcdic - -extern const unsigned char os_toascii[256]; -extern const unsigned char os_toebcdic[256]; -void *ebcdic2ascii(void *dest, const void *srce, size_t count); -void *ascii2ebcdic(void *dest, const void *srce, size_t count); - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_EBCDIC_H +# define HEADER_EBCDIC_H + +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Avoid name clashes with other applications */ +# define os_toascii _openssl_os_toascii +# define os_toebcdic _openssl_os_toebcdic +# define ebcdic2ascii _openssl_ebcdic2ascii +# define ascii2ebcdic _openssl_ascii2ebcdic + +extern const unsigned char os_toascii[256]; +extern const unsigned char os_toebcdic[256]; +void *ebcdic2ascii(void *dest, const void *srce, size_t count); +void *ascii2ebcdic(void *dest, const void *srce, size_t count); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ec.h b/src/Mayaqua/win32_inc/openssl/ec.h index 3a634b63..5af9ebdc 100644 --- a/src/Mayaqua/win32_inc/openssl/ec.h +++ b/src/Mayaqua/win32_inc/openssl/ec.h @@ -1,1282 +1,1479 @@ -/* crypto/ec/ec.h */ -/* - * Originally written by Bodo Moeller for the OpenSSL project. - */ -/** - * \file crypto/ec/ec.h Include file for the OpenSSL EC functions - * \author Originally written by Bodo Moeller for the OpenSSL project - */ -/* ==================================================================== - * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * Portions of the attached software ("Contribution") are developed by - * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. - * - * The Contribution is licensed pursuant to the OpenSSL open source - * license provided above. - * - * The elliptic curve binary polynomial software is originally written by - * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. - * - */ - -#ifndef HEADER_EC_H -# define HEADER_EC_H - -# include - -# ifdef OPENSSL_NO_EC -# error EC is disabled. -# endif - -# include -# include -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif - -# ifdef __cplusplus -extern "C" { -# elif defined(__SUNPRO_C) -# if __SUNPRO_C >= 0x520 -# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) -# endif -# endif - -# ifndef OPENSSL_ECC_MAX_FIELD_BITS -# define OPENSSL_ECC_MAX_FIELD_BITS 661 -# endif - -/** Enum for the point conversion form as defined in X9.62 (ECDSA) - * for the encoding of a elliptic curve point (x,y) */ -typedef enum { - /** the point is encoded as z||x, where the octet z specifies - * which solution of the quadratic equation y is */ - POINT_CONVERSION_COMPRESSED = 2, - /** the point is encoded as z||x||y, where z is the octet 0x04 */ - POINT_CONVERSION_UNCOMPRESSED = 4, - /** the point is encoded as z||x||y, where the octet z specifies - * which solution of the quadratic equation y is */ - POINT_CONVERSION_HYBRID = 6 -} point_conversion_form_t; - -typedef struct ec_method_st EC_METHOD; - -typedef struct ec_group_st - /*- - EC_METHOD *meth; - -- field definition - -- curve coefficients - -- optional generator with associated information (order, cofactor) - -- optional extra data (precomputed table for fast computation of multiples of generator) - -- ASN1 stuff - */ - EC_GROUP; - -typedef struct ec_point_st EC_POINT; - -/********************************************************************/ -/* EC_METHODs for curves over GF(p) */ -/********************************************************************/ - -/** Returns the basic GFp ec methods which provides the basis for the - * optimized methods. - * \return EC_METHOD object - */ -const EC_METHOD *EC_GFp_simple_method(void); - -/** Returns GFp methods using montgomery multiplication. - * \return EC_METHOD object - */ -const EC_METHOD *EC_GFp_mont_method(void); - -/** Returns GFp methods using optimized methods for NIST recommended curves - * \return EC_METHOD object - */ -const EC_METHOD *EC_GFp_nist_method(void); - -# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 -/** Returns 64-bit optimized methods for nistp224 - * \return EC_METHOD object - */ -const EC_METHOD *EC_GFp_nistp224_method(void); - -/** Returns 64-bit optimized methods for nistp256 - * \return EC_METHOD object - */ -const EC_METHOD *EC_GFp_nistp256_method(void); - -/** Returns 64-bit optimized methods for nistp521 - * \return EC_METHOD object - */ -const EC_METHOD *EC_GFp_nistp521_method(void); -# endif - -# ifndef OPENSSL_NO_EC2M -/********************************************************************/ -/* EC_METHOD for curves over GF(2^m) */ -/********************************************************************/ - -/** Returns the basic GF2m ec method - * \return EC_METHOD object - */ -const EC_METHOD *EC_GF2m_simple_method(void); - -# endif - -/********************************************************************/ -/* EC_GROUP functions */ -/********************************************************************/ - -/** Creates a new EC_GROUP object - * \param meth EC_METHOD to use - * \return newly created EC_GROUP object or NULL in case of an error. - */ -EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); - -/** Frees a EC_GROUP object - * \param group EC_GROUP object to be freed. - */ -void EC_GROUP_free(EC_GROUP *group); - -/** Clears and frees a EC_GROUP object - * \param group EC_GROUP object to be cleared and freed. - */ -void EC_GROUP_clear_free(EC_GROUP *group); - -/** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD. - * \param dst destination EC_GROUP object - * \param src source EC_GROUP object - * \return 1 on success and 0 if an error occurred. - */ -int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); - -/** Creates a new EC_GROUP object and copies the copies the content - * form src to the newly created EC_KEY object - * \param src source EC_GROUP object - * \return newly created EC_GROUP object or NULL in case of an error. - */ -EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); - -/** Returns the EC_METHOD of the EC_GROUP object. - * \param group EC_GROUP object - * \return EC_METHOD used in this EC_GROUP object. - */ -const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group); - -/** Returns the field type of the EC_METHOD. - * \param meth EC_METHOD object - * \return NID of the underlying field type OID. - */ -int EC_METHOD_get_field_type(const EC_METHOD *meth); - -/** Sets the generator and it's order/cofactor of a EC_GROUP object. - * \param group EC_GROUP object - * \param generator EC_POINT object with the generator. - * \param order the order of the group generated by the generator. - * \param cofactor the index of the sub-group generated by the generator - * in the group of all points on the elliptic curve. - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, - const BIGNUM *order, const BIGNUM *cofactor); - -/** Returns the generator of a EC_GROUP object. - * \param group EC_GROUP object - * \return the currently used generator (possibly NULL). - */ -const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group); - -/** Returns the montgomery data for order(Generator) - * \param group EC_GROUP object - * \return the currently used generator (possibly NULL). -*/ -BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group); - -/** Gets the order of a EC_GROUP - * \param group EC_GROUP object - * \param order BIGNUM to which the order is copied - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx); - -/** Gets the cofactor of a EC_GROUP - * \param group EC_GROUP object - * \param cofactor BIGNUM to which the cofactor is copied - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, - BN_CTX *ctx); - -/** Sets the name of a EC_GROUP object - * \param group EC_GROUP object - * \param nid NID of the curve name OID - */ -void EC_GROUP_set_curve_name(EC_GROUP *group, int nid); - -/** Returns the curve name of a EC_GROUP object - * \param group EC_GROUP object - * \return NID of the curve name OID or 0 if not set. - */ -int EC_GROUP_get_curve_name(const EC_GROUP *group); - -void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag); -int EC_GROUP_get_asn1_flag(const EC_GROUP *group); - -void EC_GROUP_set_point_conversion_form(EC_GROUP *group, - point_conversion_form_t form); -point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *); - -unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x); -size_t EC_GROUP_get_seed_len(const EC_GROUP *); -size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); - -/** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b - * \param group EC_GROUP object - * \param p BIGNUM with the prime number - * \param a BIGNUM with parameter a of the equation - * \param b BIGNUM with parameter b of the equation - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, - const BIGNUM *b, BN_CTX *ctx); - -/** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b - * \param group EC_GROUP object - * \param p BIGNUM for the prime number - * \param a BIGNUM for parameter a of the equation - * \param b BIGNUM for parameter b of the equation - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, - BIGNUM *b, BN_CTX *ctx); - -# ifndef OPENSSL_NO_EC2M -/** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b - * \param group EC_GROUP object - * \param p BIGNUM with the polynomial defining the underlying field - * \param a BIGNUM with parameter a of the equation - * \param b BIGNUM with parameter b of the equation - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, - const BIGNUM *b, BN_CTX *ctx); - -/** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b - * \param group EC_GROUP object - * \param p BIGNUM for the polynomial defining the underlying field - * \param a BIGNUM for parameter a of the equation - * \param b BIGNUM for parameter b of the equation - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, - BIGNUM *b, BN_CTX *ctx); -# endif -/** Returns the number of bits needed to represent a field element - * \param group EC_GROUP object - * \return number of bits needed to represent a field element - */ -int EC_GROUP_get_degree(const EC_GROUP *group); - -/** Checks whether the parameter in the EC_GROUP define a valid ec group - * \param group EC_GROUP object - * \param ctx BN_CTX object (optional) - * \return 1 if group is a valid ec group and 0 otherwise - */ -int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); - -/** Checks whether the discriminant of the elliptic curve is zero or not - * \param group EC_GROUP object - * \param ctx BN_CTX object (optional) - * \return 1 if the discriminant is not zero and 0 otherwise - */ -int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx); - -/** Compares two EC_GROUP objects - * \param a first EC_GROUP object - * \param b second EC_GROUP object - * \param ctx BN_CTX object (optional) - * \return 0 if both groups are equal and 1 otherwise - */ -int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx); - -/* - * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after - * choosing an appropriate EC_METHOD - */ - -/** Creates a new EC_GROUP object with the specified parameters defined - * over GFp (defined by the equation y^2 = x^3 + a*x + b) - * \param p BIGNUM with the prime number - * \param a BIGNUM with the parameter a of the equation - * \param b BIGNUM with the parameter b of the equation - * \param ctx BN_CTX object (optional) - * \return newly created EC_GROUP object with the specified parameters - */ -EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, - const BIGNUM *b, BN_CTX *ctx); -# ifndef OPENSSL_NO_EC2M -/** Creates a new EC_GROUP object with the specified parameters defined - * over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b) - * \param p BIGNUM with the polynomial defining the underlying field - * \param a BIGNUM with the parameter a of the equation - * \param b BIGNUM with the parameter b of the equation - * \param ctx BN_CTX object (optional) - * \return newly created EC_GROUP object with the specified parameters - */ -EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, - const BIGNUM *b, BN_CTX *ctx); -# endif -/** Creates a EC_GROUP object with a curve specified by a NID - * \param nid NID of the OID of the curve name - * \return newly created EC_GROUP object with specified curve or NULL - * if an error occurred - */ -EC_GROUP *EC_GROUP_new_by_curve_name(int nid); - -/********************************************************************/ -/* handling of internal curves */ -/********************************************************************/ - -typedef struct { - int nid; - const char *comment; -} EC_builtin_curve; - -/* - * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all - * available curves or zero if a error occurred. In case r ist not zero - * nitems EC_builtin_curve structures are filled with the data of the first - * nitems internal groups - */ -size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems); - -const char *EC_curve_nid2nist(int nid); -int EC_curve_nist2nid(const char *name); - -/********************************************************************/ -/* EC_POINT functions */ -/********************************************************************/ - -/** Creates a new EC_POINT object for the specified EC_GROUP - * \param group EC_GROUP the underlying EC_GROUP object - * \return newly created EC_POINT object or NULL if an error occurred - */ -EC_POINT *EC_POINT_new(const EC_GROUP *group); - -/** Frees a EC_POINT object - * \param point EC_POINT object to be freed - */ -void EC_POINT_free(EC_POINT *point); - -/** Clears and frees a EC_POINT object - * \param point EC_POINT object to be cleared and freed - */ -void EC_POINT_clear_free(EC_POINT *point); - -/** Copies EC_POINT object - * \param dst destination EC_POINT object - * \param src source EC_POINT object - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src); - -/** Creates a new EC_POINT object and copies the content of the supplied - * EC_POINT - * \param src source EC_POINT object - * \param group underlying the EC_GROUP object - * \return newly created EC_POINT object or NULL if an error occurred - */ -EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); - -/** Returns the EC_METHOD used in EC_POINT object - * \param point EC_POINT object - * \return the EC_METHOD used - */ -const EC_METHOD *EC_POINT_method_of(const EC_POINT *point); - -/** Sets a point to infinity (neutral element) - * \param group underlying EC_GROUP object - * \param point EC_POINT to set to infinity - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point); - -/** Sets the jacobian projective coordinates of a EC_POINT over GFp - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM with the x-coordinate - * \param y BIGNUM with the y-coordinate - * \param z BIGNUM with the z-coordinate - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, - EC_POINT *p, const BIGNUM *x, - const BIGNUM *y, const BIGNUM *z, - BN_CTX *ctx); - -/** Gets the jacobian projective coordinates of a EC_POINT over GFp - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM for the x-coordinate - * \param y BIGNUM for the y-coordinate - * \param z BIGNUM for the z-coordinate - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, - const EC_POINT *p, BIGNUM *x, - BIGNUM *y, BIGNUM *z, - BN_CTX *ctx); - -/** Sets the affine coordinates of a EC_POINT over GFp - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM with the x-coordinate - * \param y BIGNUM with the y-coordinate - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, - const BIGNUM *x, const BIGNUM *y, - BN_CTX *ctx); - -/** Gets the affine coordinates of a EC_POINT over GFp - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM for the x-coordinate - * \param y BIGNUM for the y-coordinate - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, - const EC_POINT *p, BIGNUM *x, - BIGNUM *y, BN_CTX *ctx); - -/** Sets the x9.62 compressed coordinates of a EC_POINT over GFp - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM with x-coordinate - * \param y_bit integer with the y-Bit (either 0 or 1) - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, - EC_POINT *p, const BIGNUM *x, - int y_bit, BN_CTX *ctx); -# ifndef OPENSSL_NO_EC2M -/** Sets the affine coordinates of a EC_POINT over GF2m - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM with the x-coordinate - * \param y BIGNUM with the y-coordinate - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p, - const BIGNUM *x, const BIGNUM *y, - BN_CTX *ctx); - -/** Gets the affine coordinates of a EC_POINT over GF2m - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM for the x-coordinate - * \param y BIGNUM for the y-coordinate - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, - const EC_POINT *p, BIGNUM *x, - BIGNUM *y, BN_CTX *ctx); - -/** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param x BIGNUM with x-coordinate - * \param y_bit integer with the y-Bit (either 0 or 1) - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, - EC_POINT *p, const BIGNUM *x, - int y_bit, BN_CTX *ctx); -# endif -/** Encodes a EC_POINT object to a octet string - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param form point conversion form - * \param buf memory buffer for the result. If NULL the function returns - * required buffer size. - * \param len length of the memory buffer - * \param ctx BN_CTX object (optional) - * \return the length of the encoded octet string or 0 if an error occurred - */ -size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p, - point_conversion_form_t form, - unsigned char *buf, size_t len, BN_CTX *ctx); - -/** Decodes a EC_POINT from a octet string - * \param group underlying EC_GROUP object - * \param p EC_POINT object - * \param buf memory buffer with the encoded ec point - * \param len length of the encoded ec point - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p, - const unsigned char *buf, size_t len, BN_CTX *ctx); - -/* other interfaces to point2oct/oct2point: */ -BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *, - point_conversion_form_t form, BIGNUM *, BN_CTX *); -EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *, - EC_POINT *, BN_CTX *); -char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *, - point_conversion_form_t form, BN_CTX *); -EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *, - EC_POINT *, BN_CTX *); - -/********************************************************************/ -/* functions for doing EC_POINT arithmetic */ -/********************************************************************/ - -/** Computes the sum of two EC_POINT - * \param group underlying EC_GROUP object - * \param r EC_POINT object for the result (r = a + b) - * \param a EC_POINT object with the first summand - * \param b EC_POINT object with the second summand - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, - const EC_POINT *b, BN_CTX *ctx); - -/** Computes the double of a EC_POINT - * \param group underlying EC_GROUP object - * \param r EC_POINT object for the result (r = 2 * a) - * \param a EC_POINT object - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, - BN_CTX *ctx); - -/** Computes the inverse of a EC_POINT - * \param group underlying EC_GROUP object - * \param a EC_POINT object to be inverted (it's used for the result as well) - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx); - -/** Checks whether the point is the neutral element of the group - * \param group the underlying EC_GROUP object - * \param p EC_POINT object - * \return 1 if the point is the neutral element and 0 otherwise - */ -int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p); - -/** Checks whether the point is on the curve - * \param group underlying EC_GROUP object - * \param point EC_POINT object to check - * \param ctx BN_CTX object (optional) - * \return 1 if point if on the curve and 0 otherwise - */ -int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, - BN_CTX *ctx); - -/** Compares two EC_POINTs - * \param group underlying EC_GROUP object - * \param a first EC_POINT object - * \param b second EC_POINT object - * \param ctx BN_CTX object (optional) - * \return 0 if both points are equal and a value != 0 otherwise - */ -int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, - BN_CTX *ctx); - -int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx); -int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, - EC_POINT *points[], BN_CTX *ctx); - -/** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i] - * \param group underlying EC_GROUP object - * \param r EC_POINT object for the result - * \param n BIGNUM with the multiplier for the group generator (optional) - * \param num number futher summands - * \param p array of size num of EC_POINT objects - * \param m array of size num of BIGNUM objects - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, - size_t num, const EC_POINT *p[], const BIGNUM *m[], - BN_CTX *ctx); - -/** Computes r = generator * n + q * m - * \param group underlying EC_GROUP object - * \param r EC_POINT object for the result - * \param n BIGNUM with the multiplier for the group generator (optional) - * \param q EC_POINT object with the first factor of the second summand - * \param m BIGNUM with the second factor of the second summand - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, - const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx); - -/** Stores multiples of generator for faster point multiplication - * \param group EC_GROUP object - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occured - */ -int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx); - -/** Reports whether a precomputation has been done - * \param group EC_GROUP object - * \return 1 if a pre-computation has been done and 0 otherwise - */ -int EC_GROUP_have_precompute_mult(const EC_GROUP *group); - -/********************************************************************/ -/* ASN1 stuff */ -/********************************************************************/ - -/* - * EC_GROUP_get_basis_type() returns the NID of the basis type used to - * represent the field elements - */ -int EC_GROUP_get_basis_type(const EC_GROUP *); -# ifndef OPENSSL_NO_EC2M -int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k); -int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, - unsigned int *k2, unsigned int *k3); -# endif - -# define OPENSSL_EC_NAMED_CURVE 0x001 - -typedef struct ecpk_parameters_st ECPKPARAMETERS; - -EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); -int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); - -# define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) -# define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) -# define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \ - (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) -# define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ - (unsigned char *)(x)) - -# ifndef OPENSSL_NO_BIO -int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); -# endif -# ifndef OPENSSL_NO_FP_API -int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); -# endif - -/********************************************************************/ -/* EC_KEY functions */ -/********************************************************************/ - -typedef struct ec_key_st EC_KEY; - -/* some values for the encoding_flag */ -# define EC_PKEY_NO_PARAMETERS 0x001 -# define EC_PKEY_NO_PUBKEY 0x002 - -/* some values for the flags field */ -# define EC_FLAG_NON_FIPS_ALLOW 0x1 -# define EC_FLAG_FIPS_CHECKED 0x2 - -/** Creates a new EC_KEY object. - * \return EC_KEY object or NULL if an error occurred. - */ -EC_KEY *EC_KEY_new(void); - -int EC_KEY_get_flags(const EC_KEY *key); - -void EC_KEY_set_flags(EC_KEY *key, int flags); - -void EC_KEY_clear_flags(EC_KEY *key, int flags); - -/** Creates a new EC_KEY object using a named curve as underlying - * EC_GROUP object. - * \param nid NID of the named curve. - * \return EC_KEY object or NULL if an error occurred. - */ -EC_KEY *EC_KEY_new_by_curve_name(int nid); - -/** Frees a EC_KEY object. - * \param key EC_KEY object to be freed. - */ -void EC_KEY_free(EC_KEY *key); - -/** Copies a EC_KEY object. - * \param dst destination EC_KEY object - * \param src src EC_KEY object - * \return dst or NULL if an error occurred. - */ -EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src); - -/** Creates a new EC_KEY object and copies the content from src to it. - * \param src the source EC_KEY object - * \return newly created EC_KEY object or NULL if an error occurred. - */ -EC_KEY *EC_KEY_dup(const EC_KEY *src); - -/** Increases the internal reference count of a EC_KEY object. - * \param key EC_KEY object - * \return 1 on success and 0 if an error occurred. - */ -int EC_KEY_up_ref(EC_KEY *key); - -/** Returns the EC_GROUP object of a EC_KEY object - * \param key EC_KEY object - * \return the EC_GROUP object (possibly NULL). - */ -const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key); - -/** Sets the EC_GROUP of a EC_KEY object. - * \param key EC_KEY object - * \param group EC_GROUP to use in the EC_KEY object (note: the EC_KEY - * object will use an own copy of the EC_GROUP). - * \return 1 on success and 0 if an error occurred. - */ -int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group); - -/** Returns the private key of a EC_KEY object. - * \param key EC_KEY object - * \return a BIGNUM with the private key (possibly NULL). - */ -const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key); - -/** Sets the private key of a EC_KEY object. - * \param key EC_KEY object - * \param prv BIGNUM with the private key (note: the EC_KEY object - * will use an own copy of the BIGNUM). - * \return 1 on success and 0 if an error occurred. - */ -int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv); - -/** Returns the public key of a EC_KEY object. - * \param key the EC_KEY object - * \return a EC_POINT object with the public key (possibly NULL) - */ -const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key); - -/** Sets the public key of a EC_KEY object. - * \param key EC_KEY object - * \param pub EC_POINT object with the public key (note: the EC_KEY object - * will use an own copy of the EC_POINT object). - * \return 1 on success and 0 if an error occurred. - */ -int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub); - -unsigned EC_KEY_get_enc_flags(const EC_KEY *key); -void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags); -point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key); -void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform); -/* functions to set/get method specific data */ -void *EC_KEY_get_key_method_data(EC_KEY *key, - void *(*dup_func) (void *), - void (*free_func) (void *), - void (*clear_free_func) (void *)); -/** Sets the key method data of an EC_KEY object, if none has yet been set. - * \param key EC_KEY object - * \param data opaque data to install. - * \param dup_func a function that duplicates |data|. - * \param free_func a function that frees |data|. - * \param clear_free_func a function that wipes and frees |data|. - * \return the previously set data pointer, or NULL if |data| was inserted. - */ -void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data, - void *(*dup_func) (void *), - void (*free_func) (void *), - void (*clear_free_func) (void *)); -/* wrapper functions for the underlying EC_GROUP object */ -void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag); - -/** Creates a table of pre-computed multiples of the generator to - * accelerate further EC_KEY operations. - * \param key EC_KEY object - * \param ctx BN_CTX object (optional) - * \return 1 on success and 0 if an error occurred. - */ -int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx); - -/** Creates a new ec private (and optional a new public) key. - * \param key EC_KEY object - * \return 1 on success and 0 if an error occurred. - */ -int EC_KEY_generate_key(EC_KEY *key); - -/** Verifies that a private and/or public key is valid. - * \param key the EC_KEY object - * \return 1 on success and 0 otherwise. - */ -int EC_KEY_check_key(const EC_KEY *key); - -/** Sets a public key from affine coordindates performing - * neccessary NIST PKV tests. - * \param key the EC_KEY object - * \param x public key x coordinate - * \param y public key y coordinate - * \return 1 on success and 0 otherwise. - */ -int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, - BIGNUM *y); - -/********************************************************************/ -/* de- and encoding functions for SEC1 ECPrivateKey */ -/********************************************************************/ - -/** Decodes a private key from a memory buffer. - * \param key a pointer to a EC_KEY object which should be used (or NULL) - * \param in pointer to memory with the DER encoded private key - * \param len length of the DER encoded private key - * \return the decoded private key or NULL if an error occurred. - */ -EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len); - -/** Encodes a private key object and stores the result in a buffer. - * \param key the EC_KEY object to encode - * \param out the buffer for the result (if NULL the function returns number - * of bytes needed). - * \return 1 on success and 0 if an error occurred. - */ -int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out); - -/********************************************************************/ -/* de- and encoding functions for EC parameters */ -/********************************************************************/ - -/** Decodes ec parameter from a memory buffer. - * \param key a pointer to a EC_KEY object which should be used (or NULL) - * \param in pointer to memory with the DER encoded ec parameters - * \param len length of the DER encoded ec parameters - * \return a EC_KEY object with the decoded parameters or NULL if an error - * occurred. - */ -EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len); - -/** Encodes ec parameter and stores the result in a buffer. - * \param key the EC_KEY object with ec paramters to encode - * \param out the buffer for the result (if NULL the function returns number - * of bytes needed). - * \return 1 on success and 0 if an error occurred. - */ -int i2d_ECParameters(EC_KEY *key, unsigned char **out); - -/********************************************************************/ -/* de- and encoding functions for EC public key */ -/* (octet string, not DER -- hence 'o2i' and 'i2o') */ -/********************************************************************/ - -/** Decodes a ec public key from a octet string. - * \param key a pointer to a EC_KEY object which should be used - * \param in memory buffer with the encoded public key - * \param len length of the encoded public key - * \return EC_KEY object with decoded public key or NULL if an error - * occurred. - */ -EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len); - -/** Encodes a ec public key in an octet string. - * \param key the EC_KEY object with the public key - * \param out the buffer for the result (if NULL the function returns number - * of bytes needed). - * \return 1 on success and 0 if an error occurred - */ -int i2o_ECPublicKey(EC_KEY *key, unsigned char **out); - -# ifndef OPENSSL_NO_BIO -/** Prints out the ec parameters on human readable form. - * \param bp BIO object to which the information is printed - * \param key EC_KEY object - * \return 1 on success and 0 if an error occurred - */ -int ECParameters_print(BIO *bp, const EC_KEY *key); - -/** Prints out the contents of a EC_KEY object - * \param bp BIO object to which the information is printed - * \param key EC_KEY object - * \param off line offset - * \return 1 on success and 0 if an error occurred - */ -int EC_KEY_print(BIO *bp, const EC_KEY *key, int off); - -# endif -# ifndef OPENSSL_NO_FP_API -/** Prints out the ec parameters on human readable form. - * \param fp file descriptor to which the information is printed - * \param key EC_KEY object - * \return 1 on success and 0 if an error occurred - */ -int ECParameters_print_fp(FILE *fp, const EC_KEY *key); - -/** Prints out the contents of a EC_KEY object - * \param fp file descriptor to which the information is printed - * \param key EC_KEY object - * \param off line offset - * \return 1 on success and 0 if an error occurred - */ -int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off); - -# endif - -# define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x) - -# ifndef __cplusplus -# if defined(__SUNPRO_C) -# if __SUNPRO_C >= 0x520 -# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) -# endif -# endif -# endif - -# define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ - EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL) - -# define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ - EVP_PKEY_CTRL_EC_PARAM_ENC, flag, NULL) - -# define EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, flag) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_ECDH_COFACTOR, flag, NULL) - -# define EVP_PKEY_CTX_get_ecdh_cofactor_mode(ctx) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_ECDH_COFACTOR, -2, NULL) - -# define EVP_PKEY_CTX_set_ecdh_kdf_type(ctx, kdf) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_KDF_TYPE, kdf, NULL) - -# define EVP_PKEY_CTX_get_ecdh_kdf_type(ctx) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_KDF_TYPE, -2, NULL) - -# define EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_KDF_MD, 0, (void *)md) - -# define EVP_PKEY_CTX_get_ecdh_kdf_md(ctx, pmd) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_EC_KDF_MD, 0, (void *)pmd) - -# define EVP_PKEY_CTX_set_ecdh_kdf_outlen(ctx, len) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_KDF_OUTLEN, len, NULL) - -# define EVP_PKEY_CTX_get_ecdh_kdf_outlen(ctx, plen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN, 0, (void *)plen) - -# define EVP_PKEY_CTX_set0_ecdh_kdf_ukm(ctx, p, plen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_EC_KDF_UKM, plen, (void *)p) - -# define EVP_PKEY_CTX_get0_ecdh_kdf_ukm(ctx, p) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ - EVP_PKEY_OP_DERIVE, \ - EVP_PKEY_CTRL_GET_EC_KDF_UKM, 0, (void *)p) - -# define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID (EVP_PKEY_ALG_CTRL + 1) -# define EVP_PKEY_CTRL_EC_PARAM_ENC (EVP_PKEY_ALG_CTRL + 2) -# define EVP_PKEY_CTRL_EC_ECDH_COFACTOR (EVP_PKEY_ALG_CTRL + 3) -# define EVP_PKEY_CTRL_EC_KDF_TYPE (EVP_PKEY_ALG_CTRL + 4) -# define EVP_PKEY_CTRL_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 5) -# define EVP_PKEY_CTRL_GET_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 6) -# define EVP_PKEY_CTRL_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 7) -# define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 8) -# define EVP_PKEY_CTRL_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 9) -# define EVP_PKEY_CTRL_GET_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 10) -/* KDF types */ -# define EVP_PKEY_ECDH_KDF_NONE 1 -# define EVP_PKEY_ECDH_KDF_X9_62 2 - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_EC_strings(void); - -/* Error codes for the EC functions. */ - -/* Function codes. */ -# define EC_F_BN_TO_FELEM 224 -# define EC_F_COMPUTE_WNAF 143 -# define EC_F_D2I_ECPARAMETERS 144 -# define EC_F_D2I_ECPKPARAMETERS 145 -# define EC_F_D2I_ECPRIVATEKEY 146 -# define EC_F_DO_EC_KEY_PRINT 221 -# define EC_F_ECDH_CMS_DECRYPT 238 -# define EC_F_ECDH_CMS_SET_SHARED_INFO 239 -# define EC_F_ECKEY_PARAM2TYPE 223 -# define EC_F_ECKEY_PARAM_DECODE 212 -# define EC_F_ECKEY_PRIV_DECODE 213 -# define EC_F_ECKEY_PRIV_ENCODE 214 -# define EC_F_ECKEY_PUB_DECODE 215 -# define EC_F_ECKEY_PUB_ENCODE 216 -# define EC_F_ECKEY_TYPE2PARAM 220 -# define EC_F_ECPARAMETERS_PRINT 147 -# define EC_F_ECPARAMETERS_PRINT_FP 148 -# define EC_F_ECPKPARAMETERS_PRINT 149 -# define EC_F_ECPKPARAMETERS_PRINT_FP 150 -# define EC_F_ECP_NISTZ256_GET_AFFINE 240 -# define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE 243 -# define EC_F_ECP_NISTZ256_POINTS_MUL 241 -# define EC_F_ECP_NISTZ256_PRE_COMP_NEW 244 -# define EC_F_ECP_NISTZ256_SET_WORDS 245 -# define EC_F_ECP_NISTZ256_WINDOWED_MUL 242 -# define EC_F_ECP_NIST_MOD_192 203 -# define EC_F_ECP_NIST_MOD_224 204 -# define EC_F_ECP_NIST_MOD_256 205 -# define EC_F_ECP_NIST_MOD_521 206 -# define EC_F_EC_ASN1_GROUP2CURVE 153 -# define EC_F_EC_ASN1_GROUP2FIELDID 154 -# define EC_F_EC_ASN1_GROUP2PARAMETERS 155 -# define EC_F_EC_ASN1_GROUP2PKPARAMETERS 156 -# define EC_F_EC_ASN1_PARAMETERS2GROUP 157 -# define EC_F_EC_ASN1_PKPARAMETERS2GROUP 158 -# define EC_F_EC_EX_DATA_SET_DATA 211 -# define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 208 -# define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 159 -# define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 195 -# define EC_F_EC_GF2M_SIMPLE_OCT2POINT 160 -# define EC_F_EC_GF2M_SIMPLE_POINT2OCT 161 -# define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162 -# define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163 -# define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 164 -# define EC_F_EC_GFP_MONT_FIELD_DECODE 133 -# define EC_F_EC_GFP_MONT_FIELD_ENCODE 134 -# define EC_F_EC_GFP_MONT_FIELD_MUL 131 -# define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 209 -# define EC_F_EC_GFP_MONT_FIELD_SQR 132 -# define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 189 -# define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP 135 -# define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE 225 -# define EC_F_EC_GFP_NISTP224_POINTS_MUL 228 -# define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 226 -# define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE 230 -# define EC_F_EC_GFP_NISTP256_POINTS_MUL 231 -# define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 232 -# define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE 233 -# define EC_F_EC_GFP_NISTP521_POINTS_MUL 234 -# define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 235 -# define EC_F_EC_GFP_NIST_FIELD_MUL 200 -# define EC_F_EC_GFP_NIST_FIELD_SQR 201 -# define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 202 -# define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 165 -# define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 166 -# define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100 -# define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101 -# define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102 -# define EC_F_EC_GFP_SIMPLE_OCT2POINT 103 -# define EC_F_EC_GFP_SIMPLE_POINT2OCT 104 -# define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137 -# define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 167 -# define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105 -# define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 168 -# define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128 -# define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 169 -# define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129 -# define EC_F_EC_GROUP_CHECK 170 -# define EC_F_EC_GROUP_CHECK_DISCRIMINANT 171 -# define EC_F_EC_GROUP_COPY 106 -# define EC_F_EC_GROUP_GET0_GENERATOR 139 -# define EC_F_EC_GROUP_GET_COFACTOR 140 -# define EC_F_EC_GROUP_GET_CURVE_GF2M 172 -# define EC_F_EC_GROUP_GET_CURVE_GFP 130 -# define EC_F_EC_GROUP_GET_DEGREE 173 -# define EC_F_EC_GROUP_GET_ORDER 141 -# define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 193 -# define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194 -# define EC_F_EC_GROUP_NEW 108 -# define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174 -# define EC_F_EC_GROUP_NEW_FROM_DATA 175 -# define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 -# define EC_F_EC_GROUP_SET_CURVE_GF2M 176 -# define EC_F_EC_GROUP_SET_CURVE_GFP 109 -# define EC_F_EC_GROUP_SET_EXTRA_DATA 110 -# define EC_F_EC_GROUP_SET_GENERATOR 111 -# define EC_F_EC_KEY_CHECK_KEY 177 -# define EC_F_EC_KEY_COPY 178 -# define EC_F_EC_KEY_GENERATE_KEY 179 -# define EC_F_EC_KEY_NEW 182 -# define EC_F_EC_KEY_PRINT 180 -# define EC_F_EC_KEY_PRINT_FP 181 -# define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229 -# define EC_F_EC_POINTS_MAKE_AFFINE 136 -# define EC_F_EC_POINT_ADD 112 -# define EC_F_EC_POINT_CMP 113 -# define EC_F_EC_POINT_COPY 114 -# define EC_F_EC_POINT_DBL 115 -# define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 183 -# define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116 -# define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117 -# define EC_F_EC_POINT_INVERT 210 -# define EC_F_EC_POINT_IS_AT_INFINITY 118 -# define EC_F_EC_POINT_IS_ON_CURVE 119 -# define EC_F_EC_POINT_MAKE_AFFINE 120 -# define EC_F_EC_POINT_MUL 184 -# define EC_F_EC_POINT_NEW 121 -# define EC_F_EC_POINT_OCT2POINT 122 -# define EC_F_EC_POINT_POINT2OCT 123 -# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185 -# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 -# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 186 -# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125 -# define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126 -# define EC_F_EC_POINT_SET_TO_INFINITY 127 -# define EC_F_EC_PRE_COMP_DUP 207 -# define EC_F_EC_PRE_COMP_NEW 196 -# define EC_F_EC_WNAF_MUL 187 -# define EC_F_EC_WNAF_PRECOMPUTE_MULT 188 -# define EC_F_I2D_ECPARAMETERS 190 -# define EC_F_I2D_ECPKPARAMETERS 191 -# define EC_F_I2D_ECPRIVATEKEY 192 -# define EC_F_I2O_ECPUBLICKEY 151 -# define EC_F_NISTP224_PRE_COMP_NEW 227 -# define EC_F_NISTP256_PRE_COMP_NEW 236 -# define EC_F_NISTP521_PRE_COMP_NEW 237 -# define EC_F_O2I_ECPUBLICKEY 152 -# define EC_F_OLD_EC_PRIV_DECODE 222 -# define EC_F_PKEY_EC_CTRL 197 -# define EC_F_PKEY_EC_CTRL_STR 198 -# define EC_F_PKEY_EC_DERIVE 217 -# define EC_F_PKEY_EC_KEYGEN 199 -# define EC_F_PKEY_EC_PARAMGEN 219 -# define EC_F_PKEY_EC_SIGN 218 - -/* Reason codes. */ -# define EC_R_ASN1_ERROR 115 -# define EC_R_ASN1_UNKNOWN_FIELD 116 -# define EC_R_BIGNUM_OUT_OF_RANGE 144 -# define EC_R_BUFFER_TOO_SMALL 100 -# define EC_R_COORDINATES_OUT_OF_RANGE 146 -# define EC_R_D2I_ECPKPARAMETERS_FAILURE 117 -# define EC_R_DECODE_ERROR 142 -# define EC_R_DISCRIMINANT_IS_ZERO 118 -# define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119 -# define EC_R_FIELD_TOO_LARGE 143 -# define EC_R_GF2M_NOT_SUPPORTED 147 -# define EC_R_GROUP2PKPARAMETERS_FAILURE 120 -# define EC_R_I2D_ECPKPARAMETERS_FAILURE 121 -# define EC_R_INCOMPATIBLE_OBJECTS 101 -# define EC_R_INVALID_ARGUMENT 112 -# define EC_R_INVALID_COMPRESSED_POINT 110 -# define EC_R_INVALID_COMPRESSION_BIT 109 -# define EC_R_INVALID_CURVE 141 -# define EC_R_INVALID_DIGEST 151 -# define EC_R_INVALID_DIGEST_TYPE 138 -# define EC_R_INVALID_ENCODING 102 -# define EC_R_INVALID_FIELD 103 -# define EC_R_INVALID_FORM 104 -# define EC_R_INVALID_GROUP_ORDER 122 -# define EC_R_INVALID_PENTANOMIAL_BASIS 132 -# define EC_R_INVALID_PRIVATE_KEY 123 -# define EC_R_INVALID_TRINOMIAL_BASIS 137 -# define EC_R_KDF_PARAMETER_ERROR 148 -# define EC_R_KEYS_NOT_SET 140 -# define EC_R_MISSING_PARAMETERS 124 -# define EC_R_MISSING_PRIVATE_KEY 125 -# define EC_R_NOT_A_NIST_PRIME 135 -# define EC_R_NOT_A_SUPPORTED_NIST_PRIME 136 -# define EC_R_NOT_IMPLEMENTED 126 -# define EC_R_NOT_INITIALIZED 111 -# define EC_R_NO_FIELD_MOD 133 -# define EC_R_NO_PARAMETERS_SET 139 -# define EC_R_PASSED_NULL_PARAMETER 134 -# define EC_R_PEER_KEY_ERROR 149 -# define EC_R_PKPARAMETERS2GROUP_FAILURE 127 -# define EC_R_POINT_AT_INFINITY 106 -# define EC_R_POINT_IS_NOT_ON_CURVE 107 -# define EC_R_SHARED_INFO_ERROR 150 -# define EC_R_SLOT_FULL 108 -# define EC_R_UNDEFINED_GENERATOR 113 -# define EC_R_UNDEFINED_ORDER 128 -# define EC_R_UNKNOWN_GROUP 129 -# define EC_R_UNKNOWN_ORDER 114 -# define EC_R_UNSUPPORTED_FIELD 131 -# define EC_R_WRONG_CURVE_PARAMETERS 145 -# define EC_R_WRONG_ORDER 130 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2002-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_EC_H +# define HEADER_EC_H + +# include + +# ifndef OPENSSL_NO_EC +# include +# include +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif +# include +# ifdef __cplusplus +extern "C" { +# endif + +# ifndef OPENSSL_ECC_MAX_FIELD_BITS +# define OPENSSL_ECC_MAX_FIELD_BITS 661 +# endif + +/** Enum for the point conversion form as defined in X9.62 (ECDSA) + * for the encoding of a elliptic curve point (x,y) */ +typedef enum { + /** the point is encoded as z||x, where the octet z specifies + * which solution of the quadratic equation y is */ + POINT_CONVERSION_COMPRESSED = 2, + /** the point is encoded as z||x||y, where z is the octet 0x04 */ + POINT_CONVERSION_UNCOMPRESSED = 4, + /** the point is encoded as z||x||y, where the octet z specifies + * which solution of the quadratic equation y is */ + POINT_CONVERSION_HYBRID = 6 +} point_conversion_form_t; + +typedef struct ec_method_st EC_METHOD; +typedef struct ec_group_st EC_GROUP; +typedef struct ec_point_st EC_POINT; +typedef struct ecpk_parameters_st ECPKPARAMETERS; +typedef struct ec_parameters_st ECPARAMETERS; + +/********************************************************************/ +/* EC_METHODs for curves over GF(p) */ +/********************************************************************/ + +/** Returns the basic GFp ec methods which provides the basis for the + * optimized methods. + * \return EC_METHOD object + */ +const EC_METHOD *EC_GFp_simple_method(void); + +/** Returns GFp methods using montgomery multiplication. + * \return EC_METHOD object + */ +const EC_METHOD *EC_GFp_mont_method(void); + +/** Returns GFp methods using optimized methods for NIST recommended curves + * \return EC_METHOD object + */ +const EC_METHOD *EC_GFp_nist_method(void); + +# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 +/** Returns 64-bit optimized methods for nistp224 + * \return EC_METHOD object + */ +const EC_METHOD *EC_GFp_nistp224_method(void); + +/** Returns 64-bit optimized methods for nistp256 + * \return EC_METHOD object + */ +const EC_METHOD *EC_GFp_nistp256_method(void); + +/** Returns 64-bit optimized methods for nistp521 + * \return EC_METHOD object + */ +const EC_METHOD *EC_GFp_nistp521_method(void); +# endif + +# ifndef OPENSSL_NO_EC2M +/********************************************************************/ +/* EC_METHOD for curves over GF(2^m) */ +/********************************************************************/ + +/** Returns the basic GF2m ec method + * \return EC_METHOD object + */ +const EC_METHOD *EC_GF2m_simple_method(void); + +# endif + +/********************************************************************/ +/* EC_GROUP functions */ +/********************************************************************/ + +/** Creates a new EC_GROUP object + * \param meth EC_METHOD to use + * \return newly created EC_GROUP object or NULL in case of an error. + */ +EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); + +/** Frees a EC_GROUP object + * \param group EC_GROUP object to be freed. + */ +void EC_GROUP_free(EC_GROUP *group); + +/** Clears and frees a EC_GROUP object + * \param group EC_GROUP object to be cleared and freed. + */ +void EC_GROUP_clear_free(EC_GROUP *group); + +/** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD. + * \param dst destination EC_GROUP object + * \param src source EC_GROUP object + * \return 1 on success and 0 if an error occurred. + */ +int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); + +/** Creates a new EC_GROUP object and copies the copies the content + * form src to the newly created EC_KEY object + * \param src source EC_GROUP object + * \return newly created EC_GROUP object or NULL in case of an error. + */ +EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); + +/** Returns the EC_METHOD of the EC_GROUP object. + * \param group EC_GROUP object + * \return EC_METHOD used in this EC_GROUP object. + */ +const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group); + +/** Returns the field type of the EC_METHOD. + * \param meth EC_METHOD object + * \return NID of the underlying field type OID. + */ +int EC_METHOD_get_field_type(const EC_METHOD *meth); + +/** Sets the generator and its order/cofactor of a EC_GROUP object. + * \param group EC_GROUP object + * \param generator EC_POINT object with the generator. + * \param order the order of the group generated by the generator. + * \param cofactor the index of the sub-group generated by the generator + * in the group of all points on the elliptic curve. + * \return 1 on success and 0 if an error occurred + */ +int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, + const BIGNUM *order, const BIGNUM *cofactor); + +/** Returns the generator of a EC_GROUP object. + * \param group EC_GROUP object + * \return the currently used generator (possibly NULL). + */ +const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group); + +/** Returns the montgomery data for order(Generator) + * \param group EC_GROUP object + * \return the currently used montgomery data (possibly NULL). +*/ +BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group); + +/** Gets the order of a EC_GROUP + * \param group EC_GROUP object + * \param order BIGNUM to which the order is copied + * \param ctx unused + * \return 1 on success and 0 if an error occurred + */ +int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx); + +/** Gets the order of an EC_GROUP + * \param group EC_GROUP object + * \return the group order + */ +const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group); + +/** Gets the number of bits of the order of an EC_GROUP + * \param group EC_GROUP object + * \return number of bits of group order. + */ +int EC_GROUP_order_bits(const EC_GROUP *group); + +/** Gets the cofactor of a EC_GROUP + * \param group EC_GROUP object + * \param cofactor BIGNUM to which the cofactor is copied + * \param ctx unused + * \return 1 on success and 0 if an error occurred + */ +int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, + BN_CTX *ctx); + +/** Gets the cofactor of an EC_GROUP + * \param group EC_GROUP object + * \return the group cofactor + */ +const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group); + +/** Sets the name of a EC_GROUP object + * \param group EC_GROUP object + * \param nid NID of the curve name OID + */ +void EC_GROUP_set_curve_name(EC_GROUP *group, int nid); + +/** Returns the curve name of a EC_GROUP object + * \param group EC_GROUP object + * \return NID of the curve name OID or 0 if not set. + */ +int EC_GROUP_get_curve_name(const EC_GROUP *group); + +void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag); +int EC_GROUP_get_asn1_flag(const EC_GROUP *group); + +void EC_GROUP_set_point_conversion_form(EC_GROUP *group, + point_conversion_form_t form); +point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *); + +unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x); +size_t EC_GROUP_get_seed_len(const EC_GROUP *); +size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); + +/** Sets the parameters of a ec curve defined by y^2 = x^3 + a*x + b (for GFp) + * or y^2 + x*y = x^3 + a*x^2 + b (for GF2m) + * \param group EC_GROUP object + * \param p BIGNUM with the prime number (GFp) or the polynomial + * defining the underlying field (GF2m) + * \param a BIGNUM with parameter a of the equation + * \param b BIGNUM with parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, + const BIGNUM *b, BN_CTX *ctx); + +/** Gets the parameters of the ec curve defined by y^2 = x^3 + a*x + b (for GFp) + * or y^2 + x*y = x^3 + a*x^2 + b (for GF2m) + * \param group EC_GROUP object + * \param p BIGNUM with the prime number (GFp) or the polynomial + * defining the underlying field (GF2m) + * \param a BIGNUM for parameter a of the equation + * \param b BIGNUM for parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, + BN_CTX *ctx); + +/** Sets the parameters of an ec curve. Synonym for EC_GROUP_set_curve + * \param group EC_GROUP object + * \param p BIGNUM with the prime number (GFp) or the polynomial + * defining the underlying field (GF2m) + * \param a BIGNUM with parameter a of the equation + * \param b BIGNUM with parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, + const BIGNUM *a, const BIGNUM *b, + BN_CTX *ctx)) + +/** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve + * \param group EC_GROUP object + * \param p BIGNUM with the prime number (GFp) or the polynomial + * defining the underlying field (GF2m) + * \param a BIGNUM for parameter a of the equation + * \param b BIGNUM for parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, + BIGNUM *a, BIGNUM *b, + BN_CTX *ctx)) + +# ifndef OPENSSL_NO_EC2M +/** Sets the parameter of an ec curve. Synonym for EC_GROUP_set_curve + * \param group EC_GROUP object + * \param p BIGNUM with the prime number (GFp) or the polynomial + * defining the underlying field (GF2m) + * \param a BIGNUM with parameter a of the equation + * \param b BIGNUM with parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, + const BIGNUM *a, const BIGNUM *b, + BN_CTX *ctx)) + +/** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve + * \param group EC_GROUP object + * \param p BIGNUM with the prime number (GFp) or the polynomial + * defining the underlying field (GF2m) + * \param a BIGNUM for parameter a of the equation + * \param b BIGNUM for parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, + BIGNUM *a, BIGNUM *b, + BN_CTX *ctx)) +# endif +/** Returns the number of bits needed to represent a field element + * \param group EC_GROUP object + * \return number of bits needed to represent a field element + */ +int EC_GROUP_get_degree(const EC_GROUP *group); + +/** Checks whether the parameter in the EC_GROUP define a valid ec group + * \param group EC_GROUP object + * \param ctx BN_CTX object (optional) + * \return 1 if group is a valid ec group and 0 otherwise + */ +int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); + +/** Checks whether the discriminant of the elliptic curve is zero or not + * \param group EC_GROUP object + * \param ctx BN_CTX object (optional) + * \return 1 if the discriminant is not zero and 0 otherwise + */ +int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx); + +/** Compares two EC_GROUP objects + * \param a first EC_GROUP object + * \param b second EC_GROUP object + * \param ctx BN_CTX object (optional) + * \return 0 if the groups are equal, 1 if not, or -1 on error + */ +int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx); + +/* + * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after + * choosing an appropriate EC_METHOD + */ + +/** Creates a new EC_GROUP object with the specified parameters defined + * over GFp (defined by the equation y^2 = x^3 + a*x + b) + * \param p BIGNUM with the prime number + * \param a BIGNUM with the parameter a of the equation + * \param b BIGNUM with the parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return newly created EC_GROUP object with the specified parameters + */ +EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, + const BIGNUM *b, BN_CTX *ctx); +# ifndef OPENSSL_NO_EC2M +/** Creates a new EC_GROUP object with the specified parameters defined + * over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b) + * \param p BIGNUM with the polynomial defining the underlying field + * \param a BIGNUM with the parameter a of the equation + * \param b BIGNUM with the parameter b of the equation + * \param ctx BN_CTX object (optional) + * \return newly created EC_GROUP object with the specified parameters + */ +EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, + const BIGNUM *b, BN_CTX *ctx); +# endif + +/** Creates a EC_GROUP object with a curve specified by a NID + * \param nid NID of the OID of the curve name + * \return newly created EC_GROUP object with specified curve or NULL + * if an error occurred + */ +EC_GROUP *EC_GROUP_new_by_curve_name(int nid); + +/** Creates a new EC_GROUP object from an ECPARAMETERS object + * \param params pointer to the ECPARAMETERS object + * \return newly created EC_GROUP object with specified curve or NULL + * if an error occurred + */ +EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params); + +/** Creates an ECPARAMETERS object for the given EC_GROUP object. + * \param group pointer to the EC_GROUP object + * \param params pointer to an existing ECPARAMETERS object or NULL + * \return pointer to the new ECPARAMETERS object or NULL + * if an error occurred. + */ +ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group, + ECPARAMETERS *params); + +/** Creates a new EC_GROUP object from an ECPKPARAMETERS object + * \param params pointer to an existing ECPKPARAMETERS object, or NULL + * \return newly created EC_GROUP object with specified curve, or NULL + * if an error occurred + */ +EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params); + +/** Creates an ECPKPARAMETERS object for the given EC_GROUP object. + * \param group pointer to the EC_GROUP object + * \param params pointer to an existing ECPKPARAMETERS object or NULL + * \return pointer to the new ECPKPARAMETERS object or NULL + * if an error occurred. + */ +ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group, + ECPKPARAMETERS *params); + +/********************************************************************/ +/* handling of internal curves */ +/********************************************************************/ + +typedef struct { + int nid; + const char *comment; +} EC_builtin_curve; + +/* + * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all + * available curves or zero if a error occurred. In case r is not zero, + * nitems EC_builtin_curve structures are filled with the data of the first + * nitems internal groups + */ +size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems); + +const char *EC_curve_nid2nist(int nid); +int EC_curve_nist2nid(const char *name); + +/********************************************************************/ +/* EC_POINT functions */ +/********************************************************************/ + +/** Creates a new EC_POINT object for the specified EC_GROUP + * \param group EC_GROUP the underlying EC_GROUP object + * \return newly created EC_POINT object or NULL if an error occurred + */ +EC_POINT *EC_POINT_new(const EC_GROUP *group); + +/** Frees a EC_POINT object + * \param point EC_POINT object to be freed + */ +void EC_POINT_free(EC_POINT *point); + +/** Clears and frees a EC_POINT object + * \param point EC_POINT object to be cleared and freed + */ +void EC_POINT_clear_free(EC_POINT *point); + +/** Copies EC_POINT object + * \param dst destination EC_POINT object + * \param src source EC_POINT object + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src); + +/** Creates a new EC_POINT object and copies the content of the supplied + * EC_POINT + * \param src source EC_POINT object + * \param group underlying the EC_GROUP object + * \return newly created EC_POINT object or NULL if an error occurred + */ +EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); + +/** Returns the EC_METHOD used in EC_POINT object + * \param point EC_POINT object + * \return the EC_METHOD used + */ +const EC_METHOD *EC_POINT_method_of(const EC_POINT *point); + +/** Sets a point to infinity (neutral element) + * \param group underlying EC_GROUP object + * \param point EC_POINT to set to infinity + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point); + +/** Sets the jacobian projective coordinates of a EC_POINT over GFp + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with the x-coordinate + * \param y BIGNUM with the y-coordinate + * \param z BIGNUM with the z-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, + EC_POINT *p, const BIGNUM *x, + const BIGNUM *y, const BIGNUM *z, + BN_CTX *ctx); + +/** Gets the jacobian projective coordinates of a EC_POINT over GFp + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM for the x-coordinate + * \param y BIGNUM for the y-coordinate + * \param z BIGNUM for the z-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, + const EC_POINT *p, BIGNUM *x, + BIGNUM *y, BIGNUM *z, + BN_CTX *ctx); + +/** Sets the affine coordinates of an EC_POINT + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with the x-coordinate + * \param y BIGNUM with the y-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p, + const BIGNUM *x, const BIGNUM *y, + BN_CTX *ctx); + +/** Gets the affine coordinates of an EC_POINT. + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM for the x-coordinate + * \param y BIGNUM for the y-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p, + BIGNUM *x, BIGNUM *y, BN_CTX *ctx); + +/** Sets the affine coordinates of an EC_POINT. A synonym of + * EC_POINT_set_affine_coordinates + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with the x-coordinate + * \param y BIGNUM with the y-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, + EC_POINT *p, + const BIGNUM *x, + const BIGNUM *y, + BN_CTX *ctx)) + +/** Gets the affine coordinates of an EC_POINT. A synonym of + * EC_POINT_get_affine_coordinates + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM for the x-coordinate + * \param y BIGNUM for the y-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, + const EC_POINT *p, + BIGNUM *x, + BIGNUM *y, + BN_CTX *ctx)) + +/** Sets the x9.62 compressed coordinates of a EC_POINT + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with x-coordinate + * \param y_bit integer with the y-Bit (either 0 or 1) + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p, + const BIGNUM *x, int y_bit, + BN_CTX *ctx); + +/** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of + * EC_POINT_set_compressed_coordinates + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with x-coordinate + * \param y_bit integer with the y-Bit (either 0 or 1) + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, + EC_POINT *p, + const BIGNUM *x, + int y_bit, + BN_CTX *ctx)) +# ifndef OPENSSL_NO_EC2M +/** Sets the affine coordinates of an EC_POINT. A synonym of + * EC_POINT_set_affine_coordinates + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with the x-coordinate + * \param y BIGNUM with the y-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, + EC_POINT *p, + const BIGNUM *x, + const BIGNUM *y, + BN_CTX *ctx)) + +/** Gets the affine coordinates of an EC_POINT. A synonym of + * EC_POINT_get_affine_coordinates + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM for the x-coordinate + * \param y BIGNUM for the y-coordinate + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, + const EC_POINT *p, + BIGNUM *x, + BIGNUM *y, + BN_CTX *ctx)) + +/** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of + * EC_POINT_set_compressed_coordinates + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param x BIGNUM with x-coordinate + * \param y_bit integer with the y-Bit (either 0 or 1) + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, + EC_POINT *p, + const BIGNUM *x, + int y_bit, + BN_CTX *ctx)) +# endif +/** Encodes a EC_POINT object to a octet string + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param form point conversion form + * \param buf memory buffer for the result. If NULL the function returns + * required buffer size. + * \param len length of the memory buffer + * \param ctx BN_CTX object (optional) + * \return the length of the encoded octet string or 0 if an error occurred + */ +size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p, + point_conversion_form_t form, + unsigned char *buf, size_t len, BN_CTX *ctx); + +/** Decodes a EC_POINT from a octet string + * \param group underlying EC_GROUP object + * \param p EC_POINT object + * \param buf memory buffer with the encoded ec point + * \param len length of the encoded ec point + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p, + const unsigned char *buf, size_t len, BN_CTX *ctx); + +/** Encodes an EC_POINT object to an allocated octet string + * \param group underlying EC_GROUP object + * \param point EC_POINT object + * \param form point conversion form + * \param pbuf returns pointer to allocated buffer + * \param ctx BN_CTX object (optional) + * \return the length of the encoded octet string or 0 if an error occurred + */ +size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point, + point_conversion_form_t form, + unsigned char **pbuf, BN_CTX *ctx); + +/* other interfaces to point2oct/oct2point: */ +BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *, + point_conversion_form_t form, BIGNUM *, BN_CTX *); +EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *, + EC_POINT *, BN_CTX *); +char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *, + point_conversion_form_t form, BN_CTX *); +EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *, + EC_POINT *, BN_CTX *); + +/********************************************************************/ +/* functions for doing EC_POINT arithmetic */ +/********************************************************************/ + +/** Computes the sum of two EC_POINT + * \param group underlying EC_GROUP object + * \param r EC_POINT object for the result (r = a + b) + * \param a EC_POINT object with the first summand + * \param b EC_POINT object with the second summand + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, + const EC_POINT *b, BN_CTX *ctx); + +/** Computes the double of a EC_POINT + * \param group underlying EC_GROUP object + * \param r EC_POINT object for the result (r = 2 * a) + * \param a EC_POINT object + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, + BN_CTX *ctx); + +/** Computes the inverse of a EC_POINT + * \param group underlying EC_GROUP object + * \param a EC_POINT object to be inverted (it's used for the result as well) + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx); + +/** Checks whether the point is the neutral element of the group + * \param group the underlying EC_GROUP object + * \param p EC_POINT object + * \return 1 if the point is the neutral element and 0 otherwise + */ +int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p); + +/** Checks whether the point is on the curve + * \param group underlying EC_GROUP object + * \param point EC_POINT object to check + * \param ctx BN_CTX object (optional) + * \return 1 if the point is on the curve, 0 if not, or -1 on error + */ +int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, + BN_CTX *ctx); + +/** Compares two EC_POINTs + * \param group underlying EC_GROUP object + * \param a first EC_POINT object + * \param b second EC_POINT object + * \param ctx BN_CTX object (optional) + * \return 1 if the points are not equal, 0 if they are, or -1 on error + */ +int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, + BN_CTX *ctx); + +int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx); +int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, + EC_POINT *points[], BN_CTX *ctx); + +/** Computes r = generator * n + sum_{i=0}^{num-1} p[i] * m[i] + * \param group underlying EC_GROUP object + * \param r EC_POINT object for the result + * \param n BIGNUM with the multiplier for the group generator (optional) + * \param num number further summands + * \param p array of size num of EC_POINT objects + * \param m array of size num of BIGNUM objects + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, + size_t num, const EC_POINT *p[], const BIGNUM *m[], + BN_CTX *ctx); + +/** Computes r = generator * n + q * m + * \param group underlying EC_GROUP object + * \param r EC_POINT object for the result + * \param n BIGNUM with the multiplier for the group generator (optional) + * \param q EC_POINT object with the first factor of the second summand + * \param m BIGNUM with the second factor of the second summand + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, + const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx); + +/** Stores multiples of generator for faster point multiplication + * \param group EC_GROUP object + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ +int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx); + +/** Reports whether a precomputation has been done + * \param group EC_GROUP object + * \return 1 if a pre-computation has been done and 0 otherwise + */ +int EC_GROUP_have_precompute_mult(const EC_GROUP *group); + +/********************************************************************/ +/* ASN1 stuff */ +/********************************************************************/ + +DECLARE_ASN1_ITEM(ECPKPARAMETERS) +DECLARE_ASN1_ALLOC_FUNCTIONS(ECPKPARAMETERS) +DECLARE_ASN1_ITEM(ECPARAMETERS) +DECLARE_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS) + +/* + * EC_GROUP_get_basis_type() returns the NID of the basis type used to + * represent the field elements + */ +int EC_GROUP_get_basis_type(const EC_GROUP *); +# ifndef OPENSSL_NO_EC2M +int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k); +int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, + unsigned int *k2, unsigned int *k3); +# endif + +# define OPENSSL_EC_EXPLICIT_CURVE 0x000 +# define OPENSSL_EC_NAMED_CURVE 0x001 + +EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); +int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); + +# define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) +# define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) +# define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \ + (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) +# define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ + (unsigned char *)(x)) + +int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); +# ifndef OPENSSL_NO_STDIO +int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); +# endif + +/********************************************************************/ +/* EC_KEY functions */ +/********************************************************************/ + +/* some values for the encoding_flag */ +# define EC_PKEY_NO_PARAMETERS 0x001 +# define EC_PKEY_NO_PUBKEY 0x002 + +/* some values for the flags field */ +# define EC_FLAG_NON_FIPS_ALLOW 0x1 +# define EC_FLAG_FIPS_CHECKED 0x2 +# define EC_FLAG_COFACTOR_ECDH 0x1000 + +/** Creates a new EC_KEY object. + * \return EC_KEY object or NULL if an error occurred. + */ +EC_KEY *EC_KEY_new(void); + +int EC_KEY_get_flags(const EC_KEY *key); + +void EC_KEY_set_flags(EC_KEY *key, int flags); + +void EC_KEY_clear_flags(EC_KEY *key, int flags); + +/** Creates a new EC_KEY object using a named curve as underlying + * EC_GROUP object. + * \param nid NID of the named curve. + * \return EC_KEY object or NULL if an error occurred. + */ +EC_KEY *EC_KEY_new_by_curve_name(int nid); + +/** Frees a EC_KEY object. + * \param key EC_KEY object to be freed. + */ +void EC_KEY_free(EC_KEY *key); + +/** Copies a EC_KEY object. + * \param dst destination EC_KEY object + * \param src src EC_KEY object + * \return dst or NULL if an error occurred. + */ +EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src); + +/** Creates a new EC_KEY object and copies the content from src to it. + * \param src the source EC_KEY object + * \return newly created EC_KEY object or NULL if an error occurred. + */ +EC_KEY *EC_KEY_dup(const EC_KEY *src); + +/** Increases the internal reference count of a EC_KEY object. + * \param key EC_KEY object + * \return 1 on success and 0 if an error occurred. + */ +int EC_KEY_up_ref(EC_KEY *key); + +/** Returns the ENGINE object of a EC_KEY object + * \param eckey EC_KEY object + * \return the ENGINE object (possibly NULL). + */ +ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey); + +/** Returns the EC_GROUP object of a EC_KEY object + * \param key EC_KEY object + * \return the EC_GROUP object (possibly NULL). + */ +const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key); + +/** Sets the EC_GROUP of a EC_KEY object. + * \param key EC_KEY object + * \param group EC_GROUP to use in the EC_KEY object (note: the EC_KEY + * object will use an own copy of the EC_GROUP). + * \return 1 on success and 0 if an error occurred. + */ +int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group); + +/** Returns the private key of a EC_KEY object. + * \param key EC_KEY object + * \return a BIGNUM with the private key (possibly NULL). + */ +const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key); + +/** Sets the private key of a EC_KEY object. + * \param key EC_KEY object + * \param prv BIGNUM with the private key (note: the EC_KEY object + * will use an own copy of the BIGNUM). + * \return 1 on success and 0 if an error occurred. + */ +int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv); + +/** Returns the public key of a EC_KEY object. + * \param key the EC_KEY object + * \return a EC_POINT object with the public key (possibly NULL) + */ +const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key); + +/** Sets the public key of a EC_KEY object. + * \param key EC_KEY object + * \param pub EC_POINT object with the public key (note: the EC_KEY object + * will use an own copy of the EC_POINT object). + * \return 1 on success and 0 if an error occurred. + */ +int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub); + +unsigned EC_KEY_get_enc_flags(const EC_KEY *key); +void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags); +point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key); +void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform); + +#define EC_KEY_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_EC_KEY, l, p, newf, dupf, freef) +int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg); +void *EC_KEY_get_ex_data(const EC_KEY *key, int idx); + +/* wrapper functions for the underlying EC_GROUP object */ +void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag); + +/** Creates a table of pre-computed multiples of the generator to + * accelerate further EC_KEY operations. + * \param key EC_KEY object + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred. + */ +int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx); + +/** Creates a new ec private (and optional a new public) key. + * \param key EC_KEY object + * \return 1 on success and 0 if an error occurred. + */ +int EC_KEY_generate_key(EC_KEY *key); + +/** Verifies that a private and/or public key is valid. + * \param key the EC_KEY object + * \return 1 on success and 0 otherwise. + */ +int EC_KEY_check_key(const EC_KEY *key); + +/** Indicates if an EC_KEY can be used for signing. + * \param eckey the EC_KEY object + * \return 1 if can can sign and 0 otherwise. + */ +int EC_KEY_can_sign(const EC_KEY *eckey); + +/** Sets a public key from affine coordinates performing + * necessary NIST PKV tests. + * \param key the EC_KEY object + * \param x public key x coordinate + * \param y public key y coordinate + * \return 1 on success and 0 otherwise. + */ +int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, + BIGNUM *y); + +/** Encodes an EC_KEY public key to an allocated octet string + * \param key key to encode + * \param form point conversion form + * \param pbuf returns pointer to allocated buffer + * \param ctx BN_CTX object (optional) + * \return the length of the encoded octet string or 0 if an error occurred + */ +size_t EC_KEY_key2buf(const EC_KEY *key, point_conversion_form_t form, + unsigned char **pbuf, BN_CTX *ctx); + +/** Decodes a EC_KEY public key from a octet string + * \param key key to decode + * \param buf memory buffer with the encoded ec point + * \param len length of the encoded ec point + * \param ctx BN_CTX object (optional) + * \return 1 on success and 0 if an error occurred + */ + +int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len, + BN_CTX *ctx); + +/** Decodes an EC_KEY private key from an octet string + * \param key key to decode + * \param buf memory buffer with the encoded private key + * \param len length of the encoded key + * \return 1 on success and 0 if an error occurred + */ + +int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf, size_t len); + +/** Encodes a EC_KEY private key to an octet string + * \param key key to encode + * \param buf memory buffer for the result. If NULL the function returns + * required buffer size. + * \param len length of the memory buffer + * \return the length of the encoded octet string or 0 if an error occurred + */ + +size_t EC_KEY_priv2oct(const EC_KEY *key, unsigned char *buf, size_t len); + +/** Encodes an EC_KEY private key to an allocated octet string + * \param eckey key to encode + * \param pbuf returns pointer to allocated buffer + * \return the length of the encoded octet string or 0 if an error occurred + */ +size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf); + +/********************************************************************/ +/* de- and encoding functions for SEC1 ECPrivateKey */ +/********************************************************************/ + +/** Decodes a private key from a memory buffer. + * \param key a pointer to a EC_KEY object which should be used (or NULL) + * \param in pointer to memory with the DER encoded private key + * \param len length of the DER encoded private key + * \return the decoded private key or NULL if an error occurred. + */ +EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len); + +/** Encodes a private key object and stores the result in a buffer. + * \param key the EC_KEY object to encode + * \param out the buffer for the result (if NULL the function returns number + * of bytes needed). + * \return 1 on success and 0 if an error occurred. + */ +int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out); + +/********************************************************************/ +/* de- and encoding functions for EC parameters */ +/********************************************************************/ + +/** Decodes ec parameter from a memory buffer. + * \param key a pointer to a EC_KEY object which should be used (or NULL) + * \param in pointer to memory with the DER encoded ec parameters + * \param len length of the DER encoded ec parameters + * \return a EC_KEY object with the decoded parameters or NULL if an error + * occurred. + */ +EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len); + +/** Encodes ec parameter and stores the result in a buffer. + * \param key the EC_KEY object with ec parameters to encode + * \param out the buffer for the result (if NULL the function returns number + * of bytes needed). + * \return 1 on success and 0 if an error occurred. + */ +int i2d_ECParameters(EC_KEY *key, unsigned char **out); + +/********************************************************************/ +/* de- and encoding functions for EC public key */ +/* (octet string, not DER -- hence 'o2i' and 'i2o') */ +/********************************************************************/ + +/** Decodes a ec public key from a octet string. + * \param key a pointer to a EC_KEY object which should be used + * \param in memory buffer with the encoded public key + * \param len length of the encoded public key + * \return EC_KEY object with decoded public key or NULL if an error + * occurred. + */ +EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len); + +/** Encodes a ec public key in an octet string. + * \param key the EC_KEY object with the public key + * \param out the buffer for the result (if NULL the function returns number + * of bytes needed). + * \return 1 on success and 0 if an error occurred + */ +int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out); + +/** Prints out the ec parameters on human readable form. + * \param bp BIO object to which the information is printed + * \param key EC_KEY object + * \return 1 on success and 0 if an error occurred + */ +int ECParameters_print(BIO *bp, const EC_KEY *key); + +/** Prints out the contents of a EC_KEY object + * \param bp BIO object to which the information is printed + * \param key EC_KEY object + * \param off line offset + * \return 1 on success and 0 if an error occurred + */ +int EC_KEY_print(BIO *bp, const EC_KEY *key, int off); + +# ifndef OPENSSL_NO_STDIO +/** Prints out the ec parameters on human readable form. + * \param fp file descriptor to which the information is printed + * \param key EC_KEY object + * \return 1 on success and 0 if an error occurred + */ +int ECParameters_print_fp(FILE *fp, const EC_KEY *key); + +/** Prints out the contents of a EC_KEY object + * \param fp file descriptor to which the information is printed + * \param key EC_KEY object + * \param off line offset + * \return 1 on success and 0 if an error occurred + */ +int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off); + +# endif + +const EC_KEY_METHOD *EC_KEY_OpenSSL(void); +const EC_KEY_METHOD *EC_KEY_get_default_method(void); +void EC_KEY_set_default_method(const EC_KEY_METHOD *meth); +const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key); +int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth); +EC_KEY *EC_KEY_new_method(ENGINE *engine); + +/** The old name for ecdh_KDF_X9_63 + * The ECDH KDF specification has been mistakingly attributed to ANSI X9.62, + * it is actually specified in ANSI X9.63. + * This identifier is retained for backwards compatibility + */ +int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, + const unsigned char *Z, size_t Zlen, + const unsigned char *sinfo, size_t sinfolen, + const EVP_MD *md); + +int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, + const EC_KEY *ecdh, + void *(*KDF) (const void *in, size_t inlen, + void *out, size_t *outlen)); + +typedef struct ECDSA_SIG_st ECDSA_SIG; + +/** Allocates and initialize a ECDSA_SIG structure + * \return pointer to a ECDSA_SIG structure or NULL if an error occurred + */ +ECDSA_SIG *ECDSA_SIG_new(void); + +/** frees a ECDSA_SIG structure + * \param sig pointer to the ECDSA_SIG structure + */ +void ECDSA_SIG_free(ECDSA_SIG *sig); + +/** DER encode content of ECDSA_SIG object (note: this function modifies *pp + * (*pp += length of the DER encoded signature)). + * \param sig pointer to the ECDSA_SIG object + * \param pp pointer to a unsigned char pointer for the output or NULL + * \return the length of the DER encoded ECDSA_SIG object or a negative value + * on error + */ +int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp); + +/** Decodes a DER encoded ECDSA signature (note: this function changes *pp + * (*pp += len)). + * \param sig pointer to ECDSA_SIG pointer (may be NULL) + * \param pp memory buffer with the DER encoded signature + * \param len length of the buffer + * \return pointer to the decoded ECDSA_SIG structure (or NULL) + */ +ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len); + +/** Accessor for r and s fields of ECDSA_SIG + * \param sig pointer to ECDSA_SIG structure + * \param pr pointer to BIGNUM pointer for r (may be NULL) + * \param ps pointer to BIGNUM pointer for s (may be NULL) + */ +void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); + +/** Accessor for r field of ECDSA_SIG + * \param sig pointer to ECDSA_SIG structure + */ +const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig); + +/** Accessor for s field of ECDSA_SIG + * \param sig pointer to ECDSA_SIG structure + */ +const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); + +/** Setter for r and s fields of ECDSA_SIG + * \param sig pointer to ECDSA_SIG structure + * \param r pointer to BIGNUM for r (may be NULL) + * \param s pointer to BIGNUM for s (may be NULL) + */ +int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s); + +/** Computes the ECDSA signature of the given hash value using + * the supplied private key and returns the created signature. + * \param dgst pointer to the hash value + * \param dgst_len length of the hash value + * \param eckey EC_KEY object containing a private EC key + * \return pointer to a ECDSA_SIG structure or NULL if an error occurred + */ +ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, + EC_KEY *eckey); + +/** Computes ECDSA signature of a given hash value using the supplied + * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). + * \param dgst pointer to the hash value to sign + * \param dgstlen length of the hash value + * \param kinv BIGNUM with a pre-computed inverse k (optional) + * \param rp BIGNUM with a pre-computed rp value (optional), + * see ECDSA_sign_setup + * \param eckey EC_KEY object containing a private EC key + * \return pointer to a ECDSA_SIG structure or NULL if an error occurred + */ +ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen, + const BIGNUM *kinv, const BIGNUM *rp, + EC_KEY *eckey); + +/** Verifies that the supplied signature is a valid ECDSA + * signature of the supplied hash value using the supplied public key. + * \param dgst pointer to the hash value + * \param dgst_len length of the hash value + * \param sig ECDSA_SIG structure + * \param eckey EC_KEY object containing a public EC key + * \return 1 if the signature is valid, 0 if the signature is invalid + * and -1 on error + */ +int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, + const ECDSA_SIG *sig, EC_KEY *eckey); + +/** Precompute parts of the signing operation + * \param eckey EC_KEY object containing a private EC key + * \param ctx BN_CTX object (optional) + * \param kinv BIGNUM pointer for the inverse of k + * \param rp BIGNUM pointer for x coordinate of k * generator + * \return 1 on success and 0 otherwise + */ +int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp); + +/** Computes ECDSA signature of a given hash value using the supplied + * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). + * \param type this parameter is ignored + * \param dgst pointer to the hash value to sign + * \param dgstlen length of the hash value + * \param sig memory for the DER encoded created signature + * \param siglen pointer to the length of the returned signature + * \param eckey EC_KEY object containing a private EC key + * \return 1 on success and 0 otherwise + */ +int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, + unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); + +/** Computes ECDSA signature of a given hash value using the supplied + * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). + * \param type this parameter is ignored + * \param dgst pointer to the hash value to sign + * \param dgstlen length of the hash value + * \param sig buffer to hold the DER encoded signature + * \param siglen pointer to the length of the returned signature + * \param kinv BIGNUM with a pre-computed inverse k (optional) + * \param rp BIGNUM with a pre-computed rp value (optional), + * see ECDSA_sign_setup + * \param eckey EC_KEY object containing a private EC key + * \return 1 on success and 0 otherwise + */ +int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen, + unsigned char *sig, unsigned int *siglen, + const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey); + +/** Verifies that the given signature is valid ECDSA signature + * of the supplied hash value using the specified public key. + * \param type this parameter is ignored + * \param dgst pointer to the hash value + * \param dgstlen length of the hash value + * \param sig pointer to the DER encoded signature + * \param siglen length of the DER encoded signature + * \param eckey EC_KEY object containing a public EC key + * \return 1 if the signature is valid, 0 if the signature is invalid + * and -1 on error + */ +int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, + const unsigned char *sig, int siglen, EC_KEY *eckey); + +/** Returns the maximum length of the DER encoded signature + * \param eckey EC_KEY object + * \return numbers of bytes required for the DER encoded signature + */ +int ECDSA_size(const EC_KEY *eckey); + +/********************************************************************/ +/* EC_KEY_METHOD constructors, destructors, writers and accessors */ +/********************************************************************/ + +EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth); +void EC_KEY_METHOD_free(EC_KEY_METHOD *meth); +void EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, + int (*init)(EC_KEY *key), + void (*finish)(EC_KEY *key), + int (*copy)(EC_KEY *dest, const EC_KEY *src), + int (*set_group)(EC_KEY *key, const EC_GROUP *grp), + int (*set_private)(EC_KEY *key, + const BIGNUM *priv_key), + int (*set_public)(EC_KEY *key, + const EC_POINT *pub_key)); + +void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, + int (*keygen)(EC_KEY *key)); + +void EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, + int (*ckey)(unsigned char **psec, + size_t *pseclen, + const EC_POINT *pub_key, + const EC_KEY *ecdh)); + +void EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, + int (*sign)(int type, const unsigned char *dgst, + int dlen, unsigned char *sig, + unsigned int *siglen, + const BIGNUM *kinv, const BIGNUM *r, + EC_KEY *eckey), + int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, + BIGNUM **kinvp, BIGNUM **rp), + ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, + int dgst_len, + const BIGNUM *in_kinv, + const BIGNUM *in_r, + EC_KEY *eckey)); + +void EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, + int (*verify)(int type, const unsigned + char *dgst, int dgst_len, + const unsigned char *sigbuf, + int sig_len, EC_KEY *eckey), + int (*verify_sig)(const unsigned char *dgst, + int dgst_len, + const ECDSA_SIG *sig, + EC_KEY *eckey)); + +void EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth, + int (**pinit)(EC_KEY *key), + void (**pfinish)(EC_KEY *key), + int (**pcopy)(EC_KEY *dest, const EC_KEY *src), + int (**pset_group)(EC_KEY *key, + const EC_GROUP *grp), + int (**pset_private)(EC_KEY *key, + const BIGNUM *priv_key), + int (**pset_public)(EC_KEY *key, + const EC_POINT *pub_key)); + +void EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, + int (**pkeygen)(EC_KEY *key)); + +void EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, + int (**pck)(unsigned char **psec, + size_t *pseclen, + const EC_POINT *pub_key, + const EC_KEY *ecdh)); + +void EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, + int (**psign)(int type, const unsigned char *dgst, + int dlen, unsigned char *sig, + unsigned int *siglen, + const BIGNUM *kinv, const BIGNUM *r, + EC_KEY *eckey), + int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, + BIGNUM **kinvp, BIGNUM **rp), + ECDSA_SIG *(**psign_sig)(const unsigned char *dgst, + int dgst_len, + const BIGNUM *in_kinv, + const BIGNUM *in_r, + EC_KEY *eckey)); + +void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, + int (**pverify)(int type, const unsigned + char *dgst, int dgst_len, + const unsigned char *sigbuf, + int sig_len, EC_KEY *eckey), + int (**pverify_sig)(const unsigned char *dgst, + int dgst_len, + const ECDSA_SIG *sig, + EC_KEY *eckey)); + +# define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x) + +# ifndef __cplusplus +# if defined(__SUNPRO_C) +# if __SUNPRO_C >= 0x520 +# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) +# endif +# endif +# endif + +# define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL) + +# define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_EC_PARAM_ENC, flag, NULL) + +# define EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, flag) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_ECDH_COFACTOR, flag, NULL) + +# define EVP_PKEY_CTX_get_ecdh_cofactor_mode(ctx) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_ECDH_COFACTOR, -2, NULL) + +# define EVP_PKEY_CTX_set_ecdh_kdf_type(ctx, kdf) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_KDF_TYPE, kdf, NULL) + +# define EVP_PKEY_CTX_get_ecdh_kdf_type(ctx) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_KDF_TYPE, -2, NULL) + +# define EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_KDF_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_get_ecdh_kdf_md(ctx, pmd) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_EC_KDF_MD, 0, (void *)(pmd)) + +# define EVP_PKEY_CTX_set_ecdh_kdf_outlen(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_KDF_OUTLEN, len, NULL) + +# define EVP_PKEY_CTX_get_ecdh_kdf_outlen(ctx, plen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN, 0, \ + (void *)(plen)) + +# define EVP_PKEY_CTX_set0_ecdh_kdf_ukm(ctx, p, plen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_EC_KDF_UKM, plen, (void *)(p)) + +# define EVP_PKEY_CTX_get0_ecdh_kdf_ukm(ctx, p) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ + EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_GET_EC_KDF_UKM, 0, (void *)(p)) + +/* SM2 will skip the operation check so no need to pass operation here */ +# define EVP_PKEY_CTX_set1_id(ctx, id, id_len) \ + EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ + EVP_PKEY_CTRL_SET1_ID, (int)id_len, (void*)(id)) + +# define EVP_PKEY_CTX_get1_id(ctx, id) \ + EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ + EVP_PKEY_CTRL_GET1_ID, 0, (void*)(id)) + +# define EVP_PKEY_CTX_get1_id_len(ctx, id_len) \ + EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ + EVP_PKEY_CTRL_GET1_ID_LEN, 0, (void*)(id_len)) + +# define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID (EVP_PKEY_ALG_CTRL + 1) +# define EVP_PKEY_CTRL_EC_PARAM_ENC (EVP_PKEY_ALG_CTRL + 2) +# define EVP_PKEY_CTRL_EC_ECDH_COFACTOR (EVP_PKEY_ALG_CTRL + 3) +# define EVP_PKEY_CTRL_EC_KDF_TYPE (EVP_PKEY_ALG_CTRL + 4) +# define EVP_PKEY_CTRL_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 5) +# define EVP_PKEY_CTRL_GET_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 6) +# define EVP_PKEY_CTRL_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 7) +# define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 8) +# define EVP_PKEY_CTRL_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 9) +# define EVP_PKEY_CTRL_GET_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 10) +# define EVP_PKEY_CTRL_SET1_ID (EVP_PKEY_ALG_CTRL + 11) +# define EVP_PKEY_CTRL_GET1_ID (EVP_PKEY_ALG_CTRL + 12) +# define EVP_PKEY_CTRL_GET1_ID_LEN (EVP_PKEY_ALG_CTRL + 13) +/* KDF types */ +# define EVP_PKEY_ECDH_KDF_NONE 1 +# define EVP_PKEY_ECDH_KDF_X9_63 2 +/** The old name for EVP_PKEY_ECDH_KDF_X9_63 + * The ECDH KDF specification has been mistakingly attributed to ANSI X9.62, + * it is actually specified in ANSI X9.63. + * This identifier is retained for backwards compatibility + */ +# define EVP_PKEY_ECDH_KDF_X9_62 EVP_PKEY_ECDH_KDF_X9_63 + + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ecdh.h b/src/Mayaqua/win32_inc/openssl/ecdh.h index 6afb6cf8..681f3d5e 100644 --- a/src/Mayaqua/win32_inc/openssl/ecdh.h +++ b/src/Mayaqua/win32_inc/openssl/ecdh.h @@ -1,134 +1,10 @@ -/* crypto/ecdh/ecdh.h */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * The Elliptic Curve Public-Key Crypto Library (ECC Code) included - * herein is developed by SUN MICROSYSTEMS, INC., and is contributed - * to the OpenSSL project. - * - * The ECC Code is licensed pursuant to the OpenSSL open source - * license provided below. - * - * The ECDH software is originally written by Douglas Stebila of - * Sun Microsystems Laboratories. - * - */ -/* ==================================================================== - * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_ECDH_H -# define HEADER_ECDH_H - -# include - -# ifdef OPENSSL_NO_ECDH -# error ECDH is disabled. -# endif - -# include -# include -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# define EC_FLAG_COFACTOR_ECDH 0x1000 - -const ECDH_METHOD *ECDH_OpenSSL(void); - -void ECDH_set_default_method(const ECDH_METHOD *); -const ECDH_METHOD *ECDH_get_default_method(void); -int ECDH_set_method(EC_KEY *, const ECDH_METHOD *); - -int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, - EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen, - void *out, size_t *outlen)); - -int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new - *new_func, CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); -int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg); -void *ECDH_get_ex_data(EC_KEY *d, int idx); - -int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, - const unsigned char *Z, size_t Zlen, - const unsigned char *sinfo, size_t sinfolen, - const EVP_MD *md); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ECDH_strings(void); - -/* Error codes for the ECDH functions. */ - -/* Function codes. */ -# define ECDH_F_ECDH_CHECK 102 -# define ECDH_F_ECDH_COMPUTE_KEY 100 -# define ECDH_F_ECDH_DATA_NEW_METHOD 101 - -/* Reason codes. */ -# define ECDH_R_KDF_FAILED 102 -# define ECDH_R_NON_FIPS_METHOD 103 -# define ECDH_R_NO_PRIVATE_VALUE 100 -# define ECDH_R_POINT_ARITHMETIC_FAILURE 101 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include diff --git a/src/Mayaqua/win32_inc/openssl/ecdsa.h b/src/Mayaqua/win32_inc/openssl/ecdsa.h index 0b4eb19f..681f3d5e 100644 --- a/src/Mayaqua/win32_inc/openssl/ecdsa.h +++ b/src/Mayaqua/win32_inc/openssl/ecdsa.h @@ -1,335 +1,10 @@ -/* crypto/ecdsa/ecdsa.h */ -/** - * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions - * \author Written by Nils Larsch for the OpenSSL project - */ -/* ==================================================================== - * Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_ECDSA_H -# define HEADER_ECDSA_H - -# include - -# ifdef OPENSSL_NO_ECDSA -# error ECDSA is disabled. -# endif - -# include -# include -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ECDSA_SIG_st { - BIGNUM *r; - BIGNUM *s; -} ECDSA_SIG; - -/** Allocates and initialize a ECDSA_SIG structure - * \return pointer to a ECDSA_SIG structure or NULL if an error occurred - */ -ECDSA_SIG *ECDSA_SIG_new(void); - -/** frees a ECDSA_SIG structure - * \param sig pointer to the ECDSA_SIG structure - */ -void ECDSA_SIG_free(ECDSA_SIG *sig); - -/** DER encode content of ECDSA_SIG object (note: this function modifies *pp - * (*pp += length of the DER encoded signature)). - * \param sig pointer to the ECDSA_SIG object - * \param pp pointer to a unsigned char pointer for the output or NULL - * \return the length of the DER encoded ECDSA_SIG object or 0 - */ -int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp); - -/** Decodes a DER encoded ECDSA signature (note: this function changes *pp - * (*pp += len)). - * \param sig pointer to ECDSA_SIG pointer (may be NULL) - * \param pp memory buffer with the DER encoded signature - * \param len length of the buffer - * \return pointer to the decoded ECDSA_SIG structure (or NULL) - */ -ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len); - -/** Computes the ECDSA signature of the given hash value using - * the supplied private key and returns the created signature. - * \param dgst pointer to the hash value - * \param dgst_len length of the hash value - * \param eckey EC_KEY object containing a private EC key - * \return pointer to a ECDSA_SIG structure or NULL if an error occurred - */ -ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, - EC_KEY *eckey); - -/** Computes ECDSA signature of a given hash value using the supplied - * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). - * \param dgst pointer to the hash value to sign - * \param dgstlen length of the hash value - * \param kinv BIGNUM with a pre-computed inverse k (optional) - * \param rp BIGNUM with a pre-computed rp value (optioanl), - * see ECDSA_sign_setup - * \param eckey EC_KEY object containing a private EC key - * \return pointer to a ECDSA_SIG structure or NULL if an error occurred - */ -ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen, - const BIGNUM *kinv, const BIGNUM *rp, - EC_KEY *eckey); - -/** Verifies that the supplied signature is a valid ECDSA - * signature of the supplied hash value using the supplied public key. - * \param dgst pointer to the hash value - * \param dgst_len length of the hash value - * \param sig ECDSA_SIG structure - * \param eckey EC_KEY object containing a public EC key - * \return 1 if the signature is valid, 0 if the signature is invalid - * and -1 on error - */ -int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, - const ECDSA_SIG *sig, EC_KEY *eckey); - -const ECDSA_METHOD *ECDSA_OpenSSL(void); - -/** Sets the default ECDSA method - * \param meth new default ECDSA_METHOD - */ -void ECDSA_set_default_method(const ECDSA_METHOD *meth); - -/** Returns the default ECDSA method - * \return pointer to ECDSA_METHOD structure containing the default method - */ -const ECDSA_METHOD *ECDSA_get_default_method(void); - -/** Sets method to be used for the ECDSA operations - * \param eckey EC_KEY object - * \param meth new method - * \return 1 on success and 0 otherwise - */ -int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth); - -/** Returns the maximum length of the DER encoded signature - * \param eckey EC_KEY object - * \return numbers of bytes required for the DER encoded signature - */ -int ECDSA_size(const EC_KEY *eckey); - -/** Precompute parts of the signing operation - * \param eckey EC_KEY object containing a private EC key - * \param ctx BN_CTX object (optional) - * \param kinv BIGNUM pointer for the inverse of k - * \param rp BIGNUM pointer for x coordinate of k * generator - * \return 1 on success and 0 otherwise - */ -int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp); - -/** Computes ECDSA signature of a given hash value using the supplied - * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). - * \param type this parameter is ignored - * \param dgst pointer to the hash value to sign - * \param dgstlen length of the hash value - * \param sig memory for the DER encoded created signature - * \param siglen pointer to the length of the returned signature - * \param eckey EC_KEY object containing a private EC key - * \return 1 on success and 0 otherwise - */ -int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, - unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); - -/** Computes ECDSA signature of a given hash value using the supplied - * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). - * \param type this parameter is ignored - * \param dgst pointer to the hash value to sign - * \param dgstlen length of the hash value - * \param sig buffer to hold the DER encoded signature - * \param siglen pointer to the length of the returned signature - * \param kinv BIGNUM with a pre-computed inverse k (optional) - * \param rp BIGNUM with a pre-computed rp value (optioanl), - * see ECDSA_sign_setup - * \param eckey EC_KEY object containing a private EC key - * \return 1 on success and 0 otherwise - */ -int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen, - unsigned char *sig, unsigned int *siglen, - const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey); - -/** Verifies that the given signature is valid ECDSA signature - * of the supplied hash value using the specified public key. - * \param type this parameter is ignored - * \param dgst pointer to the hash value - * \param dgstlen length of the hash value - * \param sig pointer to the DER encoded signature - * \param siglen length of the DER encoded signature - * \param eckey EC_KEY object containing a public EC key - * \return 1 if the signature is valid, 0 if the signature is invalid - * and -1 on error - */ -int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, - const unsigned char *sig, int siglen, EC_KEY *eckey); - -/* the standard ex_data functions */ -int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new - *new_func, CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); -int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg); -void *ECDSA_get_ex_data(EC_KEY *d, int idx); - -/** Allocates and initialize a ECDSA_METHOD structure - * \param ecdsa_method pointer to ECDSA_METHOD to copy. (May be NULL) - * \return pointer to a ECDSA_METHOD structure or NULL if an error occurred - */ - -ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method); - -/** frees a ECDSA_METHOD structure - * \param ecdsa_method pointer to the ECDSA_METHOD structure - */ -void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method); - -/** Sets application specific data in the ECDSA_METHOD - * \param ecdsa_method pointer to existing ECDSA_METHOD - * \param app application specific data to set - */ - -void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app); - -/** Returns application specific data from a ECDSA_METHOD structure - * \param ecdsa_method pointer to ECDSA_METHOD structure - * \return pointer to application specific data. - */ - -void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method); - -/** Set the ECDSA_do_sign function in the ECDSA_METHOD - * \param ecdsa_method pointer to existing ECDSA_METHOD - * \param ecdsa_do_sign a funtion of type ECDSA_do_sign - */ - -void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method, - ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char - *dgst, int dgst_len, - const BIGNUM *inv, - const BIGNUM *rp, - EC_KEY *eckey)); - -/** Set the ECDSA_sign_setup function in the ECDSA_METHOD - * \param ecdsa_method pointer to existing ECDSA_METHOD - * \param ecdsa_sign_setup a funtion of type ECDSA_sign_setup - */ - -void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method, - int (*ecdsa_sign_setup) (EC_KEY *eckey, - BN_CTX *ctx, - BIGNUM **kinv, - BIGNUM **r)); - -/** Set the ECDSA_do_verify function in the ECDSA_METHOD - * \param ecdsa_method pointer to existing ECDSA_METHOD - * \param ecdsa_do_verify a funtion of type ECDSA_do_verify - */ - -void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method, - int (*ecdsa_do_verify) (const unsigned char - *dgst, int dgst_len, - const ECDSA_SIG *sig, - EC_KEY *eckey)); - -void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags); - -/** Set the flags field in the ECDSA_METHOD - * \param ecdsa_method pointer to existing ECDSA_METHOD - * \param flags flags value to set - */ - -void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name); - -/** Set the name field in the ECDSA_METHOD - * \param ecdsa_method pointer to existing ECDSA_METHOD - * \param name name to set - */ - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ECDSA_strings(void); - -/* Error codes for the ECDSA functions. */ - -/* Function codes. */ -# define ECDSA_F_ECDSA_CHECK 104 -# define ECDSA_F_ECDSA_DATA_NEW_METHOD 100 -# define ECDSA_F_ECDSA_DO_SIGN 101 -# define ECDSA_F_ECDSA_DO_VERIFY 102 -# define ECDSA_F_ECDSA_METHOD_NEW 105 -# define ECDSA_F_ECDSA_SIGN_SETUP 103 - -/* Reason codes. */ -# define ECDSA_R_BAD_SIGNATURE 100 -# define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101 -# define ECDSA_R_ERR_EC_LIB 102 -# define ECDSA_R_MISSING_PARAMETERS 103 -# define ECDSA_R_NEED_NEW_SETUP_VALUES 106 -# define ECDSA_R_NON_FIPS_METHOD 107 -# define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 -# define ECDSA_R_SIGNATURE_MALLOC_FAILED 105 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include diff --git a/src/Mayaqua/win32_inc/openssl/ecerr.h b/src/Mayaqua/win32_inc/openssl/ecerr.h new file mode 100644 index 00000000..f7b91834 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/ecerr.h @@ -0,0 +1,275 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ECERR_H +# define HEADER_ECERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_EC + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_EC_strings(void); + +/* + * EC function codes. + */ +# define EC_F_BN_TO_FELEM 224 +# define EC_F_D2I_ECPARAMETERS 144 +# define EC_F_D2I_ECPKPARAMETERS 145 +# define EC_F_D2I_ECPRIVATEKEY 146 +# define EC_F_DO_EC_KEY_PRINT 221 +# define EC_F_ECDH_CMS_DECRYPT 238 +# define EC_F_ECDH_CMS_SET_SHARED_INFO 239 +# define EC_F_ECDH_COMPUTE_KEY 246 +# define EC_F_ECDH_SIMPLE_COMPUTE_KEY 257 +# define EC_F_ECDSA_DO_SIGN_EX 251 +# define EC_F_ECDSA_DO_VERIFY 252 +# define EC_F_ECDSA_SIGN_EX 254 +# define EC_F_ECDSA_SIGN_SETUP 248 +# define EC_F_ECDSA_SIG_NEW 265 +# define EC_F_ECDSA_VERIFY 253 +# define EC_F_ECD_ITEM_VERIFY 270 +# define EC_F_ECKEY_PARAM2TYPE 223 +# define EC_F_ECKEY_PARAM_DECODE 212 +# define EC_F_ECKEY_PRIV_DECODE 213 +# define EC_F_ECKEY_PRIV_ENCODE 214 +# define EC_F_ECKEY_PUB_DECODE 215 +# define EC_F_ECKEY_PUB_ENCODE 216 +# define EC_F_ECKEY_TYPE2PARAM 220 +# define EC_F_ECPARAMETERS_PRINT 147 +# define EC_F_ECPARAMETERS_PRINT_FP 148 +# define EC_F_ECPKPARAMETERS_PRINT 149 +# define EC_F_ECPKPARAMETERS_PRINT_FP 150 +# define EC_F_ECP_NISTZ256_GET_AFFINE 240 +# define EC_F_ECP_NISTZ256_INV_MOD_ORD 275 +# define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE 243 +# define EC_F_ECP_NISTZ256_POINTS_MUL 241 +# define EC_F_ECP_NISTZ256_PRE_COMP_NEW 244 +# define EC_F_ECP_NISTZ256_WINDOWED_MUL 242 +# define EC_F_ECX_KEY_OP 266 +# define EC_F_ECX_PRIV_ENCODE 267 +# define EC_F_ECX_PUB_ENCODE 268 +# define EC_F_EC_ASN1_GROUP2CURVE 153 +# define EC_F_EC_ASN1_GROUP2FIELDID 154 +# define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 208 +# define EC_F_EC_GF2M_SIMPLE_FIELD_INV 296 +# define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 159 +# define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 195 +# define EC_F_EC_GF2M_SIMPLE_LADDER_POST 285 +# define EC_F_EC_GF2M_SIMPLE_LADDER_PRE 288 +# define EC_F_EC_GF2M_SIMPLE_OCT2POINT 160 +# define EC_F_EC_GF2M_SIMPLE_POINT2OCT 161 +# define EC_F_EC_GF2M_SIMPLE_POINTS_MUL 289 +# define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162 +# define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163 +# define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 164 +# define EC_F_EC_GFP_MONT_FIELD_DECODE 133 +# define EC_F_EC_GFP_MONT_FIELD_ENCODE 134 +# define EC_F_EC_GFP_MONT_FIELD_INV 297 +# define EC_F_EC_GFP_MONT_FIELD_MUL 131 +# define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 209 +# define EC_F_EC_GFP_MONT_FIELD_SQR 132 +# define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 189 +# define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE 225 +# define EC_F_EC_GFP_NISTP224_POINTS_MUL 228 +# define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 226 +# define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE 230 +# define EC_F_EC_GFP_NISTP256_POINTS_MUL 231 +# define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 232 +# define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE 233 +# define EC_F_EC_GFP_NISTP521_POINTS_MUL 234 +# define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 235 +# define EC_F_EC_GFP_NIST_FIELD_MUL 200 +# define EC_F_EC_GFP_NIST_FIELD_SQR 201 +# define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 202 +# define EC_F_EC_GFP_SIMPLE_BLIND_COORDINATES 287 +# define EC_F_EC_GFP_SIMPLE_FIELD_INV 298 +# define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 165 +# define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 166 +# define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102 +# define EC_F_EC_GFP_SIMPLE_OCT2POINT 103 +# define EC_F_EC_GFP_SIMPLE_POINT2OCT 104 +# define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137 +# define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 167 +# define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 168 +# define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 169 +# define EC_F_EC_GROUP_CHECK 170 +# define EC_F_EC_GROUP_CHECK_DISCRIMINANT 171 +# define EC_F_EC_GROUP_COPY 106 +# define EC_F_EC_GROUP_GET_CURVE 291 +# define EC_F_EC_GROUP_GET_CURVE_GF2M 172 +# define EC_F_EC_GROUP_GET_CURVE_GFP 130 +# define EC_F_EC_GROUP_GET_DEGREE 173 +# define EC_F_EC_GROUP_GET_ECPARAMETERS 261 +# define EC_F_EC_GROUP_GET_ECPKPARAMETERS 262 +# define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 193 +# define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194 +# define EC_F_EC_GROUP_NEW 108 +# define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174 +# define EC_F_EC_GROUP_NEW_FROM_DATA 175 +# define EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS 263 +# define EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS 264 +# define EC_F_EC_GROUP_SET_CURVE 292 +# define EC_F_EC_GROUP_SET_CURVE_GF2M 176 +# define EC_F_EC_GROUP_SET_CURVE_GFP 109 +# define EC_F_EC_GROUP_SET_GENERATOR 111 +# define EC_F_EC_GROUP_SET_SEED 286 +# define EC_F_EC_KEY_CHECK_KEY 177 +# define EC_F_EC_KEY_COPY 178 +# define EC_F_EC_KEY_GENERATE_KEY 179 +# define EC_F_EC_KEY_NEW 182 +# define EC_F_EC_KEY_NEW_METHOD 245 +# define EC_F_EC_KEY_OCT2PRIV 255 +# define EC_F_EC_KEY_PRINT 180 +# define EC_F_EC_KEY_PRINT_FP 181 +# define EC_F_EC_KEY_PRIV2BUF 279 +# define EC_F_EC_KEY_PRIV2OCT 256 +# define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229 +# define EC_F_EC_KEY_SIMPLE_CHECK_KEY 258 +# define EC_F_EC_KEY_SIMPLE_OCT2PRIV 259 +# define EC_F_EC_KEY_SIMPLE_PRIV2OCT 260 +# define EC_F_EC_PKEY_CHECK 273 +# define EC_F_EC_PKEY_PARAM_CHECK 274 +# define EC_F_EC_POINTS_MAKE_AFFINE 136 +# define EC_F_EC_POINTS_MUL 290 +# define EC_F_EC_POINT_ADD 112 +# define EC_F_EC_POINT_BN2POINT 280 +# define EC_F_EC_POINT_CMP 113 +# define EC_F_EC_POINT_COPY 114 +# define EC_F_EC_POINT_DBL 115 +# define EC_F_EC_POINT_GET_AFFINE_COORDINATES 293 +# define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 183 +# define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116 +# define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117 +# define EC_F_EC_POINT_INVERT 210 +# define EC_F_EC_POINT_IS_AT_INFINITY 118 +# define EC_F_EC_POINT_IS_ON_CURVE 119 +# define EC_F_EC_POINT_MAKE_AFFINE 120 +# define EC_F_EC_POINT_NEW 121 +# define EC_F_EC_POINT_OCT2POINT 122 +# define EC_F_EC_POINT_POINT2BUF 281 +# define EC_F_EC_POINT_POINT2OCT 123 +# define EC_F_EC_POINT_SET_AFFINE_COORDINATES 294 +# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185 +# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 +# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES 295 +# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 186 +# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125 +# define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126 +# define EC_F_EC_POINT_SET_TO_INFINITY 127 +# define EC_F_EC_PRE_COMP_NEW 196 +# define EC_F_EC_SCALAR_MUL_LADDER 284 +# define EC_F_EC_WNAF_MUL 187 +# define EC_F_EC_WNAF_PRECOMPUTE_MULT 188 +# define EC_F_I2D_ECPARAMETERS 190 +# define EC_F_I2D_ECPKPARAMETERS 191 +# define EC_F_I2D_ECPRIVATEKEY 192 +# define EC_F_I2O_ECPUBLICKEY 151 +# define EC_F_NISTP224_PRE_COMP_NEW 227 +# define EC_F_NISTP256_PRE_COMP_NEW 236 +# define EC_F_NISTP521_PRE_COMP_NEW 237 +# define EC_F_O2I_ECPUBLICKEY 152 +# define EC_F_OLD_EC_PRIV_DECODE 222 +# define EC_F_OSSL_ECDH_COMPUTE_KEY 247 +# define EC_F_OSSL_ECDSA_SIGN_SIG 249 +# define EC_F_OSSL_ECDSA_VERIFY_SIG 250 +# define EC_F_PKEY_ECD_CTRL 271 +# define EC_F_PKEY_ECD_DIGESTSIGN 272 +# define EC_F_PKEY_ECD_DIGESTSIGN25519 276 +# define EC_F_PKEY_ECD_DIGESTSIGN448 277 +# define EC_F_PKEY_ECX_DERIVE 269 +# define EC_F_PKEY_EC_CTRL 197 +# define EC_F_PKEY_EC_CTRL_STR 198 +# define EC_F_PKEY_EC_DERIVE 217 +# define EC_F_PKEY_EC_INIT 282 +# define EC_F_PKEY_EC_KDF_DERIVE 283 +# define EC_F_PKEY_EC_KEYGEN 199 +# define EC_F_PKEY_EC_PARAMGEN 219 +# define EC_F_PKEY_EC_SIGN 218 +# define EC_F_VALIDATE_ECX_DERIVE 278 + +/* + * EC reason codes. + */ +# define EC_R_ASN1_ERROR 115 +# define EC_R_BAD_SIGNATURE 156 +# define EC_R_BIGNUM_OUT_OF_RANGE 144 +# define EC_R_BUFFER_TOO_SMALL 100 +# define EC_R_CANNOT_INVERT 165 +# define EC_R_COORDINATES_OUT_OF_RANGE 146 +# define EC_R_CURVE_DOES_NOT_SUPPORT_ECDH 160 +# define EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING 159 +# define EC_R_D2I_ECPKPARAMETERS_FAILURE 117 +# define EC_R_DECODE_ERROR 142 +# define EC_R_DISCRIMINANT_IS_ZERO 118 +# define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119 +# define EC_R_FIELD_TOO_LARGE 143 +# define EC_R_GF2M_NOT_SUPPORTED 147 +# define EC_R_GROUP2PKPARAMETERS_FAILURE 120 +# define EC_R_I2D_ECPKPARAMETERS_FAILURE 121 +# define EC_R_INCOMPATIBLE_OBJECTS 101 +# define EC_R_INVALID_ARGUMENT 112 +# define EC_R_INVALID_COMPRESSED_POINT 110 +# define EC_R_INVALID_COMPRESSION_BIT 109 +# define EC_R_INVALID_CURVE 141 +# define EC_R_INVALID_DIGEST 151 +# define EC_R_INVALID_DIGEST_TYPE 138 +# define EC_R_INVALID_ENCODING 102 +# define EC_R_INVALID_FIELD 103 +# define EC_R_INVALID_FORM 104 +# define EC_R_INVALID_GROUP_ORDER 122 +# define EC_R_INVALID_KEY 116 +# define EC_R_INVALID_OUTPUT_LENGTH 161 +# define EC_R_INVALID_PEER_KEY 133 +# define EC_R_INVALID_PENTANOMIAL_BASIS 132 +# define EC_R_INVALID_PRIVATE_KEY 123 +# define EC_R_INVALID_TRINOMIAL_BASIS 137 +# define EC_R_KDF_PARAMETER_ERROR 148 +# define EC_R_KEYS_NOT_SET 140 +# define EC_R_LADDER_POST_FAILURE 136 +# define EC_R_LADDER_PRE_FAILURE 153 +# define EC_R_LADDER_STEP_FAILURE 162 +# define EC_R_MISSING_PARAMETERS 124 +# define EC_R_MISSING_PRIVATE_KEY 125 +# define EC_R_NEED_NEW_SETUP_VALUES 157 +# define EC_R_NOT_A_NIST_PRIME 135 +# define EC_R_NOT_IMPLEMENTED 126 +# define EC_R_NOT_INITIALIZED 111 +# define EC_R_NO_PARAMETERS_SET 139 +# define EC_R_NO_PRIVATE_VALUE 154 +# define EC_R_OPERATION_NOT_SUPPORTED 152 +# define EC_R_PASSED_NULL_PARAMETER 134 +# define EC_R_PEER_KEY_ERROR 149 +# define EC_R_PKPARAMETERS2GROUP_FAILURE 127 +# define EC_R_POINT_ARITHMETIC_FAILURE 155 +# define EC_R_POINT_AT_INFINITY 106 +# define EC_R_POINT_COORDINATES_BLIND_FAILURE 163 +# define EC_R_POINT_IS_NOT_ON_CURVE 107 +# define EC_R_RANDOM_NUMBER_GENERATION_FAILED 158 +# define EC_R_SHARED_INFO_ERROR 150 +# define EC_R_SLOT_FULL 108 +# define EC_R_UNDEFINED_GENERATOR 113 +# define EC_R_UNDEFINED_ORDER 128 +# define EC_R_UNKNOWN_COFACTOR 164 +# define EC_R_UNKNOWN_GROUP 129 +# define EC_R_UNKNOWN_ORDER 114 +# define EC_R_UNSUPPORTED_FIELD 131 +# define EC_R_WRONG_CURVE_PARAMETERS 145 +# define EC_R_WRONG_ORDER 130 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/engine.h b/src/Mayaqua/win32_inc/openssl/engine.h index ee7939bc..0780f0fb 100644 --- a/src/Mayaqua/win32_inc/openssl/engine.h +++ b/src/Mayaqua/win32_inc/openssl/engine.h @@ -1,960 +1,751 @@ -/* openssl/engine.h */ -/* - * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project - * 2000. - */ -/* ==================================================================== - * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECDH support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_ENGINE_H -# define HEADER_ENGINE_H - -# include - -# ifdef OPENSSL_NO_ENGINE -# error ENGINE is disabled. -# endif - -# ifndef OPENSSL_NO_DEPRECATED -# include -# ifndef OPENSSL_NO_RSA -# include -# endif -# ifndef OPENSSL_NO_DSA -# include -# endif -# ifndef OPENSSL_NO_DH -# include -# endif -# ifndef OPENSSL_NO_ECDH -# include -# endif -# ifndef OPENSSL_NO_ECDSA -# include -# endif -# include -# include -# include -# endif - -# include -# include - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * These flags are used to control combinations of algorithm (methods) by - * bitwise "OR"ing. - */ -# define ENGINE_METHOD_RSA (unsigned int)0x0001 -# define ENGINE_METHOD_DSA (unsigned int)0x0002 -# define ENGINE_METHOD_DH (unsigned int)0x0004 -# define ENGINE_METHOD_RAND (unsigned int)0x0008 -# define ENGINE_METHOD_ECDH (unsigned int)0x0010 -# define ENGINE_METHOD_ECDSA (unsigned int)0x0020 -# define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 -# define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 -# define ENGINE_METHOD_STORE (unsigned int)0x0100 -# define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200 -# define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400 -/* Obvious all-or-nothing cases. */ -# define ENGINE_METHOD_ALL (unsigned int)0xFFFF -# define ENGINE_METHOD_NONE (unsigned int)0x0000 - -/* - * This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used - * internally to control registration of ENGINE implementations, and can be - * set by ENGINE_set_table_flags(). The "NOINIT" flag prevents attempts to - * initialise registered ENGINEs if they are not already initialised. - */ -# define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001 - -/* ENGINE flags that can be set by ENGINE_set_flags(). */ -/* Not used */ -/* #define ENGINE_FLAGS_MALLOCED 0x0001 */ - -/* - * This flag is for ENGINEs that wish to handle the various 'CMD'-related - * control commands on their own. Without this flag, ENGINE_ctrl() handles - * these control commands on behalf of the ENGINE using their "cmd_defns" - * data. - */ -# define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002 - -/* - * This flag is for ENGINEs who return new duplicate structures when found - * via "ENGINE_by_id()". When an ENGINE must store state (eg. if - * ENGINE_ctrl() commands are called in sequence as part of some stateful - * process like key-generation setup and execution), it can set this flag - - * then each attempt to obtain the ENGINE will result in it being copied into - * a new structure. Normally, ENGINEs don't declare this flag so - * ENGINE_by_id() just increments the existing ENGINE's structural reference - * count. - */ -# define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 - -/* - * This flag if for an ENGINE that does not want its methods registered as - * part of ENGINE_register_all_complete() for example if the methods are not - * usable as default methods. - */ - -# define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008 - -/* - * ENGINEs can support their own command types, and these flags are used in - * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input - * each command expects. Currently only numeric and string input is - * supported. If a control command supports none of the _NUMERIC, _STRING, or - * _NO_INPUT options, then it is regarded as an "internal" control command - - * and not for use in config setting situations. As such, they're not - * available to the ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl() - * access. Changes to this list of 'command types' should be reflected - * carefully in ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string(). - */ - -/* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */ -# define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001 -/* - * accepts string input (cast from 'void*' to 'const char *', 4th parameter - * to ENGINE_ctrl) - */ -# define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002 -/* - * Indicates that the control command takes *no* input. Ie. the control - * command is unparameterised. - */ -# define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004 -/* - * Indicates that the control command is internal. This control command won't - * be shown in any output, and is only usable through the ENGINE_ctrl_cmd() - * function. - */ -# define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008 - -/* - * NB: These 3 control commands are deprecated and should not be used. - * ENGINEs relying on these commands should compile conditional support for - * compatibility (eg. if these symbols are defined) but should also migrate - * the same functionality to their own ENGINE-specific control functions that - * can be "discovered" by calling applications. The fact these control - * commands wouldn't be "executable" (ie. usable by text-based config) - * doesn't change the fact that application code can find and use them - * without requiring per-ENGINE hacking. - */ - -/* - * These flags are used to tell the ctrl function what should be done. All - * command numbers are shared between all engines, even if some don't make - * sense to some engines. In such a case, they do nothing but return the - * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. - */ -# define ENGINE_CTRL_SET_LOGSTREAM 1 -# define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2 -# define ENGINE_CTRL_HUP 3/* Close and reinitialise - * any handles/connections - * etc. */ -# define ENGINE_CTRL_SET_USER_INTERFACE 4/* Alternative to callback */ -# define ENGINE_CTRL_SET_CALLBACK_DATA 5/* User-specific data, used - * when calling the password - * callback and the user - * interface */ -# define ENGINE_CTRL_LOAD_CONFIGURATION 6/* Load a configuration, - * given a string that - * represents a file name - * or so */ -# define ENGINE_CTRL_LOAD_SECTION 7/* Load data from a given - * section in the already - * loaded configuration */ - -/* - * These control commands allow an application to deal with an arbitrary - * engine in a dynamic way. Warn: Negative return values indicate errors FOR - * THESE COMMANDS because zero is used to indicate 'end-of-list'. Other - * commands, including ENGINE-specific command types, return zero for an - * error. An ENGINE can choose to implement these ctrl functions, and can - * internally manage things however it chooses - it does so by setting the - * ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise - * the ENGINE_ctrl() code handles this on the ENGINE's behalf using the - * cmd_defns data (set using ENGINE_set_cmd_defns()). This means an ENGINE's - * ctrl() handler need only implement its own commands - the above "meta" - * commands will be taken care of. - */ - -/* - * Returns non-zero if the supplied ENGINE has a ctrl() handler. If "not", - * then all the remaining control commands will return failure, so it is - * worth checking this first if the caller is trying to "discover" the - * engine's capabilities and doesn't want errors generated unnecessarily. - */ -# define ENGINE_CTRL_HAS_CTRL_FUNCTION 10 -/* - * Returns a positive command number for the first command supported by the - * engine. Returns zero if no ctrl commands are supported. - */ -# define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11 -/* - * The 'long' argument specifies a command implemented by the engine, and the - * return value is the next command supported, or zero if there are no more. - */ -# define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12 -/* - * The 'void*' argument is a command name (cast from 'const char *'), and the - * return value is the command that corresponds to it. - */ -# define ENGINE_CTRL_GET_CMD_FROM_NAME 13 -/* - * The next two allow a command to be converted into its corresponding string - * form. In each case, the 'long' argument supplies the command. In the - * NAME_LEN case, the return value is the length of the command name (not - * counting a trailing EOL). In the NAME case, the 'void*' argument must be a - * string buffer large enough, and it will be populated with the name of the - * command (WITH a trailing EOL). - */ -# define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14 -# define ENGINE_CTRL_GET_NAME_FROM_CMD 15 -/* The next two are similar but give a "short description" of a command. */ -# define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16 -# define ENGINE_CTRL_GET_DESC_FROM_CMD 17 -/* - * With this command, the return value is the OR'd combination of - * ENGINE_CMD_FLAG_*** values that indicate what kind of input a given - * engine-specific ctrl command expects. - */ -# define ENGINE_CTRL_GET_CMD_FLAGS 18 - -/* - * ENGINE implementations should start the numbering of their own control - * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). - */ -# define ENGINE_CMD_BASE 200 - -/* - * NB: These 2 nCipher "chil" control commands are deprecated, and their - * functionality is now available through ENGINE-specific control commands - * (exposed through the above-mentioned 'CMD'-handling). Code using these 2 - * commands should be migrated to the more general command handling before - * these are removed. - */ - -/* Flags specific to the nCipher "chil" engine */ -# define ENGINE_CTRL_CHIL_SET_FORKCHECK 100 - /* - * Depending on the value of the (long)i argument, this sets or - * unsets the SimpleForkCheck flag in the CHIL API to enable or - * disable checking and workarounds for applications that fork(). - */ -# define ENGINE_CTRL_CHIL_NO_LOCKING 101 - /* - * This prevents the initialisation function from providing mutex - * callbacks to the nCipher library. - */ - -/* - * If an ENGINE supports its own specific control commands and wishes the - * framework to handle the above 'ENGINE_CMD_***'-manipulation commands on - * its behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN - * entries to ENGINE_set_cmd_defns(). It should also implement a ctrl() - * handler that supports the stated commands (ie. the "cmd_num" entries as - * described by the array). NB: The array must be ordered in increasing order - * of cmd_num. "null-terminated" means that the last ENGINE_CMD_DEFN element - * has cmd_num set to zero and/or cmd_name set to NULL. - */ -typedef struct ENGINE_CMD_DEFN_st { - unsigned int cmd_num; /* The command number */ - const char *cmd_name; /* The command name itself */ - const char *cmd_desc; /* A short description of the command */ - unsigned int cmd_flags; /* The input the command expects */ -} ENGINE_CMD_DEFN; - -/* Generic function pointer */ -typedef int (*ENGINE_GEN_FUNC_PTR) (void); -/* Generic function pointer taking no arguments */ -typedef int (*ENGINE_GEN_INT_FUNC_PTR) (ENGINE *); -/* Specific control function pointer */ -typedef int (*ENGINE_CTRL_FUNC_PTR) (ENGINE *, int, long, void *, - void (*f) (void)); -/* Generic load_key function pointer */ -typedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *, - UI_METHOD *ui_method, - void *callback_data); -typedef int (*ENGINE_SSL_CLIENT_CERT_PTR) (ENGINE *, SSL *ssl, - STACK_OF(X509_NAME) *ca_dn, - X509 **pcert, EVP_PKEY **pkey, - STACK_OF(X509) **pother, - UI_METHOD *ui_method, - void *callback_data); -/*- - * These callback types are for an ENGINE's handler for cipher and digest logic. - * These handlers have these prototypes; - * int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid); - * int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid); - * Looking at how to implement these handlers in the case of cipher support, if - * the framework wants the EVP_CIPHER for 'nid', it will call; - * foo(e, &p_evp_cipher, NULL, nid); (return zero for failure) - * If the framework wants a list of supported 'nid's, it will call; - * foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error) - */ -/* - * Returns to a pointer to the array of supported cipher 'nid's. If the - * second parameter is non-NULL it is set to the size of the returned array. - */ -typedef int (*ENGINE_CIPHERS_PTR) (ENGINE *, const EVP_CIPHER **, - const int **, int); -typedef int (*ENGINE_DIGESTS_PTR) (ENGINE *, const EVP_MD **, const int **, - int); -typedef int (*ENGINE_PKEY_METHS_PTR) (ENGINE *, EVP_PKEY_METHOD **, - const int **, int); -typedef int (*ENGINE_PKEY_ASN1_METHS_PTR) (ENGINE *, EVP_PKEY_ASN1_METHOD **, - const int **, int); -/* - * STRUCTURE functions ... all of these functions deal with pointers to - * ENGINE structures where the pointers have a "structural reference". This - * means that their reference is to allowed access to the structure but it - * does not imply that the structure is functional. To simply increment or - * decrement the structural reference count, use ENGINE_by_id and - * ENGINE_free. NB: This is not required when iterating using ENGINE_get_next - * as it will automatically decrement the structural reference count of the - * "current" ENGINE and increment the structural reference count of the - * ENGINE it returns (unless it is NULL). - */ - -/* Get the first/last "ENGINE" type available. */ -ENGINE *ENGINE_get_first(void); -ENGINE *ENGINE_get_last(void); -/* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ -ENGINE *ENGINE_get_next(ENGINE *e); -ENGINE *ENGINE_get_prev(ENGINE *e); -/* Add another "ENGINE" type into the array. */ -int ENGINE_add(ENGINE *e); -/* Remove an existing "ENGINE" type from the array. */ -int ENGINE_remove(ENGINE *e); -/* Retrieve an engine from the list by its unique "id" value. */ -ENGINE *ENGINE_by_id(const char *id); -/* Add all the built-in engines. */ -void ENGINE_load_openssl(void); -void ENGINE_load_dynamic(void); -# ifndef OPENSSL_NO_STATIC_ENGINE -void ENGINE_load_4758cca(void); -void ENGINE_load_aep(void); -void ENGINE_load_atalla(void); -void ENGINE_load_chil(void); -void ENGINE_load_cswift(void); -void ENGINE_load_nuron(void); -void ENGINE_load_sureware(void); -void ENGINE_load_ubsec(void); -void ENGINE_load_padlock(void); -void ENGINE_load_capi(void); -# ifndef OPENSSL_NO_GMP -void ENGINE_load_gmp(void); -# endif -# ifndef OPENSSL_NO_GOST -void ENGINE_load_gost(void); -# endif -# endif -void ENGINE_load_cryptodev(void); -void ENGINE_load_rdrand(void); -void ENGINE_load_builtin_engines(void); - -/* - * Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation - * "registry" handling. - */ -unsigned int ENGINE_get_table_flags(void); -void ENGINE_set_table_flags(unsigned int flags); - -/*- Manage registration of ENGINEs per "table". For each type, there are 3 - * functions; - * ENGINE_register_***(e) - registers the implementation from 'e' (if it has one) - * ENGINE_unregister_***(e) - unregister the implementation from 'e' - * ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list - * Cleanup is automatically registered from each table when required, so - * ENGINE_cleanup() will reverse any "register" operations. - */ - -int ENGINE_register_RSA(ENGINE *e); -void ENGINE_unregister_RSA(ENGINE *e); -void ENGINE_register_all_RSA(void); - -int ENGINE_register_DSA(ENGINE *e); -void ENGINE_unregister_DSA(ENGINE *e); -void ENGINE_register_all_DSA(void); - -int ENGINE_register_ECDH(ENGINE *e); -void ENGINE_unregister_ECDH(ENGINE *e); -void ENGINE_register_all_ECDH(void); - -int ENGINE_register_ECDSA(ENGINE *e); -void ENGINE_unregister_ECDSA(ENGINE *e); -void ENGINE_register_all_ECDSA(void); - -int ENGINE_register_DH(ENGINE *e); -void ENGINE_unregister_DH(ENGINE *e); -void ENGINE_register_all_DH(void); - -int ENGINE_register_RAND(ENGINE *e); -void ENGINE_unregister_RAND(ENGINE *e); -void ENGINE_register_all_RAND(void); - -int ENGINE_register_STORE(ENGINE *e); -void ENGINE_unregister_STORE(ENGINE *e); -void ENGINE_register_all_STORE(void); - -int ENGINE_register_ciphers(ENGINE *e); -void ENGINE_unregister_ciphers(ENGINE *e); -void ENGINE_register_all_ciphers(void); - -int ENGINE_register_digests(ENGINE *e); -void ENGINE_unregister_digests(ENGINE *e); -void ENGINE_register_all_digests(void); - -int ENGINE_register_pkey_meths(ENGINE *e); -void ENGINE_unregister_pkey_meths(ENGINE *e); -void ENGINE_register_all_pkey_meths(void); - -int ENGINE_register_pkey_asn1_meths(ENGINE *e); -void ENGINE_unregister_pkey_asn1_meths(ENGINE *e); -void ENGINE_register_all_pkey_asn1_meths(void); - -/* - * These functions register all support from the above categories. Note, use - * of these functions can result in static linkage of code your application - * may not need. If you only need a subset of functionality, consider using - * more selective initialisation. - */ -int ENGINE_register_complete(ENGINE *e); -int ENGINE_register_all_complete(void); - -/* - * Send parametrised control commands to the engine. The possibilities to - * send down an integer, a pointer to data or a function pointer are - * provided. Any of the parameters may or may not be NULL, depending on the - * command number. In actuality, this function only requires a structural - * (rather than functional) reference to an engine, but many control commands - * may require the engine be functional. The caller should be aware of trying - * commands that require an operational ENGINE, and only use functional - * references in such situations. - */ -int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)); - -/* - * This function tests if an ENGINE-specific command is usable as a - * "setting". Eg. in an application's config file that gets processed through - * ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to - * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl(). - */ -int ENGINE_cmd_is_executable(ENGINE *e, int cmd); - -/* - * This function works like ENGINE_ctrl() with the exception of taking a - * command name instead of a command number, and can handle optional - * commands. See the comment on ENGINE_ctrl_cmd_string() for an explanation - * on how to use the cmd_name and cmd_optional. - */ -int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, - long i, void *p, void (*f) (void), int cmd_optional); - -/* - * This function passes a command-name and argument to an ENGINE. The - * cmd_name is converted to a command number and the control command is - * called using 'arg' as an argument (unless the ENGINE doesn't support such - * a command, in which case no control command is called). The command is - * checked for input flags, and if necessary the argument will be converted - * to a numeric value. If cmd_optional is non-zero, then if the ENGINE - * doesn't support the given cmd_name the return value will be success - * anyway. This function is intended for applications to use so that users - * (or config files) can supply engine-specific config data to the ENGINE at - * run-time to control behaviour of specific engines. As such, it shouldn't - * be used for calling ENGINE_ctrl() functions that return data, deal with - * binary data, or that are otherwise supposed to be used directly through - * ENGINE_ctrl() in application code. Any "return" data from an ENGINE_ctrl() - * operation in this function will be lost - the return value is interpreted - * as failure if the return value is zero, success otherwise, and this - * function returns a boolean value as a result. In other words, vendors of - * 'ENGINE'-enabled devices should write ENGINE implementations with - * parameterisations that work in this scheme, so that compliant ENGINE-based - * applications can work consistently with the same configuration for the - * same ENGINE-enabled devices, across applications. - */ -int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, - int cmd_optional); - -/* - * These functions are useful for manufacturing new ENGINE structures. They - * don't address reference counting at all - one uses them to populate an - * ENGINE structure with personalised implementations of things prior to - * using it directly or adding it to the builtin ENGINE list in OpenSSL. - * These are also here so that the ENGINE structure doesn't have to be - * exposed and break binary compatibility! - */ -ENGINE *ENGINE_new(void); -int ENGINE_free(ENGINE *e); -int ENGINE_up_ref(ENGINE *e); -int ENGINE_set_id(ENGINE *e, const char *id); -int ENGINE_set_name(ENGINE *e, const char *name); -int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); -int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); -int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth); -int ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *ecdsa_meth); -int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); -int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); -int ENGINE_set_STORE(ENGINE *e, const STORE_METHOD *store_meth); -int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f); -int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f); -int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f); -int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f); -int ENGINE_set_load_privkey_function(ENGINE *e, - ENGINE_LOAD_KEY_PTR loadpriv_f); -int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f); -int ENGINE_set_load_ssl_client_cert_function(ENGINE *e, - ENGINE_SSL_CLIENT_CERT_PTR - loadssl_f); -int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); -int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); -int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f); -int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f); -int ENGINE_set_flags(ENGINE *e, int flags); -int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); -/* These functions allow control over any per-structure ENGINE data. */ -int ENGINE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); -int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg); -void *ENGINE_get_ex_data(const ENGINE *e, int idx); - -/* - * This function cleans up anything that needs it. Eg. the ENGINE_add() - * function automatically ensures the list cleanup function is registered to - * be called from ENGINE_cleanup(). Similarly, all ENGINE_register_*** - * functions ensure ENGINE_cleanup() will clean up after them. - */ -void ENGINE_cleanup(void); - -/* - * These return values from within the ENGINE structure. These can be useful - * with functional references as well as structural references - it depends - * which you obtained. Using the result for functional purposes if you only - * obtained a structural reference may be problematic! - */ -const char *ENGINE_get_id(const ENGINE *e); -const char *ENGINE_get_name(const ENGINE *e); -const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); -const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); -const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e); -const ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e); -const DH_METHOD *ENGINE_get_DH(const ENGINE *e); -const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); -const STORE_METHOD *ENGINE_get_STORE(const ENGINE *e); -ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e); -ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e); -ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e); -ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e); -ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e); -ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e); -ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE - *e); -ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); -ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); -ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e); -ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e); -const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); -const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); -const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid); -const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid); -const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e, - const char *str, - int len); -const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe, - const char *str, - int len); -const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); -int ENGINE_get_flags(const ENGINE *e); - -/* - * FUNCTIONAL functions. These functions deal with ENGINE structures that - * have (or will) be initialised for use. Broadly speaking, the structural - * functions are useful for iterating the list of available engine types, - * creating new engine types, and other "list" operations. These functions - * actually deal with ENGINEs that are to be used. As such these functions - * can fail (if applicable) when particular engines are unavailable - eg. if - * a hardware accelerator is not attached or not functioning correctly. Each - * ENGINE has 2 reference counts; structural and functional. Every time a - * functional reference is obtained or released, a corresponding structural - * reference is automatically obtained or released too. - */ - -/* - * Initialise a engine type for use (or up its reference count if it's - * already in use). This will fail if the engine is not currently operational - * and cannot initialise. - */ -int ENGINE_init(ENGINE *e); -/* - * Free a functional reference to a engine type. This does not require a - * corresponding call to ENGINE_free as it also releases a structural - * reference. - */ -int ENGINE_finish(ENGINE *e); - -/* - * The following functions handle keys that are stored in some secondary - * location, handled by the engine. The storage may be on a card or - * whatever. - */ -EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, - UI_METHOD *ui_method, void *callback_data); -EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, - UI_METHOD *ui_method, void *callback_data); -int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, - STACK_OF(X509_NAME) *ca_dn, X509 **pcert, - EVP_PKEY **ppkey, STACK_OF(X509) **pother, - UI_METHOD *ui_method, void *callback_data); - -/* - * This returns a pointer for the current ENGINE structure that is (by - * default) performing any RSA operations. The value returned is an - * incremented reference, so it should be free'd (ENGINE_finish) before it is - * discarded. - */ -ENGINE *ENGINE_get_default_RSA(void); -/* Same for the other "methods" */ -ENGINE *ENGINE_get_default_DSA(void); -ENGINE *ENGINE_get_default_ECDH(void); -ENGINE *ENGINE_get_default_ECDSA(void); -ENGINE *ENGINE_get_default_DH(void); -ENGINE *ENGINE_get_default_RAND(void); -/* - * These functions can be used to get a functional reference to perform - * ciphering or digesting corresponding to "nid". - */ -ENGINE *ENGINE_get_cipher_engine(int nid); -ENGINE *ENGINE_get_digest_engine(int nid); -ENGINE *ENGINE_get_pkey_meth_engine(int nid); -ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid); - -/* - * This sets a new default ENGINE structure for performing RSA operations. If - * the result is non-zero (success) then the ENGINE structure will have had - * its reference count up'd so the caller should still free their own - * reference 'e'. - */ -int ENGINE_set_default_RSA(ENGINE *e); -int ENGINE_set_default_string(ENGINE *e, const char *def_list); -/* Same for the other "methods" */ -int ENGINE_set_default_DSA(ENGINE *e); -int ENGINE_set_default_ECDH(ENGINE *e); -int ENGINE_set_default_ECDSA(ENGINE *e); -int ENGINE_set_default_DH(ENGINE *e); -int ENGINE_set_default_RAND(ENGINE *e); -int ENGINE_set_default_ciphers(ENGINE *e); -int ENGINE_set_default_digests(ENGINE *e); -int ENGINE_set_default_pkey_meths(ENGINE *e); -int ENGINE_set_default_pkey_asn1_meths(ENGINE *e); - -/* - * The combination "set" - the flags are bitwise "OR"d from the - * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()" - * function, this function can result in unnecessary static linkage. If your - * application requires only specific functionality, consider using more - * selective functions. - */ -int ENGINE_set_default(ENGINE *e, unsigned int flags); - -void ENGINE_add_conf_module(void); - -/* Deprecated functions ... */ -/* int ENGINE_clear_defaults(void); */ - -/**************************/ -/* DYNAMIC ENGINE SUPPORT */ -/**************************/ - -/* Binary/behaviour compatibility levels */ -# define OSSL_DYNAMIC_VERSION (unsigned long)0x00020000 -/* - * Binary versions older than this are too old for us (whether we're a loader - * or a loadee) - */ -# define OSSL_DYNAMIC_OLDEST (unsigned long)0x00020000 - -/* - * When compiling an ENGINE entirely as an external shared library, loadable - * by the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' - * structure type provides the calling application's (or library's) error - * functionality and memory management function pointers to the loaded - * library. These should be used/set in the loaded library code so that the - * loading application's 'state' will be used/changed in all operations. The - * 'static_state' pointer allows the loaded library to know if it shares the - * same static data as the calling application (or library), and thus whether - * these callbacks need to be set or not. - */ -typedef void *(*dyn_MEM_malloc_cb) (size_t); -typedef void *(*dyn_MEM_realloc_cb) (void *, size_t); -typedef void (*dyn_MEM_free_cb) (void *); -typedef struct st_dynamic_MEM_fns { - dyn_MEM_malloc_cb malloc_cb; - dyn_MEM_realloc_cb realloc_cb; - dyn_MEM_free_cb free_cb; -} dynamic_MEM_fns; -/* - * FIXME: Perhaps the memory and locking code (crypto.h) should declare and - * use these types so we (and any other dependant code) can simplify a bit?? - */ -typedef void (*dyn_lock_locking_cb) (int, int, const char *, int); -typedef int (*dyn_lock_add_lock_cb) (int *, int, int, const char *, int); -typedef struct CRYPTO_dynlock_value *(*dyn_dynlock_create_cb) (const char *, - int); -typedef void (*dyn_dynlock_lock_cb) (int, struct CRYPTO_dynlock_value *, - const char *, int); -typedef void (*dyn_dynlock_destroy_cb) (struct CRYPTO_dynlock_value *, - const char *, int); -typedef struct st_dynamic_LOCK_fns { - dyn_lock_locking_cb lock_locking_cb; - dyn_lock_add_lock_cb lock_add_lock_cb; - dyn_dynlock_create_cb dynlock_create_cb; - dyn_dynlock_lock_cb dynlock_lock_cb; - dyn_dynlock_destroy_cb dynlock_destroy_cb; -} dynamic_LOCK_fns; -/* The top-level structure */ -typedef struct st_dynamic_fns { - void *static_state; - const ERR_FNS *err_fns; - const CRYPTO_EX_DATA_IMPL *ex_data_fns; - dynamic_MEM_fns mem_fns; - dynamic_LOCK_fns lock_fns; -} dynamic_fns; - -/* - * The version checking function should be of this prototype. NB: The - * ossl_version value passed in is the OSSL_DYNAMIC_VERSION of the loading - * code. If this function returns zero, it indicates a (potential) version - * incompatibility and the loaded library doesn't believe it can proceed. - * Otherwise, the returned value is the (latest) version supported by the - * loading library. The loader may still decide that the loaded code's - * version is unsatisfactory and could veto the load. The function is - * expected to be implemented with the symbol name "v_check", and a default - * implementation can be fully instantiated with - * IMPLEMENT_DYNAMIC_CHECK_FN(). - */ -typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version); -# define IMPLEMENT_DYNAMIC_CHECK_FN() \ - OPENSSL_EXPORT unsigned long v_check(unsigned long v); \ - OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ - if(v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \ - return 0; } - -/* - * This function is passed the ENGINE structure to initialise with its own - * function and command settings. It should not adjust the structural or - * functional reference counts. If this function returns zero, (a) the load - * will be aborted, (b) the previous ENGINE state will be memcpy'd back onto - * the structure, and (c) the shared library will be unloaded. So - * implementations should do their own internal cleanup in failure - * circumstances otherwise they could leak. The 'id' parameter, if non-NULL, - * represents the ENGINE id that the loader is looking for. If this is NULL, - * the shared library can choose to return failure or to initialise a - * 'default' ENGINE. If non-NULL, the shared library must initialise only an - * ENGINE matching the passed 'id'. The function is expected to be - * implemented with the symbol name "bind_engine". A standard implementation - * can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where the parameter - * 'fn' is a callback function that populates the ENGINE structure and - * returns an int value (zero for failure). 'fn' should have prototype; - * [static] int fn(ENGINE *e, const char *id); - */ -typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id, - const dynamic_fns *fns); -# define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ - OPENSSL_EXPORT \ - int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \ - OPENSSL_EXPORT \ - int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ - if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \ - if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ - fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \ - return 0; \ - CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \ - CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \ - CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \ - CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \ - CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \ - if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \ - return 0; \ - if(!ERR_set_implementation(fns->err_fns)) return 0; \ - skip_cbs: \ - if(!fn(e,id)) return 0; \ - return 1; } - -/* - * If the loading application (or library) and the loaded ENGINE library - * share the same static data (eg. they're both dynamically linked to the - * same libcrypto.so) we need a way to avoid trying to set system callbacks - - * this would fail, and for the same reason that it's unnecessary to try. If - * the loaded ENGINE has (or gets from through the loader) its own copy of - * the libcrypto static data, we will need to set the callbacks. The easiest - * way to detect this is to have a function that returns a pointer to some - * static data and let the loading application and loaded ENGINE compare - * their respective values. - */ -void *ENGINE_get_static_state(void); - -# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) -void ENGINE_setup_bsd_cryptodev(void); -# endif - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_ENGINE_strings(void); - -/* Error codes for the ENGINE functions. */ - -/* Function codes. */ -# define ENGINE_F_DYNAMIC_CTRL 180 -# define ENGINE_F_DYNAMIC_GET_DATA_CTX 181 -# define ENGINE_F_DYNAMIC_LOAD 182 -# define ENGINE_F_DYNAMIC_SET_DATA_CTX 183 -# define ENGINE_F_ENGINE_ADD 105 -# define ENGINE_F_ENGINE_BY_ID 106 -# define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 170 -# define ENGINE_F_ENGINE_CTRL 142 -# define ENGINE_F_ENGINE_CTRL_CMD 178 -# define ENGINE_F_ENGINE_CTRL_CMD_STRING 171 -# define ENGINE_F_ENGINE_FINISH 107 -# define ENGINE_F_ENGINE_FREE_UTIL 108 -# define ENGINE_F_ENGINE_GET_CIPHER 185 -# define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177 -# define ENGINE_F_ENGINE_GET_DIGEST 186 -# define ENGINE_F_ENGINE_GET_NEXT 115 -# define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193 -# define ENGINE_F_ENGINE_GET_PKEY_METH 192 -# define ENGINE_F_ENGINE_GET_PREV 116 -# define ENGINE_F_ENGINE_INIT 119 -# define ENGINE_F_ENGINE_LIST_ADD 120 -# define ENGINE_F_ENGINE_LIST_REMOVE 121 -# define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 -# define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 -# define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194 -# define ENGINE_F_ENGINE_NEW 122 -# define ENGINE_F_ENGINE_REMOVE 123 -# define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189 -# define ENGINE_F_ENGINE_SET_DEFAULT_TYPE 126 -# define ENGINE_F_ENGINE_SET_ID 129 -# define ENGINE_F_ENGINE_SET_NAME 130 -# define ENGINE_F_ENGINE_TABLE_REGISTER 184 -# define ENGINE_F_ENGINE_UNLOAD_KEY 152 -# define ENGINE_F_ENGINE_UNLOCKED_FINISH 191 -# define ENGINE_F_ENGINE_UP_REF 190 -# define ENGINE_F_INT_CTRL_HELPER 172 -# define ENGINE_F_INT_ENGINE_CONFIGURE 188 -# define ENGINE_F_INT_ENGINE_MODULE_INIT 187 -# define ENGINE_F_LOG_MESSAGE 141 - -/* Reason codes. */ -# define ENGINE_R_ALREADY_LOADED 100 -# define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133 -# define ENGINE_R_CMD_NOT_EXECUTABLE 134 -# define ENGINE_R_COMMAND_TAKES_INPUT 135 -# define ENGINE_R_COMMAND_TAKES_NO_INPUT 136 -# define ENGINE_R_CONFLICTING_ENGINE_ID 103 -# define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 -# define ENGINE_R_DH_NOT_IMPLEMENTED 139 -# define ENGINE_R_DSA_NOT_IMPLEMENTED 140 -# define ENGINE_R_DSO_FAILURE 104 -# define ENGINE_R_DSO_NOT_FOUND 132 -# define ENGINE_R_ENGINES_SECTION_ERROR 148 -# define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102 -# define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 -# define ENGINE_R_ENGINE_SECTION_ERROR 149 -# define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 -# define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 -# define ENGINE_R_FINISH_FAILED 106 -# define ENGINE_R_GET_HANDLE_FAILED 107 -# define ENGINE_R_ID_OR_NAME_MISSING 108 -# define ENGINE_R_INIT_FAILED 109 -# define ENGINE_R_INTERNAL_LIST_ERROR 110 -# define ENGINE_R_INVALID_ARGUMENT 143 -# define ENGINE_R_INVALID_CMD_NAME 137 -# define ENGINE_R_INVALID_CMD_NUMBER 138 -# define ENGINE_R_INVALID_INIT_VALUE 151 -# define ENGINE_R_INVALID_STRING 150 -# define ENGINE_R_NOT_INITIALISED 117 -# define ENGINE_R_NOT_LOADED 112 -# define ENGINE_R_NO_CONTROL_FUNCTION 120 -# define ENGINE_R_NO_INDEX 144 -# define ENGINE_R_NO_LOAD_FUNCTION 125 -# define ENGINE_R_NO_REFERENCE 130 -# define ENGINE_R_NO_SUCH_ENGINE 116 -# define ENGINE_R_NO_UNLOAD_FUNCTION 126 -# define ENGINE_R_PROVIDE_PARAMETERS 113 -# define ENGINE_R_RSA_NOT_IMPLEMENTED 141 -# define ENGINE_R_UNIMPLEMENTED_CIPHER 146 -# define ENGINE_R_UNIMPLEMENTED_DIGEST 147 -# define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101 -# define ENGINE_R_VERSION_INCOMPATIBILITY 145 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ENGINE_H +# define HEADER_ENGINE_H + +# include + +# ifndef OPENSSL_NO_ENGINE +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# include +# include +# include +# include +# include +# include +# include +# endif +# include +# include +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +/* + * These flags are used to control combinations of algorithm (methods) by + * bitwise "OR"ing. + */ +# define ENGINE_METHOD_RSA (unsigned int)0x0001 +# define ENGINE_METHOD_DSA (unsigned int)0x0002 +# define ENGINE_METHOD_DH (unsigned int)0x0004 +# define ENGINE_METHOD_RAND (unsigned int)0x0008 +# define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 +# define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 +# define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200 +# define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400 +# define ENGINE_METHOD_EC (unsigned int)0x0800 +/* Obvious all-or-nothing cases. */ +# define ENGINE_METHOD_ALL (unsigned int)0xFFFF +# define ENGINE_METHOD_NONE (unsigned int)0x0000 + +/* + * This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used + * internally to control registration of ENGINE implementations, and can be + * set by ENGINE_set_table_flags(). The "NOINIT" flag prevents attempts to + * initialise registered ENGINEs if they are not already initialised. + */ +# define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001 + +/* ENGINE flags that can be set by ENGINE_set_flags(). */ +/* Not used */ +/* #define ENGINE_FLAGS_MALLOCED 0x0001 */ + +/* + * This flag is for ENGINEs that wish to handle the various 'CMD'-related + * control commands on their own. Without this flag, ENGINE_ctrl() handles + * these control commands on behalf of the ENGINE using their "cmd_defns" + * data. + */ +# define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002 + +/* + * This flag is for ENGINEs who return new duplicate structures when found + * via "ENGINE_by_id()". When an ENGINE must store state (eg. if + * ENGINE_ctrl() commands are called in sequence as part of some stateful + * process like key-generation setup and execution), it can set this flag - + * then each attempt to obtain the ENGINE will result in it being copied into + * a new structure. Normally, ENGINEs don't declare this flag so + * ENGINE_by_id() just increments the existing ENGINE's structural reference + * count. + */ +# define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 + +/* + * This flag if for an ENGINE that does not want its methods registered as + * part of ENGINE_register_all_complete() for example if the methods are not + * usable as default methods. + */ + +# define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008 + +/* + * ENGINEs can support their own command types, and these flags are used in + * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input + * each command expects. Currently only numeric and string input is + * supported. If a control command supports none of the _NUMERIC, _STRING, or + * _NO_INPUT options, then it is regarded as an "internal" control command - + * and not for use in config setting situations. As such, they're not + * available to the ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl() + * access. Changes to this list of 'command types' should be reflected + * carefully in ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string(). + */ + +/* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */ +# define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001 +/* + * accepts string input (cast from 'void*' to 'const char *', 4th parameter + * to ENGINE_ctrl) + */ +# define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002 +/* + * Indicates that the control command takes *no* input. Ie. the control + * command is unparameterised. + */ +# define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004 +/* + * Indicates that the control command is internal. This control command won't + * be shown in any output, and is only usable through the ENGINE_ctrl_cmd() + * function. + */ +# define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008 + +/* + * NB: These 3 control commands are deprecated and should not be used. + * ENGINEs relying on these commands should compile conditional support for + * compatibility (eg. if these symbols are defined) but should also migrate + * the same functionality to their own ENGINE-specific control functions that + * can be "discovered" by calling applications. The fact these control + * commands wouldn't be "executable" (ie. usable by text-based config) + * doesn't change the fact that application code can find and use them + * without requiring per-ENGINE hacking. + */ + +/* + * These flags are used to tell the ctrl function what should be done. All + * command numbers are shared between all engines, even if some don't make + * sense to some engines. In such a case, they do nothing but return the + * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. + */ +# define ENGINE_CTRL_SET_LOGSTREAM 1 +# define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2 +# define ENGINE_CTRL_HUP 3/* Close and reinitialise + * any handles/connections + * etc. */ +# define ENGINE_CTRL_SET_USER_INTERFACE 4/* Alternative to callback */ +# define ENGINE_CTRL_SET_CALLBACK_DATA 5/* User-specific data, used + * when calling the password + * callback and the user + * interface */ +# define ENGINE_CTRL_LOAD_CONFIGURATION 6/* Load a configuration, + * given a string that + * represents a file name + * or so */ +# define ENGINE_CTRL_LOAD_SECTION 7/* Load data from a given + * section in the already + * loaded configuration */ + +/* + * These control commands allow an application to deal with an arbitrary + * engine in a dynamic way. Warn: Negative return values indicate errors FOR + * THESE COMMANDS because zero is used to indicate 'end-of-list'. Other + * commands, including ENGINE-specific command types, return zero for an + * error. An ENGINE can choose to implement these ctrl functions, and can + * internally manage things however it chooses - it does so by setting the + * ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise + * the ENGINE_ctrl() code handles this on the ENGINE's behalf using the + * cmd_defns data (set using ENGINE_set_cmd_defns()). This means an ENGINE's + * ctrl() handler need only implement its own commands - the above "meta" + * commands will be taken care of. + */ + +/* + * Returns non-zero if the supplied ENGINE has a ctrl() handler. If "not", + * then all the remaining control commands will return failure, so it is + * worth checking this first if the caller is trying to "discover" the + * engine's capabilities and doesn't want errors generated unnecessarily. + */ +# define ENGINE_CTRL_HAS_CTRL_FUNCTION 10 +/* + * Returns a positive command number for the first command supported by the + * engine. Returns zero if no ctrl commands are supported. + */ +# define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11 +/* + * The 'long' argument specifies a command implemented by the engine, and the + * return value is the next command supported, or zero if there are no more. + */ +# define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12 +/* + * The 'void*' argument is a command name (cast from 'const char *'), and the + * return value is the command that corresponds to it. + */ +# define ENGINE_CTRL_GET_CMD_FROM_NAME 13 +/* + * The next two allow a command to be converted into its corresponding string + * form. In each case, the 'long' argument supplies the command. In the + * NAME_LEN case, the return value is the length of the command name (not + * counting a trailing EOL). In the NAME case, the 'void*' argument must be a + * string buffer large enough, and it will be populated with the name of the + * command (WITH a trailing EOL). + */ +# define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14 +# define ENGINE_CTRL_GET_NAME_FROM_CMD 15 +/* The next two are similar but give a "short description" of a command. */ +# define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16 +# define ENGINE_CTRL_GET_DESC_FROM_CMD 17 +/* + * With this command, the return value is the OR'd combination of + * ENGINE_CMD_FLAG_*** values that indicate what kind of input a given + * engine-specific ctrl command expects. + */ +# define ENGINE_CTRL_GET_CMD_FLAGS 18 + +/* + * ENGINE implementations should start the numbering of their own control + * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). + */ +# define ENGINE_CMD_BASE 200 + +/* + * NB: These 2 nCipher "chil" control commands are deprecated, and their + * functionality is now available through ENGINE-specific control commands + * (exposed through the above-mentioned 'CMD'-handling). Code using these 2 + * commands should be migrated to the more general command handling before + * these are removed. + */ + +/* Flags specific to the nCipher "chil" engine */ +# define ENGINE_CTRL_CHIL_SET_FORKCHECK 100 + /* + * Depending on the value of the (long)i argument, this sets or + * unsets the SimpleForkCheck flag in the CHIL API to enable or + * disable checking and workarounds for applications that fork(). + */ +# define ENGINE_CTRL_CHIL_NO_LOCKING 101 + /* + * This prevents the initialisation function from providing mutex + * callbacks to the nCipher library. + */ + +/* + * If an ENGINE supports its own specific control commands and wishes the + * framework to handle the above 'ENGINE_CMD_***'-manipulation commands on + * its behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN + * entries to ENGINE_set_cmd_defns(). It should also implement a ctrl() + * handler that supports the stated commands (ie. the "cmd_num" entries as + * described by the array). NB: The array must be ordered in increasing order + * of cmd_num. "null-terminated" means that the last ENGINE_CMD_DEFN element + * has cmd_num set to zero and/or cmd_name set to NULL. + */ +typedef struct ENGINE_CMD_DEFN_st { + unsigned int cmd_num; /* The command number */ + const char *cmd_name; /* The command name itself */ + const char *cmd_desc; /* A short description of the command */ + unsigned int cmd_flags; /* The input the command expects */ +} ENGINE_CMD_DEFN; + +/* Generic function pointer */ +typedef int (*ENGINE_GEN_FUNC_PTR) (void); +/* Generic function pointer taking no arguments */ +typedef int (*ENGINE_GEN_INT_FUNC_PTR) (ENGINE *); +/* Specific control function pointer */ +typedef int (*ENGINE_CTRL_FUNC_PTR) (ENGINE *, int, long, void *, + void (*f) (void)); +/* Generic load_key function pointer */ +typedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *, + UI_METHOD *ui_method, + void *callback_data); +typedef int (*ENGINE_SSL_CLIENT_CERT_PTR) (ENGINE *, SSL *ssl, + STACK_OF(X509_NAME) *ca_dn, + X509 **pcert, EVP_PKEY **pkey, + STACK_OF(X509) **pother, + UI_METHOD *ui_method, + void *callback_data); +/*- + * These callback types are for an ENGINE's handler for cipher and digest logic. + * These handlers have these prototypes; + * int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid); + * int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid); + * Looking at how to implement these handlers in the case of cipher support, if + * the framework wants the EVP_CIPHER for 'nid', it will call; + * foo(e, &p_evp_cipher, NULL, nid); (return zero for failure) + * If the framework wants a list of supported 'nid's, it will call; + * foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error) + */ +/* + * Returns to a pointer to the array of supported cipher 'nid's. If the + * second parameter is non-NULL it is set to the size of the returned array. + */ +typedef int (*ENGINE_CIPHERS_PTR) (ENGINE *, const EVP_CIPHER **, + const int **, int); +typedef int (*ENGINE_DIGESTS_PTR) (ENGINE *, const EVP_MD **, const int **, + int); +typedef int (*ENGINE_PKEY_METHS_PTR) (ENGINE *, EVP_PKEY_METHOD **, + const int **, int); +typedef int (*ENGINE_PKEY_ASN1_METHS_PTR) (ENGINE *, EVP_PKEY_ASN1_METHOD **, + const int **, int); +/* + * STRUCTURE functions ... all of these functions deal with pointers to + * ENGINE structures where the pointers have a "structural reference". This + * means that their reference is to allowed access to the structure but it + * does not imply that the structure is functional. To simply increment or + * decrement the structural reference count, use ENGINE_by_id and + * ENGINE_free. NB: This is not required when iterating using ENGINE_get_next + * as it will automatically decrement the structural reference count of the + * "current" ENGINE and increment the structural reference count of the + * ENGINE it returns (unless it is NULL). + */ + +/* Get the first/last "ENGINE" type available. */ +ENGINE *ENGINE_get_first(void); +ENGINE *ENGINE_get_last(void); +/* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ +ENGINE *ENGINE_get_next(ENGINE *e); +ENGINE *ENGINE_get_prev(ENGINE *e); +/* Add another "ENGINE" type into the array. */ +int ENGINE_add(ENGINE *e); +/* Remove an existing "ENGINE" type from the array. */ +int ENGINE_remove(ENGINE *e); +/* Retrieve an engine from the list by its unique "id" value. */ +ENGINE *ENGINE_by_id(const char *id); + +#if OPENSSL_API_COMPAT < 0x10100000L +# define ENGINE_load_openssl() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_OPENSSL, NULL) +# define ENGINE_load_dynamic() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL) +# ifndef OPENSSL_NO_STATIC_ENGINE +# define ENGINE_load_padlock() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_PADLOCK, NULL) +# define ENGINE_load_capi() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CAPI, NULL) +# define ENGINE_load_afalg() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_AFALG, NULL) +# endif +# define ENGINE_load_cryptodev() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CRYPTODEV, NULL) +# define ENGINE_load_rdrand() \ + OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_RDRAND, NULL) +#endif +void ENGINE_load_builtin_engines(void); + +/* + * Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation + * "registry" handling. + */ +unsigned int ENGINE_get_table_flags(void); +void ENGINE_set_table_flags(unsigned int flags); + +/*- Manage registration of ENGINEs per "table". For each type, there are 3 + * functions; + * ENGINE_register_***(e) - registers the implementation from 'e' (if it has one) + * ENGINE_unregister_***(e) - unregister the implementation from 'e' + * ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list + * Cleanup is automatically registered from each table when required. + */ + +int ENGINE_register_RSA(ENGINE *e); +void ENGINE_unregister_RSA(ENGINE *e); +void ENGINE_register_all_RSA(void); + +int ENGINE_register_DSA(ENGINE *e); +void ENGINE_unregister_DSA(ENGINE *e); +void ENGINE_register_all_DSA(void); + +int ENGINE_register_EC(ENGINE *e); +void ENGINE_unregister_EC(ENGINE *e); +void ENGINE_register_all_EC(void); + +int ENGINE_register_DH(ENGINE *e); +void ENGINE_unregister_DH(ENGINE *e); +void ENGINE_register_all_DH(void); + +int ENGINE_register_RAND(ENGINE *e); +void ENGINE_unregister_RAND(ENGINE *e); +void ENGINE_register_all_RAND(void); + +int ENGINE_register_ciphers(ENGINE *e); +void ENGINE_unregister_ciphers(ENGINE *e); +void ENGINE_register_all_ciphers(void); + +int ENGINE_register_digests(ENGINE *e); +void ENGINE_unregister_digests(ENGINE *e); +void ENGINE_register_all_digests(void); + +int ENGINE_register_pkey_meths(ENGINE *e); +void ENGINE_unregister_pkey_meths(ENGINE *e); +void ENGINE_register_all_pkey_meths(void); + +int ENGINE_register_pkey_asn1_meths(ENGINE *e); +void ENGINE_unregister_pkey_asn1_meths(ENGINE *e); +void ENGINE_register_all_pkey_asn1_meths(void); + +/* + * These functions register all support from the above categories. Note, use + * of these functions can result in static linkage of code your application + * may not need. If you only need a subset of functionality, consider using + * more selective initialisation. + */ +int ENGINE_register_complete(ENGINE *e); +int ENGINE_register_all_complete(void); + +/* + * Send parameterised control commands to the engine. The possibilities to + * send down an integer, a pointer to data or a function pointer are + * provided. Any of the parameters may or may not be NULL, depending on the + * command number. In actuality, this function only requires a structural + * (rather than functional) reference to an engine, but many control commands + * may require the engine be functional. The caller should be aware of trying + * commands that require an operational ENGINE, and only use functional + * references in such situations. + */ +int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)); + +/* + * This function tests if an ENGINE-specific command is usable as a + * "setting". Eg. in an application's config file that gets processed through + * ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to + * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl(). + */ +int ENGINE_cmd_is_executable(ENGINE *e, int cmd); + +/* + * This function works like ENGINE_ctrl() with the exception of taking a + * command name instead of a command number, and can handle optional + * commands. See the comment on ENGINE_ctrl_cmd_string() for an explanation + * on how to use the cmd_name and cmd_optional. + */ +int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, + long i, void *p, void (*f) (void), int cmd_optional); + +/* + * This function passes a command-name and argument to an ENGINE. The + * cmd_name is converted to a command number and the control command is + * called using 'arg' as an argument (unless the ENGINE doesn't support such + * a command, in which case no control command is called). The command is + * checked for input flags, and if necessary the argument will be converted + * to a numeric value. If cmd_optional is non-zero, then if the ENGINE + * doesn't support the given cmd_name the return value will be success + * anyway. This function is intended for applications to use so that users + * (or config files) can supply engine-specific config data to the ENGINE at + * run-time to control behaviour of specific engines. As such, it shouldn't + * be used for calling ENGINE_ctrl() functions that return data, deal with + * binary data, or that are otherwise supposed to be used directly through + * ENGINE_ctrl() in application code. Any "return" data from an ENGINE_ctrl() + * operation in this function will be lost - the return value is interpreted + * as failure if the return value is zero, success otherwise, and this + * function returns a boolean value as a result. In other words, vendors of + * 'ENGINE'-enabled devices should write ENGINE implementations with + * parameterisations that work in this scheme, so that compliant ENGINE-based + * applications can work consistently with the same configuration for the + * same ENGINE-enabled devices, across applications. + */ +int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, + int cmd_optional); + +/* + * These functions are useful for manufacturing new ENGINE structures. They + * don't address reference counting at all - one uses them to populate an + * ENGINE structure with personalised implementations of things prior to + * using it directly or adding it to the builtin ENGINE list in OpenSSL. + * These are also here so that the ENGINE structure doesn't have to be + * exposed and break binary compatibility! + */ +ENGINE *ENGINE_new(void); +int ENGINE_free(ENGINE *e); +int ENGINE_up_ref(ENGINE *e); +int ENGINE_set_id(ENGINE *e, const char *id); +int ENGINE_set_name(ENGINE *e, const char *name); +int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); +int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); +int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth); +int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); +int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); +int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f); +int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f); +int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f); +int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f); +int ENGINE_set_load_privkey_function(ENGINE *e, + ENGINE_LOAD_KEY_PTR loadpriv_f); +int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f); +int ENGINE_set_load_ssl_client_cert_function(ENGINE *e, + ENGINE_SSL_CLIENT_CERT_PTR + loadssl_f); +int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); +int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); +int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f); +int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f); +int ENGINE_set_flags(ENGINE *e, int flags); +int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); +/* These functions allow control over any per-structure ENGINE data. */ +#define ENGINE_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, l, p, newf, dupf, freef) +int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg); +void *ENGINE_get_ex_data(const ENGINE *e, int idx); + +#if OPENSSL_API_COMPAT < 0x10100000L +/* + * This function previously cleaned up anything that needs it. Auto-deinit will + * now take care of it so it is no longer required to call this function. + */ +# define ENGINE_cleanup() while(0) continue +#endif + +/* + * These return values from within the ENGINE structure. These can be useful + * with functional references as well as structural references - it depends + * which you obtained. Using the result for functional purposes if you only + * obtained a structural reference may be problematic! + */ +const char *ENGINE_get_id(const ENGINE *e); +const char *ENGINE_get_name(const ENGINE *e); +const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); +const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); +const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); +const DH_METHOD *ENGINE_get_DH(const ENGINE *e); +const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); +ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e); +ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e); +ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e); +ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e); +ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e); +ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e); +ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE + *e); +ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); +ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); +ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e); +ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e); +const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); +const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); +const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid); +const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid); +const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e, + const char *str, + int len); +const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe, + const char *str, + int len); +const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); +int ENGINE_get_flags(const ENGINE *e); + +/* + * FUNCTIONAL functions. These functions deal with ENGINE structures that + * have (or will) be initialised for use. Broadly speaking, the structural + * functions are useful for iterating the list of available engine types, + * creating new engine types, and other "list" operations. These functions + * actually deal with ENGINEs that are to be used. As such these functions + * can fail (if applicable) when particular engines are unavailable - eg. if + * a hardware accelerator is not attached or not functioning correctly. Each + * ENGINE has 2 reference counts; structural and functional. Every time a + * functional reference is obtained or released, a corresponding structural + * reference is automatically obtained or released too. + */ + +/* + * Initialise a engine type for use (or up its reference count if it's + * already in use). This will fail if the engine is not currently operational + * and cannot initialise. + */ +int ENGINE_init(ENGINE *e); +/* + * Free a functional reference to a engine type. This does not require a + * corresponding call to ENGINE_free as it also releases a structural + * reference. + */ +int ENGINE_finish(ENGINE *e); + +/* + * The following functions handle keys that are stored in some secondary + * location, handled by the engine. The storage may be on a card or + * whatever. + */ +EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, + UI_METHOD *ui_method, void *callback_data); +EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, + UI_METHOD *ui_method, void *callback_data); +int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, + STACK_OF(X509_NAME) *ca_dn, X509 **pcert, + EVP_PKEY **ppkey, STACK_OF(X509) **pother, + UI_METHOD *ui_method, void *callback_data); + +/* + * This returns a pointer for the current ENGINE structure that is (by + * default) performing any RSA operations. The value returned is an + * incremented reference, so it should be free'd (ENGINE_finish) before it is + * discarded. + */ +ENGINE *ENGINE_get_default_RSA(void); +/* Same for the other "methods" */ +ENGINE *ENGINE_get_default_DSA(void); +ENGINE *ENGINE_get_default_EC(void); +ENGINE *ENGINE_get_default_DH(void); +ENGINE *ENGINE_get_default_RAND(void); +/* + * These functions can be used to get a functional reference to perform + * ciphering or digesting corresponding to "nid". + */ +ENGINE *ENGINE_get_cipher_engine(int nid); +ENGINE *ENGINE_get_digest_engine(int nid); +ENGINE *ENGINE_get_pkey_meth_engine(int nid); +ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid); + +/* + * This sets a new default ENGINE structure for performing RSA operations. If + * the result is non-zero (success) then the ENGINE structure will have had + * its reference count up'd so the caller should still free their own + * reference 'e'. + */ +int ENGINE_set_default_RSA(ENGINE *e); +int ENGINE_set_default_string(ENGINE *e, const char *def_list); +/* Same for the other "methods" */ +int ENGINE_set_default_DSA(ENGINE *e); +int ENGINE_set_default_EC(ENGINE *e); +int ENGINE_set_default_DH(ENGINE *e); +int ENGINE_set_default_RAND(ENGINE *e); +int ENGINE_set_default_ciphers(ENGINE *e); +int ENGINE_set_default_digests(ENGINE *e); +int ENGINE_set_default_pkey_meths(ENGINE *e); +int ENGINE_set_default_pkey_asn1_meths(ENGINE *e); + +/* + * The combination "set" - the flags are bitwise "OR"d from the + * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()" + * function, this function can result in unnecessary static linkage. If your + * application requires only specific functionality, consider using more + * selective functions. + */ +int ENGINE_set_default(ENGINE *e, unsigned int flags); + +void ENGINE_add_conf_module(void); + +/* Deprecated functions ... */ +/* int ENGINE_clear_defaults(void); */ + +/**************************/ +/* DYNAMIC ENGINE SUPPORT */ +/**************************/ + +/* Binary/behaviour compatibility levels */ +# define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000 +/* + * Binary versions older than this are too old for us (whether we're a loader + * or a loadee) + */ +# define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000 + +/* + * When compiling an ENGINE entirely as an external shared library, loadable + * by the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' + * structure type provides the calling application's (or library's) error + * functionality and memory management function pointers to the loaded + * library. These should be used/set in the loaded library code so that the + * loading application's 'state' will be used/changed in all operations. The + * 'static_state' pointer allows the loaded library to know if it shares the + * same static data as the calling application (or library), and thus whether + * these callbacks need to be set or not. + */ +typedef void *(*dyn_MEM_malloc_fn) (size_t, const char *, int); +typedef void *(*dyn_MEM_realloc_fn) (void *, size_t, const char *, int); +typedef void (*dyn_MEM_free_fn) (void *, const char *, int); +typedef struct st_dynamic_MEM_fns { + dyn_MEM_malloc_fn malloc_fn; + dyn_MEM_realloc_fn realloc_fn; + dyn_MEM_free_fn free_fn; +} dynamic_MEM_fns; +/* + * FIXME: Perhaps the memory and locking code (crypto.h) should declare and + * use these types so we (and any other dependent code) can simplify a bit?? + */ +/* The top-level structure */ +typedef struct st_dynamic_fns { + void *static_state; + dynamic_MEM_fns mem_fns; +} dynamic_fns; + +/* + * The version checking function should be of this prototype. NB: The + * ossl_version value passed in is the OSSL_DYNAMIC_VERSION of the loading + * code. If this function returns zero, it indicates a (potential) version + * incompatibility and the loaded library doesn't believe it can proceed. + * Otherwise, the returned value is the (latest) version supported by the + * loading library. The loader may still decide that the loaded code's + * version is unsatisfactory and could veto the load. The function is + * expected to be implemented with the symbol name "v_check", and a default + * implementation can be fully instantiated with + * IMPLEMENT_DYNAMIC_CHECK_FN(). + */ +typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version); +# define IMPLEMENT_DYNAMIC_CHECK_FN() \ + OPENSSL_EXPORT unsigned long v_check(unsigned long v); \ + OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ + if (v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \ + return 0; } + +/* + * This function is passed the ENGINE structure to initialise with its own + * function and command settings. It should not adjust the structural or + * functional reference counts. If this function returns zero, (a) the load + * will be aborted, (b) the previous ENGINE state will be memcpy'd back onto + * the structure, and (c) the shared library will be unloaded. So + * implementations should do their own internal cleanup in failure + * circumstances otherwise they could leak. The 'id' parameter, if non-NULL, + * represents the ENGINE id that the loader is looking for. If this is NULL, + * the shared library can choose to return failure or to initialise a + * 'default' ENGINE. If non-NULL, the shared library must initialise only an + * ENGINE matching the passed 'id'. The function is expected to be + * implemented with the symbol name "bind_engine". A standard implementation + * can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where the parameter + * 'fn' is a callback function that populates the ENGINE structure and + * returns an int value (zero for failure). 'fn' should have prototype; + * [static] int fn(ENGINE *e, const char *id); + */ +typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id, + const dynamic_fns *fns); +# define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ + OPENSSL_EXPORT \ + int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \ + OPENSSL_EXPORT \ + int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ + if (ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \ + CRYPTO_set_mem_functions(fns->mem_fns.malloc_fn, \ + fns->mem_fns.realloc_fn, \ + fns->mem_fns.free_fn); \ + skip_cbs: \ + if (!fn(e, id)) return 0; \ + return 1; } + +/* + * If the loading application (or library) and the loaded ENGINE library + * share the same static data (eg. they're both dynamically linked to the + * same libcrypto.so) we need a way to avoid trying to set system callbacks - + * this would fail, and for the same reason that it's unnecessary to try. If + * the loaded ENGINE has (or gets from through the loader) its own copy of + * the libcrypto static data, we will need to set the callbacks. The easiest + * way to detect this is to have a function that returns a pointer to some + * static data and let the loading application and loaded ENGINE compare + * their respective values. + */ +void *ENGINE_get_static_state(void); + +# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) +DEPRECATEDIN_1_1_0(void ENGINE_setup_bsd_cryptodev(void)) +# endif + + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/engineerr.h b/src/Mayaqua/win32_inc/openssl/engineerr.h new file mode 100644 index 00000000..05e84bd2 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/engineerr.h @@ -0,0 +1,111 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ENGINEERR_H +# define HEADER_ENGINEERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_ENGINE + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_ENGINE_strings(void); + +/* + * ENGINE function codes. + */ +# define ENGINE_F_DIGEST_UPDATE 198 +# define ENGINE_F_DYNAMIC_CTRL 180 +# define ENGINE_F_DYNAMIC_GET_DATA_CTX 181 +# define ENGINE_F_DYNAMIC_LOAD 182 +# define ENGINE_F_DYNAMIC_SET_DATA_CTX 183 +# define ENGINE_F_ENGINE_ADD 105 +# define ENGINE_F_ENGINE_BY_ID 106 +# define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 170 +# define ENGINE_F_ENGINE_CTRL 142 +# define ENGINE_F_ENGINE_CTRL_CMD 178 +# define ENGINE_F_ENGINE_CTRL_CMD_STRING 171 +# define ENGINE_F_ENGINE_FINISH 107 +# define ENGINE_F_ENGINE_GET_CIPHER 185 +# define ENGINE_F_ENGINE_GET_DIGEST 186 +# define ENGINE_F_ENGINE_GET_FIRST 195 +# define ENGINE_F_ENGINE_GET_LAST 196 +# define ENGINE_F_ENGINE_GET_NEXT 115 +# define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193 +# define ENGINE_F_ENGINE_GET_PKEY_METH 192 +# define ENGINE_F_ENGINE_GET_PREV 116 +# define ENGINE_F_ENGINE_INIT 119 +# define ENGINE_F_ENGINE_LIST_ADD 120 +# define ENGINE_F_ENGINE_LIST_REMOVE 121 +# define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 +# define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 +# define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194 +# define ENGINE_F_ENGINE_NEW 122 +# define ENGINE_F_ENGINE_PKEY_ASN1_FIND_STR 197 +# define ENGINE_F_ENGINE_REMOVE 123 +# define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189 +# define ENGINE_F_ENGINE_SET_ID 129 +# define ENGINE_F_ENGINE_SET_NAME 130 +# define ENGINE_F_ENGINE_TABLE_REGISTER 184 +# define ENGINE_F_ENGINE_UNLOCKED_FINISH 191 +# define ENGINE_F_ENGINE_UP_REF 190 +# define ENGINE_F_INT_CLEANUP_ITEM 199 +# define ENGINE_F_INT_CTRL_HELPER 172 +# define ENGINE_F_INT_ENGINE_CONFIGURE 188 +# define ENGINE_F_INT_ENGINE_MODULE_INIT 187 +# define ENGINE_F_OSSL_HMAC_INIT 200 + +/* + * ENGINE reason codes. + */ +# define ENGINE_R_ALREADY_LOADED 100 +# define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133 +# define ENGINE_R_CMD_NOT_EXECUTABLE 134 +# define ENGINE_R_COMMAND_TAKES_INPUT 135 +# define ENGINE_R_COMMAND_TAKES_NO_INPUT 136 +# define ENGINE_R_CONFLICTING_ENGINE_ID 103 +# define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 +# define ENGINE_R_DSO_FAILURE 104 +# define ENGINE_R_DSO_NOT_FOUND 132 +# define ENGINE_R_ENGINES_SECTION_ERROR 148 +# define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102 +# define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 +# define ENGINE_R_ENGINE_SECTION_ERROR 149 +# define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 +# define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 +# define ENGINE_R_FINISH_FAILED 106 +# define ENGINE_R_ID_OR_NAME_MISSING 108 +# define ENGINE_R_INIT_FAILED 109 +# define ENGINE_R_INTERNAL_LIST_ERROR 110 +# define ENGINE_R_INVALID_ARGUMENT 143 +# define ENGINE_R_INVALID_CMD_NAME 137 +# define ENGINE_R_INVALID_CMD_NUMBER 138 +# define ENGINE_R_INVALID_INIT_VALUE 151 +# define ENGINE_R_INVALID_STRING 150 +# define ENGINE_R_NOT_INITIALISED 117 +# define ENGINE_R_NOT_LOADED 112 +# define ENGINE_R_NO_CONTROL_FUNCTION 120 +# define ENGINE_R_NO_INDEX 144 +# define ENGINE_R_NO_LOAD_FUNCTION 125 +# define ENGINE_R_NO_REFERENCE 130 +# define ENGINE_R_NO_SUCH_ENGINE 116 +# define ENGINE_R_UNIMPLEMENTED_CIPHER 146 +# define ENGINE_R_UNIMPLEMENTED_DIGEST 147 +# define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101 +# define ENGINE_R_VERSION_INCOMPATIBILITY 145 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/err.h b/src/Mayaqua/win32_inc/openssl/err.h index 31142023..b49f8812 100644 --- a/src/Mayaqua/win32_inc/openssl/err.h +++ b/src/Mayaqua/win32_inc/openssl/err.h @@ -1,389 +1,274 @@ -/* crypto/err/err.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_ERR_H -# define HEADER_ERR_H - -# include - -# ifndef OPENSSL_NO_FP_API -# include -# include -# endif - -# include -# ifndef OPENSSL_NO_BIO -# include -# endif -# ifndef OPENSSL_NO_LHASH -# include -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# ifndef OPENSSL_NO_ERR -# define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e) -# else -# define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) -# endif - -# include - -# define ERR_TXT_MALLOCED 0x01 -# define ERR_TXT_STRING 0x02 - -# define ERR_FLAG_MARK 0x01 - -# define ERR_NUM_ERRORS 16 -typedef struct err_state_st { - CRYPTO_THREADID tid; - int err_flags[ERR_NUM_ERRORS]; - unsigned long err_buffer[ERR_NUM_ERRORS]; - char *err_data[ERR_NUM_ERRORS]; - int err_data_flags[ERR_NUM_ERRORS]; - const char *err_file[ERR_NUM_ERRORS]; - int err_line[ERR_NUM_ERRORS]; - int top, bottom; -} ERR_STATE; - -/* library */ -# define ERR_LIB_NONE 1 -# define ERR_LIB_SYS 2 -# define ERR_LIB_BN 3 -# define ERR_LIB_RSA 4 -# define ERR_LIB_DH 5 -# define ERR_LIB_EVP 6 -# define ERR_LIB_BUF 7 -# define ERR_LIB_OBJ 8 -# define ERR_LIB_PEM 9 -# define ERR_LIB_DSA 10 -# define ERR_LIB_X509 11 -/* #define ERR_LIB_METH 12 */ -# define ERR_LIB_ASN1 13 -# define ERR_LIB_CONF 14 -# define ERR_LIB_CRYPTO 15 -# define ERR_LIB_EC 16 -# define ERR_LIB_SSL 20 -/* #define ERR_LIB_SSL23 21 */ -/* #define ERR_LIB_SSL2 22 */ -/* #define ERR_LIB_SSL3 23 */ -/* #define ERR_LIB_RSAREF 30 */ -/* #define ERR_LIB_PROXY 31 */ -# define ERR_LIB_BIO 32 -# define ERR_LIB_PKCS7 33 -# define ERR_LIB_X509V3 34 -# define ERR_LIB_PKCS12 35 -# define ERR_LIB_RAND 36 -# define ERR_LIB_DSO 37 -# define ERR_LIB_ENGINE 38 -# define ERR_LIB_OCSP 39 -# define ERR_LIB_UI 40 -# define ERR_LIB_COMP 41 -# define ERR_LIB_ECDSA 42 -# define ERR_LIB_ECDH 43 -# define ERR_LIB_STORE 44 -# define ERR_LIB_FIPS 45 -# define ERR_LIB_CMS 46 -# define ERR_LIB_TS 47 -# define ERR_LIB_HMAC 48 -# define ERR_LIB_JPAKE 49 - -# define ERR_LIB_USER 128 - -# define SYSerr(f,r) ERR_PUT_error(ERR_LIB_SYS,(f),(r),__FILE__,__LINE__) -# define BNerr(f,r) ERR_PUT_error(ERR_LIB_BN,(f),(r),__FILE__,__LINE__) -# define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),__FILE__,__LINE__) -# define DHerr(f,r) ERR_PUT_error(ERR_LIB_DH,(f),(r),__FILE__,__LINE__) -# define EVPerr(f,r) ERR_PUT_error(ERR_LIB_EVP,(f),(r),__FILE__,__LINE__) -# define BUFerr(f,r) ERR_PUT_error(ERR_LIB_BUF,(f),(r),__FILE__,__LINE__) -# define OBJerr(f,r) ERR_PUT_error(ERR_LIB_OBJ,(f),(r),__FILE__,__LINE__) -# define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),__FILE__,__LINE__) -# define DSAerr(f,r) ERR_PUT_error(ERR_LIB_DSA,(f),(r),__FILE__,__LINE__) -# define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),__FILE__,__LINE__) -# define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),__FILE__,__LINE__) -# define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),__FILE__,__LINE__) -# define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),__FILE__,__LINE__) -# define ECerr(f,r) ERR_PUT_error(ERR_LIB_EC,(f),(r),__FILE__,__LINE__) -# define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__) -# define BIOerr(f,r) ERR_PUT_error(ERR_LIB_BIO,(f),(r),__FILE__,__LINE__) -# define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),__FILE__,__LINE__) -# define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),__FILE__,__LINE__) -# define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),__FILE__,__LINE__) -# define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),__FILE__,__LINE__) -# define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),__FILE__,__LINE__) -# define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),__FILE__,__LINE__) -# define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__) -# define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) -# define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) -# define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__) -# define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__) -# define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) -# define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) -# define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) -# define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__) -# define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__) -# define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__) - -/* - * Borland C seems too stupid to be able to shift and do longs in the - * pre-processor :-( - */ -# define ERR_PACK(l,f,r) (((((unsigned long)l)&0xffL)*0x1000000)| \ - ((((unsigned long)f)&0xfffL)*0x1000)| \ - ((((unsigned long)r)&0xfffL))) -# define ERR_GET_LIB(l) (int)((((unsigned long)l)>>24L)&0xffL) -# define ERR_GET_FUNC(l) (int)((((unsigned long)l)>>12L)&0xfffL) -# define ERR_GET_REASON(l) (int)((l)&0xfffL) -# define ERR_FATAL_ERROR(l) (int)((l)&ERR_R_FATAL) - -/* OS functions */ -# define SYS_F_FOPEN 1 -# define SYS_F_CONNECT 2 -# define SYS_F_GETSERVBYNAME 3 -# define SYS_F_SOCKET 4 -# define SYS_F_IOCTLSOCKET 5 -# define SYS_F_BIND 6 -# define SYS_F_LISTEN 7 -# define SYS_F_ACCEPT 8 -# define SYS_F_WSASTARTUP 9/* Winsock stuff */ -# define SYS_F_OPENDIR 10 -# define SYS_F_FREAD 11 - -/* reasons */ -# define ERR_R_SYS_LIB ERR_LIB_SYS/* 2 */ -# define ERR_R_BN_LIB ERR_LIB_BN/* 3 */ -# define ERR_R_RSA_LIB ERR_LIB_RSA/* 4 */ -# define ERR_R_DH_LIB ERR_LIB_DH/* 5 */ -# define ERR_R_EVP_LIB ERR_LIB_EVP/* 6 */ -# define ERR_R_BUF_LIB ERR_LIB_BUF/* 7 */ -# define ERR_R_OBJ_LIB ERR_LIB_OBJ/* 8 */ -# define ERR_R_PEM_LIB ERR_LIB_PEM/* 9 */ -# define ERR_R_DSA_LIB ERR_LIB_DSA/* 10 */ -# define ERR_R_X509_LIB ERR_LIB_X509/* 11 */ -# define ERR_R_ASN1_LIB ERR_LIB_ASN1/* 13 */ -# define ERR_R_CONF_LIB ERR_LIB_CONF/* 14 */ -# define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO/* 15 */ -# define ERR_R_EC_LIB ERR_LIB_EC/* 16 */ -# define ERR_R_SSL_LIB ERR_LIB_SSL/* 20 */ -# define ERR_R_BIO_LIB ERR_LIB_BIO/* 32 */ -# define ERR_R_PKCS7_LIB ERR_LIB_PKCS7/* 33 */ -# define ERR_R_X509V3_LIB ERR_LIB_X509V3/* 34 */ -# define ERR_R_PKCS12_LIB ERR_LIB_PKCS12/* 35 */ -# define ERR_R_RAND_LIB ERR_LIB_RAND/* 36 */ -# define ERR_R_DSO_LIB ERR_LIB_DSO/* 37 */ -# define ERR_R_ENGINE_LIB ERR_LIB_ENGINE/* 38 */ -# define ERR_R_OCSP_LIB ERR_LIB_OCSP/* 39 */ -# define ERR_R_UI_LIB ERR_LIB_UI/* 40 */ -# define ERR_R_COMP_LIB ERR_LIB_COMP/* 41 */ -# define ERR_R_ECDSA_LIB ERR_LIB_ECDSA/* 42 */ -# define ERR_R_ECDH_LIB ERR_LIB_ECDH/* 43 */ -# define ERR_R_STORE_LIB ERR_LIB_STORE/* 44 */ -# define ERR_R_TS_LIB ERR_LIB_TS/* 45 */ - -# define ERR_R_NESTED_ASN1_ERROR 58 -# define ERR_R_BAD_ASN1_OBJECT_HEADER 59 -# define ERR_R_BAD_GET_ASN1_OBJECT_CALL 60 -# define ERR_R_EXPECTING_AN_ASN1_SEQUENCE 61 -# define ERR_R_ASN1_LENGTH_MISMATCH 62 -# define ERR_R_MISSING_ASN1_EOS 63 - -/* fatal error */ -# define ERR_R_FATAL 64 -# define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) -# define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) -# define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) -# define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) -# define ERR_R_DISABLED (5|ERR_R_FATAL) - -/* - * 99 is the maximum possible ERR_R_... code, higher values are reserved for - * the individual libraries - */ - -typedef struct ERR_string_data_st { - unsigned long error; - const char *string; -} ERR_STRING_DATA; - -void ERR_put_error(int lib, int func, int reason, const char *file, int line); -void ERR_set_error_data(char *data, int flags); - -unsigned long ERR_get_error(void); -unsigned long ERR_get_error_line(const char **file, int *line); -unsigned long ERR_get_error_line_data(const char **file, int *line, - const char **data, int *flags); -unsigned long ERR_peek_error(void); -unsigned long ERR_peek_error_line(const char **file, int *line); -unsigned long ERR_peek_error_line_data(const char **file, int *line, - const char **data, int *flags); -unsigned long ERR_peek_last_error(void); -unsigned long ERR_peek_last_error_line(const char **file, int *line); -unsigned long ERR_peek_last_error_line_data(const char **file, int *line, - const char **data, int *flags); -void ERR_clear_error(void); -char *ERR_error_string(unsigned long e, char *buf); -void ERR_error_string_n(unsigned long e, char *buf, size_t len); -const char *ERR_lib_error_string(unsigned long e); -const char *ERR_func_error_string(unsigned long e); -const char *ERR_reason_error_string(unsigned long e); -void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u), - void *u); -# ifndef OPENSSL_NO_FP_API -void ERR_print_errors_fp(FILE *fp); -# endif -# ifndef OPENSSL_NO_BIO -void ERR_print_errors(BIO *bp); -# endif -void ERR_add_error_data(int num, ...); -void ERR_add_error_vdata(int num, va_list args); -void ERR_load_strings(int lib, ERR_STRING_DATA str[]); -void ERR_unload_strings(int lib, ERR_STRING_DATA str[]); -void ERR_load_ERR_strings(void); -void ERR_load_crypto_strings(void); -void ERR_free_strings(void); - -void ERR_remove_thread_state(const CRYPTO_THREADID *tid); -# ifndef OPENSSL_NO_DEPRECATED -void ERR_remove_state(unsigned long pid); /* if zero we look it up */ -# endif -ERR_STATE *ERR_get_state(void); - -# ifndef OPENSSL_NO_LHASH -LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void); -LHASH_OF(ERR_STATE) *ERR_get_err_state_table(void); -void ERR_release_err_state_table(LHASH_OF(ERR_STATE) **hash); -# endif - -int ERR_get_next_error_library(void); - -int ERR_set_mark(void); -int ERR_pop_to_mark(void); - -/* Already defined in ossl_typ.h */ -/* typedef struct st_ERR_FNS ERR_FNS; */ -/* - * An application can use this function and provide the return value to - * loaded modules that should use the application's ERR state/functionality - */ -const ERR_FNS *ERR_get_implementation(void); -/* - * A loaded module should call this function prior to any ERR operations - * using the application's "ERR_FNS". - */ -int ERR_set_implementation(const ERR_FNS *fns); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ERR_H +# define HEADER_ERR_H + +# include + +# ifndef OPENSSL_NO_STDIO +# include +# include +# endif + +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +# ifndef OPENSSL_NO_ERR +# define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e) +# else +# define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) +# endif + +# include + +# define ERR_TXT_MALLOCED 0x01 +# define ERR_TXT_STRING 0x02 + +# define ERR_FLAG_MARK 0x01 +# define ERR_FLAG_CLEAR 0x02 + +# define ERR_NUM_ERRORS 16 +typedef struct err_state_st { + int err_flags[ERR_NUM_ERRORS]; + unsigned long err_buffer[ERR_NUM_ERRORS]; + char *err_data[ERR_NUM_ERRORS]; + int err_data_flags[ERR_NUM_ERRORS]; + const char *err_file[ERR_NUM_ERRORS]; + int err_line[ERR_NUM_ERRORS]; + int top, bottom; +} ERR_STATE; + +/* library */ +# define ERR_LIB_NONE 1 +# define ERR_LIB_SYS 2 +# define ERR_LIB_BN 3 +# define ERR_LIB_RSA 4 +# define ERR_LIB_DH 5 +# define ERR_LIB_EVP 6 +# define ERR_LIB_BUF 7 +# define ERR_LIB_OBJ 8 +# define ERR_LIB_PEM 9 +# define ERR_LIB_DSA 10 +# define ERR_LIB_X509 11 +/* #define ERR_LIB_METH 12 */ +# define ERR_LIB_ASN1 13 +# define ERR_LIB_CONF 14 +# define ERR_LIB_CRYPTO 15 +# define ERR_LIB_EC 16 +# define ERR_LIB_SSL 20 +/* #define ERR_LIB_SSL23 21 */ +/* #define ERR_LIB_SSL2 22 */ +/* #define ERR_LIB_SSL3 23 */ +/* #define ERR_LIB_RSAREF 30 */ +/* #define ERR_LIB_PROXY 31 */ +# define ERR_LIB_BIO 32 +# define ERR_LIB_PKCS7 33 +# define ERR_LIB_X509V3 34 +# define ERR_LIB_PKCS12 35 +# define ERR_LIB_RAND 36 +# define ERR_LIB_DSO 37 +# define ERR_LIB_ENGINE 38 +# define ERR_LIB_OCSP 39 +# define ERR_LIB_UI 40 +# define ERR_LIB_COMP 41 +# define ERR_LIB_ECDSA 42 +# define ERR_LIB_ECDH 43 +# define ERR_LIB_OSSL_STORE 44 +# define ERR_LIB_FIPS 45 +# define ERR_LIB_CMS 46 +# define ERR_LIB_TS 47 +# define ERR_LIB_HMAC 48 +/* # define ERR_LIB_JPAKE 49 */ +# define ERR_LIB_CT 50 +# define ERR_LIB_ASYNC 51 +# define ERR_LIB_KDF 52 +# define ERR_LIB_SM2 53 + +# define ERR_LIB_USER 128 + +# define SYSerr(f,r) ERR_PUT_error(ERR_LIB_SYS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define BNerr(f,r) ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define DHerr(f,r) ERR_PUT_error(ERR_LIB_DH,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define EVPerr(f,r) ERR_PUT_error(ERR_LIB_EVP,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define BUFerr(f,r) ERR_PUT_error(ERR_LIB_BUF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define OBJerr(f,r) ERR_PUT_error(ERR_LIB_OBJ,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define DSAerr(f,r) ERR_PUT_error(ERR_LIB_DSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define ECerr(f,r) ERR_PUT_error(ERR_LIB_EC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define BIOerr(f,r) ERR_PUT_error(ERR_LIB_BIO,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define OSSL_STOREerr(f,r) ERR_PUT_error(ERR_LIB_OSSL_STORE,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define CTerr(f,r) ERR_PUT_error(ERR_LIB_CT,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) +# define SM2err(f,r) ERR_PUT_error(ERR_LIB_SM2,(f),(r),OPENSSL_FILE,OPENSSL_LINE) + +# define ERR_PACK(l,f,r) ( \ + (((unsigned int)(l) & 0x0FF) << 24L) | \ + (((unsigned int)(f) & 0xFFF) << 12L) | \ + (((unsigned int)(r) & 0xFFF) ) ) +# define ERR_GET_LIB(l) (int)(((l) >> 24L) & 0x0FFL) +# define ERR_GET_FUNC(l) (int)(((l) >> 12L) & 0xFFFL) +# define ERR_GET_REASON(l) (int)( (l) & 0xFFFL) +# define ERR_FATAL_ERROR(l) (int)( (l) & ERR_R_FATAL) + +/* OS functions */ +# define SYS_F_FOPEN 1 +# define SYS_F_CONNECT 2 +# define SYS_F_GETSERVBYNAME 3 +# define SYS_F_SOCKET 4 +# define SYS_F_IOCTLSOCKET 5 +# define SYS_F_BIND 6 +# define SYS_F_LISTEN 7 +# define SYS_F_ACCEPT 8 +# define SYS_F_WSASTARTUP 9/* Winsock stuff */ +# define SYS_F_OPENDIR 10 +# define SYS_F_FREAD 11 +# define SYS_F_GETADDRINFO 12 +# define SYS_F_GETNAMEINFO 13 +# define SYS_F_SETSOCKOPT 14 +# define SYS_F_GETSOCKOPT 15 +# define SYS_F_GETSOCKNAME 16 +# define SYS_F_GETHOSTBYNAME 17 +# define SYS_F_FFLUSH 18 +# define SYS_F_OPEN 19 +# define SYS_F_CLOSE 20 +# define SYS_F_IOCTL 21 +# define SYS_F_STAT 22 +# define SYS_F_FCNTL 23 +# define SYS_F_FSTAT 24 + +/* reasons */ +# define ERR_R_SYS_LIB ERR_LIB_SYS/* 2 */ +# define ERR_R_BN_LIB ERR_LIB_BN/* 3 */ +# define ERR_R_RSA_LIB ERR_LIB_RSA/* 4 */ +# define ERR_R_DH_LIB ERR_LIB_DH/* 5 */ +# define ERR_R_EVP_LIB ERR_LIB_EVP/* 6 */ +# define ERR_R_BUF_LIB ERR_LIB_BUF/* 7 */ +# define ERR_R_OBJ_LIB ERR_LIB_OBJ/* 8 */ +# define ERR_R_PEM_LIB ERR_LIB_PEM/* 9 */ +# define ERR_R_DSA_LIB ERR_LIB_DSA/* 10 */ +# define ERR_R_X509_LIB ERR_LIB_X509/* 11 */ +# define ERR_R_ASN1_LIB ERR_LIB_ASN1/* 13 */ +# define ERR_R_EC_LIB ERR_LIB_EC/* 16 */ +# define ERR_R_BIO_LIB ERR_LIB_BIO/* 32 */ +# define ERR_R_PKCS7_LIB ERR_LIB_PKCS7/* 33 */ +# define ERR_R_X509V3_LIB ERR_LIB_X509V3/* 34 */ +# define ERR_R_ENGINE_LIB ERR_LIB_ENGINE/* 38 */ +# define ERR_R_UI_LIB ERR_LIB_UI/* 40 */ +# define ERR_R_ECDSA_LIB ERR_LIB_ECDSA/* 42 */ +# define ERR_R_OSSL_STORE_LIB ERR_LIB_OSSL_STORE/* 44 */ + +# define ERR_R_NESTED_ASN1_ERROR 58 +# define ERR_R_MISSING_ASN1_EOS 63 + +/* fatal error */ +# define ERR_R_FATAL 64 +# define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) +# define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) +# define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) +# define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) +# define ERR_R_DISABLED (5|ERR_R_FATAL) +# define ERR_R_INIT_FAIL (6|ERR_R_FATAL) +# define ERR_R_PASSED_INVALID_ARGUMENT (7) +# define ERR_R_OPERATION_FAIL (8|ERR_R_FATAL) + +/* + * 99 is the maximum possible ERR_R_... code, higher values are reserved for + * the individual libraries + */ + +typedef struct ERR_string_data_st { + unsigned long error; + const char *string; +} ERR_STRING_DATA; + +DEFINE_LHASH_OF(ERR_STRING_DATA); + +void ERR_put_error(int lib, int func, int reason, const char *file, int line); +void ERR_set_error_data(char *data, int flags); + +unsigned long ERR_get_error(void); +unsigned long ERR_get_error_line(const char **file, int *line); +unsigned long ERR_get_error_line_data(const char **file, int *line, + const char **data, int *flags); +unsigned long ERR_peek_error(void); +unsigned long ERR_peek_error_line(const char **file, int *line); +unsigned long ERR_peek_error_line_data(const char **file, int *line, + const char **data, int *flags); +unsigned long ERR_peek_last_error(void); +unsigned long ERR_peek_last_error_line(const char **file, int *line); +unsigned long ERR_peek_last_error_line_data(const char **file, int *line, + const char **data, int *flags); +void ERR_clear_error(void); +char *ERR_error_string(unsigned long e, char *buf); +void ERR_error_string_n(unsigned long e, char *buf, size_t len); +const char *ERR_lib_error_string(unsigned long e); +const char *ERR_func_error_string(unsigned long e); +const char *ERR_reason_error_string(unsigned long e); +void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u), + void *u); +# ifndef OPENSSL_NO_STDIO +void ERR_print_errors_fp(FILE *fp); +# endif +void ERR_print_errors(BIO *bp); +void ERR_add_error_data(int num, ...); +void ERR_add_error_vdata(int num, va_list args); +int ERR_load_strings(int lib, ERR_STRING_DATA *str); +int ERR_load_strings_const(const ERR_STRING_DATA *str); +int ERR_unload_strings(int lib, ERR_STRING_DATA *str); +int ERR_load_ERR_strings(void); + +#if OPENSSL_API_COMPAT < 0x10100000L +# define ERR_load_crypto_strings() \ + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) +# define ERR_free_strings() while(0) continue +#endif + +DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *)) +DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) +ERR_STATE *ERR_get_state(void); + +int ERR_get_next_error_library(void); + +int ERR_set_mark(void); +int ERR_pop_to_mark(void); +int ERR_clear_last_mark(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/evp.h b/src/Mayaqua/win32_inc/openssl/evp.h index f3d0253b..545654a9 100644 --- a/src/Mayaqua/win32_inc/openssl/evp.h +++ b/src/Mayaqua/win32_inc/openssl/evp.h @@ -1,1534 +1,1638 @@ -/* crypto/evp/evp.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_ENVELOPE_H -# define HEADER_ENVELOPE_H - -# ifdef OPENSSL_ALGORITHM_DEFINES -# include -# else -# define OPENSSL_ALGORITHM_DEFINES -# include -# undef OPENSSL_ALGORITHM_DEFINES -# endif - -# include - -# include - -# ifndef OPENSSL_NO_BIO -# include -# endif - -/*- -#define EVP_RC2_KEY_SIZE 16 -#define EVP_RC4_KEY_SIZE 16 -#define EVP_BLOWFISH_KEY_SIZE 16 -#define EVP_CAST5_KEY_SIZE 16 -#define EVP_RC5_32_12_16_KEY_SIZE 16 -*/ -# define EVP_MAX_MD_SIZE 64/* longest known is SHA512 */ -# define EVP_MAX_KEY_LENGTH 64 -# define EVP_MAX_IV_LENGTH 16 -# define EVP_MAX_BLOCK_LENGTH 32 - -# define PKCS5_SALT_LEN 8 -/* Default PKCS#5 iteration count */ -# define PKCS5_DEFAULT_ITER 2048 - -# include - -# define EVP_PK_RSA 0x0001 -# define EVP_PK_DSA 0x0002 -# define EVP_PK_DH 0x0004 -# define EVP_PK_EC 0x0008 -# define EVP_PKT_SIGN 0x0010 -# define EVP_PKT_ENC 0x0020 -# define EVP_PKT_EXCH 0x0040 -# define EVP_PKS_RSA 0x0100 -# define EVP_PKS_DSA 0x0200 -# define EVP_PKS_EC 0x0400 - -# define EVP_PKEY_NONE NID_undef -# define EVP_PKEY_RSA NID_rsaEncryption -# define EVP_PKEY_RSA2 NID_rsa -# define EVP_PKEY_DSA NID_dsa -# define EVP_PKEY_DSA1 NID_dsa_2 -# define EVP_PKEY_DSA2 NID_dsaWithSHA -# define EVP_PKEY_DSA3 NID_dsaWithSHA1 -# define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 -# define EVP_PKEY_DH NID_dhKeyAgreement -# define EVP_PKEY_DHX NID_dhpublicnumber -# define EVP_PKEY_EC NID_X9_62_id_ecPublicKey -# define EVP_PKEY_HMAC NID_hmac -# define EVP_PKEY_CMAC NID_cmac - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Type needs to be a bit field Sub-type needs to be for variations on the - * method, as in, can it do arbitrary encryption.... - */ -struct evp_pkey_st { - int type; - int save_type; - int references; - const EVP_PKEY_ASN1_METHOD *ameth; - ENGINE *engine; - union { - char *ptr; -# ifndef OPENSSL_NO_RSA - struct rsa_st *rsa; /* RSA */ -# endif -# ifndef OPENSSL_NO_DSA - struct dsa_st *dsa; /* DSA */ -# endif -# ifndef OPENSSL_NO_DH - struct dh_st *dh; /* DH */ -# endif -# ifndef OPENSSL_NO_EC - struct ec_key_st *ec; /* ECC */ -# endif - } pkey; - int save_parameters; - STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ -} /* EVP_PKEY */ ; - -# define EVP_PKEY_MO_SIGN 0x0001 -# define EVP_PKEY_MO_VERIFY 0x0002 -# define EVP_PKEY_MO_ENCRYPT 0x0004 -# define EVP_PKEY_MO_DECRYPT 0x0008 - -# ifndef EVP_MD -struct env_md_st { - int type; - int pkey_type; - int md_size; - unsigned long flags; - int (*init) (EVP_MD_CTX *ctx); - int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count); - int (*final) (EVP_MD_CTX *ctx, unsigned char *md); - int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from); - int (*cleanup) (EVP_MD_CTX *ctx); - /* FIXME: prototype these some day */ - int (*sign) (int type, const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, void *key); - int (*verify) (int type, const unsigned char *m, unsigned int m_length, - const unsigned char *sigbuf, unsigned int siglen, - void *key); - int required_pkey_type[5]; /* EVP_PKEY_xxx */ - int block_size; - int ctx_size; /* how big does the ctx->md_data need to be */ - /* control function */ - int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2); -} /* EVP_MD */ ; - -typedef int evp_sign_method(int type, const unsigned char *m, - unsigned int m_length, unsigned char *sigret, - unsigned int *siglen, void *key); -typedef int evp_verify_method(int type, const unsigned char *m, - unsigned int m_length, - const unsigned char *sigbuf, - unsigned int siglen, void *key); - -/* digest can only handle a single block */ -# define EVP_MD_FLAG_ONESHOT 0x0001 - -/* - * digest is a "clone" digest used - * which is a copy of an existing - * one for a specific public key type. - * EVP_dss1() etc - */ -# define EVP_MD_FLAG_PKEY_DIGEST 0x0002 - -/* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */ - -# define EVP_MD_FLAG_PKEY_METHOD_SIGNATURE 0x0004 - -/* DigestAlgorithmIdentifier flags... */ - -# define EVP_MD_FLAG_DIGALGID_MASK 0x0018 - -/* NULL or absent parameter accepted. Use NULL */ - -# define EVP_MD_FLAG_DIGALGID_NULL 0x0000 - -/* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */ - -# define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008 - -/* Custom handling via ctrl */ - -# define EVP_MD_FLAG_DIGALGID_CUSTOM 0x0018 - -/* Note if suitable for use in FIPS mode */ -# define EVP_MD_FLAG_FIPS 0x0400 - -/* Digest ctrls */ - -# define EVP_MD_CTRL_DIGALGID 0x1 -# define EVP_MD_CTRL_MICALG 0x2 - -/* Minimum Algorithm specific ctrl value */ - -# define EVP_MD_CTRL_ALG_CTRL 0x1000 - -# define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} - -# ifndef OPENSSL_NO_DSA -# define EVP_PKEY_DSA_method (evp_sign_method *)DSA_sign, \ - (evp_verify_method *)DSA_verify, \ - {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \ - EVP_PKEY_DSA4,0} -# else -# define EVP_PKEY_DSA_method EVP_PKEY_NULL_method -# endif - -# ifndef OPENSSL_NO_ECDSA -# define EVP_PKEY_ECDSA_method (evp_sign_method *)ECDSA_sign, \ - (evp_verify_method *)ECDSA_verify, \ - {EVP_PKEY_EC,0,0,0} -# else -# define EVP_PKEY_ECDSA_method EVP_PKEY_NULL_method -# endif - -# ifndef OPENSSL_NO_RSA -# define EVP_PKEY_RSA_method (evp_sign_method *)RSA_sign, \ - (evp_verify_method *)RSA_verify, \ - {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} -# define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \ - (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, \ - (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, \ - {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} -# else -# define EVP_PKEY_RSA_method EVP_PKEY_NULL_method -# define EVP_PKEY_RSA_ASN1_OCTET_STRING_method EVP_PKEY_NULL_method -# endif - -# endif /* !EVP_MD */ - -struct env_md_ctx_st { - const EVP_MD *digest; - ENGINE *engine; /* functional reference if 'digest' is - * ENGINE-provided */ - unsigned long flags; - void *md_data; - /* Public key context for sign/verify */ - EVP_PKEY_CTX *pctx; - /* Update function: usually copied from EVP_MD */ - int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count); -} /* EVP_MD_CTX */ ; - -/* values for EVP_MD_CTX flags */ - -# define EVP_MD_CTX_FLAG_ONESHOT 0x0001/* digest update will be - * called once only */ -# define EVP_MD_CTX_FLAG_CLEANED 0x0002/* context has already been - * cleaned */ -# define EVP_MD_CTX_FLAG_REUSE 0x0004/* Don't free up ctx->md_data - * in EVP_MD_CTX_cleanup */ -/* - * FIPS and pad options are ignored in 1.0.0, definitions are here so we - * don't accidentally reuse the values for other purposes. - */ - -# define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008/* Allow use of non FIPS - * digest in FIPS mode */ - -/* - * The following PAD options are also currently ignored in 1.0.0, digest - * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*() - * instead. - */ -# define EVP_MD_CTX_FLAG_PAD_MASK 0xF0/* RSA mode to use */ -# define EVP_MD_CTX_FLAG_PAD_PKCS1 0x00/* PKCS#1 v1.5 mode */ -# define EVP_MD_CTX_FLAG_PAD_X931 0x10/* X9.31 mode */ -# define EVP_MD_CTX_FLAG_PAD_PSS 0x20/* PSS mode */ - -# define EVP_MD_CTX_FLAG_NO_INIT 0x0100/* Don't initialize md_data */ - -struct evp_cipher_st { - int nid; - int block_size; - /* Default value for variable length ciphers */ - int key_len; - int iv_len; - /* Various flags */ - unsigned long flags; - /* init key */ - int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc); - /* encrypt/decrypt data */ - int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, size_t inl); - /* cleanup ctx */ - int (*cleanup) (EVP_CIPHER_CTX *); - /* how big ctx->cipher_data needs to be */ - int ctx_size; - /* Populate a ASN1_TYPE with parameters */ - int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Get parameters from a ASN1_TYPE */ - int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Miscellaneous operations */ - int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr); - /* Application data */ - void *app_data; -} /* EVP_CIPHER */ ; - -/* Values for cipher flags */ - -/* Modes for ciphers */ - -# define EVP_CIPH_STREAM_CIPHER 0x0 -# define EVP_CIPH_ECB_MODE 0x1 -# define EVP_CIPH_CBC_MODE 0x2 -# define EVP_CIPH_CFB_MODE 0x3 -# define EVP_CIPH_OFB_MODE 0x4 -# define EVP_CIPH_CTR_MODE 0x5 -# define EVP_CIPH_GCM_MODE 0x6 -# define EVP_CIPH_CCM_MODE 0x7 -# define EVP_CIPH_XTS_MODE 0x10001 -# define EVP_CIPH_WRAP_MODE 0x10002 -# define EVP_CIPH_MODE 0xF0007 -/* Set if variable length cipher */ -# define EVP_CIPH_VARIABLE_LENGTH 0x8 -/* Set if the iv handling should be done by the cipher itself */ -# define EVP_CIPH_CUSTOM_IV 0x10 -/* Set if the cipher's init() function should be called if key is NULL */ -# define EVP_CIPH_ALWAYS_CALL_INIT 0x20 -/* Call ctrl() to init cipher parameters */ -# define EVP_CIPH_CTRL_INIT 0x40 -/* Don't use standard key length function */ -# define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 -/* Don't use standard block padding */ -# define EVP_CIPH_NO_PADDING 0x100 -/* cipher handles random key generation */ -# define EVP_CIPH_RAND_KEY 0x200 -/* cipher has its own additional copying logic */ -# define EVP_CIPH_CUSTOM_COPY 0x400 -/* Allow use default ASN1 get/set iv */ -# define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000 -/* Buffer length in bits not bytes: CFB1 mode only */ -# define EVP_CIPH_FLAG_LENGTH_BITS 0x2000 -/* Note if suitable for use in FIPS mode */ -# define EVP_CIPH_FLAG_FIPS 0x4000 -/* Allow non FIPS cipher in FIPS mode */ -# define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x8000 -/* - * Cipher handles any and all padding logic as well as finalisation. - */ -# define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000 -# define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000 -# define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000 - -/* - * Cipher context flag to indicate we can handle wrap mode: if allowed in - * older applications it could overflow buffers. - */ - -# define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1 - -/* ctrl() values */ - -# define EVP_CTRL_INIT 0x0 -# define EVP_CTRL_SET_KEY_LENGTH 0x1 -# define EVP_CTRL_GET_RC2_KEY_BITS 0x2 -# define EVP_CTRL_SET_RC2_KEY_BITS 0x3 -# define EVP_CTRL_GET_RC5_ROUNDS 0x4 -# define EVP_CTRL_SET_RC5_ROUNDS 0x5 -# define EVP_CTRL_RAND_KEY 0x6 -# define EVP_CTRL_PBE_PRF_NID 0x7 -# define EVP_CTRL_COPY 0x8 -# define EVP_CTRL_GCM_SET_IVLEN 0x9 -# define EVP_CTRL_GCM_GET_TAG 0x10 -# define EVP_CTRL_GCM_SET_TAG 0x11 -# define EVP_CTRL_GCM_SET_IV_FIXED 0x12 -# define EVP_CTRL_GCM_IV_GEN 0x13 -# define EVP_CTRL_CCM_SET_IVLEN EVP_CTRL_GCM_SET_IVLEN -# define EVP_CTRL_CCM_GET_TAG EVP_CTRL_GCM_GET_TAG -# define EVP_CTRL_CCM_SET_TAG EVP_CTRL_GCM_SET_TAG -# define EVP_CTRL_CCM_SET_L 0x14 -# define EVP_CTRL_CCM_SET_MSGLEN 0x15 -/* - * AEAD cipher deduces payload length and returns number of bytes required to - * store MAC and eventual padding. Subsequent call to EVP_Cipher even - * appends/verifies MAC. - */ -# define EVP_CTRL_AEAD_TLS1_AAD 0x16 -/* Used by composite AEAD ciphers, no-op in GCM, CCM... */ -# define EVP_CTRL_AEAD_SET_MAC_KEY 0x17 -/* Set the GCM invocation field, decrypt only */ -# define EVP_CTRL_GCM_SET_IV_INV 0x18 - -# define EVP_CTRL_TLS1_1_MULTIBLOCK_AAD 0x19 -# define EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT 0x1a -# define EVP_CTRL_TLS1_1_MULTIBLOCK_DECRYPT 0x1b -# define EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE 0x1c - -/* RFC 5246 defines additional data to be 13 bytes in length */ -# define EVP_AEAD_TLS1_AAD_LEN 13 - -typedef struct { - unsigned char *out; - const unsigned char *inp; - size_t len; - unsigned int interleave; -} EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM; - -/* GCM TLS constants */ -/* Length of fixed part of IV derived from PRF */ -# define EVP_GCM_TLS_FIXED_IV_LEN 4 -/* Length of explicit part of IV part of TLS records */ -# define EVP_GCM_TLS_EXPLICIT_IV_LEN 8 -/* Length of tag for TLS */ -# define EVP_GCM_TLS_TAG_LEN 16 - -typedef struct evp_cipher_info_st { - const EVP_CIPHER *cipher; - unsigned char iv[EVP_MAX_IV_LENGTH]; -} EVP_CIPHER_INFO; - -struct evp_cipher_ctx_st { - const EVP_CIPHER *cipher; - ENGINE *engine; /* functional reference if 'cipher' is - * ENGINE-provided */ - int encrypt; /* encrypt or decrypt */ - int buf_len; /* number we have left */ - unsigned char oiv[EVP_MAX_IV_LENGTH]; /* original iv */ - unsigned char iv[EVP_MAX_IV_LENGTH]; /* working iv */ - unsigned char buf[EVP_MAX_BLOCK_LENGTH]; /* saved partial block */ - int num; /* used by cfb/ofb/ctr mode */ - void *app_data; /* application stuff */ - int key_len; /* May change for variable length cipher */ - unsigned long flags; /* Various flags */ - void *cipher_data; /* per EVP data */ - int final_used; - int block_mask; - unsigned char final[EVP_MAX_BLOCK_LENGTH]; /* possible final block */ -} /* EVP_CIPHER_CTX */ ; - -typedef struct evp_Encode_Ctx_st { - /* number saved in a partial encode/decode */ - int num; - /* - * The length is either the output line length (in input bytes) or the - * shortest input line length that is ok. Once decoding begins, the - * length is adjusted up each time a longer line is decoded - */ - int length; - /* data to encode */ - unsigned char enc_data[80]; - /* number read on current line */ - int line_num; - int expect_nl; -} EVP_ENCODE_CTX; - -/* Password based encryption function */ -typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass, - int passlen, ASN1_TYPE *param, - const EVP_CIPHER *cipher, const EVP_MD *md, - int en_de); - -# ifndef OPENSSL_NO_RSA -# define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ - (char *)(rsa)) -# endif - -# ifndef OPENSSL_NO_DSA -# define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ - (char *)(dsa)) -# endif - -# ifndef OPENSSL_NO_DH -# define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\ - (char *)(dh)) -# endif - -# ifndef OPENSSL_NO_EC -# define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ - (char *)(eckey)) -# endif - -/* Add some extra combinations */ -# define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a)) -# define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a)) -# define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) -# define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) - -int EVP_MD_type(const EVP_MD *md); -# define EVP_MD_nid(e) EVP_MD_type(e) -# define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) -int EVP_MD_pkey_type(const EVP_MD *md); -int EVP_MD_size(const EVP_MD *md); -int EVP_MD_block_size(const EVP_MD *md); -unsigned long EVP_MD_flags(const EVP_MD *md); - -const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); -# define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) -# define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) -# define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) - -int EVP_CIPHER_nid(const EVP_CIPHER *cipher); -# define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) -int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); -int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); -int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); -unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); -# define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) - -const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); -int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); -void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); -void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); -# define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) -unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); -# define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) - -# define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) -# define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) - -# define EVP_SignInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) -# define EVP_SignInit(a,b) EVP_DigestInit(a,b) -# define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) -# define EVP_VerifyInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) -# define EVP_VerifyInit(a,b) EVP_DigestInit(a,b) -# define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) -# define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) -# define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e) -# define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) -# define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) - -# ifdef CONST_STRICT -void BIO_set_md(BIO *, const EVP_MD *md); -# else -# define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md) -# endif -# define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) -# define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) -# define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) -# define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) -# define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp) - -int EVP_Cipher(EVP_CIPHER_CTX *c, - unsigned char *out, const unsigned char *in, unsigned int inl); - -# define EVP_add_cipher_alias(n,alias) \ - OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n)) -# define EVP_add_digest_alias(n,alias) \ - OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n)) -# define EVP_delete_cipher_alias(alias) \ - OBJ_NAME_remove(alias,OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS); -# define EVP_delete_digest_alias(alias) \ - OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); - -void EVP_MD_CTX_init(EVP_MD_CTX *ctx); -int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); -EVP_MD_CTX *EVP_MD_CTX_create(void); -void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); -int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in); -void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); -void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); -int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags); -int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); -int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt); -int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s); -int EVP_Digest(const void *data, size_t count, - unsigned char *md, unsigned int *size, const EVP_MD *type, - ENGINE *impl); - -int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in); -int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); -int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s); - -int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify); -int EVP_read_pw_string_min(char *buf, int minlen, int maxlen, - const char *prompt, int verify); -void EVP_set_pw_prompt(const char *prompt); -char *EVP_get_pw_prompt(void); - -int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, - const unsigned char *salt, const unsigned char *data, - int datal, int count, unsigned char *key, - unsigned char *iv); - -void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags); -void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags); -int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags); - -int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - const unsigned char *key, const unsigned char *iv); -int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - ENGINE *impl, const unsigned char *key, - const unsigned char *iv); -int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl); -int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); -int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); - -int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - const unsigned char *key, const unsigned char *iv); -int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - ENGINE *impl, const unsigned char *key, - const unsigned char *iv); -int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl); -int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); -int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); - -int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - const unsigned char *key, const unsigned char *iv, - int enc); -int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - ENGINE *impl, const unsigned char *key, - const unsigned char *iv, int enc); -int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl); -int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); -int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); - -int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, - EVP_PKEY *pkey); - -int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, - unsigned int siglen, EVP_PKEY *pkey); - -int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, - const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); -int EVP_DigestSignFinal(EVP_MD_CTX *ctx, - unsigned char *sigret, size_t *siglen); - -int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, - const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); -int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, - const unsigned char *sig, size_t siglen); - -int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, - const unsigned char *ek, int ekl, const unsigned char *iv, - EVP_PKEY *priv); -int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); - -int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, - unsigned char **ek, int *ekl, unsigned char *iv, - EVP_PKEY **pubk, int npubk); -int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); - -void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); -void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl); -void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); -int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); - -void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); -int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl); -int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned - char *out, int *outl); -int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); - -void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); -int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); -EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); -void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); -int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); -int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); -int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); -int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); - -# ifndef OPENSSL_NO_BIO -BIO_METHOD *BIO_f_md(void); -BIO_METHOD *BIO_f_base64(void); -BIO_METHOD *BIO_f_cipher(void); -BIO_METHOD *BIO_f_reliable(void); -void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, - const unsigned char *i, int enc); -# endif - -const EVP_MD *EVP_md_null(void); -# ifndef OPENSSL_NO_MD2 -const EVP_MD *EVP_md2(void); -# endif -# ifndef OPENSSL_NO_MD4 -const EVP_MD *EVP_md4(void); -# endif -# ifndef OPENSSL_NO_MD5 -const EVP_MD *EVP_md5(void); -# endif -# ifndef OPENSSL_NO_SHA -const EVP_MD *EVP_sha(void); -const EVP_MD *EVP_sha1(void); -const EVP_MD *EVP_dss(void); -const EVP_MD *EVP_dss1(void); -const EVP_MD *EVP_ecdsa(void); -# endif -# ifndef OPENSSL_NO_SHA256 -const EVP_MD *EVP_sha224(void); -const EVP_MD *EVP_sha256(void); -# endif -# ifndef OPENSSL_NO_SHA512 -const EVP_MD *EVP_sha384(void); -const EVP_MD *EVP_sha512(void); -# endif -# ifndef OPENSSL_NO_MDC2 -const EVP_MD *EVP_mdc2(void); -# endif -# ifndef OPENSSL_NO_RIPEMD -const EVP_MD *EVP_ripemd160(void); -# endif -# ifndef OPENSSL_NO_WHIRLPOOL -const EVP_MD *EVP_whirlpool(void); -# endif -const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */ -# ifndef OPENSSL_NO_DES -const EVP_CIPHER *EVP_des_ecb(void); -const EVP_CIPHER *EVP_des_ede(void); -const EVP_CIPHER *EVP_des_ede3(void); -const EVP_CIPHER *EVP_des_ede_ecb(void); -const EVP_CIPHER *EVP_des_ede3_ecb(void); -const EVP_CIPHER *EVP_des_cfb64(void); -# define EVP_des_cfb EVP_des_cfb64 -const EVP_CIPHER *EVP_des_cfb1(void); -const EVP_CIPHER *EVP_des_cfb8(void); -const EVP_CIPHER *EVP_des_ede_cfb64(void); -# define EVP_des_ede_cfb EVP_des_ede_cfb64 -# if 0 -const EVP_CIPHER *EVP_des_ede_cfb1(void); -const EVP_CIPHER *EVP_des_ede_cfb8(void); -# endif -const EVP_CIPHER *EVP_des_ede3_cfb64(void); -# define EVP_des_ede3_cfb EVP_des_ede3_cfb64 -const EVP_CIPHER *EVP_des_ede3_cfb1(void); -const EVP_CIPHER *EVP_des_ede3_cfb8(void); -const EVP_CIPHER *EVP_des_ofb(void); -const EVP_CIPHER *EVP_des_ede_ofb(void); -const EVP_CIPHER *EVP_des_ede3_ofb(void); -const EVP_CIPHER *EVP_des_cbc(void); -const EVP_CIPHER *EVP_des_ede_cbc(void); -const EVP_CIPHER *EVP_des_ede3_cbc(void); -const EVP_CIPHER *EVP_desx_cbc(void); -const EVP_CIPHER *EVP_des_ede3_wrap(void); -/* - * This should now be supported through the dev_crypto ENGINE. But also, why - * are rc4 and md5 declarations made here inside a "NO_DES" precompiler - * branch? - */ -# if 0 -# ifdef OPENSSL_OPENBSD_DEV_CRYPTO -const EVP_CIPHER *EVP_dev_crypto_des_ede3_cbc(void); -const EVP_CIPHER *EVP_dev_crypto_rc4(void); -const EVP_MD *EVP_dev_crypto_md5(void); -# endif -# endif -# endif -# ifndef OPENSSL_NO_RC4 -const EVP_CIPHER *EVP_rc4(void); -const EVP_CIPHER *EVP_rc4_40(void); -# ifndef OPENSSL_NO_MD5 -const EVP_CIPHER *EVP_rc4_hmac_md5(void); -# endif -# endif -# ifndef OPENSSL_NO_IDEA -const EVP_CIPHER *EVP_idea_ecb(void); -const EVP_CIPHER *EVP_idea_cfb64(void); -# define EVP_idea_cfb EVP_idea_cfb64 -const EVP_CIPHER *EVP_idea_ofb(void); -const EVP_CIPHER *EVP_idea_cbc(void); -# endif -# ifndef OPENSSL_NO_RC2 -const EVP_CIPHER *EVP_rc2_ecb(void); -const EVP_CIPHER *EVP_rc2_cbc(void); -const EVP_CIPHER *EVP_rc2_40_cbc(void); -const EVP_CIPHER *EVP_rc2_64_cbc(void); -const EVP_CIPHER *EVP_rc2_cfb64(void); -# define EVP_rc2_cfb EVP_rc2_cfb64 -const EVP_CIPHER *EVP_rc2_ofb(void); -# endif -# ifndef OPENSSL_NO_BF -const EVP_CIPHER *EVP_bf_ecb(void); -const EVP_CIPHER *EVP_bf_cbc(void); -const EVP_CIPHER *EVP_bf_cfb64(void); -# define EVP_bf_cfb EVP_bf_cfb64 -const EVP_CIPHER *EVP_bf_ofb(void); -# endif -# ifndef OPENSSL_NO_CAST -const EVP_CIPHER *EVP_cast5_ecb(void); -const EVP_CIPHER *EVP_cast5_cbc(void); -const EVP_CIPHER *EVP_cast5_cfb64(void); -# define EVP_cast5_cfb EVP_cast5_cfb64 -const EVP_CIPHER *EVP_cast5_ofb(void); -# endif -# ifndef OPENSSL_NO_RC5 -const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void); -const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void); -const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void); -# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64 -const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void); -# endif -# ifndef OPENSSL_NO_AES -const EVP_CIPHER *EVP_aes_128_ecb(void); -const EVP_CIPHER *EVP_aes_128_cbc(void); -const EVP_CIPHER *EVP_aes_128_cfb1(void); -const EVP_CIPHER *EVP_aes_128_cfb8(void); -const EVP_CIPHER *EVP_aes_128_cfb128(void); -# define EVP_aes_128_cfb EVP_aes_128_cfb128 -const EVP_CIPHER *EVP_aes_128_ofb(void); -const EVP_CIPHER *EVP_aes_128_ctr(void); -const EVP_CIPHER *EVP_aes_128_ccm(void); -const EVP_CIPHER *EVP_aes_128_gcm(void); -const EVP_CIPHER *EVP_aes_128_xts(void); -const EVP_CIPHER *EVP_aes_128_wrap(void); -const EVP_CIPHER *EVP_aes_192_ecb(void); -const EVP_CIPHER *EVP_aes_192_cbc(void); -const EVP_CIPHER *EVP_aes_192_cfb1(void); -const EVP_CIPHER *EVP_aes_192_cfb8(void); -const EVP_CIPHER *EVP_aes_192_cfb128(void); -# define EVP_aes_192_cfb EVP_aes_192_cfb128 -const EVP_CIPHER *EVP_aes_192_ofb(void); -const EVP_CIPHER *EVP_aes_192_ctr(void); -const EVP_CIPHER *EVP_aes_192_ccm(void); -const EVP_CIPHER *EVP_aes_192_gcm(void); -const EVP_CIPHER *EVP_aes_192_wrap(void); -const EVP_CIPHER *EVP_aes_256_ecb(void); -const EVP_CIPHER *EVP_aes_256_cbc(void); -const EVP_CIPHER *EVP_aes_256_cfb1(void); -const EVP_CIPHER *EVP_aes_256_cfb8(void); -const EVP_CIPHER *EVP_aes_256_cfb128(void); -# define EVP_aes_256_cfb EVP_aes_256_cfb128 -const EVP_CIPHER *EVP_aes_256_ofb(void); -const EVP_CIPHER *EVP_aes_256_ctr(void); -const EVP_CIPHER *EVP_aes_256_ccm(void); -const EVP_CIPHER *EVP_aes_256_gcm(void); -const EVP_CIPHER *EVP_aes_256_xts(void); -const EVP_CIPHER *EVP_aes_256_wrap(void); -# if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) -const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void); -const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void); -# endif -# ifndef OPENSSL_NO_SHA256 -const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void); -const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void); -# endif -# endif -# ifndef OPENSSL_NO_CAMELLIA -const EVP_CIPHER *EVP_camellia_128_ecb(void); -const EVP_CIPHER *EVP_camellia_128_cbc(void); -const EVP_CIPHER *EVP_camellia_128_cfb1(void); -const EVP_CIPHER *EVP_camellia_128_cfb8(void); -const EVP_CIPHER *EVP_camellia_128_cfb128(void); -# define EVP_camellia_128_cfb EVP_camellia_128_cfb128 -const EVP_CIPHER *EVP_camellia_128_ofb(void); -const EVP_CIPHER *EVP_camellia_192_ecb(void); -const EVP_CIPHER *EVP_camellia_192_cbc(void); -const EVP_CIPHER *EVP_camellia_192_cfb1(void); -const EVP_CIPHER *EVP_camellia_192_cfb8(void); -const EVP_CIPHER *EVP_camellia_192_cfb128(void); -# define EVP_camellia_192_cfb EVP_camellia_192_cfb128 -const EVP_CIPHER *EVP_camellia_192_ofb(void); -const EVP_CIPHER *EVP_camellia_256_ecb(void); -const EVP_CIPHER *EVP_camellia_256_cbc(void); -const EVP_CIPHER *EVP_camellia_256_cfb1(void); -const EVP_CIPHER *EVP_camellia_256_cfb8(void); -const EVP_CIPHER *EVP_camellia_256_cfb128(void); -# define EVP_camellia_256_cfb EVP_camellia_256_cfb128 -const EVP_CIPHER *EVP_camellia_256_ofb(void); -# endif - -# ifndef OPENSSL_NO_SEED -const EVP_CIPHER *EVP_seed_ecb(void); -const EVP_CIPHER *EVP_seed_cbc(void); -const EVP_CIPHER *EVP_seed_cfb128(void); -# define EVP_seed_cfb EVP_seed_cfb128 -const EVP_CIPHER *EVP_seed_ofb(void); -# endif - -void OPENSSL_add_all_algorithms_noconf(void); -void OPENSSL_add_all_algorithms_conf(void); - -# ifdef OPENSSL_LOAD_CONF -# define OpenSSL_add_all_algorithms() \ - OPENSSL_add_all_algorithms_conf() -# else -# define OpenSSL_add_all_algorithms() \ - OPENSSL_add_all_algorithms_noconf() -# endif - -void OpenSSL_add_all_ciphers(void); -void OpenSSL_add_all_digests(void); -# define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms() -# define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers() -# define SSLeay_add_all_digests() OpenSSL_add_all_digests() - -int EVP_add_cipher(const EVP_CIPHER *cipher); -int EVP_add_digest(const EVP_MD *digest); - -const EVP_CIPHER *EVP_get_cipherbyname(const char *name); -const EVP_MD *EVP_get_digestbyname(const char *name); -void EVP_cleanup(void); - -void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph, - const char *from, const char *to, void *x), - void *arg); -void EVP_CIPHER_do_all_sorted(void (*fn) - (const EVP_CIPHER *ciph, const char *from, - const char *to, void *x), void *arg); - -void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph, - const char *from, const char *to, void *x), - void *arg); -void EVP_MD_do_all_sorted(void (*fn) - (const EVP_MD *ciph, const char *from, - const char *to, void *x), void *arg); - -int EVP_PKEY_decrypt_old(unsigned char *dec_key, - const unsigned char *enc_key, int enc_key_len, - EVP_PKEY *private_key); -int EVP_PKEY_encrypt_old(unsigned char *enc_key, - const unsigned char *key, int key_len, - EVP_PKEY *pub_key); -int EVP_PKEY_type(int type); -int EVP_PKEY_id(const EVP_PKEY *pkey); -int EVP_PKEY_base_id(const EVP_PKEY *pkey); -int EVP_PKEY_bits(EVP_PKEY *pkey); -int EVP_PKEY_size(EVP_PKEY *pkey); -int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); -int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); -int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key); -void *EVP_PKEY_get0(EVP_PKEY *pkey); - -# ifndef OPENSSL_NO_RSA -struct rsa_st; -int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key); -struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); -# endif -# ifndef OPENSSL_NO_DSA -struct dsa_st; -int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key); -struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); -# endif -# ifndef OPENSSL_NO_DH -struct dh_st; -int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key); -struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); -# endif -# ifndef OPENSSL_NO_EC -struct ec_key_st; -int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key); -struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); -# endif - -EVP_PKEY *EVP_PKEY_new(void); -void EVP_PKEY_free(EVP_PKEY *pkey); - -EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, - long length); -int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); - -EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, - long length); -EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, - long length); -int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); - -int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); -int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); -int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode); -int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); - -int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); - -int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, - int indent, ASN1_PCTX *pctx); -int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, - int indent, ASN1_PCTX *pctx); -int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, - int indent, ASN1_PCTX *pctx); - -int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); - -int EVP_CIPHER_type(const EVP_CIPHER *ctx); - -/* calls methods */ -int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); -int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); - -/* These are used by EVP_CIPHER methods */ -int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); -int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); - -/* PKCS5 password based encryption */ -int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, - const EVP_MD *md, int en_de); -int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, - const unsigned char *salt, int saltlen, int iter, - int keylen, unsigned char *out); -int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, - const unsigned char *salt, int saltlen, int iter, - const EVP_MD *digest, int keylen, unsigned char *out); -int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, - const EVP_MD *md, int en_de); - -void PKCS5_PBE_add(void); - -int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, - ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); - -/* PBE type */ - -/* Can appear as the outermost AlgorithmIdentifier */ -# define EVP_PBE_TYPE_OUTER 0x0 -/* Is an PRF type OID */ -# define EVP_PBE_TYPE_PRF 0x1 - -int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, - int md_nid, EVP_PBE_KEYGEN *keygen); -int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, - EVP_PBE_KEYGEN *keygen); -int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid, - EVP_PBE_KEYGEN **pkeygen); -void EVP_PBE_cleanup(void); - -# define ASN1_PKEY_ALIAS 0x1 -# define ASN1_PKEY_DYNAMIC 0x2 -# define ASN1_PKEY_SIGPARAM_NULL 0x4 - -# define ASN1_PKEY_CTRL_PKCS7_SIGN 0x1 -# define ASN1_PKEY_CTRL_PKCS7_ENCRYPT 0x2 -# define ASN1_PKEY_CTRL_DEFAULT_MD_NID 0x3 -# define ASN1_PKEY_CTRL_CMS_SIGN 0x5 -# define ASN1_PKEY_CTRL_CMS_ENVELOPE 0x7 -# define ASN1_PKEY_CTRL_CMS_RI_TYPE 0x8 - -int EVP_PKEY_asn1_get_count(void); -const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx); -const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type); -const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe, - const char *str, int len); -int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth); -int EVP_PKEY_asn1_add_alias(int to, int from); -int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, - int *ppkey_flags, const char **pinfo, - const char **ppem_str, - const EVP_PKEY_ASN1_METHOD *ameth); - -const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey); -EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags, - const char *pem_str, - const char *info); -void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, - const EVP_PKEY_ASN1_METHOD *src); -void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth); -void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, - int (*pub_decode) (EVP_PKEY *pk, - X509_PUBKEY *pub), - int (*pub_encode) (X509_PUBKEY *pub, - const EVP_PKEY *pk), - int (*pub_cmp) (const EVP_PKEY *a, - const EVP_PKEY *b), - int (*pub_print) (BIO *out, - const EVP_PKEY *pkey, - int indent, ASN1_PCTX *pctx), - int (*pkey_size) (const EVP_PKEY *pk), - int (*pkey_bits) (const EVP_PKEY *pk)); -void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, - int (*priv_decode) (EVP_PKEY *pk, - PKCS8_PRIV_KEY_INFO - *p8inf), - int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, - const EVP_PKEY *pk), - int (*priv_print) (BIO *out, - const EVP_PKEY *pkey, - int indent, - ASN1_PCTX *pctx)); -void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, - int (*param_decode) (EVP_PKEY *pkey, - const unsigned char **pder, - int derlen), - int (*param_encode) (const EVP_PKEY *pkey, - unsigned char **pder), - int (*param_missing) (const EVP_PKEY *pk), - int (*param_copy) (EVP_PKEY *to, - const EVP_PKEY *from), - int (*param_cmp) (const EVP_PKEY *a, - const EVP_PKEY *b), - int (*param_print) (BIO *out, - const EVP_PKEY *pkey, - int indent, - ASN1_PCTX *pctx)); - -void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, - void (*pkey_free) (EVP_PKEY *pkey)); -void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, - int (*pkey_ctrl) (EVP_PKEY *pkey, int op, - long arg1, void *arg2)); -void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth, - int (*item_verify) (EVP_MD_CTX *ctx, - const ASN1_ITEM *it, - void *asn, - X509_ALGOR *a, - ASN1_BIT_STRING *sig, - EVP_PKEY *pkey), - int (*item_sign) (EVP_MD_CTX *ctx, - const ASN1_ITEM *it, - void *asn, - X509_ALGOR *alg1, - X509_ALGOR *alg2, - ASN1_BIT_STRING *sig)); - -# define EVP_PKEY_OP_UNDEFINED 0 -# define EVP_PKEY_OP_PARAMGEN (1<<1) -# define EVP_PKEY_OP_KEYGEN (1<<2) -# define EVP_PKEY_OP_SIGN (1<<3) -# define EVP_PKEY_OP_VERIFY (1<<4) -# define EVP_PKEY_OP_VERIFYRECOVER (1<<5) -# define EVP_PKEY_OP_SIGNCTX (1<<6) -# define EVP_PKEY_OP_VERIFYCTX (1<<7) -# define EVP_PKEY_OP_ENCRYPT (1<<8) -# define EVP_PKEY_OP_DECRYPT (1<<9) -# define EVP_PKEY_OP_DERIVE (1<<10) - -# define EVP_PKEY_OP_TYPE_SIG \ - (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \ - | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX) - -# define EVP_PKEY_OP_TYPE_CRYPT \ - (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT) - -# define EVP_PKEY_OP_TYPE_NOGEN \ - (EVP_PKEY_OP_SIG | EVP_PKEY_OP_CRYPT | EVP_PKEY_OP_DERIVE) - -# define EVP_PKEY_OP_TYPE_GEN \ - (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) - -# define EVP_PKEY_CTX_set_signature_md(ctx, md) \ - EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ - EVP_PKEY_CTRL_MD, 0, (void *)md) - -# define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \ - EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ - EVP_PKEY_CTRL_GET_MD, 0, (void *)pmd) - -# define EVP_PKEY_CTRL_MD 1 -# define EVP_PKEY_CTRL_PEER_KEY 2 - -# define EVP_PKEY_CTRL_PKCS7_ENCRYPT 3 -# define EVP_PKEY_CTRL_PKCS7_DECRYPT 4 - -# define EVP_PKEY_CTRL_PKCS7_SIGN 5 - -# define EVP_PKEY_CTRL_SET_MAC_KEY 6 - -# define EVP_PKEY_CTRL_DIGESTINIT 7 - -/* Used by GOST key encryption in TLS */ -# define EVP_PKEY_CTRL_SET_IV 8 - -# define EVP_PKEY_CTRL_CMS_ENCRYPT 9 -# define EVP_PKEY_CTRL_CMS_DECRYPT 10 -# define EVP_PKEY_CTRL_CMS_SIGN 11 - -# define EVP_PKEY_CTRL_CIPHER 12 - -# define EVP_PKEY_CTRL_GET_MD 13 - -# define EVP_PKEY_ALG_CTRL 0x1000 - -# define EVP_PKEY_FLAG_AUTOARGLEN 2 -/* - * Method handles all operations: don't assume any digest related defaults. - */ -# define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4 - -const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); -EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags); -void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, - const EVP_PKEY_METHOD *meth); -void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src); -void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth); -int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth); - -EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); -EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); -EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx); -void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); - -int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, - int cmd, int p1, void *p2); -int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, - const char *value); - -int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx); -void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen); - -EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, - const unsigned char *key, int keylen); - -void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data); -void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx); -EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx); - -EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx); - -void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data); -void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx); - -int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, - unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); -int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, - const unsigned char *sig, size_t siglen, - const unsigned char *tbs, size_t tbslen); -int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, - unsigned char *rout, size_t *routlen, - const unsigned char *sig, size_t siglen); -int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, - unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); -int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, - unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - -int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer); -int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); - -typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx); - -int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); -int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); -int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); - -void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); -EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx); - -int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx); - -void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, - int (*init) (EVP_PKEY_CTX *ctx)); - -void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, - int (*copy) (EVP_PKEY_CTX *dst, - EVP_PKEY_CTX *src)); - -void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, - void (*cleanup) (EVP_PKEY_CTX *ctx)); - -void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, - int (*paramgen_init) (EVP_PKEY_CTX *ctx), - int (*paramgen) (EVP_PKEY_CTX *ctx, - EVP_PKEY *pkey)); - -void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, - int (*keygen_init) (EVP_PKEY_CTX *ctx), - int (*keygen) (EVP_PKEY_CTX *ctx, - EVP_PKEY *pkey)); - -void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, - int (*sign_init) (EVP_PKEY_CTX *ctx), - int (*sign) (EVP_PKEY_CTX *ctx, - unsigned char *sig, size_t *siglen, - const unsigned char *tbs, - size_t tbslen)); - -void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, - int (*verify_init) (EVP_PKEY_CTX *ctx), - int (*verify) (EVP_PKEY_CTX *ctx, - const unsigned char *sig, - size_t siglen, - const unsigned char *tbs, - size_t tbslen)); - -void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, - int (*verify_recover_init) (EVP_PKEY_CTX - *ctx), - int (*verify_recover) (EVP_PKEY_CTX - *ctx, - unsigned char - *sig, - size_t *siglen, - const unsigned - char *tbs, - size_t tbslen)); - -void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, - int (*signctx_init) (EVP_PKEY_CTX *ctx, - EVP_MD_CTX *mctx), - int (*signctx) (EVP_PKEY_CTX *ctx, - unsigned char *sig, - size_t *siglen, - EVP_MD_CTX *mctx)); - -void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, - int (*verifyctx_init) (EVP_PKEY_CTX *ctx, - EVP_MD_CTX *mctx), - int (*verifyctx) (EVP_PKEY_CTX *ctx, - const unsigned char *sig, - int siglen, - EVP_MD_CTX *mctx)); - -void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, - int (*encrypt_init) (EVP_PKEY_CTX *ctx), - int (*encryptfn) (EVP_PKEY_CTX *ctx, - unsigned char *out, - size_t *outlen, - const unsigned char *in, - size_t inlen)); - -void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, - int (*decrypt_init) (EVP_PKEY_CTX *ctx), - int (*decrypt) (EVP_PKEY_CTX *ctx, - unsigned char *out, - size_t *outlen, - const unsigned char *in, - size_t inlen)); - -void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, - int (*derive_init) (EVP_PKEY_CTX *ctx), - int (*derive) (EVP_PKEY_CTX *ctx, - unsigned char *key, - size_t *keylen)); - -void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, - int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, - void *p2), - int (*ctrl_str) (EVP_PKEY_CTX *ctx, - const char *type, - const char *value)); - -void EVP_add_alg_module(void); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_EVP_strings(void); - -/* Error codes for the EVP functions. */ - -/* Function codes. */ -# define EVP_F_AESNI_INIT_KEY 165 -# define EVP_F_AESNI_XTS_CIPHER 176 -# define EVP_F_AES_INIT_KEY 133 -# define EVP_F_AES_T4_INIT_KEY 178 -# define EVP_F_AES_XTS 172 -# define EVP_F_AES_XTS_CIPHER 175 -# define EVP_F_ALG_MODULE_INIT 177 -# define EVP_F_CAMELLIA_INIT_KEY 159 -# define EVP_F_CMAC_INIT 173 -# define EVP_F_CMLL_T4_INIT_KEY 179 -# define EVP_F_D2I_PKEY 100 -# define EVP_F_DO_SIGVER_INIT 161 -# define EVP_F_DSAPKEY2PKCS8 134 -# define EVP_F_DSA_PKEY2PKCS8 135 -# define EVP_F_ECDSA_PKEY2PKCS8 129 -# define EVP_F_ECKEY_PKEY2PKCS8 132 -# define EVP_F_EVP_CIPHERINIT_EX 123 -# define EVP_F_EVP_CIPHER_CTX_COPY 163 -# define EVP_F_EVP_CIPHER_CTX_CTRL 124 -# define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 -# define EVP_F_EVP_DECRYPTFINAL_EX 101 -# define EVP_F_EVP_DIGESTINIT_EX 128 -# define EVP_F_EVP_ENCRYPTFINAL_EX 127 -# define EVP_F_EVP_MD_CTX_COPY_EX 110 -# define EVP_F_EVP_MD_SIZE 162 -# define EVP_F_EVP_OPENINIT 102 -# define EVP_F_EVP_PBE_ALG_ADD 115 -# define EVP_F_EVP_PBE_ALG_ADD_TYPE 160 -# define EVP_F_EVP_PBE_CIPHERINIT 116 -# define EVP_F_EVP_PKCS82PKEY 111 -# define EVP_F_EVP_PKCS82PKEY_BROKEN 136 -# define EVP_F_EVP_PKEY2PKCS8_BROKEN 113 -# define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 -# define EVP_F_EVP_PKEY_CTX_CTRL 137 -# define EVP_F_EVP_PKEY_CTX_CTRL_STR 150 -# define EVP_F_EVP_PKEY_CTX_DUP 156 -# define EVP_F_EVP_PKEY_DECRYPT 104 -# define EVP_F_EVP_PKEY_DECRYPT_INIT 138 -# define EVP_F_EVP_PKEY_DECRYPT_OLD 151 -# define EVP_F_EVP_PKEY_DERIVE 153 -# define EVP_F_EVP_PKEY_DERIVE_INIT 154 -# define EVP_F_EVP_PKEY_DERIVE_SET_PEER 155 -# define EVP_F_EVP_PKEY_ENCRYPT 105 -# define EVP_F_EVP_PKEY_ENCRYPT_INIT 139 -# define EVP_F_EVP_PKEY_ENCRYPT_OLD 152 -# define EVP_F_EVP_PKEY_GET1_DH 119 -# define EVP_F_EVP_PKEY_GET1_DSA 120 -# define EVP_F_EVP_PKEY_GET1_ECDSA 130 -# define EVP_F_EVP_PKEY_GET1_EC_KEY 131 -# define EVP_F_EVP_PKEY_GET1_RSA 121 -# define EVP_F_EVP_PKEY_KEYGEN 146 -# define EVP_F_EVP_PKEY_KEYGEN_INIT 147 -# define EVP_F_EVP_PKEY_NEW 106 -# define EVP_F_EVP_PKEY_PARAMGEN 148 -# define EVP_F_EVP_PKEY_PARAMGEN_INIT 149 -# define EVP_F_EVP_PKEY_SIGN 140 -# define EVP_F_EVP_PKEY_SIGN_INIT 141 -# define EVP_F_EVP_PKEY_VERIFY 142 -# define EVP_F_EVP_PKEY_VERIFY_INIT 143 -# define EVP_F_EVP_PKEY_VERIFY_RECOVER 144 -# define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT 145 -# define EVP_F_EVP_RIJNDAEL 126 -# define EVP_F_EVP_SIGNFINAL 107 -# define EVP_F_EVP_VERIFYFINAL 108 -# define EVP_F_FIPS_CIPHERINIT 166 -# define EVP_F_FIPS_CIPHER_CTX_COPY 170 -# define EVP_F_FIPS_CIPHER_CTX_CTRL 167 -# define EVP_F_FIPS_CIPHER_CTX_SET_KEY_LENGTH 171 -# define EVP_F_FIPS_DIGESTINIT 168 -# define EVP_F_FIPS_MD_CTX_COPY 169 -# define EVP_F_HMAC_INIT_EX 174 -# define EVP_F_INT_CTX_NEW 157 -# define EVP_F_PKCS5_PBE_KEYIVGEN 117 -# define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 -# define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164 -# define EVP_F_PKCS8_SET_BROKEN 112 -# define EVP_F_PKEY_SET_TYPE 158 -# define EVP_F_RC2_MAGIC_TO_METH 109 -# define EVP_F_RC5_CTRL 125 - -/* Reason codes. */ -# define EVP_R_AES_IV_SETUP_FAILED 162 -# define EVP_R_AES_KEY_SETUP_FAILED 143 -# define EVP_R_ASN1_LIB 140 -# define EVP_R_BAD_BLOCK_LENGTH 136 -# define EVP_R_BAD_DECRYPT 100 -# define EVP_R_BAD_KEY_LENGTH 137 -# define EVP_R_BN_DECODE_ERROR 112 -# define EVP_R_BN_PUBKEY_ERROR 113 -# define EVP_R_BUFFER_TOO_SMALL 155 -# define EVP_R_CAMELLIA_KEY_SETUP_FAILED 157 -# define EVP_R_CIPHER_PARAMETER_ERROR 122 -# define EVP_R_COMMAND_NOT_SUPPORTED 147 -# define EVP_R_CTRL_NOT_IMPLEMENTED 132 -# define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 -# define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 -# define EVP_R_DECODE_ERROR 114 -# define EVP_R_DIFFERENT_KEY_TYPES 101 -# define EVP_R_DIFFERENT_PARAMETERS 153 -# define EVP_R_DISABLED_FOR_FIPS 163 -# define EVP_R_ENCODE_ERROR 115 -# define EVP_R_ERROR_LOADING_SECTION 165 -# define EVP_R_ERROR_SETTING_FIPS_MODE 166 -# define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 -# define EVP_R_EXPECTING_AN_RSA_KEY 127 -# define EVP_R_EXPECTING_A_DH_KEY 128 -# define EVP_R_EXPECTING_A_DSA_KEY 129 -# define EVP_R_EXPECTING_A_ECDSA_KEY 141 -# define EVP_R_EXPECTING_A_EC_KEY 142 -# define EVP_R_FIPS_MODE_NOT_SUPPORTED 167 -# define EVP_R_INITIALIZATION_ERROR 134 -# define EVP_R_INPUT_NOT_INITIALIZED 111 -# define EVP_R_INVALID_DIGEST 152 -# define EVP_R_INVALID_FIPS_MODE 168 -# define EVP_R_INVALID_KEY_LENGTH 130 -# define EVP_R_INVALID_OPERATION 148 -# define EVP_R_IV_TOO_LARGE 102 -# define EVP_R_KEYGEN_FAILURE 120 -# define EVP_R_MESSAGE_DIGEST_IS_NULL 159 -# define EVP_R_METHOD_NOT_SUPPORTED 144 -# define EVP_R_MISSING_PARAMETERS 103 -# define EVP_R_NO_CIPHER_SET 131 -# define EVP_R_NO_DEFAULT_DIGEST 158 -# define EVP_R_NO_DIGEST_SET 139 -# define EVP_R_NO_DSA_PARAMETERS 116 -# define EVP_R_NO_KEY_SET 154 -# define EVP_R_NO_OPERATION_SET 149 -# define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 -# define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 -# define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150 -# define EVP_R_OPERATON_NOT_INITIALIZED 151 -# define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 -# define EVP_R_PRIVATE_KEY_DECODE_ERROR 145 -# define EVP_R_PRIVATE_KEY_ENCODE_ERROR 146 -# define EVP_R_PUBLIC_KEY_NOT_RSA 106 -# define EVP_R_TOO_LARGE 164 -# define EVP_R_UNKNOWN_CIPHER 160 -# define EVP_R_UNKNOWN_DIGEST 161 -# define EVP_R_UNKNOWN_OPTION 169 -# define EVP_R_UNKNOWN_PBE_ALGORITHM 121 -# define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135 -# define EVP_R_UNSUPPORTED_ALGORITHM 156 -# define EVP_R_UNSUPPORTED_CIPHER 107 -# define EVP_R_UNSUPPORTED_KEYLENGTH 123 -# define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 -# define EVP_R_UNSUPPORTED_KEY_SIZE 108 -# define EVP_R_UNSUPPORTED_PRF 125 -# define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM 118 -# define EVP_R_UNSUPPORTED_SALT_TYPE 126 -# define EVP_R_WRAP_MODE_NOT_ALLOWED 170 -# define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 -# define EVP_R_WRONG_PUBLIC_KEY_TYPE 110 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_ENVELOPE_H +# define HEADER_ENVELOPE_H + +# include +# include +# include +# include +# include + +# define EVP_MAX_MD_SIZE 64/* longest known is SHA512 */ +# define EVP_MAX_KEY_LENGTH 64 +# define EVP_MAX_IV_LENGTH 16 +# define EVP_MAX_BLOCK_LENGTH 32 + +# define PKCS5_SALT_LEN 8 +/* Default PKCS#5 iteration count */ +# define PKCS5_DEFAULT_ITER 2048 + +# include + +# define EVP_PK_RSA 0x0001 +# define EVP_PK_DSA 0x0002 +# define EVP_PK_DH 0x0004 +# define EVP_PK_EC 0x0008 +# define EVP_PKT_SIGN 0x0010 +# define EVP_PKT_ENC 0x0020 +# define EVP_PKT_EXCH 0x0040 +# define EVP_PKS_RSA 0x0100 +# define EVP_PKS_DSA 0x0200 +# define EVP_PKS_EC 0x0400 + +# define EVP_PKEY_NONE NID_undef +# define EVP_PKEY_RSA NID_rsaEncryption +# define EVP_PKEY_RSA2 NID_rsa +# define EVP_PKEY_RSA_PSS NID_rsassaPss +# define EVP_PKEY_DSA NID_dsa +# define EVP_PKEY_DSA1 NID_dsa_2 +# define EVP_PKEY_DSA2 NID_dsaWithSHA +# define EVP_PKEY_DSA3 NID_dsaWithSHA1 +# define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 +# define EVP_PKEY_DH NID_dhKeyAgreement +# define EVP_PKEY_DHX NID_dhpublicnumber +# define EVP_PKEY_EC NID_X9_62_id_ecPublicKey +# define EVP_PKEY_SM2 NID_sm2 +# define EVP_PKEY_HMAC NID_hmac +# define EVP_PKEY_CMAC NID_cmac +# define EVP_PKEY_SCRYPT NID_id_scrypt +# define EVP_PKEY_TLS1_PRF NID_tls1_prf +# define EVP_PKEY_HKDF NID_hkdf +# define EVP_PKEY_POLY1305 NID_poly1305 +# define EVP_PKEY_SIPHASH NID_siphash +# define EVP_PKEY_X25519 NID_X25519 +# define EVP_PKEY_ED25519 NID_ED25519 +# define EVP_PKEY_X448 NID_X448 +# define EVP_PKEY_ED448 NID_ED448 + +#ifdef __cplusplus +extern "C" { +#endif + +# define EVP_PKEY_MO_SIGN 0x0001 +# define EVP_PKEY_MO_VERIFY 0x0002 +# define EVP_PKEY_MO_ENCRYPT 0x0004 +# define EVP_PKEY_MO_DECRYPT 0x0008 + +# ifndef EVP_MD +EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); +EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); +void EVP_MD_meth_free(EVP_MD *md); + +int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize); +int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize); +int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize); +int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags); +int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)); +int EVP_MD_meth_set_update(EVP_MD *md, int (*update)(EVP_MD_CTX *ctx, + const void *data, + size_t count)); +int EVP_MD_meth_set_final(EVP_MD *md, int (*final)(EVP_MD_CTX *ctx, + unsigned char *md)); +int EVP_MD_meth_set_copy(EVP_MD *md, int (*copy)(EVP_MD_CTX *to, + const EVP_MD_CTX *from)); +int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); +int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd, + int p1, void *p2)); + +int EVP_MD_meth_get_input_blocksize(const EVP_MD *md); +int EVP_MD_meth_get_result_size(const EVP_MD *md); +int EVP_MD_meth_get_app_datasize(const EVP_MD *md); +unsigned long EVP_MD_meth_get_flags(const EVP_MD *md); +int (*EVP_MD_meth_get_init(const EVP_MD *md))(EVP_MD_CTX *ctx); +int (*EVP_MD_meth_get_update(const EVP_MD *md))(EVP_MD_CTX *ctx, + const void *data, + size_t count); +int (*EVP_MD_meth_get_final(const EVP_MD *md))(EVP_MD_CTX *ctx, + unsigned char *md); +int (*EVP_MD_meth_get_copy(const EVP_MD *md))(EVP_MD_CTX *to, + const EVP_MD_CTX *from); +int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx); +int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd, + int p1, void *p2); + +/* digest can only handle a single block */ +# define EVP_MD_FLAG_ONESHOT 0x0001 + +/* digest is extensible-output function, XOF */ +# define EVP_MD_FLAG_XOF 0x0002 + +/* DigestAlgorithmIdentifier flags... */ + +# define EVP_MD_FLAG_DIGALGID_MASK 0x0018 + +/* NULL or absent parameter accepted. Use NULL */ + +# define EVP_MD_FLAG_DIGALGID_NULL 0x0000 + +/* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */ + +# define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008 + +/* Custom handling via ctrl */ + +# define EVP_MD_FLAG_DIGALGID_CUSTOM 0x0018 + +/* Note if suitable for use in FIPS mode */ +# define EVP_MD_FLAG_FIPS 0x0400 + +/* Digest ctrls */ + +# define EVP_MD_CTRL_DIGALGID 0x1 +# define EVP_MD_CTRL_MICALG 0x2 +# define EVP_MD_CTRL_XOF_LEN 0x3 + +/* Minimum Algorithm specific ctrl value */ + +# define EVP_MD_CTRL_ALG_CTRL 0x1000 + +# endif /* !EVP_MD */ + +/* values for EVP_MD_CTX flags */ + +# define EVP_MD_CTX_FLAG_ONESHOT 0x0001/* digest update will be + * called once only */ +# define EVP_MD_CTX_FLAG_CLEANED 0x0002/* context has already been + * cleaned */ +# define EVP_MD_CTX_FLAG_REUSE 0x0004/* Don't free up ctx->md_data + * in EVP_MD_CTX_reset */ +/* + * FIPS and pad options are ignored in 1.0.0, definitions are here so we + * don't accidentally reuse the values for other purposes. + */ + +# define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008/* Allow use of non FIPS + * digest in FIPS mode */ + +/* + * The following PAD options are also currently ignored in 1.0.0, digest + * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*() + * instead. + */ +# define EVP_MD_CTX_FLAG_PAD_MASK 0xF0/* RSA mode to use */ +# define EVP_MD_CTX_FLAG_PAD_PKCS1 0x00/* PKCS#1 v1.5 mode */ +# define EVP_MD_CTX_FLAG_PAD_X931 0x10/* X9.31 mode */ +# define EVP_MD_CTX_FLAG_PAD_PSS 0x20/* PSS mode */ + +# define EVP_MD_CTX_FLAG_NO_INIT 0x0100/* Don't initialize md_data */ +/* + * Some functions such as EVP_DigestSign only finalise copies of internal + * contexts so additional data can be included after the finalisation call. + * This is inefficient if this functionality is not required: it is disabled + * if the following flag is set. + */ +# define EVP_MD_CTX_FLAG_FINALISE 0x0200 +/* NOTE: 0x0400 is reserved for internal usage in evp_int.h */ + +EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len); +EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher); +void EVP_CIPHER_meth_free(EVP_CIPHER *cipher); + +int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len); +int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags); +int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size); +int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, + int (*init) (EVP_CIPHER_CTX *ctx, + const unsigned char *key, + const unsigned char *iv, + int enc)); +int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, + int (*do_cipher) (EVP_CIPHER_CTX *ctx, + unsigned char *out, + const unsigned char *in, + size_t inl)); +int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, + int (*cleanup) (EVP_CIPHER_CTX *)); +int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, + int (*set_asn1_parameters) (EVP_CIPHER_CTX *, + ASN1_TYPE *)); +int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, + int (*get_asn1_parameters) (EVP_CIPHER_CTX *, + ASN1_TYPE *)); +int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, + int (*ctrl) (EVP_CIPHER_CTX *, int type, + int arg, void *ptr)); + +int (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, + const unsigned char *key, + const unsigned char *iv, + int enc); +int (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, + unsigned char *out, + const unsigned char *in, + size_t inl); +int (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *); +int (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, + ASN1_TYPE *); +int (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, + ASN1_TYPE *); +int (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, + int type, int arg, + void *ptr); + +/* Values for cipher flags */ + +/* Modes for ciphers */ + +# define EVP_CIPH_STREAM_CIPHER 0x0 +# define EVP_CIPH_ECB_MODE 0x1 +# define EVP_CIPH_CBC_MODE 0x2 +# define EVP_CIPH_CFB_MODE 0x3 +# define EVP_CIPH_OFB_MODE 0x4 +# define EVP_CIPH_CTR_MODE 0x5 +# define EVP_CIPH_GCM_MODE 0x6 +# define EVP_CIPH_CCM_MODE 0x7 +# define EVP_CIPH_XTS_MODE 0x10001 +# define EVP_CIPH_WRAP_MODE 0x10002 +# define EVP_CIPH_OCB_MODE 0x10003 +# define EVP_CIPH_MODE 0xF0007 +/* Set if variable length cipher */ +# define EVP_CIPH_VARIABLE_LENGTH 0x8 +/* Set if the iv handling should be done by the cipher itself */ +# define EVP_CIPH_CUSTOM_IV 0x10 +/* Set if the cipher's init() function should be called if key is NULL */ +# define EVP_CIPH_ALWAYS_CALL_INIT 0x20 +/* Call ctrl() to init cipher parameters */ +# define EVP_CIPH_CTRL_INIT 0x40 +/* Don't use standard key length function */ +# define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 +/* Don't use standard block padding */ +# define EVP_CIPH_NO_PADDING 0x100 +/* cipher handles random key generation */ +# define EVP_CIPH_RAND_KEY 0x200 +/* cipher has its own additional copying logic */ +# define EVP_CIPH_CUSTOM_COPY 0x400 +/* Don't use standard iv length function */ +# define EVP_CIPH_CUSTOM_IV_LENGTH 0x800 +/* Allow use default ASN1 get/set iv */ +# define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000 +/* Buffer length in bits not bytes: CFB1 mode only */ +# define EVP_CIPH_FLAG_LENGTH_BITS 0x2000 +/* Note if suitable for use in FIPS mode */ +# define EVP_CIPH_FLAG_FIPS 0x4000 +/* Allow non FIPS cipher in FIPS mode */ +# define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x8000 +/* + * Cipher handles any and all padding logic as well as finalisation. + */ +# define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000 +# define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000 +# define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000 +/* Cipher can handle pipeline operations */ +# define EVP_CIPH_FLAG_PIPELINE 0X800000 + +/* + * Cipher context flag to indicate we can handle wrap mode: if allowed in + * older applications it could overflow buffers. + */ + +# define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1 + +/* ctrl() values */ + +# define EVP_CTRL_INIT 0x0 +# define EVP_CTRL_SET_KEY_LENGTH 0x1 +# define EVP_CTRL_GET_RC2_KEY_BITS 0x2 +# define EVP_CTRL_SET_RC2_KEY_BITS 0x3 +# define EVP_CTRL_GET_RC5_ROUNDS 0x4 +# define EVP_CTRL_SET_RC5_ROUNDS 0x5 +# define EVP_CTRL_RAND_KEY 0x6 +# define EVP_CTRL_PBE_PRF_NID 0x7 +# define EVP_CTRL_COPY 0x8 +# define EVP_CTRL_AEAD_SET_IVLEN 0x9 +# define EVP_CTRL_AEAD_GET_TAG 0x10 +# define EVP_CTRL_AEAD_SET_TAG 0x11 +# define EVP_CTRL_AEAD_SET_IV_FIXED 0x12 +# define EVP_CTRL_GCM_SET_IVLEN EVP_CTRL_AEAD_SET_IVLEN +# define EVP_CTRL_GCM_GET_TAG EVP_CTRL_AEAD_GET_TAG +# define EVP_CTRL_GCM_SET_TAG EVP_CTRL_AEAD_SET_TAG +# define EVP_CTRL_GCM_SET_IV_FIXED EVP_CTRL_AEAD_SET_IV_FIXED +# define EVP_CTRL_GCM_IV_GEN 0x13 +# define EVP_CTRL_CCM_SET_IVLEN EVP_CTRL_AEAD_SET_IVLEN +# define EVP_CTRL_CCM_GET_TAG EVP_CTRL_AEAD_GET_TAG +# define EVP_CTRL_CCM_SET_TAG EVP_CTRL_AEAD_SET_TAG +# define EVP_CTRL_CCM_SET_IV_FIXED EVP_CTRL_AEAD_SET_IV_FIXED +# define EVP_CTRL_CCM_SET_L 0x14 +# define EVP_CTRL_CCM_SET_MSGLEN 0x15 +/* + * AEAD cipher deduces payload length and returns number of bytes required to + * store MAC and eventual padding. Subsequent call to EVP_Cipher even + * appends/verifies MAC. + */ +# define EVP_CTRL_AEAD_TLS1_AAD 0x16 +/* Used by composite AEAD ciphers, no-op in GCM, CCM... */ +# define EVP_CTRL_AEAD_SET_MAC_KEY 0x17 +/* Set the GCM invocation field, decrypt only */ +# define EVP_CTRL_GCM_SET_IV_INV 0x18 + +# define EVP_CTRL_TLS1_1_MULTIBLOCK_AAD 0x19 +# define EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT 0x1a +# define EVP_CTRL_TLS1_1_MULTIBLOCK_DECRYPT 0x1b +# define EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE 0x1c + +# define EVP_CTRL_SSL3_MASTER_SECRET 0x1d + +/* EVP_CTRL_SET_SBOX takes the char * specifying S-boxes */ +# define EVP_CTRL_SET_SBOX 0x1e +/* + * EVP_CTRL_SBOX_USED takes a 'size_t' and 'char *', pointing at a + * pre-allocated buffer with specified size + */ +# define EVP_CTRL_SBOX_USED 0x1f +/* EVP_CTRL_KEY_MESH takes 'size_t' number of bytes to mesh the key after, + * 0 switches meshing off + */ +# define EVP_CTRL_KEY_MESH 0x20 +/* EVP_CTRL_BLOCK_PADDING_MODE takes the padding mode */ +# define EVP_CTRL_BLOCK_PADDING_MODE 0x21 + +/* Set the output buffers to use for a pipelined operation */ +# define EVP_CTRL_SET_PIPELINE_OUTPUT_BUFS 0x22 +/* Set the input buffers to use for a pipelined operation */ +# define EVP_CTRL_SET_PIPELINE_INPUT_BUFS 0x23 +/* Set the input buffer lengths to use for a pipelined operation */ +# define EVP_CTRL_SET_PIPELINE_INPUT_LENS 0x24 + +# define EVP_CTRL_GET_IVLEN 0x25 + +/* Padding modes */ +#define EVP_PADDING_PKCS7 1 +#define EVP_PADDING_ISO7816_4 2 +#define EVP_PADDING_ANSI923 3 +#define EVP_PADDING_ISO10126 4 +#define EVP_PADDING_ZERO 5 + +/* RFC 5246 defines additional data to be 13 bytes in length */ +# define EVP_AEAD_TLS1_AAD_LEN 13 + +typedef struct { + unsigned char *out; + const unsigned char *inp; + size_t len; + unsigned int interleave; +} EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM; + +/* GCM TLS constants */ +/* Length of fixed part of IV derived from PRF */ +# define EVP_GCM_TLS_FIXED_IV_LEN 4 +/* Length of explicit part of IV part of TLS records */ +# define EVP_GCM_TLS_EXPLICIT_IV_LEN 8 +/* Length of tag for TLS */ +# define EVP_GCM_TLS_TAG_LEN 16 + +/* CCM TLS constants */ +/* Length of fixed part of IV derived from PRF */ +# define EVP_CCM_TLS_FIXED_IV_LEN 4 +/* Length of explicit part of IV part of TLS records */ +# define EVP_CCM_TLS_EXPLICIT_IV_LEN 8 +/* Total length of CCM IV length for TLS */ +# define EVP_CCM_TLS_IV_LEN 12 +/* Length of tag for TLS */ +# define EVP_CCM_TLS_TAG_LEN 16 +/* Length of CCM8 tag for TLS */ +# define EVP_CCM8_TLS_TAG_LEN 8 + +/* Length of tag for TLS */ +# define EVP_CHACHAPOLY_TLS_TAG_LEN 16 + +typedef struct evp_cipher_info_st { + const EVP_CIPHER *cipher; + unsigned char iv[EVP_MAX_IV_LENGTH]; +} EVP_CIPHER_INFO; + + +/* Password based encryption function */ +typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass, + int passlen, ASN1_TYPE *param, + const EVP_CIPHER *cipher, const EVP_MD *md, + int en_de); + +# ifndef OPENSSL_NO_RSA +# define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ + (char *)(rsa)) +# endif + +# ifndef OPENSSL_NO_DSA +# define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ + (char *)(dsa)) +# endif + +# ifndef OPENSSL_NO_DH +# define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\ + (char *)(dh)) +# endif + +# ifndef OPENSSL_NO_EC +# define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ + (char *)(eckey)) +# endif +# ifndef OPENSSL_NO_SIPHASH +# define EVP_PKEY_assign_SIPHASH(pkey,shkey) EVP_PKEY_assign((pkey),EVP_PKEY_SIPHASH,\ + (char *)(shkey)) +# endif + +# ifndef OPENSSL_NO_POLY1305 +# define EVP_PKEY_assign_POLY1305(pkey,polykey) EVP_PKEY_assign((pkey),EVP_PKEY_POLY1305,\ + (char *)(polykey)) +# endif + +/* Add some extra combinations */ +# define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a)) +# define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a)) +# define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) +# define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) + +int EVP_MD_type(const EVP_MD *md); +# define EVP_MD_nid(e) EVP_MD_type(e) +# define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) +int EVP_MD_pkey_type(const EVP_MD *md); +int EVP_MD_size(const EVP_MD *md); +int EVP_MD_block_size(const EVP_MD *md); +unsigned long EVP_MD_flags(const EVP_MD *md); + +const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); +int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx, + const void *data, size_t count); +void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx, + int (*update) (EVP_MD_CTX *ctx, + const void *data, size_t count)); +# define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) +# define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) +# define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) +EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); +void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); +void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); + +int EVP_CIPHER_nid(const EVP_CIPHER *cipher); +# define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) +int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); +int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *cipher); +int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); +int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); +unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); +# define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) + +const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); +const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx); +const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx); +unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx); +unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); +int EVP_CIPHER_CTX_num(const EVP_CIPHER_CTX *ctx); +void EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num); +int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); +void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); +void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); +void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx); +void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data); +# define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) +# if OPENSSL_API_COMPAT < 0x10100000L +# define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(c)) +# endif +# define EVP_CIPHER_CTX_mode(c) EVP_CIPHER_mode(EVP_CIPHER_CTX_cipher(c)) + +# define EVP_ENCODE_LENGTH(l) ((((l)+2)/3*4)+((l)/48+1)*2+80) +# define EVP_DECODE_LENGTH(l) (((l)+3)/4*3+80) + +# define EVP_SignInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) +# define EVP_SignInit(a,b) EVP_DigestInit(a,b) +# define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) +# define EVP_VerifyInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) +# define EVP_VerifyInit(a,b) EVP_DigestInit(a,b) +# define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) +# define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) +# define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e) +# define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) +# define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) + +# ifdef CONST_STRICT +void BIO_set_md(BIO *, const EVP_MD *md); +# else +# define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)(md)) +# endif +# define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)(mdp)) +# define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0, \ + (char *)(mdcp)) +# define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0, \ + (char *)(mdcp)) +# define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) +# define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0, \ + (char *)(c_pp)) + +/*__owur*/ int EVP_Cipher(EVP_CIPHER_CTX *c, + unsigned char *out, + const unsigned char *in, unsigned int inl); + +# define EVP_add_cipher_alias(n,alias) \ + OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n)) +# define EVP_add_digest_alias(n,alias) \ + OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n)) +# define EVP_delete_cipher_alias(alias) \ + OBJ_NAME_remove(alias,OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS); +# define EVP_delete_digest_alias(alias) \ + OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); + +int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); +EVP_MD_CTX *EVP_MD_CTX_new(void); +int EVP_MD_CTX_reset(EVP_MD_CTX *ctx); +void EVP_MD_CTX_free(EVP_MD_CTX *ctx); +# define EVP_MD_CTX_create() EVP_MD_CTX_new() +# define EVP_MD_CTX_init(ctx) EVP_MD_CTX_reset((ctx)) +# define EVP_MD_CTX_destroy(ctx) EVP_MD_CTX_free((ctx)) +__owur int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in); +void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); +void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); +int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags); +__owur int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, + ENGINE *impl); +__owur int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, + size_t cnt); +__owur int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, + unsigned int *s); +__owur int EVP_Digest(const void *data, size_t count, + unsigned char *md, unsigned int *size, + const EVP_MD *type, ENGINE *impl); + +__owur int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in); +__owur int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); +__owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, + unsigned int *s); +__owur int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *md, + size_t len); + +int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify); +int EVP_read_pw_string_min(char *buf, int minlen, int maxlen, + const char *prompt, int verify); +void EVP_set_pw_prompt(const char *prompt); +char *EVP_get_pw_prompt(void); + +__owur int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, + const unsigned char *salt, + const unsigned char *data, int datal, int count, + unsigned char *key, unsigned char *iv); + +void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags); +void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags); +int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags); + +__owur int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, + const unsigned char *key, const unsigned char *iv); +/*__owur*/ int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, + const EVP_CIPHER *cipher, ENGINE *impl, + const unsigned char *key, + const unsigned char *iv); +/*__owur*/ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, + int *outl, const unsigned char *in, int inl); +/*__owur*/ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, + int *outl); +/*__owur*/ int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, + int *outl); + +__owur int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, + const unsigned char *key, const unsigned char *iv); +/*__owur*/ int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, + const EVP_CIPHER *cipher, ENGINE *impl, + const unsigned char *key, + const unsigned char *iv); +/*__owur*/ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, + int *outl, const unsigned char *in, int inl); +__owur int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, + int *outl); +/*__owur*/ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, + int *outl); + +__owur int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, + const unsigned char *key, const unsigned char *iv, + int enc); +/*__owur*/ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, + const EVP_CIPHER *cipher, ENGINE *impl, + const unsigned char *key, + const unsigned char *iv, int enc); +__owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, + int *outl, const unsigned char *in, int inl); +__owur int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, + int *outl); +__owur int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, + int *outl); + +__owur int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, + EVP_PKEY *pkey); + +__owur int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, + size_t *siglen, const unsigned char *tbs, + size_t tbslen); + +__owur int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, + unsigned int siglen, EVP_PKEY *pkey); + +__owur int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, + size_t siglen, const unsigned char *tbs, + size_t tbslen); + +/*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, + const EVP_MD *type, ENGINE *e, + EVP_PKEY *pkey); +__owur int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, + size_t *siglen); + +__owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, + const EVP_MD *type, ENGINE *e, + EVP_PKEY *pkey); +__owur int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, + size_t siglen); + +# ifndef OPENSSL_NO_RSA +__owur int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, + const unsigned char *ek, int ekl, + const unsigned char *iv, EVP_PKEY *priv); +__owur int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); + +__owur int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, + unsigned char **ek, int *ekl, unsigned char *iv, + EVP_PKEY **pubk, int npubk); +__owur int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); +# endif + +EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void); +void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx); +int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, EVP_ENCODE_CTX *sctx); +int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx); +void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); +int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + const unsigned char *in, int inl); +void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); +int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); + +void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); +int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + const unsigned char *in, int inl); +int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned + char *out, int *outl); +int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define EVP_CIPHER_CTX_init(c) EVP_CIPHER_CTX_reset(c) +# define EVP_CIPHER_CTX_cleanup(c) EVP_CIPHER_CTX_reset(c) +# endif +EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); +int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c); +void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *c); +int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); +int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); +int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); +int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); + +const BIO_METHOD *BIO_f_md(void); +const BIO_METHOD *BIO_f_base64(void); +const BIO_METHOD *BIO_f_cipher(void); +const BIO_METHOD *BIO_f_reliable(void); +__owur int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, + const unsigned char *i, int enc); + +const EVP_MD *EVP_md_null(void); +# ifndef OPENSSL_NO_MD2 +const EVP_MD *EVP_md2(void); +# endif +# ifndef OPENSSL_NO_MD4 +const EVP_MD *EVP_md4(void); +# endif +# ifndef OPENSSL_NO_MD5 +const EVP_MD *EVP_md5(void); +const EVP_MD *EVP_md5_sha1(void); +# endif +# ifndef OPENSSL_NO_BLAKE2 +const EVP_MD *EVP_blake2b512(void); +const EVP_MD *EVP_blake2s256(void); +# endif +const EVP_MD *EVP_sha1(void); +const EVP_MD *EVP_sha224(void); +const EVP_MD *EVP_sha256(void); +const EVP_MD *EVP_sha384(void); +const EVP_MD *EVP_sha512(void); +const EVP_MD *EVP_sha512_224(void); +const EVP_MD *EVP_sha512_256(void); +const EVP_MD *EVP_sha3_224(void); +const EVP_MD *EVP_sha3_256(void); +const EVP_MD *EVP_sha3_384(void); +const EVP_MD *EVP_sha3_512(void); +const EVP_MD *EVP_shake128(void); +const EVP_MD *EVP_shake256(void); +# ifndef OPENSSL_NO_MDC2 +const EVP_MD *EVP_mdc2(void); +# endif +# ifndef OPENSSL_NO_RMD160 +const EVP_MD *EVP_ripemd160(void); +# endif +# ifndef OPENSSL_NO_WHIRLPOOL +const EVP_MD *EVP_whirlpool(void); +# endif +# ifndef OPENSSL_NO_SM3 +const EVP_MD *EVP_sm3(void); +# endif +const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */ +# ifndef OPENSSL_NO_DES +const EVP_CIPHER *EVP_des_ecb(void); +const EVP_CIPHER *EVP_des_ede(void); +const EVP_CIPHER *EVP_des_ede3(void); +const EVP_CIPHER *EVP_des_ede_ecb(void); +const EVP_CIPHER *EVP_des_ede3_ecb(void); +const EVP_CIPHER *EVP_des_cfb64(void); +# define EVP_des_cfb EVP_des_cfb64 +const EVP_CIPHER *EVP_des_cfb1(void); +const EVP_CIPHER *EVP_des_cfb8(void); +const EVP_CIPHER *EVP_des_ede_cfb64(void); +# define EVP_des_ede_cfb EVP_des_ede_cfb64 +const EVP_CIPHER *EVP_des_ede3_cfb64(void); +# define EVP_des_ede3_cfb EVP_des_ede3_cfb64 +const EVP_CIPHER *EVP_des_ede3_cfb1(void); +const EVP_CIPHER *EVP_des_ede3_cfb8(void); +const EVP_CIPHER *EVP_des_ofb(void); +const EVP_CIPHER *EVP_des_ede_ofb(void); +const EVP_CIPHER *EVP_des_ede3_ofb(void); +const EVP_CIPHER *EVP_des_cbc(void); +const EVP_CIPHER *EVP_des_ede_cbc(void); +const EVP_CIPHER *EVP_des_ede3_cbc(void); +const EVP_CIPHER *EVP_desx_cbc(void); +const EVP_CIPHER *EVP_des_ede3_wrap(void); +/* + * This should now be supported through the dev_crypto ENGINE. But also, why + * are rc4 and md5 declarations made here inside a "NO_DES" precompiler + * branch? + */ +# endif +# ifndef OPENSSL_NO_RC4 +const EVP_CIPHER *EVP_rc4(void); +const EVP_CIPHER *EVP_rc4_40(void); +# ifndef OPENSSL_NO_MD5 +const EVP_CIPHER *EVP_rc4_hmac_md5(void); +# endif +# endif +# ifndef OPENSSL_NO_IDEA +const EVP_CIPHER *EVP_idea_ecb(void); +const EVP_CIPHER *EVP_idea_cfb64(void); +# define EVP_idea_cfb EVP_idea_cfb64 +const EVP_CIPHER *EVP_idea_ofb(void); +const EVP_CIPHER *EVP_idea_cbc(void); +# endif +# ifndef OPENSSL_NO_RC2 +const EVP_CIPHER *EVP_rc2_ecb(void); +const EVP_CIPHER *EVP_rc2_cbc(void); +const EVP_CIPHER *EVP_rc2_40_cbc(void); +const EVP_CIPHER *EVP_rc2_64_cbc(void); +const EVP_CIPHER *EVP_rc2_cfb64(void); +# define EVP_rc2_cfb EVP_rc2_cfb64 +const EVP_CIPHER *EVP_rc2_ofb(void); +# endif +# ifndef OPENSSL_NO_BF +const EVP_CIPHER *EVP_bf_ecb(void); +const EVP_CIPHER *EVP_bf_cbc(void); +const EVP_CIPHER *EVP_bf_cfb64(void); +# define EVP_bf_cfb EVP_bf_cfb64 +const EVP_CIPHER *EVP_bf_ofb(void); +# endif +# ifndef OPENSSL_NO_CAST +const EVP_CIPHER *EVP_cast5_ecb(void); +const EVP_CIPHER *EVP_cast5_cbc(void); +const EVP_CIPHER *EVP_cast5_cfb64(void); +# define EVP_cast5_cfb EVP_cast5_cfb64 +const EVP_CIPHER *EVP_cast5_ofb(void); +# endif +# ifndef OPENSSL_NO_RC5 +const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void); +const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void); +const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void); +# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64 +const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void); +# endif +const EVP_CIPHER *EVP_aes_128_ecb(void); +const EVP_CIPHER *EVP_aes_128_cbc(void); +const EVP_CIPHER *EVP_aes_128_cfb1(void); +const EVP_CIPHER *EVP_aes_128_cfb8(void); +const EVP_CIPHER *EVP_aes_128_cfb128(void); +# define EVP_aes_128_cfb EVP_aes_128_cfb128 +const EVP_CIPHER *EVP_aes_128_ofb(void); +const EVP_CIPHER *EVP_aes_128_ctr(void); +const EVP_CIPHER *EVP_aes_128_ccm(void); +const EVP_CIPHER *EVP_aes_128_gcm(void); +const EVP_CIPHER *EVP_aes_128_xts(void); +const EVP_CIPHER *EVP_aes_128_wrap(void); +const EVP_CIPHER *EVP_aes_128_wrap_pad(void); +# ifndef OPENSSL_NO_OCB +const EVP_CIPHER *EVP_aes_128_ocb(void); +# endif +const EVP_CIPHER *EVP_aes_192_ecb(void); +const EVP_CIPHER *EVP_aes_192_cbc(void); +const EVP_CIPHER *EVP_aes_192_cfb1(void); +const EVP_CIPHER *EVP_aes_192_cfb8(void); +const EVP_CIPHER *EVP_aes_192_cfb128(void); +# define EVP_aes_192_cfb EVP_aes_192_cfb128 +const EVP_CIPHER *EVP_aes_192_ofb(void); +const EVP_CIPHER *EVP_aes_192_ctr(void); +const EVP_CIPHER *EVP_aes_192_ccm(void); +const EVP_CIPHER *EVP_aes_192_gcm(void); +const EVP_CIPHER *EVP_aes_192_wrap(void); +const EVP_CIPHER *EVP_aes_192_wrap_pad(void); +# ifndef OPENSSL_NO_OCB +const EVP_CIPHER *EVP_aes_192_ocb(void); +# endif +const EVP_CIPHER *EVP_aes_256_ecb(void); +const EVP_CIPHER *EVP_aes_256_cbc(void); +const EVP_CIPHER *EVP_aes_256_cfb1(void); +const EVP_CIPHER *EVP_aes_256_cfb8(void); +const EVP_CIPHER *EVP_aes_256_cfb128(void); +# define EVP_aes_256_cfb EVP_aes_256_cfb128 +const EVP_CIPHER *EVP_aes_256_ofb(void); +const EVP_CIPHER *EVP_aes_256_ctr(void); +const EVP_CIPHER *EVP_aes_256_ccm(void); +const EVP_CIPHER *EVP_aes_256_gcm(void); +const EVP_CIPHER *EVP_aes_256_xts(void); +const EVP_CIPHER *EVP_aes_256_wrap(void); +const EVP_CIPHER *EVP_aes_256_wrap_pad(void); +# ifndef OPENSSL_NO_OCB +const EVP_CIPHER *EVP_aes_256_ocb(void); +# endif +const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void); +const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void); +const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void); +const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void); +# ifndef OPENSSL_NO_ARIA +const EVP_CIPHER *EVP_aria_128_ecb(void); +const EVP_CIPHER *EVP_aria_128_cbc(void); +const EVP_CIPHER *EVP_aria_128_cfb1(void); +const EVP_CIPHER *EVP_aria_128_cfb8(void); +const EVP_CIPHER *EVP_aria_128_cfb128(void); +# define EVP_aria_128_cfb EVP_aria_128_cfb128 +const EVP_CIPHER *EVP_aria_128_ctr(void); +const EVP_CIPHER *EVP_aria_128_ofb(void); +const EVP_CIPHER *EVP_aria_128_gcm(void); +const EVP_CIPHER *EVP_aria_128_ccm(void); +const EVP_CIPHER *EVP_aria_192_ecb(void); +const EVP_CIPHER *EVP_aria_192_cbc(void); +const EVP_CIPHER *EVP_aria_192_cfb1(void); +const EVP_CIPHER *EVP_aria_192_cfb8(void); +const EVP_CIPHER *EVP_aria_192_cfb128(void); +# define EVP_aria_192_cfb EVP_aria_192_cfb128 +const EVP_CIPHER *EVP_aria_192_ctr(void); +const EVP_CIPHER *EVP_aria_192_ofb(void); +const EVP_CIPHER *EVP_aria_192_gcm(void); +const EVP_CIPHER *EVP_aria_192_ccm(void); +const EVP_CIPHER *EVP_aria_256_ecb(void); +const EVP_CIPHER *EVP_aria_256_cbc(void); +const EVP_CIPHER *EVP_aria_256_cfb1(void); +const EVP_CIPHER *EVP_aria_256_cfb8(void); +const EVP_CIPHER *EVP_aria_256_cfb128(void); +# define EVP_aria_256_cfb EVP_aria_256_cfb128 +const EVP_CIPHER *EVP_aria_256_ctr(void); +const EVP_CIPHER *EVP_aria_256_ofb(void); +const EVP_CIPHER *EVP_aria_256_gcm(void); +const EVP_CIPHER *EVP_aria_256_ccm(void); +# endif +# ifndef OPENSSL_NO_CAMELLIA +const EVP_CIPHER *EVP_camellia_128_ecb(void); +const EVP_CIPHER *EVP_camellia_128_cbc(void); +const EVP_CIPHER *EVP_camellia_128_cfb1(void); +const EVP_CIPHER *EVP_camellia_128_cfb8(void); +const EVP_CIPHER *EVP_camellia_128_cfb128(void); +# define EVP_camellia_128_cfb EVP_camellia_128_cfb128 +const EVP_CIPHER *EVP_camellia_128_ofb(void); +const EVP_CIPHER *EVP_camellia_128_ctr(void); +const EVP_CIPHER *EVP_camellia_192_ecb(void); +const EVP_CIPHER *EVP_camellia_192_cbc(void); +const EVP_CIPHER *EVP_camellia_192_cfb1(void); +const EVP_CIPHER *EVP_camellia_192_cfb8(void); +const EVP_CIPHER *EVP_camellia_192_cfb128(void); +# define EVP_camellia_192_cfb EVP_camellia_192_cfb128 +const EVP_CIPHER *EVP_camellia_192_ofb(void); +const EVP_CIPHER *EVP_camellia_192_ctr(void); +const EVP_CIPHER *EVP_camellia_256_ecb(void); +const EVP_CIPHER *EVP_camellia_256_cbc(void); +const EVP_CIPHER *EVP_camellia_256_cfb1(void); +const EVP_CIPHER *EVP_camellia_256_cfb8(void); +const EVP_CIPHER *EVP_camellia_256_cfb128(void); +# define EVP_camellia_256_cfb EVP_camellia_256_cfb128 +const EVP_CIPHER *EVP_camellia_256_ofb(void); +const EVP_CIPHER *EVP_camellia_256_ctr(void); +# endif +# ifndef OPENSSL_NO_CHACHA +const EVP_CIPHER *EVP_chacha20(void); +# ifndef OPENSSL_NO_POLY1305 +const EVP_CIPHER *EVP_chacha20_poly1305(void); +# endif +# endif + +# ifndef OPENSSL_NO_SEED +const EVP_CIPHER *EVP_seed_ecb(void); +const EVP_CIPHER *EVP_seed_cbc(void); +const EVP_CIPHER *EVP_seed_cfb128(void); +# define EVP_seed_cfb EVP_seed_cfb128 +const EVP_CIPHER *EVP_seed_ofb(void); +# endif + +# ifndef OPENSSL_NO_SM4 +const EVP_CIPHER *EVP_sm4_ecb(void); +const EVP_CIPHER *EVP_sm4_cbc(void); +const EVP_CIPHER *EVP_sm4_cfb128(void); +# define EVP_sm4_cfb EVP_sm4_cfb128 +const EVP_CIPHER *EVP_sm4_ofb(void); +const EVP_CIPHER *EVP_sm4_ctr(void); +# endif + +# if OPENSSL_API_COMPAT < 0x10100000L +# define OPENSSL_add_all_algorithms_conf() \ + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ + | OPENSSL_INIT_ADD_ALL_DIGESTS \ + | OPENSSL_INIT_LOAD_CONFIG, NULL) +# define OPENSSL_add_all_algorithms_noconf() \ + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ + | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) + +# ifdef OPENSSL_LOAD_CONF +# define OpenSSL_add_all_algorithms() OPENSSL_add_all_algorithms_conf() +# else +# define OpenSSL_add_all_algorithms() OPENSSL_add_all_algorithms_noconf() +# endif + +# define OpenSSL_add_all_ciphers() \ + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS, NULL) +# define OpenSSL_add_all_digests() \ + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) + +# define EVP_cleanup() while(0) continue +# endif + +int EVP_add_cipher(const EVP_CIPHER *cipher); +int EVP_add_digest(const EVP_MD *digest); + +const EVP_CIPHER *EVP_get_cipherbyname(const char *name); +const EVP_MD *EVP_get_digestbyname(const char *name); + +void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph, + const char *from, const char *to, void *x), + void *arg); +void EVP_CIPHER_do_all_sorted(void (*fn) + (const EVP_CIPHER *ciph, const char *from, + const char *to, void *x), void *arg); + +void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph, + const char *from, const char *to, void *x), + void *arg); +void EVP_MD_do_all_sorted(void (*fn) + (const EVP_MD *ciph, const char *from, + const char *to, void *x), void *arg); + +int EVP_PKEY_decrypt_old(unsigned char *dec_key, + const unsigned char *enc_key, int enc_key_len, + EVP_PKEY *private_key); +int EVP_PKEY_encrypt_old(unsigned char *enc_key, + const unsigned char *key, int key_len, + EVP_PKEY *pub_key); +int EVP_PKEY_type(int type); +int EVP_PKEY_id(const EVP_PKEY *pkey); +int EVP_PKEY_base_id(const EVP_PKEY *pkey); +int EVP_PKEY_bits(const EVP_PKEY *pkey); +int EVP_PKEY_security_bits(const EVP_PKEY *pkey); +int EVP_PKEY_size(const EVP_PKEY *pkey); +int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); +int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); +int EVP_PKEY_set_alias_type(EVP_PKEY *pkey, int type); +# ifndef OPENSSL_NO_ENGINE +int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e); +ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey); +# endif +int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key); +void *EVP_PKEY_get0(const EVP_PKEY *pkey); +const unsigned char *EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len); +# ifndef OPENSSL_NO_POLY1305 +const unsigned char *EVP_PKEY_get0_poly1305(const EVP_PKEY *pkey, size_t *len); +# endif +# ifndef OPENSSL_NO_SIPHASH +const unsigned char *EVP_PKEY_get0_siphash(const EVP_PKEY *pkey, size_t *len); +# endif + +# ifndef OPENSSL_NO_RSA +struct rsa_st; +int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key); +struct rsa_st *EVP_PKEY_get0_RSA(EVP_PKEY *pkey); +struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); +# endif +# ifndef OPENSSL_NO_DSA +struct dsa_st; +int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key); +struct dsa_st *EVP_PKEY_get0_DSA(EVP_PKEY *pkey); +struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); +# endif +# ifndef OPENSSL_NO_DH +struct dh_st; +int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key); +struct dh_st *EVP_PKEY_get0_DH(EVP_PKEY *pkey); +struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); +# endif +# ifndef OPENSSL_NO_EC +struct ec_key_st; +int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key); +struct ec_key_st *EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey); +struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); +# endif + +EVP_PKEY *EVP_PKEY_new(void); +int EVP_PKEY_up_ref(EVP_PKEY *pkey); +void EVP_PKEY_free(EVP_PKEY *pkey); + +EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, + long length); +int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); + +EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, + long length); +EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, + long length); +int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); + +int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); +int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); +int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode); +int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); + +int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); + +int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, + int indent, ASN1_PCTX *pctx); +int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, + int indent, ASN1_PCTX *pctx); +int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, + int indent, ASN1_PCTX *pctx); + +int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); + +int EVP_PKEY_set1_tls_encodedpoint(EVP_PKEY *pkey, + const unsigned char *pt, size_t ptlen); +size_t EVP_PKEY_get1_tls_encodedpoint(EVP_PKEY *pkey, unsigned char **ppt); + +int EVP_CIPHER_type(const EVP_CIPHER *ctx); + +/* calls methods */ +int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); +int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); + +/* These are used by EVP_CIPHER methods */ +int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); +int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); + +/* PKCS5 password based encryption */ +int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, + ASN1_TYPE *param, const EVP_CIPHER *cipher, + const EVP_MD *md, int en_de); +int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, + const unsigned char *salt, int saltlen, int iter, + int keylen, unsigned char *out); +int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, + const unsigned char *salt, int saltlen, int iter, + const EVP_MD *digest, int keylen, unsigned char *out); +int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, + ASN1_TYPE *param, const EVP_CIPHER *cipher, + const EVP_MD *md, int en_de); + +#ifndef OPENSSL_NO_SCRYPT +int EVP_PBE_scrypt(const char *pass, size_t passlen, + const unsigned char *salt, size_t saltlen, + uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem, + unsigned char *key, size_t keylen); + +int PKCS5_v2_scrypt_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, + int passlen, ASN1_TYPE *param, + const EVP_CIPHER *c, const EVP_MD *md, int en_de); +#endif + +void PKCS5_PBE_add(void); + +int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, + ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); + +/* PBE type */ + +/* Can appear as the outermost AlgorithmIdentifier */ +# define EVP_PBE_TYPE_OUTER 0x0 +/* Is an PRF type OID */ +# define EVP_PBE_TYPE_PRF 0x1 +/* Is a PKCS#5 v2.0 KDF */ +# define EVP_PBE_TYPE_KDF 0x2 + +int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, + int md_nid, EVP_PBE_KEYGEN *keygen); +int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, + EVP_PBE_KEYGEN *keygen); +int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid, + EVP_PBE_KEYGEN **pkeygen); +void EVP_PBE_cleanup(void); +int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num); + +# define ASN1_PKEY_ALIAS 0x1 +# define ASN1_PKEY_DYNAMIC 0x2 +# define ASN1_PKEY_SIGPARAM_NULL 0x4 + +# define ASN1_PKEY_CTRL_PKCS7_SIGN 0x1 +# define ASN1_PKEY_CTRL_PKCS7_ENCRYPT 0x2 +# define ASN1_PKEY_CTRL_DEFAULT_MD_NID 0x3 +# define ASN1_PKEY_CTRL_CMS_SIGN 0x5 +# define ASN1_PKEY_CTRL_CMS_ENVELOPE 0x7 +# define ASN1_PKEY_CTRL_CMS_RI_TYPE 0x8 + +# define ASN1_PKEY_CTRL_SET1_TLS_ENCPT 0x9 +# define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa + +int EVP_PKEY_asn1_get_count(void); +const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx); +const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type); +const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe, + const char *str, int len); +int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth); +int EVP_PKEY_asn1_add_alias(int to, int from); +int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, + int *ppkey_flags, const char **pinfo, + const char **ppem_str, + const EVP_PKEY_ASN1_METHOD *ameth); + +const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey); +EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags, + const char *pem_str, + const char *info); +void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, + const EVP_PKEY_ASN1_METHOD *src); +void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth); +void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, + int (*pub_decode) (EVP_PKEY *pk, + X509_PUBKEY *pub), + int (*pub_encode) (X509_PUBKEY *pub, + const EVP_PKEY *pk), + int (*pub_cmp) (const EVP_PKEY *a, + const EVP_PKEY *b), + int (*pub_print) (BIO *out, + const EVP_PKEY *pkey, + int indent, ASN1_PCTX *pctx), + int (*pkey_size) (const EVP_PKEY *pk), + int (*pkey_bits) (const EVP_PKEY *pk)); +void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, + int (*priv_decode) (EVP_PKEY *pk, + const PKCS8_PRIV_KEY_INFO + *p8inf), + int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, + const EVP_PKEY *pk), + int (*priv_print) (BIO *out, + const EVP_PKEY *pkey, + int indent, + ASN1_PCTX *pctx)); +void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, + int (*param_decode) (EVP_PKEY *pkey, + const unsigned char **pder, + int derlen), + int (*param_encode) (const EVP_PKEY *pkey, + unsigned char **pder), + int (*param_missing) (const EVP_PKEY *pk), + int (*param_copy) (EVP_PKEY *to, + const EVP_PKEY *from), + int (*param_cmp) (const EVP_PKEY *a, + const EVP_PKEY *b), + int (*param_print) (BIO *out, + const EVP_PKEY *pkey, + int indent, + ASN1_PCTX *pctx)); + +void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, + void (*pkey_free) (EVP_PKEY *pkey)); +void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_ctrl) (EVP_PKEY *pkey, int op, + long arg1, void *arg2)); +void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth, + int (*item_verify) (EVP_MD_CTX *ctx, + const ASN1_ITEM *it, + void *asn, + X509_ALGOR *a, + ASN1_BIT_STRING *sig, + EVP_PKEY *pkey), + int (*item_sign) (EVP_MD_CTX *ctx, + const ASN1_ITEM *it, + void *asn, + X509_ALGOR *alg1, + X509_ALGOR *alg2, + ASN1_BIT_STRING *sig)); + +void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth, + int (*siginf_set) (X509_SIG_INFO *siginf, + const X509_ALGOR *alg, + const ASN1_STRING *sig)); + +void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_check) (const EVP_PKEY *pk)); + +void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_pub_check) (const EVP_PKEY *pk)); + +void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_param_check) (const EVP_PKEY *pk)); + +void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*set_priv_key) (EVP_PKEY *pk, + const unsigned char + *priv, + size_t len)); +void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*set_pub_key) (EVP_PKEY *pk, + const unsigned char *pub, + size_t len)); +void EVP_PKEY_asn1_set_get_priv_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*get_priv_key) (const EVP_PKEY *pk, + unsigned char *priv, + size_t *len)); +void EVP_PKEY_asn1_set_get_pub_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*get_pub_key) (const EVP_PKEY *pk, + unsigned char *pub, + size_t *len)); + +void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_security_bits) (const EVP_PKEY + *pk)); + +# define EVP_PKEY_OP_UNDEFINED 0 +# define EVP_PKEY_OP_PARAMGEN (1<<1) +# define EVP_PKEY_OP_KEYGEN (1<<2) +# define EVP_PKEY_OP_SIGN (1<<3) +# define EVP_PKEY_OP_VERIFY (1<<4) +# define EVP_PKEY_OP_VERIFYRECOVER (1<<5) +# define EVP_PKEY_OP_SIGNCTX (1<<6) +# define EVP_PKEY_OP_VERIFYCTX (1<<7) +# define EVP_PKEY_OP_ENCRYPT (1<<8) +# define EVP_PKEY_OP_DECRYPT (1<<9) +# define EVP_PKEY_OP_DERIVE (1<<10) + +# define EVP_PKEY_OP_TYPE_SIG \ + (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \ + | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX) + +# define EVP_PKEY_OP_TYPE_CRYPT \ + (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT) + +# define EVP_PKEY_OP_TYPE_NOGEN \ + (EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT | EVP_PKEY_OP_DERIVE) + +# define EVP_PKEY_OP_TYPE_GEN \ + (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) + +# define EVP_PKEY_CTX_set_signature_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ + EVP_PKEY_CTRL_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \ + EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ + EVP_PKEY_CTRL_GET_MD, 0, (void *)(pmd)) + +# define EVP_PKEY_CTX_set_mac_key(ctx, key, len) \ + EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_SET_MAC_KEY, len, (void *)(key)) + +# define EVP_PKEY_CTRL_MD 1 +# define EVP_PKEY_CTRL_PEER_KEY 2 + +# define EVP_PKEY_CTRL_PKCS7_ENCRYPT 3 +# define EVP_PKEY_CTRL_PKCS7_DECRYPT 4 + +# define EVP_PKEY_CTRL_PKCS7_SIGN 5 + +# define EVP_PKEY_CTRL_SET_MAC_KEY 6 + +# define EVP_PKEY_CTRL_DIGESTINIT 7 + +/* Used by GOST key encryption in TLS */ +# define EVP_PKEY_CTRL_SET_IV 8 + +# define EVP_PKEY_CTRL_CMS_ENCRYPT 9 +# define EVP_PKEY_CTRL_CMS_DECRYPT 10 +# define EVP_PKEY_CTRL_CMS_SIGN 11 + +# define EVP_PKEY_CTRL_CIPHER 12 + +# define EVP_PKEY_CTRL_GET_MD 13 + +# define EVP_PKEY_CTRL_SET_DIGEST_SIZE 14 + +# define EVP_PKEY_ALG_CTRL 0x1000 + +# define EVP_PKEY_FLAG_AUTOARGLEN 2 +/* + * Method handles all operations: don't assume any digest related defaults. + */ +# define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4 + +const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); +EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags); +void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, + const EVP_PKEY_METHOD *meth); +void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src); +void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth); +int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth); +int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth); +size_t EVP_PKEY_meth_get_count(void); +const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx); + +EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); +EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); +EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx); +void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); + +int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, + int cmd, int p1, void *p2); +int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, + const char *value); +int EVP_PKEY_CTX_ctrl_uint64(EVP_PKEY_CTX *ctx, int keytype, int optype, + int cmd, uint64_t value); + +int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str); +int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex); + +int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md); + +int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx); +void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen); + +EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, + const unsigned char *key, int keylen); +EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e, + const unsigned char *priv, + size_t len); +EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e, + const unsigned char *pub, + size_t len); +int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, unsigned char *priv, + size_t *len); +int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, unsigned char *pub, + size_t *len); + +EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, + size_t len, const EVP_CIPHER *cipher); + +void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data); +void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx); +EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx); + +EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx); + +void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data); +void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx); + +int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, + unsigned char *sig, size_t *siglen, + const unsigned char *tbs, size_t tbslen); +int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, + const unsigned char *sig, size_t siglen, + const unsigned char *tbs, size_t tbslen); +int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, + unsigned char *rout, size_t *routlen, + const unsigned char *sig, size_t siglen); +int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, + unsigned char *out, size_t *outlen, + const unsigned char *in, size_t inlen); +int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, + unsigned char *out, size_t *outlen, + const unsigned char *in, size_t inlen); + +int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer); +int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); + +typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx); + +int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); +int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); +int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); +int EVP_PKEY_check(EVP_PKEY_CTX *ctx); +int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx); +int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); + +void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); +EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx); + +int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx); + +void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, + int (*init) (EVP_PKEY_CTX *ctx)); + +void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, + int (*copy) (EVP_PKEY_CTX *dst, + EVP_PKEY_CTX *src)); + +void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, + void (*cleanup) (EVP_PKEY_CTX *ctx)); + +void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, + int (*paramgen_init) (EVP_PKEY_CTX *ctx), + int (*paramgen) (EVP_PKEY_CTX *ctx, + EVP_PKEY *pkey)); + +void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, + int (*keygen_init) (EVP_PKEY_CTX *ctx), + int (*keygen) (EVP_PKEY_CTX *ctx, + EVP_PKEY *pkey)); + +void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, + int (*sign_init) (EVP_PKEY_CTX *ctx), + int (*sign) (EVP_PKEY_CTX *ctx, + unsigned char *sig, size_t *siglen, + const unsigned char *tbs, + size_t tbslen)); + +void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, + int (*verify_init) (EVP_PKEY_CTX *ctx), + int (*verify) (EVP_PKEY_CTX *ctx, + const unsigned char *sig, + size_t siglen, + const unsigned char *tbs, + size_t tbslen)); + +void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, + int (*verify_recover_init) (EVP_PKEY_CTX + *ctx), + int (*verify_recover) (EVP_PKEY_CTX + *ctx, + unsigned char + *sig, + size_t *siglen, + const unsigned + char *tbs, + size_t tbslen)); + +void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, + int (*signctx_init) (EVP_PKEY_CTX *ctx, + EVP_MD_CTX *mctx), + int (*signctx) (EVP_PKEY_CTX *ctx, + unsigned char *sig, + size_t *siglen, + EVP_MD_CTX *mctx)); + +void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, + int (*verifyctx_init) (EVP_PKEY_CTX *ctx, + EVP_MD_CTX *mctx), + int (*verifyctx) (EVP_PKEY_CTX *ctx, + const unsigned char *sig, + int siglen, + EVP_MD_CTX *mctx)); + +void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, + int (*encrypt_init) (EVP_PKEY_CTX *ctx), + int (*encryptfn) (EVP_PKEY_CTX *ctx, + unsigned char *out, + size_t *outlen, + const unsigned char *in, + size_t inlen)); + +void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, + int (*decrypt_init) (EVP_PKEY_CTX *ctx), + int (*decrypt) (EVP_PKEY_CTX *ctx, + unsigned char *out, + size_t *outlen, + const unsigned char *in, + size_t inlen)); + +void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, + int (*derive_init) (EVP_PKEY_CTX *ctx), + int (*derive) (EVP_PKEY_CTX *ctx, + unsigned char *key, + size_t *keylen)); + +void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, + int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, + void *p2), + int (*ctrl_str) (EVP_PKEY_CTX *ctx, + const char *type, + const char *value)); + +void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, + int (*check) (EVP_PKEY *pkey)); + +void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, + int (*check) (EVP_PKEY *pkey)); + +void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, + int (*check) (EVP_PKEY *pkey)); + +void EVP_PKEY_meth_set_digest_custom(EVP_PKEY_METHOD *pmeth, + int (*digest_custom) (EVP_PKEY_CTX *ctx, + EVP_MD_CTX *mctx)); + +void EVP_PKEY_meth_get_init(const EVP_PKEY_METHOD *pmeth, + int (**pinit) (EVP_PKEY_CTX *ctx)); + +void EVP_PKEY_meth_get_copy(const EVP_PKEY_METHOD *pmeth, + int (**pcopy) (EVP_PKEY_CTX *dst, + EVP_PKEY_CTX *src)); + +void EVP_PKEY_meth_get_cleanup(const EVP_PKEY_METHOD *pmeth, + void (**pcleanup) (EVP_PKEY_CTX *ctx)); + +void EVP_PKEY_meth_get_paramgen(const EVP_PKEY_METHOD *pmeth, + int (**pparamgen_init) (EVP_PKEY_CTX *ctx), + int (**pparamgen) (EVP_PKEY_CTX *ctx, + EVP_PKEY *pkey)); + +void EVP_PKEY_meth_get_keygen(const EVP_PKEY_METHOD *pmeth, + int (**pkeygen_init) (EVP_PKEY_CTX *ctx), + int (**pkeygen) (EVP_PKEY_CTX *ctx, + EVP_PKEY *pkey)); + +void EVP_PKEY_meth_get_sign(const EVP_PKEY_METHOD *pmeth, + int (**psign_init) (EVP_PKEY_CTX *ctx), + int (**psign) (EVP_PKEY_CTX *ctx, + unsigned char *sig, size_t *siglen, + const unsigned char *tbs, + size_t tbslen)); + +void EVP_PKEY_meth_get_verify(const EVP_PKEY_METHOD *pmeth, + int (**pverify_init) (EVP_PKEY_CTX *ctx), + int (**pverify) (EVP_PKEY_CTX *ctx, + const unsigned char *sig, + size_t siglen, + const unsigned char *tbs, + size_t tbslen)); + +void EVP_PKEY_meth_get_verify_recover(const EVP_PKEY_METHOD *pmeth, + int (**pverify_recover_init) (EVP_PKEY_CTX + *ctx), + int (**pverify_recover) (EVP_PKEY_CTX + *ctx, + unsigned char + *sig, + size_t *siglen, + const unsigned + char *tbs, + size_t tbslen)); + +void EVP_PKEY_meth_get_signctx(const EVP_PKEY_METHOD *pmeth, + int (**psignctx_init) (EVP_PKEY_CTX *ctx, + EVP_MD_CTX *mctx), + int (**psignctx) (EVP_PKEY_CTX *ctx, + unsigned char *sig, + size_t *siglen, + EVP_MD_CTX *mctx)); + +void EVP_PKEY_meth_get_verifyctx(const EVP_PKEY_METHOD *pmeth, + int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, + EVP_MD_CTX *mctx), + int (**pverifyctx) (EVP_PKEY_CTX *ctx, + const unsigned char *sig, + int siglen, + EVP_MD_CTX *mctx)); + +void EVP_PKEY_meth_get_encrypt(const EVP_PKEY_METHOD *pmeth, + int (**pencrypt_init) (EVP_PKEY_CTX *ctx), + int (**pencryptfn) (EVP_PKEY_CTX *ctx, + unsigned char *out, + size_t *outlen, + const unsigned char *in, + size_t inlen)); + +void EVP_PKEY_meth_get_decrypt(const EVP_PKEY_METHOD *pmeth, + int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), + int (**pdecrypt) (EVP_PKEY_CTX *ctx, + unsigned char *out, + size_t *outlen, + const unsigned char *in, + size_t inlen)); + +void EVP_PKEY_meth_get_derive(const EVP_PKEY_METHOD *pmeth, + int (**pderive_init) (EVP_PKEY_CTX *ctx), + int (**pderive) (EVP_PKEY_CTX *ctx, + unsigned char *key, + size_t *keylen)); + +void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth, + int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, + void *p2), + int (**pctrl_str) (EVP_PKEY_CTX *ctx, + const char *type, + const char *value)); + +void EVP_PKEY_meth_get_check(const EVP_PKEY_METHOD *pmeth, + int (**pcheck) (EVP_PKEY *pkey)); + +void EVP_PKEY_meth_get_public_check(const EVP_PKEY_METHOD *pmeth, + int (**pcheck) (EVP_PKEY *pkey)); + +void EVP_PKEY_meth_get_param_check(const EVP_PKEY_METHOD *pmeth, + int (**pcheck) (EVP_PKEY *pkey)); + +void EVP_PKEY_meth_get_digest_custom(EVP_PKEY_METHOD *pmeth, + int (**pdigest_custom) (EVP_PKEY_CTX *ctx, + EVP_MD_CTX *mctx)); +void EVP_add_alg_module(void); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/evperr.h b/src/Mayaqua/win32_inc/openssl/evperr.h new file mode 100644 index 00000000..6a651f55 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/evperr.h @@ -0,0 +1,204 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_EVPERR_H +# define HEADER_EVPERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_EVP_strings(void); + +/* + * EVP function codes. + */ +# define EVP_F_AESNI_INIT_KEY 165 +# define EVP_F_AESNI_XTS_INIT_KEY 207 +# define EVP_F_AES_GCM_CTRL 196 +# define EVP_F_AES_INIT_KEY 133 +# define EVP_F_AES_OCB_CIPHER 169 +# define EVP_F_AES_T4_INIT_KEY 178 +# define EVP_F_AES_T4_XTS_INIT_KEY 208 +# define EVP_F_AES_WRAP_CIPHER 170 +# define EVP_F_AES_XTS_INIT_KEY 209 +# define EVP_F_ALG_MODULE_INIT 177 +# define EVP_F_ARIA_CCM_INIT_KEY 175 +# define EVP_F_ARIA_GCM_CTRL 197 +# define EVP_F_ARIA_GCM_INIT_KEY 176 +# define EVP_F_ARIA_INIT_KEY 185 +# define EVP_F_B64_NEW 198 +# define EVP_F_CAMELLIA_INIT_KEY 159 +# define EVP_F_CHACHA20_POLY1305_CTRL 182 +# define EVP_F_CMLL_T4_INIT_KEY 179 +# define EVP_F_DES_EDE3_WRAP_CIPHER 171 +# define EVP_F_DO_SIGVER_INIT 161 +# define EVP_F_ENC_NEW 199 +# define EVP_F_EVP_CIPHERINIT_EX 123 +# define EVP_F_EVP_CIPHER_ASN1_TO_PARAM 204 +# define EVP_F_EVP_CIPHER_CTX_COPY 163 +# define EVP_F_EVP_CIPHER_CTX_CTRL 124 +# define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 +# define EVP_F_EVP_CIPHER_PARAM_TO_ASN1 205 +# define EVP_F_EVP_DECRYPTFINAL_EX 101 +# define EVP_F_EVP_DECRYPTUPDATE 166 +# define EVP_F_EVP_DIGESTFINALXOF 174 +# define EVP_F_EVP_DIGESTINIT_EX 128 +# define EVP_F_EVP_ENCRYPTDECRYPTUPDATE 219 +# define EVP_F_EVP_ENCRYPTFINAL_EX 127 +# define EVP_F_EVP_ENCRYPTUPDATE 167 +# define EVP_F_EVP_MD_CTX_COPY_EX 110 +# define EVP_F_EVP_MD_SIZE 162 +# define EVP_F_EVP_OPENINIT 102 +# define EVP_F_EVP_PBE_ALG_ADD 115 +# define EVP_F_EVP_PBE_ALG_ADD_TYPE 160 +# define EVP_F_EVP_PBE_CIPHERINIT 116 +# define EVP_F_EVP_PBE_SCRYPT 181 +# define EVP_F_EVP_PKCS82PKEY 111 +# define EVP_F_EVP_PKEY2PKCS8 113 +# define EVP_F_EVP_PKEY_ASN1_ADD0 188 +# define EVP_F_EVP_PKEY_CHECK 186 +# define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 +# define EVP_F_EVP_PKEY_CTX_CTRL 137 +# define EVP_F_EVP_PKEY_CTX_CTRL_STR 150 +# define EVP_F_EVP_PKEY_CTX_DUP 156 +# define EVP_F_EVP_PKEY_CTX_MD 168 +# define EVP_F_EVP_PKEY_DECRYPT 104 +# define EVP_F_EVP_PKEY_DECRYPT_INIT 138 +# define EVP_F_EVP_PKEY_DECRYPT_OLD 151 +# define EVP_F_EVP_PKEY_DERIVE 153 +# define EVP_F_EVP_PKEY_DERIVE_INIT 154 +# define EVP_F_EVP_PKEY_DERIVE_SET_PEER 155 +# define EVP_F_EVP_PKEY_ENCRYPT 105 +# define EVP_F_EVP_PKEY_ENCRYPT_INIT 139 +# define EVP_F_EVP_PKEY_ENCRYPT_OLD 152 +# define EVP_F_EVP_PKEY_GET0_DH 119 +# define EVP_F_EVP_PKEY_GET0_DSA 120 +# define EVP_F_EVP_PKEY_GET0_EC_KEY 131 +# define EVP_F_EVP_PKEY_GET0_HMAC 183 +# define EVP_F_EVP_PKEY_GET0_POLY1305 184 +# define EVP_F_EVP_PKEY_GET0_RSA 121 +# define EVP_F_EVP_PKEY_GET0_SIPHASH 172 +# define EVP_F_EVP_PKEY_GET_RAW_PRIVATE_KEY 202 +# define EVP_F_EVP_PKEY_GET_RAW_PUBLIC_KEY 203 +# define EVP_F_EVP_PKEY_KEYGEN 146 +# define EVP_F_EVP_PKEY_KEYGEN_INIT 147 +# define EVP_F_EVP_PKEY_METH_ADD0 194 +# define EVP_F_EVP_PKEY_METH_NEW 195 +# define EVP_F_EVP_PKEY_NEW 106 +# define EVP_F_EVP_PKEY_NEW_CMAC_KEY 193 +# define EVP_F_EVP_PKEY_NEW_RAW_PRIVATE_KEY 191 +# define EVP_F_EVP_PKEY_NEW_RAW_PUBLIC_KEY 192 +# define EVP_F_EVP_PKEY_PARAMGEN 148 +# define EVP_F_EVP_PKEY_PARAMGEN_INIT 149 +# define EVP_F_EVP_PKEY_PARAM_CHECK 189 +# define EVP_F_EVP_PKEY_PUBLIC_CHECK 190 +# define EVP_F_EVP_PKEY_SET1_ENGINE 187 +# define EVP_F_EVP_PKEY_SET_ALIAS_TYPE 206 +# define EVP_F_EVP_PKEY_SIGN 140 +# define EVP_F_EVP_PKEY_SIGN_INIT 141 +# define EVP_F_EVP_PKEY_VERIFY 142 +# define EVP_F_EVP_PKEY_VERIFY_INIT 143 +# define EVP_F_EVP_PKEY_VERIFY_RECOVER 144 +# define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT 145 +# define EVP_F_EVP_SIGNFINAL 107 +# define EVP_F_EVP_VERIFYFINAL 108 +# define EVP_F_INT_CTX_NEW 157 +# define EVP_F_OK_NEW 200 +# define EVP_F_PKCS5_PBE_KEYIVGEN 117 +# define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 +# define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164 +# define EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN 180 +# define EVP_F_PKEY_SET_TYPE 158 +# define EVP_F_RC2_MAGIC_TO_METH 109 +# define EVP_F_RC5_CTRL 125 +# define EVP_F_R_32_12_16_INIT_KEY 242 +# define EVP_F_S390X_AES_GCM_CTRL 201 +# define EVP_F_UPDATE 173 + +/* + * EVP reason codes. + */ +# define EVP_R_AES_KEY_SETUP_FAILED 143 +# define EVP_R_ARIA_KEY_SETUP_FAILED 176 +# define EVP_R_BAD_DECRYPT 100 +# define EVP_R_BAD_KEY_LENGTH 195 +# define EVP_R_BUFFER_TOO_SMALL 155 +# define EVP_R_CAMELLIA_KEY_SETUP_FAILED 157 +# define EVP_R_CIPHER_PARAMETER_ERROR 122 +# define EVP_R_COMMAND_NOT_SUPPORTED 147 +# define EVP_R_COPY_ERROR 173 +# define EVP_R_CTRL_NOT_IMPLEMENTED 132 +# define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 +# define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 +# define EVP_R_DECODE_ERROR 114 +# define EVP_R_DIFFERENT_KEY_TYPES 101 +# define EVP_R_DIFFERENT_PARAMETERS 153 +# define EVP_R_ERROR_LOADING_SECTION 165 +# define EVP_R_ERROR_SETTING_FIPS_MODE 166 +# define EVP_R_EXPECTING_AN_HMAC_KEY 174 +# define EVP_R_EXPECTING_AN_RSA_KEY 127 +# define EVP_R_EXPECTING_A_DH_KEY 128 +# define EVP_R_EXPECTING_A_DSA_KEY 129 +# define EVP_R_EXPECTING_A_EC_KEY 142 +# define EVP_R_EXPECTING_A_POLY1305_KEY 164 +# define EVP_R_EXPECTING_A_SIPHASH_KEY 175 +# define EVP_R_FIPS_MODE_NOT_SUPPORTED 167 +# define EVP_R_GET_RAW_KEY_FAILED 182 +# define EVP_R_ILLEGAL_SCRYPT_PARAMETERS 171 +# define EVP_R_INITIALIZATION_ERROR 134 +# define EVP_R_INPUT_NOT_INITIALIZED 111 +# define EVP_R_INVALID_DIGEST 152 +# define EVP_R_INVALID_FIPS_MODE 168 +# define EVP_R_INVALID_KEY 163 +# define EVP_R_INVALID_KEY_LENGTH 130 +# define EVP_R_INVALID_OPERATION 148 +# define EVP_R_KEYGEN_FAILURE 120 +# define EVP_R_KEY_SETUP_FAILED 180 +# define EVP_R_MEMORY_LIMIT_EXCEEDED 172 +# define EVP_R_MESSAGE_DIGEST_IS_NULL 159 +# define EVP_R_METHOD_NOT_SUPPORTED 144 +# define EVP_R_MISSING_PARAMETERS 103 +# define EVP_R_NOT_XOF_OR_INVALID_LENGTH 178 +# define EVP_R_NO_CIPHER_SET 131 +# define EVP_R_NO_DEFAULT_DIGEST 158 +# define EVP_R_NO_DIGEST_SET 139 +# define EVP_R_NO_KEY_SET 154 +# define EVP_R_NO_OPERATION_SET 149 +# define EVP_R_ONLY_ONESHOT_SUPPORTED 177 +# define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150 +# define EVP_R_OPERATON_NOT_INITIALIZED 151 +# define EVP_R_PARTIALLY_OVERLAPPING 162 +# define EVP_R_PBKDF2_ERROR 181 +# define EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED 179 +# define EVP_R_PRIVATE_KEY_DECODE_ERROR 145 +# define EVP_R_PRIVATE_KEY_ENCODE_ERROR 146 +# define EVP_R_PUBLIC_KEY_NOT_RSA 106 +# define EVP_R_UNKNOWN_CIPHER 160 +# define EVP_R_UNKNOWN_DIGEST 161 +# define EVP_R_UNKNOWN_OPTION 169 +# define EVP_R_UNKNOWN_PBE_ALGORITHM 121 +# define EVP_R_UNSUPPORTED_ALGORITHM 156 +# define EVP_R_UNSUPPORTED_CIPHER 107 +# define EVP_R_UNSUPPORTED_KEYLENGTH 123 +# define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 +# define EVP_R_UNSUPPORTED_KEY_SIZE 108 +# define EVP_R_UNSUPPORTED_NUMBER_OF_ROUNDS 135 +# define EVP_R_UNSUPPORTED_PRF 125 +# define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM 118 +# define EVP_R_UNSUPPORTED_SALT_TYPE 126 +# define EVP_R_WRAP_MODE_NOT_ALLOWED 170 +# define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 +# define EVP_R_XTS_DUPLICATED_KEYS 183 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/hmac.h b/src/Mayaqua/win32_inc/openssl/hmac.h index cbfae0ac..458efc1d 100644 --- a/src/Mayaqua/win32_inc/openssl/hmac.h +++ b/src/Mayaqua/win32_inc/openssl/hmac.h @@ -1,109 +1,51 @@ -/* crypto/hmac/hmac.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#ifndef HEADER_HMAC_H -# define HEADER_HMAC_H - -# include - -# ifdef OPENSSL_NO_HMAC -# error HMAC is disabled. -# endif - -# include - -# define HMAC_MAX_MD_CBLOCK 128/* largest known is SHA512 */ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct hmac_ctx_st { - const EVP_MD *md; - EVP_MD_CTX md_ctx; - EVP_MD_CTX i_ctx; - EVP_MD_CTX o_ctx; - unsigned int key_length; - unsigned char key[HMAC_MAX_MD_CBLOCK]; -} HMAC_CTX; - -# define HMAC_size(e) (EVP_MD_size((e)->md)) - -void HMAC_CTX_init(HMAC_CTX *ctx); -void HMAC_CTX_cleanup(HMAC_CTX *ctx); - -/* deprecated */ -# define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) - -/* deprecated */ -int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md); -int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - const EVP_MD *md, ENGINE *impl); -int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); -int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); -unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, - const unsigned char *d, size_t n, unsigned char *md, - unsigned int *md_len); -int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); - -void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_HMAC_H +# define HEADER_HMAC_H + +# include + +# include + +# if OPENSSL_API_COMPAT < 0x10200000L +# define HMAC_MAX_MD_CBLOCK 128 /* Deprecated */ +# endif + +#ifdef __cplusplus +extern "C" { +#endif + +size_t HMAC_size(const HMAC_CTX *e); +HMAC_CTX *HMAC_CTX_new(void); +int HMAC_CTX_reset(HMAC_CTX *ctx); +void HMAC_CTX_free(HMAC_CTX *ctx); + +DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, + const EVP_MD *md)) + +/*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, + const EVP_MD *md, ENGINE *impl); +/*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, + size_t len); +/*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, + unsigned int *len); +unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, + const unsigned char *d, size_t n, unsigned char *md, + unsigned int *md_len); +__owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); + +void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); +const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/idea.h b/src/Mayaqua/win32_inc/openssl/idea.h index 5e4a132c..4334f3ea 100644 --- a/src/Mayaqua/win32_inc/openssl/idea.h +++ b/src/Mayaqua/win32_inc/openssl/idea.h @@ -1,105 +1,64 @@ -/* crypto/idea/idea.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_IDEA_H -# define HEADER_IDEA_H - -# include /* IDEA_INT, OPENSSL_NO_IDEA */ - -# ifdef OPENSSL_NO_IDEA -# error IDEA is disabled. -# endif - -# define IDEA_ENCRYPT 1 -# define IDEA_DECRYPT 0 - -# define IDEA_BLOCK 8 -# define IDEA_KEY_LENGTH 16 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct idea_key_st { - IDEA_INT data[9][6]; -} IDEA_KEY_SCHEDULE; - -const char *idea_options(void); -void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, - IDEA_KEY_SCHEDULE *ks); -# ifdef OPENSSL_FIPS -void private_idea_set_encrypt_key(const unsigned char *key, - IDEA_KEY_SCHEDULE *ks); -# endif -void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); -void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); -void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, - long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, - int enc); -void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, - int *num, int enc); -void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, - int *num); -void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_IDEA_H +# define HEADER_IDEA_H + +# include + +# ifndef OPENSSL_NO_IDEA +# ifdef __cplusplus +extern "C" { +# endif + +typedef unsigned int IDEA_INT; + +# define IDEA_ENCRYPT 1 +# define IDEA_DECRYPT 0 + +# define IDEA_BLOCK 8 +# define IDEA_KEY_LENGTH 16 + +typedef struct idea_key_st { + IDEA_INT data[9][6]; +} IDEA_KEY_SCHEDULE; + +const char *IDEA_options(void); +void IDEA_ecb_encrypt(const unsigned char *in, unsigned char *out, + IDEA_KEY_SCHEDULE *ks); +void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); +void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); +void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out, + long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, + int enc); +void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, + int *num, int enc); +void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, + int *num); +void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define idea_options IDEA_options +# define idea_ecb_encrypt IDEA_ecb_encrypt +# define idea_set_encrypt_key IDEA_set_encrypt_key +# define idea_set_decrypt_key IDEA_set_decrypt_key +# define idea_cbc_encrypt IDEA_cbc_encrypt +# define idea_cfb64_encrypt IDEA_cfb64_encrypt +# define idea_ofb64_encrypt IDEA_ofb64_encrypt +# define idea_encrypt IDEA_encrypt +# endif + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/kdf.h b/src/Mayaqua/win32_inc/openssl/kdf.h new file mode 100644 index 00000000..5abd4c37 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/kdf.h @@ -0,0 +1,97 @@ +/* + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_KDF_H +# define HEADER_KDF_H + +# include +#ifdef __cplusplus +extern "C" { +#endif + +# define EVP_PKEY_CTRL_TLS_MD (EVP_PKEY_ALG_CTRL) +# define EVP_PKEY_CTRL_TLS_SECRET (EVP_PKEY_ALG_CTRL + 1) +# define EVP_PKEY_CTRL_TLS_SEED (EVP_PKEY_ALG_CTRL + 2) +# define EVP_PKEY_CTRL_HKDF_MD (EVP_PKEY_ALG_CTRL + 3) +# define EVP_PKEY_CTRL_HKDF_SALT (EVP_PKEY_ALG_CTRL + 4) +# define EVP_PKEY_CTRL_HKDF_KEY (EVP_PKEY_ALG_CTRL + 5) +# define EVP_PKEY_CTRL_HKDF_INFO (EVP_PKEY_ALG_CTRL + 6) +# define EVP_PKEY_CTRL_HKDF_MODE (EVP_PKEY_ALG_CTRL + 7) +# define EVP_PKEY_CTRL_PASS (EVP_PKEY_ALG_CTRL + 8) +# define EVP_PKEY_CTRL_SCRYPT_SALT (EVP_PKEY_ALG_CTRL + 9) +# define EVP_PKEY_CTRL_SCRYPT_N (EVP_PKEY_ALG_CTRL + 10) +# define EVP_PKEY_CTRL_SCRYPT_R (EVP_PKEY_ALG_CTRL + 11) +# define EVP_PKEY_CTRL_SCRYPT_P (EVP_PKEY_ALG_CTRL + 12) +# define EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES (EVP_PKEY_ALG_CTRL + 13) + +# define EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND 0 +# define EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY 1 +# define EVP_PKEY_HKDEF_MODE_EXPAND_ONLY 2 + +# define EVP_PKEY_CTX_set_tls1_prf_md(pctx, md) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_TLS_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, sec, seclen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_TLS_SECRET, seclen, (void *)(sec)) + +# define EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, seed, seedlen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_TLS_SEED, seedlen, (void *)(seed)) + +# define EVP_PKEY_CTX_set_hkdf_md(pctx, md) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_HKDF_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt, saltlen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_HKDF_SALT, saltlen, (void *)(salt)) + +# define EVP_PKEY_CTX_set1_hkdf_key(pctx, key, keylen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_HKDF_KEY, keylen, (void *)(key)) + +# define EVP_PKEY_CTX_add1_hkdf_info(pctx, info, infolen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_HKDF_INFO, infolen, (void *)(info)) + +# define EVP_PKEY_CTX_hkdf_mode(pctx, mode) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_HKDF_MODE, mode, NULL) + +# define EVP_PKEY_CTX_set1_pbe_pass(pctx, pass, passlen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_PASS, passlen, (void *)(pass)) + +# define EVP_PKEY_CTX_set1_scrypt_salt(pctx, salt, saltlen) \ + EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_SCRYPT_SALT, saltlen, (void *)(salt)) + +# define EVP_PKEY_CTX_set_scrypt_N(pctx, n) \ + EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_SCRYPT_N, n) + +# define EVP_PKEY_CTX_set_scrypt_r(pctx, r) \ + EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_SCRYPT_R, r) + +# define EVP_PKEY_CTX_set_scrypt_p(pctx, p) \ + EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_SCRYPT_P, p) + +# define EVP_PKEY_CTX_set_scrypt_maxmem_bytes(pctx, maxmem_bytes) \ + EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ + EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES, maxmem_bytes) + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/kdferr.h b/src/Mayaqua/win32_inc/openssl/kdferr.h new file mode 100644 index 00000000..3f51bd02 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/kdferr.h @@ -0,0 +1,55 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_KDFERR_H +# define HEADER_KDFERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_KDF_strings(void); + +/* + * KDF function codes. + */ +# define KDF_F_PKEY_HKDF_CTRL_STR 103 +# define KDF_F_PKEY_HKDF_DERIVE 102 +# define KDF_F_PKEY_HKDF_INIT 108 +# define KDF_F_PKEY_SCRYPT_CTRL_STR 104 +# define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 +# define KDF_F_PKEY_SCRYPT_DERIVE 109 +# define KDF_F_PKEY_SCRYPT_INIT 106 +# define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 +# define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 +# define KDF_F_PKEY_TLS1_PRF_DERIVE 101 +# define KDF_F_PKEY_TLS1_PRF_INIT 110 +# define KDF_F_TLS1_PRF_ALG 111 + +/* + * KDF reason codes. + */ +# define KDF_R_INVALID_DIGEST 100 +# define KDF_R_MISSING_ITERATION_COUNT 109 +# define KDF_R_MISSING_KEY 104 +# define KDF_R_MISSING_MESSAGE_DIGEST 105 +# define KDF_R_MISSING_PARAMETER 101 +# define KDF_R_MISSING_PASS 110 +# define KDF_R_MISSING_SALT 111 +# define KDF_R_MISSING_SECRET 107 +# define KDF_R_MISSING_SEED 106 +# define KDF_R_UNKNOWN_PARAMETER_TYPE 103 +# define KDF_R_VALUE_ERROR 108 +# define KDF_R_VALUE_MISSING 102 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/krb5_asn.h b/src/Mayaqua/win32_inc/openssl/krb5_asn.h deleted file mode 100644 index 7f7b2e8c..00000000 --- a/src/Mayaqua/win32_inc/openssl/krb5_asn.h +++ /dev/null @@ -1,240 +0,0 @@ -/* krb5_asn.h */ -/* - * Written by Vern Staats for the OpenSSL project, ** - * using ocsp/{*.h,*asn*.c} as a starting point - */ - -/* ==================================================================== - * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_KRB5_ASN_H -# define HEADER_KRB5_ASN_H - -/* - * #include - */ -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * ASN.1 from Kerberos RFC 1510 - */ - -/*- EncryptedData ::= SEQUENCE { - * etype[0] INTEGER, -- EncryptionType - * kvno[1] INTEGER OPTIONAL, - * cipher[2] OCTET STRING -- ciphertext - * } - */ -typedef struct krb5_encdata_st { - ASN1_INTEGER *etype; - ASN1_INTEGER *kvno; - ASN1_OCTET_STRING *cipher; -} KRB5_ENCDATA; - -DECLARE_STACK_OF(KRB5_ENCDATA) - -/*- PrincipalName ::= SEQUENCE { - * name-type[0] INTEGER, - * name-string[1] SEQUENCE OF GeneralString - * } - */ -typedef struct krb5_princname_st { - ASN1_INTEGER *nametype; - STACK_OF(ASN1_GENERALSTRING) *namestring; -} KRB5_PRINCNAME; - -DECLARE_STACK_OF(KRB5_PRINCNAME) - -/*- Ticket ::= [APPLICATION 1] SEQUENCE { - * tkt-vno[0] INTEGER, - * realm[1] Realm, - * sname[2] PrincipalName, - * enc-part[3] EncryptedData - * } - */ -typedef struct krb5_tktbody_st { - ASN1_INTEGER *tktvno; - ASN1_GENERALSTRING *realm; - KRB5_PRINCNAME *sname; - KRB5_ENCDATA *encdata; -} KRB5_TKTBODY; - -typedef STACK_OF(KRB5_TKTBODY) KRB5_TICKET; -DECLARE_STACK_OF(KRB5_TKTBODY) - -/*- AP-REQ ::= [APPLICATION 14] SEQUENCE { - * pvno[0] INTEGER, - * msg-type[1] INTEGER, - * ap-options[2] APOptions, - * ticket[3] Ticket, - * authenticator[4] EncryptedData - * } - * - * APOptions ::= BIT STRING { - * reserved(0), use-session-key(1), mutual-required(2) } - */ -typedef struct krb5_ap_req_st { - ASN1_INTEGER *pvno; - ASN1_INTEGER *msgtype; - ASN1_BIT_STRING *apoptions; - KRB5_TICKET *ticket; - KRB5_ENCDATA *authenticator; -} KRB5_APREQBODY; - -typedef STACK_OF(KRB5_APREQBODY) KRB5_APREQ; -DECLARE_STACK_OF(KRB5_APREQBODY) - -/* Authenticator Stuff */ - -/*- Checksum ::= SEQUENCE { - * cksumtype[0] INTEGER, - * checksum[1] OCTET STRING - * } - */ -typedef struct krb5_checksum_st { - ASN1_INTEGER *ctype; - ASN1_OCTET_STRING *checksum; -} KRB5_CHECKSUM; - -DECLARE_STACK_OF(KRB5_CHECKSUM) - -/*- EncryptionKey ::= SEQUENCE { - * keytype[0] INTEGER, - * keyvalue[1] OCTET STRING - * } - */ -typedef struct krb5_encryptionkey_st { - ASN1_INTEGER *ktype; - ASN1_OCTET_STRING *keyvalue; -} KRB5_ENCKEY; - -DECLARE_STACK_OF(KRB5_ENCKEY) - -/*- AuthorizationData ::= SEQUENCE OF SEQUENCE { - * ad-type[0] INTEGER, - * ad-data[1] OCTET STRING - * } - */ -typedef struct krb5_authorization_st { - ASN1_INTEGER *adtype; - ASN1_OCTET_STRING *addata; -} KRB5_AUTHDATA; - -DECLARE_STACK_OF(KRB5_AUTHDATA) - -/*- -- Unencrypted authenticator - * Authenticator ::= [APPLICATION 2] SEQUENCE { - * authenticator-vno[0] INTEGER, - * crealm[1] Realm, - * cname[2] PrincipalName, - * cksum[3] Checksum OPTIONAL, - * cusec[4] INTEGER, - * ctime[5] KerberosTime, - * subkey[6] EncryptionKey OPTIONAL, - * seq-number[7] INTEGER OPTIONAL, - * authorization-data[8] AuthorizationData OPTIONAL - * } - */ -typedef struct krb5_authenticator_st { - ASN1_INTEGER *avno; - ASN1_GENERALSTRING *crealm; - KRB5_PRINCNAME *cname; - KRB5_CHECKSUM *cksum; - ASN1_INTEGER *cusec; - ASN1_GENERALIZEDTIME *ctime; - KRB5_ENCKEY *subkey; - ASN1_INTEGER *seqnum; - KRB5_AUTHDATA *authorization; -} KRB5_AUTHENTBODY; - -typedef STACK_OF(KRB5_AUTHENTBODY) KRB5_AUTHENT; -DECLARE_STACK_OF(KRB5_AUTHENTBODY) - -/*- DECLARE_ASN1_FUNCTIONS(type) = DECLARE_ASN1_FUNCTIONS_name(type, type) = - * type *name##_new(void); - * void name##_free(type *a); - * DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) = - * DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) = - * type *d2i_##name(type **a, const unsigned char **in, long len); - * int i2d_##name(type *a, unsigned char **out); - * DECLARE_ASN1_ITEM(itname) = OPENSSL_EXTERN const ASN1_ITEM itname##_it - */ - -DECLARE_ASN1_FUNCTIONS(KRB5_ENCDATA) -DECLARE_ASN1_FUNCTIONS(KRB5_PRINCNAME) -DECLARE_ASN1_FUNCTIONS(KRB5_TKTBODY) -DECLARE_ASN1_FUNCTIONS(KRB5_APREQBODY) -DECLARE_ASN1_FUNCTIONS(KRB5_TICKET) -DECLARE_ASN1_FUNCTIONS(KRB5_APREQ) - -DECLARE_ASN1_FUNCTIONS(KRB5_CHECKSUM) -DECLARE_ASN1_FUNCTIONS(KRB5_ENCKEY) -DECLARE_ASN1_FUNCTIONS(KRB5_AUTHDATA) -DECLARE_ASN1_FUNCTIONS(KRB5_AUTHENTBODY) -DECLARE_ASN1_FUNCTIONS(KRB5_AUTHENT) - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/Mayaqua/win32_inc/openssl/kssl.h b/src/Mayaqua/win32_inc/openssl/kssl.h deleted file mode 100644 index ae72b3b5..00000000 --- a/src/Mayaqua/win32_inc/openssl/kssl.h +++ /dev/null @@ -1,197 +0,0 @@ -/* ssl/kssl.h */ -/* - * Written by Vern Staats for the OpenSSL project - * 2000. project 2000. - */ -/* ==================================================================== - * Copyright (c) 2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -/* - ** 19990701 VRS Started. - */ - -#ifndef KSSL_H -# define KSSL_H - -# include - -# ifndef OPENSSL_NO_KRB5 - -# include -# include -# include -# ifdef OPENSSL_SYS_WIN32 -/* - * These can sometimes get redefined indirectly by krb5 header files after - * they get undefed in ossl_typ.h - */ -# undef X509_NAME -# undef X509_EXTENSIONS -# undef OCSP_REQUEST -# undef OCSP_RESPONSE -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Depending on which KRB5 implementation used, some types from - * the other may be missing. Resolve that here and now - */ -# ifdef KRB5_HEIMDAL -typedef unsigned char krb5_octet; -# define FAR -# else - -# ifndef FAR -# define FAR -# endif - -# endif - -/*- - * Uncomment this to debug kssl problems or - * to trace usage of the Kerberos session key - * - * #define KSSL_DEBUG - */ - -# ifndef KRB5SVC -# define KRB5SVC "host" -# endif - -# ifndef KRB5KEYTAB -# define KRB5KEYTAB "/etc/krb5.keytab" -# endif - -# ifndef KRB5SENDAUTH -# define KRB5SENDAUTH 1 -# endif - -# ifndef KRB5CHECKAUTH -# define KRB5CHECKAUTH 1 -# endif - -# ifndef KSSL_CLOCKSKEW -# define KSSL_CLOCKSKEW 300; -# endif - -# define KSSL_ERR_MAX 255 -typedef struct kssl_err_st { - int reason; - char text[KSSL_ERR_MAX + 1]; -} KSSL_ERR; - -/*- Context for passing - * (1) Kerberos session key to SSL, and - * (2) Config data between application and SSL lib - */ -typedef struct kssl_ctx_st { - /* used by: disposition: */ - char *service_name; /* C,S default ok (kssl) */ - char *service_host; /* C input, REQUIRED */ - char *client_princ; /* S output from krb5 ticket */ - char *keytab_file; /* S NULL (/etc/krb5.keytab) */ - char *cred_cache; /* C NULL (default) */ - krb5_enctype enctype; - int length; - krb5_octet FAR *key; -} KSSL_CTX; - -# define KSSL_CLIENT 1 -# define KSSL_SERVER 2 -# define KSSL_SERVICE 3 -# define KSSL_KEYTAB 4 - -# define KSSL_CTX_OK 0 -# define KSSL_CTX_ERR 1 -# define KSSL_NOMEM 2 - -/* Public (for use by applications that use OpenSSL with Kerberos 5 support */ -krb5_error_code kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text); -KSSL_CTX *kssl_ctx_new(void); -KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx); -void kssl_ctx_show(KSSL_CTX *kssl_ctx); -krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which, - krb5_data *realm, krb5_data *entity, - int nentities); -krb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp, - krb5_data *authenp, KSSL_ERR *kssl_err); -krb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata, - krb5_ticket_times *ttimes, KSSL_ERR *kssl_err); -krb5_error_code kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session); -void kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text); -void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data); -krb5_error_code kssl_build_principal_2(krb5_context context, - krb5_principal *princ, int rlen, - const char *realm, int slen, - const char *svc, int hlen, - const char *host); -krb5_error_code kssl_validate_times(krb5_timestamp atime, - krb5_ticket_times *ttimes); -krb5_error_code kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp, - krb5_timestamp *atimep, - KSSL_ERR *kssl_err); -unsigned char *kssl_skip_confound(krb5_enctype enctype, unsigned char *authn); - -void SSL_set0_kssl_ctx(SSL *s, KSSL_CTX *kctx); -KSSL_CTX *SSL_get0_kssl_ctx(SSL *s); -char *kssl_ctx_get0_client_princ(KSSL_CTX *kctx); - -#ifdef __cplusplus -} -#endif -# endif /* OPENSSL_NO_KRB5 */ -#endif /* KSSL_H */ diff --git a/src/Mayaqua/win32_inc/openssl/lhash.h b/src/Mayaqua/win32_inc/openssl/lhash.h index 2fe78ab6..47b99d17 100644 --- a/src/Mayaqua/win32_inc/openssl/lhash.h +++ b/src/Mayaqua/win32_inc/openssl/lhash.h @@ -1,240 +1,242 @@ -/* crypto/lhash/lhash.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* - * Header for dynamic hash table routines Author - Eric Young - */ - -#ifndef HEADER_LHASH_H -# define HEADER_LHASH_H - -# include -# ifndef OPENSSL_NO_FP_API -# include -# endif - -# ifndef OPENSSL_NO_BIO -# include -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct lhash_node_st { - void *data; - struct lhash_node_st *next; -# ifndef OPENSSL_NO_HASH_COMP - unsigned long hash; -# endif -} LHASH_NODE; - -typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *); -typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *); -typedef void (*LHASH_DOALL_FN_TYPE) (void *); -typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *); - -/* - * Macros for declaring and implementing type-safe wrappers for LHASH - * callbacks. This way, callbacks can be provided to LHASH structures without - * function pointer casting and the macro-defined callbacks provide - * per-variable casting before deferring to the underlying type-specific - * callbacks. NB: It is possible to place a "static" in front of both the - * DECLARE and IMPLEMENT macros if the functions are strictly internal. - */ - -/* First: "hash" functions */ -# define DECLARE_LHASH_HASH_FN(name, o_type) \ - unsigned long name##_LHASH_HASH(const void *); -# define IMPLEMENT_LHASH_HASH_FN(name, o_type) \ - unsigned long name##_LHASH_HASH(const void *arg) { \ - const o_type *a = arg; \ - return name##_hash(a); } -# define LHASH_HASH_FN(name) name##_LHASH_HASH - -/* Second: "compare" functions */ -# define DECLARE_LHASH_COMP_FN(name, o_type) \ - int name##_LHASH_COMP(const void *, const void *); -# define IMPLEMENT_LHASH_COMP_FN(name, o_type) \ - int name##_LHASH_COMP(const void *arg1, const void *arg2) { \ - const o_type *a = arg1; \ - const o_type *b = arg2; \ - return name##_cmp(a,b); } -# define LHASH_COMP_FN(name) name##_LHASH_COMP - -/* Third: "doall" functions */ -# define DECLARE_LHASH_DOALL_FN(name, o_type) \ - void name##_LHASH_DOALL(void *); -# define IMPLEMENT_LHASH_DOALL_FN(name, o_type) \ - void name##_LHASH_DOALL(void *arg) { \ - o_type *a = arg; \ - name##_doall(a); } -# define LHASH_DOALL_FN(name) name##_LHASH_DOALL - -/* Fourth: "doall_arg" functions */ -# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ - void name##_LHASH_DOALL_ARG(void *, void *); -# define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ - void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ - o_type *a = arg1; \ - a_type *b = arg2; \ - name##_doall_arg(a, b); } -# define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG - -typedef struct lhash_st { - LHASH_NODE **b; - LHASH_COMP_FN_TYPE comp; - LHASH_HASH_FN_TYPE hash; - unsigned int num_nodes; - unsigned int num_alloc_nodes; - unsigned int p; - unsigned int pmax; - unsigned long up_load; /* load times 256 */ - unsigned long down_load; /* load times 256 */ - unsigned long num_items; - unsigned long num_expands; - unsigned long num_expand_reallocs; - unsigned long num_contracts; - unsigned long num_contract_reallocs; - unsigned long num_hash_calls; - unsigned long num_comp_calls; - unsigned long num_insert; - unsigned long num_replace; - unsigned long num_delete; - unsigned long num_no_delete; - unsigned long num_retrieve; - unsigned long num_retrieve_miss; - unsigned long num_hash_comps; - int error; -} _LHASH; /* Do not use _LHASH directly, use LHASH_OF - * and friends */ - -# define LH_LOAD_MULT 256 - -/* - * Indicates a malloc() error in the last call, this is only bad in - * lh_insert(). - */ -# define lh_error(lh) ((lh)->error) - -_LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c); -void lh_free(_LHASH *lh); -void *lh_insert(_LHASH *lh, void *data); -void *lh_delete(_LHASH *lh, const void *data); -void *lh_retrieve(_LHASH *lh, const void *data); -void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func); -void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg); -unsigned long lh_strhash(const char *c); -unsigned long lh_num_items(const _LHASH *lh); - -# ifndef OPENSSL_NO_FP_API -void lh_stats(const _LHASH *lh, FILE *out); -void lh_node_stats(const _LHASH *lh, FILE *out); -void lh_node_usage_stats(const _LHASH *lh, FILE *out); -# endif - -# ifndef OPENSSL_NO_BIO -void lh_stats_bio(const _LHASH *lh, BIO *out); -void lh_node_stats_bio(const _LHASH *lh, BIO *out); -void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out); -# endif - -/* Type checking... */ - -# define LHASH_OF(type) struct lhash_st_##type - -# define DECLARE_LHASH_OF(type) LHASH_OF(type) { int dummy; } - -# define CHECKED_LHASH_OF(type,lh) \ - ((_LHASH *)CHECKED_PTR_OF(LHASH_OF(type),lh)) - -/* Define wrapper functions. */ -# define LHM_lh_new(type, name) \ - ((LHASH_OF(type) *)lh_new(LHASH_HASH_FN(name), LHASH_COMP_FN(name))) -# define LHM_lh_error(type, lh) \ - lh_error(CHECKED_LHASH_OF(type,lh)) -# define LHM_lh_insert(type, lh, inst) \ - ((type *)lh_insert(CHECKED_LHASH_OF(type, lh), \ - CHECKED_PTR_OF(type, inst))) -# define LHM_lh_retrieve(type, lh, inst) \ - ((type *)lh_retrieve(CHECKED_LHASH_OF(type, lh), \ - CHECKED_PTR_OF(type, inst))) -# define LHM_lh_delete(type, lh, inst) \ - ((type *)lh_delete(CHECKED_LHASH_OF(type, lh), \ - CHECKED_PTR_OF(type, inst))) -# define LHM_lh_doall(type, lh,fn) lh_doall(CHECKED_LHASH_OF(type, lh), fn) -# define LHM_lh_doall_arg(type, lh, fn, arg_type, arg) \ - lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg)) -# define LHM_lh_num_items(type, lh) lh_num_items(CHECKED_LHASH_OF(type, lh)) -# define LHM_lh_down_load(type, lh) (CHECKED_LHASH_OF(type, lh)->down_load) -# define LHM_lh_node_stats_bio(type, lh, out) \ - lh_node_stats_bio(CHECKED_LHASH_OF(type, lh), out) -# define LHM_lh_node_usage_stats_bio(type, lh, out) \ - lh_node_usage_stats_bio(CHECKED_LHASH_OF(type, lh), out) -# define LHM_lh_stats_bio(type, lh, out) \ - lh_stats_bio(CHECKED_LHASH_OF(type, lh), out) -# define LHM_lh_free(type, lh) lh_free(CHECKED_LHASH_OF(type, lh)) - -DECLARE_LHASH_OF(OPENSSL_STRING); -DECLARE_LHASH_OF(OPENSSL_CSTRING); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* + * Header for dynamic hash table routines Author - Eric Young + */ + +#ifndef HEADER_LHASH_H +# define HEADER_LHASH_H + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct lhash_node_st OPENSSL_LH_NODE; +typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *); +typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *); +typedef void (*OPENSSL_LH_DOALL_FUNC) (void *); +typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *); +typedef struct lhash_st OPENSSL_LHASH; + +/* + * Macros for declaring and implementing type-safe wrappers for LHASH + * callbacks. This way, callbacks can be provided to LHASH structures without + * function pointer casting and the macro-defined callbacks provide + * per-variable casting before deferring to the underlying type-specific + * callbacks. NB: It is possible to place a "static" in front of both the + * DECLARE and IMPLEMENT macros if the functions are strictly internal. + */ + +/* First: "hash" functions */ +# define DECLARE_LHASH_HASH_FN(name, o_type) \ + unsigned long name##_LHASH_HASH(const void *); +# define IMPLEMENT_LHASH_HASH_FN(name, o_type) \ + unsigned long name##_LHASH_HASH(const void *arg) { \ + const o_type *a = arg; \ + return name##_hash(a); } +# define LHASH_HASH_FN(name) name##_LHASH_HASH + +/* Second: "compare" functions */ +# define DECLARE_LHASH_COMP_FN(name, o_type) \ + int name##_LHASH_COMP(const void *, const void *); +# define IMPLEMENT_LHASH_COMP_FN(name, o_type) \ + int name##_LHASH_COMP(const void *arg1, const void *arg2) { \ + const o_type *a = arg1; \ + const o_type *b = arg2; \ + return name##_cmp(a,b); } +# define LHASH_COMP_FN(name) name##_LHASH_COMP + +/* Fourth: "doall_arg" functions */ +# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ + void name##_LHASH_DOALL_ARG(void *, void *); +# define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ + void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ + o_type *a = arg1; \ + a_type *b = arg2; \ + name##_doall_arg(a, b); } +# define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG + + +# define LH_LOAD_MULT 256 + +int OPENSSL_LH_error(OPENSSL_LHASH *lh); +OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c); +void OPENSSL_LH_free(OPENSSL_LHASH *lh); +void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data); +void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data); +void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data); +void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func); +void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg); +unsigned long OPENSSL_LH_strhash(const char *c); +unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh); +unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh); +void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load); + +# ifndef OPENSSL_NO_STDIO +void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp); +void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp); +void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp); +# endif +void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out); +void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out); +void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define _LHASH OPENSSL_LHASH +# define LHASH_NODE OPENSSL_LH_NODE +# define lh_error OPENSSL_LH_error +# define lh_new OPENSSL_LH_new +# define lh_free OPENSSL_LH_free +# define lh_insert OPENSSL_LH_insert +# define lh_delete OPENSSL_LH_delete +# define lh_retrieve OPENSSL_LH_retrieve +# define lh_doall OPENSSL_LH_doall +# define lh_doall_arg OPENSSL_LH_doall_arg +# define lh_strhash OPENSSL_LH_strhash +# define lh_num_items OPENSSL_LH_num_items +# ifndef OPENSSL_NO_STDIO +# define lh_stats OPENSSL_LH_stats +# define lh_node_stats OPENSSL_LH_node_stats +# define lh_node_usage_stats OPENSSL_LH_node_usage_stats +# endif +# define lh_stats_bio OPENSSL_LH_stats_bio +# define lh_node_stats_bio OPENSSL_LH_node_stats_bio +# define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio +# endif + +/* Type checking... */ + +# define LHASH_OF(type) struct lhash_st_##type + +# define DEFINE_LHASH_OF(type) \ + LHASH_OF(type) { union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; }; \ + static ossl_inline LHASH_OF(type) * \ + lh_##type##_new(unsigned long (*hfn)(const type *), \ + int (*cfn)(const type *, const type *)) \ + { \ + return (LHASH_OF(type) *) \ + OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn); \ + } \ + static ossl_unused ossl_inline void lh_##type##_free(LHASH_OF(type) *lh) \ + { \ + OPENSSL_LH_free((OPENSSL_LHASH *)lh); \ + } \ + static ossl_unused ossl_inline type *lh_##type##_insert(LHASH_OF(type) *lh, type *d) \ + { \ + return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \ + } \ + static ossl_unused ossl_inline type *lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \ + { \ + return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \ + } \ + static ossl_unused ossl_inline type *lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \ + { \ + return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \ + } \ + static ossl_unused ossl_inline int lh_##type##_error(LHASH_OF(type) *lh) \ + { \ + return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \ + } \ + static ossl_unused ossl_inline unsigned long lh_##type##_num_items(LHASH_OF(type) *lh) \ + { \ + return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \ + } \ + static ossl_unused ossl_inline void lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ + { \ + OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \ + } \ + static ossl_unused ossl_inline void lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ + { \ + OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \ + } \ + static ossl_unused ossl_inline void lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ + { \ + OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \ + } \ + static ossl_unused ossl_inline unsigned long lh_##type##_get_down_load(LHASH_OF(type) *lh) \ + { \ + return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \ + } \ + static ossl_unused ossl_inline void lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \ + { \ + OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \ + } \ + static ossl_unused ossl_inline void lh_##type##_doall(LHASH_OF(type) *lh, \ + void (*doall)(type *)) \ + { \ + OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \ + } \ + LHASH_OF(type) + +#define IMPLEMENT_LHASH_DOALL_ARG_CONST(type, argtype) \ + int_implement_lhash_doall(type, argtype, const type) + +#define IMPLEMENT_LHASH_DOALL_ARG(type, argtype) \ + int_implement_lhash_doall(type, argtype, type) + +#define int_implement_lhash_doall(type, argtype, cbargtype) \ + static ossl_unused ossl_inline void \ + lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \ + void (*fn)(cbargtype *, argtype *), \ + argtype *arg) \ + { \ + OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)fn, (void *)arg); \ + } \ + LHASH_OF(type) + +DEFINE_LHASH_OF(OPENSSL_STRING); +# ifdef _MSC_VER +/* + * push and pop this warning: + * warning C4090: 'function': different 'const' qualifiers + */ +# pragma warning (push) +# pragma warning (disable: 4090) +# endif + +DEFINE_LHASH_OF(OPENSSL_CSTRING); + +# ifdef _MSC_VER +# pragma warning (pop) +# endif + +/* + * If called without higher optimization (min. -xO3) the Oracle Developer + * Studio compiler generates code for the defined (static inline) functions + * above. + * This would later lead to the linker complaining about missing symbols when + * this header file is included but the resulting object is not linked against + * the Crypto library (openssl#6912). + */ +# ifdef __SUNPRO_C +# pragma weak OPENSSL_LH_new +# pragma weak OPENSSL_LH_free +# pragma weak OPENSSL_LH_insert +# pragma weak OPENSSL_LH_delete +# pragma weak OPENSSL_LH_retrieve +# pragma weak OPENSSL_LH_error +# pragma weak OPENSSL_LH_num_items +# pragma weak OPENSSL_LH_node_stats_bio +# pragma weak OPENSSL_LH_node_usage_stats_bio +# pragma weak OPENSSL_LH_stats_bio +# pragma weak OPENSSL_LH_get_down_load +# pragma weak OPENSSL_LH_set_down_load +# pragma weak OPENSSL_LH_doall +# pragma weak OPENSSL_LH_doall_arg +# endif /* __SUNPRO_C */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/md2.h b/src/Mayaqua/win32_inc/openssl/md2.h new file mode 100644 index 00000000..7faf8e3d --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/md2.h @@ -0,0 +1,44 @@ +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_MD2_H +# define HEADER_MD2_H + +# include + +# ifndef OPENSSL_NO_MD2 +# include +# ifdef __cplusplus +extern "C" { +# endif + +typedef unsigned char MD2_INT; + +# define MD2_DIGEST_LENGTH 16 +# define MD2_BLOCK 16 + +typedef struct MD2state_st { + unsigned int num; + unsigned char data[MD2_BLOCK]; + MD2_INT cksm[MD2_BLOCK]; + MD2_INT state[MD2_BLOCK]; +} MD2_CTX; + +const char *MD2_options(void); +int MD2_Init(MD2_CTX *c); +int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); +int MD2_Final(unsigned char *md, MD2_CTX *c); +unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/md4.h b/src/Mayaqua/win32_inc/openssl/md4.h index 5eec4c63..940e29db 100644 --- a/src/Mayaqua/win32_inc/openssl/md4.h +++ b/src/Mayaqua/win32_inc/openssl/md4.h @@ -1,119 +1,51 @@ -/* crypto/md4/md4.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MD4_H -# define HEADER_MD4_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_NO_MD4 -# error MD4 is disabled. -# endif - -/*- - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! MD4_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -# if defined(__LP32__) -# define MD4_LONG unsigned long -# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -# define MD4_LONG unsigned long -# define MD4_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ -# else -# define MD4_LONG unsigned int -# endif - -# define MD4_CBLOCK 64 -# define MD4_LBLOCK (MD4_CBLOCK/4) -# define MD4_DIGEST_LENGTH 16 - -typedef struct MD4state_st { - MD4_LONG A, B, C, D; - MD4_LONG Nl, Nh; - MD4_LONG data[MD4_LBLOCK]; - unsigned int num; -} MD4_CTX; - -# ifdef OPENSSL_FIPS -int private_MD4_Init(MD4_CTX *c); -# endif -int MD4_Init(MD4_CTX *c); -int MD4_Update(MD4_CTX *c, const void *data, size_t len); -int MD4_Final(unsigned char *md, MD4_CTX *c); -unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); -void MD4_Transform(MD4_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_MD4_H +# define HEADER_MD4_H + +# include + +# ifndef OPENSSL_NO_MD4 +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +/*- + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * ! MD4_LONG has to be at least 32 bits wide. ! + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + */ +# define MD4_LONG unsigned int + +# define MD4_CBLOCK 64 +# define MD4_LBLOCK (MD4_CBLOCK/4) +# define MD4_DIGEST_LENGTH 16 + +typedef struct MD4state_st { + MD4_LONG A, B, C, D; + MD4_LONG Nl, Nh; + MD4_LONG data[MD4_LBLOCK]; + unsigned int num; +} MD4_CTX; + +int MD4_Init(MD4_CTX *c); +int MD4_Update(MD4_CTX *c, const void *data, size_t len); +int MD4_Final(unsigned char *md, MD4_CTX *c); +unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); +void MD4_Transform(MD4_CTX *c, const unsigned char *b); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/md5.h b/src/Mayaqua/win32_inc/openssl/md5.h index c5a232ba..2deb7721 100644 --- a/src/Mayaqua/win32_inc/openssl/md5.h +++ b/src/Mayaqua/win32_inc/openssl/md5.h @@ -1,119 +1,50 @@ -/* crypto/md5/md5.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MD5_H -# define HEADER_MD5_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_NO_MD5 -# error MD5 is disabled. -# endif - -/* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! MD5_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -# if defined(__LP32__) -# define MD5_LONG unsigned long -# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -# define MD5_LONG unsigned long -# define MD5_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ -# else -# define MD5_LONG unsigned int -# endif - -# define MD5_CBLOCK 64 -# define MD5_LBLOCK (MD5_CBLOCK/4) -# define MD5_DIGEST_LENGTH 16 - -typedef struct MD5state_st { - MD5_LONG A, B, C, D; - MD5_LONG Nl, Nh; - MD5_LONG data[MD5_LBLOCK]; - unsigned int num; -} MD5_CTX; - -# ifdef OPENSSL_FIPS -int private_MD5_Init(MD5_CTX *c); -# endif -int MD5_Init(MD5_CTX *c); -int MD5_Update(MD5_CTX *c, const void *data, size_t len); -int MD5_Final(unsigned char *md, MD5_CTX *c); -unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); -void MD5_Transform(MD5_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_MD5_H +# define HEADER_MD5_H + +# include + +# ifndef OPENSSL_NO_MD5 +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +/* + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * ! MD5_LONG has to be at least 32 bits wide. ! + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + */ +# define MD5_LONG unsigned int + +# define MD5_CBLOCK 64 +# define MD5_LBLOCK (MD5_CBLOCK/4) +# define MD5_DIGEST_LENGTH 16 + +typedef struct MD5state_st { + MD5_LONG A, B, C, D; + MD5_LONG Nl, Nh; + MD5_LONG data[MD5_LBLOCK]; + unsigned int num; +} MD5_CTX; + +int MD5_Init(MD5_CTX *c); +int MD5_Update(MD5_CTX *c, const void *data, size_t len); +int MD5_Final(unsigned char *md, MD5_CTX *c); +unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); +void MD5_Transform(MD5_CTX *c, const unsigned char *b); +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/mdc2.h b/src/Mayaqua/win32_inc/openssl/mdc2.h index a9d61d9c..aabd2bfa 100644 --- a/src/Mayaqua/win32_inc/openssl/mdc2.h +++ b/src/Mayaqua/win32_inc/openssl/mdc2.h @@ -1,94 +1,42 @@ -/* crypto/mdc2/mdc2.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_MDC2_H -# define HEADER_MDC2_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_NO_MDC2 -# error MDC2 is disabled. -# endif - -# define MDC2_BLOCK 8 -# define MDC2_DIGEST_LENGTH 16 - -typedef struct mdc2_ctx_st { - unsigned int num; - unsigned char data[MDC2_BLOCK]; - DES_cblock h, hh; - int pad_type; /* either 1 or 2, default 1 */ -} MDC2_CTX; - -# ifdef OPENSSL_FIPS -int private_MDC2_Init(MDC2_CTX *c); -# endif -int MDC2_Init(MDC2_CTX *c); -int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); -int MDC2_Final(unsigned char *md, MDC2_CTX *c); -unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_MDC2_H +# define HEADER_MDC2_H + +# include + +#ifndef OPENSSL_NO_MDC2 +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +# define MDC2_BLOCK 8 +# define MDC2_DIGEST_LENGTH 16 + +typedef struct mdc2_ctx_st { + unsigned int num; + unsigned char data[MDC2_BLOCK]; + DES_cblock h, hh; + int pad_type; /* either 1 or 2, default 1 */ +} MDC2_CTX; + +int MDC2_Init(MDC2_CTX *c); +int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); +int MDC2_Final(unsigned char *md, MDC2_CTX *c); +unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/modes.h b/src/Mayaqua/win32_inc/openssl/modes.h index a944f6ff..d544f98d 100644 --- a/src/Mayaqua/win32_inc/openssl/modes.h +++ b/src/Mayaqua/win32_inc/openssl/modes.h @@ -1,163 +1,208 @@ -/* ==================================================================== - * Copyright (c) 2008 The OpenSSL Project. All rights reserved. - * - * Rights for redistribution and usage in source and binary - * forms are granted according to the OpenSSL license. - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif -typedef void (*block128_f) (const unsigned char in[16], - unsigned char out[16], const void *key); - -typedef void (*cbc128_f) (const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], int enc); - -typedef void (*ctr128_f) (const unsigned char *in, unsigned char *out, - size_t blocks, const void *key, - const unsigned char ivec[16]); - -typedef void (*ccm128_f) (const unsigned char *in, unsigned char *out, - size_t blocks, const void *key, - const unsigned char ivec[16], - unsigned char cmac[16]); - -void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], block128_f block); -void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], block128_f block); - -void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], - unsigned char ecount_buf[16], unsigned int *num, - block128_f block); - -void CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], - unsigned char ecount_buf[16], - unsigned int *num, ctr128_f ctr); - -void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], int *num, - block128_f block); - -void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], int *num, - int enc, block128_f block); -void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const void *key, - unsigned char ivec[16], int *num, - int enc, block128_f block); -void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, - size_t bits, const void *key, - unsigned char ivec[16], int *num, - int enc, block128_f block); - -size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, - unsigned char *out, size_t len, - const void *key, unsigned char ivec[16], - block128_f block); -size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], cbc128_f cbc); -size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, - unsigned char *out, size_t len, - const void *key, unsigned char ivec[16], - block128_f block); -size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], cbc128_f cbc); - -size_t CRYPTO_nistcts128_encrypt_block(const unsigned char *in, - unsigned char *out, size_t len, - const void *key, - unsigned char ivec[16], - block128_f block); -size_t CRYPTO_nistcts128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], cbc128_f cbc); -size_t CRYPTO_nistcts128_decrypt_block(const unsigned char *in, - unsigned char *out, size_t len, - const void *key, - unsigned char ivec[16], - block128_f block); -size_t CRYPTO_nistcts128_decrypt(const unsigned char *in, unsigned char *out, - size_t len, const void *key, - unsigned char ivec[16], cbc128_f cbc); - -typedef struct gcm128_context GCM128_CONTEXT; - -GCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block); -void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block); -void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, - size_t len); -int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, - size_t len); -int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx, - const unsigned char *in, unsigned char *out, - size_t len); -int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, - const unsigned char *in, unsigned char *out, - size_t len); -int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, - const unsigned char *in, unsigned char *out, - size_t len, ctr128_f stream); -int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, - const unsigned char *in, unsigned char *out, - size_t len, ctr128_f stream); -int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag, - size_t len); -void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len); -void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx); - -typedef struct ccm128_context CCM128_CONTEXT; - -void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx, - unsigned int M, unsigned int L, void *key, - block128_f block); -int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, const unsigned char *nonce, - size_t nlen, size_t mlen); -void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, const unsigned char *aad, - size_t alen); -int CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx, const unsigned char *inp, - unsigned char *out, size_t len); -int CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx, const unsigned char *inp, - unsigned char *out, size_t len); -int CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, - unsigned char *out, size_t len, - ccm128_f stream); -int CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, - unsigned char *out, size_t len, - ccm128_f stream); -size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len); - -typedef struct xts128_context XTS128_CONTEXT; - -int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, - const unsigned char iv[16], - const unsigned char *inp, unsigned char *out, - size_t len, int enc); - -size_t CRYPTO_128_wrap(void *key, const unsigned char *iv, - unsigned char *out, - const unsigned char *in, size_t inlen, - block128_f block); - -size_t CRYPTO_128_unwrap(void *key, const unsigned char *iv, - unsigned char *out, - const unsigned char *in, size_t inlen, - block128_f block); - -#ifdef __cplusplus -} -#endif +/* + * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_MODES_H +# define HEADER_MODES_H + +# include + +# ifdef __cplusplus +extern "C" { +# endif +typedef void (*block128_f) (const unsigned char in[16], + unsigned char out[16], const void *key); + +typedef void (*cbc128_f) (const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], int enc); + +typedef void (*ctr128_f) (const unsigned char *in, unsigned char *out, + size_t blocks, const void *key, + const unsigned char ivec[16]); + +typedef void (*ccm128_f) (const unsigned char *in, unsigned char *out, + size_t blocks, const void *key, + const unsigned char ivec[16], + unsigned char cmac[16]); + +void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], block128_f block); +void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], block128_f block); + +void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], + unsigned char ecount_buf[16], unsigned int *num, + block128_f block); + +void CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], + unsigned char ecount_buf[16], + unsigned int *num, ctr128_f ctr); + +void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], int *num, + block128_f block); + +void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], int *num, + int enc, block128_f block); +void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, + size_t length, const void *key, + unsigned char ivec[16], int *num, + int enc, block128_f block); +void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, + size_t bits, const void *key, + unsigned char ivec[16], int *num, + int enc, block128_f block); + +size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, + unsigned char *out, size_t len, + const void *key, unsigned char ivec[16], + block128_f block); +size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], cbc128_f cbc); +size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, + unsigned char *out, size_t len, + const void *key, unsigned char ivec[16], + block128_f block); +size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], cbc128_f cbc); + +size_t CRYPTO_nistcts128_encrypt_block(const unsigned char *in, + unsigned char *out, size_t len, + const void *key, + unsigned char ivec[16], + block128_f block); +size_t CRYPTO_nistcts128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], cbc128_f cbc); +size_t CRYPTO_nistcts128_decrypt_block(const unsigned char *in, + unsigned char *out, size_t len, + const void *key, + unsigned char ivec[16], + block128_f block); +size_t CRYPTO_nistcts128_decrypt(const unsigned char *in, unsigned char *out, + size_t len, const void *key, + unsigned char ivec[16], cbc128_f cbc); + +typedef struct gcm128_context GCM128_CONTEXT; + +GCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block); +void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block); +void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, + size_t len); +int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, + size_t len); +int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx, + const unsigned char *in, unsigned char *out, + size_t len); +int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, + const unsigned char *in, unsigned char *out, + size_t len); +int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, + const unsigned char *in, unsigned char *out, + size_t len, ctr128_f stream); +int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, + const unsigned char *in, unsigned char *out, + size_t len, ctr128_f stream); +int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag, + size_t len); +void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len); +void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx); + +typedef struct ccm128_context CCM128_CONTEXT; + +void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx, + unsigned int M, unsigned int L, void *key, + block128_f block); +int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, const unsigned char *nonce, + size_t nlen, size_t mlen); +void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, const unsigned char *aad, + size_t alen); +int CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx, const unsigned char *inp, + unsigned char *out, size_t len); +int CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx, const unsigned char *inp, + unsigned char *out, size_t len); +int CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, + unsigned char *out, size_t len, + ccm128_f stream); +int CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, + unsigned char *out, size_t len, + ccm128_f stream); +size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len); + +typedef struct xts128_context XTS128_CONTEXT; + +int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, + const unsigned char iv[16], + const unsigned char *inp, unsigned char *out, + size_t len, int enc); + +size_t CRYPTO_128_wrap(void *key, const unsigned char *iv, + unsigned char *out, + const unsigned char *in, size_t inlen, + block128_f block); + +size_t CRYPTO_128_unwrap(void *key, const unsigned char *iv, + unsigned char *out, + const unsigned char *in, size_t inlen, + block128_f block); +size_t CRYPTO_128_wrap_pad(void *key, const unsigned char *icv, + unsigned char *out, const unsigned char *in, + size_t inlen, block128_f block); +size_t CRYPTO_128_unwrap_pad(void *key, const unsigned char *icv, + unsigned char *out, const unsigned char *in, + size_t inlen, block128_f block); + +# ifndef OPENSSL_NO_OCB +typedef struct ocb128_context OCB128_CONTEXT; + +typedef void (*ocb128_f) (const unsigned char *in, unsigned char *out, + size_t blocks, const void *key, + size_t start_block_num, + unsigned char offset_i[16], + const unsigned char L_[][16], + unsigned char checksum[16]); + +OCB128_CONTEXT *CRYPTO_ocb128_new(void *keyenc, void *keydec, + block128_f encrypt, block128_f decrypt, + ocb128_f stream); +int CRYPTO_ocb128_init(OCB128_CONTEXT *ctx, void *keyenc, void *keydec, + block128_f encrypt, block128_f decrypt, + ocb128_f stream); +int CRYPTO_ocb128_copy_ctx(OCB128_CONTEXT *dest, OCB128_CONTEXT *src, + void *keyenc, void *keydec); +int CRYPTO_ocb128_setiv(OCB128_CONTEXT *ctx, const unsigned char *iv, + size_t len, size_t taglen); +int CRYPTO_ocb128_aad(OCB128_CONTEXT *ctx, const unsigned char *aad, + size_t len); +int CRYPTO_ocb128_encrypt(OCB128_CONTEXT *ctx, const unsigned char *in, + unsigned char *out, size_t len); +int CRYPTO_ocb128_decrypt(OCB128_CONTEXT *ctx, const unsigned char *in, + unsigned char *out, size_t len); +int CRYPTO_ocb128_finish(OCB128_CONTEXT *ctx, const unsigned char *tag, + size_t len); +int CRYPTO_ocb128_tag(OCB128_CONTEXT *ctx, unsigned char *tag, size_t len); +void CRYPTO_ocb128_cleanup(OCB128_CONTEXT *ctx); +# endif /* OPENSSL_NO_OCB */ + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/obj_mac.h b/src/Mayaqua/win32_inc/openssl/obj_mac.h index 58d5b0f5..47dafe48 100644 --- a/src/Mayaqua/win32_inc/openssl/obj_mac.h +++ b/src/Mayaqua/win32_inc/openssl/obj_mac.h @@ -1,4194 +1,5198 @@ -/* crypto/objects/obj_mac.h */ - -/* - * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following - * command: perl objects.pl objects.txt obj_mac.num obj_mac.h - */ - -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#define SN_undef "UNDEF" -#define LN_undef "undefined" -#define NID_undef 0 -#define OBJ_undef 0L - -#define SN_itu_t "ITU-T" -#define LN_itu_t "itu-t" -#define NID_itu_t 645 -#define OBJ_itu_t 0L - -#define NID_ccitt 404 -#define OBJ_ccitt OBJ_itu_t - -#define SN_iso "ISO" -#define LN_iso "iso" -#define NID_iso 181 -#define OBJ_iso 1L - -#define SN_joint_iso_itu_t "JOINT-ISO-ITU-T" -#define LN_joint_iso_itu_t "joint-iso-itu-t" -#define NID_joint_iso_itu_t 646 -#define OBJ_joint_iso_itu_t 2L - -#define NID_joint_iso_ccitt 393 -#define OBJ_joint_iso_ccitt OBJ_joint_iso_itu_t - -#define SN_member_body "member-body" -#define LN_member_body "ISO Member Body" -#define NID_member_body 182 -#define OBJ_member_body OBJ_iso,2L - -#define SN_identified_organization "identified-organization" -#define NID_identified_organization 676 -#define OBJ_identified_organization OBJ_iso,3L - -#define SN_hmac_md5 "HMAC-MD5" -#define LN_hmac_md5 "hmac-md5" -#define NID_hmac_md5 780 -#define OBJ_hmac_md5 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,1L - -#define SN_hmac_sha1 "HMAC-SHA1" -#define LN_hmac_sha1 "hmac-sha1" -#define NID_hmac_sha1 781 -#define OBJ_hmac_sha1 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,2L - -#define SN_certicom_arc "certicom-arc" -#define NID_certicom_arc 677 -#define OBJ_certicom_arc OBJ_identified_organization,132L - -#define SN_international_organizations "international-organizations" -#define LN_international_organizations "International Organizations" -#define NID_international_organizations 647 -#define OBJ_international_organizations OBJ_joint_iso_itu_t,23L - -#define SN_wap "wap" -#define NID_wap 678 -#define OBJ_wap OBJ_international_organizations,43L - -#define SN_wap_wsg "wap-wsg" -#define NID_wap_wsg 679 -#define OBJ_wap_wsg OBJ_wap,1L - -#define SN_selected_attribute_types "selected-attribute-types" -#define LN_selected_attribute_types "Selected Attribute Types" -#define NID_selected_attribute_types 394 -#define OBJ_selected_attribute_types OBJ_joint_iso_itu_t,5L,1L,5L - -#define SN_clearance "clearance" -#define NID_clearance 395 -#define OBJ_clearance OBJ_selected_attribute_types,55L - -#define SN_ISO_US "ISO-US" -#define LN_ISO_US "ISO US Member Body" -#define NID_ISO_US 183 -#define OBJ_ISO_US OBJ_member_body,840L - -#define SN_X9_57 "X9-57" -#define LN_X9_57 "X9.57" -#define NID_X9_57 184 -#define OBJ_X9_57 OBJ_ISO_US,10040L - -#define SN_X9cm "X9cm" -#define LN_X9cm "X9.57 CM ?" -#define NID_X9cm 185 -#define OBJ_X9cm OBJ_X9_57,4L - -#define SN_dsa "DSA" -#define LN_dsa "dsaEncryption" -#define NID_dsa 116 -#define OBJ_dsa OBJ_X9cm,1L - -#define SN_dsaWithSHA1 "DSA-SHA1" -#define LN_dsaWithSHA1 "dsaWithSHA1" -#define NID_dsaWithSHA1 113 -#define OBJ_dsaWithSHA1 OBJ_X9cm,3L - -#define SN_ansi_X9_62 "ansi-X9-62" -#define LN_ansi_X9_62 "ANSI X9.62" -#define NID_ansi_X9_62 405 -#define OBJ_ansi_X9_62 OBJ_ISO_US,10045L - -#define OBJ_X9_62_id_fieldType OBJ_ansi_X9_62,1L - -#define SN_X9_62_prime_field "prime-field" -#define NID_X9_62_prime_field 406 -#define OBJ_X9_62_prime_field OBJ_X9_62_id_fieldType,1L - -#define SN_X9_62_characteristic_two_field "characteristic-two-field" -#define NID_X9_62_characteristic_two_field 407 -#define OBJ_X9_62_characteristic_two_field OBJ_X9_62_id_fieldType,2L - -#define SN_X9_62_id_characteristic_two_basis "id-characteristic-two-basis" -#define NID_X9_62_id_characteristic_two_basis 680 -#define OBJ_X9_62_id_characteristic_two_basis OBJ_X9_62_characteristic_two_field,3L - -#define SN_X9_62_onBasis "onBasis" -#define NID_X9_62_onBasis 681 -#define OBJ_X9_62_onBasis OBJ_X9_62_id_characteristic_two_basis,1L - -#define SN_X9_62_tpBasis "tpBasis" -#define NID_X9_62_tpBasis 682 -#define OBJ_X9_62_tpBasis OBJ_X9_62_id_characteristic_two_basis,2L - -#define SN_X9_62_ppBasis "ppBasis" -#define NID_X9_62_ppBasis 683 -#define OBJ_X9_62_ppBasis OBJ_X9_62_id_characteristic_two_basis,3L - -#define OBJ_X9_62_id_publicKeyType OBJ_ansi_X9_62,2L - -#define SN_X9_62_id_ecPublicKey "id-ecPublicKey" -#define NID_X9_62_id_ecPublicKey 408 -#define OBJ_X9_62_id_ecPublicKey OBJ_X9_62_id_publicKeyType,1L - -#define OBJ_X9_62_ellipticCurve OBJ_ansi_X9_62,3L - -#define OBJ_X9_62_c_TwoCurve OBJ_X9_62_ellipticCurve,0L - -#define SN_X9_62_c2pnb163v1 "c2pnb163v1" -#define NID_X9_62_c2pnb163v1 684 -#define OBJ_X9_62_c2pnb163v1 OBJ_X9_62_c_TwoCurve,1L - -#define SN_X9_62_c2pnb163v2 "c2pnb163v2" -#define NID_X9_62_c2pnb163v2 685 -#define OBJ_X9_62_c2pnb163v2 OBJ_X9_62_c_TwoCurve,2L - -#define SN_X9_62_c2pnb163v3 "c2pnb163v3" -#define NID_X9_62_c2pnb163v3 686 -#define OBJ_X9_62_c2pnb163v3 OBJ_X9_62_c_TwoCurve,3L - -#define SN_X9_62_c2pnb176v1 "c2pnb176v1" -#define NID_X9_62_c2pnb176v1 687 -#define OBJ_X9_62_c2pnb176v1 OBJ_X9_62_c_TwoCurve,4L - -#define SN_X9_62_c2tnb191v1 "c2tnb191v1" -#define NID_X9_62_c2tnb191v1 688 -#define OBJ_X9_62_c2tnb191v1 OBJ_X9_62_c_TwoCurve,5L - -#define SN_X9_62_c2tnb191v2 "c2tnb191v2" -#define NID_X9_62_c2tnb191v2 689 -#define OBJ_X9_62_c2tnb191v2 OBJ_X9_62_c_TwoCurve,6L - -#define SN_X9_62_c2tnb191v3 "c2tnb191v3" -#define NID_X9_62_c2tnb191v3 690 -#define OBJ_X9_62_c2tnb191v3 OBJ_X9_62_c_TwoCurve,7L - -#define SN_X9_62_c2onb191v4 "c2onb191v4" -#define NID_X9_62_c2onb191v4 691 -#define OBJ_X9_62_c2onb191v4 OBJ_X9_62_c_TwoCurve,8L - -#define SN_X9_62_c2onb191v5 "c2onb191v5" -#define NID_X9_62_c2onb191v5 692 -#define OBJ_X9_62_c2onb191v5 OBJ_X9_62_c_TwoCurve,9L - -#define SN_X9_62_c2pnb208w1 "c2pnb208w1" -#define NID_X9_62_c2pnb208w1 693 -#define OBJ_X9_62_c2pnb208w1 OBJ_X9_62_c_TwoCurve,10L - -#define SN_X9_62_c2tnb239v1 "c2tnb239v1" -#define NID_X9_62_c2tnb239v1 694 -#define OBJ_X9_62_c2tnb239v1 OBJ_X9_62_c_TwoCurve,11L - -#define SN_X9_62_c2tnb239v2 "c2tnb239v2" -#define NID_X9_62_c2tnb239v2 695 -#define OBJ_X9_62_c2tnb239v2 OBJ_X9_62_c_TwoCurve,12L - -#define SN_X9_62_c2tnb239v3 "c2tnb239v3" -#define NID_X9_62_c2tnb239v3 696 -#define OBJ_X9_62_c2tnb239v3 OBJ_X9_62_c_TwoCurve,13L - -#define SN_X9_62_c2onb239v4 "c2onb239v4" -#define NID_X9_62_c2onb239v4 697 -#define OBJ_X9_62_c2onb239v4 OBJ_X9_62_c_TwoCurve,14L - -#define SN_X9_62_c2onb239v5 "c2onb239v5" -#define NID_X9_62_c2onb239v5 698 -#define OBJ_X9_62_c2onb239v5 OBJ_X9_62_c_TwoCurve,15L - -#define SN_X9_62_c2pnb272w1 "c2pnb272w1" -#define NID_X9_62_c2pnb272w1 699 -#define OBJ_X9_62_c2pnb272w1 OBJ_X9_62_c_TwoCurve,16L - -#define SN_X9_62_c2pnb304w1 "c2pnb304w1" -#define NID_X9_62_c2pnb304w1 700 -#define OBJ_X9_62_c2pnb304w1 OBJ_X9_62_c_TwoCurve,17L - -#define SN_X9_62_c2tnb359v1 "c2tnb359v1" -#define NID_X9_62_c2tnb359v1 701 -#define OBJ_X9_62_c2tnb359v1 OBJ_X9_62_c_TwoCurve,18L - -#define SN_X9_62_c2pnb368w1 "c2pnb368w1" -#define NID_X9_62_c2pnb368w1 702 -#define OBJ_X9_62_c2pnb368w1 OBJ_X9_62_c_TwoCurve,19L - -#define SN_X9_62_c2tnb431r1 "c2tnb431r1" -#define NID_X9_62_c2tnb431r1 703 -#define OBJ_X9_62_c2tnb431r1 OBJ_X9_62_c_TwoCurve,20L - -#define OBJ_X9_62_primeCurve OBJ_X9_62_ellipticCurve,1L - -#define SN_X9_62_prime192v1 "prime192v1" -#define NID_X9_62_prime192v1 409 -#define OBJ_X9_62_prime192v1 OBJ_X9_62_primeCurve,1L - -#define SN_X9_62_prime192v2 "prime192v2" -#define NID_X9_62_prime192v2 410 -#define OBJ_X9_62_prime192v2 OBJ_X9_62_primeCurve,2L - -#define SN_X9_62_prime192v3 "prime192v3" -#define NID_X9_62_prime192v3 411 -#define OBJ_X9_62_prime192v3 OBJ_X9_62_primeCurve,3L - -#define SN_X9_62_prime239v1 "prime239v1" -#define NID_X9_62_prime239v1 412 -#define OBJ_X9_62_prime239v1 OBJ_X9_62_primeCurve,4L - -#define SN_X9_62_prime239v2 "prime239v2" -#define NID_X9_62_prime239v2 413 -#define OBJ_X9_62_prime239v2 OBJ_X9_62_primeCurve,5L - -#define SN_X9_62_prime239v3 "prime239v3" -#define NID_X9_62_prime239v3 414 -#define OBJ_X9_62_prime239v3 OBJ_X9_62_primeCurve,6L - -#define SN_X9_62_prime256v1 "prime256v1" -#define NID_X9_62_prime256v1 415 -#define OBJ_X9_62_prime256v1 OBJ_X9_62_primeCurve,7L - -#define OBJ_X9_62_id_ecSigType OBJ_ansi_X9_62,4L - -#define SN_ecdsa_with_SHA1 "ecdsa-with-SHA1" -#define NID_ecdsa_with_SHA1 416 -#define OBJ_ecdsa_with_SHA1 OBJ_X9_62_id_ecSigType,1L - -#define SN_ecdsa_with_Recommended "ecdsa-with-Recommended" -#define NID_ecdsa_with_Recommended 791 -#define OBJ_ecdsa_with_Recommended OBJ_X9_62_id_ecSigType,2L - -#define SN_ecdsa_with_Specified "ecdsa-with-Specified" -#define NID_ecdsa_with_Specified 792 -#define OBJ_ecdsa_with_Specified OBJ_X9_62_id_ecSigType,3L - -#define SN_ecdsa_with_SHA224 "ecdsa-with-SHA224" -#define NID_ecdsa_with_SHA224 793 -#define OBJ_ecdsa_with_SHA224 OBJ_ecdsa_with_Specified,1L - -#define SN_ecdsa_with_SHA256 "ecdsa-with-SHA256" -#define NID_ecdsa_with_SHA256 794 -#define OBJ_ecdsa_with_SHA256 OBJ_ecdsa_with_Specified,2L - -#define SN_ecdsa_with_SHA384 "ecdsa-with-SHA384" -#define NID_ecdsa_with_SHA384 795 -#define OBJ_ecdsa_with_SHA384 OBJ_ecdsa_with_Specified,3L - -#define SN_ecdsa_with_SHA512 "ecdsa-with-SHA512" -#define NID_ecdsa_with_SHA512 796 -#define OBJ_ecdsa_with_SHA512 OBJ_ecdsa_with_Specified,4L - -#define OBJ_secg_ellipticCurve OBJ_certicom_arc,0L - -#define SN_secp112r1 "secp112r1" -#define NID_secp112r1 704 -#define OBJ_secp112r1 OBJ_secg_ellipticCurve,6L - -#define SN_secp112r2 "secp112r2" -#define NID_secp112r2 705 -#define OBJ_secp112r2 OBJ_secg_ellipticCurve,7L - -#define SN_secp128r1 "secp128r1" -#define NID_secp128r1 706 -#define OBJ_secp128r1 OBJ_secg_ellipticCurve,28L - -#define SN_secp128r2 "secp128r2" -#define NID_secp128r2 707 -#define OBJ_secp128r2 OBJ_secg_ellipticCurve,29L - -#define SN_secp160k1 "secp160k1" -#define NID_secp160k1 708 -#define OBJ_secp160k1 OBJ_secg_ellipticCurve,9L - -#define SN_secp160r1 "secp160r1" -#define NID_secp160r1 709 -#define OBJ_secp160r1 OBJ_secg_ellipticCurve,8L - -#define SN_secp160r2 "secp160r2" -#define NID_secp160r2 710 -#define OBJ_secp160r2 OBJ_secg_ellipticCurve,30L - -#define SN_secp192k1 "secp192k1" -#define NID_secp192k1 711 -#define OBJ_secp192k1 OBJ_secg_ellipticCurve,31L - -#define SN_secp224k1 "secp224k1" -#define NID_secp224k1 712 -#define OBJ_secp224k1 OBJ_secg_ellipticCurve,32L - -#define SN_secp224r1 "secp224r1" -#define NID_secp224r1 713 -#define OBJ_secp224r1 OBJ_secg_ellipticCurve,33L - -#define SN_secp256k1 "secp256k1" -#define NID_secp256k1 714 -#define OBJ_secp256k1 OBJ_secg_ellipticCurve,10L - -#define SN_secp384r1 "secp384r1" -#define NID_secp384r1 715 -#define OBJ_secp384r1 OBJ_secg_ellipticCurve,34L - -#define SN_secp521r1 "secp521r1" -#define NID_secp521r1 716 -#define OBJ_secp521r1 OBJ_secg_ellipticCurve,35L - -#define SN_sect113r1 "sect113r1" -#define NID_sect113r1 717 -#define OBJ_sect113r1 OBJ_secg_ellipticCurve,4L - -#define SN_sect113r2 "sect113r2" -#define NID_sect113r2 718 -#define OBJ_sect113r2 OBJ_secg_ellipticCurve,5L - -#define SN_sect131r1 "sect131r1" -#define NID_sect131r1 719 -#define OBJ_sect131r1 OBJ_secg_ellipticCurve,22L - -#define SN_sect131r2 "sect131r2" -#define NID_sect131r2 720 -#define OBJ_sect131r2 OBJ_secg_ellipticCurve,23L - -#define SN_sect163k1 "sect163k1" -#define NID_sect163k1 721 -#define OBJ_sect163k1 OBJ_secg_ellipticCurve,1L - -#define SN_sect163r1 "sect163r1" -#define NID_sect163r1 722 -#define OBJ_sect163r1 OBJ_secg_ellipticCurve,2L - -#define SN_sect163r2 "sect163r2" -#define NID_sect163r2 723 -#define OBJ_sect163r2 OBJ_secg_ellipticCurve,15L - -#define SN_sect193r1 "sect193r1" -#define NID_sect193r1 724 -#define OBJ_sect193r1 OBJ_secg_ellipticCurve,24L - -#define SN_sect193r2 "sect193r2" -#define NID_sect193r2 725 -#define OBJ_sect193r2 OBJ_secg_ellipticCurve,25L - -#define SN_sect233k1 "sect233k1" -#define NID_sect233k1 726 -#define OBJ_sect233k1 OBJ_secg_ellipticCurve,26L - -#define SN_sect233r1 "sect233r1" -#define NID_sect233r1 727 -#define OBJ_sect233r1 OBJ_secg_ellipticCurve,27L - -#define SN_sect239k1 "sect239k1" -#define NID_sect239k1 728 -#define OBJ_sect239k1 OBJ_secg_ellipticCurve,3L - -#define SN_sect283k1 "sect283k1" -#define NID_sect283k1 729 -#define OBJ_sect283k1 OBJ_secg_ellipticCurve,16L - -#define SN_sect283r1 "sect283r1" -#define NID_sect283r1 730 -#define OBJ_sect283r1 OBJ_secg_ellipticCurve,17L - -#define SN_sect409k1 "sect409k1" -#define NID_sect409k1 731 -#define OBJ_sect409k1 OBJ_secg_ellipticCurve,36L - -#define SN_sect409r1 "sect409r1" -#define NID_sect409r1 732 -#define OBJ_sect409r1 OBJ_secg_ellipticCurve,37L - -#define SN_sect571k1 "sect571k1" -#define NID_sect571k1 733 -#define OBJ_sect571k1 OBJ_secg_ellipticCurve,38L - -#define SN_sect571r1 "sect571r1" -#define NID_sect571r1 734 -#define OBJ_sect571r1 OBJ_secg_ellipticCurve,39L - -#define OBJ_wap_wsg_idm_ecid OBJ_wap_wsg,4L - -#define SN_wap_wsg_idm_ecid_wtls1 "wap-wsg-idm-ecid-wtls1" -#define NID_wap_wsg_idm_ecid_wtls1 735 -#define OBJ_wap_wsg_idm_ecid_wtls1 OBJ_wap_wsg_idm_ecid,1L - -#define SN_wap_wsg_idm_ecid_wtls3 "wap-wsg-idm-ecid-wtls3" -#define NID_wap_wsg_idm_ecid_wtls3 736 -#define OBJ_wap_wsg_idm_ecid_wtls3 OBJ_wap_wsg_idm_ecid,3L - -#define SN_wap_wsg_idm_ecid_wtls4 "wap-wsg-idm-ecid-wtls4" -#define NID_wap_wsg_idm_ecid_wtls4 737 -#define OBJ_wap_wsg_idm_ecid_wtls4 OBJ_wap_wsg_idm_ecid,4L - -#define SN_wap_wsg_idm_ecid_wtls5 "wap-wsg-idm-ecid-wtls5" -#define NID_wap_wsg_idm_ecid_wtls5 738 -#define OBJ_wap_wsg_idm_ecid_wtls5 OBJ_wap_wsg_idm_ecid,5L - -#define SN_wap_wsg_idm_ecid_wtls6 "wap-wsg-idm-ecid-wtls6" -#define NID_wap_wsg_idm_ecid_wtls6 739 -#define OBJ_wap_wsg_idm_ecid_wtls6 OBJ_wap_wsg_idm_ecid,6L - -#define SN_wap_wsg_idm_ecid_wtls7 "wap-wsg-idm-ecid-wtls7" -#define NID_wap_wsg_idm_ecid_wtls7 740 -#define OBJ_wap_wsg_idm_ecid_wtls7 OBJ_wap_wsg_idm_ecid,7L - -#define SN_wap_wsg_idm_ecid_wtls8 "wap-wsg-idm-ecid-wtls8" -#define NID_wap_wsg_idm_ecid_wtls8 741 -#define OBJ_wap_wsg_idm_ecid_wtls8 OBJ_wap_wsg_idm_ecid,8L - -#define SN_wap_wsg_idm_ecid_wtls9 "wap-wsg-idm-ecid-wtls9" -#define NID_wap_wsg_idm_ecid_wtls9 742 -#define OBJ_wap_wsg_idm_ecid_wtls9 OBJ_wap_wsg_idm_ecid,9L - -#define SN_wap_wsg_idm_ecid_wtls10 "wap-wsg-idm-ecid-wtls10" -#define NID_wap_wsg_idm_ecid_wtls10 743 -#define OBJ_wap_wsg_idm_ecid_wtls10 OBJ_wap_wsg_idm_ecid,10L - -#define SN_wap_wsg_idm_ecid_wtls11 "wap-wsg-idm-ecid-wtls11" -#define NID_wap_wsg_idm_ecid_wtls11 744 -#define OBJ_wap_wsg_idm_ecid_wtls11 OBJ_wap_wsg_idm_ecid,11L - -#define SN_wap_wsg_idm_ecid_wtls12 "wap-wsg-idm-ecid-wtls12" -#define NID_wap_wsg_idm_ecid_wtls12 745 -#define OBJ_wap_wsg_idm_ecid_wtls12 OBJ_wap_wsg_idm_ecid,12L - -#define SN_cast5_cbc "CAST5-CBC" -#define LN_cast5_cbc "cast5-cbc" -#define NID_cast5_cbc 108 -#define OBJ_cast5_cbc OBJ_ISO_US,113533L,7L,66L,10L - -#define SN_cast5_ecb "CAST5-ECB" -#define LN_cast5_ecb "cast5-ecb" -#define NID_cast5_ecb 109 - -#define SN_cast5_cfb64 "CAST5-CFB" -#define LN_cast5_cfb64 "cast5-cfb" -#define NID_cast5_cfb64 110 - -#define SN_cast5_ofb64 "CAST5-OFB" -#define LN_cast5_ofb64 "cast5-ofb" -#define NID_cast5_ofb64 111 - -#define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" -#define NID_pbeWithMD5AndCast5_CBC 112 -#define OBJ_pbeWithMD5AndCast5_CBC OBJ_ISO_US,113533L,7L,66L,12L - -#define SN_id_PasswordBasedMAC "id-PasswordBasedMAC" -#define LN_id_PasswordBasedMAC "password based MAC" -#define NID_id_PasswordBasedMAC 782 -#define OBJ_id_PasswordBasedMAC OBJ_ISO_US,113533L,7L,66L,13L - -#define SN_id_DHBasedMac "id-DHBasedMac" -#define LN_id_DHBasedMac "Diffie-Hellman based MAC" -#define NID_id_DHBasedMac 783 -#define OBJ_id_DHBasedMac OBJ_ISO_US,113533L,7L,66L,30L - -#define SN_rsadsi "rsadsi" -#define LN_rsadsi "RSA Data Security, Inc." -#define NID_rsadsi 1 -#define OBJ_rsadsi OBJ_ISO_US,113549L - -#define SN_pkcs "pkcs" -#define LN_pkcs "RSA Data Security, Inc. PKCS" -#define NID_pkcs 2 -#define OBJ_pkcs OBJ_rsadsi,1L - -#define SN_pkcs1 "pkcs1" -#define NID_pkcs1 186 -#define OBJ_pkcs1 OBJ_pkcs,1L - -#define LN_rsaEncryption "rsaEncryption" -#define NID_rsaEncryption 6 -#define OBJ_rsaEncryption OBJ_pkcs1,1L - -#define SN_md2WithRSAEncryption "RSA-MD2" -#define LN_md2WithRSAEncryption "md2WithRSAEncryption" -#define NID_md2WithRSAEncryption 7 -#define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L - -#define SN_md4WithRSAEncryption "RSA-MD4" -#define LN_md4WithRSAEncryption "md4WithRSAEncryption" -#define NID_md4WithRSAEncryption 396 -#define OBJ_md4WithRSAEncryption OBJ_pkcs1,3L - -#define SN_md5WithRSAEncryption "RSA-MD5" -#define LN_md5WithRSAEncryption "md5WithRSAEncryption" -#define NID_md5WithRSAEncryption 8 -#define OBJ_md5WithRSAEncryption OBJ_pkcs1,4L - -#define SN_sha1WithRSAEncryption "RSA-SHA1" -#define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" -#define NID_sha1WithRSAEncryption 65 -#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L - -#define SN_rsaesOaep "RSAES-OAEP" -#define LN_rsaesOaep "rsaesOaep" -#define NID_rsaesOaep 919 -#define OBJ_rsaesOaep OBJ_pkcs1,7L - -#define SN_mgf1 "MGF1" -#define LN_mgf1 "mgf1" -#define NID_mgf1 911 -#define OBJ_mgf1 OBJ_pkcs1,8L - -#define SN_pSpecified "PSPECIFIED" -#define LN_pSpecified "pSpecified" -#define NID_pSpecified 935 -#define OBJ_pSpecified OBJ_pkcs1,9L - -#define SN_rsassaPss "RSASSA-PSS" -#define LN_rsassaPss "rsassaPss" -#define NID_rsassaPss 912 -#define OBJ_rsassaPss OBJ_pkcs1,10L - -#define SN_sha256WithRSAEncryption "RSA-SHA256" -#define LN_sha256WithRSAEncryption "sha256WithRSAEncryption" -#define NID_sha256WithRSAEncryption 668 -#define OBJ_sha256WithRSAEncryption OBJ_pkcs1,11L - -#define SN_sha384WithRSAEncryption "RSA-SHA384" -#define LN_sha384WithRSAEncryption "sha384WithRSAEncryption" -#define NID_sha384WithRSAEncryption 669 -#define OBJ_sha384WithRSAEncryption OBJ_pkcs1,12L - -#define SN_sha512WithRSAEncryption "RSA-SHA512" -#define LN_sha512WithRSAEncryption "sha512WithRSAEncryption" -#define NID_sha512WithRSAEncryption 670 -#define OBJ_sha512WithRSAEncryption OBJ_pkcs1,13L - -#define SN_sha224WithRSAEncryption "RSA-SHA224" -#define LN_sha224WithRSAEncryption "sha224WithRSAEncryption" -#define NID_sha224WithRSAEncryption 671 -#define OBJ_sha224WithRSAEncryption OBJ_pkcs1,14L - -#define SN_pkcs3 "pkcs3" -#define NID_pkcs3 27 -#define OBJ_pkcs3 OBJ_pkcs,3L - -#define LN_dhKeyAgreement "dhKeyAgreement" -#define NID_dhKeyAgreement 28 -#define OBJ_dhKeyAgreement OBJ_pkcs3,1L - -#define SN_pkcs5 "pkcs5" -#define NID_pkcs5 187 -#define OBJ_pkcs5 OBJ_pkcs,5L - -#define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" -#define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" -#define NID_pbeWithMD2AndDES_CBC 9 -#define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs5,1L - -#define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" -#define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" -#define NID_pbeWithMD5AndDES_CBC 10 -#define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs5,3L - -#define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" -#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" -#define NID_pbeWithMD2AndRC2_CBC 168 -#define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs5,4L - -#define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" -#define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" -#define NID_pbeWithMD5AndRC2_CBC 169 -#define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs5,6L - -#define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" -#define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" -#define NID_pbeWithSHA1AndDES_CBC 170 -#define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs5,10L - -#define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" -#define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" -#define NID_pbeWithSHA1AndRC2_CBC 68 -#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs5,11L - -#define LN_id_pbkdf2 "PBKDF2" -#define NID_id_pbkdf2 69 -#define OBJ_id_pbkdf2 OBJ_pkcs5,12L - -#define LN_pbes2 "PBES2" -#define NID_pbes2 161 -#define OBJ_pbes2 OBJ_pkcs5,13L - -#define LN_pbmac1 "PBMAC1" -#define NID_pbmac1 162 -#define OBJ_pbmac1 OBJ_pkcs5,14L - -#define SN_pkcs7 "pkcs7" -#define NID_pkcs7 20 -#define OBJ_pkcs7 OBJ_pkcs,7L - -#define LN_pkcs7_data "pkcs7-data" -#define NID_pkcs7_data 21 -#define OBJ_pkcs7_data OBJ_pkcs7,1L - -#define LN_pkcs7_signed "pkcs7-signedData" -#define NID_pkcs7_signed 22 -#define OBJ_pkcs7_signed OBJ_pkcs7,2L - -#define LN_pkcs7_enveloped "pkcs7-envelopedData" -#define NID_pkcs7_enveloped 23 -#define OBJ_pkcs7_enveloped OBJ_pkcs7,3L - -#define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" -#define NID_pkcs7_signedAndEnveloped 24 -#define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L - -#define LN_pkcs7_digest "pkcs7-digestData" -#define NID_pkcs7_digest 25 -#define OBJ_pkcs7_digest OBJ_pkcs7,5L - -#define LN_pkcs7_encrypted "pkcs7-encryptedData" -#define NID_pkcs7_encrypted 26 -#define OBJ_pkcs7_encrypted OBJ_pkcs7,6L - -#define SN_pkcs9 "pkcs9" -#define NID_pkcs9 47 -#define OBJ_pkcs9 OBJ_pkcs,9L - -#define LN_pkcs9_emailAddress "emailAddress" -#define NID_pkcs9_emailAddress 48 -#define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L - -#define LN_pkcs9_unstructuredName "unstructuredName" -#define NID_pkcs9_unstructuredName 49 -#define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L - -#define LN_pkcs9_contentType "contentType" -#define NID_pkcs9_contentType 50 -#define OBJ_pkcs9_contentType OBJ_pkcs9,3L - -#define LN_pkcs9_messageDigest "messageDigest" -#define NID_pkcs9_messageDigest 51 -#define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L - -#define LN_pkcs9_signingTime "signingTime" -#define NID_pkcs9_signingTime 52 -#define OBJ_pkcs9_signingTime OBJ_pkcs9,5L - -#define LN_pkcs9_countersignature "countersignature" -#define NID_pkcs9_countersignature 53 -#define OBJ_pkcs9_countersignature OBJ_pkcs9,6L - -#define LN_pkcs9_challengePassword "challengePassword" -#define NID_pkcs9_challengePassword 54 -#define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L - -#define LN_pkcs9_unstructuredAddress "unstructuredAddress" -#define NID_pkcs9_unstructuredAddress 55 -#define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L - -#define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" -#define NID_pkcs9_extCertAttributes 56 -#define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L - -#define SN_ext_req "extReq" -#define LN_ext_req "Extension Request" -#define NID_ext_req 172 -#define OBJ_ext_req OBJ_pkcs9,14L - -#define SN_SMIMECapabilities "SMIME-CAPS" -#define LN_SMIMECapabilities "S/MIME Capabilities" -#define NID_SMIMECapabilities 167 -#define OBJ_SMIMECapabilities OBJ_pkcs9,15L - -#define SN_SMIME "SMIME" -#define LN_SMIME "S/MIME" -#define NID_SMIME 188 -#define OBJ_SMIME OBJ_pkcs9,16L - -#define SN_id_smime_mod "id-smime-mod" -#define NID_id_smime_mod 189 -#define OBJ_id_smime_mod OBJ_SMIME,0L - -#define SN_id_smime_ct "id-smime-ct" -#define NID_id_smime_ct 190 -#define OBJ_id_smime_ct OBJ_SMIME,1L - -#define SN_id_smime_aa "id-smime-aa" -#define NID_id_smime_aa 191 -#define OBJ_id_smime_aa OBJ_SMIME,2L - -#define SN_id_smime_alg "id-smime-alg" -#define NID_id_smime_alg 192 -#define OBJ_id_smime_alg OBJ_SMIME,3L - -#define SN_id_smime_cd "id-smime-cd" -#define NID_id_smime_cd 193 -#define OBJ_id_smime_cd OBJ_SMIME,4L - -#define SN_id_smime_spq "id-smime-spq" -#define NID_id_smime_spq 194 -#define OBJ_id_smime_spq OBJ_SMIME,5L - -#define SN_id_smime_cti "id-smime-cti" -#define NID_id_smime_cti 195 -#define OBJ_id_smime_cti OBJ_SMIME,6L - -#define SN_id_smime_mod_cms "id-smime-mod-cms" -#define NID_id_smime_mod_cms 196 -#define OBJ_id_smime_mod_cms OBJ_id_smime_mod,1L - -#define SN_id_smime_mod_ess "id-smime-mod-ess" -#define NID_id_smime_mod_ess 197 -#define OBJ_id_smime_mod_ess OBJ_id_smime_mod,2L - -#define SN_id_smime_mod_oid "id-smime-mod-oid" -#define NID_id_smime_mod_oid 198 -#define OBJ_id_smime_mod_oid OBJ_id_smime_mod,3L - -#define SN_id_smime_mod_msg_v3 "id-smime-mod-msg-v3" -#define NID_id_smime_mod_msg_v3 199 -#define OBJ_id_smime_mod_msg_v3 OBJ_id_smime_mod,4L - -#define SN_id_smime_mod_ets_eSignature_88 "id-smime-mod-ets-eSignature-88" -#define NID_id_smime_mod_ets_eSignature_88 200 -#define OBJ_id_smime_mod_ets_eSignature_88 OBJ_id_smime_mod,5L - -#define SN_id_smime_mod_ets_eSignature_97 "id-smime-mod-ets-eSignature-97" -#define NID_id_smime_mod_ets_eSignature_97 201 -#define OBJ_id_smime_mod_ets_eSignature_97 OBJ_id_smime_mod,6L - -#define SN_id_smime_mod_ets_eSigPolicy_88 "id-smime-mod-ets-eSigPolicy-88" -#define NID_id_smime_mod_ets_eSigPolicy_88 202 -#define OBJ_id_smime_mod_ets_eSigPolicy_88 OBJ_id_smime_mod,7L - -#define SN_id_smime_mod_ets_eSigPolicy_97 "id-smime-mod-ets-eSigPolicy-97" -#define NID_id_smime_mod_ets_eSigPolicy_97 203 -#define OBJ_id_smime_mod_ets_eSigPolicy_97 OBJ_id_smime_mod,8L - -#define SN_id_smime_ct_receipt "id-smime-ct-receipt" -#define NID_id_smime_ct_receipt 204 -#define OBJ_id_smime_ct_receipt OBJ_id_smime_ct,1L - -#define SN_id_smime_ct_authData "id-smime-ct-authData" -#define NID_id_smime_ct_authData 205 -#define OBJ_id_smime_ct_authData OBJ_id_smime_ct,2L - -#define SN_id_smime_ct_publishCert "id-smime-ct-publishCert" -#define NID_id_smime_ct_publishCert 206 -#define OBJ_id_smime_ct_publishCert OBJ_id_smime_ct,3L - -#define SN_id_smime_ct_TSTInfo "id-smime-ct-TSTInfo" -#define NID_id_smime_ct_TSTInfo 207 -#define OBJ_id_smime_ct_TSTInfo OBJ_id_smime_ct,4L - -#define SN_id_smime_ct_TDTInfo "id-smime-ct-TDTInfo" -#define NID_id_smime_ct_TDTInfo 208 -#define OBJ_id_smime_ct_TDTInfo OBJ_id_smime_ct,5L - -#define SN_id_smime_ct_contentInfo "id-smime-ct-contentInfo" -#define NID_id_smime_ct_contentInfo 209 -#define OBJ_id_smime_ct_contentInfo OBJ_id_smime_ct,6L - -#define SN_id_smime_ct_DVCSRequestData "id-smime-ct-DVCSRequestData" -#define NID_id_smime_ct_DVCSRequestData 210 -#define OBJ_id_smime_ct_DVCSRequestData OBJ_id_smime_ct,7L - -#define SN_id_smime_ct_DVCSResponseData "id-smime-ct-DVCSResponseData" -#define NID_id_smime_ct_DVCSResponseData 211 -#define OBJ_id_smime_ct_DVCSResponseData OBJ_id_smime_ct,8L - -#define SN_id_smime_ct_compressedData "id-smime-ct-compressedData" -#define NID_id_smime_ct_compressedData 786 -#define OBJ_id_smime_ct_compressedData OBJ_id_smime_ct,9L - -#define SN_id_ct_asciiTextWithCRLF "id-ct-asciiTextWithCRLF" -#define NID_id_ct_asciiTextWithCRLF 787 -#define OBJ_id_ct_asciiTextWithCRLF OBJ_id_smime_ct,27L - -#define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest" -#define NID_id_smime_aa_receiptRequest 212 -#define OBJ_id_smime_aa_receiptRequest OBJ_id_smime_aa,1L - -#define SN_id_smime_aa_securityLabel "id-smime-aa-securityLabel" -#define NID_id_smime_aa_securityLabel 213 -#define OBJ_id_smime_aa_securityLabel OBJ_id_smime_aa,2L - -#define SN_id_smime_aa_mlExpandHistory "id-smime-aa-mlExpandHistory" -#define NID_id_smime_aa_mlExpandHistory 214 -#define OBJ_id_smime_aa_mlExpandHistory OBJ_id_smime_aa,3L - -#define SN_id_smime_aa_contentHint "id-smime-aa-contentHint" -#define NID_id_smime_aa_contentHint 215 -#define OBJ_id_smime_aa_contentHint OBJ_id_smime_aa,4L - -#define SN_id_smime_aa_msgSigDigest "id-smime-aa-msgSigDigest" -#define NID_id_smime_aa_msgSigDigest 216 -#define OBJ_id_smime_aa_msgSigDigest OBJ_id_smime_aa,5L - -#define SN_id_smime_aa_encapContentType "id-smime-aa-encapContentType" -#define NID_id_smime_aa_encapContentType 217 -#define OBJ_id_smime_aa_encapContentType OBJ_id_smime_aa,6L - -#define SN_id_smime_aa_contentIdentifier "id-smime-aa-contentIdentifier" -#define NID_id_smime_aa_contentIdentifier 218 -#define OBJ_id_smime_aa_contentIdentifier OBJ_id_smime_aa,7L - -#define SN_id_smime_aa_macValue "id-smime-aa-macValue" -#define NID_id_smime_aa_macValue 219 -#define OBJ_id_smime_aa_macValue OBJ_id_smime_aa,8L - -#define SN_id_smime_aa_equivalentLabels "id-smime-aa-equivalentLabels" -#define NID_id_smime_aa_equivalentLabels 220 -#define OBJ_id_smime_aa_equivalentLabels OBJ_id_smime_aa,9L - -#define SN_id_smime_aa_contentReference "id-smime-aa-contentReference" -#define NID_id_smime_aa_contentReference 221 -#define OBJ_id_smime_aa_contentReference OBJ_id_smime_aa,10L - -#define SN_id_smime_aa_encrypKeyPref "id-smime-aa-encrypKeyPref" -#define NID_id_smime_aa_encrypKeyPref 222 -#define OBJ_id_smime_aa_encrypKeyPref OBJ_id_smime_aa,11L - -#define SN_id_smime_aa_signingCertificate "id-smime-aa-signingCertificate" -#define NID_id_smime_aa_signingCertificate 223 -#define OBJ_id_smime_aa_signingCertificate OBJ_id_smime_aa,12L - -#define SN_id_smime_aa_smimeEncryptCerts "id-smime-aa-smimeEncryptCerts" -#define NID_id_smime_aa_smimeEncryptCerts 224 -#define OBJ_id_smime_aa_smimeEncryptCerts OBJ_id_smime_aa,13L - -#define SN_id_smime_aa_timeStampToken "id-smime-aa-timeStampToken" -#define NID_id_smime_aa_timeStampToken 225 -#define OBJ_id_smime_aa_timeStampToken OBJ_id_smime_aa,14L - -#define SN_id_smime_aa_ets_sigPolicyId "id-smime-aa-ets-sigPolicyId" -#define NID_id_smime_aa_ets_sigPolicyId 226 -#define OBJ_id_smime_aa_ets_sigPolicyId OBJ_id_smime_aa,15L - -#define SN_id_smime_aa_ets_commitmentType "id-smime-aa-ets-commitmentType" -#define NID_id_smime_aa_ets_commitmentType 227 -#define OBJ_id_smime_aa_ets_commitmentType OBJ_id_smime_aa,16L - -#define SN_id_smime_aa_ets_signerLocation "id-smime-aa-ets-signerLocation" -#define NID_id_smime_aa_ets_signerLocation 228 -#define OBJ_id_smime_aa_ets_signerLocation OBJ_id_smime_aa,17L - -#define SN_id_smime_aa_ets_signerAttr "id-smime-aa-ets-signerAttr" -#define NID_id_smime_aa_ets_signerAttr 229 -#define OBJ_id_smime_aa_ets_signerAttr OBJ_id_smime_aa,18L - -#define SN_id_smime_aa_ets_otherSigCert "id-smime-aa-ets-otherSigCert" -#define NID_id_smime_aa_ets_otherSigCert 230 -#define OBJ_id_smime_aa_ets_otherSigCert OBJ_id_smime_aa,19L - -#define SN_id_smime_aa_ets_contentTimestamp "id-smime-aa-ets-contentTimestamp" -#define NID_id_smime_aa_ets_contentTimestamp 231 -#define OBJ_id_smime_aa_ets_contentTimestamp OBJ_id_smime_aa,20L - -#define SN_id_smime_aa_ets_CertificateRefs "id-smime-aa-ets-CertificateRefs" -#define NID_id_smime_aa_ets_CertificateRefs 232 -#define OBJ_id_smime_aa_ets_CertificateRefs OBJ_id_smime_aa,21L - -#define SN_id_smime_aa_ets_RevocationRefs "id-smime-aa-ets-RevocationRefs" -#define NID_id_smime_aa_ets_RevocationRefs 233 -#define OBJ_id_smime_aa_ets_RevocationRefs OBJ_id_smime_aa,22L - -#define SN_id_smime_aa_ets_certValues "id-smime-aa-ets-certValues" -#define NID_id_smime_aa_ets_certValues 234 -#define OBJ_id_smime_aa_ets_certValues OBJ_id_smime_aa,23L - -#define SN_id_smime_aa_ets_revocationValues "id-smime-aa-ets-revocationValues" -#define NID_id_smime_aa_ets_revocationValues 235 -#define OBJ_id_smime_aa_ets_revocationValues OBJ_id_smime_aa,24L - -#define SN_id_smime_aa_ets_escTimeStamp "id-smime-aa-ets-escTimeStamp" -#define NID_id_smime_aa_ets_escTimeStamp 236 -#define OBJ_id_smime_aa_ets_escTimeStamp OBJ_id_smime_aa,25L - -#define SN_id_smime_aa_ets_certCRLTimestamp "id-smime-aa-ets-certCRLTimestamp" -#define NID_id_smime_aa_ets_certCRLTimestamp 237 -#define OBJ_id_smime_aa_ets_certCRLTimestamp OBJ_id_smime_aa,26L - -#define SN_id_smime_aa_ets_archiveTimeStamp "id-smime-aa-ets-archiveTimeStamp" -#define NID_id_smime_aa_ets_archiveTimeStamp 238 -#define OBJ_id_smime_aa_ets_archiveTimeStamp OBJ_id_smime_aa,27L - -#define SN_id_smime_aa_signatureType "id-smime-aa-signatureType" -#define NID_id_smime_aa_signatureType 239 -#define OBJ_id_smime_aa_signatureType OBJ_id_smime_aa,28L - -#define SN_id_smime_aa_dvcs_dvc "id-smime-aa-dvcs-dvc" -#define NID_id_smime_aa_dvcs_dvc 240 -#define OBJ_id_smime_aa_dvcs_dvc OBJ_id_smime_aa,29L - -#define SN_id_smime_alg_ESDHwith3DES "id-smime-alg-ESDHwith3DES" -#define NID_id_smime_alg_ESDHwith3DES 241 -#define OBJ_id_smime_alg_ESDHwith3DES OBJ_id_smime_alg,1L - -#define SN_id_smime_alg_ESDHwithRC2 "id-smime-alg-ESDHwithRC2" -#define NID_id_smime_alg_ESDHwithRC2 242 -#define OBJ_id_smime_alg_ESDHwithRC2 OBJ_id_smime_alg,2L - -#define SN_id_smime_alg_3DESwrap "id-smime-alg-3DESwrap" -#define NID_id_smime_alg_3DESwrap 243 -#define OBJ_id_smime_alg_3DESwrap OBJ_id_smime_alg,3L - -#define SN_id_smime_alg_RC2wrap "id-smime-alg-RC2wrap" -#define NID_id_smime_alg_RC2wrap 244 -#define OBJ_id_smime_alg_RC2wrap OBJ_id_smime_alg,4L - -#define SN_id_smime_alg_ESDH "id-smime-alg-ESDH" -#define NID_id_smime_alg_ESDH 245 -#define OBJ_id_smime_alg_ESDH OBJ_id_smime_alg,5L - -#define SN_id_smime_alg_CMS3DESwrap "id-smime-alg-CMS3DESwrap" -#define NID_id_smime_alg_CMS3DESwrap 246 -#define OBJ_id_smime_alg_CMS3DESwrap OBJ_id_smime_alg,6L - -#define SN_id_smime_alg_CMSRC2wrap "id-smime-alg-CMSRC2wrap" -#define NID_id_smime_alg_CMSRC2wrap 247 -#define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L - -#define SN_id_alg_PWRI_KEK "id-alg-PWRI-KEK" -#define NID_id_alg_PWRI_KEK 893 -#define OBJ_id_alg_PWRI_KEK OBJ_id_smime_alg,9L - -#define SN_id_smime_cd_ldap "id-smime-cd-ldap" -#define NID_id_smime_cd_ldap 248 -#define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L - -#define SN_id_smime_spq_ets_sqt_uri "id-smime-spq-ets-sqt-uri" -#define NID_id_smime_spq_ets_sqt_uri 249 -#define OBJ_id_smime_spq_ets_sqt_uri OBJ_id_smime_spq,1L - -#define SN_id_smime_spq_ets_sqt_unotice "id-smime-spq-ets-sqt-unotice" -#define NID_id_smime_spq_ets_sqt_unotice 250 -#define OBJ_id_smime_spq_ets_sqt_unotice OBJ_id_smime_spq,2L - -#define SN_id_smime_cti_ets_proofOfOrigin "id-smime-cti-ets-proofOfOrigin" -#define NID_id_smime_cti_ets_proofOfOrigin 251 -#define OBJ_id_smime_cti_ets_proofOfOrigin OBJ_id_smime_cti,1L - -#define SN_id_smime_cti_ets_proofOfReceipt "id-smime-cti-ets-proofOfReceipt" -#define NID_id_smime_cti_ets_proofOfReceipt 252 -#define OBJ_id_smime_cti_ets_proofOfReceipt OBJ_id_smime_cti,2L - -#define SN_id_smime_cti_ets_proofOfDelivery "id-smime-cti-ets-proofOfDelivery" -#define NID_id_smime_cti_ets_proofOfDelivery 253 -#define OBJ_id_smime_cti_ets_proofOfDelivery OBJ_id_smime_cti,3L - -#define SN_id_smime_cti_ets_proofOfSender "id-smime-cti-ets-proofOfSender" -#define NID_id_smime_cti_ets_proofOfSender 254 -#define OBJ_id_smime_cti_ets_proofOfSender OBJ_id_smime_cti,4L - -#define SN_id_smime_cti_ets_proofOfApproval "id-smime-cti-ets-proofOfApproval" -#define NID_id_smime_cti_ets_proofOfApproval 255 -#define OBJ_id_smime_cti_ets_proofOfApproval OBJ_id_smime_cti,5L - -#define SN_id_smime_cti_ets_proofOfCreation "id-smime-cti-ets-proofOfCreation" -#define NID_id_smime_cti_ets_proofOfCreation 256 -#define OBJ_id_smime_cti_ets_proofOfCreation OBJ_id_smime_cti,6L - -#define LN_friendlyName "friendlyName" -#define NID_friendlyName 156 -#define OBJ_friendlyName OBJ_pkcs9,20L - -#define LN_localKeyID "localKeyID" -#define NID_localKeyID 157 -#define OBJ_localKeyID OBJ_pkcs9,21L - -#define SN_ms_csp_name "CSPName" -#define LN_ms_csp_name "Microsoft CSP Name" -#define NID_ms_csp_name 417 -#define OBJ_ms_csp_name 1L,3L,6L,1L,4L,1L,311L,17L,1L - -#define SN_LocalKeySet "LocalKeySet" -#define LN_LocalKeySet "Microsoft Local Key set" -#define NID_LocalKeySet 856 -#define OBJ_LocalKeySet 1L,3L,6L,1L,4L,1L,311L,17L,2L - -#define OBJ_certTypes OBJ_pkcs9,22L - -#define LN_x509Certificate "x509Certificate" -#define NID_x509Certificate 158 -#define OBJ_x509Certificate OBJ_certTypes,1L - -#define LN_sdsiCertificate "sdsiCertificate" -#define NID_sdsiCertificate 159 -#define OBJ_sdsiCertificate OBJ_certTypes,2L - -#define OBJ_crlTypes OBJ_pkcs9,23L - -#define LN_x509Crl "x509Crl" -#define NID_x509Crl 160 -#define OBJ_x509Crl OBJ_crlTypes,1L - -#define OBJ_pkcs12 OBJ_pkcs,12L - -#define OBJ_pkcs12_pbeids OBJ_pkcs12,1L - -#define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" -#define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" -#define NID_pbe_WithSHA1And128BitRC4 144 -#define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids,1L - -#define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" -#define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" -#define NID_pbe_WithSHA1And40BitRC4 145 -#define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids,2L - -#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" -#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" -#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 -#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids,3L - -#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" -#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" -#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 -#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids,4L - -#define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" -#define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" -#define NID_pbe_WithSHA1And128BitRC2_CBC 148 -#define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids,5L - -#define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" -#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" -#define NID_pbe_WithSHA1And40BitRC2_CBC 149 -#define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids,6L - -#define OBJ_pkcs12_Version1 OBJ_pkcs12,10L - -#define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1,1L - -#define LN_keyBag "keyBag" -#define NID_keyBag 150 -#define OBJ_keyBag OBJ_pkcs12_BagIds,1L - -#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" -#define NID_pkcs8ShroudedKeyBag 151 -#define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds,2L - -#define LN_certBag "certBag" -#define NID_certBag 152 -#define OBJ_certBag OBJ_pkcs12_BagIds,3L - -#define LN_crlBag "crlBag" -#define NID_crlBag 153 -#define OBJ_crlBag OBJ_pkcs12_BagIds,4L - -#define LN_secretBag "secretBag" -#define NID_secretBag 154 -#define OBJ_secretBag OBJ_pkcs12_BagIds,5L - -#define LN_safeContentsBag "safeContentsBag" -#define NID_safeContentsBag 155 -#define OBJ_safeContentsBag OBJ_pkcs12_BagIds,6L - -#define SN_md2 "MD2" -#define LN_md2 "md2" -#define NID_md2 3 -#define OBJ_md2 OBJ_rsadsi,2L,2L - -#define SN_md4 "MD4" -#define LN_md4 "md4" -#define NID_md4 257 -#define OBJ_md4 OBJ_rsadsi,2L,4L - -#define SN_md5 "MD5" -#define LN_md5 "md5" -#define NID_md5 4 -#define OBJ_md5 OBJ_rsadsi,2L,5L - -#define SN_md5_sha1 "MD5-SHA1" -#define LN_md5_sha1 "md5-sha1" -#define NID_md5_sha1 114 - -#define LN_hmacWithMD5 "hmacWithMD5" -#define NID_hmacWithMD5 797 -#define OBJ_hmacWithMD5 OBJ_rsadsi,2L,6L - -#define LN_hmacWithSHA1 "hmacWithSHA1" -#define NID_hmacWithSHA1 163 -#define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L - -#define LN_hmacWithSHA224 "hmacWithSHA224" -#define NID_hmacWithSHA224 798 -#define OBJ_hmacWithSHA224 OBJ_rsadsi,2L,8L - -#define LN_hmacWithSHA256 "hmacWithSHA256" -#define NID_hmacWithSHA256 799 -#define OBJ_hmacWithSHA256 OBJ_rsadsi,2L,9L - -#define LN_hmacWithSHA384 "hmacWithSHA384" -#define NID_hmacWithSHA384 800 -#define OBJ_hmacWithSHA384 OBJ_rsadsi,2L,10L - -#define LN_hmacWithSHA512 "hmacWithSHA512" -#define NID_hmacWithSHA512 801 -#define OBJ_hmacWithSHA512 OBJ_rsadsi,2L,11L - -#define SN_rc2_cbc "RC2-CBC" -#define LN_rc2_cbc "rc2-cbc" -#define NID_rc2_cbc 37 -#define OBJ_rc2_cbc OBJ_rsadsi,3L,2L - -#define SN_rc2_ecb "RC2-ECB" -#define LN_rc2_ecb "rc2-ecb" -#define NID_rc2_ecb 38 - -#define SN_rc2_cfb64 "RC2-CFB" -#define LN_rc2_cfb64 "rc2-cfb" -#define NID_rc2_cfb64 39 - -#define SN_rc2_ofb64 "RC2-OFB" -#define LN_rc2_ofb64 "rc2-ofb" -#define NID_rc2_ofb64 40 - -#define SN_rc2_40_cbc "RC2-40-CBC" -#define LN_rc2_40_cbc "rc2-40-cbc" -#define NID_rc2_40_cbc 98 - -#define SN_rc2_64_cbc "RC2-64-CBC" -#define LN_rc2_64_cbc "rc2-64-cbc" -#define NID_rc2_64_cbc 166 - -#define SN_rc4 "RC4" -#define LN_rc4 "rc4" -#define NID_rc4 5 -#define OBJ_rc4 OBJ_rsadsi,3L,4L - -#define SN_rc4_40 "RC4-40" -#define LN_rc4_40 "rc4-40" -#define NID_rc4_40 97 - -#define SN_des_ede3_cbc "DES-EDE3-CBC" -#define LN_des_ede3_cbc "des-ede3-cbc" -#define NID_des_ede3_cbc 44 -#define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L - -#define SN_rc5_cbc "RC5-CBC" -#define LN_rc5_cbc "rc5-cbc" -#define NID_rc5_cbc 120 -#define OBJ_rc5_cbc OBJ_rsadsi,3L,8L - -#define SN_rc5_ecb "RC5-ECB" -#define LN_rc5_ecb "rc5-ecb" -#define NID_rc5_ecb 121 - -#define SN_rc5_cfb64 "RC5-CFB" -#define LN_rc5_cfb64 "rc5-cfb" -#define NID_rc5_cfb64 122 - -#define SN_rc5_ofb64 "RC5-OFB" -#define LN_rc5_ofb64 "rc5-ofb" -#define NID_rc5_ofb64 123 - -#define SN_ms_ext_req "msExtReq" -#define LN_ms_ext_req "Microsoft Extension Request" -#define NID_ms_ext_req 171 -#define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L - -#define SN_ms_code_ind "msCodeInd" -#define LN_ms_code_ind "Microsoft Individual Code Signing" -#define NID_ms_code_ind 134 -#define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L - -#define SN_ms_code_com "msCodeCom" -#define LN_ms_code_com "Microsoft Commercial Code Signing" -#define NID_ms_code_com 135 -#define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L - -#define SN_ms_ctl_sign "msCTLSign" -#define LN_ms_ctl_sign "Microsoft Trust List Signing" -#define NID_ms_ctl_sign 136 -#define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L - -#define SN_ms_sgc "msSGC" -#define LN_ms_sgc "Microsoft Server Gated Crypto" -#define NID_ms_sgc 137 -#define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L - -#define SN_ms_efs "msEFS" -#define LN_ms_efs "Microsoft Encrypted File System" -#define NID_ms_efs 138 -#define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L - -#define SN_ms_smartcard_login "msSmartcardLogin" -#define LN_ms_smartcard_login "Microsoft Smartcardlogin" -#define NID_ms_smartcard_login 648 -#define OBJ_ms_smartcard_login 1L,3L,6L,1L,4L,1L,311L,20L,2L,2L - -#define SN_ms_upn "msUPN" -#define LN_ms_upn "Microsoft Universal Principal Name" -#define NID_ms_upn 649 -#define OBJ_ms_upn 1L,3L,6L,1L,4L,1L,311L,20L,2L,3L - -#define SN_idea_cbc "IDEA-CBC" -#define LN_idea_cbc "idea-cbc" -#define NID_idea_cbc 34 -#define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L - -#define SN_idea_ecb "IDEA-ECB" -#define LN_idea_ecb "idea-ecb" -#define NID_idea_ecb 36 - -#define SN_idea_cfb64 "IDEA-CFB" -#define LN_idea_cfb64 "idea-cfb" -#define NID_idea_cfb64 35 - -#define SN_idea_ofb64 "IDEA-OFB" -#define LN_idea_ofb64 "idea-ofb" -#define NID_idea_ofb64 46 - -#define SN_bf_cbc "BF-CBC" -#define LN_bf_cbc "bf-cbc" -#define NID_bf_cbc 91 -#define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L - -#define SN_bf_ecb "BF-ECB" -#define LN_bf_ecb "bf-ecb" -#define NID_bf_ecb 92 - -#define SN_bf_cfb64 "BF-CFB" -#define LN_bf_cfb64 "bf-cfb" -#define NID_bf_cfb64 93 - -#define SN_bf_ofb64 "BF-OFB" -#define LN_bf_ofb64 "bf-ofb" -#define NID_bf_ofb64 94 - -#define SN_id_pkix "PKIX" -#define NID_id_pkix 127 -#define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L - -#define SN_id_pkix_mod "id-pkix-mod" -#define NID_id_pkix_mod 258 -#define OBJ_id_pkix_mod OBJ_id_pkix,0L - -#define SN_id_pe "id-pe" -#define NID_id_pe 175 -#define OBJ_id_pe OBJ_id_pkix,1L - -#define SN_id_qt "id-qt" -#define NID_id_qt 259 -#define OBJ_id_qt OBJ_id_pkix,2L - -#define SN_id_kp "id-kp" -#define NID_id_kp 128 -#define OBJ_id_kp OBJ_id_pkix,3L - -#define SN_id_it "id-it" -#define NID_id_it 260 -#define OBJ_id_it OBJ_id_pkix,4L - -#define SN_id_pkip "id-pkip" -#define NID_id_pkip 261 -#define OBJ_id_pkip OBJ_id_pkix,5L - -#define SN_id_alg "id-alg" -#define NID_id_alg 262 -#define OBJ_id_alg OBJ_id_pkix,6L - -#define SN_id_cmc "id-cmc" -#define NID_id_cmc 263 -#define OBJ_id_cmc OBJ_id_pkix,7L - -#define SN_id_on "id-on" -#define NID_id_on 264 -#define OBJ_id_on OBJ_id_pkix,8L - -#define SN_id_pda "id-pda" -#define NID_id_pda 265 -#define OBJ_id_pda OBJ_id_pkix,9L - -#define SN_id_aca "id-aca" -#define NID_id_aca 266 -#define OBJ_id_aca OBJ_id_pkix,10L - -#define SN_id_qcs "id-qcs" -#define NID_id_qcs 267 -#define OBJ_id_qcs OBJ_id_pkix,11L - -#define SN_id_cct "id-cct" -#define NID_id_cct 268 -#define OBJ_id_cct OBJ_id_pkix,12L - -#define SN_id_ppl "id-ppl" -#define NID_id_ppl 662 -#define OBJ_id_ppl OBJ_id_pkix,21L - -#define SN_id_ad "id-ad" -#define NID_id_ad 176 -#define OBJ_id_ad OBJ_id_pkix,48L - -#define SN_id_pkix1_explicit_88 "id-pkix1-explicit-88" -#define NID_id_pkix1_explicit_88 269 -#define OBJ_id_pkix1_explicit_88 OBJ_id_pkix_mod,1L - -#define SN_id_pkix1_implicit_88 "id-pkix1-implicit-88" -#define NID_id_pkix1_implicit_88 270 -#define OBJ_id_pkix1_implicit_88 OBJ_id_pkix_mod,2L - -#define SN_id_pkix1_explicit_93 "id-pkix1-explicit-93" -#define NID_id_pkix1_explicit_93 271 -#define OBJ_id_pkix1_explicit_93 OBJ_id_pkix_mod,3L - -#define SN_id_pkix1_implicit_93 "id-pkix1-implicit-93" -#define NID_id_pkix1_implicit_93 272 -#define OBJ_id_pkix1_implicit_93 OBJ_id_pkix_mod,4L - -#define SN_id_mod_crmf "id-mod-crmf" -#define NID_id_mod_crmf 273 -#define OBJ_id_mod_crmf OBJ_id_pkix_mod,5L - -#define SN_id_mod_cmc "id-mod-cmc" -#define NID_id_mod_cmc 274 -#define OBJ_id_mod_cmc OBJ_id_pkix_mod,6L - -#define SN_id_mod_kea_profile_88 "id-mod-kea-profile-88" -#define NID_id_mod_kea_profile_88 275 -#define OBJ_id_mod_kea_profile_88 OBJ_id_pkix_mod,7L - -#define SN_id_mod_kea_profile_93 "id-mod-kea-profile-93" -#define NID_id_mod_kea_profile_93 276 -#define OBJ_id_mod_kea_profile_93 OBJ_id_pkix_mod,8L - -#define SN_id_mod_cmp "id-mod-cmp" -#define NID_id_mod_cmp 277 -#define OBJ_id_mod_cmp OBJ_id_pkix_mod,9L - -#define SN_id_mod_qualified_cert_88 "id-mod-qualified-cert-88" -#define NID_id_mod_qualified_cert_88 278 -#define OBJ_id_mod_qualified_cert_88 OBJ_id_pkix_mod,10L - -#define SN_id_mod_qualified_cert_93 "id-mod-qualified-cert-93" -#define NID_id_mod_qualified_cert_93 279 -#define OBJ_id_mod_qualified_cert_93 OBJ_id_pkix_mod,11L - -#define SN_id_mod_attribute_cert "id-mod-attribute-cert" -#define NID_id_mod_attribute_cert 280 -#define OBJ_id_mod_attribute_cert OBJ_id_pkix_mod,12L - -#define SN_id_mod_timestamp_protocol "id-mod-timestamp-protocol" -#define NID_id_mod_timestamp_protocol 281 -#define OBJ_id_mod_timestamp_protocol OBJ_id_pkix_mod,13L - -#define SN_id_mod_ocsp "id-mod-ocsp" -#define NID_id_mod_ocsp 282 -#define OBJ_id_mod_ocsp OBJ_id_pkix_mod,14L - -#define SN_id_mod_dvcs "id-mod-dvcs" -#define NID_id_mod_dvcs 283 -#define OBJ_id_mod_dvcs OBJ_id_pkix_mod,15L - -#define SN_id_mod_cmp2000 "id-mod-cmp2000" -#define NID_id_mod_cmp2000 284 -#define OBJ_id_mod_cmp2000 OBJ_id_pkix_mod,16L - -#define SN_info_access "authorityInfoAccess" -#define LN_info_access "Authority Information Access" -#define NID_info_access 177 -#define OBJ_info_access OBJ_id_pe,1L - -#define SN_biometricInfo "biometricInfo" -#define LN_biometricInfo "Biometric Info" -#define NID_biometricInfo 285 -#define OBJ_biometricInfo OBJ_id_pe,2L - -#define SN_qcStatements "qcStatements" -#define NID_qcStatements 286 -#define OBJ_qcStatements OBJ_id_pe,3L - -#define SN_ac_auditEntity "ac-auditEntity" -#define NID_ac_auditEntity 287 -#define OBJ_ac_auditEntity OBJ_id_pe,4L - -#define SN_ac_targeting "ac-targeting" -#define NID_ac_targeting 288 -#define OBJ_ac_targeting OBJ_id_pe,5L - -#define SN_aaControls "aaControls" -#define NID_aaControls 289 -#define OBJ_aaControls OBJ_id_pe,6L - -#define SN_sbgp_ipAddrBlock "sbgp-ipAddrBlock" -#define NID_sbgp_ipAddrBlock 290 -#define OBJ_sbgp_ipAddrBlock OBJ_id_pe,7L - -#define SN_sbgp_autonomousSysNum "sbgp-autonomousSysNum" -#define NID_sbgp_autonomousSysNum 291 -#define OBJ_sbgp_autonomousSysNum OBJ_id_pe,8L - -#define SN_sbgp_routerIdentifier "sbgp-routerIdentifier" -#define NID_sbgp_routerIdentifier 292 -#define OBJ_sbgp_routerIdentifier OBJ_id_pe,9L - -#define SN_ac_proxying "ac-proxying" -#define NID_ac_proxying 397 -#define OBJ_ac_proxying OBJ_id_pe,10L - -#define SN_sinfo_access "subjectInfoAccess" -#define LN_sinfo_access "Subject Information Access" -#define NID_sinfo_access 398 -#define OBJ_sinfo_access OBJ_id_pe,11L - -#define SN_proxyCertInfo "proxyCertInfo" -#define LN_proxyCertInfo "Proxy Certificate Information" -#define NID_proxyCertInfo 663 -#define OBJ_proxyCertInfo OBJ_id_pe,14L - -#define SN_id_qt_cps "id-qt-cps" -#define LN_id_qt_cps "Policy Qualifier CPS" -#define NID_id_qt_cps 164 -#define OBJ_id_qt_cps OBJ_id_qt,1L - -#define SN_id_qt_unotice "id-qt-unotice" -#define LN_id_qt_unotice "Policy Qualifier User Notice" -#define NID_id_qt_unotice 165 -#define OBJ_id_qt_unotice OBJ_id_qt,2L - -#define SN_textNotice "textNotice" -#define NID_textNotice 293 -#define OBJ_textNotice OBJ_id_qt,3L - -#define SN_server_auth "serverAuth" -#define LN_server_auth "TLS Web Server Authentication" -#define NID_server_auth 129 -#define OBJ_server_auth OBJ_id_kp,1L - -#define SN_client_auth "clientAuth" -#define LN_client_auth "TLS Web Client Authentication" -#define NID_client_auth 130 -#define OBJ_client_auth OBJ_id_kp,2L - -#define SN_code_sign "codeSigning" -#define LN_code_sign "Code Signing" -#define NID_code_sign 131 -#define OBJ_code_sign OBJ_id_kp,3L - -#define SN_email_protect "emailProtection" -#define LN_email_protect "E-mail Protection" -#define NID_email_protect 132 -#define OBJ_email_protect OBJ_id_kp,4L - -#define SN_ipsecEndSystem "ipsecEndSystem" -#define LN_ipsecEndSystem "IPSec End System" -#define NID_ipsecEndSystem 294 -#define OBJ_ipsecEndSystem OBJ_id_kp,5L - -#define SN_ipsecTunnel "ipsecTunnel" -#define LN_ipsecTunnel "IPSec Tunnel" -#define NID_ipsecTunnel 295 -#define OBJ_ipsecTunnel OBJ_id_kp,6L - -#define SN_ipsecUser "ipsecUser" -#define LN_ipsecUser "IPSec User" -#define NID_ipsecUser 296 -#define OBJ_ipsecUser OBJ_id_kp,7L - -#define SN_time_stamp "timeStamping" -#define LN_time_stamp "Time Stamping" -#define NID_time_stamp 133 -#define OBJ_time_stamp OBJ_id_kp,8L - -#define SN_OCSP_sign "OCSPSigning" -#define LN_OCSP_sign "OCSP Signing" -#define NID_OCSP_sign 180 -#define OBJ_OCSP_sign OBJ_id_kp,9L - -#define SN_dvcs "DVCS" -#define LN_dvcs "dvcs" -#define NID_dvcs 297 -#define OBJ_dvcs OBJ_id_kp,10L - -#define SN_id_it_caProtEncCert "id-it-caProtEncCert" -#define NID_id_it_caProtEncCert 298 -#define OBJ_id_it_caProtEncCert OBJ_id_it,1L - -#define SN_id_it_signKeyPairTypes "id-it-signKeyPairTypes" -#define NID_id_it_signKeyPairTypes 299 -#define OBJ_id_it_signKeyPairTypes OBJ_id_it,2L - -#define SN_id_it_encKeyPairTypes "id-it-encKeyPairTypes" -#define NID_id_it_encKeyPairTypes 300 -#define OBJ_id_it_encKeyPairTypes OBJ_id_it,3L - -#define SN_id_it_preferredSymmAlg "id-it-preferredSymmAlg" -#define NID_id_it_preferredSymmAlg 301 -#define OBJ_id_it_preferredSymmAlg OBJ_id_it,4L - -#define SN_id_it_caKeyUpdateInfo "id-it-caKeyUpdateInfo" -#define NID_id_it_caKeyUpdateInfo 302 -#define OBJ_id_it_caKeyUpdateInfo OBJ_id_it,5L - -#define SN_id_it_currentCRL "id-it-currentCRL" -#define NID_id_it_currentCRL 303 -#define OBJ_id_it_currentCRL OBJ_id_it,6L - -#define SN_id_it_unsupportedOIDs "id-it-unsupportedOIDs" -#define NID_id_it_unsupportedOIDs 304 -#define OBJ_id_it_unsupportedOIDs OBJ_id_it,7L - -#define SN_id_it_subscriptionRequest "id-it-subscriptionRequest" -#define NID_id_it_subscriptionRequest 305 -#define OBJ_id_it_subscriptionRequest OBJ_id_it,8L - -#define SN_id_it_subscriptionResponse "id-it-subscriptionResponse" -#define NID_id_it_subscriptionResponse 306 -#define OBJ_id_it_subscriptionResponse OBJ_id_it,9L - -#define SN_id_it_keyPairParamReq "id-it-keyPairParamReq" -#define NID_id_it_keyPairParamReq 307 -#define OBJ_id_it_keyPairParamReq OBJ_id_it,10L - -#define SN_id_it_keyPairParamRep "id-it-keyPairParamRep" -#define NID_id_it_keyPairParamRep 308 -#define OBJ_id_it_keyPairParamRep OBJ_id_it,11L - -#define SN_id_it_revPassphrase "id-it-revPassphrase" -#define NID_id_it_revPassphrase 309 -#define OBJ_id_it_revPassphrase OBJ_id_it,12L - -#define SN_id_it_implicitConfirm "id-it-implicitConfirm" -#define NID_id_it_implicitConfirm 310 -#define OBJ_id_it_implicitConfirm OBJ_id_it,13L - -#define SN_id_it_confirmWaitTime "id-it-confirmWaitTime" -#define NID_id_it_confirmWaitTime 311 -#define OBJ_id_it_confirmWaitTime OBJ_id_it,14L - -#define SN_id_it_origPKIMessage "id-it-origPKIMessage" -#define NID_id_it_origPKIMessage 312 -#define OBJ_id_it_origPKIMessage OBJ_id_it,15L - -#define SN_id_it_suppLangTags "id-it-suppLangTags" -#define NID_id_it_suppLangTags 784 -#define OBJ_id_it_suppLangTags OBJ_id_it,16L - -#define SN_id_regCtrl "id-regCtrl" -#define NID_id_regCtrl 313 -#define OBJ_id_regCtrl OBJ_id_pkip,1L - -#define SN_id_regInfo "id-regInfo" -#define NID_id_regInfo 314 -#define OBJ_id_regInfo OBJ_id_pkip,2L - -#define SN_id_regCtrl_regToken "id-regCtrl-regToken" -#define NID_id_regCtrl_regToken 315 -#define OBJ_id_regCtrl_regToken OBJ_id_regCtrl,1L - -#define SN_id_regCtrl_authenticator "id-regCtrl-authenticator" -#define NID_id_regCtrl_authenticator 316 -#define OBJ_id_regCtrl_authenticator OBJ_id_regCtrl,2L - -#define SN_id_regCtrl_pkiPublicationInfo "id-regCtrl-pkiPublicationInfo" -#define NID_id_regCtrl_pkiPublicationInfo 317 -#define OBJ_id_regCtrl_pkiPublicationInfo OBJ_id_regCtrl,3L - -#define SN_id_regCtrl_pkiArchiveOptions "id-regCtrl-pkiArchiveOptions" -#define NID_id_regCtrl_pkiArchiveOptions 318 -#define OBJ_id_regCtrl_pkiArchiveOptions OBJ_id_regCtrl,4L - -#define SN_id_regCtrl_oldCertID "id-regCtrl-oldCertID" -#define NID_id_regCtrl_oldCertID 319 -#define OBJ_id_regCtrl_oldCertID OBJ_id_regCtrl,5L - -#define SN_id_regCtrl_protocolEncrKey "id-regCtrl-protocolEncrKey" -#define NID_id_regCtrl_protocolEncrKey 320 -#define OBJ_id_regCtrl_protocolEncrKey OBJ_id_regCtrl,6L - -#define SN_id_regInfo_utf8Pairs "id-regInfo-utf8Pairs" -#define NID_id_regInfo_utf8Pairs 321 -#define OBJ_id_regInfo_utf8Pairs OBJ_id_regInfo,1L - -#define SN_id_regInfo_certReq "id-regInfo-certReq" -#define NID_id_regInfo_certReq 322 -#define OBJ_id_regInfo_certReq OBJ_id_regInfo,2L - -#define SN_id_alg_des40 "id-alg-des40" -#define NID_id_alg_des40 323 -#define OBJ_id_alg_des40 OBJ_id_alg,1L - -#define SN_id_alg_noSignature "id-alg-noSignature" -#define NID_id_alg_noSignature 324 -#define OBJ_id_alg_noSignature OBJ_id_alg,2L - -#define SN_id_alg_dh_sig_hmac_sha1 "id-alg-dh-sig-hmac-sha1" -#define NID_id_alg_dh_sig_hmac_sha1 325 -#define OBJ_id_alg_dh_sig_hmac_sha1 OBJ_id_alg,3L - -#define SN_id_alg_dh_pop "id-alg-dh-pop" -#define NID_id_alg_dh_pop 326 -#define OBJ_id_alg_dh_pop OBJ_id_alg,4L - -#define SN_id_cmc_statusInfo "id-cmc-statusInfo" -#define NID_id_cmc_statusInfo 327 -#define OBJ_id_cmc_statusInfo OBJ_id_cmc,1L - -#define SN_id_cmc_identification "id-cmc-identification" -#define NID_id_cmc_identification 328 -#define OBJ_id_cmc_identification OBJ_id_cmc,2L - -#define SN_id_cmc_identityProof "id-cmc-identityProof" -#define NID_id_cmc_identityProof 329 -#define OBJ_id_cmc_identityProof OBJ_id_cmc,3L - -#define SN_id_cmc_dataReturn "id-cmc-dataReturn" -#define NID_id_cmc_dataReturn 330 -#define OBJ_id_cmc_dataReturn OBJ_id_cmc,4L - -#define SN_id_cmc_transactionId "id-cmc-transactionId" -#define NID_id_cmc_transactionId 331 -#define OBJ_id_cmc_transactionId OBJ_id_cmc,5L - -#define SN_id_cmc_senderNonce "id-cmc-senderNonce" -#define NID_id_cmc_senderNonce 332 -#define OBJ_id_cmc_senderNonce OBJ_id_cmc,6L - -#define SN_id_cmc_recipientNonce "id-cmc-recipientNonce" -#define NID_id_cmc_recipientNonce 333 -#define OBJ_id_cmc_recipientNonce OBJ_id_cmc,7L - -#define SN_id_cmc_addExtensions "id-cmc-addExtensions" -#define NID_id_cmc_addExtensions 334 -#define OBJ_id_cmc_addExtensions OBJ_id_cmc,8L - -#define SN_id_cmc_encryptedPOP "id-cmc-encryptedPOP" -#define NID_id_cmc_encryptedPOP 335 -#define OBJ_id_cmc_encryptedPOP OBJ_id_cmc,9L - -#define SN_id_cmc_decryptedPOP "id-cmc-decryptedPOP" -#define NID_id_cmc_decryptedPOP 336 -#define OBJ_id_cmc_decryptedPOP OBJ_id_cmc,10L - -#define SN_id_cmc_lraPOPWitness "id-cmc-lraPOPWitness" -#define NID_id_cmc_lraPOPWitness 337 -#define OBJ_id_cmc_lraPOPWitness OBJ_id_cmc,11L - -#define SN_id_cmc_getCert "id-cmc-getCert" -#define NID_id_cmc_getCert 338 -#define OBJ_id_cmc_getCert OBJ_id_cmc,15L - -#define SN_id_cmc_getCRL "id-cmc-getCRL" -#define NID_id_cmc_getCRL 339 -#define OBJ_id_cmc_getCRL OBJ_id_cmc,16L - -#define SN_id_cmc_revokeRequest "id-cmc-revokeRequest" -#define NID_id_cmc_revokeRequest 340 -#define OBJ_id_cmc_revokeRequest OBJ_id_cmc,17L - -#define SN_id_cmc_regInfo "id-cmc-regInfo" -#define NID_id_cmc_regInfo 341 -#define OBJ_id_cmc_regInfo OBJ_id_cmc,18L - -#define SN_id_cmc_responseInfo "id-cmc-responseInfo" -#define NID_id_cmc_responseInfo 342 -#define OBJ_id_cmc_responseInfo OBJ_id_cmc,19L - -#define SN_id_cmc_queryPending "id-cmc-queryPending" -#define NID_id_cmc_queryPending 343 -#define OBJ_id_cmc_queryPending OBJ_id_cmc,21L - -#define SN_id_cmc_popLinkRandom "id-cmc-popLinkRandom" -#define NID_id_cmc_popLinkRandom 344 -#define OBJ_id_cmc_popLinkRandom OBJ_id_cmc,22L - -#define SN_id_cmc_popLinkWitness "id-cmc-popLinkWitness" -#define NID_id_cmc_popLinkWitness 345 -#define OBJ_id_cmc_popLinkWitness OBJ_id_cmc,23L - -#define SN_id_cmc_confirmCertAcceptance "id-cmc-confirmCertAcceptance" -#define NID_id_cmc_confirmCertAcceptance 346 -#define OBJ_id_cmc_confirmCertAcceptance OBJ_id_cmc,24L - -#define SN_id_on_personalData "id-on-personalData" -#define NID_id_on_personalData 347 -#define OBJ_id_on_personalData OBJ_id_on,1L - -#define SN_id_on_permanentIdentifier "id-on-permanentIdentifier" -#define LN_id_on_permanentIdentifier "Permanent Identifier" -#define NID_id_on_permanentIdentifier 858 -#define OBJ_id_on_permanentIdentifier OBJ_id_on,3L - -#define SN_id_pda_dateOfBirth "id-pda-dateOfBirth" -#define NID_id_pda_dateOfBirth 348 -#define OBJ_id_pda_dateOfBirth OBJ_id_pda,1L - -#define SN_id_pda_placeOfBirth "id-pda-placeOfBirth" -#define NID_id_pda_placeOfBirth 349 -#define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L - -#define SN_id_pda_gender "id-pda-gender" -#define NID_id_pda_gender 351 -#define OBJ_id_pda_gender OBJ_id_pda,3L - -#define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" -#define NID_id_pda_countryOfCitizenship 352 -#define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L - -#define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" -#define NID_id_pda_countryOfResidence 353 -#define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L - -#define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" -#define NID_id_aca_authenticationInfo 354 -#define OBJ_id_aca_authenticationInfo OBJ_id_aca,1L - -#define SN_id_aca_accessIdentity "id-aca-accessIdentity" -#define NID_id_aca_accessIdentity 355 -#define OBJ_id_aca_accessIdentity OBJ_id_aca,2L - -#define SN_id_aca_chargingIdentity "id-aca-chargingIdentity" -#define NID_id_aca_chargingIdentity 356 -#define OBJ_id_aca_chargingIdentity OBJ_id_aca,3L - -#define SN_id_aca_group "id-aca-group" -#define NID_id_aca_group 357 -#define OBJ_id_aca_group OBJ_id_aca,4L - -#define SN_id_aca_role "id-aca-role" -#define NID_id_aca_role 358 -#define OBJ_id_aca_role OBJ_id_aca,5L - -#define SN_id_aca_encAttrs "id-aca-encAttrs" -#define NID_id_aca_encAttrs 399 -#define OBJ_id_aca_encAttrs OBJ_id_aca,6L - -#define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" -#define NID_id_qcs_pkixQCSyntax_v1 359 -#define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L - -#define SN_id_cct_crs "id-cct-crs" -#define NID_id_cct_crs 360 -#define OBJ_id_cct_crs OBJ_id_cct,1L - -#define SN_id_cct_PKIData "id-cct-PKIData" -#define NID_id_cct_PKIData 361 -#define OBJ_id_cct_PKIData OBJ_id_cct,2L - -#define SN_id_cct_PKIResponse "id-cct-PKIResponse" -#define NID_id_cct_PKIResponse 362 -#define OBJ_id_cct_PKIResponse OBJ_id_cct,3L - -#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage" -#define LN_id_ppl_anyLanguage "Any language" -#define NID_id_ppl_anyLanguage 664 -#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L - -#define SN_id_ppl_inheritAll "id-ppl-inheritAll" -#define LN_id_ppl_inheritAll "Inherit all" -#define NID_id_ppl_inheritAll 665 -#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L - -#define SN_Independent "id-ppl-independent" -#define LN_Independent "Independent" -#define NID_Independent 667 -#define OBJ_Independent OBJ_id_ppl,2L - -#define SN_ad_OCSP "OCSP" -#define LN_ad_OCSP "OCSP" -#define NID_ad_OCSP 178 -#define OBJ_ad_OCSP OBJ_id_ad,1L - -#define SN_ad_ca_issuers "caIssuers" -#define LN_ad_ca_issuers "CA Issuers" -#define NID_ad_ca_issuers 179 -#define OBJ_ad_ca_issuers OBJ_id_ad,2L - -#define SN_ad_timeStamping "ad_timestamping" -#define LN_ad_timeStamping "AD Time Stamping" -#define NID_ad_timeStamping 363 -#define OBJ_ad_timeStamping OBJ_id_ad,3L - -#define SN_ad_dvcs "AD_DVCS" -#define LN_ad_dvcs "ad dvcs" -#define NID_ad_dvcs 364 -#define OBJ_ad_dvcs OBJ_id_ad,4L - -#define SN_caRepository "caRepository" -#define LN_caRepository "CA Repository" -#define NID_caRepository 785 -#define OBJ_caRepository OBJ_id_ad,5L - -#define OBJ_id_pkix_OCSP OBJ_ad_OCSP - -#define SN_id_pkix_OCSP_basic "basicOCSPResponse" -#define LN_id_pkix_OCSP_basic "Basic OCSP Response" -#define NID_id_pkix_OCSP_basic 365 -#define OBJ_id_pkix_OCSP_basic OBJ_id_pkix_OCSP,1L - -#define SN_id_pkix_OCSP_Nonce "Nonce" -#define LN_id_pkix_OCSP_Nonce "OCSP Nonce" -#define NID_id_pkix_OCSP_Nonce 366 -#define OBJ_id_pkix_OCSP_Nonce OBJ_id_pkix_OCSP,2L - -#define SN_id_pkix_OCSP_CrlID "CrlID" -#define LN_id_pkix_OCSP_CrlID "OCSP CRL ID" -#define NID_id_pkix_OCSP_CrlID 367 -#define OBJ_id_pkix_OCSP_CrlID OBJ_id_pkix_OCSP,3L - -#define SN_id_pkix_OCSP_acceptableResponses "acceptableResponses" -#define LN_id_pkix_OCSP_acceptableResponses "Acceptable OCSP Responses" -#define NID_id_pkix_OCSP_acceptableResponses 368 -#define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L - -#define SN_id_pkix_OCSP_noCheck "noCheck" -#define LN_id_pkix_OCSP_noCheck "OCSP No Check" -#define NID_id_pkix_OCSP_noCheck 369 -#define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L - -#define SN_id_pkix_OCSP_archiveCutoff "archiveCutoff" -#define LN_id_pkix_OCSP_archiveCutoff "OCSP Archive Cutoff" -#define NID_id_pkix_OCSP_archiveCutoff 370 -#define OBJ_id_pkix_OCSP_archiveCutoff OBJ_id_pkix_OCSP,6L - -#define SN_id_pkix_OCSP_serviceLocator "serviceLocator" -#define LN_id_pkix_OCSP_serviceLocator "OCSP Service Locator" -#define NID_id_pkix_OCSP_serviceLocator 371 -#define OBJ_id_pkix_OCSP_serviceLocator OBJ_id_pkix_OCSP,7L - -#define SN_id_pkix_OCSP_extendedStatus "extendedStatus" -#define LN_id_pkix_OCSP_extendedStatus "Extended OCSP Status" -#define NID_id_pkix_OCSP_extendedStatus 372 -#define OBJ_id_pkix_OCSP_extendedStatus OBJ_id_pkix_OCSP,8L - -#define SN_id_pkix_OCSP_valid "valid" -#define NID_id_pkix_OCSP_valid 373 -#define OBJ_id_pkix_OCSP_valid OBJ_id_pkix_OCSP,9L - -#define SN_id_pkix_OCSP_path "path" -#define NID_id_pkix_OCSP_path 374 -#define OBJ_id_pkix_OCSP_path OBJ_id_pkix_OCSP,10L - -#define SN_id_pkix_OCSP_trustRoot "trustRoot" -#define LN_id_pkix_OCSP_trustRoot "Trust Root" -#define NID_id_pkix_OCSP_trustRoot 375 -#define OBJ_id_pkix_OCSP_trustRoot OBJ_id_pkix_OCSP,11L - -#define SN_algorithm "algorithm" -#define LN_algorithm "algorithm" -#define NID_algorithm 376 -#define OBJ_algorithm 1L,3L,14L,3L,2L - -#define SN_md5WithRSA "RSA-NP-MD5" -#define LN_md5WithRSA "md5WithRSA" -#define NID_md5WithRSA 104 -#define OBJ_md5WithRSA OBJ_algorithm,3L - -#define SN_des_ecb "DES-ECB" -#define LN_des_ecb "des-ecb" -#define NID_des_ecb 29 -#define OBJ_des_ecb OBJ_algorithm,6L - -#define SN_des_cbc "DES-CBC" -#define LN_des_cbc "des-cbc" -#define NID_des_cbc 31 -#define OBJ_des_cbc OBJ_algorithm,7L - -#define SN_des_ofb64 "DES-OFB" -#define LN_des_ofb64 "des-ofb" -#define NID_des_ofb64 45 -#define OBJ_des_ofb64 OBJ_algorithm,8L - -#define SN_des_cfb64 "DES-CFB" -#define LN_des_cfb64 "des-cfb" -#define NID_des_cfb64 30 -#define OBJ_des_cfb64 OBJ_algorithm,9L - -#define SN_rsaSignature "rsaSignature" -#define NID_rsaSignature 377 -#define OBJ_rsaSignature OBJ_algorithm,11L - -#define SN_dsa_2 "DSA-old" -#define LN_dsa_2 "dsaEncryption-old" -#define NID_dsa_2 67 -#define OBJ_dsa_2 OBJ_algorithm,12L - -#define SN_dsaWithSHA "DSA-SHA" -#define LN_dsaWithSHA "dsaWithSHA" -#define NID_dsaWithSHA 66 -#define OBJ_dsaWithSHA OBJ_algorithm,13L - -#define SN_shaWithRSAEncryption "RSA-SHA" -#define LN_shaWithRSAEncryption "shaWithRSAEncryption" -#define NID_shaWithRSAEncryption 42 -#define OBJ_shaWithRSAEncryption OBJ_algorithm,15L - -#define SN_des_ede_ecb "DES-EDE" -#define LN_des_ede_ecb "des-ede" -#define NID_des_ede_ecb 32 -#define OBJ_des_ede_ecb OBJ_algorithm,17L - -#define SN_des_ede3_ecb "DES-EDE3" -#define LN_des_ede3_ecb "des-ede3" -#define NID_des_ede3_ecb 33 - -#define SN_des_ede_cbc "DES-EDE-CBC" -#define LN_des_ede_cbc "des-ede-cbc" -#define NID_des_ede_cbc 43 - -#define SN_des_ede_cfb64 "DES-EDE-CFB" -#define LN_des_ede_cfb64 "des-ede-cfb" -#define NID_des_ede_cfb64 60 - -#define SN_des_ede3_cfb64 "DES-EDE3-CFB" -#define LN_des_ede3_cfb64 "des-ede3-cfb" -#define NID_des_ede3_cfb64 61 - -#define SN_des_ede_ofb64 "DES-EDE-OFB" -#define LN_des_ede_ofb64 "des-ede-ofb" -#define NID_des_ede_ofb64 62 - -#define SN_des_ede3_ofb64 "DES-EDE3-OFB" -#define LN_des_ede3_ofb64 "des-ede3-ofb" -#define NID_des_ede3_ofb64 63 - -#define SN_desx_cbc "DESX-CBC" -#define LN_desx_cbc "desx-cbc" -#define NID_desx_cbc 80 - -#define SN_sha "SHA" -#define LN_sha "sha" -#define NID_sha 41 -#define OBJ_sha OBJ_algorithm,18L - -#define SN_sha1 "SHA1" -#define LN_sha1 "sha1" -#define NID_sha1 64 -#define OBJ_sha1 OBJ_algorithm,26L - -#define SN_dsaWithSHA1_2 "DSA-SHA1-old" -#define LN_dsaWithSHA1_2 "dsaWithSHA1-old" -#define NID_dsaWithSHA1_2 70 -#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L - -#define SN_sha1WithRSA "RSA-SHA1-2" -#define LN_sha1WithRSA "sha1WithRSA" -#define NID_sha1WithRSA 115 -#define OBJ_sha1WithRSA OBJ_algorithm,29L - -#define SN_ripemd160 "RIPEMD160" -#define LN_ripemd160 "ripemd160" -#define NID_ripemd160 117 -#define OBJ_ripemd160 1L,3L,36L,3L,2L,1L - -#define SN_ripemd160WithRSA "RSA-RIPEMD160" -#define LN_ripemd160WithRSA "ripemd160WithRSA" -#define NID_ripemd160WithRSA 119 -#define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L - -#define SN_sxnet "SXNetID" -#define LN_sxnet "Strong Extranet ID" -#define NID_sxnet 143 -#define OBJ_sxnet 1L,3L,101L,1L,4L,1L - -#define SN_X500 "X500" -#define LN_X500 "directory services (X.500)" -#define NID_X500 11 -#define OBJ_X500 2L,5L - -#define SN_X509 "X509" -#define NID_X509 12 -#define OBJ_X509 OBJ_X500,4L - -#define SN_commonName "CN" -#define LN_commonName "commonName" -#define NID_commonName 13 -#define OBJ_commonName OBJ_X509,3L - -#define SN_surname "SN" -#define LN_surname "surname" -#define NID_surname 100 -#define OBJ_surname OBJ_X509,4L - -#define LN_serialNumber "serialNumber" -#define NID_serialNumber 105 -#define OBJ_serialNumber OBJ_X509,5L - -#define SN_countryName "C" -#define LN_countryName "countryName" -#define NID_countryName 14 -#define OBJ_countryName OBJ_X509,6L - -#define SN_localityName "L" -#define LN_localityName "localityName" -#define NID_localityName 15 -#define OBJ_localityName OBJ_X509,7L - -#define SN_stateOrProvinceName "ST" -#define LN_stateOrProvinceName "stateOrProvinceName" -#define NID_stateOrProvinceName 16 -#define OBJ_stateOrProvinceName OBJ_X509,8L - -#define SN_streetAddress "street" -#define LN_streetAddress "streetAddress" -#define NID_streetAddress 660 -#define OBJ_streetAddress OBJ_X509,9L - -#define SN_organizationName "O" -#define LN_organizationName "organizationName" -#define NID_organizationName 17 -#define OBJ_organizationName OBJ_X509,10L - -#define SN_organizationalUnitName "OU" -#define LN_organizationalUnitName "organizationalUnitName" -#define NID_organizationalUnitName 18 -#define OBJ_organizationalUnitName OBJ_X509,11L - -#define SN_title "title" -#define LN_title "title" -#define NID_title 106 -#define OBJ_title OBJ_X509,12L - -#define LN_description "description" -#define NID_description 107 -#define OBJ_description OBJ_X509,13L - -#define LN_searchGuide "searchGuide" -#define NID_searchGuide 859 -#define OBJ_searchGuide OBJ_X509,14L - -#define LN_businessCategory "businessCategory" -#define NID_businessCategory 860 -#define OBJ_businessCategory OBJ_X509,15L - -#define LN_postalAddress "postalAddress" -#define NID_postalAddress 861 -#define OBJ_postalAddress OBJ_X509,16L - -#define LN_postalCode "postalCode" -#define NID_postalCode 661 -#define OBJ_postalCode OBJ_X509,17L - -#define LN_postOfficeBox "postOfficeBox" -#define NID_postOfficeBox 862 -#define OBJ_postOfficeBox OBJ_X509,18L - -#define LN_physicalDeliveryOfficeName "physicalDeliveryOfficeName" -#define NID_physicalDeliveryOfficeName 863 -#define OBJ_physicalDeliveryOfficeName OBJ_X509,19L - -#define LN_telephoneNumber "telephoneNumber" -#define NID_telephoneNumber 864 -#define OBJ_telephoneNumber OBJ_X509,20L - -#define LN_telexNumber "telexNumber" -#define NID_telexNumber 865 -#define OBJ_telexNumber OBJ_X509,21L - -#define LN_teletexTerminalIdentifier "teletexTerminalIdentifier" -#define NID_teletexTerminalIdentifier 866 -#define OBJ_teletexTerminalIdentifier OBJ_X509,22L - -#define LN_facsimileTelephoneNumber "facsimileTelephoneNumber" -#define NID_facsimileTelephoneNumber 867 -#define OBJ_facsimileTelephoneNumber OBJ_X509,23L - -#define LN_x121Address "x121Address" -#define NID_x121Address 868 -#define OBJ_x121Address OBJ_X509,24L - -#define LN_internationaliSDNNumber "internationaliSDNNumber" -#define NID_internationaliSDNNumber 869 -#define OBJ_internationaliSDNNumber OBJ_X509,25L - -#define LN_registeredAddress "registeredAddress" -#define NID_registeredAddress 870 -#define OBJ_registeredAddress OBJ_X509,26L - -#define LN_destinationIndicator "destinationIndicator" -#define NID_destinationIndicator 871 -#define OBJ_destinationIndicator OBJ_X509,27L - -#define LN_preferredDeliveryMethod "preferredDeliveryMethod" -#define NID_preferredDeliveryMethod 872 -#define OBJ_preferredDeliveryMethod OBJ_X509,28L - -#define LN_presentationAddress "presentationAddress" -#define NID_presentationAddress 873 -#define OBJ_presentationAddress OBJ_X509,29L - -#define LN_supportedApplicationContext "supportedApplicationContext" -#define NID_supportedApplicationContext 874 -#define OBJ_supportedApplicationContext OBJ_X509,30L - -#define SN_member "member" -#define NID_member 875 -#define OBJ_member OBJ_X509,31L - -#define SN_owner "owner" -#define NID_owner 876 -#define OBJ_owner OBJ_X509,32L - -#define LN_roleOccupant "roleOccupant" -#define NID_roleOccupant 877 -#define OBJ_roleOccupant OBJ_X509,33L - -#define SN_seeAlso "seeAlso" -#define NID_seeAlso 878 -#define OBJ_seeAlso OBJ_X509,34L - -#define LN_userPassword "userPassword" -#define NID_userPassword 879 -#define OBJ_userPassword OBJ_X509,35L - -#define LN_userCertificate "userCertificate" -#define NID_userCertificate 880 -#define OBJ_userCertificate OBJ_X509,36L - -#define LN_cACertificate "cACertificate" -#define NID_cACertificate 881 -#define OBJ_cACertificate OBJ_X509,37L - -#define LN_authorityRevocationList "authorityRevocationList" -#define NID_authorityRevocationList 882 -#define OBJ_authorityRevocationList OBJ_X509,38L - -#define LN_certificateRevocationList "certificateRevocationList" -#define NID_certificateRevocationList 883 -#define OBJ_certificateRevocationList OBJ_X509,39L - -#define LN_crossCertificatePair "crossCertificatePair" -#define NID_crossCertificatePair 884 -#define OBJ_crossCertificatePair OBJ_X509,40L - -#define SN_name "name" -#define LN_name "name" -#define NID_name 173 -#define OBJ_name OBJ_X509,41L - -#define SN_givenName "GN" -#define LN_givenName "givenName" -#define NID_givenName 99 -#define OBJ_givenName OBJ_X509,42L - -#define SN_initials "initials" -#define LN_initials "initials" -#define NID_initials 101 -#define OBJ_initials OBJ_X509,43L - -#define LN_generationQualifier "generationQualifier" -#define NID_generationQualifier 509 -#define OBJ_generationQualifier OBJ_X509,44L - -#define LN_x500UniqueIdentifier "x500UniqueIdentifier" -#define NID_x500UniqueIdentifier 503 -#define OBJ_x500UniqueIdentifier OBJ_X509,45L - -#define SN_dnQualifier "dnQualifier" -#define LN_dnQualifier "dnQualifier" -#define NID_dnQualifier 174 -#define OBJ_dnQualifier OBJ_X509,46L - -#define LN_enhancedSearchGuide "enhancedSearchGuide" -#define NID_enhancedSearchGuide 885 -#define OBJ_enhancedSearchGuide OBJ_X509,47L - -#define LN_protocolInformation "protocolInformation" -#define NID_protocolInformation 886 -#define OBJ_protocolInformation OBJ_X509,48L - -#define LN_distinguishedName "distinguishedName" -#define NID_distinguishedName 887 -#define OBJ_distinguishedName OBJ_X509,49L - -#define LN_uniqueMember "uniqueMember" -#define NID_uniqueMember 888 -#define OBJ_uniqueMember OBJ_X509,50L - -#define LN_houseIdentifier "houseIdentifier" -#define NID_houseIdentifier 889 -#define OBJ_houseIdentifier OBJ_X509,51L - -#define LN_supportedAlgorithms "supportedAlgorithms" -#define NID_supportedAlgorithms 890 -#define OBJ_supportedAlgorithms OBJ_X509,52L - -#define LN_deltaRevocationList "deltaRevocationList" -#define NID_deltaRevocationList 891 -#define OBJ_deltaRevocationList OBJ_X509,53L - -#define SN_dmdName "dmdName" -#define NID_dmdName 892 -#define OBJ_dmdName OBJ_X509,54L - -#define LN_pseudonym "pseudonym" -#define NID_pseudonym 510 -#define OBJ_pseudonym OBJ_X509,65L - -#define SN_role "role" -#define LN_role "role" -#define NID_role 400 -#define OBJ_role OBJ_X509,72L - -#define SN_X500algorithms "X500algorithms" -#define LN_X500algorithms "directory services - algorithms" -#define NID_X500algorithms 378 -#define OBJ_X500algorithms OBJ_X500,8L - -#define SN_rsa "RSA" -#define LN_rsa "rsa" -#define NID_rsa 19 -#define OBJ_rsa OBJ_X500algorithms,1L,1L - -#define SN_mdc2WithRSA "RSA-MDC2" -#define LN_mdc2WithRSA "mdc2WithRSA" -#define NID_mdc2WithRSA 96 -#define OBJ_mdc2WithRSA OBJ_X500algorithms,3L,100L - -#define SN_mdc2 "MDC2" -#define LN_mdc2 "mdc2" -#define NID_mdc2 95 -#define OBJ_mdc2 OBJ_X500algorithms,3L,101L - -#define SN_id_ce "id-ce" -#define NID_id_ce 81 -#define OBJ_id_ce OBJ_X500,29L - -#define SN_subject_directory_attributes "subjectDirectoryAttributes" -#define LN_subject_directory_attributes "X509v3 Subject Directory Attributes" -#define NID_subject_directory_attributes 769 -#define OBJ_subject_directory_attributes OBJ_id_ce,9L - -#define SN_subject_key_identifier "subjectKeyIdentifier" -#define LN_subject_key_identifier "X509v3 Subject Key Identifier" -#define NID_subject_key_identifier 82 -#define OBJ_subject_key_identifier OBJ_id_ce,14L - -#define SN_key_usage "keyUsage" -#define LN_key_usage "X509v3 Key Usage" -#define NID_key_usage 83 -#define OBJ_key_usage OBJ_id_ce,15L - -#define SN_private_key_usage_period "privateKeyUsagePeriod" -#define LN_private_key_usage_period "X509v3 Private Key Usage Period" -#define NID_private_key_usage_period 84 -#define OBJ_private_key_usage_period OBJ_id_ce,16L - -#define SN_subject_alt_name "subjectAltName" -#define LN_subject_alt_name "X509v3 Subject Alternative Name" -#define NID_subject_alt_name 85 -#define OBJ_subject_alt_name OBJ_id_ce,17L - -#define SN_issuer_alt_name "issuerAltName" -#define LN_issuer_alt_name "X509v3 Issuer Alternative Name" -#define NID_issuer_alt_name 86 -#define OBJ_issuer_alt_name OBJ_id_ce,18L - -#define SN_basic_constraints "basicConstraints" -#define LN_basic_constraints "X509v3 Basic Constraints" -#define NID_basic_constraints 87 -#define OBJ_basic_constraints OBJ_id_ce,19L - -#define SN_crl_number "crlNumber" -#define LN_crl_number "X509v3 CRL Number" -#define NID_crl_number 88 -#define OBJ_crl_number OBJ_id_ce,20L - -#define SN_crl_reason "CRLReason" -#define LN_crl_reason "X509v3 CRL Reason Code" -#define NID_crl_reason 141 -#define OBJ_crl_reason OBJ_id_ce,21L - -#define SN_invalidity_date "invalidityDate" -#define LN_invalidity_date "Invalidity Date" -#define NID_invalidity_date 142 -#define OBJ_invalidity_date OBJ_id_ce,24L - -#define SN_delta_crl "deltaCRL" -#define LN_delta_crl "X509v3 Delta CRL Indicator" -#define NID_delta_crl 140 -#define OBJ_delta_crl OBJ_id_ce,27L - -#define SN_issuing_distribution_point "issuingDistributionPoint" -#define LN_issuing_distribution_point "X509v3 Issuing Distrubution Point" -#define NID_issuing_distribution_point 770 -#define OBJ_issuing_distribution_point OBJ_id_ce,28L - -#define SN_certificate_issuer "certificateIssuer" -#define LN_certificate_issuer "X509v3 Certificate Issuer" -#define NID_certificate_issuer 771 -#define OBJ_certificate_issuer OBJ_id_ce,29L - -#define SN_name_constraints "nameConstraints" -#define LN_name_constraints "X509v3 Name Constraints" -#define NID_name_constraints 666 -#define OBJ_name_constraints OBJ_id_ce,30L - -#define SN_crl_distribution_points "crlDistributionPoints" -#define LN_crl_distribution_points "X509v3 CRL Distribution Points" -#define NID_crl_distribution_points 103 -#define OBJ_crl_distribution_points OBJ_id_ce,31L - -#define SN_certificate_policies "certificatePolicies" -#define LN_certificate_policies "X509v3 Certificate Policies" -#define NID_certificate_policies 89 -#define OBJ_certificate_policies OBJ_id_ce,32L - -#define SN_any_policy "anyPolicy" -#define LN_any_policy "X509v3 Any Policy" -#define NID_any_policy 746 -#define OBJ_any_policy OBJ_certificate_policies,0L - -#define SN_policy_mappings "policyMappings" -#define LN_policy_mappings "X509v3 Policy Mappings" -#define NID_policy_mappings 747 -#define OBJ_policy_mappings OBJ_id_ce,33L - -#define SN_authority_key_identifier "authorityKeyIdentifier" -#define LN_authority_key_identifier "X509v3 Authority Key Identifier" -#define NID_authority_key_identifier 90 -#define OBJ_authority_key_identifier OBJ_id_ce,35L - -#define SN_policy_constraints "policyConstraints" -#define LN_policy_constraints "X509v3 Policy Constraints" -#define NID_policy_constraints 401 -#define OBJ_policy_constraints OBJ_id_ce,36L - -#define SN_ext_key_usage "extendedKeyUsage" -#define LN_ext_key_usage "X509v3 Extended Key Usage" -#define NID_ext_key_usage 126 -#define OBJ_ext_key_usage OBJ_id_ce,37L - -#define SN_freshest_crl "freshestCRL" -#define LN_freshest_crl "X509v3 Freshest CRL" -#define NID_freshest_crl 857 -#define OBJ_freshest_crl OBJ_id_ce,46L - -#define SN_inhibit_any_policy "inhibitAnyPolicy" -#define LN_inhibit_any_policy "X509v3 Inhibit Any Policy" -#define NID_inhibit_any_policy 748 -#define OBJ_inhibit_any_policy OBJ_id_ce,54L - -#define SN_target_information "targetInformation" -#define LN_target_information "X509v3 AC Targeting" -#define NID_target_information 402 -#define OBJ_target_information OBJ_id_ce,55L - -#define SN_no_rev_avail "noRevAvail" -#define LN_no_rev_avail "X509v3 No Revocation Available" -#define NID_no_rev_avail 403 -#define OBJ_no_rev_avail OBJ_id_ce,56L - -#define SN_anyExtendedKeyUsage "anyExtendedKeyUsage" -#define LN_anyExtendedKeyUsage "Any Extended Key Usage" -#define NID_anyExtendedKeyUsage 910 -#define OBJ_anyExtendedKeyUsage OBJ_ext_key_usage,0L - -#define SN_netscape "Netscape" -#define LN_netscape "Netscape Communications Corp." -#define NID_netscape 57 -#define OBJ_netscape 2L,16L,840L,1L,113730L - -#define SN_netscape_cert_extension "nsCertExt" -#define LN_netscape_cert_extension "Netscape Certificate Extension" -#define NID_netscape_cert_extension 58 -#define OBJ_netscape_cert_extension OBJ_netscape,1L - -#define SN_netscape_data_type "nsDataType" -#define LN_netscape_data_type "Netscape Data Type" -#define NID_netscape_data_type 59 -#define OBJ_netscape_data_type OBJ_netscape,2L - -#define SN_netscape_cert_type "nsCertType" -#define LN_netscape_cert_type "Netscape Cert Type" -#define NID_netscape_cert_type 71 -#define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L - -#define SN_netscape_base_url "nsBaseUrl" -#define LN_netscape_base_url "Netscape Base Url" -#define NID_netscape_base_url 72 -#define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L - -#define SN_netscape_revocation_url "nsRevocationUrl" -#define LN_netscape_revocation_url "Netscape Revocation Url" -#define NID_netscape_revocation_url 73 -#define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L - -#define SN_netscape_ca_revocation_url "nsCaRevocationUrl" -#define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" -#define NID_netscape_ca_revocation_url 74 -#define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L - -#define SN_netscape_renewal_url "nsRenewalUrl" -#define LN_netscape_renewal_url "Netscape Renewal Url" -#define NID_netscape_renewal_url 75 -#define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L - -#define SN_netscape_ca_policy_url "nsCaPolicyUrl" -#define LN_netscape_ca_policy_url "Netscape CA Policy Url" -#define NID_netscape_ca_policy_url 76 -#define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L - -#define SN_netscape_ssl_server_name "nsSslServerName" -#define LN_netscape_ssl_server_name "Netscape SSL Server Name" -#define NID_netscape_ssl_server_name 77 -#define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L - -#define SN_netscape_comment "nsComment" -#define LN_netscape_comment "Netscape Comment" -#define NID_netscape_comment 78 -#define OBJ_netscape_comment OBJ_netscape_cert_extension,13L - -#define SN_netscape_cert_sequence "nsCertSequence" -#define LN_netscape_cert_sequence "Netscape Certificate Sequence" -#define NID_netscape_cert_sequence 79 -#define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L - -#define SN_ns_sgc "nsSGC" -#define LN_ns_sgc "Netscape Server Gated Crypto" -#define NID_ns_sgc 139 -#define OBJ_ns_sgc OBJ_netscape,4L,1L - -#define SN_org "ORG" -#define LN_org "org" -#define NID_org 379 -#define OBJ_org OBJ_iso,3L - -#define SN_dod "DOD" -#define LN_dod "dod" -#define NID_dod 380 -#define OBJ_dod OBJ_org,6L - -#define SN_iana "IANA" -#define LN_iana "iana" -#define NID_iana 381 -#define OBJ_iana OBJ_dod,1L - -#define OBJ_internet OBJ_iana - -#define SN_Directory "directory" -#define LN_Directory "Directory" -#define NID_Directory 382 -#define OBJ_Directory OBJ_internet,1L - -#define SN_Management "mgmt" -#define LN_Management "Management" -#define NID_Management 383 -#define OBJ_Management OBJ_internet,2L - -#define SN_Experimental "experimental" -#define LN_Experimental "Experimental" -#define NID_Experimental 384 -#define OBJ_Experimental OBJ_internet,3L - -#define SN_Private "private" -#define LN_Private "Private" -#define NID_Private 385 -#define OBJ_Private OBJ_internet,4L - -#define SN_Security "security" -#define LN_Security "Security" -#define NID_Security 386 -#define OBJ_Security OBJ_internet,5L - -#define SN_SNMPv2 "snmpv2" -#define LN_SNMPv2 "SNMPv2" -#define NID_SNMPv2 387 -#define OBJ_SNMPv2 OBJ_internet,6L - -#define LN_Mail "Mail" -#define NID_Mail 388 -#define OBJ_Mail OBJ_internet,7L - -#define SN_Enterprises "enterprises" -#define LN_Enterprises "Enterprises" -#define NID_Enterprises 389 -#define OBJ_Enterprises OBJ_Private,1L - -#define SN_dcObject "dcobject" -#define LN_dcObject "dcObject" -#define NID_dcObject 390 -#define OBJ_dcObject OBJ_Enterprises,1466L,344L - -#define SN_mime_mhs "mime-mhs" -#define LN_mime_mhs "MIME MHS" -#define NID_mime_mhs 504 -#define OBJ_mime_mhs OBJ_Mail,1L - -#define SN_mime_mhs_headings "mime-mhs-headings" -#define LN_mime_mhs_headings "mime-mhs-headings" -#define NID_mime_mhs_headings 505 -#define OBJ_mime_mhs_headings OBJ_mime_mhs,1L - -#define SN_mime_mhs_bodies "mime-mhs-bodies" -#define LN_mime_mhs_bodies "mime-mhs-bodies" -#define NID_mime_mhs_bodies 506 -#define OBJ_mime_mhs_bodies OBJ_mime_mhs,2L - -#define SN_id_hex_partial_message "id-hex-partial-message" -#define LN_id_hex_partial_message "id-hex-partial-message" -#define NID_id_hex_partial_message 507 -#define OBJ_id_hex_partial_message OBJ_mime_mhs_headings,1L - -#define SN_id_hex_multipart_message "id-hex-multipart-message" -#define LN_id_hex_multipart_message "id-hex-multipart-message" -#define NID_id_hex_multipart_message 508 -#define OBJ_id_hex_multipart_message OBJ_mime_mhs_headings,2L - -#define SN_rle_compression "RLE" -#define LN_rle_compression "run length compression" -#define NID_rle_compression 124 -#define OBJ_rle_compression 1L,1L,1L,1L,666L,1L - -#define SN_zlib_compression "ZLIB" -#define LN_zlib_compression "zlib compression" -#define NID_zlib_compression 125 -#define OBJ_zlib_compression OBJ_id_smime_alg,8L - -#define OBJ_csor 2L,16L,840L,1L,101L,3L - -#define OBJ_nistAlgorithms OBJ_csor,4L - -#define OBJ_aes OBJ_nistAlgorithms,1L - -#define SN_aes_128_ecb "AES-128-ECB" -#define LN_aes_128_ecb "aes-128-ecb" -#define NID_aes_128_ecb 418 -#define OBJ_aes_128_ecb OBJ_aes,1L - -#define SN_aes_128_cbc "AES-128-CBC" -#define LN_aes_128_cbc "aes-128-cbc" -#define NID_aes_128_cbc 419 -#define OBJ_aes_128_cbc OBJ_aes,2L - -#define SN_aes_128_ofb128 "AES-128-OFB" -#define LN_aes_128_ofb128 "aes-128-ofb" -#define NID_aes_128_ofb128 420 -#define OBJ_aes_128_ofb128 OBJ_aes,3L - -#define SN_aes_128_cfb128 "AES-128-CFB" -#define LN_aes_128_cfb128 "aes-128-cfb" -#define NID_aes_128_cfb128 421 -#define OBJ_aes_128_cfb128 OBJ_aes,4L - -#define SN_id_aes128_wrap "id-aes128-wrap" -#define NID_id_aes128_wrap 788 -#define OBJ_id_aes128_wrap OBJ_aes,5L - -#define SN_aes_128_gcm "id-aes128-GCM" -#define LN_aes_128_gcm "aes-128-gcm" -#define NID_aes_128_gcm 895 -#define OBJ_aes_128_gcm OBJ_aes,6L - -#define SN_aes_128_ccm "id-aes128-CCM" -#define LN_aes_128_ccm "aes-128-ccm" -#define NID_aes_128_ccm 896 -#define OBJ_aes_128_ccm OBJ_aes,7L - -#define SN_id_aes128_wrap_pad "id-aes128-wrap-pad" -#define NID_id_aes128_wrap_pad 897 -#define OBJ_id_aes128_wrap_pad OBJ_aes,8L - -#define SN_aes_192_ecb "AES-192-ECB" -#define LN_aes_192_ecb "aes-192-ecb" -#define NID_aes_192_ecb 422 -#define OBJ_aes_192_ecb OBJ_aes,21L - -#define SN_aes_192_cbc "AES-192-CBC" -#define LN_aes_192_cbc "aes-192-cbc" -#define NID_aes_192_cbc 423 -#define OBJ_aes_192_cbc OBJ_aes,22L - -#define SN_aes_192_ofb128 "AES-192-OFB" -#define LN_aes_192_ofb128 "aes-192-ofb" -#define NID_aes_192_ofb128 424 -#define OBJ_aes_192_ofb128 OBJ_aes,23L - -#define SN_aes_192_cfb128 "AES-192-CFB" -#define LN_aes_192_cfb128 "aes-192-cfb" -#define NID_aes_192_cfb128 425 -#define OBJ_aes_192_cfb128 OBJ_aes,24L - -#define SN_id_aes192_wrap "id-aes192-wrap" -#define NID_id_aes192_wrap 789 -#define OBJ_id_aes192_wrap OBJ_aes,25L - -#define SN_aes_192_gcm "id-aes192-GCM" -#define LN_aes_192_gcm "aes-192-gcm" -#define NID_aes_192_gcm 898 -#define OBJ_aes_192_gcm OBJ_aes,26L - -#define SN_aes_192_ccm "id-aes192-CCM" -#define LN_aes_192_ccm "aes-192-ccm" -#define NID_aes_192_ccm 899 -#define OBJ_aes_192_ccm OBJ_aes,27L - -#define SN_id_aes192_wrap_pad "id-aes192-wrap-pad" -#define NID_id_aes192_wrap_pad 900 -#define OBJ_id_aes192_wrap_pad OBJ_aes,28L - -#define SN_aes_256_ecb "AES-256-ECB" -#define LN_aes_256_ecb "aes-256-ecb" -#define NID_aes_256_ecb 426 -#define OBJ_aes_256_ecb OBJ_aes,41L - -#define SN_aes_256_cbc "AES-256-CBC" -#define LN_aes_256_cbc "aes-256-cbc" -#define NID_aes_256_cbc 427 -#define OBJ_aes_256_cbc OBJ_aes,42L - -#define SN_aes_256_ofb128 "AES-256-OFB" -#define LN_aes_256_ofb128 "aes-256-ofb" -#define NID_aes_256_ofb128 428 -#define OBJ_aes_256_ofb128 OBJ_aes,43L - -#define SN_aes_256_cfb128 "AES-256-CFB" -#define LN_aes_256_cfb128 "aes-256-cfb" -#define NID_aes_256_cfb128 429 -#define OBJ_aes_256_cfb128 OBJ_aes,44L - -#define SN_id_aes256_wrap "id-aes256-wrap" -#define NID_id_aes256_wrap 790 -#define OBJ_id_aes256_wrap OBJ_aes,45L - -#define SN_aes_256_gcm "id-aes256-GCM" -#define LN_aes_256_gcm "aes-256-gcm" -#define NID_aes_256_gcm 901 -#define OBJ_aes_256_gcm OBJ_aes,46L - -#define SN_aes_256_ccm "id-aes256-CCM" -#define LN_aes_256_ccm "aes-256-ccm" -#define NID_aes_256_ccm 902 -#define OBJ_aes_256_ccm OBJ_aes,47L - -#define SN_id_aes256_wrap_pad "id-aes256-wrap-pad" -#define NID_id_aes256_wrap_pad 903 -#define OBJ_id_aes256_wrap_pad OBJ_aes,48L - -#define SN_aes_128_cfb1 "AES-128-CFB1" -#define LN_aes_128_cfb1 "aes-128-cfb1" -#define NID_aes_128_cfb1 650 - -#define SN_aes_192_cfb1 "AES-192-CFB1" -#define LN_aes_192_cfb1 "aes-192-cfb1" -#define NID_aes_192_cfb1 651 - -#define SN_aes_256_cfb1 "AES-256-CFB1" -#define LN_aes_256_cfb1 "aes-256-cfb1" -#define NID_aes_256_cfb1 652 - -#define SN_aes_128_cfb8 "AES-128-CFB8" -#define LN_aes_128_cfb8 "aes-128-cfb8" -#define NID_aes_128_cfb8 653 - -#define SN_aes_192_cfb8 "AES-192-CFB8" -#define LN_aes_192_cfb8 "aes-192-cfb8" -#define NID_aes_192_cfb8 654 - -#define SN_aes_256_cfb8 "AES-256-CFB8" -#define LN_aes_256_cfb8 "aes-256-cfb8" -#define NID_aes_256_cfb8 655 - -#define SN_aes_128_ctr "AES-128-CTR" -#define LN_aes_128_ctr "aes-128-ctr" -#define NID_aes_128_ctr 904 - -#define SN_aes_192_ctr "AES-192-CTR" -#define LN_aes_192_ctr "aes-192-ctr" -#define NID_aes_192_ctr 905 - -#define SN_aes_256_ctr "AES-256-CTR" -#define LN_aes_256_ctr "aes-256-ctr" -#define NID_aes_256_ctr 906 - -#define SN_aes_128_xts "AES-128-XTS" -#define LN_aes_128_xts "aes-128-xts" -#define NID_aes_128_xts 913 - -#define SN_aes_256_xts "AES-256-XTS" -#define LN_aes_256_xts "aes-256-xts" -#define NID_aes_256_xts 914 - -#define SN_des_cfb1 "DES-CFB1" -#define LN_des_cfb1 "des-cfb1" -#define NID_des_cfb1 656 - -#define SN_des_cfb8 "DES-CFB8" -#define LN_des_cfb8 "des-cfb8" -#define NID_des_cfb8 657 - -#define SN_des_ede3_cfb1 "DES-EDE3-CFB1" -#define LN_des_ede3_cfb1 "des-ede3-cfb1" -#define NID_des_ede3_cfb1 658 - -#define SN_des_ede3_cfb8 "DES-EDE3-CFB8" -#define LN_des_ede3_cfb8 "des-ede3-cfb8" -#define NID_des_ede3_cfb8 659 - -#define OBJ_nist_hashalgs OBJ_nistAlgorithms,2L - -#define SN_sha256 "SHA256" -#define LN_sha256 "sha256" -#define NID_sha256 672 -#define OBJ_sha256 OBJ_nist_hashalgs,1L - -#define SN_sha384 "SHA384" -#define LN_sha384 "sha384" -#define NID_sha384 673 -#define OBJ_sha384 OBJ_nist_hashalgs,2L - -#define SN_sha512 "SHA512" -#define LN_sha512 "sha512" -#define NID_sha512 674 -#define OBJ_sha512 OBJ_nist_hashalgs,3L - -#define SN_sha224 "SHA224" -#define LN_sha224 "sha224" -#define NID_sha224 675 -#define OBJ_sha224 OBJ_nist_hashalgs,4L - -#define OBJ_dsa_with_sha2 OBJ_nistAlgorithms,3L - -#define SN_dsa_with_SHA224 "dsa_with_SHA224" -#define NID_dsa_with_SHA224 802 -#define OBJ_dsa_with_SHA224 OBJ_dsa_with_sha2,1L - -#define SN_dsa_with_SHA256 "dsa_with_SHA256" -#define NID_dsa_with_SHA256 803 -#define OBJ_dsa_with_SHA256 OBJ_dsa_with_sha2,2L - -#define SN_hold_instruction_code "holdInstructionCode" -#define LN_hold_instruction_code "Hold Instruction Code" -#define NID_hold_instruction_code 430 -#define OBJ_hold_instruction_code OBJ_id_ce,23L - -#define OBJ_holdInstruction OBJ_X9_57,2L - -#define SN_hold_instruction_none "holdInstructionNone" -#define LN_hold_instruction_none "Hold Instruction None" -#define NID_hold_instruction_none 431 -#define OBJ_hold_instruction_none OBJ_holdInstruction,1L - -#define SN_hold_instruction_call_issuer "holdInstructionCallIssuer" -#define LN_hold_instruction_call_issuer "Hold Instruction Call Issuer" -#define NID_hold_instruction_call_issuer 432 -#define OBJ_hold_instruction_call_issuer OBJ_holdInstruction,2L - -#define SN_hold_instruction_reject "holdInstructionReject" -#define LN_hold_instruction_reject "Hold Instruction Reject" -#define NID_hold_instruction_reject 433 -#define OBJ_hold_instruction_reject OBJ_holdInstruction,3L - -#define SN_data "data" -#define NID_data 434 -#define OBJ_data OBJ_itu_t,9L - -#define SN_pss "pss" -#define NID_pss 435 -#define OBJ_pss OBJ_data,2342L - -#define SN_ucl "ucl" -#define NID_ucl 436 -#define OBJ_ucl OBJ_pss,19200300L - -#define SN_pilot "pilot" -#define NID_pilot 437 -#define OBJ_pilot OBJ_ucl,100L - -#define LN_pilotAttributeType "pilotAttributeType" -#define NID_pilotAttributeType 438 -#define OBJ_pilotAttributeType OBJ_pilot,1L - -#define LN_pilotAttributeSyntax "pilotAttributeSyntax" -#define NID_pilotAttributeSyntax 439 -#define OBJ_pilotAttributeSyntax OBJ_pilot,3L - -#define LN_pilotObjectClass "pilotObjectClass" -#define NID_pilotObjectClass 440 -#define OBJ_pilotObjectClass OBJ_pilot,4L - -#define LN_pilotGroups "pilotGroups" -#define NID_pilotGroups 441 -#define OBJ_pilotGroups OBJ_pilot,10L - -#define LN_iA5StringSyntax "iA5StringSyntax" -#define NID_iA5StringSyntax 442 -#define OBJ_iA5StringSyntax OBJ_pilotAttributeSyntax,4L - -#define LN_caseIgnoreIA5StringSyntax "caseIgnoreIA5StringSyntax" -#define NID_caseIgnoreIA5StringSyntax 443 -#define OBJ_caseIgnoreIA5StringSyntax OBJ_pilotAttributeSyntax,5L - -#define LN_pilotObject "pilotObject" -#define NID_pilotObject 444 -#define OBJ_pilotObject OBJ_pilotObjectClass,3L - -#define LN_pilotPerson "pilotPerson" -#define NID_pilotPerson 445 -#define OBJ_pilotPerson OBJ_pilotObjectClass,4L - -#define SN_account "account" -#define NID_account 446 -#define OBJ_account OBJ_pilotObjectClass,5L - -#define SN_document "document" -#define NID_document 447 -#define OBJ_document OBJ_pilotObjectClass,6L - -#define SN_room "room" -#define NID_room 448 -#define OBJ_room OBJ_pilotObjectClass,7L - -#define LN_documentSeries "documentSeries" -#define NID_documentSeries 449 -#define OBJ_documentSeries OBJ_pilotObjectClass,9L - -#define SN_Domain "domain" -#define LN_Domain "Domain" -#define NID_Domain 392 -#define OBJ_Domain OBJ_pilotObjectClass,13L - -#define LN_rFC822localPart "rFC822localPart" -#define NID_rFC822localPart 450 -#define OBJ_rFC822localPart OBJ_pilotObjectClass,14L - -#define LN_dNSDomain "dNSDomain" -#define NID_dNSDomain 451 -#define OBJ_dNSDomain OBJ_pilotObjectClass,15L - -#define LN_domainRelatedObject "domainRelatedObject" -#define NID_domainRelatedObject 452 -#define OBJ_domainRelatedObject OBJ_pilotObjectClass,17L - -#define LN_friendlyCountry "friendlyCountry" -#define NID_friendlyCountry 453 -#define OBJ_friendlyCountry OBJ_pilotObjectClass,18L - -#define LN_simpleSecurityObject "simpleSecurityObject" -#define NID_simpleSecurityObject 454 -#define OBJ_simpleSecurityObject OBJ_pilotObjectClass,19L - -#define LN_pilotOrganization "pilotOrganization" -#define NID_pilotOrganization 455 -#define OBJ_pilotOrganization OBJ_pilotObjectClass,20L - -#define LN_pilotDSA "pilotDSA" -#define NID_pilotDSA 456 -#define OBJ_pilotDSA OBJ_pilotObjectClass,21L - -#define LN_qualityLabelledData "qualityLabelledData" -#define NID_qualityLabelledData 457 -#define OBJ_qualityLabelledData OBJ_pilotObjectClass,22L - -#define SN_userId "UID" -#define LN_userId "userId" -#define NID_userId 458 -#define OBJ_userId OBJ_pilotAttributeType,1L - -#define LN_textEncodedORAddress "textEncodedORAddress" -#define NID_textEncodedORAddress 459 -#define OBJ_textEncodedORAddress OBJ_pilotAttributeType,2L - -#define SN_rfc822Mailbox "mail" -#define LN_rfc822Mailbox "rfc822Mailbox" -#define NID_rfc822Mailbox 460 -#define OBJ_rfc822Mailbox OBJ_pilotAttributeType,3L - -#define SN_info "info" -#define NID_info 461 -#define OBJ_info OBJ_pilotAttributeType,4L - -#define LN_favouriteDrink "favouriteDrink" -#define NID_favouriteDrink 462 -#define OBJ_favouriteDrink OBJ_pilotAttributeType,5L - -#define LN_roomNumber "roomNumber" -#define NID_roomNumber 463 -#define OBJ_roomNumber OBJ_pilotAttributeType,6L - -#define SN_photo "photo" -#define NID_photo 464 -#define OBJ_photo OBJ_pilotAttributeType,7L - -#define LN_userClass "userClass" -#define NID_userClass 465 -#define OBJ_userClass OBJ_pilotAttributeType,8L - -#define SN_host "host" -#define NID_host 466 -#define OBJ_host OBJ_pilotAttributeType,9L - -#define SN_manager "manager" -#define NID_manager 467 -#define OBJ_manager OBJ_pilotAttributeType,10L - -#define LN_documentIdentifier "documentIdentifier" -#define NID_documentIdentifier 468 -#define OBJ_documentIdentifier OBJ_pilotAttributeType,11L - -#define LN_documentTitle "documentTitle" -#define NID_documentTitle 469 -#define OBJ_documentTitle OBJ_pilotAttributeType,12L - -#define LN_documentVersion "documentVersion" -#define NID_documentVersion 470 -#define OBJ_documentVersion OBJ_pilotAttributeType,13L - -#define LN_documentAuthor "documentAuthor" -#define NID_documentAuthor 471 -#define OBJ_documentAuthor OBJ_pilotAttributeType,14L - -#define LN_documentLocation "documentLocation" -#define NID_documentLocation 472 -#define OBJ_documentLocation OBJ_pilotAttributeType,15L - -#define LN_homeTelephoneNumber "homeTelephoneNumber" -#define NID_homeTelephoneNumber 473 -#define OBJ_homeTelephoneNumber OBJ_pilotAttributeType,20L - -#define SN_secretary "secretary" -#define NID_secretary 474 -#define OBJ_secretary OBJ_pilotAttributeType,21L - -#define LN_otherMailbox "otherMailbox" -#define NID_otherMailbox 475 -#define OBJ_otherMailbox OBJ_pilotAttributeType,22L - -#define LN_lastModifiedTime "lastModifiedTime" -#define NID_lastModifiedTime 476 -#define OBJ_lastModifiedTime OBJ_pilotAttributeType,23L - -#define LN_lastModifiedBy "lastModifiedBy" -#define NID_lastModifiedBy 477 -#define OBJ_lastModifiedBy OBJ_pilotAttributeType,24L - -#define SN_domainComponent "DC" -#define LN_domainComponent "domainComponent" -#define NID_domainComponent 391 -#define OBJ_domainComponent OBJ_pilotAttributeType,25L - -#define LN_aRecord "aRecord" -#define NID_aRecord 478 -#define OBJ_aRecord OBJ_pilotAttributeType,26L - -#define LN_pilotAttributeType27 "pilotAttributeType27" -#define NID_pilotAttributeType27 479 -#define OBJ_pilotAttributeType27 OBJ_pilotAttributeType,27L - -#define LN_mXRecord "mXRecord" -#define NID_mXRecord 480 -#define OBJ_mXRecord OBJ_pilotAttributeType,28L - -#define LN_nSRecord "nSRecord" -#define NID_nSRecord 481 -#define OBJ_nSRecord OBJ_pilotAttributeType,29L - -#define LN_sOARecord "sOARecord" -#define NID_sOARecord 482 -#define OBJ_sOARecord OBJ_pilotAttributeType,30L - -#define LN_cNAMERecord "cNAMERecord" -#define NID_cNAMERecord 483 -#define OBJ_cNAMERecord OBJ_pilotAttributeType,31L - -#define LN_associatedDomain "associatedDomain" -#define NID_associatedDomain 484 -#define OBJ_associatedDomain OBJ_pilotAttributeType,37L - -#define LN_associatedName "associatedName" -#define NID_associatedName 485 -#define OBJ_associatedName OBJ_pilotAttributeType,38L - -#define LN_homePostalAddress "homePostalAddress" -#define NID_homePostalAddress 486 -#define OBJ_homePostalAddress OBJ_pilotAttributeType,39L - -#define LN_personalTitle "personalTitle" -#define NID_personalTitle 487 -#define OBJ_personalTitle OBJ_pilotAttributeType,40L - -#define LN_mobileTelephoneNumber "mobileTelephoneNumber" -#define NID_mobileTelephoneNumber 488 -#define OBJ_mobileTelephoneNumber OBJ_pilotAttributeType,41L - -#define LN_pagerTelephoneNumber "pagerTelephoneNumber" -#define NID_pagerTelephoneNumber 489 -#define OBJ_pagerTelephoneNumber OBJ_pilotAttributeType,42L - -#define LN_friendlyCountryName "friendlyCountryName" -#define NID_friendlyCountryName 490 -#define OBJ_friendlyCountryName OBJ_pilotAttributeType,43L - -#define LN_organizationalStatus "organizationalStatus" -#define NID_organizationalStatus 491 -#define OBJ_organizationalStatus OBJ_pilotAttributeType,45L - -#define LN_janetMailbox "janetMailbox" -#define NID_janetMailbox 492 -#define OBJ_janetMailbox OBJ_pilotAttributeType,46L - -#define LN_mailPreferenceOption "mailPreferenceOption" -#define NID_mailPreferenceOption 493 -#define OBJ_mailPreferenceOption OBJ_pilotAttributeType,47L - -#define LN_buildingName "buildingName" -#define NID_buildingName 494 -#define OBJ_buildingName OBJ_pilotAttributeType,48L - -#define LN_dSAQuality "dSAQuality" -#define NID_dSAQuality 495 -#define OBJ_dSAQuality OBJ_pilotAttributeType,49L - -#define LN_singleLevelQuality "singleLevelQuality" -#define NID_singleLevelQuality 496 -#define OBJ_singleLevelQuality OBJ_pilotAttributeType,50L - -#define LN_subtreeMinimumQuality "subtreeMinimumQuality" -#define NID_subtreeMinimumQuality 497 -#define OBJ_subtreeMinimumQuality OBJ_pilotAttributeType,51L - -#define LN_subtreeMaximumQuality "subtreeMaximumQuality" -#define NID_subtreeMaximumQuality 498 -#define OBJ_subtreeMaximumQuality OBJ_pilotAttributeType,52L - -#define LN_personalSignature "personalSignature" -#define NID_personalSignature 499 -#define OBJ_personalSignature OBJ_pilotAttributeType,53L - -#define LN_dITRedirect "dITRedirect" -#define NID_dITRedirect 500 -#define OBJ_dITRedirect OBJ_pilotAttributeType,54L - -#define SN_audio "audio" -#define NID_audio 501 -#define OBJ_audio OBJ_pilotAttributeType,55L - -#define LN_documentPublisher "documentPublisher" -#define NID_documentPublisher 502 -#define OBJ_documentPublisher OBJ_pilotAttributeType,56L - -#define SN_id_set "id-set" -#define LN_id_set "Secure Electronic Transactions" -#define NID_id_set 512 -#define OBJ_id_set OBJ_international_organizations,42L - -#define SN_set_ctype "set-ctype" -#define LN_set_ctype "content types" -#define NID_set_ctype 513 -#define OBJ_set_ctype OBJ_id_set,0L - -#define SN_set_msgExt "set-msgExt" -#define LN_set_msgExt "message extensions" -#define NID_set_msgExt 514 -#define OBJ_set_msgExt OBJ_id_set,1L - -#define SN_set_attr "set-attr" -#define NID_set_attr 515 -#define OBJ_set_attr OBJ_id_set,3L - -#define SN_set_policy "set-policy" -#define NID_set_policy 516 -#define OBJ_set_policy OBJ_id_set,5L - -#define SN_set_certExt "set-certExt" -#define LN_set_certExt "certificate extensions" -#define NID_set_certExt 517 -#define OBJ_set_certExt OBJ_id_set,7L - -#define SN_set_brand "set-brand" -#define NID_set_brand 518 -#define OBJ_set_brand OBJ_id_set,8L - -#define SN_setct_PANData "setct-PANData" -#define NID_setct_PANData 519 -#define OBJ_setct_PANData OBJ_set_ctype,0L - -#define SN_setct_PANToken "setct-PANToken" -#define NID_setct_PANToken 520 -#define OBJ_setct_PANToken OBJ_set_ctype,1L - -#define SN_setct_PANOnly "setct-PANOnly" -#define NID_setct_PANOnly 521 -#define OBJ_setct_PANOnly OBJ_set_ctype,2L - -#define SN_setct_OIData "setct-OIData" -#define NID_setct_OIData 522 -#define OBJ_setct_OIData OBJ_set_ctype,3L - -#define SN_setct_PI "setct-PI" -#define NID_setct_PI 523 -#define OBJ_setct_PI OBJ_set_ctype,4L - -#define SN_setct_PIData "setct-PIData" -#define NID_setct_PIData 524 -#define OBJ_setct_PIData OBJ_set_ctype,5L - -#define SN_setct_PIDataUnsigned "setct-PIDataUnsigned" -#define NID_setct_PIDataUnsigned 525 -#define OBJ_setct_PIDataUnsigned OBJ_set_ctype,6L - -#define SN_setct_HODInput "setct-HODInput" -#define NID_setct_HODInput 526 -#define OBJ_setct_HODInput OBJ_set_ctype,7L - -#define SN_setct_AuthResBaggage "setct-AuthResBaggage" -#define NID_setct_AuthResBaggage 527 -#define OBJ_setct_AuthResBaggage OBJ_set_ctype,8L - -#define SN_setct_AuthRevReqBaggage "setct-AuthRevReqBaggage" -#define NID_setct_AuthRevReqBaggage 528 -#define OBJ_setct_AuthRevReqBaggage OBJ_set_ctype,9L - -#define SN_setct_AuthRevResBaggage "setct-AuthRevResBaggage" -#define NID_setct_AuthRevResBaggage 529 -#define OBJ_setct_AuthRevResBaggage OBJ_set_ctype,10L - -#define SN_setct_CapTokenSeq "setct-CapTokenSeq" -#define NID_setct_CapTokenSeq 530 -#define OBJ_setct_CapTokenSeq OBJ_set_ctype,11L - -#define SN_setct_PInitResData "setct-PInitResData" -#define NID_setct_PInitResData 531 -#define OBJ_setct_PInitResData OBJ_set_ctype,12L - -#define SN_setct_PI_TBS "setct-PI-TBS" -#define NID_setct_PI_TBS 532 -#define OBJ_setct_PI_TBS OBJ_set_ctype,13L - -#define SN_setct_PResData "setct-PResData" -#define NID_setct_PResData 533 -#define OBJ_setct_PResData OBJ_set_ctype,14L - -#define SN_setct_AuthReqTBS "setct-AuthReqTBS" -#define NID_setct_AuthReqTBS 534 -#define OBJ_setct_AuthReqTBS OBJ_set_ctype,16L - -#define SN_setct_AuthResTBS "setct-AuthResTBS" -#define NID_setct_AuthResTBS 535 -#define OBJ_setct_AuthResTBS OBJ_set_ctype,17L - -#define SN_setct_AuthResTBSX "setct-AuthResTBSX" -#define NID_setct_AuthResTBSX 536 -#define OBJ_setct_AuthResTBSX OBJ_set_ctype,18L - -#define SN_setct_AuthTokenTBS "setct-AuthTokenTBS" -#define NID_setct_AuthTokenTBS 537 -#define OBJ_setct_AuthTokenTBS OBJ_set_ctype,19L - -#define SN_setct_CapTokenData "setct-CapTokenData" -#define NID_setct_CapTokenData 538 -#define OBJ_setct_CapTokenData OBJ_set_ctype,20L - -#define SN_setct_CapTokenTBS "setct-CapTokenTBS" -#define NID_setct_CapTokenTBS 539 -#define OBJ_setct_CapTokenTBS OBJ_set_ctype,21L - -#define SN_setct_AcqCardCodeMsg "setct-AcqCardCodeMsg" -#define NID_setct_AcqCardCodeMsg 540 -#define OBJ_setct_AcqCardCodeMsg OBJ_set_ctype,22L - -#define SN_setct_AuthRevReqTBS "setct-AuthRevReqTBS" -#define NID_setct_AuthRevReqTBS 541 -#define OBJ_setct_AuthRevReqTBS OBJ_set_ctype,23L - -#define SN_setct_AuthRevResData "setct-AuthRevResData" -#define NID_setct_AuthRevResData 542 -#define OBJ_setct_AuthRevResData OBJ_set_ctype,24L - -#define SN_setct_AuthRevResTBS "setct-AuthRevResTBS" -#define NID_setct_AuthRevResTBS 543 -#define OBJ_setct_AuthRevResTBS OBJ_set_ctype,25L - -#define SN_setct_CapReqTBS "setct-CapReqTBS" -#define NID_setct_CapReqTBS 544 -#define OBJ_setct_CapReqTBS OBJ_set_ctype,26L - -#define SN_setct_CapReqTBSX "setct-CapReqTBSX" -#define NID_setct_CapReqTBSX 545 -#define OBJ_setct_CapReqTBSX OBJ_set_ctype,27L - -#define SN_setct_CapResData "setct-CapResData" -#define NID_setct_CapResData 546 -#define OBJ_setct_CapResData OBJ_set_ctype,28L - -#define SN_setct_CapRevReqTBS "setct-CapRevReqTBS" -#define NID_setct_CapRevReqTBS 547 -#define OBJ_setct_CapRevReqTBS OBJ_set_ctype,29L - -#define SN_setct_CapRevReqTBSX "setct-CapRevReqTBSX" -#define NID_setct_CapRevReqTBSX 548 -#define OBJ_setct_CapRevReqTBSX OBJ_set_ctype,30L - -#define SN_setct_CapRevResData "setct-CapRevResData" -#define NID_setct_CapRevResData 549 -#define OBJ_setct_CapRevResData OBJ_set_ctype,31L - -#define SN_setct_CredReqTBS "setct-CredReqTBS" -#define NID_setct_CredReqTBS 550 -#define OBJ_setct_CredReqTBS OBJ_set_ctype,32L - -#define SN_setct_CredReqTBSX "setct-CredReqTBSX" -#define NID_setct_CredReqTBSX 551 -#define OBJ_setct_CredReqTBSX OBJ_set_ctype,33L - -#define SN_setct_CredResData "setct-CredResData" -#define NID_setct_CredResData 552 -#define OBJ_setct_CredResData OBJ_set_ctype,34L - -#define SN_setct_CredRevReqTBS "setct-CredRevReqTBS" -#define NID_setct_CredRevReqTBS 553 -#define OBJ_setct_CredRevReqTBS OBJ_set_ctype,35L - -#define SN_setct_CredRevReqTBSX "setct-CredRevReqTBSX" -#define NID_setct_CredRevReqTBSX 554 -#define OBJ_setct_CredRevReqTBSX OBJ_set_ctype,36L - -#define SN_setct_CredRevResData "setct-CredRevResData" -#define NID_setct_CredRevResData 555 -#define OBJ_setct_CredRevResData OBJ_set_ctype,37L - -#define SN_setct_PCertReqData "setct-PCertReqData" -#define NID_setct_PCertReqData 556 -#define OBJ_setct_PCertReqData OBJ_set_ctype,38L - -#define SN_setct_PCertResTBS "setct-PCertResTBS" -#define NID_setct_PCertResTBS 557 -#define OBJ_setct_PCertResTBS OBJ_set_ctype,39L - -#define SN_setct_BatchAdminReqData "setct-BatchAdminReqData" -#define NID_setct_BatchAdminReqData 558 -#define OBJ_setct_BatchAdminReqData OBJ_set_ctype,40L - -#define SN_setct_BatchAdminResData "setct-BatchAdminResData" -#define NID_setct_BatchAdminResData 559 -#define OBJ_setct_BatchAdminResData OBJ_set_ctype,41L - -#define SN_setct_CardCInitResTBS "setct-CardCInitResTBS" -#define NID_setct_CardCInitResTBS 560 -#define OBJ_setct_CardCInitResTBS OBJ_set_ctype,42L - -#define SN_setct_MeAqCInitResTBS "setct-MeAqCInitResTBS" -#define NID_setct_MeAqCInitResTBS 561 -#define OBJ_setct_MeAqCInitResTBS OBJ_set_ctype,43L - -#define SN_setct_RegFormResTBS "setct-RegFormResTBS" -#define NID_setct_RegFormResTBS 562 -#define OBJ_setct_RegFormResTBS OBJ_set_ctype,44L - -#define SN_setct_CertReqData "setct-CertReqData" -#define NID_setct_CertReqData 563 -#define OBJ_setct_CertReqData OBJ_set_ctype,45L - -#define SN_setct_CertReqTBS "setct-CertReqTBS" -#define NID_setct_CertReqTBS 564 -#define OBJ_setct_CertReqTBS OBJ_set_ctype,46L - -#define SN_setct_CertResData "setct-CertResData" -#define NID_setct_CertResData 565 -#define OBJ_setct_CertResData OBJ_set_ctype,47L - -#define SN_setct_CertInqReqTBS "setct-CertInqReqTBS" -#define NID_setct_CertInqReqTBS 566 -#define OBJ_setct_CertInqReqTBS OBJ_set_ctype,48L - -#define SN_setct_ErrorTBS "setct-ErrorTBS" -#define NID_setct_ErrorTBS 567 -#define OBJ_setct_ErrorTBS OBJ_set_ctype,49L - -#define SN_setct_PIDualSignedTBE "setct-PIDualSignedTBE" -#define NID_setct_PIDualSignedTBE 568 -#define OBJ_setct_PIDualSignedTBE OBJ_set_ctype,50L - -#define SN_setct_PIUnsignedTBE "setct-PIUnsignedTBE" -#define NID_setct_PIUnsignedTBE 569 -#define OBJ_setct_PIUnsignedTBE OBJ_set_ctype,51L - -#define SN_setct_AuthReqTBE "setct-AuthReqTBE" -#define NID_setct_AuthReqTBE 570 -#define OBJ_setct_AuthReqTBE OBJ_set_ctype,52L - -#define SN_setct_AuthResTBE "setct-AuthResTBE" -#define NID_setct_AuthResTBE 571 -#define OBJ_setct_AuthResTBE OBJ_set_ctype,53L - -#define SN_setct_AuthResTBEX "setct-AuthResTBEX" -#define NID_setct_AuthResTBEX 572 -#define OBJ_setct_AuthResTBEX OBJ_set_ctype,54L - -#define SN_setct_AuthTokenTBE "setct-AuthTokenTBE" -#define NID_setct_AuthTokenTBE 573 -#define OBJ_setct_AuthTokenTBE OBJ_set_ctype,55L - -#define SN_setct_CapTokenTBE "setct-CapTokenTBE" -#define NID_setct_CapTokenTBE 574 -#define OBJ_setct_CapTokenTBE OBJ_set_ctype,56L - -#define SN_setct_CapTokenTBEX "setct-CapTokenTBEX" -#define NID_setct_CapTokenTBEX 575 -#define OBJ_setct_CapTokenTBEX OBJ_set_ctype,57L - -#define SN_setct_AcqCardCodeMsgTBE "setct-AcqCardCodeMsgTBE" -#define NID_setct_AcqCardCodeMsgTBE 576 -#define OBJ_setct_AcqCardCodeMsgTBE OBJ_set_ctype,58L - -#define SN_setct_AuthRevReqTBE "setct-AuthRevReqTBE" -#define NID_setct_AuthRevReqTBE 577 -#define OBJ_setct_AuthRevReqTBE OBJ_set_ctype,59L - -#define SN_setct_AuthRevResTBE "setct-AuthRevResTBE" -#define NID_setct_AuthRevResTBE 578 -#define OBJ_setct_AuthRevResTBE OBJ_set_ctype,60L - -#define SN_setct_AuthRevResTBEB "setct-AuthRevResTBEB" -#define NID_setct_AuthRevResTBEB 579 -#define OBJ_setct_AuthRevResTBEB OBJ_set_ctype,61L - -#define SN_setct_CapReqTBE "setct-CapReqTBE" -#define NID_setct_CapReqTBE 580 -#define OBJ_setct_CapReqTBE OBJ_set_ctype,62L - -#define SN_setct_CapReqTBEX "setct-CapReqTBEX" -#define NID_setct_CapReqTBEX 581 -#define OBJ_setct_CapReqTBEX OBJ_set_ctype,63L - -#define SN_setct_CapResTBE "setct-CapResTBE" -#define NID_setct_CapResTBE 582 -#define OBJ_setct_CapResTBE OBJ_set_ctype,64L - -#define SN_setct_CapRevReqTBE "setct-CapRevReqTBE" -#define NID_setct_CapRevReqTBE 583 -#define OBJ_setct_CapRevReqTBE OBJ_set_ctype,65L - -#define SN_setct_CapRevReqTBEX "setct-CapRevReqTBEX" -#define NID_setct_CapRevReqTBEX 584 -#define OBJ_setct_CapRevReqTBEX OBJ_set_ctype,66L - -#define SN_setct_CapRevResTBE "setct-CapRevResTBE" -#define NID_setct_CapRevResTBE 585 -#define OBJ_setct_CapRevResTBE OBJ_set_ctype,67L - -#define SN_setct_CredReqTBE "setct-CredReqTBE" -#define NID_setct_CredReqTBE 586 -#define OBJ_setct_CredReqTBE OBJ_set_ctype,68L - -#define SN_setct_CredReqTBEX "setct-CredReqTBEX" -#define NID_setct_CredReqTBEX 587 -#define OBJ_setct_CredReqTBEX OBJ_set_ctype,69L - -#define SN_setct_CredResTBE "setct-CredResTBE" -#define NID_setct_CredResTBE 588 -#define OBJ_setct_CredResTBE OBJ_set_ctype,70L - -#define SN_setct_CredRevReqTBE "setct-CredRevReqTBE" -#define NID_setct_CredRevReqTBE 589 -#define OBJ_setct_CredRevReqTBE OBJ_set_ctype,71L - -#define SN_setct_CredRevReqTBEX "setct-CredRevReqTBEX" -#define NID_setct_CredRevReqTBEX 590 -#define OBJ_setct_CredRevReqTBEX OBJ_set_ctype,72L - -#define SN_setct_CredRevResTBE "setct-CredRevResTBE" -#define NID_setct_CredRevResTBE 591 -#define OBJ_setct_CredRevResTBE OBJ_set_ctype,73L - -#define SN_setct_BatchAdminReqTBE "setct-BatchAdminReqTBE" -#define NID_setct_BatchAdminReqTBE 592 -#define OBJ_setct_BatchAdminReqTBE OBJ_set_ctype,74L - -#define SN_setct_BatchAdminResTBE "setct-BatchAdminResTBE" -#define NID_setct_BatchAdminResTBE 593 -#define OBJ_setct_BatchAdminResTBE OBJ_set_ctype,75L - -#define SN_setct_RegFormReqTBE "setct-RegFormReqTBE" -#define NID_setct_RegFormReqTBE 594 -#define OBJ_setct_RegFormReqTBE OBJ_set_ctype,76L - -#define SN_setct_CertReqTBE "setct-CertReqTBE" -#define NID_setct_CertReqTBE 595 -#define OBJ_setct_CertReqTBE OBJ_set_ctype,77L - -#define SN_setct_CertReqTBEX "setct-CertReqTBEX" -#define NID_setct_CertReqTBEX 596 -#define OBJ_setct_CertReqTBEX OBJ_set_ctype,78L - -#define SN_setct_CertResTBE "setct-CertResTBE" -#define NID_setct_CertResTBE 597 -#define OBJ_setct_CertResTBE OBJ_set_ctype,79L - -#define SN_setct_CRLNotificationTBS "setct-CRLNotificationTBS" -#define NID_setct_CRLNotificationTBS 598 -#define OBJ_setct_CRLNotificationTBS OBJ_set_ctype,80L - -#define SN_setct_CRLNotificationResTBS "setct-CRLNotificationResTBS" -#define NID_setct_CRLNotificationResTBS 599 -#define OBJ_setct_CRLNotificationResTBS OBJ_set_ctype,81L - -#define SN_setct_BCIDistributionTBS "setct-BCIDistributionTBS" -#define NID_setct_BCIDistributionTBS 600 -#define OBJ_setct_BCIDistributionTBS OBJ_set_ctype,82L - -#define SN_setext_genCrypt "setext-genCrypt" -#define LN_setext_genCrypt "generic cryptogram" -#define NID_setext_genCrypt 601 -#define OBJ_setext_genCrypt OBJ_set_msgExt,1L - -#define SN_setext_miAuth "setext-miAuth" -#define LN_setext_miAuth "merchant initiated auth" -#define NID_setext_miAuth 602 -#define OBJ_setext_miAuth OBJ_set_msgExt,3L - -#define SN_setext_pinSecure "setext-pinSecure" -#define NID_setext_pinSecure 603 -#define OBJ_setext_pinSecure OBJ_set_msgExt,4L - -#define SN_setext_pinAny "setext-pinAny" -#define NID_setext_pinAny 604 -#define OBJ_setext_pinAny OBJ_set_msgExt,5L - -#define SN_setext_track2 "setext-track2" -#define NID_setext_track2 605 -#define OBJ_setext_track2 OBJ_set_msgExt,7L - -#define SN_setext_cv "setext-cv" -#define LN_setext_cv "additional verification" -#define NID_setext_cv 606 -#define OBJ_setext_cv OBJ_set_msgExt,8L - -#define SN_set_policy_root "set-policy-root" -#define NID_set_policy_root 607 -#define OBJ_set_policy_root OBJ_set_policy,0L - -#define SN_setCext_hashedRoot "setCext-hashedRoot" -#define NID_setCext_hashedRoot 608 -#define OBJ_setCext_hashedRoot OBJ_set_certExt,0L - -#define SN_setCext_certType "setCext-certType" -#define NID_setCext_certType 609 -#define OBJ_setCext_certType OBJ_set_certExt,1L - -#define SN_setCext_merchData "setCext-merchData" -#define NID_setCext_merchData 610 -#define OBJ_setCext_merchData OBJ_set_certExt,2L - -#define SN_setCext_cCertRequired "setCext-cCertRequired" -#define NID_setCext_cCertRequired 611 -#define OBJ_setCext_cCertRequired OBJ_set_certExt,3L - -#define SN_setCext_tunneling "setCext-tunneling" -#define NID_setCext_tunneling 612 -#define OBJ_setCext_tunneling OBJ_set_certExt,4L - -#define SN_setCext_setExt "setCext-setExt" -#define NID_setCext_setExt 613 -#define OBJ_setCext_setExt OBJ_set_certExt,5L - -#define SN_setCext_setQualf "setCext-setQualf" -#define NID_setCext_setQualf 614 -#define OBJ_setCext_setQualf OBJ_set_certExt,6L - -#define SN_setCext_PGWYcapabilities "setCext-PGWYcapabilities" -#define NID_setCext_PGWYcapabilities 615 -#define OBJ_setCext_PGWYcapabilities OBJ_set_certExt,7L - -#define SN_setCext_TokenIdentifier "setCext-TokenIdentifier" -#define NID_setCext_TokenIdentifier 616 -#define OBJ_setCext_TokenIdentifier OBJ_set_certExt,8L - -#define SN_setCext_Track2Data "setCext-Track2Data" -#define NID_setCext_Track2Data 617 -#define OBJ_setCext_Track2Data OBJ_set_certExt,9L - -#define SN_setCext_TokenType "setCext-TokenType" -#define NID_setCext_TokenType 618 -#define OBJ_setCext_TokenType OBJ_set_certExt,10L - -#define SN_setCext_IssuerCapabilities "setCext-IssuerCapabilities" -#define NID_setCext_IssuerCapabilities 619 -#define OBJ_setCext_IssuerCapabilities OBJ_set_certExt,11L - -#define SN_setAttr_Cert "setAttr-Cert" -#define NID_setAttr_Cert 620 -#define OBJ_setAttr_Cert OBJ_set_attr,0L - -#define SN_setAttr_PGWYcap "setAttr-PGWYcap" -#define LN_setAttr_PGWYcap "payment gateway capabilities" -#define NID_setAttr_PGWYcap 621 -#define OBJ_setAttr_PGWYcap OBJ_set_attr,1L - -#define SN_setAttr_TokenType "setAttr-TokenType" -#define NID_setAttr_TokenType 622 -#define OBJ_setAttr_TokenType OBJ_set_attr,2L - -#define SN_setAttr_IssCap "setAttr-IssCap" -#define LN_setAttr_IssCap "issuer capabilities" -#define NID_setAttr_IssCap 623 -#define OBJ_setAttr_IssCap OBJ_set_attr,3L - -#define SN_set_rootKeyThumb "set-rootKeyThumb" -#define NID_set_rootKeyThumb 624 -#define OBJ_set_rootKeyThumb OBJ_setAttr_Cert,0L - -#define SN_set_addPolicy "set-addPolicy" -#define NID_set_addPolicy 625 -#define OBJ_set_addPolicy OBJ_setAttr_Cert,1L - -#define SN_setAttr_Token_EMV "setAttr-Token-EMV" -#define NID_setAttr_Token_EMV 626 -#define OBJ_setAttr_Token_EMV OBJ_setAttr_TokenType,1L - -#define SN_setAttr_Token_B0Prime "setAttr-Token-B0Prime" -#define NID_setAttr_Token_B0Prime 627 -#define OBJ_setAttr_Token_B0Prime OBJ_setAttr_TokenType,2L - -#define SN_setAttr_IssCap_CVM "setAttr-IssCap-CVM" -#define NID_setAttr_IssCap_CVM 628 -#define OBJ_setAttr_IssCap_CVM OBJ_setAttr_IssCap,3L - -#define SN_setAttr_IssCap_T2 "setAttr-IssCap-T2" -#define NID_setAttr_IssCap_T2 629 -#define OBJ_setAttr_IssCap_T2 OBJ_setAttr_IssCap,4L - -#define SN_setAttr_IssCap_Sig "setAttr-IssCap-Sig" -#define NID_setAttr_IssCap_Sig 630 -#define OBJ_setAttr_IssCap_Sig OBJ_setAttr_IssCap,5L - -#define SN_setAttr_GenCryptgrm "setAttr-GenCryptgrm" -#define LN_setAttr_GenCryptgrm "generate cryptogram" -#define NID_setAttr_GenCryptgrm 631 -#define OBJ_setAttr_GenCryptgrm OBJ_setAttr_IssCap_CVM,1L - -#define SN_setAttr_T2Enc "setAttr-T2Enc" -#define LN_setAttr_T2Enc "encrypted track 2" -#define NID_setAttr_T2Enc 632 -#define OBJ_setAttr_T2Enc OBJ_setAttr_IssCap_T2,1L - -#define SN_setAttr_T2cleartxt "setAttr-T2cleartxt" -#define LN_setAttr_T2cleartxt "cleartext track 2" -#define NID_setAttr_T2cleartxt 633 -#define OBJ_setAttr_T2cleartxt OBJ_setAttr_IssCap_T2,2L - -#define SN_setAttr_TokICCsig "setAttr-TokICCsig" -#define LN_setAttr_TokICCsig "ICC or token signature" -#define NID_setAttr_TokICCsig 634 -#define OBJ_setAttr_TokICCsig OBJ_setAttr_IssCap_Sig,1L - -#define SN_setAttr_SecDevSig "setAttr-SecDevSig" -#define LN_setAttr_SecDevSig "secure device signature" -#define NID_setAttr_SecDevSig 635 -#define OBJ_setAttr_SecDevSig OBJ_setAttr_IssCap_Sig,2L - -#define SN_set_brand_IATA_ATA "set-brand-IATA-ATA" -#define NID_set_brand_IATA_ATA 636 -#define OBJ_set_brand_IATA_ATA OBJ_set_brand,1L - -#define SN_set_brand_Diners "set-brand-Diners" -#define NID_set_brand_Diners 637 -#define OBJ_set_brand_Diners OBJ_set_brand,30L - -#define SN_set_brand_AmericanExpress "set-brand-AmericanExpress" -#define NID_set_brand_AmericanExpress 638 -#define OBJ_set_brand_AmericanExpress OBJ_set_brand,34L - -#define SN_set_brand_JCB "set-brand-JCB" -#define NID_set_brand_JCB 639 -#define OBJ_set_brand_JCB OBJ_set_brand,35L - -#define SN_set_brand_Visa "set-brand-Visa" -#define NID_set_brand_Visa 640 -#define OBJ_set_brand_Visa OBJ_set_brand,4L - -#define SN_set_brand_MasterCard "set-brand-MasterCard" -#define NID_set_brand_MasterCard 641 -#define OBJ_set_brand_MasterCard OBJ_set_brand,5L - -#define SN_set_brand_Novus "set-brand-Novus" -#define NID_set_brand_Novus 642 -#define OBJ_set_brand_Novus OBJ_set_brand,6011L - -#define SN_des_cdmf "DES-CDMF" -#define LN_des_cdmf "des-cdmf" -#define NID_des_cdmf 643 -#define OBJ_des_cdmf OBJ_rsadsi,3L,10L - -#define SN_rsaOAEPEncryptionSET "rsaOAEPEncryptionSET" -#define NID_rsaOAEPEncryptionSET 644 -#define OBJ_rsaOAEPEncryptionSET OBJ_rsadsi,1L,1L,6L - -#define SN_ipsec3 "Oakley-EC2N-3" -#define LN_ipsec3 "ipsec3" -#define NID_ipsec3 749 - -#define SN_ipsec4 "Oakley-EC2N-4" -#define LN_ipsec4 "ipsec4" -#define NID_ipsec4 750 - -#define SN_whirlpool "whirlpool" -#define NID_whirlpool 804 -#define OBJ_whirlpool OBJ_iso,0L,10118L,3L,0L,55L - -#define SN_cryptopro "cryptopro" -#define NID_cryptopro 805 -#define OBJ_cryptopro OBJ_member_body,643L,2L,2L - -#define SN_cryptocom "cryptocom" -#define NID_cryptocom 806 -#define OBJ_cryptocom OBJ_member_body,643L,2L,9L - -#define SN_id_GostR3411_94_with_GostR3410_2001 "id-GostR3411-94-with-GostR3410-2001" -#define LN_id_GostR3411_94_with_GostR3410_2001 "GOST R 34.11-94 with GOST R 34.10-2001" -#define NID_id_GostR3411_94_with_GostR3410_2001 807 -#define OBJ_id_GostR3411_94_with_GostR3410_2001 OBJ_cryptopro,3L - -#define SN_id_GostR3411_94_with_GostR3410_94 "id-GostR3411-94-with-GostR3410-94" -#define LN_id_GostR3411_94_with_GostR3410_94 "GOST R 34.11-94 with GOST R 34.10-94" -#define NID_id_GostR3411_94_with_GostR3410_94 808 -#define OBJ_id_GostR3411_94_with_GostR3410_94 OBJ_cryptopro,4L - -#define SN_id_GostR3411_94 "md_gost94" -#define LN_id_GostR3411_94 "GOST R 34.11-94" -#define NID_id_GostR3411_94 809 -#define OBJ_id_GostR3411_94 OBJ_cryptopro,9L - -#define SN_id_HMACGostR3411_94 "id-HMACGostR3411-94" -#define LN_id_HMACGostR3411_94 "HMAC GOST 34.11-94" -#define NID_id_HMACGostR3411_94 810 -#define OBJ_id_HMACGostR3411_94 OBJ_cryptopro,10L - -#define SN_id_GostR3410_2001 "gost2001" -#define LN_id_GostR3410_2001 "GOST R 34.10-2001" -#define NID_id_GostR3410_2001 811 -#define OBJ_id_GostR3410_2001 OBJ_cryptopro,19L - -#define SN_id_GostR3410_94 "gost94" -#define LN_id_GostR3410_94 "GOST R 34.10-94" -#define NID_id_GostR3410_94 812 -#define OBJ_id_GostR3410_94 OBJ_cryptopro,20L - -#define SN_id_Gost28147_89 "gost89" -#define LN_id_Gost28147_89 "GOST 28147-89" -#define NID_id_Gost28147_89 813 -#define OBJ_id_Gost28147_89 OBJ_cryptopro,21L - -#define SN_gost89_cnt "gost89-cnt" -#define NID_gost89_cnt 814 - -#define SN_id_Gost28147_89_MAC "gost-mac" -#define LN_id_Gost28147_89_MAC "GOST 28147-89 MAC" -#define NID_id_Gost28147_89_MAC 815 -#define OBJ_id_Gost28147_89_MAC OBJ_cryptopro,22L - -#define SN_id_GostR3411_94_prf "prf-gostr3411-94" -#define LN_id_GostR3411_94_prf "GOST R 34.11-94 PRF" -#define NID_id_GostR3411_94_prf 816 -#define OBJ_id_GostR3411_94_prf OBJ_cryptopro,23L - -#define SN_id_GostR3410_2001DH "id-GostR3410-2001DH" -#define LN_id_GostR3410_2001DH "GOST R 34.10-2001 DH" -#define NID_id_GostR3410_2001DH 817 -#define OBJ_id_GostR3410_2001DH OBJ_cryptopro,98L - -#define SN_id_GostR3410_94DH "id-GostR3410-94DH" -#define LN_id_GostR3410_94DH "GOST R 34.10-94 DH" -#define NID_id_GostR3410_94DH 818 -#define OBJ_id_GostR3410_94DH OBJ_cryptopro,99L - -#define SN_id_Gost28147_89_CryptoPro_KeyMeshing "id-Gost28147-89-CryptoPro-KeyMeshing" -#define NID_id_Gost28147_89_CryptoPro_KeyMeshing 819 -#define OBJ_id_Gost28147_89_CryptoPro_KeyMeshing OBJ_cryptopro,14L,1L - -#define SN_id_Gost28147_89_None_KeyMeshing "id-Gost28147-89-None-KeyMeshing" -#define NID_id_Gost28147_89_None_KeyMeshing 820 -#define OBJ_id_Gost28147_89_None_KeyMeshing OBJ_cryptopro,14L,0L - -#define SN_id_GostR3411_94_TestParamSet "id-GostR3411-94-TestParamSet" -#define NID_id_GostR3411_94_TestParamSet 821 -#define OBJ_id_GostR3411_94_TestParamSet OBJ_cryptopro,30L,0L - -#define SN_id_GostR3411_94_CryptoProParamSet "id-GostR3411-94-CryptoProParamSet" -#define NID_id_GostR3411_94_CryptoProParamSet 822 -#define OBJ_id_GostR3411_94_CryptoProParamSet OBJ_cryptopro,30L,1L - -#define SN_id_Gost28147_89_TestParamSet "id-Gost28147-89-TestParamSet" -#define NID_id_Gost28147_89_TestParamSet 823 -#define OBJ_id_Gost28147_89_TestParamSet OBJ_cryptopro,31L,0L - -#define SN_id_Gost28147_89_CryptoPro_A_ParamSet "id-Gost28147-89-CryptoPro-A-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_A_ParamSet 824 -#define OBJ_id_Gost28147_89_CryptoPro_A_ParamSet OBJ_cryptopro,31L,1L - -#define SN_id_Gost28147_89_CryptoPro_B_ParamSet "id-Gost28147-89-CryptoPro-B-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_B_ParamSet 825 -#define OBJ_id_Gost28147_89_CryptoPro_B_ParamSet OBJ_cryptopro,31L,2L - -#define SN_id_Gost28147_89_CryptoPro_C_ParamSet "id-Gost28147-89-CryptoPro-C-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_C_ParamSet 826 -#define OBJ_id_Gost28147_89_CryptoPro_C_ParamSet OBJ_cryptopro,31L,3L - -#define SN_id_Gost28147_89_CryptoPro_D_ParamSet "id-Gost28147-89-CryptoPro-D-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_D_ParamSet 827 -#define OBJ_id_Gost28147_89_CryptoPro_D_ParamSet OBJ_cryptopro,31L,4L - -#define SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet 828 -#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet OBJ_cryptopro,31L,5L - -#define SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet 829 -#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet OBJ_cryptopro,31L,6L - -#define SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet "id-Gost28147-89-CryptoPro-RIC-1-ParamSet" -#define NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet 830 -#define OBJ_id_Gost28147_89_CryptoPro_RIC_1_ParamSet OBJ_cryptopro,31L,7L - -#define SN_id_GostR3410_94_TestParamSet "id-GostR3410-94-TestParamSet" -#define NID_id_GostR3410_94_TestParamSet 831 -#define OBJ_id_GostR3410_94_TestParamSet OBJ_cryptopro,32L,0L - -#define SN_id_GostR3410_94_CryptoPro_A_ParamSet "id-GostR3410-94-CryptoPro-A-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_A_ParamSet 832 -#define OBJ_id_GostR3410_94_CryptoPro_A_ParamSet OBJ_cryptopro,32L,2L - -#define SN_id_GostR3410_94_CryptoPro_B_ParamSet "id-GostR3410-94-CryptoPro-B-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_B_ParamSet 833 -#define OBJ_id_GostR3410_94_CryptoPro_B_ParamSet OBJ_cryptopro,32L,3L - -#define SN_id_GostR3410_94_CryptoPro_C_ParamSet "id-GostR3410-94-CryptoPro-C-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_C_ParamSet 834 -#define OBJ_id_GostR3410_94_CryptoPro_C_ParamSet OBJ_cryptopro,32L,4L - -#define SN_id_GostR3410_94_CryptoPro_D_ParamSet "id-GostR3410-94-CryptoPro-D-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_D_ParamSet 835 -#define OBJ_id_GostR3410_94_CryptoPro_D_ParamSet OBJ_cryptopro,32L,5L - -#define SN_id_GostR3410_94_CryptoPro_XchA_ParamSet "id-GostR3410-94-CryptoPro-XchA-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_XchA_ParamSet 836 -#define OBJ_id_GostR3410_94_CryptoPro_XchA_ParamSet OBJ_cryptopro,33L,1L - -#define SN_id_GostR3410_94_CryptoPro_XchB_ParamSet "id-GostR3410-94-CryptoPro-XchB-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_XchB_ParamSet 837 -#define OBJ_id_GostR3410_94_CryptoPro_XchB_ParamSet OBJ_cryptopro,33L,2L - -#define SN_id_GostR3410_94_CryptoPro_XchC_ParamSet "id-GostR3410-94-CryptoPro-XchC-ParamSet" -#define NID_id_GostR3410_94_CryptoPro_XchC_ParamSet 838 -#define OBJ_id_GostR3410_94_CryptoPro_XchC_ParamSet OBJ_cryptopro,33L,3L - -#define SN_id_GostR3410_2001_TestParamSet "id-GostR3410-2001-TestParamSet" -#define NID_id_GostR3410_2001_TestParamSet 839 -#define OBJ_id_GostR3410_2001_TestParamSet OBJ_cryptopro,35L,0L - -#define SN_id_GostR3410_2001_CryptoPro_A_ParamSet "id-GostR3410-2001-CryptoPro-A-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_A_ParamSet 840 -#define OBJ_id_GostR3410_2001_CryptoPro_A_ParamSet OBJ_cryptopro,35L,1L - -#define SN_id_GostR3410_2001_CryptoPro_B_ParamSet "id-GostR3410-2001-CryptoPro-B-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_B_ParamSet 841 -#define OBJ_id_GostR3410_2001_CryptoPro_B_ParamSet OBJ_cryptopro,35L,2L - -#define SN_id_GostR3410_2001_CryptoPro_C_ParamSet "id-GostR3410-2001-CryptoPro-C-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_C_ParamSet 842 -#define OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet OBJ_cryptopro,35L,3L - -#define SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet "id-GostR3410-2001-CryptoPro-XchA-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet 843 -#define OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet OBJ_cryptopro,36L,0L - -#define SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet "id-GostR3410-2001-CryptoPro-XchB-ParamSet" -#define NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet 844 -#define OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet OBJ_cryptopro,36L,1L - -#define SN_id_GostR3410_94_a "id-GostR3410-94-a" -#define NID_id_GostR3410_94_a 845 -#define OBJ_id_GostR3410_94_a OBJ_id_GostR3410_94,1L - -#define SN_id_GostR3410_94_aBis "id-GostR3410-94-aBis" -#define NID_id_GostR3410_94_aBis 846 -#define OBJ_id_GostR3410_94_aBis OBJ_id_GostR3410_94,2L - -#define SN_id_GostR3410_94_b "id-GostR3410-94-b" -#define NID_id_GostR3410_94_b 847 -#define OBJ_id_GostR3410_94_b OBJ_id_GostR3410_94,3L - -#define SN_id_GostR3410_94_bBis "id-GostR3410-94-bBis" -#define NID_id_GostR3410_94_bBis 848 -#define OBJ_id_GostR3410_94_bBis OBJ_id_GostR3410_94,4L - -#define SN_id_Gost28147_89_cc "id-Gost28147-89-cc" -#define LN_id_Gost28147_89_cc "GOST 28147-89 Cryptocom ParamSet" -#define NID_id_Gost28147_89_cc 849 -#define OBJ_id_Gost28147_89_cc OBJ_cryptocom,1L,6L,1L - -#define SN_id_GostR3410_94_cc "gost94cc" -#define LN_id_GostR3410_94_cc "GOST 34.10-94 Cryptocom" -#define NID_id_GostR3410_94_cc 850 -#define OBJ_id_GostR3410_94_cc OBJ_cryptocom,1L,5L,3L - -#define SN_id_GostR3410_2001_cc "gost2001cc" -#define LN_id_GostR3410_2001_cc "GOST 34.10-2001 Cryptocom" -#define NID_id_GostR3410_2001_cc 851 -#define OBJ_id_GostR3410_2001_cc OBJ_cryptocom,1L,5L,4L - -#define SN_id_GostR3411_94_with_GostR3410_94_cc "id-GostR3411-94-with-GostR3410-94-cc" -#define LN_id_GostR3411_94_with_GostR3410_94_cc "GOST R 34.11-94 with GOST R 34.10-94 Cryptocom" -#define NID_id_GostR3411_94_with_GostR3410_94_cc 852 -#define OBJ_id_GostR3411_94_with_GostR3410_94_cc OBJ_cryptocom,1L,3L,3L - -#define SN_id_GostR3411_94_with_GostR3410_2001_cc "id-GostR3411-94-with-GostR3410-2001-cc" -#define LN_id_GostR3411_94_with_GostR3410_2001_cc "GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom" -#define NID_id_GostR3411_94_with_GostR3410_2001_cc 853 -#define OBJ_id_GostR3411_94_with_GostR3410_2001_cc OBJ_cryptocom,1L,3L,4L - -#define SN_id_GostR3410_2001_ParamSet_cc "id-GostR3410-2001-ParamSet-cc" -#define LN_id_GostR3410_2001_ParamSet_cc "GOST R 3410-2001 Parameter Set Cryptocom" -#define NID_id_GostR3410_2001_ParamSet_cc 854 -#define OBJ_id_GostR3410_2001_ParamSet_cc OBJ_cryptocom,1L,8L,1L - -#define SN_camellia_128_cbc "CAMELLIA-128-CBC" -#define LN_camellia_128_cbc "camellia-128-cbc" -#define NID_camellia_128_cbc 751 -#define OBJ_camellia_128_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,2L - -#define SN_camellia_192_cbc "CAMELLIA-192-CBC" -#define LN_camellia_192_cbc "camellia-192-cbc" -#define NID_camellia_192_cbc 752 -#define OBJ_camellia_192_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,3L - -#define SN_camellia_256_cbc "CAMELLIA-256-CBC" -#define LN_camellia_256_cbc "camellia-256-cbc" -#define NID_camellia_256_cbc 753 -#define OBJ_camellia_256_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,4L - -#define SN_id_camellia128_wrap "id-camellia128-wrap" -#define NID_id_camellia128_wrap 907 -#define OBJ_id_camellia128_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,2L - -#define SN_id_camellia192_wrap "id-camellia192-wrap" -#define NID_id_camellia192_wrap 908 -#define OBJ_id_camellia192_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,3L - -#define SN_id_camellia256_wrap "id-camellia256-wrap" -#define NID_id_camellia256_wrap 909 -#define OBJ_id_camellia256_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,4L - -#define OBJ_ntt_ds 0L,3L,4401L,5L - -#define OBJ_camellia OBJ_ntt_ds,3L,1L,9L - -#define SN_camellia_128_ecb "CAMELLIA-128-ECB" -#define LN_camellia_128_ecb "camellia-128-ecb" -#define NID_camellia_128_ecb 754 -#define OBJ_camellia_128_ecb OBJ_camellia,1L - -#define SN_camellia_128_ofb128 "CAMELLIA-128-OFB" -#define LN_camellia_128_ofb128 "camellia-128-ofb" -#define NID_camellia_128_ofb128 766 -#define OBJ_camellia_128_ofb128 OBJ_camellia,3L - -#define SN_camellia_128_cfb128 "CAMELLIA-128-CFB" -#define LN_camellia_128_cfb128 "camellia-128-cfb" -#define NID_camellia_128_cfb128 757 -#define OBJ_camellia_128_cfb128 OBJ_camellia,4L - -#define SN_camellia_192_ecb "CAMELLIA-192-ECB" -#define LN_camellia_192_ecb "camellia-192-ecb" -#define NID_camellia_192_ecb 755 -#define OBJ_camellia_192_ecb OBJ_camellia,21L - -#define SN_camellia_192_ofb128 "CAMELLIA-192-OFB" -#define LN_camellia_192_ofb128 "camellia-192-ofb" -#define NID_camellia_192_ofb128 767 -#define OBJ_camellia_192_ofb128 OBJ_camellia,23L - -#define SN_camellia_192_cfb128 "CAMELLIA-192-CFB" -#define LN_camellia_192_cfb128 "camellia-192-cfb" -#define NID_camellia_192_cfb128 758 -#define OBJ_camellia_192_cfb128 OBJ_camellia,24L - -#define SN_camellia_256_ecb "CAMELLIA-256-ECB" -#define LN_camellia_256_ecb "camellia-256-ecb" -#define NID_camellia_256_ecb 756 -#define OBJ_camellia_256_ecb OBJ_camellia,41L - -#define SN_camellia_256_ofb128 "CAMELLIA-256-OFB" -#define LN_camellia_256_ofb128 "camellia-256-ofb" -#define NID_camellia_256_ofb128 768 -#define OBJ_camellia_256_ofb128 OBJ_camellia,43L - -#define SN_camellia_256_cfb128 "CAMELLIA-256-CFB" -#define LN_camellia_256_cfb128 "camellia-256-cfb" -#define NID_camellia_256_cfb128 759 -#define OBJ_camellia_256_cfb128 OBJ_camellia,44L - -#define SN_camellia_128_cfb1 "CAMELLIA-128-CFB1" -#define LN_camellia_128_cfb1 "camellia-128-cfb1" -#define NID_camellia_128_cfb1 760 - -#define SN_camellia_192_cfb1 "CAMELLIA-192-CFB1" -#define LN_camellia_192_cfb1 "camellia-192-cfb1" -#define NID_camellia_192_cfb1 761 - -#define SN_camellia_256_cfb1 "CAMELLIA-256-CFB1" -#define LN_camellia_256_cfb1 "camellia-256-cfb1" -#define NID_camellia_256_cfb1 762 - -#define SN_camellia_128_cfb8 "CAMELLIA-128-CFB8" -#define LN_camellia_128_cfb8 "camellia-128-cfb8" -#define NID_camellia_128_cfb8 763 - -#define SN_camellia_192_cfb8 "CAMELLIA-192-CFB8" -#define LN_camellia_192_cfb8 "camellia-192-cfb8" -#define NID_camellia_192_cfb8 764 - -#define SN_camellia_256_cfb8 "CAMELLIA-256-CFB8" -#define LN_camellia_256_cfb8 "camellia-256-cfb8" -#define NID_camellia_256_cfb8 765 - -#define SN_kisa "KISA" -#define LN_kisa "kisa" -#define NID_kisa 773 -#define OBJ_kisa OBJ_member_body,410L,200004L - -#define SN_seed_ecb "SEED-ECB" -#define LN_seed_ecb "seed-ecb" -#define NID_seed_ecb 776 -#define OBJ_seed_ecb OBJ_kisa,1L,3L - -#define SN_seed_cbc "SEED-CBC" -#define LN_seed_cbc "seed-cbc" -#define NID_seed_cbc 777 -#define OBJ_seed_cbc OBJ_kisa,1L,4L - -#define SN_seed_cfb128 "SEED-CFB" -#define LN_seed_cfb128 "seed-cfb" -#define NID_seed_cfb128 779 -#define OBJ_seed_cfb128 OBJ_kisa,1L,5L - -#define SN_seed_ofb128 "SEED-OFB" -#define LN_seed_ofb128 "seed-ofb" -#define NID_seed_ofb128 778 -#define OBJ_seed_ofb128 OBJ_kisa,1L,6L - -#define SN_hmac "HMAC" -#define LN_hmac "hmac" -#define NID_hmac 855 - -#define SN_cmac "CMAC" -#define LN_cmac "cmac" -#define NID_cmac 894 - -#define SN_rc4_hmac_md5 "RC4-HMAC-MD5" -#define LN_rc4_hmac_md5 "rc4-hmac-md5" -#define NID_rc4_hmac_md5 915 - -#define SN_aes_128_cbc_hmac_sha1 "AES-128-CBC-HMAC-SHA1" -#define LN_aes_128_cbc_hmac_sha1 "aes-128-cbc-hmac-sha1" -#define NID_aes_128_cbc_hmac_sha1 916 - -#define SN_aes_192_cbc_hmac_sha1 "AES-192-CBC-HMAC-SHA1" -#define LN_aes_192_cbc_hmac_sha1 "aes-192-cbc-hmac-sha1" -#define NID_aes_192_cbc_hmac_sha1 917 - -#define SN_aes_256_cbc_hmac_sha1 "AES-256-CBC-HMAC-SHA1" -#define LN_aes_256_cbc_hmac_sha1 "aes-256-cbc-hmac-sha1" -#define NID_aes_256_cbc_hmac_sha1 918 - -#define SN_aes_128_cbc_hmac_sha256 "AES-128-CBC-HMAC-SHA256" -#define LN_aes_128_cbc_hmac_sha256 "aes-128-cbc-hmac-sha256" -#define NID_aes_128_cbc_hmac_sha256 948 - -#define SN_aes_192_cbc_hmac_sha256 "AES-192-CBC-HMAC-SHA256" -#define LN_aes_192_cbc_hmac_sha256 "aes-192-cbc-hmac-sha256" -#define NID_aes_192_cbc_hmac_sha256 949 - -#define SN_aes_256_cbc_hmac_sha256 "AES-256-CBC-HMAC-SHA256" -#define LN_aes_256_cbc_hmac_sha256 "aes-256-cbc-hmac-sha256" -#define NID_aes_256_cbc_hmac_sha256 950 - -#define SN_dhpublicnumber "dhpublicnumber" -#define LN_dhpublicnumber "X9.42 DH" -#define NID_dhpublicnumber 920 -#define OBJ_dhpublicnumber OBJ_ISO_US,10046L,2L,1L - -#define SN_brainpoolP160r1 "brainpoolP160r1" -#define NID_brainpoolP160r1 921 -#define OBJ_brainpoolP160r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,1L - -#define SN_brainpoolP160t1 "brainpoolP160t1" -#define NID_brainpoolP160t1 922 -#define OBJ_brainpoolP160t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,2L - -#define SN_brainpoolP192r1 "brainpoolP192r1" -#define NID_brainpoolP192r1 923 -#define OBJ_brainpoolP192r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,3L - -#define SN_brainpoolP192t1 "brainpoolP192t1" -#define NID_brainpoolP192t1 924 -#define OBJ_brainpoolP192t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,4L - -#define SN_brainpoolP224r1 "brainpoolP224r1" -#define NID_brainpoolP224r1 925 -#define OBJ_brainpoolP224r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,5L - -#define SN_brainpoolP224t1 "brainpoolP224t1" -#define NID_brainpoolP224t1 926 -#define OBJ_brainpoolP224t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,6L - -#define SN_brainpoolP256r1 "brainpoolP256r1" -#define NID_brainpoolP256r1 927 -#define OBJ_brainpoolP256r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,7L - -#define SN_brainpoolP256t1 "brainpoolP256t1" -#define NID_brainpoolP256t1 928 -#define OBJ_brainpoolP256t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,8L - -#define SN_brainpoolP320r1 "brainpoolP320r1" -#define NID_brainpoolP320r1 929 -#define OBJ_brainpoolP320r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,9L - -#define SN_brainpoolP320t1 "brainpoolP320t1" -#define NID_brainpoolP320t1 930 -#define OBJ_brainpoolP320t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,10L - -#define SN_brainpoolP384r1 "brainpoolP384r1" -#define NID_brainpoolP384r1 931 -#define OBJ_brainpoolP384r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,11L - -#define SN_brainpoolP384t1 "brainpoolP384t1" -#define NID_brainpoolP384t1 932 -#define OBJ_brainpoolP384t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,12L - -#define SN_brainpoolP512r1 "brainpoolP512r1" -#define NID_brainpoolP512r1 933 -#define OBJ_brainpoolP512r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,13L - -#define SN_brainpoolP512t1 "brainpoolP512t1" -#define NID_brainpoolP512t1 934 -#define OBJ_brainpoolP512t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,14L - -#define OBJ_x9_63_scheme 1L,3L,133L,16L,840L,63L,0L - -#define OBJ_secg_scheme OBJ_certicom_arc,1L - -#define SN_dhSinglePass_stdDH_sha1kdf_scheme "dhSinglePass-stdDH-sha1kdf-scheme" -#define NID_dhSinglePass_stdDH_sha1kdf_scheme 936 -#define OBJ_dhSinglePass_stdDH_sha1kdf_scheme OBJ_x9_63_scheme,2L - -#define SN_dhSinglePass_stdDH_sha224kdf_scheme "dhSinglePass-stdDH-sha224kdf-scheme" -#define NID_dhSinglePass_stdDH_sha224kdf_scheme 937 -#define OBJ_dhSinglePass_stdDH_sha224kdf_scheme OBJ_secg_scheme,11L,0L - -#define SN_dhSinglePass_stdDH_sha256kdf_scheme "dhSinglePass-stdDH-sha256kdf-scheme" -#define NID_dhSinglePass_stdDH_sha256kdf_scheme 938 -#define OBJ_dhSinglePass_stdDH_sha256kdf_scheme OBJ_secg_scheme,11L,1L - -#define SN_dhSinglePass_stdDH_sha384kdf_scheme "dhSinglePass-stdDH-sha384kdf-scheme" -#define NID_dhSinglePass_stdDH_sha384kdf_scheme 939 -#define OBJ_dhSinglePass_stdDH_sha384kdf_scheme OBJ_secg_scheme,11L,2L - -#define SN_dhSinglePass_stdDH_sha512kdf_scheme "dhSinglePass-stdDH-sha512kdf-scheme" -#define NID_dhSinglePass_stdDH_sha512kdf_scheme 940 -#define OBJ_dhSinglePass_stdDH_sha512kdf_scheme OBJ_secg_scheme,11L,3L - -#define SN_dhSinglePass_cofactorDH_sha1kdf_scheme "dhSinglePass-cofactorDH-sha1kdf-scheme" -#define NID_dhSinglePass_cofactorDH_sha1kdf_scheme 941 -#define OBJ_dhSinglePass_cofactorDH_sha1kdf_scheme OBJ_x9_63_scheme,3L - -#define SN_dhSinglePass_cofactorDH_sha224kdf_scheme "dhSinglePass-cofactorDH-sha224kdf-scheme" -#define NID_dhSinglePass_cofactorDH_sha224kdf_scheme 942 -#define OBJ_dhSinglePass_cofactorDH_sha224kdf_scheme OBJ_secg_scheme,14L,0L - -#define SN_dhSinglePass_cofactorDH_sha256kdf_scheme "dhSinglePass-cofactorDH-sha256kdf-scheme" -#define NID_dhSinglePass_cofactorDH_sha256kdf_scheme 943 -#define OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme OBJ_secg_scheme,14L,1L - -#define SN_dhSinglePass_cofactorDH_sha384kdf_scheme "dhSinglePass-cofactorDH-sha384kdf-scheme" -#define NID_dhSinglePass_cofactorDH_sha384kdf_scheme 944 -#define OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme OBJ_secg_scheme,14L,2L - -#define SN_dhSinglePass_cofactorDH_sha512kdf_scheme "dhSinglePass-cofactorDH-sha512kdf-scheme" -#define NID_dhSinglePass_cofactorDH_sha512kdf_scheme 945 -#define OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme OBJ_secg_scheme,14L,3L - -#define SN_dh_std_kdf "dh-std-kdf" -#define NID_dh_std_kdf 946 - -#define SN_dh_cofactor_kdf "dh-cofactor-kdf" -#define NID_dh_cofactor_kdf 947 - -#define SN_ct_precert_scts "ct_precert_scts" -#define LN_ct_precert_scts "CT Precertificate SCTs" -#define NID_ct_precert_scts 951 -#define OBJ_ct_precert_scts 1L,3L,6L,1L,4L,1L,11129L,2L,4L,2L - -#define SN_ct_precert_poison "ct_precert_poison" -#define LN_ct_precert_poison "CT Precertificate Poison" -#define NID_ct_precert_poison 952 -#define OBJ_ct_precert_poison 1L,3L,6L,1L,4L,1L,11129L,2L,4L,3L - -#define SN_ct_precert_signer "ct_precert_signer" -#define LN_ct_precert_signer "CT Precertificate Signer" -#define NID_ct_precert_signer 953 -#define OBJ_ct_precert_signer 1L,3L,6L,1L,4L,1L,11129L,2L,4L,4L - -#define SN_ct_cert_scts "ct_cert_scts" -#define LN_ct_cert_scts "CT Certificate SCTs" -#define NID_ct_cert_scts 954 -#define OBJ_ct_cert_scts 1L,3L,6L,1L,4L,1L,11129L,2L,4L,5L - -#define SN_jurisdictionLocalityName "jurisdictionL" -#define LN_jurisdictionLocalityName "jurisdictionLocalityName" -#define NID_jurisdictionLocalityName 955 -#define OBJ_jurisdictionLocalityName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,1L - -#define SN_jurisdictionStateOrProvinceName "jurisdictionST" -#define LN_jurisdictionStateOrProvinceName "jurisdictionStateOrProvinceName" -#define NID_jurisdictionStateOrProvinceName 956 -#define OBJ_jurisdictionStateOrProvinceName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,2L - -#define SN_jurisdictionCountryName "jurisdictionC" -#define LN_jurisdictionCountryName "jurisdictionCountryName" -#define NID_jurisdictionCountryName 957 -#define OBJ_jurisdictionCountryName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,3L +/* + * WARNING: do not edit! + * Generated by crypto/objects/objects.pl + * + * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#define SN_undef "UNDEF" +#define LN_undef "undefined" +#define NID_undef 0 +#define OBJ_undef 0L + +#define SN_itu_t "ITU-T" +#define LN_itu_t "itu-t" +#define NID_itu_t 645 +#define OBJ_itu_t 0L + +#define NID_ccitt 404 +#define OBJ_ccitt OBJ_itu_t + +#define SN_iso "ISO" +#define LN_iso "iso" +#define NID_iso 181 +#define OBJ_iso 1L + +#define SN_joint_iso_itu_t "JOINT-ISO-ITU-T" +#define LN_joint_iso_itu_t "joint-iso-itu-t" +#define NID_joint_iso_itu_t 646 +#define OBJ_joint_iso_itu_t 2L + +#define NID_joint_iso_ccitt 393 +#define OBJ_joint_iso_ccitt OBJ_joint_iso_itu_t + +#define SN_member_body "member-body" +#define LN_member_body "ISO Member Body" +#define NID_member_body 182 +#define OBJ_member_body OBJ_iso,2L + +#define SN_identified_organization "identified-organization" +#define NID_identified_organization 676 +#define OBJ_identified_organization OBJ_iso,3L + +#define SN_hmac_md5 "HMAC-MD5" +#define LN_hmac_md5 "hmac-md5" +#define NID_hmac_md5 780 +#define OBJ_hmac_md5 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,1L + +#define SN_hmac_sha1 "HMAC-SHA1" +#define LN_hmac_sha1 "hmac-sha1" +#define NID_hmac_sha1 781 +#define OBJ_hmac_sha1 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,2L + +#define SN_x509ExtAdmission "x509ExtAdmission" +#define LN_x509ExtAdmission "Professional Information or basis for Admission" +#define NID_x509ExtAdmission 1093 +#define OBJ_x509ExtAdmission OBJ_identified_organization,36L,8L,3L,3L + +#define SN_certicom_arc "certicom-arc" +#define NID_certicom_arc 677 +#define OBJ_certicom_arc OBJ_identified_organization,132L + +#define SN_ieee "ieee" +#define NID_ieee 1170 +#define OBJ_ieee OBJ_identified_organization,111L + +#define SN_ieee_siswg "ieee-siswg" +#define LN_ieee_siswg "IEEE Security in Storage Working Group" +#define NID_ieee_siswg 1171 +#define OBJ_ieee_siswg OBJ_ieee,2L,1619L + +#define SN_international_organizations "international-organizations" +#define LN_international_organizations "International Organizations" +#define NID_international_organizations 647 +#define OBJ_international_organizations OBJ_joint_iso_itu_t,23L + +#define SN_wap "wap" +#define NID_wap 678 +#define OBJ_wap OBJ_international_organizations,43L + +#define SN_wap_wsg "wap-wsg" +#define NID_wap_wsg 679 +#define OBJ_wap_wsg OBJ_wap,1L + +#define SN_selected_attribute_types "selected-attribute-types" +#define LN_selected_attribute_types "Selected Attribute Types" +#define NID_selected_attribute_types 394 +#define OBJ_selected_attribute_types OBJ_joint_iso_itu_t,5L,1L,5L + +#define SN_clearance "clearance" +#define NID_clearance 395 +#define OBJ_clearance OBJ_selected_attribute_types,55L + +#define SN_ISO_US "ISO-US" +#define LN_ISO_US "ISO US Member Body" +#define NID_ISO_US 183 +#define OBJ_ISO_US OBJ_member_body,840L + +#define SN_X9_57 "X9-57" +#define LN_X9_57 "X9.57" +#define NID_X9_57 184 +#define OBJ_X9_57 OBJ_ISO_US,10040L + +#define SN_X9cm "X9cm" +#define LN_X9cm "X9.57 CM ?" +#define NID_X9cm 185 +#define OBJ_X9cm OBJ_X9_57,4L + +#define SN_ISO_CN "ISO-CN" +#define LN_ISO_CN "ISO CN Member Body" +#define NID_ISO_CN 1140 +#define OBJ_ISO_CN OBJ_member_body,156L + +#define SN_oscca "oscca" +#define NID_oscca 1141 +#define OBJ_oscca OBJ_ISO_CN,10197L + +#define SN_sm_scheme "sm-scheme" +#define NID_sm_scheme 1142 +#define OBJ_sm_scheme OBJ_oscca,1L + +#define SN_dsa "DSA" +#define LN_dsa "dsaEncryption" +#define NID_dsa 116 +#define OBJ_dsa OBJ_X9cm,1L + +#define SN_dsaWithSHA1 "DSA-SHA1" +#define LN_dsaWithSHA1 "dsaWithSHA1" +#define NID_dsaWithSHA1 113 +#define OBJ_dsaWithSHA1 OBJ_X9cm,3L + +#define SN_ansi_X9_62 "ansi-X9-62" +#define LN_ansi_X9_62 "ANSI X9.62" +#define NID_ansi_X9_62 405 +#define OBJ_ansi_X9_62 OBJ_ISO_US,10045L + +#define OBJ_X9_62_id_fieldType OBJ_ansi_X9_62,1L + +#define SN_X9_62_prime_field "prime-field" +#define NID_X9_62_prime_field 406 +#define OBJ_X9_62_prime_field OBJ_X9_62_id_fieldType,1L + +#define SN_X9_62_characteristic_two_field "characteristic-two-field" +#define NID_X9_62_characteristic_two_field 407 +#define OBJ_X9_62_characteristic_two_field OBJ_X9_62_id_fieldType,2L + +#define SN_X9_62_id_characteristic_two_basis "id-characteristic-two-basis" +#define NID_X9_62_id_characteristic_two_basis 680 +#define OBJ_X9_62_id_characteristic_two_basis OBJ_X9_62_characteristic_two_field,3L + +#define SN_X9_62_onBasis "onBasis" +#define NID_X9_62_onBasis 681 +#define OBJ_X9_62_onBasis OBJ_X9_62_id_characteristic_two_basis,1L + +#define SN_X9_62_tpBasis "tpBasis" +#define NID_X9_62_tpBasis 682 +#define OBJ_X9_62_tpBasis OBJ_X9_62_id_characteristic_two_basis,2L + +#define SN_X9_62_ppBasis "ppBasis" +#define NID_X9_62_ppBasis 683 +#define OBJ_X9_62_ppBasis OBJ_X9_62_id_characteristic_two_basis,3L + +#define OBJ_X9_62_id_publicKeyType OBJ_ansi_X9_62,2L + +#define SN_X9_62_id_ecPublicKey "id-ecPublicKey" +#define NID_X9_62_id_ecPublicKey 408 +#define OBJ_X9_62_id_ecPublicKey OBJ_X9_62_id_publicKeyType,1L + +#define OBJ_X9_62_ellipticCurve OBJ_ansi_X9_62,3L + +#define OBJ_X9_62_c_TwoCurve OBJ_X9_62_ellipticCurve,0L + +#define SN_X9_62_c2pnb163v1 "c2pnb163v1" +#define NID_X9_62_c2pnb163v1 684 +#define OBJ_X9_62_c2pnb163v1 OBJ_X9_62_c_TwoCurve,1L + +#define SN_X9_62_c2pnb163v2 "c2pnb163v2" +#define NID_X9_62_c2pnb163v2 685 +#define OBJ_X9_62_c2pnb163v2 OBJ_X9_62_c_TwoCurve,2L + +#define SN_X9_62_c2pnb163v3 "c2pnb163v3" +#define NID_X9_62_c2pnb163v3 686 +#define OBJ_X9_62_c2pnb163v3 OBJ_X9_62_c_TwoCurve,3L + +#define SN_X9_62_c2pnb176v1 "c2pnb176v1" +#define NID_X9_62_c2pnb176v1 687 +#define OBJ_X9_62_c2pnb176v1 OBJ_X9_62_c_TwoCurve,4L + +#define SN_X9_62_c2tnb191v1 "c2tnb191v1" +#define NID_X9_62_c2tnb191v1 688 +#define OBJ_X9_62_c2tnb191v1 OBJ_X9_62_c_TwoCurve,5L + +#define SN_X9_62_c2tnb191v2 "c2tnb191v2" +#define NID_X9_62_c2tnb191v2 689 +#define OBJ_X9_62_c2tnb191v2 OBJ_X9_62_c_TwoCurve,6L + +#define SN_X9_62_c2tnb191v3 "c2tnb191v3" +#define NID_X9_62_c2tnb191v3 690 +#define OBJ_X9_62_c2tnb191v3 OBJ_X9_62_c_TwoCurve,7L + +#define SN_X9_62_c2onb191v4 "c2onb191v4" +#define NID_X9_62_c2onb191v4 691 +#define OBJ_X9_62_c2onb191v4 OBJ_X9_62_c_TwoCurve,8L + +#define SN_X9_62_c2onb191v5 "c2onb191v5" +#define NID_X9_62_c2onb191v5 692 +#define OBJ_X9_62_c2onb191v5 OBJ_X9_62_c_TwoCurve,9L + +#define SN_X9_62_c2pnb208w1 "c2pnb208w1" +#define NID_X9_62_c2pnb208w1 693 +#define OBJ_X9_62_c2pnb208w1 OBJ_X9_62_c_TwoCurve,10L + +#define SN_X9_62_c2tnb239v1 "c2tnb239v1" +#define NID_X9_62_c2tnb239v1 694 +#define OBJ_X9_62_c2tnb239v1 OBJ_X9_62_c_TwoCurve,11L + +#define SN_X9_62_c2tnb239v2 "c2tnb239v2" +#define NID_X9_62_c2tnb239v2 695 +#define OBJ_X9_62_c2tnb239v2 OBJ_X9_62_c_TwoCurve,12L + +#define SN_X9_62_c2tnb239v3 "c2tnb239v3" +#define NID_X9_62_c2tnb239v3 696 +#define OBJ_X9_62_c2tnb239v3 OBJ_X9_62_c_TwoCurve,13L + +#define SN_X9_62_c2onb239v4 "c2onb239v4" +#define NID_X9_62_c2onb239v4 697 +#define OBJ_X9_62_c2onb239v4 OBJ_X9_62_c_TwoCurve,14L + +#define SN_X9_62_c2onb239v5 "c2onb239v5" +#define NID_X9_62_c2onb239v5 698 +#define OBJ_X9_62_c2onb239v5 OBJ_X9_62_c_TwoCurve,15L + +#define SN_X9_62_c2pnb272w1 "c2pnb272w1" +#define NID_X9_62_c2pnb272w1 699 +#define OBJ_X9_62_c2pnb272w1 OBJ_X9_62_c_TwoCurve,16L + +#define SN_X9_62_c2pnb304w1 "c2pnb304w1" +#define NID_X9_62_c2pnb304w1 700 +#define OBJ_X9_62_c2pnb304w1 OBJ_X9_62_c_TwoCurve,17L + +#define SN_X9_62_c2tnb359v1 "c2tnb359v1" +#define NID_X9_62_c2tnb359v1 701 +#define OBJ_X9_62_c2tnb359v1 OBJ_X9_62_c_TwoCurve,18L + +#define SN_X9_62_c2pnb368w1 "c2pnb368w1" +#define NID_X9_62_c2pnb368w1 702 +#define OBJ_X9_62_c2pnb368w1 OBJ_X9_62_c_TwoCurve,19L + +#define SN_X9_62_c2tnb431r1 "c2tnb431r1" +#define NID_X9_62_c2tnb431r1 703 +#define OBJ_X9_62_c2tnb431r1 OBJ_X9_62_c_TwoCurve,20L + +#define OBJ_X9_62_primeCurve OBJ_X9_62_ellipticCurve,1L + +#define SN_X9_62_prime192v1 "prime192v1" +#define NID_X9_62_prime192v1 409 +#define OBJ_X9_62_prime192v1 OBJ_X9_62_primeCurve,1L + +#define SN_X9_62_prime192v2 "prime192v2" +#define NID_X9_62_prime192v2 410 +#define OBJ_X9_62_prime192v2 OBJ_X9_62_primeCurve,2L + +#define SN_X9_62_prime192v3 "prime192v3" +#define NID_X9_62_prime192v3 411 +#define OBJ_X9_62_prime192v3 OBJ_X9_62_primeCurve,3L + +#define SN_X9_62_prime239v1 "prime239v1" +#define NID_X9_62_prime239v1 412 +#define OBJ_X9_62_prime239v1 OBJ_X9_62_primeCurve,4L + +#define SN_X9_62_prime239v2 "prime239v2" +#define NID_X9_62_prime239v2 413 +#define OBJ_X9_62_prime239v2 OBJ_X9_62_primeCurve,5L + +#define SN_X9_62_prime239v3 "prime239v3" +#define NID_X9_62_prime239v3 414 +#define OBJ_X9_62_prime239v3 OBJ_X9_62_primeCurve,6L + +#define SN_X9_62_prime256v1 "prime256v1" +#define NID_X9_62_prime256v1 415 +#define OBJ_X9_62_prime256v1 OBJ_X9_62_primeCurve,7L + +#define OBJ_X9_62_id_ecSigType OBJ_ansi_X9_62,4L + +#define SN_ecdsa_with_SHA1 "ecdsa-with-SHA1" +#define NID_ecdsa_with_SHA1 416 +#define OBJ_ecdsa_with_SHA1 OBJ_X9_62_id_ecSigType,1L + +#define SN_ecdsa_with_Recommended "ecdsa-with-Recommended" +#define NID_ecdsa_with_Recommended 791 +#define OBJ_ecdsa_with_Recommended OBJ_X9_62_id_ecSigType,2L + +#define SN_ecdsa_with_Specified "ecdsa-with-Specified" +#define NID_ecdsa_with_Specified 792 +#define OBJ_ecdsa_with_Specified OBJ_X9_62_id_ecSigType,3L + +#define SN_ecdsa_with_SHA224 "ecdsa-with-SHA224" +#define NID_ecdsa_with_SHA224 793 +#define OBJ_ecdsa_with_SHA224 OBJ_ecdsa_with_Specified,1L + +#define SN_ecdsa_with_SHA256 "ecdsa-with-SHA256" +#define NID_ecdsa_with_SHA256 794 +#define OBJ_ecdsa_with_SHA256 OBJ_ecdsa_with_Specified,2L + +#define SN_ecdsa_with_SHA384 "ecdsa-with-SHA384" +#define NID_ecdsa_with_SHA384 795 +#define OBJ_ecdsa_with_SHA384 OBJ_ecdsa_with_Specified,3L + +#define SN_ecdsa_with_SHA512 "ecdsa-with-SHA512" +#define NID_ecdsa_with_SHA512 796 +#define OBJ_ecdsa_with_SHA512 OBJ_ecdsa_with_Specified,4L + +#define OBJ_secg_ellipticCurve OBJ_certicom_arc,0L + +#define SN_secp112r1 "secp112r1" +#define NID_secp112r1 704 +#define OBJ_secp112r1 OBJ_secg_ellipticCurve,6L + +#define SN_secp112r2 "secp112r2" +#define NID_secp112r2 705 +#define OBJ_secp112r2 OBJ_secg_ellipticCurve,7L + +#define SN_secp128r1 "secp128r1" +#define NID_secp128r1 706 +#define OBJ_secp128r1 OBJ_secg_ellipticCurve,28L + +#define SN_secp128r2 "secp128r2" +#define NID_secp128r2 707 +#define OBJ_secp128r2 OBJ_secg_ellipticCurve,29L + +#define SN_secp160k1 "secp160k1" +#define NID_secp160k1 708 +#define OBJ_secp160k1 OBJ_secg_ellipticCurve,9L + +#define SN_secp160r1 "secp160r1" +#define NID_secp160r1 709 +#define OBJ_secp160r1 OBJ_secg_ellipticCurve,8L + +#define SN_secp160r2 "secp160r2" +#define NID_secp160r2 710 +#define OBJ_secp160r2 OBJ_secg_ellipticCurve,30L + +#define SN_secp192k1 "secp192k1" +#define NID_secp192k1 711 +#define OBJ_secp192k1 OBJ_secg_ellipticCurve,31L + +#define SN_secp224k1 "secp224k1" +#define NID_secp224k1 712 +#define OBJ_secp224k1 OBJ_secg_ellipticCurve,32L + +#define SN_secp224r1 "secp224r1" +#define NID_secp224r1 713 +#define OBJ_secp224r1 OBJ_secg_ellipticCurve,33L + +#define SN_secp256k1 "secp256k1" +#define NID_secp256k1 714 +#define OBJ_secp256k1 OBJ_secg_ellipticCurve,10L + +#define SN_secp384r1 "secp384r1" +#define NID_secp384r1 715 +#define OBJ_secp384r1 OBJ_secg_ellipticCurve,34L + +#define SN_secp521r1 "secp521r1" +#define NID_secp521r1 716 +#define OBJ_secp521r1 OBJ_secg_ellipticCurve,35L + +#define SN_sect113r1 "sect113r1" +#define NID_sect113r1 717 +#define OBJ_sect113r1 OBJ_secg_ellipticCurve,4L + +#define SN_sect113r2 "sect113r2" +#define NID_sect113r2 718 +#define OBJ_sect113r2 OBJ_secg_ellipticCurve,5L + +#define SN_sect131r1 "sect131r1" +#define NID_sect131r1 719 +#define OBJ_sect131r1 OBJ_secg_ellipticCurve,22L + +#define SN_sect131r2 "sect131r2" +#define NID_sect131r2 720 +#define OBJ_sect131r2 OBJ_secg_ellipticCurve,23L + +#define SN_sect163k1 "sect163k1" +#define NID_sect163k1 721 +#define OBJ_sect163k1 OBJ_secg_ellipticCurve,1L + +#define SN_sect163r1 "sect163r1" +#define NID_sect163r1 722 +#define OBJ_sect163r1 OBJ_secg_ellipticCurve,2L + +#define SN_sect163r2 "sect163r2" +#define NID_sect163r2 723 +#define OBJ_sect163r2 OBJ_secg_ellipticCurve,15L + +#define SN_sect193r1 "sect193r1" +#define NID_sect193r1 724 +#define OBJ_sect193r1 OBJ_secg_ellipticCurve,24L + +#define SN_sect193r2 "sect193r2" +#define NID_sect193r2 725 +#define OBJ_sect193r2 OBJ_secg_ellipticCurve,25L + +#define SN_sect233k1 "sect233k1" +#define NID_sect233k1 726 +#define OBJ_sect233k1 OBJ_secg_ellipticCurve,26L + +#define SN_sect233r1 "sect233r1" +#define NID_sect233r1 727 +#define OBJ_sect233r1 OBJ_secg_ellipticCurve,27L + +#define SN_sect239k1 "sect239k1" +#define NID_sect239k1 728 +#define OBJ_sect239k1 OBJ_secg_ellipticCurve,3L + +#define SN_sect283k1 "sect283k1" +#define NID_sect283k1 729 +#define OBJ_sect283k1 OBJ_secg_ellipticCurve,16L + +#define SN_sect283r1 "sect283r1" +#define NID_sect283r1 730 +#define OBJ_sect283r1 OBJ_secg_ellipticCurve,17L + +#define SN_sect409k1 "sect409k1" +#define NID_sect409k1 731 +#define OBJ_sect409k1 OBJ_secg_ellipticCurve,36L + +#define SN_sect409r1 "sect409r1" +#define NID_sect409r1 732 +#define OBJ_sect409r1 OBJ_secg_ellipticCurve,37L + +#define SN_sect571k1 "sect571k1" +#define NID_sect571k1 733 +#define OBJ_sect571k1 OBJ_secg_ellipticCurve,38L + +#define SN_sect571r1 "sect571r1" +#define NID_sect571r1 734 +#define OBJ_sect571r1 OBJ_secg_ellipticCurve,39L + +#define OBJ_wap_wsg_idm_ecid OBJ_wap_wsg,4L + +#define SN_wap_wsg_idm_ecid_wtls1 "wap-wsg-idm-ecid-wtls1" +#define NID_wap_wsg_idm_ecid_wtls1 735 +#define OBJ_wap_wsg_idm_ecid_wtls1 OBJ_wap_wsg_idm_ecid,1L + +#define SN_wap_wsg_idm_ecid_wtls3 "wap-wsg-idm-ecid-wtls3" +#define NID_wap_wsg_idm_ecid_wtls3 736 +#define OBJ_wap_wsg_idm_ecid_wtls3 OBJ_wap_wsg_idm_ecid,3L + +#define SN_wap_wsg_idm_ecid_wtls4 "wap-wsg-idm-ecid-wtls4" +#define NID_wap_wsg_idm_ecid_wtls4 737 +#define OBJ_wap_wsg_idm_ecid_wtls4 OBJ_wap_wsg_idm_ecid,4L + +#define SN_wap_wsg_idm_ecid_wtls5 "wap-wsg-idm-ecid-wtls5" +#define NID_wap_wsg_idm_ecid_wtls5 738 +#define OBJ_wap_wsg_idm_ecid_wtls5 OBJ_wap_wsg_idm_ecid,5L + +#define SN_wap_wsg_idm_ecid_wtls6 "wap-wsg-idm-ecid-wtls6" +#define NID_wap_wsg_idm_ecid_wtls6 739 +#define OBJ_wap_wsg_idm_ecid_wtls6 OBJ_wap_wsg_idm_ecid,6L + +#define SN_wap_wsg_idm_ecid_wtls7 "wap-wsg-idm-ecid-wtls7" +#define NID_wap_wsg_idm_ecid_wtls7 740 +#define OBJ_wap_wsg_idm_ecid_wtls7 OBJ_wap_wsg_idm_ecid,7L + +#define SN_wap_wsg_idm_ecid_wtls8 "wap-wsg-idm-ecid-wtls8" +#define NID_wap_wsg_idm_ecid_wtls8 741 +#define OBJ_wap_wsg_idm_ecid_wtls8 OBJ_wap_wsg_idm_ecid,8L + +#define SN_wap_wsg_idm_ecid_wtls9 "wap-wsg-idm-ecid-wtls9" +#define NID_wap_wsg_idm_ecid_wtls9 742 +#define OBJ_wap_wsg_idm_ecid_wtls9 OBJ_wap_wsg_idm_ecid,9L + +#define SN_wap_wsg_idm_ecid_wtls10 "wap-wsg-idm-ecid-wtls10" +#define NID_wap_wsg_idm_ecid_wtls10 743 +#define OBJ_wap_wsg_idm_ecid_wtls10 OBJ_wap_wsg_idm_ecid,10L + +#define SN_wap_wsg_idm_ecid_wtls11 "wap-wsg-idm-ecid-wtls11" +#define NID_wap_wsg_idm_ecid_wtls11 744 +#define OBJ_wap_wsg_idm_ecid_wtls11 OBJ_wap_wsg_idm_ecid,11L + +#define SN_wap_wsg_idm_ecid_wtls12 "wap-wsg-idm-ecid-wtls12" +#define NID_wap_wsg_idm_ecid_wtls12 745 +#define OBJ_wap_wsg_idm_ecid_wtls12 OBJ_wap_wsg_idm_ecid,12L + +#define SN_cast5_cbc "CAST5-CBC" +#define LN_cast5_cbc "cast5-cbc" +#define NID_cast5_cbc 108 +#define OBJ_cast5_cbc OBJ_ISO_US,113533L,7L,66L,10L + +#define SN_cast5_ecb "CAST5-ECB" +#define LN_cast5_ecb "cast5-ecb" +#define NID_cast5_ecb 109 + +#define SN_cast5_cfb64 "CAST5-CFB" +#define LN_cast5_cfb64 "cast5-cfb" +#define NID_cast5_cfb64 110 + +#define SN_cast5_ofb64 "CAST5-OFB" +#define LN_cast5_ofb64 "cast5-ofb" +#define NID_cast5_ofb64 111 + +#define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" +#define NID_pbeWithMD5AndCast5_CBC 112 +#define OBJ_pbeWithMD5AndCast5_CBC OBJ_ISO_US,113533L,7L,66L,12L + +#define SN_id_PasswordBasedMAC "id-PasswordBasedMAC" +#define LN_id_PasswordBasedMAC "password based MAC" +#define NID_id_PasswordBasedMAC 782 +#define OBJ_id_PasswordBasedMAC OBJ_ISO_US,113533L,7L,66L,13L + +#define SN_id_DHBasedMac "id-DHBasedMac" +#define LN_id_DHBasedMac "Diffie-Hellman based MAC" +#define NID_id_DHBasedMac 783 +#define OBJ_id_DHBasedMac OBJ_ISO_US,113533L,7L,66L,30L + +#define SN_rsadsi "rsadsi" +#define LN_rsadsi "RSA Data Security, Inc." +#define NID_rsadsi 1 +#define OBJ_rsadsi OBJ_ISO_US,113549L + +#define SN_pkcs "pkcs" +#define LN_pkcs "RSA Data Security, Inc. PKCS" +#define NID_pkcs 2 +#define OBJ_pkcs OBJ_rsadsi,1L + +#define SN_pkcs1 "pkcs1" +#define NID_pkcs1 186 +#define OBJ_pkcs1 OBJ_pkcs,1L + +#define LN_rsaEncryption "rsaEncryption" +#define NID_rsaEncryption 6 +#define OBJ_rsaEncryption OBJ_pkcs1,1L + +#define SN_md2WithRSAEncryption "RSA-MD2" +#define LN_md2WithRSAEncryption "md2WithRSAEncryption" +#define NID_md2WithRSAEncryption 7 +#define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L + +#define SN_md4WithRSAEncryption "RSA-MD4" +#define LN_md4WithRSAEncryption "md4WithRSAEncryption" +#define NID_md4WithRSAEncryption 396 +#define OBJ_md4WithRSAEncryption OBJ_pkcs1,3L + +#define SN_md5WithRSAEncryption "RSA-MD5" +#define LN_md5WithRSAEncryption "md5WithRSAEncryption" +#define NID_md5WithRSAEncryption 8 +#define OBJ_md5WithRSAEncryption OBJ_pkcs1,4L + +#define SN_sha1WithRSAEncryption "RSA-SHA1" +#define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" +#define NID_sha1WithRSAEncryption 65 +#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L + +#define SN_rsaesOaep "RSAES-OAEP" +#define LN_rsaesOaep "rsaesOaep" +#define NID_rsaesOaep 919 +#define OBJ_rsaesOaep OBJ_pkcs1,7L + +#define SN_mgf1 "MGF1" +#define LN_mgf1 "mgf1" +#define NID_mgf1 911 +#define OBJ_mgf1 OBJ_pkcs1,8L + +#define SN_pSpecified "PSPECIFIED" +#define LN_pSpecified "pSpecified" +#define NID_pSpecified 935 +#define OBJ_pSpecified OBJ_pkcs1,9L + +#define SN_rsassaPss "RSASSA-PSS" +#define LN_rsassaPss "rsassaPss" +#define NID_rsassaPss 912 +#define OBJ_rsassaPss OBJ_pkcs1,10L + +#define SN_sha256WithRSAEncryption "RSA-SHA256" +#define LN_sha256WithRSAEncryption "sha256WithRSAEncryption" +#define NID_sha256WithRSAEncryption 668 +#define OBJ_sha256WithRSAEncryption OBJ_pkcs1,11L + +#define SN_sha384WithRSAEncryption "RSA-SHA384" +#define LN_sha384WithRSAEncryption "sha384WithRSAEncryption" +#define NID_sha384WithRSAEncryption 669 +#define OBJ_sha384WithRSAEncryption OBJ_pkcs1,12L + +#define SN_sha512WithRSAEncryption "RSA-SHA512" +#define LN_sha512WithRSAEncryption "sha512WithRSAEncryption" +#define NID_sha512WithRSAEncryption 670 +#define OBJ_sha512WithRSAEncryption OBJ_pkcs1,13L + +#define SN_sha224WithRSAEncryption "RSA-SHA224" +#define LN_sha224WithRSAEncryption "sha224WithRSAEncryption" +#define NID_sha224WithRSAEncryption 671 +#define OBJ_sha224WithRSAEncryption OBJ_pkcs1,14L + +#define SN_sha512_224WithRSAEncryption "RSA-SHA512/224" +#define LN_sha512_224WithRSAEncryption "sha512-224WithRSAEncryption" +#define NID_sha512_224WithRSAEncryption 1145 +#define OBJ_sha512_224WithRSAEncryption OBJ_pkcs1,15L + +#define SN_sha512_256WithRSAEncryption "RSA-SHA512/256" +#define LN_sha512_256WithRSAEncryption "sha512-256WithRSAEncryption" +#define NID_sha512_256WithRSAEncryption 1146 +#define OBJ_sha512_256WithRSAEncryption OBJ_pkcs1,16L + +#define SN_pkcs3 "pkcs3" +#define NID_pkcs3 27 +#define OBJ_pkcs3 OBJ_pkcs,3L + +#define LN_dhKeyAgreement "dhKeyAgreement" +#define NID_dhKeyAgreement 28 +#define OBJ_dhKeyAgreement OBJ_pkcs3,1L + +#define SN_pkcs5 "pkcs5" +#define NID_pkcs5 187 +#define OBJ_pkcs5 OBJ_pkcs,5L + +#define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" +#define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" +#define NID_pbeWithMD2AndDES_CBC 9 +#define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs5,1L + +#define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" +#define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" +#define NID_pbeWithMD5AndDES_CBC 10 +#define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs5,3L + +#define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" +#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" +#define NID_pbeWithMD2AndRC2_CBC 168 +#define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs5,4L + +#define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" +#define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" +#define NID_pbeWithMD5AndRC2_CBC 169 +#define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs5,6L + +#define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" +#define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" +#define NID_pbeWithSHA1AndDES_CBC 170 +#define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs5,10L + +#define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" +#define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" +#define NID_pbeWithSHA1AndRC2_CBC 68 +#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs5,11L + +#define LN_id_pbkdf2 "PBKDF2" +#define NID_id_pbkdf2 69 +#define OBJ_id_pbkdf2 OBJ_pkcs5,12L + +#define LN_pbes2 "PBES2" +#define NID_pbes2 161 +#define OBJ_pbes2 OBJ_pkcs5,13L + +#define LN_pbmac1 "PBMAC1" +#define NID_pbmac1 162 +#define OBJ_pbmac1 OBJ_pkcs5,14L + +#define SN_pkcs7 "pkcs7" +#define NID_pkcs7 20 +#define OBJ_pkcs7 OBJ_pkcs,7L + +#define LN_pkcs7_data "pkcs7-data" +#define NID_pkcs7_data 21 +#define OBJ_pkcs7_data OBJ_pkcs7,1L + +#define LN_pkcs7_signed "pkcs7-signedData" +#define NID_pkcs7_signed 22 +#define OBJ_pkcs7_signed OBJ_pkcs7,2L + +#define LN_pkcs7_enveloped "pkcs7-envelopedData" +#define NID_pkcs7_enveloped 23 +#define OBJ_pkcs7_enveloped OBJ_pkcs7,3L + +#define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" +#define NID_pkcs7_signedAndEnveloped 24 +#define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L + +#define LN_pkcs7_digest "pkcs7-digestData" +#define NID_pkcs7_digest 25 +#define OBJ_pkcs7_digest OBJ_pkcs7,5L + +#define LN_pkcs7_encrypted "pkcs7-encryptedData" +#define NID_pkcs7_encrypted 26 +#define OBJ_pkcs7_encrypted OBJ_pkcs7,6L + +#define SN_pkcs9 "pkcs9" +#define NID_pkcs9 47 +#define OBJ_pkcs9 OBJ_pkcs,9L + +#define LN_pkcs9_emailAddress "emailAddress" +#define NID_pkcs9_emailAddress 48 +#define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L + +#define LN_pkcs9_unstructuredName "unstructuredName" +#define NID_pkcs9_unstructuredName 49 +#define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L + +#define LN_pkcs9_contentType "contentType" +#define NID_pkcs9_contentType 50 +#define OBJ_pkcs9_contentType OBJ_pkcs9,3L + +#define LN_pkcs9_messageDigest "messageDigest" +#define NID_pkcs9_messageDigest 51 +#define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L + +#define LN_pkcs9_signingTime "signingTime" +#define NID_pkcs9_signingTime 52 +#define OBJ_pkcs9_signingTime OBJ_pkcs9,5L + +#define LN_pkcs9_countersignature "countersignature" +#define NID_pkcs9_countersignature 53 +#define OBJ_pkcs9_countersignature OBJ_pkcs9,6L + +#define LN_pkcs9_challengePassword "challengePassword" +#define NID_pkcs9_challengePassword 54 +#define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L + +#define LN_pkcs9_unstructuredAddress "unstructuredAddress" +#define NID_pkcs9_unstructuredAddress 55 +#define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L + +#define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" +#define NID_pkcs9_extCertAttributes 56 +#define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L + +#define SN_ext_req "extReq" +#define LN_ext_req "Extension Request" +#define NID_ext_req 172 +#define OBJ_ext_req OBJ_pkcs9,14L + +#define SN_SMIMECapabilities "SMIME-CAPS" +#define LN_SMIMECapabilities "S/MIME Capabilities" +#define NID_SMIMECapabilities 167 +#define OBJ_SMIMECapabilities OBJ_pkcs9,15L + +#define SN_SMIME "SMIME" +#define LN_SMIME "S/MIME" +#define NID_SMIME 188 +#define OBJ_SMIME OBJ_pkcs9,16L + +#define SN_id_smime_mod "id-smime-mod" +#define NID_id_smime_mod 189 +#define OBJ_id_smime_mod OBJ_SMIME,0L + +#define SN_id_smime_ct "id-smime-ct" +#define NID_id_smime_ct 190 +#define OBJ_id_smime_ct OBJ_SMIME,1L + +#define SN_id_smime_aa "id-smime-aa" +#define NID_id_smime_aa 191 +#define OBJ_id_smime_aa OBJ_SMIME,2L + +#define SN_id_smime_alg "id-smime-alg" +#define NID_id_smime_alg 192 +#define OBJ_id_smime_alg OBJ_SMIME,3L + +#define SN_id_smime_cd "id-smime-cd" +#define NID_id_smime_cd 193 +#define OBJ_id_smime_cd OBJ_SMIME,4L + +#define SN_id_smime_spq "id-smime-spq" +#define NID_id_smime_spq 194 +#define OBJ_id_smime_spq OBJ_SMIME,5L + +#define SN_id_smime_cti "id-smime-cti" +#define NID_id_smime_cti 195 +#define OBJ_id_smime_cti OBJ_SMIME,6L + +#define SN_id_smime_mod_cms "id-smime-mod-cms" +#define NID_id_smime_mod_cms 196 +#define OBJ_id_smime_mod_cms OBJ_id_smime_mod,1L + +#define SN_id_smime_mod_ess "id-smime-mod-ess" +#define NID_id_smime_mod_ess 197 +#define OBJ_id_smime_mod_ess OBJ_id_smime_mod,2L + +#define SN_id_smime_mod_oid "id-smime-mod-oid" +#define NID_id_smime_mod_oid 198 +#define OBJ_id_smime_mod_oid OBJ_id_smime_mod,3L + +#define SN_id_smime_mod_msg_v3 "id-smime-mod-msg-v3" +#define NID_id_smime_mod_msg_v3 199 +#define OBJ_id_smime_mod_msg_v3 OBJ_id_smime_mod,4L + +#define SN_id_smime_mod_ets_eSignature_88 "id-smime-mod-ets-eSignature-88" +#define NID_id_smime_mod_ets_eSignature_88 200 +#define OBJ_id_smime_mod_ets_eSignature_88 OBJ_id_smime_mod,5L + +#define SN_id_smime_mod_ets_eSignature_97 "id-smime-mod-ets-eSignature-97" +#define NID_id_smime_mod_ets_eSignature_97 201 +#define OBJ_id_smime_mod_ets_eSignature_97 OBJ_id_smime_mod,6L + +#define SN_id_smime_mod_ets_eSigPolicy_88 "id-smime-mod-ets-eSigPolicy-88" +#define NID_id_smime_mod_ets_eSigPolicy_88 202 +#define OBJ_id_smime_mod_ets_eSigPolicy_88 OBJ_id_smime_mod,7L + +#define SN_id_smime_mod_ets_eSigPolicy_97 "id-smime-mod-ets-eSigPolicy-97" +#define NID_id_smime_mod_ets_eSigPolicy_97 203 +#define OBJ_id_smime_mod_ets_eSigPolicy_97 OBJ_id_smime_mod,8L + +#define SN_id_smime_ct_receipt "id-smime-ct-receipt" +#define NID_id_smime_ct_receipt 204 +#define OBJ_id_smime_ct_receipt OBJ_id_smime_ct,1L + +#define SN_id_smime_ct_authData "id-smime-ct-authData" +#define NID_id_smime_ct_authData 205 +#define OBJ_id_smime_ct_authData OBJ_id_smime_ct,2L + +#define SN_id_smime_ct_publishCert "id-smime-ct-publishCert" +#define NID_id_smime_ct_publishCert 206 +#define OBJ_id_smime_ct_publishCert OBJ_id_smime_ct,3L + +#define SN_id_smime_ct_TSTInfo "id-smime-ct-TSTInfo" +#define NID_id_smime_ct_TSTInfo 207 +#define OBJ_id_smime_ct_TSTInfo OBJ_id_smime_ct,4L + +#define SN_id_smime_ct_TDTInfo "id-smime-ct-TDTInfo" +#define NID_id_smime_ct_TDTInfo 208 +#define OBJ_id_smime_ct_TDTInfo OBJ_id_smime_ct,5L + +#define SN_id_smime_ct_contentInfo "id-smime-ct-contentInfo" +#define NID_id_smime_ct_contentInfo 209 +#define OBJ_id_smime_ct_contentInfo OBJ_id_smime_ct,6L + +#define SN_id_smime_ct_DVCSRequestData "id-smime-ct-DVCSRequestData" +#define NID_id_smime_ct_DVCSRequestData 210 +#define OBJ_id_smime_ct_DVCSRequestData OBJ_id_smime_ct,7L + +#define SN_id_smime_ct_DVCSResponseData "id-smime-ct-DVCSResponseData" +#define NID_id_smime_ct_DVCSResponseData 211 +#define OBJ_id_smime_ct_DVCSResponseData OBJ_id_smime_ct,8L + +#define SN_id_smime_ct_compressedData "id-smime-ct-compressedData" +#define NID_id_smime_ct_compressedData 786 +#define OBJ_id_smime_ct_compressedData OBJ_id_smime_ct,9L + +#define SN_id_smime_ct_contentCollection "id-smime-ct-contentCollection" +#define NID_id_smime_ct_contentCollection 1058 +#define OBJ_id_smime_ct_contentCollection OBJ_id_smime_ct,19L + +#define SN_id_smime_ct_authEnvelopedData "id-smime-ct-authEnvelopedData" +#define NID_id_smime_ct_authEnvelopedData 1059 +#define OBJ_id_smime_ct_authEnvelopedData OBJ_id_smime_ct,23L + +#define SN_id_ct_asciiTextWithCRLF "id-ct-asciiTextWithCRLF" +#define NID_id_ct_asciiTextWithCRLF 787 +#define OBJ_id_ct_asciiTextWithCRLF OBJ_id_smime_ct,27L + +#define SN_id_ct_xml "id-ct-xml" +#define NID_id_ct_xml 1060 +#define OBJ_id_ct_xml OBJ_id_smime_ct,28L + +#define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest" +#define NID_id_smime_aa_receiptRequest 212 +#define OBJ_id_smime_aa_receiptRequest OBJ_id_smime_aa,1L + +#define SN_id_smime_aa_securityLabel "id-smime-aa-securityLabel" +#define NID_id_smime_aa_securityLabel 213 +#define OBJ_id_smime_aa_securityLabel OBJ_id_smime_aa,2L + +#define SN_id_smime_aa_mlExpandHistory "id-smime-aa-mlExpandHistory" +#define NID_id_smime_aa_mlExpandHistory 214 +#define OBJ_id_smime_aa_mlExpandHistory OBJ_id_smime_aa,3L + +#define SN_id_smime_aa_contentHint "id-smime-aa-contentHint" +#define NID_id_smime_aa_contentHint 215 +#define OBJ_id_smime_aa_contentHint OBJ_id_smime_aa,4L + +#define SN_id_smime_aa_msgSigDigest "id-smime-aa-msgSigDigest" +#define NID_id_smime_aa_msgSigDigest 216 +#define OBJ_id_smime_aa_msgSigDigest OBJ_id_smime_aa,5L + +#define SN_id_smime_aa_encapContentType "id-smime-aa-encapContentType" +#define NID_id_smime_aa_encapContentType 217 +#define OBJ_id_smime_aa_encapContentType OBJ_id_smime_aa,6L + +#define SN_id_smime_aa_contentIdentifier "id-smime-aa-contentIdentifier" +#define NID_id_smime_aa_contentIdentifier 218 +#define OBJ_id_smime_aa_contentIdentifier OBJ_id_smime_aa,7L + +#define SN_id_smime_aa_macValue "id-smime-aa-macValue" +#define NID_id_smime_aa_macValue 219 +#define OBJ_id_smime_aa_macValue OBJ_id_smime_aa,8L + +#define SN_id_smime_aa_equivalentLabels "id-smime-aa-equivalentLabels" +#define NID_id_smime_aa_equivalentLabels 220 +#define OBJ_id_smime_aa_equivalentLabels OBJ_id_smime_aa,9L + +#define SN_id_smime_aa_contentReference "id-smime-aa-contentReference" +#define NID_id_smime_aa_contentReference 221 +#define OBJ_id_smime_aa_contentReference OBJ_id_smime_aa,10L + +#define SN_id_smime_aa_encrypKeyPref "id-smime-aa-encrypKeyPref" +#define NID_id_smime_aa_encrypKeyPref 222 +#define OBJ_id_smime_aa_encrypKeyPref OBJ_id_smime_aa,11L + +#define SN_id_smime_aa_signingCertificate "id-smime-aa-signingCertificate" +#define NID_id_smime_aa_signingCertificate 223 +#define OBJ_id_smime_aa_signingCertificate OBJ_id_smime_aa,12L + +#define SN_id_smime_aa_smimeEncryptCerts "id-smime-aa-smimeEncryptCerts" +#define NID_id_smime_aa_smimeEncryptCerts 224 +#define OBJ_id_smime_aa_smimeEncryptCerts OBJ_id_smime_aa,13L + +#define SN_id_smime_aa_timeStampToken "id-smime-aa-timeStampToken" +#define NID_id_smime_aa_timeStampToken 225 +#define OBJ_id_smime_aa_timeStampToken OBJ_id_smime_aa,14L + +#define SN_id_smime_aa_ets_sigPolicyId "id-smime-aa-ets-sigPolicyId" +#define NID_id_smime_aa_ets_sigPolicyId 226 +#define OBJ_id_smime_aa_ets_sigPolicyId OBJ_id_smime_aa,15L + +#define SN_id_smime_aa_ets_commitmentType "id-smime-aa-ets-commitmentType" +#define NID_id_smime_aa_ets_commitmentType 227 +#define OBJ_id_smime_aa_ets_commitmentType OBJ_id_smime_aa,16L + +#define SN_id_smime_aa_ets_signerLocation "id-smime-aa-ets-signerLocation" +#define NID_id_smime_aa_ets_signerLocation 228 +#define OBJ_id_smime_aa_ets_signerLocation OBJ_id_smime_aa,17L + +#define SN_id_smime_aa_ets_signerAttr "id-smime-aa-ets-signerAttr" +#define NID_id_smime_aa_ets_signerAttr 229 +#define OBJ_id_smime_aa_ets_signerAttr OBJ_id_smime_aa,18L + +#define SN_id_smime_aa_ets_otherSigCert "id-smime-aa-ets-otherSigCert" +#define NID_id_smime_aa_ets_otherSigCert 230 +#define OBJ_id_smime_aa_ets_otherSigCert OBJ_id_smime_aa,19L + +#define SN_id_smime_aa_ets_contentTimestamp "id-smime-aa-ets-contentTimestamp" +#define NID_id_smime_aa_ets_contentTimestamp 231 +#define OBJ_id_smime_aa_ets_contentTimestamp OBJ_id_smime_aa,20L + +#define SN_id_smime_aa_ets_CertificateRefs "id-smime-aa-ets-CertificateRefs" +#define NID_id_smime_aa_ets_CertificateRefs 232 +#define OBJ_id_smime_aa_ets_CertificateRefs OBJ_id_smime_aa,21L + +#define SN_id_smime_aa_ets_RevocationRefs "id-smime-aa-ets-RevocationRefs" +#define NID_id_smime_aa_ets_RevocationRefs 233 +#define OBJ_id_smime_aa_ets_RevocationRefs OBJ_id_smime_aa,22L + +#define SN_id_smime_aa_ets_certValues "id-smime-aa-ets-certValues" +#define NID_id_smime_aa_ets_certValues 234 +#define OBJ_id_smime_aa_ets_certValues OBJ_id_smime_aa,23L + +#define SN_id_smime_aa_ets_revocationValues "id-smime-aa-ets-revocationValues" +#define NID_id_smime_aa_ets_revocationValues 235 +#define OBJ_id_smime_aa_ets_revocationValues OBJ_id_smime_aa,24L + +#define SN_id_smime_aa_ets_escTimeStamp "id-smime-aa-ets-escTimeStamp" +#define NID_id_smime_aa_ets_escTimeStamp 236 +#define OBJ_id_smime_aa_ets_escTimeStamp OBJ_id_smime_aa,25L + +#define SN_id_smime_aa_ets_certCRLTimestamp "id-smime-aa-ets-certCRLTimestamp" +#define NID_id_smime_aa_ets_certCRLTimestamp 237 +#define OBJ_id_smime_aa_ets_certCRLTimestamp OBJ_id_smime_aa,26L + +#define SN_id_smime_aa_ets_archiveTimeStamp "id-smime-aa-ets-archiveTimeStamp" +#define NID_id_smime_aa_ets_archiveTimeStamp 238 +#define OBJ_id_smime_aa_ets_archiveTimeStamp OBJ_id_smime_aa,27L + +#define SN_id_smime_aa_signatureType "id-smime-aa-signatureType" +#define NID_id_smime_aa_signatureType 239 +#define OBJ_id_smime_aa_signatureType OBJ_id_smime_aa,28L + +#define SN_id_smime_aa_dvcs_dvc "id-smime-aa-dvcs-dvc" +#define NID_id_smime_aa_dvcs_dvc 240 +#define OBJ_id_smime_aa_dvcs_dvc OBJ_id_smime_aa,29L + +#define SN_id_smime_aa_signingCertificateV2 "id-smime-aa-signingCertificateV2" +#define NID_id_smime_aa_signingCertificateV2 1086 +#define OBJ_id_smime_aa_signingCertificateV2 OBJ_id_smime_aa,47L + +#define SN_id_smime_alg_ESDHwith3DES "id-smime-alg-ESDHwith3DES" +#define NID_id_smime_alg_ESDHwith3DES 241 +#define OBJ_id_smime_alg_ESDHwith3DES OBJ_id_smime_alg,1L + +#define SN_id_smime_alg_ESDHwithRC2 "id-smime-alg-ESDHwithRC2" +#define NID_id_smime_alg_ESDHwithRC2 242 +#define OBJ_id_smime_alg_ESDHwithRC2 OBJ_id_smime_alg,2L + +#define SN_id_smime_alg_3DESwrap "id-smime-alg-3DESwrap" +#define NID_id_smime_alg_3DESwrap 243 +#define OBJ_id_smime_alg_3DESwrap OBJ_id_smime_alg,3L + +#define SN_id_smime_alg_RC2wrap "id-smime-alg-RC2wrap" +#define NID_id_smime_alg_RC2wrap 244 +#define OBJ_id_smime_alg_RC2wrap OBJ_id_smime_alg,4L + +#define SN_id_smime_alg_ESDH "id-smime-alg-ESDH" +#define NID_id_smime_alg_ESDH 245 +#define OBJ_id_smime_alg_ESDH OBJ_id_smime_alg,5L + +#define SN_id_smime_alg_CMS3DESwrap "id-smime-alg-CMS3DESwrap" +#define NID_id_smime_alg_CMS3DESwrap 246 +#define OBJ_id_smime_alg_CMS3DESwrap OBJ_id_smime_alg,6L + +#define SN_id_smime_alg_CMSRC2wrap "id-smime-alg-CMSRC2wrap" +#define NID_id_smime_alg_CMSRC2wrap 247 +#define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L + +#define SN_id_alg_PWRI_KEK "id-alg-PWRI-KEK" +#define NID_id_alg_PWRI_KEK 893 +#define OBJ_id_alg_PWRI_KEK OBJ_id_smime_alg,9L + +#define SN_id_smime_cd_ldap "id-smime-cd-ldap" +#define NID_id_smime_cd_ldap 248 +#define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L + +#define SN_id_smime_spq_ets_sqt_uri "id-smime-spq-ets-sqt-uri" +#define NID_id_smime_spq_ets_sqt_uri 249 +#define OBJ_id_smime_spq_ets_sqt_uri OBJ_id_smime_spq,1L + +#define SN_id_smime_spq_ets_sqt_unotice "id-smime-spq-ets-sqt-unotice" +#define NID_id_smime_spq_ets_sqt_unotice 250 +#define OBJ_id_smime_spq_ets_sqt_unotice OBJ_id_smime_spq,2L + +#define SN_id_smime_cti_ets_proofOfOrigin "id-smime-cti-ets-proofOfOrigin" +#define NID_id_smime_cti_ets_proofOfOrigin 251 +#define OBJ_id_smime_cti_ets_proofOfOrigin OBJ_id_smime_cti,1L + +#define SN_id_smime_cti_ets_proofOfReceipt "id-smime-cti-ets-proofOfReceipt" +#define NID_id_smime_cti_ets_proofOfReceipt 252 +#define OBJ_id_smime_cti_ets_proofOfReceipt OBJ_id_smime_cti,2L + +#define SN_id_smime_cti_ets_proofOfDelivery "id-smime-cti-ets-proofOfDelivery" +#define NID_id_smime_cti_ets_proofOfDelivery 253 +#define OBJ_id_smime_cti_ets_proofOfDelivery OBJ_id_smime_cti,3L + +#define SN_id_smime_cti_ets_proofOfSender "id-smime-cti-ets-proofOfSender" +#define NID_id_smime_cti_ets_proofOfSender 254 +#define OBJ_id_smime_cti_ets_proofOfSender OBJ_id_smime_cti,4L + +#define SN_id_smime_cti_ets_proofOfApproval "id-smime-cti-ets-proofOfApproval" +#define NID_id_smime_cti_ets_proofOfApproval 255 +#define OBJ_id_smime_cti_ets_proofOfApproval OBJ_id_smime_cti,5L + +#define SN_id_smime_cti_ets_proofOfCreation "id-smime-cti-ets-proofOfCreation" +#define NID_id_smime_cti_ets_proofOfCreation 256 +#define OBJ_id_smime_cti_ets_proofOfCreation OBJ_id_smime_cti,6L + +#define LN_friendlyName "friendlyName" +#define NID_friendlyName 156 +#define OBJ_friendlyName OBJ_pkcs9,20L + +#define LN_localKeyID "localKeyID" +#define NID_localKeyID 157 +#define OBJ_localKeyID OBJ_pkcs9,21L + +#define SN_ms_csp_name "CSPName" +#define LN_ms_csp_name "Microsoft CSP Name" +#define NID_ms_csp_name 417 +#define OBJ_ms_csp_name 1L,3L,6L,1L,4L,1L,311L,17L,1L + +#define SN_LocalKeySet "LocalKeySet" +#define LN_LocalKeySet "Microsoft Local Key set" +#define NID_LocalKeySet 856 +#define OBJ_LocalKeySet 1L,3L,6L,1L,4L,1L,311L,17L,2L + +#define OBJ_certTypes OBJ_pkcs9,22L + +#define LN_x509Certificate "x509Certificate" +#define NID_x509Certificate 158 +#define OBJ_x509Certificate OBJ_certTypes,1L + +#define LN_sdsiCertificate "sdsiCertificate" +#define NID_sdsiCertificate 159 +#define OBJ_sdsiCertificate OBJ_certTypes,2L + +#define OBJ_crlTypes OBJ_pkcs9,23L + +#define LN_x509Crl "x509Crl" +#define NID_x509Crl 160 +#define OBJ_x509Crl OBJ_crlTypes,1L + +#define OBJ_pkcs12 OBJ_pkcs,12L + +#define OBJ_pkcs12_pbeids OBJ_pkcs12,1L + +#define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" +#define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" +#define NID_pbe_WithSHA1And128BitRC4 144 +#define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids,1L + +#define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" +#define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" +#define NID_pbe_WithSHA1And40BitRC4 145 +#define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids,2L + +#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" +#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" +#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 +#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids,3L + +#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" +#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" +#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 +#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids,4L + +#define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" +#define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" +#define NID_pbe_WithSHA1And128BitRC2_CBC 148 +#define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids,5L + +#define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" +#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" +#define NID_pbe_WithSHA1And40BitRC2_CBC 149 +#define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids,6L + +#define OBJ_pkcs12_Version1 OBJ_pkcs12,10L + +#define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1,1L + +#define LN_keyBag "keyBag" +#define NID_keyBag 150 +#define OBJ_keyBag OBJ_pkcs12_BagIds,1L + +#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" +#define NID_pkcs8ShroudedKeyBag 151 +#define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds,2L + +#define LN_certBag "certBag" +#define NID_certBag 152 +#define OBJ_certBag OBJ_pkcs12_BagIds,3L + +#define LN_crlBag "crlBag" +#define NID_crlBag 153 +#define OBJ_crlBag OBJ_pkcs12_BagIds,4L + +#define LN_secretBag "secretBag" +#define NID_secretBag 154 +#define OBJ_secretBag OBJ_pkcs12_BagIds,5L + +#define LN_safeContentsBag "safeContentsBag" +#define NID_safeContentsBag 155 +#define OBJ_safeContentsBag OBJ_pkcs12_BagIds,6L + +#define SN_md2 "MD2" +#define LN_md2 "md2" +#define NID_md2 3 +#define OBJ_md2 OBJ_rsadsi,2L,2L + +#define SN_md4 "MD4" +#define LN_md4 "md4" +#define NID_md4 257 +#define OBJ_md4 OBJ_rsadsi,2L,4L + +#define SN_md5 "MD5" +#define LN_md5 "md5" +#define NID_md5 4 +#define OBJ_md5 OBJ_rsadsi,2L,5L + +#define SN_md5_sha1 "MD5-SHA1" +#define LN_md5_sha1 "md5-sha1" +#define NID_md5_sha1 114 + +#define LN_hmacWithMD5 "hmacWithMD5" +#define NID_hmacWithMD5 797 +#define OBJ_hmacWithMD5 OBJ_rsadsi,2L,6L + +#define LN_hmacWithSHA1 "hmacWithSHA1" +#define NID_hmacWithSHA1 163 +#define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L + +#define SN_sm2 "SM2" +#define LN_sm2 "sm2" +#define NID_sm2 1172 +#define OBJ_sm2 OBJ_sm_scheme,301L + +#define SN_sm3 "SM3" +#define LN_sm3 "sm3" +#define NID_sm3 1143 +#define OBJ_sm3 OBJ_sm_scheme,401L + +#define SN_sm3WithRSAEncryption "RSA-SM3" +#define LN_sm3WithRSAEncryption "sm3WithRSAEncryption" +#define NID_sm3WithRSAEncryption 1144 +#define OBJ_sm3WithRSAEncryption OBJ_sm_scheme,504L + +#define LN_hmacWithSHA224 "hmacWithSHA224" +#define NID_hmacWithSHA224 798 +#define OBJ_hmacWithSHA224 OBJ_rsadsi,2L,8L + +#define LN_hmacWithSHA256 "hmacWithSHA256" +#define NID_hmacWithSHA256 799 +#define OBJ_hmacWithSHA256 OBJ_rsadsi,2L,9L + +#define LN_hmacWithSHA384 "hmacWithSHA384" +#define NID_hmacWithSHA384 800 +#define OBJ_hmacWithSHA384 OBJ_rsadsi,2L,10L + +#define LN_hmacWithSHA512 "hmacWithSHA512" +#define NID_hmacWithSHA512 801 +#define OBJ_hmacWithSHA512 OBJ_rsadsi,2L,11L + +#define LN_hmacWithSHA512_224 "hmacWithSHA512-224" +#define NID_hmacWithSHA512_224 1193 +#define OBJ_hmacWithSHA512_224 OBJ_rsadsi,2L,12L + +#define LN_hmacWithSHA512_256 "hmacWithSHA512-256" +#define NID_hmacWithSHA512_256 1194 +#define OBJ_hmacWithSHA512_256 OBJ_rsadsi,2L,13L + +#define SN_rc2_cbc "RC2-CBC" +#define LN_rc2_cbc "rc2-cbc" +#define NID_rc2_cbc 37 +#define OBJ_rc2_cbc OBJ_rsadsi,3L,2L + +#define SN_rc2_ecb "RC2-ECB" +#define LN_rc2_ecb "rc2-ecb" +#define NID_rc2_ecb 38 + +#define SN_rc2_cfb64 "RC2-CFB" +#define LN_rc2_cfb64 "rc2-cfb" +#define NID_rc2_cfb64 39 + +#define SN_rc2_ofb64 "RC2-OFB" +#define LN_rc2_ofb64 "rc2-ofb" +#define NID_rc2_ofb64 40 + +#define SN_rc2_40_cbc "RC2-40-CBC" +#define LN_rc2_40_cbc "rc2-40-cbc" +#define NID_rc2_40_cbc 98 + +#define SN_rc2_64_cbc "RC2-64-CBC" +#define LN_rc2_64_cbc "rc2-64-cbc" +#define NID_rc2_64_cbc 166 + +#define SN_rc4 "RC4" +#define LN_rc4 "rc4" +#define NID_rc4 5 +#define OBJ_rc4 OBJ_rsadsi,3L,4L + +#define SN_rc4_40 "RC4-40" +#define LN_rc4_40 "rc4-40" +#define NID_rc4_40 97 + +#define SN_des_ede3_cbc "DES-EDE3-CBC" +#define LN_des_ede3_cbc "des-ede3-cbc" +#define NID_des_ede3_cbc 44 +#define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L + +#define SN_rc5_cbc "RC5-CBC" +#define LN_rc5_cbc "rc5-cbc" +#define NID_rc5_cbc 120 +#define OBJ_rc5_cbc OBJ_rsadsi,3L,8L + +#define SN_rc5_ecb "RC5-ECB" +#define LN_rc5_ecb "rc5-ecb" +#define NID_rc5_ecb 121 + +#define SN_rc5_cfb64 "RC5-CFB" +#define LN_rc5_cfb64 "rc5-cfb" +#define NID_rc5_cfb64 122 + +#define SN_rc5_ofb64 "RC5-OFB" +#define LN_rc5_ofb64 "rc5-ofb" +#define NID_rc5_ofb64 123 + +#define SN_ms_ext_req "msExtReq" +#define LN_ms_ext_req "Microsoft Extension Request" +#define NID_ms_ext_req 171 +#define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L + +#define SN_ms_code_ind "msCodeInd" +#define LN_ms_code_ind "Microsoft Individual Code Signing" +#define NID_ms_code_ind 134 +#define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L + +#define SN_ms_code_com "msCodeCom" +#define LN_ms_code_com "Microsoft Commercial Code Signing" +#define NID_ms_code_com 135 +#define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L + +#define SN_ms_ctl_sign "msCTLSign" +#define LN_ms_ctl_sign "Microsoft Trust List Signing" +#define NID_ms_ctl_sign 136 +#define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L + +#define SN_ms_sgc "msSGC" +#define LN_ms_sgc "Microsoft Server Gated Crypto" +#define NID_ms_sgc 137 +#define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L + +#define SN_ms_efs "msEFS" +#define LN_ms_efs "Microsoft Encrypted File System" +#define NID_ms_efs 138 +#define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L + +#define SN_ms_smartcard_login "msSmartcardLogin" +#define LN_ms_smartcard_login "Microsoft Smartcardlogin" +#define NID_ms_smartcard_login 648 +#define OBJ_ms_smartcard_login 1L,3L,6L,1L,4L,1L,311L,20L,2L,2L + +#define SN_ms_upn "msUPN" +#define LN_ms_upn "Microsoft Universal Principal Name" +#define NID_ms_upn 649 +#define OBJ_ms_upn 1L,3L,6L,1L,4L,1L,311L,20L,2L,3L + +#define SN_idea_cbc "IDEA-CBC" +#define LN_idea_cbc "idea-cbc" +#define NID_idea_cbc 34 +#define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L + +#define SN_idea_ecb "IDEA-ECB" +#define LN_idea_ecb "idea-ecb" +#define NID_idea_ecb 36 + +#define SN_idea_cfb64 "IDEA-CFB" +#define LN_idea_cfb64 "idea-cfb" +#define NID_idea_cfb64 35 + +#define SN_idea_ofb64 "IDEA-OFB" +#define LN_idea_ofb64 "idea-ofb" +#define NID_idea_ofb64 46 + +#define SN_bf_cbc "BF-CBC" +#define LN_bf_cbc "bf-cbc" +#define NID_bf_cbc 91 +#define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L + +#define SN_bf_ecb "BF-ECB" +#define LN_bf_ecb "bf-ecb" +#define NID_bf_ecb 92 + +#define SN_bf_cfb64 "BF-CFB" +#define LN_bf_cfb64 "bf-cfb" +#define NID_bf_cfb64 93 + +#define SN_bf_ofb64 "BF-OFB" +#define LN_bf_ofb64 "bf-ofb" +#define NID_bf_ofb64 94 + +#define SN_id_pkix "PKIX" +#define NID_id_pkix 127 +#define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L + +#define SN_id_pkix_mod "id-pkix-mod" +#define NID_id_pkix_mod 258 +#define OBJ_id_pkix_mod OBJ_id_pkix,0L + +#define SN_id_pe "id-pe" +#define NID_id_pe 175 +#define OBJ_id_pe OBJ_id_pkix,1L + +#define SN_id_qt "id-qt" +#define NID_id_qt 259 +#define OBJ_id_qt OBJ_id_pkix,2L + +#define SN_id_kp "id-kp" +#define NID_id_kp 128 +#define OBJ_id_kp OBJ_id_pkix,3L + +#define SN_id_it "id-it" +#define NID_id_it 260 +#define OBJ_id_it OBJ_id_pkix,4L + +#define SN_id_pkip "id-pkip" +#define NID_id_pkip 261 +#define OBJ_id_pkip OBJ_id_pkix,5L + +#define SN_id_alg "id-alg" +#define NID_id_alg 262 +#define OBJ_id_alg OBJ_id_pkix,6L + +#define SN_id_cmc "id-cmc" +#define NID_id_cmc 263 +#define OBJ_id_cmc OBJ_id_pkix,7L + +#define SN_id_on "id-on" +#define NID_id_on 264 +#define OBJ_id_on OBJ_id_pkix,8L + +#define SN_id_pda "id-pda" +#define NID_id_pda 265 +#define OBJ_id_pda OBJ_id_pkix,9L + +#define SN_id_aca "id-aca" +#define NID_id_aca 266 +#define OBJ_id_aca OBJ_id_pkix,10L + +#define SN_id_qcs "id-qcs" +#define NID_id_qcs 267 +#define OBJ_id_qcs OBJ_id_pkix,11L + +#define SN_id_cct "id-cct" +#define NID_id_cct 268 +#define OBJ_id_cct OBJ_id_pkix,12L + +#define SN_id_ppl "id-ppl" +#define NID_id_ppl 662 +#define OBJ_id_ppl OBJ_id_pkix,21L + +#define SN_id_ad "id-ad" +#define NID_id_ad 176 +#define OBJ_id_ad OBJ_id_pkix,48L + +#define SN_id_pkix1_explicit_88 "id-pkix1-explicit-88" +#define NID_id_pkix1_explicit_88 269 +#define OBJ_id_pkix1_explicit_88 OBJ_id_pkix_mod,1L + +#define SN_id_pkix1_implicit_88 "id-pkix1-implicit-88" +#define NID_id_pkix1_implicit_88 270 +#define OBJ_id_pkix1_implicit_88 OBJ_id_pkix_mod,2L + +#define SN_id_pkix1_explicit_93 "id-pkix1-explicit-93" +#define NID_id_pkix1_explicit_93 271 +#define OBJ_id_pkix1_explicit_93 OBJ_id_pkix_mod,3L + +#define SN_id_pkix1_implicit_93 "id-pkix1-implicit-93" +#define NID_id_pkix1_implicit_93 272 +#define OBJ_id_pkix1_implicit_93 OBJ_id_pkix_mod,4L + +#define SN_id_mod_crmf "id-mod-crmf" +#define NID_id_mod_crmf 273 +#define OBJ_id_mod_crmf OBJ_id_pkix_mod,5L + +#define SN_id_mod_cmc "id-mod-cmc" +#define NID_id_mod_cmc 274 +#define OBJ_id_mod_cmc OBJ_id_pkix_mod,6L + +#define SN_id_mod_kea_profile_88 "id-mod-kea-profile-88" +#define NID_id_mod_kea_profile_88 275 +#define OBJ_id_mod_kea_profile_88 OBJ_id_pkix_mod,7L + +#define SN_id_mod_kea_profile_93 "id-mod-kea-profile-93" +#define NID_id_mod_kea_profile_93 276 +#define OBJ_id_mod_kea_profile_93 OBJ_id_pkix_mod,8L + +#define SN_id_mod_cmp "id-mod-cmp" +#define NID_id_mod_cmp 277 +#define OBJ_id_mod_cmp OBJ_id_pkix_mod,9L + +#define SN_id_mod_qualified_cert_88 "id-mod-qualified-cert-88" +#define NID_id_mod_qualified_cert_88 278 +#define OBJ_id_mod_qualified_cert_88 OBJ_id_pkix_mod,10L + +#define SN_id_mod_qualified_cert_93 "id-mod-qualified-cert-93" +#define NID_id_mod_qualified_cert_93 279 +#define OBJ_id_mod_qualified_cert_93 OBJ_id_pkix_mod,11L + +#define SN_id_mod_attribute_cert "id-mod-attribute-cert" +#define NID_id_mod_attribute_cert 280 +#define OBJ_id_mod_attribute_cert OBJ_id_pkix_mod,12L + +#define SN_id_mod_timestamp_protocol "id-mod-timestamp-protocol" +#define NID_id_mod_timestamp_protocol 281 +#define OBJ_id_mod_timestamp_protocol OBJ_id_pkix_mod,13L + +#define SN_id_mod_ocsp "id-mod-ocsp" +#define NID_id_mod_ocsp 282 +#define OBJ_id_mod_ocsp OBJ_id_pkix_mod,14L + +#define SN_id_mod_dvcs "id-mod-dvcs" +#define NID_id_mod_dvcs 283 +#define OBJ_id_mod_dvcs OBJ_id_pkix_mod,15L + +#define SN_id_mod_cmp2000 "id-mod-cmp2000" +#define NID_id_mod_cmp2000 284 +#define OBJ_id_mod_cmp2000 OBJ_id_pkix_mod,16L + +#define SN_info_access "authorityInfoAccess" +#define LN_info_access "Authority Information Access" +#define NID_info_access 177 +#define OBJ_info_access OBJ_id_pe,1L + +#define SN_biometricInfo "biometricInfo" +#define LN_biometricInfo "Biometric Info" +#define NID_biometricInfo 285 +#define OBJ_biometricInfo OBJ_id_pe,2L + +#define SN_qcStatements "qcStatements" +#define NID_qcStatements 286 +#define OBJ_qcStatements OBJ_id_pe,3L + +#define SN_ac_auditEntity "ac-auditEntity" +#define NID_ac_auditEntity 287 +#define OBJ_ac_auditEntity OBJ_id_pe,4L + +#define SN_ac_targeting "ac-targeting" +#define NID_ac_targeting 288 +#define OBJ_ac_targeting OBJ_id_pe,5L + +#define SN_aaControls "aaControls" +#define NID_aaControls 289 +#define OBJ_aaControls OBJ_id_pe,6L + +#define SN_sbgp_ipAddrBlock "sbgp-ipAddrBlock" +#define NID_sbgp_ipAddrBlock 290 +#define OBJ_sbgp_ipAddrBlock OBJ_id_pe,7L + +#define SN_sbgp_autonomousSysNum "sbgp-autonomousSysNum" +#define NID_sbgp_autonomousSysNum 291 +#define OBJ_sbgp_autonomousSysNum OBJ_id_pe,8L + +#define SN_sbgp_routerIdentifier "sbgp-routerIdentifier" +#define NID_sbgp_routerIdentifier 292 +#define OBJ_sbgp_routerIdentifier OBJ_id_pe,9L + +#define SN_ac_proxying "ac-proxying" +#define NID_ac_proxying 397 +#define OBJ_ac_proxying OBJ_id_pe,10L + +#define SN_sinfo_access "subjectInfoAccess" +#define LN_sinfo_access "Subject Information Access" +#define NID_sinfo_access 398 +#define OBJ_sinfo_access OBJ_id_pe,11L + +#define SN_proxyCertInfo "proxyCertInfo" +#define LN_proxyCertInfo "Proxy Certificate Information" +#define NID_proxyCertInfo 663 +#define OBJ_proxyCertInfo OBJ_id_pe,14L + +#define SN_tlsfeature "tlsfeature" +#define LN_tlsfeature "TLS Feature" +#define NID_tlsfeature 1020 +#define OBJ_tlsfeature OBJ_id_pe,24L + +#define SN_id_qt_cps "id-qt-cps" +#define LN_id_qt_cps "Policy Qualifier CPS" +#define NID_id_qt_cps 164 +#define OBJ_id_qt_cps OBJ_id_qt,1L + +#define SN_id_qt_unotice "id-qt-unotice" +#define LN_id_qt_unotice "Policy Qualifier User Notice" +#define NID_id_qt_unotice 165 +#define OBJ_id_qt_unotice OBJ_id_qt,2L + +#define SN_textNotice "textNotice" +#define NID_textNotice 293 +#define OBJ_textNotice OBJ_id_qt,3L + +#define SN_server_auth "serverAuth" +#define LN_server_auth "TLS Web Server Authentication" +#define NID_server_auth 129 +#define OBJ_server_auth OBJ_id_kp,1L + +#define SN_client_auth "clientAuth" +#define LN_client_auth "TLS Web Client Authentication" +#define NID_client_auth 130 +#define OBJ_client_auth OBJ_id_kp,2L + +#define SN_code_sign "codeSigning" +#define LN_code_sign "Code Signing" +#define NID_code_sign 131 +#define OBJ_code_sign OBJ_id_kp,3L + +#define SN_email_protect "emailProtection" +#define LN_email_protect "E-mail Protection" +#define NID_email_protect 132 +#define OBJ_email_protect OBJ_id_kp,4L + +#define SN_ipsecEndSystem "ipsecEndSystem" +#define LN_ipsecEndSystem "IPSec End System" +#define NID_ipsecEndSystem 294 +#define OBJ_ipsecEndSystem OBJ_id_kp,5L + +#define SN_ipsecTunnel "ipsecTunnel" +#define LN_ipsecTunnel "IPSec Tunnel" +#define NID_ipsecTunnel 295 +#define OBJ_ipsecTunnel OBJ_id_kp,6L + +#define SN_ipsecUser "ipsecUser" +#define LN_ipsecUser "IPSec User" +#define NID_ipsecUser 296 +#define OBJ_ipsecUser OBJ_id_kp,7L + +#define SN_time_stamp "timeStamping" +#define LN_time_stamp "Time Stamping" +#define NID_time_stamp 133 +#define OBJ_time_stamp OBJ_id_kp,8L + +#define SN_OCSP_sign "OCSPSigning" +#define LN_OCSP_sign "OCSP Signing" +#define NID_OCSP_sign 180 +#define OBJ_OCSP_sign OBJ_id_kp,9L + +#define SN_dvcs "DVCS" +#define LN_dvcs "dvcs" +#define NID_dvcs 297 +#define OBJ_dvcs OBJ_id_kp,10L + +#define SN_ipsec_IKE "ipsecIKE" +#define LN_ipsec_IKE "ipsec Internet Key Exchange" +#define NID_ipsec_IKE 1022 +#define OBJ_ipsec_IKE OBJ_id_kp,17L + +#define SN_capwapAC "capwapAC" +#define LN_capwapAC "Ctrl/provision WAP Access" +#define NID_capwapAC 1023 +#define OBJ_capwapAC OBJ_id_kp,18L + +#define SN_capwapWTP "capwapWTP" +#define LN_capwapWTP "Ctrl/Provision WAP Termination" +#define NID_capwapWTP 1024 +#define OBJ_capwapWTP OBJ_id_kp,19L + +#define SN_sshClient "secureShellClient" +#define LN_sshClient "SSH Client" +#define NID_sshClient 1025 +#define OBJ_sshClient OBJ_id_kp,21L + +#define SN_sshServer "secureShellServer" +#define LN_sshServer "SSH Server" +#define NID_sshServer 1026 +#define OBJ_sshServer OBJ_id_kp,22L + +#define SN_sendRouter "sendRouter" +#define LN_sendRouter "Send Router" +#define NID_sendRouter 1027 +#define OBJ_sendRouter OBJ_id_kp,23L + +#define SN_sendProxiedRouter "sendProxiedRouter" +#define LN_sendProxiedRouter "Send Proxied Router" +#define NID_sendProxiedRouter 1028 +#define OBJ_sendProxiedRouter OBJ_id_kp,24L + +#define SN_sendOwner "sendOwner" +#define LN_sendOwner "Send Owner" +#define NID_sendOwner 1029 +#define OBJ_sendOwner OBJ_id_kp,25L + +#define SN_sendProxiedOwner "sendProxiedOwner" +#define LN_sendProxiedOwner "Send Proxied Owner" +#define NID_sendProxiedOwner 1030 +#define OBJ_sendProxiedOwner OBJ_id_kp,26L + +#define SN_cmcCA "cmcCA" +#define LN_cmcCA "CMC Certificate Authority" +#define NID_cmcCA 1131 +#define OBJ_cmcCA OBJ_id_kp,27L + +#define SN_cmcRA "cmcRA" +#define LN_cmcRA "CMC Registration Authority" +#define NID_cmcRA 1132 +#define OBJ_cmcRA OBJ_id_kp,28L + +#define SN_id_it_caProtEncCert "id-it-caProtEncCert" +#define NID_id_it_caProtEncCert 298 +#define OBJ_id_it_caProtEncCert OBJ_id_it,1L + +#define SN_id_it_signKeyPairTypes "id-it-signKeyPairTypes" +#define NID_id_it_signKeyPairTypes 299 +#define OBJ_id_it_signKeyPairTypes OBJ_id_it,2L + +#define SN_id_it_encKeyPairTypes "id-it-encKeyPairTypes" +#define NID_id_it_encKeyPairTypes 300 +#define OBJ_id_it_encKeyPairTypes OBJ_id_it,3L + +#define SN_id_it_preferredSymmAlg "id-it-preferredSymmAlg" +#define NID_id_it_preferredSymmAlg 301 +#define OBJ_id_it_preferredSymmAlg OBJ_id_it,4L + +#define SN_id_it_caKeyUpdateInfo "id-it-caKeyUpdateInfo" +#define NID_id_it_caKeyUpdateInfo 302 +#define OBJ_id_it_caKeyUpdateInfo OBJ_id_it,5L + +#define SN_id_it_currentCRL "id-it-currentCRL" +#define NID_id_it_currentCRL 303 +#define OBJ_id_it_currentCRL OBJ_id_it,6L + +#define SN_id_it_unsupportedOIDs "id-it-unsupportedOIDs" +#define NID_id_it_unsupportedOIDs 304 +#define OBJ_id_it_unsupportedOIDs OBJ_id_it,7L + +#define SN_id_it_subscriptionRequest "id-it-subscriptionRequest" +#define NID_id_it_subscriptionRequest 305 +#define OBJ_id_it_subscriptionRequest OBJ_id_it,8L + +#define SN_id_it_subscriptionResponse "id-it-subscriptionResponse" +#define NID_id_it_subscriptionResponse 306 +#define OBJ_id_it_subscriptionResponse OBJ_id_it,9L + +#define SN_id_it_keyPairParamReq "id-it-keyPairParamReq" +#define NID_id_it_keyPairParamReq 307 +#define OBJ_id_it_keyPairParamReq OBJ_id_it,10L + +#define SN_id_it_keyPairParamRep "id-it-keyPairParamRep" +#define NID_id_it_keyPairParamRep 308 +#define OBJ_id_it_keyPairParamRep OBJ_id_it,11L + +#define SN_id_it_revPassphrase "id-it-revPassphrase" +#define NID_id_it_revPassphrase 309 +#define OBJ_id_it_revPassphrase OBJ_id_it,12L + +#define SN_id_it_implicitConfirm "id-it-implicitConfirm" +#define NID_id_it_implicitConfirm 310 +#define OBJ_id_it_implicitConfirm OBJ_id_it,13L + +#define SN_id_it_confirmWaitTime "id-it-confirmWaitTime" +#define NID_id_it_confirmWaitTime 311 +#define OBJ_id_it_confirmWaitTime OBJ_id_it,14L + +#define SN_id_it_origPKIMessage "id-it-origPKIMessage" +#define NID_id_it_origPKIMessage 312 +#define OBJ_id_it_origPKIMessage OBJ_id_it,15L + +#define SN_id_it_suppLangTags "id-it-suppLangTags" +#define NID_id_it_suppLangTags 784 +#define OBJ_id_it_suppLangTags OBJ_id_it,16L + +#define SN_id_regCtrl "id-regCtrl" +#define NID_id_regCtrl 313 +#define OBJ_id_regCtrl OBJ_id_pkip,1L + +#define SN_id_regInfo "id-regInfo" +#define NID_id_regInfo 314 +#define OBJ_id_regInfo OBJ_id_pkip,2L + +#define SN_id_regCtrl_regToken "id-regCtrl-regToken" +#define NID_id_regCtrl_regToken 315 +#define OBJ_id_regCtrl_regToken OBJ_id_regCtrl,1L + +#define SN_id_regCtrl_authenticator "id-regCtrl-authenticator" +#define NID_id_regCtrl_authenticator 316 +#define OBJ_id_regCtrl_authenticator OBJ_id_regCtrl,2L + +#define SN_id_regCtrl_pkiPublicationInfo "id-regCtrl-pkiPublicationInfo" +#define NID_id_regCtrl_pkiPublicationInfo 317 +#define OBJ_id_regCtrl_pkiPublicationInfo OBJ_id_regCtrl,3L + +#define SN_id_regCtrl_pkiArchiveOptions "id-regCtrl-pkiArchiveOptions" +#define NID_id_regCtrl_pkiArchiveOptions 318 +#define OBJ_id_regCtrl_pkiArchiveOptions OBJ_id_regCtrl,4L + +#define SN_id_regCtrl_oldCertID "id-regCtrl-oldCertID" +#define NID_id_regCtrl_oldCertID 319 +#define OBJ_id_regCtrl_oldCertID OBJ_id_regCtrl,5L + +#define SN_id_regCtrl_protocolEncrKey "id-regCtrl-protocolEncrKey" +#define NID_id_regCtrl_protocolEncrKey 320 +#define OBJ_id_regCtrl_protocolEncrKey OBJ_id_regCtrl,6L + +#define SN_id_regInfo_utf8Pairs "id-regInfo-utf8Pairs" +#define NID_id_regInfo_utf8Pairs 321 +#define OBJ_id_regInfo_utf8Pairs OBJ_id_regInfo,1L + +#define SN_id_regInfo_certReq "id-regInfo-certReq" +#define NID_id_regInfo_certReq 322 +#define OBJ_id_regInfo_certReq OBJ_id_regInfo,2L + +#define SN_id_alg_des40 "id-alg-des40" +#define NID_id_alg_des40 323 +#define OBJ_id_alg_des40 OBJ_id_alg,1L + +#define SN_id_alg_noSignature "id-alg-noSignature" +#define NID_id_alg_noSignature 324 +#define OBJ_id_alg_noSignature OBJ_id_alg,2L + +#define SN_id_alg_dh_sig_hmac_sha1 "id-alg-dh-sig-hmac-sha1" +#define NID_id_alg_dh_sig_hmac_sha1 325 +#define OBJ_id_alg_dh_sig_hmac_sha1 OBJ_id_alg,3L + +#define SN_id_alg_dh_pop "id-alg-dh-pop" +#define NID_id_alg_dh_pop 326 +#define OBJ_id_alg_dh_pop OBJ_id_alg,4L + +#define SN_id_cmc_statusInfo "id-cmc-statusInfo" +#define NID_id_cmc_statusInfo 327 +#define OBJ_id_cmc_statusInfo OBJ_id_cmc,1L + +#define SN_id_cmc_identification "id-cmc-identification" +#define NID_id_cmc_identification 328 +#define OBJ_id_cmc_identification OBJ_id_cmc,2L + +#define SN_id_cmc_identityProof "id-cmc-identityProof" +#define NID_id_cmc_identityProof 329 +#define OBJ_id_cmc_identityProof OBJ_id_cmc,3L + +#define SN_id_cmc_dataReturn "id-cmc-dataReturn" +#define NID_id_cmc_dataReturn 330 +#define OBJ_id_cmc_dataReturn OBJ_id_cmc,4L + +#define SN_id_cmc_transactionId "id-cmc-transactionId" +#define NID_id_cmc_transactionId 331 +#define OBJ_id_cmc_transactionId OBJ_id_cmc,5L + +#define SN_id_cmc_senderNonce "id-cmc-senderNonce" +#define NID_id_cmc_senderNonce 332 +#define OBJ_id_cmc_senderNonce OBJ_id_cmc,6L + +#define SN_id_cmc_recipientNonce "id-cmc-recipientNonce" +#define NID_id_cmc_recipientNonce 333 +#define OBJ_id_cmc_recipientNonce OBJ_id_cmc,7L + +#define SN_id_cmc_addExtensions "id-cmc-addExtensions" +#define NID_id_cmc_addExtensions 334 +#define OBJ_id_cmc_addExtensions OBJ_id_cmc,8L + +#define SN_id_cmc_encryptedPOP "id-cmc-encryptedPOP" +#define NID_id_cmc_encryptedPOP 335 +#define OBJ_id_cmc_encryptedPOP OBJ_id_cmc,9L + +#define SN_id_cmc_decryptedPOP "id-cmc-decryptedPOP" +#define NID_id_cmc_decryptedPOP 336 +#define OBJ_id_cmc_decryptedPOP OBJ_id_cmc,10L + +#define SN_id_cmc_lraPOPWitness "id-cmc-lraPOPWitness" +#define NID_id_cmc_lraPOPWitness 337 +#define OBJ_id_cmc_lraPOPWitness OBJ_id_cmc,11L + +#define SN_id_cmc_getCert "id-cmc-getCert" +#define NID_id_cmc_getCert 338 +#define OBJ_id_cmc_getCert OBJ_id_cmc,15L + +#define SN_id_cmc_getCRL "id-cmc-getCRL" +#define NID_id_cmc_getCRL 339 +#define OBJ_id_cmc_getCRL OBJ_id_cmc,16L + +#define SN_id_cmc_revokeRequest "id-cmc-revokeRequest" +#define NID_id_cmc_revokeRequest 340 +#define OBJ_id_cmc_revokeRequest OBJ_id_cmc,17L + +#define SN_id_cmc_regInfo "id-cmc-regInfo" +#define NID_id_cmc_regInfo 341 +#define OBJ_id_cmc_regInfo OBJ_id_cmc,18L + +#define SN_id_cmc_responseInfo "id-cmc-responseInfo" +#define NID_id_cmc_responseInfo 342 +#define OBJ_id_cmc_responseInfo OBJ_id_cmc,19L + +#define SN_id_cmc_queryPending "id-cmc-queryPending" +#define NID_id_cmc_queryPending 343 +#define OBJ_id_cmc_queryPending OBJ_id_cmc,21L + +#define SN_id_cmc_popLinkRandom "id-cmc-popLinkRandom" +#define NID_id_cmc_popLinkRandom 344 +#define OBJ_id_cmc_popLinkRandom OBJ_id_cmc,22L + +#define SN_id_cmc_popLinkWitness "id-cmc-popLinkWitness" +#define NID_id_cmc_popLinkWitness 345 +#define OBJ_id_cmc_popLinkWitness OBJ_id_cmc,23L + +#define SN_id_cmc_confirmCertAcceptance "id-cmc-confirmCertAcceptance" +#define NID_id_cmc_confirmCertAcceptance 346 +#define OBJ_id_cmc_confirmCertAcceptance OBJ_id_cmc,24L + +#define SN_id_on_personalData "id-on-personalData" +#define NID_id_on_personalData 347 +#define OBJ_id_on_personalData OBJ_id_on,1L + +#define SN_id_on_permanentIdentifier "id-on-permanentIdentifier" +#define LN_id_on_permanentIdentifier "Permanent Identifier" +#define NID_id_on_permanentIdentifier 858 +#define OBJ_id_on_permanentIdentifier OBJ_id_on,3L + +#define SN_id_pda_dateOfBirth "id-pda-dateOfBirth" +#define NID_id_pda_dateOfBirth 348 +#define OBJ_id_pda_dateOfBirth OBJ_id_pda,1L + +#define SN_id_pda_placeOfBirth "id-pda-placeOfBirth" +#define NID_id_pda_placeOfBirth 349 +#define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L + +#define SN_id_pda_gender "id-pda-gender" +#define NID_id_pda_gender 351 +#define OBJ_id_pda_gender OBJ_id_pda,3L + +#define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" +#define NID_id_pda_countryOfCitizenship 352 +#define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L + +#define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" +#define NID_id_pda_countryOfResidence 353 +#define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L + +#define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" +#define NID_id_aca_authenticationInfo 354 +#define OBJ_id_aca_authenticationInfo OBJ_id_aca,1L + +#define SN_id_aca_accessIdentity "id-aca-accessIdentity" +#define NID_id_aca_accessIdentity 355 +#define OBJ_id_aca_accessIdentity OBJ_id_aca,2L + +#define SN_id_aca_chargingIdentity "id-aca-chargingIdentity" +#define NID_id_aca_chargingIdentity 356 +#define OBJ_id_aca_chargingIdentity OBJ_id_aca,3L + +#define SN_id_aca_group "id-aca-group" +#define NID_id_aca_group 357 +#define OBJ_id_aca_group OBJ_id_aca,4L + +#define SN_id_aca_role "id-aca-role" +#define NID_id_aca_role 358 +#define OBJ_id_aca_role OBJ_id_aca,5L + +#define SN_id_aca_encAttrs "id-aca-encAttrs" +#define NID_id_aca_encAttrs 399 +#define OBJ_id_aca_encAttrs OBJ_id_aca,6L + +#define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" +#define NID_id_qcs_pkixQCSyntax_v1 359 +#define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L + +#define SN_id_cct_crs "id-cct-crs" +#define NID_id_cct_crs 360 +#define OBJ_id_cct_crs OBJ_id_cct,1L + +#define SN_id_cct_PKIData "id-cct-PKIData" +#define NID_id_cct_PKIData 361 +#define OBJ_id_cct_PKIData OBJ_id_cct,2L + +#define SN_id_cct_PKIResponse "id-cct-PKIResponse" +#define NID_id_cct_PKIResponse 362 +#define OBJ_id_cct_PKIResponse OBJ_id_cct,3L + +#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage" +#define LN_id_ppl_anyLanguage "Any language" +#define NID_id_ppl_anyLanguage 664 +#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L + +#define SN_id_ppl_inheritAll "id-ppl-inheritAll" +#define LN_id_ppl_inheritAll "Inherit all" +#define NID_id_ppl_inheritAll 665 +#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L + +#define SN_Independent "id-ppl-independent" +#define LN_Independent "Independent" +#define NID_Independent 667 +#define OBJ_Independent OBJ_id_ppl,2L + +#define SN_ad_OCSP "OCSP" +#define LN_ad_OCSP "OCSP" +#define NID_ad_OCSP 178 +#define OBJ_ad_OCSP OBJ_id_ad,1L + +#define SN_ad_ca_issuers "caIssuers" +#define LN_ad_ca_issuers "CA Issuers" +#define NID_ad_ca_issuers 179 +#define OBJ_ad_ca_issuers OBJ_id_ad,2L + +#define SN_ad_timeStamping "ad_timestamping" +#define LN_ad_timeStamping "AD Time Stamping" +#define NID_ad_timeStamping 363 +#define OBJ_ad_timeStamping OBJ_id_ad,3L + +#define SN_ad_dvcs "AD_DVCS" +#define LN_ad_dvcs "ad dvcs" +#define NID_ad_dvcs 364 +#define OBJ_ad_dvcs OBJ_id_ad,4L + +#define SN_caRepository "caRepository" +#define LN_caRepository "CA Repository" +#define NID_caRepository 785 +#define OBJ_caRepository OBJ_id_ad,5L + +#define OBJ_id_pkix_OCSP OBJ_ad_OCSP + +#define SN_id_pkix_OCSP_basic "basicOCSPResponse" +#define LN_id_pkix_OCSP_basic "Basic OCSP Response" +#define NID_id_pkix_OCSP_basic 365 +#define OBJ_id_pkix_OCSP_basic OBJ_id_pkix_OCSP,1L + +#define SN_id_pkix_OCSP_Nonce "Nonce" +#define LN_id_pkix_OCSP_Nonce "OCSP Nonce" +#define NID_id_pkix_OCSP_Nonce 366 +#define OBJ_id_pkix_OCSP_Nonce OBJ_id_pkix_OCSP,2L + +#define SN_id_pkix_OCSP_CrlID "CrlID" +#define LN_id_pkix_OCSP_CrlID "OCSP CRL ID" +#define NID_id_pkix_OCSP_CrlID 367 +#define OBJ_id_pkix_OCSP_CrlID OBJ_id_pkix_OCSP,3L + +#define SN_id_pkix_OCSP_acceptableResponses "acceptableResponses" +#define LN_id_pkix_OCSP_acceptableResponses "Acceptable OCSP Responses" +#define NID_id_pkix_OCSP_acceptableResponses 368 +#define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L + +#define SN_id_pkix_OCSP_noCheck "noCheck" +#define LN_id_pkix_OCSP_noCheck "OCSP No Check" +#define NID_id_pkix_OCSP_noCheck 369 +#define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L + +#define SN_id_pkix_OCSP_archiveCutoff "archiveCutoff" +#define LN_id_pkix_OCSP_archiveCutoff "OCSP Archive Cutoff" +#define NID_id_pkix_OCSP_archiveCutoff 370 +#define OBJ_id_pkix_OCSP_archiveCutoff OBJ_id_pkix_OCSP,6L + +#define SN_id_pkix_OCSP_serviceLocator "serviceLocator" +#define LN_id_pkix_OCSP_serviceLocator "OCSP Service Locator" +#define NID_id_pkix_OCSP_serviceLocator 371 +#define OBJ_id_pkix_OCSP_serviceLocator OBJ_id_pkix_OCSP,7L + +#define SN_id_pkix_OCSP_extendedStatus "extendedStatus" +#define LN_id_pkix_OCSP_extendedStatus "Extended OCSP Status" +#define NID_id_pkix_OCSP_extendedStatus 372 +#define OBJ_id_pkix_OCSP_extendedStatus OBJ_id_pkix_OCSP,8L + +#define SN_id_pkix_OCSP_valid "valid" +#define NID_id_pkix_OCSP_valid 373 +#define OBJ_id_pkix_OCSP_valid OBJ_id_pkix_OCSP,9L + +#define SN_id_pkix_OCSP_path "path" +#define NID_id_pkix_OCSP_path 374 +#define OBJ_id_pkix_OCSP_path OBJ_id_pkix_OCSP,10L + +#define SN_id_pkix_OCSP_trustRoot "trustRoot" +#define LN_id_pkix_OCSP_trustRoot "Trust Root" +#define NID_id_pkix_OCSP_trustRoot 375 +#define OBJ_id_pkix_OCSP_trustRoot OBJ_id_pkix_OCSP,11L + +#define SN_algorithm "algorithm" +#define LN_algorithm "algorithm" +#define NID_algorithm 376 +#define OBJ_algorithm 1L,3L,14L,3L,2L + +#define SN_md5WithRSA "RSA-NP-MD5" +#define LN_md5WithRSA "md5WithRSA" +#define NID_md5WithRSA 104 +#define OBJ_md5WithRSA OBJ_algorithm,3L + +#define SN_des_ecb "DES-ECB" +#define LN_des_ecb "des-ecb" +#define NID_des_ecb 29 +#define OBJ_des_ecb OBJ_algorithm,6L + +#define SN_des_cbc "DES-CBC" +#define LN_des_cbc "des-cbc" +#define NID_des_cbc 31 +#define OBJ_des_cbc OBJ_algorithm,7L + +#define SN_des_ofb64 "DES-OFB" +#define LN_des_ofb64 "des-ofb" +#define NID_des_ofb64 45 +#define OBJ_des_ofb64 OBJ_algorithm,8L + +#define SN_des_cfb64 "DES-CFB" +#define LN_des_cfb64 "des-cfb" +#define NID_des_cfb64 30 +#define OBJ_des_cfb64 OBJ_algorithm,9L + +#define SN_rsaSignature "rsaSignature" +#define NID_rsaSignature 377 +#define OBJ_rsaSignature OBJ_algorithm,11L + +#define SN_dsa_2 "DSA-old" +#define LN_dsa_2 "dsaEncryption-old" +#define NID_dsa_2 67 +#define OBJ_dsa_2 OBJ_algorithm,12L + +#define SN_dsaWithSHA "DSA-SHA" +#define LN_dsaWithSHA "dsaWithSHA" +#define NID_dsaWithSHA 66 +#define OBJ_dsaWithSHA OBJ_algorithm,13L + +#define SN_shaWithRSAEncryption "RSA-SHA" +#define LN_shaWithRSAEncryption "shaWithRSAEncryption" +#define NID_shaWithRSAEncryption 42 +#define OBJ_shaWithRSAEncryption OBJ_algorithm,15L + +#define SN_des_ede_ecb "DES-EDE" +#define LN_des_ede_ecb "des-ede" +#define NID_des_ede_ecb 32 +#define OBJ_des_ede_ecb OBJ_algorithm,17L + +#define SN_des_ede3_ecb "DES-EDE3" +#define LN_des_ede3_ecb "des-ede3" +#define NID_des_ede3_ecb 33 + +#define SN_des_ede_cbc "DES-EDE-CBC" +#define LN_des_ede_cbc "des-ede-cbc" +#define NID_des_ede_cbc 43 + +#define SN_des_ede_cfb64 "DES-EDE-CFB" +#define LN_des_ede_cfb64 "des-ede-cfb" +#define NID_des_ede_cfb64 60 + +#define SN_des_ede3_cfb64 "DES-EDE3-CFB" +#define LN_des_ede3_cfb64 "des-ede3-cfb" +#define NID_des_ede3_cfb64 61 + +#define SN_des_ede_ofb64 "DES-EDE-OFB" +#define LN_des_ede_ofb64 "des-ede-ofb" +#define NID_des_ede_ofb64 62 + +#define SN_des_ede3_ofb64 "DES-EDE3-OFB" +#define LN_des_ede3_ofb64 "des-ede3-ofb" +#define NID_des_ede3_ofb64 63 + +#define SN_desx_cbc "DESX-CBC" +#define LN_desx_cbc "desx-cbc" +#define NID_desx_cbc 80 + +#define SN_sha "SHA" +#define LN_sha "sha" +#define NID_sha 41 +#define OBJ_sha OBJ_algorithm,18L + +#define SN_sha1 "SHA1" +#define LN_sha1 "sha1" +#define NID_sha1 64 +#define OBJ_sha1 OBJ_algorithm,26L + +#define SN_dsaWithSHA1_2 "DSA-SHA1-old" +#define LN_dsaWithSHA1_2 "dsaWithSHA1-old" +#define NID_dsaWithSHA1_2 70 +#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L + +#define SN_sha1WithRSA "RSA-SHA1-2" +#define LN_sha1WithRSA "sha1WithRSA" +#define NID_sha1WithRSA 115 +#define OBJ_sha1WithRSA OBJ_algorithm,29L + +#define SN_ripemd160 "RIPEMD160" +#define LN_ripemd160 "ripemd160" +#define NID_ripemd160 117 +#define OBJ_ripemd160 1L,3L,36L,3L,2L,1L + +#define SN_ripemd160WithRSA "RSA-RIPEMD160" +#define LN_ripemd160WithRSA "ripemd160WithRSA" +#define NID_ripemd160WithRSA 119 +#define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L + +#define SN_blake2b512 "BLAKE2b512" +#define LN_blake2b512 "blake2b512" +#define NID_blake2b512 1056 +#define OBJ_blake2b512 1L,3L,6L,1L,4L,1L,1722L,12L,2L,1L,16L + +#define SN_blake2s256 "BLAKE2s256" +#define LN_blake2s256 "blake2s256" +#define NID_blake2s256 1057 +#define OBJ_blake2s256 1L,3L,6L,1L,4L,1L,1722L,12L,2L,2L,8L + +#define SN_sxnet "SXNetID" +#define LN_sxnet "Strong Extranet ID" +#define NID_sxnet 143 +#define OBJ_sxnet 1L,3L,101L,1L,4L,1L + +#define SN_X500 "X500" +#define LN_X500 "directory services (X.500)" +#define NID_X500 11 +#define OBJ_X500 2L,5L + +#define SN_X509 "X509" +#define NID_X509 12 +#define OBJ_X509 OBJ_X500,4L + +#define SN_commonName "CN" +#define LN_commonName "commonName" +#define NID_commonName 13 +#define OBJ_commonName OBJ_X509,3L + +#define SN_surname "SN" +#define LN_surname "surname" +#define NID_surname 100 +#define OBJ_surname OBJ_X509,4L + +#define LN_serialNumber "serialNumber" +#define NID_serialNumber 105 +#define OBJ_serialNumber OBJ_X509,5L + +#define SN_countryName "C" +#define LN_countryName "countryName" +#define NID_countryName 14 +#define OBJ_countryName OBJ_X509,6L + +#define SN_localityName "L" +#define LN_localityName "localityName" +#define NID_localityName 15 +#define OBJ_localityName OBJ_X509,7L + +#define SN_stateOrProvinceName "ST" +#define LN_stateOrProvinceName "stateOrProvinceName" +#define NID_stateOrProvinceName 16 +#define OBJ_stateOrProvinceName OBJ_X509,8L + +#define SN_streetAddress "street" +#define LN_streetAddress "streetAddress" +#define NID_streetAddress 660 +#define OBJ_streetAddress OBJ_X509,9L + +#define SN_organizationName "O" +#define LN_organizationName "organizationName" +#define NID_organizationName 17 +#define OBJ_organizationName OBJ_X509,10L + +#define SN_organizationalUnitName "OU" +#define LN_organizationalUnitName "organizationalUnitName" +#define NID_organizationalUnitName 18 +#define OBJ_organizationalUnitName OBJ_X509,11L + +#define SN_title "title" +#define LN_title "title" +#define NID_title 106 +#define OBJ_title OBJ_X509,12L + +#define LN_description "description" +#define NID_description 107 +#define OBJ_description OBJ_X509,13L + +#define LN_searchGuide "searchGuide" +#define NID_searchGuide 859 +#define OBJ_searchGuide OBJ_X509,14L + +#define LN_businessCategory "businessCategory" +#define NID_businessCategory 860 +#define OBJ_businessCategory OBJ_X509,15L + +#define LN_postalAddress "postalAddress" +#define NID_postalAddress 861 +#define OBJ_postalAddress OBJ_X509,16L + +#define LN_postalCode "postalCode" +#define NID_postalCode 661 +#define OBJ_postalCode OBJ_X509,17L + +#define LN_postOfficeBox "postOfficeBox" +#define NID_postOfficeBox 862 +#define OBJ_postOfficeBox OBJ_X509,18L + +#define LN_physicalDeliveryOfficeName "physicalDeliveryOfficeName" +#define NID_physicalDeliveryOfficeName 863 +#define OBJ_physicalDeliveryOfficeName OBJ_X509,19L + +#define LN_telephoneNumber "telephoneNumber" +#define NID_telephoneNumber 864 +#define OBJ_telephoneNumber OBJ_X509,20L + +#define LN_telexNumber "telexNumber" +#define NID_telexNumber 865 +#define OBJ_telexNumber OBJ_X509,21L + +#define LN_teletexTerminalIdentifier "teletexTerminalIdentifier" +#define NID_teletexTerminalIdentifier 866 +#define OBJ_teletexTerminalIdentifier OBJ_X509,22L + +#define LN_facsimileTelephoneNumber "facsimileTelephoneNumber" +#define NID_facsimileTelephoneNumber 867 +#define OBJ_facsimileTelephoneNumber OBJ_X509,23L + +#define LN_x121Address "x121Address" +#define NID_x121Address 868 +#define OBJ_x121Address OBJ_X509,24L + +#define LN_internationaliSDNNumber "internationaliSDNNumber" +#define NID_internationaliSDNNumber 869 +#define OBJ_internationaliSDNNumber OBJ_X509,25L + +#define LN_registeredAddress "registeredAddress" +#define NID_registeredAddress 870 +#define OBJ_registeredAddress OBJ_X509,26L + +#define LN_destinationIndicator "destinationIndicator" +#define NID_destinationIndicator 871 +#define OBJ_destinationIndicator OBJ_X509,27L + +#define LN_preferredDeliveryMethod "preferredDeliveryMethod" +#define NID_preferredDeliveryMethod 872 +#define OBJ_preferredDeliveryMethod OBJ_X509,28L + +#define LN_presentationAddress "presentationAddress" +#define NID_presentationAddress 873 +#define OBJ_presentationAddress OBJ_X509,29L + +#define LN_supportedApplicationContext "supportedApplicationContext" +#define NID_supportedApplicationContext 874 +#define OBJ_supportedApplicationContext OBJ_X509,30L + +#define SN_member "member" +#define NID_member 875 +#define OBJ_member OBJ_X509,31L + +#define SN_owner "owner" +#define NID_owner 876 +#define OBJ_owner OBJ_X509,32L + +#define LN_roleOccupant "roleOccupant" +#define NID_roleOccupant 877 +#define OBJ_roleOccupant OBJ_X509,33L + +#define SN_seeAlso "seeAlso" +#define NID_seeAlso 878 +#define OBJ_seeAlso OBJ_X509,34L + +#define LN_userPassword "userPassword" +#define NID_userPassword 879 +#define OBJ_userPassword OBJ_X509,35L + +#define LN_userCertificate "userCertificate" +#define NID_userCertificate 880 +#define OBJ_userCertificate OBJ_X509,36L + +#define LN_cACertificate "cACertificate" +#define NID_cACertificate 881 +#define OBJ_cACertificate OBJ_X509,37L + +#define LN_authorityRevocationList "authorityRevocationList" +#define NID_authorityRevocationList 882 +#define OBJ_authorityRevocationList OBJ_X509,38L + +#define LN_certificateRevocationList "certificateRevocationList" +#define NID_certificateRevocationList 883 +#define OBJ_certificateRevocationList OBJ_X509,39L + +#define LN_crossCertificatePair "crossCertificatePair" +#define NID_crossCertificatePair 884 +#define OBJ_crossCertificatePair OBJ_X509,40L + +#define SN_name "name" +#define LN_name "name" +#define NID_name 173 +#define OBJ_name OBJ_X509,41L + +#define SN_givenName "GN" +#define LN_givenName "givenName" +#define NID_givenName 99 +#define OBJ_givenName OBJ_X509,42L + +#define SN_initials "initials" +#define LN_initials "initials" +#define NID_initials 101 +#define OBJ_initials OBJ_X509,43L + +#define LN_generationQualifier "generationQualifier" +#define NID_generationQualifier 509 +#define OBJ_generationQualifier OBJ_X509,44L + +#define LN_x500UniqueIdentifier "x500UniqueIdentifier" +#define NID_x500UniqueIdentifier 503 +#define OBJ_x500UniqueIdentifier OBJ_X509,45L + +#define SN_dnQualifier "dnQualifier" +#define LN_dnQualifier "dnQualifier" +#define NID_dnQualifier 174 +#define OBJ_dnQualifier OBJ_X509,46L + +#define LN_enhancedSearchGuide "enhancedSearchGuide" +#define NID_enhancedSearchGuide 885 +#define OBJ_enhancedSearchGuide OBJ_X509,47L + +#define LN_protocolInformation "protocolInformation" +#define NID_protocolInformation 886 +#define OBJ_protocolInformation OBJ_X509,48L + +#define LN_distinguishedName "distinguishedName" +#define NID_distinguishedName 887 +#define OBJ_distinguishedName OBJ_X509,49L + +#define LN_uniqueMember "uniqueMember" +#define NID_uniqueMember 888 +#define OBJ_uniqueMember OBJ_X509,50L + +#define LN_houseIdentifier "houseIdentifier" +#define NID_houseIdentifier 889 +#define OBJ_houseIdentifier OBJ_X509,51L + +#define LN_supportedAlgorithms "supportedAlgorithms" +#define NID_supportedAlgorithms 890 +#define OBJ_supportedAlgorithms OBJ_X509,52L + +#define LN_deltaRevocationList "deltaRevocationList" +#define NID_deltaRevocationList 891 +#define OBJ_deltaRevocationList OBJ_X509,53L + +#define SN_dmdName "dmdName" +#define NID_dmdName 892 +#define OBJ_dmdName OBJ_X509,54L + +#define LN_pseudonym "pseudonym" +#define NID_pseudonym 510 +#define OBJ_pseudonym OBJ_X509,65L + +#define SN_role "role" +#define LN_role "role" +#define NID_role 400 +#define OBJ_role OBJ_X509,72L + +#define LN_organizationIdentifier "organizationIdentifier" +#define NID_organizationIdentifier 1089 +#define OBJ_organizationIdentifier OBJ_X509,97L + +#define SN_countryCode3c "c3" +#define LN_countryCode3c "countryCode3c" +#define NID_countryCode3c 1090 +#define OBJ_countryCode3c OBJ_X509,98L + +#define SN_countryCode3n "n3" +#define LN_countryCode3n "countryCode3n" +#define NID_countryCode3n 1091 +#define OBJ_countryCode3n OBJ_X509,99L + +#define LN_dnsName "dnsName" +#define NID_dnsName 1092 +#define OBJ_dnsName OBJ_X509,100L + +#define SN_X500algorithms "X500algorithms" +#define LN_X500algorithms "directory services - algorithms" +#define NID_X500algorithms 378 +#define OBJ_X500algorithms OBJ_X500,8L + +#define SN_rsa "RSA" +#define LN_rsa "rsa" +#define NID_rsa 19 +#define OBJ_rsa OBJ_X500algorithms,1L,1L + +#define SN_mdc2WithRSA "RSA-MDC2" +#define LN_mdc2WithRSA "mdc2WithRSA" +#define NID_mdc2WithRSA 96 +#define OBJ_mdc2WithRSA OBJ_X500algorithms,3L,100L + +#define SN_mdc2 "MDC2" +#define LN_mdc2 "mdc2" +#define NID_mdc2 95 +#define OBJ_mdc2 OBJ_X500algorithms,3L,101L + +#define SN_id_ce "id-ce" +#define NID_id_ce 81 +#define OBJ_id_ce OBJ_X500,29L + +#define SN_subject_directory_attributes "subjectDirectoryAttributes" +#define LN_subject_directory_attributes "X509v3 Subject Directory Attributes" +#define NID_subject_directory_attributes 769 +#define OBJ_subject_directory_attributes OBJ_id_ce,9L + +#define SN_subject_key_identifier "subjectKeyIdentifier" +#define LN_subject_key_identifier "X509v3 Subject Key Identifier" +#define NID_subject_key_identifier 82 +#define OBJ_subject_key_identifier OBJ_id_ce,14L + +#define SN_key_usage "keyUsage" +#define LN_key_usage "X509v3 Key Usage" +#define NID_key_usage 83 +#define OBJ_key_usage OBJ_id_ce,15L + +#define SN_private_key_usage_period "privateKeyUsagePeriod" +#define LN_private_key_usage_period "X509v3 Private Key Usage Period" +#define NID_private_key_usage_period 84 +#define OBJ_private_key_usage_period OBJ_id_ce,16L + +#define SN_subject_alt_name "subjectAltName" +#define LN_subject_alt_name "X509v3 Subject Alternative Name" +#define NID_subject_alt_name 85 +#define OBJ_subject_alt_name OBJ_id_ce,17L + +#define SN_issuer_alt_name "issuerAltName" +#define LN_issuer_alt_name "X509v3 Issuer Alternative Name" +#define NID_issuer_alt_name 86 +#define OBJ_issuer_alt_name OBJ_id_ce,18L + +#define SN_basic_constraints "basicConstraints" +#define LN_basic_constraints "X509v3 Basic Constraints" +#define NID_basic_constraints 87 +#define OBJ_basic_constraints OBJ_id_ce,19L + +#define SN_crl_number "crlNumber" +#define LN_crl_number "X509v3 CRL Number" +#define NID_crl_number 88 +#define OBJ_crl_number OBJ_id_ce,20L + +#define SN_crl_reason "CRLReason" +#define LN_crl_reason "X509v3 CRL Reason Code" +#define NID_crl_reason 141 +#define OBJ_crl_reason OBJ_id_ce,21L + +#define SN_invalidity_date "invalidityDate" +#define LN_invalidity_date "Invalidity Date" +#define NID_invalidity_date 142 +#define OBJ_invalidity_date OBJ_id_ce,24L + +#define SN_delta_crl "deltaCRL" +#define LN_delta_crl "X509v3 Delta CRL Indicator" +#define NID_delta_crl 140 +#define OBJ_delta_crl OBJ_id_ce,27L + +#define SN_issuing_distribution_point "issuingDistributionPoint" +#define LN_issuing_distribution_point "X509v3 Issuing Distribution Point" +#define NID_issuing_distribution_point 770 +#define OBJ_issuing_distribution_point OBJ_id_ce,28L + +#define SN_certificate_issuer "certificateIssuer" +#define LN_certificate_issuer "X509v3 Certificate Issuer" +#define NID_certificate_issuer 771 +#define OBJ_certificate_issuer OBJ_id_ce,29L + +#define SN_name_constraints "nameConstraints" +#define LN_name_constraints "X509v3 Name Constraints" +#define NID_name_constraints 666 +#define OBJ_name_constraints OBJ_id_ce,30L + +#define SN_crl_distribution_points "crlDistributionPoints" +#define LN_crl_distribution_points "X509v3 CRL Distribution Points" +#define NID_crl_distribution_points 103 +#define OBJ_crl_distribution_points OBJ_id_ce,31L + +#define SN_certificate_policies "certificatePolicies" +#define LN_certificate_policies "X509v3 Certificate Policies" +#define NID_certificate_policies 89 +#define OBJ_certificate_policies OBJ_id_ce,32L + +#define SN_any_policy "anyPolicy" +#define LN_any_policy "X509v3 Any Policy" +#define NID_any_policy 746 +#define OBJ_any_policy OBJ_certificate_policies,0L + +#define SN_policy_mappings "policyMappings" +#define LN_policy_mappings "X509v3 Policy Mappings" +#define NID_policy_mappings 747 +#define OBJ_policy_mappings OBJ_id_ce,33L + +#define SN_authority_key_identifier "authorityKeyIdentifier" +#define LN_authority_key_identifier "X509v3 Authority Key Identifier" +#define NID_authority_key_identifier 90 +#define OBJ_authority_key_identifier OBJ_id_ce,35L + +#define SN_policy_constraints "policyConstraints" +#define LN_policy_constraints "X509v3 Policy Constraints" +#define NID_policy_constraints 401 +#define OBJ_policy_constraints OBJ_id_ce,36L + +#define SN_ext_key_usage "extendedKeyUsage" +#define LN_ext_key_usage "X509v3 Extended Key Usage" +#define NID_ext_key_usage 126 +#define OBJ_ext_key_usage OBJ_id_ce,37L + +#define SN_freshest_crl "freshestCRL" +#define LN_freshest_crl "X509v3 Freshest CRL" +#define NID_freshest_crl 857 +#define OBJ_freshest_crl OBJ_id_ce,46L + +#define SN_inhibit_any_policy "inhibitAnyPolicy" +#define LN_inhibit_any_policy "X509v3 Inhibit Any Policy" +#define NID_inhibit_any_policy 748 +#define OBJ_inhibit_any_policy OBJ_id_ce,54L + +#define SN_target_information "targetInformation" +#define LN_target_information "X509v3 AC Targeting" +#define NID_target_information 402 +#define OBJ_target_information OBJ_id_ce,55L + +#define SN_no_rev_avail "noRevAvail" +#define LN_no_rev_avail "X509v3 No Revocation Available" +#define NID_no_rev_avail 403 +#define OBJ_no_rev_avail OBJ_id_ce,56L + +#define SN_anyExtendedKeyUsage "anyExtendedKeyUsage" +#define LN_anyExtendedKeyUsage "Any Extended Key Usage" +#define NID_anyExtendedKeyUsage 910 +#define OBJ_anyExtendedKeyUsage OBJ_ext_key_usage,0L + +#define SN_netscape "Netscape" +#define LN_netscape "Netscape Communications Corp." +#define NID_netscape 57 +#define OBJ_netscape 2L,16L,840L,1L,113730L + +#define SN_netscape_cert_extension "nsCertExt" +#define LN_netscape_cert_extension "Netscape Certificate Extension" +#define NID_netscape_cert_extension 58 +#define OBJ_netscape_cert_extension OBJ_netscape,1L + +#define SN_netscape_data_type "nsDataType" +#define LN_netscape_data_type "Netscape Data Type" +#define NID_netscape_data_type 59 +#define OBJ_netscape_data_type OBJ_netscape,2L + +#define SN_netscape_cert_type "nsCertType" +#define LN_netscape_cert_type "Netscape Cert Type" +#define NID_netscape_cert_type 71 +#define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L + +#define SN_netscape_base_url "nsBaseUrl" +#define LN_netscape_base_url "Netscape Base Url" +#define NID_netscape_base_url 72 +#define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L + +#define SN_netscape_revocation_url "nsRevocationUrl" +#define LN_netscape_revocation_url "Netscape Revocation Url" +#define NID_netscape_revocation_url 73 +#define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L + +#define SN_netscape_ca_revocation_url "nsCaRevocationUrl" +#define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" +#define NID_netscape_ca_revocation_url 74 +#define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L + +#define SN_netscape_renewal_url "nsRenewalUrl" +#define LN_netscape_renewal_url "Netscape Renewal Url" +#define NID_netscape_renewal_url 75 +#define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L + +#define SN_netscape_ca_policy_url "nsCaPolicyUrl" +#define LN_netscape_ca_policy_url "Netscape CA Policy Url" +#define NID_netscape_ca_policy_url 76 +#define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L + +#define SN_netscape_ssl_server_name "nsSslServerName" +#define LN_netscape_ssl_server_name "Netscape SSL Server Name" +#define NID_netscape_ssl_server_name 77 +#define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L + +#define SN_netscape_comment "nsComment" +#define LN_netscape_comment "Netscape Comment" +#define NID_netscape_comment 78 +#define OBJ_netscape_comment OBJ_netscape_cert_extension,13L + +#define SN_netscape_cert_sequence "nsCertSequence" +#define LN_netscape_cert_sequence "Netscape Certificate Sequence" +#define NID_netscape_cert_sequence 79 +#define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L + +#define SN_ns_sgc "nsSGC" +#define LN_ns_sgc "Netscape Server Gated Crypto" +#define NID_ns_sgc 139 +#define OBJ_ns_sgc OBJ_netscape,4L,1L + +#define SN_org "ORG" +#define LN_org "org" +#define NID_org 379 +#define OBJ_org OBJ_iso,3L + +#define SN_dod "DOD" +#define LN_dod "dod" +#define NID_dod 380 +#define OBJ_dod OBJ_org,6L + +#define SN_iana "IANA" +#define LN_iana "iana" +#define NID_iana 381 +#define OBJ_iana OBJ_dod,1L + +#define OBJ_internet OBJ_iana + +#define SN_Directory "directory" +#define LN_Directory "Directory" +#define NID_Directory 382 +#define OBJ_Directory OBJ_internet,1L + +#define SN_Management "mgmt" +#define LN_Management "Management" +#define NID_Management 383 +#define OBJ_Management OBJ_internet,2L + +#define SN_Experimental "experimental" +#define LN_Experimental "Experimental" +#define NID_Experimental 384 +#define OBJ_Experimental OBJ_internet,3L + +#define SN_Private "private" +#define LN_Private "Private" +#define NID_Private 385 +#define OBJ_Private OBJ_internet,4L + +#define SN_Security "security" +#define LN_Security "Security" +#define NID_Security 386 +#define OBJ_Security OBJ_internet,5L + +#define SN_SNMPv2 "snmpv2" +#define LN_SNMPv2 "SNMPv2" +#define NID_SNMPv2 387 +#define OBJ_SNMPv2 OBJ_internet,6L + +#define LN_Mail "Mail" +#define NID_Mail 388 +#define OBJ_Mail OBJ_internet,7L + +#define SN_Enterprises "enterprises" +#define LN_Enterprises "Enterprises" +#define NID_Enterprises 389 +#define OBJ_Enterprises OBJ_Private,1L + +#define SN_dcObject "dcobject" +#define LN_dcObject "dcObject" +#define NID_dcObject 390 +#define OBJ_dcObject OBJ_Enterprises,1466L,344L + +#define SN_mime_mhs "mime-mhs" +#define LN_mime_mhs "MIME MHS" +#define NID_mime_mhs 504 +#define OBJ_mime_mhs OBJ_Mail,1L + +#define SN_mime_mhs_headings "mime-mhs-headings" +#define LN_mime_mhs_headings "mime-mhs-headings" +#define NID_mime_mhs_headings 505 +#define OBJ_mime_mhs_headings OBJ_mime_mhs,1L + +#define SN_mime_mhs_bodies "mime-mhs-bodies" +#define LN_mime_mhs_bodies "mime-mhs-bodies" +#define NID_mime_mhs_bodies 506 +#define OBJ_mime_mhs_bodies OBJ_mime_mhs,2L + +#define SN_id_hex_partial_message "id-hex-partial-message" +#define LN_id_hex_partial_message "id-hex-partial-message" +#define NID_id_hex_partial_message 507 +#define OBJ_id_hex_partial_message OBJ_mime_mhs_headings,1L + +#define SN_id_hex_multipart_message "id-hex-multipart-message" +#define LN_id_hex_multipart_message "id-hex-multipart-message" +#define NID_id_hex_multipart_message 508 +#define OBJ_id_hex_multipart_message OBJ_mime_mhs_headings,2L + +#define SN_zlib_compression "ZLIB" +#define LN_zlib_compression "zlib compression" +#define NID_zlib_compression 125 +#define OBJ_zlib_compression OBJ_id_smime_alg,8L + +#define OBJ_csor 2L,16L,840L,1L,101L,3L + +#define OBJ_nistAlgorithms OBJ_csor,4L + +#define OBJ_aes OBJ_nistAlgorithms,1L + +#define SN_aes_128_ecb "AES-128-ECB" +#define LN_aes_128_ecb "aes-128-ecb" +#define NID_aes_128_ecb 418 +#define OBJ_aes_128_ecb OBJ_aes,1L + +#define SN_aes_128_cbc "AES-128-CBC" +#define LN_aes_128_cbc "aes-128-cbc" +#define NID_aes_128_cbc 419 +#define OBJ_aes_128_cbc OBJ_aes,2L + +#define SN_aes_128_ofb128 "AES-128-OFB" +#define LN_aes_128_ofb128 "aes-128-ofb" +#define NID_aes_128_ofb128 420 +#define OBJ_aes_128_ofb128 OBJ_aes,3L + +#define SN_aes_128_cfb128 "AES-128-CFB" +#define LN_aes_128_cfb128 "aes-128-cfb" +#define NID_aes_128_cfb128 421 +#define OBJ_aes_128_cfb128 OBJ_aes,4L + +#define SN_id_aes128_wrap "id-aes128-wrap" +#define NID_id_aes128_wrap 788 +#define OBJ_id_aes128_wrap OBJ_aes,5L + +#define SN_aes_128_gcm "id-aes128-GCM" +#define LN_aes_128_gcm "aes-128-gcm" +#define NID_aes_128_gcm 895 +#define OBJ_aes_128_gcm OBJ_aes,6L + +#define SN_aes_128_ccm "id-aes128-CCM" +#define LN_aes_128_ccm "aes-128-ccm" +#define NID_aes_128_ccm 896 +#define OBJ_aes_128_ccm OBJ_aes,7L + +#define SN_id_aes128_wrap_pad "id-aes128-wrap-pad" +#define NID_id_aes128_wrap_pad 897 +#define OBJ_id_aes128_wrap_pad OBJ_aes,8L + +#define SN_aes_192_ecb "AES-192-ECB" +#define LN_aes_192_ecb "aes-192-ecb" +#define NID_aes_192_ecb 422 +#define OBJ_aes_192_ecb OBJ_aes,21L + +#define SN_aes_192_cbc "AES-192-CBC" +#define LN_aes_192_cbc "aes-192-cbc" +#define NID_aes_192_cbc 423 +#define OBJ_aes_192_cbc OBJ_aes,22L + +#define SN_aes_192_ofb128 "AES-192-OFB" +#define LN_aes_192_ofb128 "aes-192-ofb" +#define NID_aes_192_ofb128 424 +#define OBJ_aes_192_ofb128 OBJ_aes,23L + +#define SN_aes_192_cfb128 "AES-192-CFB" +#define LN_aes_192_cfb128 "aes-192-cfb" +#define NID_aes_192_cfb128 425 +#define OBJ_aes_192_cfb128 OBJ_aes,24L + +#define SN_id_aes192_wrap "id-aes192-wrap" +#define NID_id_aes192_wrap 789 +#define OBJ_id_aes192_wrap OBJ_aes,25L + +#define SN_aes_192_gcm "id-aes192-GCM" +#define LN_aes_192_gcm "aes-192-gcm" +#define NID_aes_192_gcm 898 +#define OBJ_aes_192_gcm OBJ_aes,26L + +#define SN_aes_192_ccm "id-aes192-CCM" +#define LN_aes_192_ccm "aes-192-ccm" +#define NID_aes_192_ccm 899 +#define OBJ_aes_192_ccm OBJ_aes,27L + +#define SN_id_aes192_wrap_pad "id-aes192-wrap-pad" +#define NID_id_aes192_wrap_pad 900 +#define OBJ_id_aes192_wrap_pad OBJ_aes,28L + +#define SN_aes_256_ecb "AES-256-ECB" +#define LN_aes_256_ecb "aes-256-ecb" +#define NID_aes_256_ecb 426 +#define OBJ_aes_256_ecb OBJ_aes,41L + +#define SN_aes_256_cbc "AES-256-CBC" +#define LN_aes_256_cbc "aes-256-cbc" +#define NID_aes_256_cbc 427 +#define OBJ_aes_256_cbc OBJ_aes,42L + +#define SN_aes_256_ofb128 "AES-256-OFB" +#define LN_aes_256_ofb128 "aes-256-ofb" +#define NID_aes_256_ofb128 428 +#define OBJ_aes_256_ofb128 OBJ_aes,43L + +#define SN_aes_256_cfb128 "AES-256-CFB" +#define LN_aes_256_cfb128 "aes-256-cfb" +#define NID_aes_256_cfb128 429 +#define OBJ_aes_256_cfb128 OBJ_aes,44L + +#define SN_id_aes256_wrap "id-aes256-wrap" +#define NID_id_aes256_wrap 790 +#define OBJ_id_aes256_wrap OBJ_aes,45L + +#define SN_aes_256_gcm "id-aes256-GCM" +#define LN_aes_256_gcm "aes-256-gcm" +#define NID_aes_256_gcm 901 +#define OBJ_aes_256_gcm OBJ_aes,46L + +#define SN_aes_256_ccm "id-aes256-CCM" +#define LN_aes_256_ccm "aes-256-ccm" +#define NID_aes_256_ccm 902 +#define OBJ_aes_256_ccm OBJ_aes,47L + +#define SN_id_aes256_wrap_pad "id-aes256-wrap-pad" +#define NID_id_aes256_wrap_pad 903 +#define OBJ_id_aes256_wrap_pad OBJ_aes,48L + +#define SN_aes_128_xts "AES-128-XTS" +#define LN_aes_128_xts "aes-128-xts" +#define NID_aes_128_xts 913 +#define OBJ_aes_128_xts OBJ_ieee_siswg,0L,1L,1L + +#define SN_aes_256_xts "AES-256-XTS" +#define LN_aes_256_xts "aes-256-xts" +#define NID_aes_256_xts 914 +#define OBJ_aes_256_xts OBJ_ieee_siswg,0L,1L,2L + +#define SN_aes_128_cfb1 "AES-128-CFB1" +#define LN_aes_128_cfb1 "aes-128-cfb1" +#define NID_aes_128_cfb1 650 + +#define SN_aes_192_cfb1 "AES-192-CFB1" +#define LN_aes_192_cfb1 "aes-192-cfb1" +#define NID_aes_192_cfb1 651 + +#define SN_aes_256_cfb1 "AES-256-CFB1" +#define LN_aes_256_cfb1 "aes-256-cfb1" +#define NID_aes_256_cfb1 652 + +#define SN_aes_128_cfb8 "AES-128-CFB8" +#define LN_aes_128_cfb8 "aes-128-cfb8" +#define NID_aes_128_cfb8 653 + +#define SN_aes_192_cfb8 "AES-192-CFB8" +#define LN_aes_192_cfb8 "aes-192-cfb8" +#define NID_aes_192_cfb8 654 + +#define SN_aes_256_cfb8 "AES-256-CFB8" +#define LN_aes_256_cfb8 "aes-256-cfb8" +#define NID_aes_256_cfb8 655 + +#define SN_aes_128_ctr "AES-128-CTR" +#define LN_aes_128_ctr "aes-128-ctr" +#define NID_aes_128_ctr 904 + +#define SN_aes_192_ctr "AES-192-CTR" +#define LN_aes_192_ctr "aes-192-ctr" +#define NID_aes_192_ctr 905 + +#define SN_aes_256_ctr "AES-256-CTR" +#define LN_aes_256_ctr "aes-256-ctr" +#define NID_aes_256_ctr 906 + +#define SN_aes_128_ocb "AES-128-OCB" +#define LN_aes_128_ocb "aes-128-ocb" +#define NID_aes_128_ocb 958 + +#define SN_aes_192_ocb "AES-192-OCB" +#define LN_aes_192_ocb "aes-192-ocb" +#define NID_aes_192_ocb 959 + +#define SN_aes_256_ocb "AES-256-OCB" +#define LN_aes_256_ocb "aes-256-ocb" +#define NID_aes_256_ocb 960 + +#define SN_des_cfb1 "DES-CFB1" +#define LN_des_cfb1 "des-cfb1" +#define NID_des_cfb1 656 + +#define SN_des_cfb8 "DES-CFB8" +#define LN_des_cfb8 "des-cfb8" +#define NID_des_cfb8 657 + +#define SN_des_ede3_cfb1 "DES-EDE3-CFB1" +#define LN_des_ede3_cfb1 "des-ede3-cfb1" +#define NID_des_ede3_cfb1 658 + +#define SN_des_ede3_cfb8 "DES-EDE3-CFB8" +#define LN_des_ede3_cfb8 "des-ede3-cfb8" +#define NID_des_ede3_cfb8 659 + +#define OBJ_nist_hashalgs OBJ_nistAlgorithms,2L + +#define SN_sha256 "SHA256" +#define LN_sha256 "sha256" +#define NID_sha256 672 +#define OBJ_sha256 OBJ_nist_hashalgs,1L + +#define SN_sha384 "SHA384" +#define LN_sha384 "sha384" +#define NID_sha384 673 +#define OBJ_sha384 OBJ_nist_hashalgs,2L + +#define SN_sha512 "SHA512" +#define LN_sha512 "sha512" +#define NID_sha512 674 +#define OBJ_sha512 OBJ_nist_hashalgs,3L + +#define SN_sha224 "SHA224" +#define LN_sha224 "sha224" +#define NID_sha224 675 +#define OBJ_sha224 OBJ_nist_hashalgs,4L + +#define SN_sha512_224 "SHA512-224" +#define LN_sha512_224 "sha512-224" +#define NID_sha512_224 1094 +#define OBJ_sha512_224 OBJ_nist_hashalgs,5L + +#define SN_sha512_256 "SHA512-256" +#define LN_sha512_256 "sha512-256" +#define NID_sha512_256 1095 +#define OBJ_sha512_256 OBJ_nist_hashalgs,6L + +#define SN_sha3_224 "SHA3-224" +#define LN_sha3_224 "sha3-224" +#define NID_sha3_224 1096 +#define OBJ_sha3_224 OBJ_nist_hashalgs,7L + +#define SN_sha3_256 "SHA3-256" +#define LN_sha3_256 "sha3-256" +#define NID_sha3_256 1097 +#define OBJ_sha3_256 OBJ_nist_hashalgs,8L + +#define SN_sha3_384 "SHA3-384" +#define LN_sha3_384 "sha3-384" +#define NID_sha3_384 1098 +#define OBJ_sha3_384 OBJ_nist_hashalgs,9L + +#define SN_sha3_512 "SHA3-512" +#define LN_sha3_512 "sha3-512" +#define NID_sha3_512 1099 +#define OBJ_sha3_512 OBJ_nist_hashalgs,10L + +#define SN_shake128 "SHAKE128" +#define LN_shake128 "shake128" +#define NID_shake128 1100 +#define OBJ_shake128 OBJ_nist_hashalgs,11L + +#define SN_shake256 "SHAKE256" +#define LN_shake256 "shake256" +#define NID_shake256 1101 +#define OBJ_shake256 OBJ_nist_hashalgs,12L + +#define SN_hmac_sha3_224 "id-hmacWithSHA3-224" +#define LN_hmac_sha3_224 "hmac-sha3-224" +#define NID_hmac_sha3_224 1102 +#define OBJ_hmac_sha3_224 OBJ_nist_hashalgs,13L + +#define SN_hmac_sha3_256 "id-hmacWithSHA3-256" +#define LN_hmac_sha3_256 "hmac-sha3-256" +#define NID_hmac_sha3_256 1103 +#define OBJ_hmac_sha3_256 OBJ_nist_hashalgs,14L + +#define SN_hmac_sha3_384 "id-hmacWithSHA3-384" +#define LN_hmac_sha3_384 "hmac-sha3-384" +#define NID_hmac_sha3_384 1104 +#define OBJ_hmac_sha3_384 OBJ_nist_hashalgs,15L + +#define SN_hmac_sha3_512 "id-hmacWithSHA3-512" +#define LN_hmac_sha3_512 "hmac-sha3-512" +#define NID_hmac_sha3_512 1105 +#define OBJ_hmac_sha3_512 OBJ_nist_hashalgs,16L + +#define OBJ_dsa_with_sha2 OBJ_nistAlgorithms,3L + +#define SN_dsa_with_SHA224 "dsa_with_SHA224" +#define NID_dsa_with_SHA224 802 +#define OBJ_dsa_with_SHA224 OBJ_dsa_with_sha2,1L + +#define SN_dsa_with_SHA256 "dsa_with_SHA256" +#define NID_dsa_with_SHA256 803 +#define OBJ_dsa_with_SHA256 OBJ_dsa_with_sha2,2L + +#define OBJ_sigAlgs OBJ_nistAlgorithms,3L + +#define SN_dsa_with_SHA384 "id-dsa-with-sha384" +#define LN_dsa_with_SHA384 "dsa_with_SHA384" +#define NID_dsa_with_SHA384 1106 +#define OBJ_dsa_with_SHA384 OBJ_sigAlgs,3L + +#define SN_dsa_with_SHA512 "id-dsa-with-sha512" +#define LN_dsa_with_SHA512 "dsa_with_SHA512" +#define NID_dsa_with_SHA512 1107 +#define OBJ_dsa_with_SHA512 OBJ_sigAlgs,4L + +#define SN_dsa_with_SHA3_224 "id-dsa-with-sha3-224" +#define LN_dsa_with_SHA3_224 "dsa_with_SHA3-224" +#define NID_dsa_with_SHA3_224 1108 +#define OBJ_dsa_with_SHA3_224 OBJ_sigAlgs,5L + +#define SN_dsa_with_SHA3_256 "id-dsa-with-sha3-256" +#define LN_dsa_with_SHA3_256 "dsa_with_SHA3-256" +#define NID_dsa_with_SHA3_256 1109 +#define OBJ_dsa_with_SHA3_256 OBJ_sigAlgs,6L + +#define SN_dsa_with_SHA3_384 "id-dsa-with-sha3-384" +#define LN_dsa_with_SHA3_384 "dsa_with_SHA3-384" +#define NID_dsa_with_SHA3_384 1110 +#define OBJ_dsa_with_SHA3_384 OBJ_sigAlgs,7L + +#define SN_dsa_with_SHA3_512 "id-dsa-with-sha3-512" +#define LN_dsa_with_SHA3_512 "dsa_with_SHA3-512" +#define NID_dsa_with_SHA3_512 1111 +#define OBJ_dsa_with_SHA3_512 OBJ_sigAlgs,8L + +#define SN_ecdsa_with_SHA3_224 "id-ecdsa-with-sha3-224" +#define LN_ecdsa_with_SHA3_224 "ecdsa_with_SHA3-224" +#define NID_ecdsa_with_SHA3_224 1112 +#define OBJ_ecdsa_with_SHA3_224 OBJ_sigAlgs,9L + +#define SN_ecdsa_with_SHA3_256 "id-ecdsa-with-sha3-256" +#define LN_ecdsa_with_SHA3_256 "ecdsa_with_SHA3-256" +#define NID_ecdsa_with_SHA3_256 1113 +#define OBJ_ecdsa_with_SHA3_256 OBJ_sigAlgs,10L + +#define SN_ecdsa_with_SHA3_384 "id-ecdsa-with-sha3-384" +#define LN_ecdsa_with_SHA3_384 "ecdsa_with_SHA3-384" +#define NID_ecdsa_with_SHA3_384 1114 +#define OBJ_ecdsa_with_SHA3_384 OBJ_sigAlgs,11L + +#define SN_ecdsa_with_SHA3_512 "id-ecdsa-with-sha3-512" +#define LN_ecdsa_with_SHA3_512 "ecdsa_with_SHA3-512" +#define NID_ecdsa_with_SHA3_512 1115 +#define OBJ_ecdsa_with_SHA3_512 OBJ_sigAlgs,12L + +#define SN_RSA_SHA3_224 "id-rsassa-pkcs1-v1_5-with-sha3-224" +#define LN_RSA_SHA3_224 "RSA-SHA3-224" +#define NID_RSA_SHA3_224 1116 +#define OBJ_RSA_SHA3_224 OBJ_sigAlgs,13L + +#define SN_RSA_SHA3_256 "id-rsassa-pkcs1-v1_5-with-sha3-256" +#define LN_RSA_SHA3_256 "RSA-SHA3-256" +#define NID_RSA_SHA3_256 1117 +#define OBJ_RSA_SHA3_256 OBJ_sigAlgs,14L + +#define SN_RSA_SHA3_384 "id-rsassa-pkcs1-v1_5-with-sha3-384" +#define LN_RSA_SHA3_384 "RSA-SHA3-384" +#define NID_RSA_SHA3_384 1118 +#define OBJ_RSA_SHA3_384 OBJ_sigAlgs,15L + +#define SN_RSA_SHA3_512 "id-rsassa-pkcs1-v1_5-with-sha3-512" +#define LN_RSA_SHA3_512 "RSA-SHA3-512" +#define NID_RSA_SHA3_512 1119 +#define OBJ_RSA_SHA3_512 OBJ_sigAlgs,16L + +#define SN_hold_instruction_code "holdInstructionCode" +#define LN_hold_instruction_code "Hold Instruction Code" +#define NID_hold_instruction_code 430 +#define OBJ_hold_instruction_code OBJ_id_ce,23L + +#define OBJ_holdInstruction OBJ_X9_57,2L + +#define SN_hold_instruction_none "holdInstructionNone" +#define LN_hold_instruction_none "Hold Instruction None" +#define NID_hold_instruction_none 431 +#define OBJ_hold_instruction_none OBJ_holdInstruction,1L + +#define SN_hold_instruction_call_issuer "holdInstructionCallIssuer" +#define LN_hold_instruction_call_issuer "Hold Instruction Call Issuer" +#define NID_hold_instruction_call_issuer 432 +#define OBJ_hold_instruction_call_issuer OBJ_holdInstruction,2L + +#define SN_hold_instruction_reject "holdInstructionReject" +#define LN_hold_instruction_reject "Hold Instruction Reject" +#define NID_hold_instruction_reject 433 +#define OBJ_hold_instruction_reject OBJ_holdInstruction,3L + +#define SN_data "data" +#define NID_data 434 +#define OBJ_data OBJ_itu_t,9L + +#define SN_pss "pss" +#define NID_pss 435 +#define OBJ_pss OBJ_data,2342L + +#define SN_ucl "ucl" +#define NID_ucl 436 +#define OBJ_ucl OBJ_pss,19200300L + +#define SN_pilot "pilot" +#define NID_pilot 437 +#define OBJ_pilot OBJ_ucl,100L + +#define LN_pilotAttributeType "pilotAttributeType" +#define NID_pilotAttributeType 438 +#define OBJ_pilotAttributeType OBJ_pilot,1L + +#define LN_pilotAttributeSyntax "pilotAttributeSyntax" +#define NID_pilotAttributeSyntax 439 +#define OBJ_pilotAttributeSyntax OBJ_pilot,3L + +#define LN_pilotObjectClass "pilotObjectClass" +#define NID_pilotObjectClass 440 +#define OBJ_pilotObjectClass OBJ_pilot,4L + +#define LN_pilotGroups "pilotGroups" +#define NID_pilotGroups 441 +#define OBJ_pilotGroups OBJ_pilot,10L + +#define LN_iA5StringSyntax "iA5StringSyntax" +#define NID_iA5StringSyntax 442 +#define OBJ_iA5StringSyntax OBJ_pilotAttributeSyntax,4L + +#define LN_caseIgnoreIA5StringSyntax "caseIgnoreIA5StringSyntax" +#define NID_caseIgnoreIA5StringSyntax 443 +#define OBJ_caseIgnoreIA5StringSyntax OBJ_pilotAttributeSyntax,5L + +#define LN_pilotObject "pilotObject" +#define NID_pilotObject 444 +#define OBJ_pilotObject OBJ_pilotObjectClass,3L + +#define LN_pilotPerson "pilotPerson" +#define NID_pilotPerson 445 +#define OBJ_pilotPerson OBJ_pilotObjectClass,4L + +#define SN_account "account" +#define NID_account 446 +#define OBJ_account OBJ_pilotObjectClass,5L + +#define SN_document "document" +#define NID_document 447 +#define OBJ_document OBJ_pilotObjectClass,6L + +#define SN_room "room" +#define NID_room 448 +#define OBJ_room OBJ_pilotObjectClass,7L + +#define LN_documentSeries "documentSeries" +#define NID_documentSeries 449 +#define OBJ_documentSeries OBJ_pilotObjectClass,9L + +#define SN_Domain "domain" +#define LN_Domain "Domain" +#define NID_Domain 392 +#define OBJ_Domain OBJ_pilotObjectClass,13L + +#define LN_rFC822localPart "rFC822localPart" +#define NID_rFC822localPart 450 +#define OBJ_rFC822localPart OBJ_pilotObjectClass,14L + +#define LN_dNSDomain "dNSDomain" +#define NID_dNSDomain 451 +#define OBJ_dNSDomain OBJ_pilotObjectClass,15L + +#define LN_domainRelatedObject "domainRelatedObject" +#define NID_domainRelatedObject 452 +#define OBJ_domainRelatedObject OBJ_pilotObjectClass,17L + +#define LN_friendlyCountry "friendlyCountry" +#define NID_friendlyCountry 453 +#define OBJ_friendlyCountry OBJ_pilotObjectClass,18L + +#define LN_simpleSecurityObject "simpleSecurityObject" +#define NID_simpleSecurityObject 454 +#define OBJ_simpleSecurityObject OBJ_pilotObjectClass,19L + +#define LN_pilotOrganization "pilotOrganization" +#define NID_pilotOrganization 455 +#define OBJ_pilotOrganization OBJ_pilotObjectClass,20L + +#define LN_pilotDSA "pilotDSA" +#define NID_pilotDSA 456 +#define OBJ_pilotDSA OBJ_pilotObjectClass,21L + +#define LN_qualityLabelledData "qualityLabelledData" +#define NID_qualityLabelledData 457 +#define OBJ_qualityLabelledData OBJ_pilotObjectClass,22L + +#define SN_userId "UID" +#define LN_userId "userId" +#define NID_userId 458 +#define OBJ_userId OBJ_pilotAttributeType,1L + +#define LN_textEncodedORAddress "textEncodedORAddress" +#define NID_textEncodedORAddress 459 +#define OBJ_textEncodedORAddress OBJ_pilotAttributeType,2L + +#define SN_rfc822Mailbox "mail" +#define LN_rfc822Mailbox "rfc822Mailbox" +#define NID_rfc822Mailbox 460 +#define OBJ_rfc822Mailbox OBJ_pilotAttributeType,3L + +#define SN_info "info" +#define NID_info 461 +#define OBJ_info OBJ_pilotAttributeType,4L + +#define LN_favouriteDrink "favouriteDrink" +#define NID_favouriteDrink 462 +#define OBJ_favouriteDrink OBJ_pilotAttributeType,5L + +#define LN_roomNumber "roomNumber" +#define NID_roomNumber 463 +#define OBJ_roomNumber OBJ_pilotAttributeType,6L + +#define SN_photo "photo" +#define NID_photo 464 +#define OBJ_photo OBJ_pilotAttributeType,7L + +#define LN_userClass "userClass" +#define NID_userClass 465 +#define OBJ_userClass OBJ_pilotAttributeType,8L + +#define SN_host "host" +#define NID_host 466 +#define OBJ_host OBJ_pilotAttributeType,9L + +#define SN_manager "manager" +#define NID_manager 467 +#define OBJ_manager OBJ_pilotAttributeType,10L + +#define LN_documentIdentifier "documentIdentifier" +#define NID_documentIdentifier 468 +#define OBJ_documentIdentifier OBJ_pilotAttributeType,11L + +#define LN_documentTitle "documentTitle" +#define NID_documentTitle 469 +#define OBJ_documentTitle OBJ_pilotAttributeType,12L + +#define LN_documentVersion "documentVersion" +#define NID_documentVersion 470 +#define OBJ_documentVersion OBJ_pilotAttributeType,13L + +#define LN_documentAuthor "documentAuthor" +#define NID_documentAuthor 471 +#define OBJ_documentAuthor OBJ_pilotAttributeType,14L + +#define LN_documentLocation "documentLocation" +#define NID_documentLocation 472 +#define OBJ_documentLocation OBJ_pilotAttributeType,15L + +#define LN_homeTelephoneNumber "homeTelephoneNumber" +#define NID_homeTelephoneNumber 473 +#define OBJ_homeTelephoneNumber OBJ_pilotAttributeType,20L + +#define SN_secretary "secretary" +#define NID_secretary 474 +#define OBJ_secretary OBJ_pilotAttributeType,21L + +#define LN_otherMailbox "otherMailbox" +#define NID_otherMailbox 475 +#define OBJ_otherMailbox OBJ_pilotAttributeType,22L + +#define LN_lastModifiedTime "lastModifiedTime" +#define NID_lastModifiedTime 476 +#define OBJ_lastModifiedTime OBJ_pilotAttributeType,23L + +#define LN_lastModifiedBy "lastModifiedBy" +#define NID_lastModifiedBy 477 +#define OBJ_lastModifiedBy OBJ_pilotAttributeType,24L + +#define SN_domainComponent "DC" +#define LN_domainComponent "domainComponent" +#define NID_domainComponent 391 +#define OBJ_domainComponent OBJ_pilotAttributeType,25L + +#define LN_aRecord "aRecord" +#define NID_aRecord 478 +#define OBJ_aRecord OBJ_pilotAttributeType,26L + +#define LN_pilotAttributeType27 "pilotAttributeType27" +#define NID_pilotAttributeType27 479 +#define OBJ_pilotAttributeType27 OBJ_pilotAttributeType,27L + +#define LN_mXRecord "mXRecord" +#define NID_mXRecord 480 +#define OBJ_mXRecord OBJ_pilotAttributeType,28L + +#define LN_nSRecord "nSRecord" +#define NID_nSRecord 481 +#define OBJ_nSRecord OBJ_pilotAttributeType,29L + +#define LN_sOARecord "sOARecord" +#define NID_sOARecord 482 +#define OBJ_sOARecord OBJ_pilotAttributeType,30L + +#define LN_cNAMERecord "cNAMERecord" +#define NID_cNAMERecord 483 +#define OBJ_cNAMERecord OBJ_pilotAttributeType,31L + +#define LN_associatedDomain "associatedDomain" +#define NID_associatedDomain 484 +#define OBJ_associatedDomain OBJ_pilotAttributeType,37L + +#define LN_associatedName "associatedName" +#define NID_associatedName 485 +#define OBJ_associatedName OBJ_pilotAttributeType,38L + +#define LN_homePostalAddress "homePostalAddress" +#define NID_homePostalAddress 486 +#define OBJ_homePostalAddress OBJ_pilotAttributeType,39L + +#define LN_personalTitle "personalTitle" +#define NID_personalTitle 487 +#define OBJ_personalTitle OBJ_pilotAttributeType,40L + +#define LN_mobileTelephoneNumber "mobileTelephoneNumber" +#define NID_mobileTelephoneNumber 488 +#define OBJ_mobileTelephoneNumber OBJ_pilotAttributeType,41L + +#define LN_pagerTelephoneNumber "pagerTelephoneNumber" +#define NID_pagerTelephoneNumber 489 +#define OBJ_pagerTelephoneNumber OBJ_pilotAttributeType,42L + +#define LN_friendlyCountryName "friendlyCountryName" +#define NID_friendlyCountryName 490 +#define OBJ_friendlyCountryName OBJ_pilotAttributeType,43L + +#define SN_uniqueIdentifier "uid" +#define LN_uniqueIdentifier "uniqueIdentifier" +#define NID_uniqueIdentifier 102 +#define OBJ_uniqueIdentifier OBJ_pilotAttributeType,44L + +#define LN_organizationalStatus "organizationalStatus" +#define NID_organizationalStatus 491 +#define OBJ_organizationalStatus OBJ_pilotAttributeType,45L + +#define LN_janetMailbox "janetMailbox" +#define NID_janetMailbox 492 +#define OBJ_janetMailbox OBJ_pilotAttributeType,46L + +#define LN_mailPreferenceOption "mailPreferenceOption" +#define NID_mailPreferenceOption 493 +#define OBJ_mailPreferenceOption OBJ_pilotAttributeType,47L + +#define LN_buildingName "buildingName" +#define NID_buildingName 494 +#define OBJ_buildingName OBJ_pilotAttributeType,48L + +#define LN_dSAQuality "dSAQuality" +#define NID_dSAQuality 495 +#define OBJ_dSAQuality OBJ_pilotAttributeType,49L + +#define LN_singleLevelQuality "singleLevelQuality" +#define NID_singleLevelQuality 496 +#define OBJ_singleLevelQuality OBJ_pilotAttributeType,50L + +#define LN_subtreeMinimumQuality "subtreeMinimumQuality" +#define NID_subtreeMinimumQuality 497 +#define OBJ_subtreeMinimumQuality OBJ_pilotAttributeType,51L + +#define LN_subtreeMaximumQuality "subtreeMaximumQuality" +#define NID_subtreeMaximumQuality 498 +#define OBJ_subtreeMaximumQuality OBJ_pilotAttributeType,52L + +#define LN_personalSignature "personalSignature" +#define NID_personalSignature 499 +#define OBJ_personalSignature OBJ_pilotAttributeType,53L + +#define LN_dITRedirect "dITRedirect" +#define NID_dITRedirect 500 +#define OBJ_dITRedirect OBJ_pilotAttributeType,54L + +#define SN_audio "audio" +#define NID_audio 501 +#define OBJ_audio OBJ_pilotAttributeType,55L + +#define LN_documentPublisher "documentPublisher" +#define NID_documentPublisher 502 +#define OBJ_documentPublisher OBJ_pilotAttributeType,56L + +#define SN_id_set "id-set" +#define LN_id_set "Secure Electronic Transactions" +#define NID_id_set 512 +#define OBJ_id_set OBJ_international_organizations,42L + +#define SN_set_ctype "set-ctype" +#define LN_set_ctype "content types" +#define NID_set_ctype 513 +#define OBJ_set_ctype OBJ_id_set,0L + +#define SN_set_msgExt "set-msgExt" +#define LN_set_msgExt "message extensions" +#define NID_set_msgExt 514 +#define OBJ_set_msgExt OBJ_id_set,1L + +#define SN_set_attr "set-attr" +#define NID_set_attr 515 +#define OBJ_set_attr OBJ_id_set,3L + +#define SN_set_policy "set-policy" +#define NID_set_policy 516 +#define OBJ_set_policy OBJ_id_set,5L + +#define SN_set_certExt "set-certExt" +#define LN_set_certExt "certificate extensions" +#define NID_set_certExt 517 +#define OBJ_set_certExt OBJ_id_set,7L + +#define SN_set_brand "set-brand" +#define NID_set_brand 518 +#define OBJ_set_brand OBJ_id_set,8L + +#define SN_setct_PANData "setct-PANData" +#define NID_setct_PANData 519 +#define OBJ_setct_PANData OBJ_set_ctype,0L + +#define SN_setct_PANToken "setct-PANToken" +#define NID_setct_PANToken 520 +#define OBJ_setct_PANToken OBJ_set_ctype,1L + +#define SN_setct_PANOnly "setct-PANOnly" +#define NID_setct_PANOnly 521 +#define OBJ_setct_PANOnly OBJ_set_ctype,2L + +#define SN_setct_OIData "setct-OIData" +#define NID_setct_OIData 522 +#define OBJ_setct_OIData OBJ_set_ctype,3L + +#define SN_setct_PI "setct-PI" +#define NID_setct_PI 523 +#define OBJ_setct_PI OBJ_set_ctype,4L + +#define SN_setct_PIData "setct-PIData" +#define NID_setct_PIData 524 +#define OBJ_setct_PIData OBJ_set_ctype,5L + +#define SN_setct_PIDataUnsigned "setct-PIDataUnsigned" +#define NID_setct_PIDataUnsigned 525 +#define OBJ_setct_PIDataUnsigned OBJ_set_ctype,6L + +#define SN_setct_HODInput "setct-HODInput" +#define NID_setct_HODInput 526 +#define OBJ_setct_HODInput OBJ_set_ctype,7L + +#define SN_setct_AuthResBaggage "setct-AuthResBaggage" +#define NID_setct_AuthResBaggage 527 +#define OBJ_setct_AuthResBaggage OBJ_set_ctype,8L + +#define SN_setct_AuthRevReqBaggage "setct-AuthRevReqBaggage" +#define NID_setct_AuthRevReqBaggage 528 +#define OBJ_setct_AuthRevReqBaggage OBJ_set_ctype,9L + +#define SN_setct_AuthRevResBaggage "setct-AuthRevResBaggage" +#define NID_setct_AuthRevResBaggage 529 +#define OBJ_setct_AuthRevResBaggage OBJ_set_ctype,10L + +#define SN_setct_CapTokenSeq "setct-CapTokenSeq" +#define NID_setct_CapTokenSeq 530 +#define OBJ_setct_CapTokenSeq OBJ_set_ctype,11L + +#define SN_setct_PInitResData "setct-PInitResData" +#define NID_setct_PInitResData 531 +#define OBJ_setct_PInitResData OBJ_set_ctype,12L + +#define SN_setct_PI_TBS "setct-PI-TBS" +#define NID_setct_PI_TBS 532 +#define OBJ_setct_PI_TBS OBJ_set_ctype,13L + +#define SN_setct_PResData "setct-PResData" +#define NID_setct_PResData 533 +#define OBJ_setct_PResData OBJ_set_ctype,14L + +#define SN_setct_AuthReqTBS "setct-AuthReqTBS" +#define NID_setct_AuthReqTBS 534 +#define OBJ_setct_AuthReqTBS OBJ_set_ctype,16L + +#define SN_setct_AuthResTBS "setct-AuthResTBS" +#define NID_setct_AuthResTBS 535 +#define OBJ_setct_AuthResTBS OBJ_set_ctype,17L + +#define SN_setct_AuthResTBSX "setct-AuthResTBSX" +#define NID_setct_AuthResTBSX 536 +#define OBJ_setct_AuthResTBSX OBJ_set_ctype,18L + +#define SN_setct_AuthTokenTBS "setct-AuthTokenTBS" +#define NID_setct_AuthTokenTBS 537 +#define OBJ_setct_AuthTokenTBS OBJ_set_ctype,19L + +#define SN_setct_CapTokenData "setct-CapTokenData" +#define NID_setct_CapTokenData 538 +#define OBJ_setct_CapTokenData OBJ_set_ctype,20L + +#define SN_setct_CapTokenTBS "setct-CapTokenTBS" +#define NID_setct_CapTokenTBS 539 +#define OBJ_setct_CapTokenTBS OBJ_set_ctype,21L + +#define SN_setct_AcqCardCodeMsg "setct-AcqCardCodeMsg" +#define NID_setct_AcqCardCodeMsg 540 +#define OBJ_setct_AcqCardCodeMsg OBJ_set_ctype,22L + +#define SN_setct_AuthRevReqTBS "setct-AuthRevReqTBS" +#define NID_setct_AuthRevReqTBS 541 +#define OBJ_setct_AuthRevReqTBS OBJ_set_ctype,23L + +#define SN_setct_AuthRevResData "setct-AuthRevResData" +#define NID_setct_AuthRevResData 542 +#define OBJ_setct_AuthRevResData OBJ_set_ctype,24L + +#define SN_setct_AuthRevResTBS "setct-AuthRevResTBS" +#define NID_setct_AuthRevResTBS 543 +#define OBJ_setct_AuthRevResTBS OBJ_set_ctype,25L + +#define SN_setct_CapReqTBS "setct-CapReqTBS" +#define NID_setct_CapReqTBS 544 +#define OBJ_setct_CapReqTBS OBJ_set_ctype,26L + +#define SN_setct_CapReqTBSX "setct-CapReqTBSX" +#define NID_setct_CapReqTBSX 545 +#define OBJ_setct_CapReqTBSX OBJ_set_ctype,27L + +#define SN_setct_CapResData "setct-CapResData" +#define NID_setct_CapResData 546 +#define OBJ_setct_CapResData OBJ_set_ctype,28L + +#define SN_setct_CapRevReqTBS "setct-CapRevReqTBS" +#define NID_setct_CapRevReqTBS 547 +#define OBJ_setct_CapRevReqTBS OBJ_set_ctype,29L + +#define SN_setct_CapRevReqTBSX "setct-CapRevReqTBSX" +#define NID_setct_CapRevReqTBSX 548 +#define OBJ_setct_CapRevReqTBSX OBJ_set_ctype,30L + +#define SN_setct_CapRevResData "setct-CapRevResData" +#define NID_setct_CapRevResData 549 +#define OBJ_setct_CapRevResData OBJ_set_ctype,31L + +#define SN_setct_CredReqTBS "setct-CredReqTBS" +#define NID_setct_CredReqTBS 550 +#define OBJ_setct_CredReqTBS OBJ_set_ctype,32L + +#define SN_setct_CredReqTBSX "setct-CredReqTBSX" +#define NID_setct_CredReqTBSX 551 +#define OBJ_setct_CredReqTBSX OBJ_set_ctype,33L + +#define SN_setct_CredResData "setct-CredResData" +#define NID_setct_CredResData 552 +#define OBJ_setct_CredResData OBJ_set_ctype,34L + +#define SN_setct_CredRevReqTBS "setct-CredRevReqTBS" +#define NID_setct_CredRevReqTBS 553 +#define OBJ_setct_CredRevReqTBS OBJ_set_ctype,35L + +#define SN_setct_CredRevReqTBSX "setct-CredRevReqTBSX" +#define NID_setct_CredRevReqTBSX 554 +#define OBJ_setct_CredRevReqTBSX OBJ_set_ctype,36L + +#define SN_setct_CredRevResData "setct-CredRevResData" +#define NID_setct_CredRevResData 555 +#define OBJ_setct_CredRevResData OBJ_set_ctype,37L + +#define SN_setct_PCertReqData "setct-PCertReqData" +#define NID_setct_PCertReqData 556 +#define OBJ_setct_PCertReqData OBJ_set_ctype,38L + +#define SN_setct_PCertResTBS "setct-PCertResTBS" +#define NID_setct_PCertResTBS 557 +#define OBJ_setct_PCertResTBS OBJ_set_ctype,39L + +#define SN_setct_BatchAdminReqData "setct-BatchAdminReqData" +#define NID_setct_BatchAdminReqData 558 +#define OBJ_setct_BatchAdminReqData OBJ_set_ctype,40L + +#define SN_setct_BatchAdminResData "setct-BatchAdminResData" +#define NID_setct_BatchAdminResData 559 +#define OBJ_setct_BatchAdminResData OBJ_set_ctype,41L + +#define SN_setct_CardCInitResTBS "setct-CardCInitResTBS" +#define NID_setct_CardCInitResTBS 560 +#define OBJ_setct_CardCInitResTBS OBJ_set_ctype,42L + +#define SN_setct_MeAqCInitResTBS "setct-MeAqCInitResTBS" +#define NID_setct_MeAqCInitResTBS 561 +#define OBJ_setct_MeAqCInitResTBS OBJ_set_ctype,43L + +#define SN_setct_RegFormResTBS "setct-RegFormResTBS" +#define NID_setct_RegFormResTBS 562 +#define OBJ_setct_RegFormResTBS OBJ_set_ctype,44L + +#define SN_setct_CertReqData "setct-CertReqData" +#define NID_setct_CertReqData 563 +#define OBJ_setct_CertReqData OBJ_set_ctype,45L + +#define SN_setct_CertReqTBS "setct-CertReqTBS" +#define NID_setct_CertReqTBS 564 +#define OBJ_setct_CertReqTBS OBJ_set_ctype,46L + +#define SN_setct_CertResData "setct-CertResData" +#define NID_setct_CertResData 565 +#define OBJ_setct_CertResData OBJ_set_ctype,47L + +#define SN_setct_CertInqReqTBS "setct-CertInqReqTBS" +#define NID_setct_CertInqReqTBS 566 +#define OBJ_setct_CertInqReqTBS OBJ_set_ctype,48L + +#define SN_setct_ErrorTBS "setct-ErrorTBS" +#define NID_setct_ErrorTBS 567 +#define OBJ_setct_ErrorTBS OBJ_set_ctype,49L + +#define SN_setct_PIDualSignedTBE "setct-PIDualSignedTBE" +#define NID_setct_PIDualSignedTBE 568 +#define OBJ_setct_PIDualSignedTBE OBJ_set_ctype,50L + +#define SN_setct_PIUnsignedTBE "setct-PIUnsignedTBE" +#define NID_setct_PIUnsignedTBE 569 +#define OBJ_setct_PIUnsignedTBE OBJ_set_ctype,51L + +#define SN_setct_AuthReqTBE "setct-AuthReqTBE" +#define NID_setct_AuthReqTBE 570 +#define OBJ_setct_AuthReqTBE OBJ_set_ctype,52L + +#define SN_setct_AuthResTBE "setct-AuthResTBE" +#define NID_setct_AuthResTBE 571 +#define OBJ_setct_AuthResTBE OBJ_set_ctype,53L + +#define SN_setct_AuthResTBEX "setct-AuthResTBEX" +#define NID_setct_AuthResTBEX 572 +#define OBJ_setct_AuthResTBEX OBJ_set_ctype,54L + +#define SN_setct_AuthTokenTBE "setct-AuthTokenTBE" +#define NID_setct_AuthTokenTBE 573 +#define OBJ_setct_AuthTokenTBE OBJ_set_ctype,55L + +#define SN_setct_CapTokenTBE "setct-CapTokenTBE" +#define NID_setct_CapTokenTBE 574 +#define OBJ_setct_CapTokenTBE OBJ_set_ctype,56L + +#define SN_setct_CapTokenTBEX "setct-CapTokenTBEX" +#define NID_setct_CapTokenTBEX 575 +#define OBJ_setct_CapTokenTBEX OBJ_set_ctype,57L + +#define SN_setct_AcqCardCodeMsgTBE "setct-AcqCardCodeMsgTBE" +#define NID_setct_AcqCardCodeMsgTBE 576 +#define OBJ_setct_AcqCardCodeMsgTBE OBJ_set_ctype,58L + +#define SN_setct_AuthRevReqTBE "setct-AuthRevReqTBE" +#define NID_setct_AuthRevReqTBE 577 +#define OBJ_setct_AuthRevReqTBE OBJ_set_ctype,59L + +#define SN_setct_AuthRevResTBE "setct-AuthRevResTBE" +#define NID_setct_AuthRevResTBE 578 +#define OBJ_setct_AuthRevResTBE OBJ_set_ctype,60L + +#define SN_setct_AuthRevResTBEB "setct-AuthRevResTBEB" +#define NID_setct_AuthRevResTBEB 579 +#define OBJ_setct_AuthRevResTBEB OBJ_set_ctype,61L + +#define SN_setct_CapReqTBE "setct-CapReqTBE" +#define NID_setct_CapReqTBE 580 +#define OBJ_setct_CapReqTBE OBJ_set_ctype,62L + +#define SN_setct_CapReqTBEX "setct-CapReqTBEX" +#define NID_setct_CapReqTBEX 581 +#define OBJ_setct_CapReqTBEX OBJ_set_ctype,63L + +#define SN_setct_CapResTBE "setct-CapResTBE" +#define NID_setct_CapResTBE 582 +#define OBJ_setct_CapResTBE OBJ_set_ctype,64L + +#define SN_setct_CapRevReqTBE "setct-CapRevReqTBE" +#define NID_setct_CapRevReqTBE 583 +#define OBJ_setct_CapRevReqTBE OBJ_set_ctype,65L + +#define SN_setct_CapRevReqTBEX "setct-CapRevReqTBEX" +#define NID_setct_CapRevReqTBEX 584 +#define OBJ_setct_CapRevReqTBEX OBJ_set_ctype,66L + +#define SN_setct_CapRevResTBE "setct-CapRevResTBE" +#define NID_setct_CapRevResTBE 585 +#define OBJ_setct_CapRevResTBE OBJ_set_ctype,67L + +#define SN_setct_CredReqTBE "setct-CredReqTBE" +#define NID_setct_CredReqTBE 586 +#define OBJ_setct_CredReqTBE OBJ_set_ctype,68L + +#define SN_setct_CredReqTBEX "setct-CredReqTBEX" +#define NID_setct_CredReqTBEX 587 +#define OBJ_setct_CredReqTBEX OBJ_set_ctype,69L + +#define SN_setct_CredResTBE "setct-CredResTBE" +#define NID_setct_CredResTBE 588 +#define OBJ_setct_CredResTBE OBJ_set_ctype,70L + +#define SN_setct_CredRevReqTBE "setct-CredRevReqTBE" +#define NID_setct_CredRevReqTBE 589 +#define OBJ_setct_CredRevReqTBE OBJ_set_ctype,71L + +#define SN_setct_CredRevReqTBEX "setct-CredRevReqTBEX" +#define NID_setct_CredRevReqTBEX 590 +#define OBJ_setct_CredRevReqTBEX OBJ_set_ctype,72L + +#define SN_setct_CredRevResTBE "setct-CredRevResTBE" +#define NID_setct_CredRevResTBE 591 +#define OBJ_setct_CredRevResTBE OBJ_set_ctype,73L + +#define SN_setct_BatchAdminReqTBE "setct-BatchAdminReqTBE" +#define NID_setct_BatchAdminReqTBE 592 +#define OBJ_setct_BatchAdminReqTBE OBJ_set_ctype,74L + +#define SN_setct_BatchAdminResTBE "setct-BatchAdminResTBE" +#define NID_setct_BatchAdminResTBE 593 +#define OBJ_setct_BatchAdminResTBE OBJ_set_ctype,75L + +#define SN_setct_RegFormReqTBE "setct-RegFormReqTBE" +#define NID_setct_RegFormReqTBE 594 +#define OBJ_setct_RegFormReqTBE OBJ_set_ctype,76L + +#define SN_setct_CertReqTBE "setct-CertReqTBE" +#define NID_setct_CertReqTBE 595 +#define OBJ_setct_CertReqTBE OBJ_set_ctype,77L + +#define SN_setct_CertReqTBEX "setct-CertReqTBEX" +#define NID_setct_CertReqTBEX 596 +#define OBJ_setct_CertReqTBEX OBJ_set_ctype,78L + +#define SN_setct_CertResTBE "setct-CertResTBE" +#define NID_setct_CertResTBE 597 +#define OBJ_setct_CertResTBE OBJ_set_ctype,79L + +#define SN_setct_CRLNotificationTBS "setct-CRLNotificationTBS" +#define NID_setct_CRLNotificationTBS 598 +#define OBJ_setct_CRLNotificationTBS OBJ_set_ctype,80L + +#define SN_setct_CRLNotificationResTBS "setct-CRLNotificationResTBS" +#define NID_setct_CRLNotificationResTBS 599 +#define OBJ_setct_CRLNotificationResTBS OBJ_set_ctype,81L + +#define SN_setct_BCIDistributionTBS "setct-BCIDistributionTBS" +#define NID_setct_BCIDistributionTBS 600 +#define OBJ_setct_BCIDistributionTBS OBJ_set_ctype,82L + +#define SN_setext_genCrypt "setext-genCrypt" +#define LN_setext_genCrypt "generic cryptogram" +#define NID_setext_genCrypt 601 +#define OBJ_setext_genCrypt OBJ_set_msgExt,1L + +#define SN_setext_miAuth "setext-miAuth" +#define LN_setext_miAuth "merchant initiated auth" +#define NID_setext_miAuth 602 +#define OBJ_setext_miAuth OBJ_set_msgExt,3L + +#define SN_setext_pinSecure "setext-pinSecure" +#define NID_setext_pinSecure 603 +#define OBJ_setext_pinSecure OBJ_set_msgExt,4L + +#define SN_setext_pinAny "setext-pinAny" +#define NID_setext_pinAny 604 +#define OBJ_setext_pinAny OBJ_set_msgExt,5L + +#define SN_setext_track2 "setext-track2" +#define NID_setext_track2 605 +#define OBJ_setext_track2 OBJ_set_msgExt,7L + +#define SN_setext_cv "setext-cv" +#define LN_setext_cv "additional verification" +#define NID_setext_cv 606 +#define OBJ_setext_cv OBJ_set_msgExt,8L + +#define SN_set_policy_root "set-policy-root" +#define NID_set_policy_root 607 +#define OBJ_set_policy_root OBJ_set_policy,0L + +#define SN_setCext_hashedRoot "setCext-hashedRoot" +#define NID_setCext_hashedRoot 608 +#define OBJ_setCext_hashedRoot OBJ_set_certExt,0L + +#define SN_setCext_certType "setCext-certType" +#define NID_setCext_certType 609 +#define OBJ_setCext_certType OBJ_set_certExt,1L + +#define SN_setCext_merchData "setCext-merchData" +#define NID_setCext_merchData 610 +#define OBJ_setCext_merchData OBJ_set_certExt,2L + +#define SN_setCext_cCertRequired "setCext-cCertRequired" +#define NID_setCext_cCertRequired 611 +#define OBJ_setCext_cCertRequired OBJ_set_certExt,3L + +#define SN_setCext_tunneling "setCext-tunneling" +#define NID_setCext_tunneling 612 +#define OBJ_setCext_tunneling OBJ_set_certExt,4L + +#define SN_setCext_setExt "setCext-setExt" +#define NID_setCext_setExt 613 +#define OBJ_setCext_setExt OBJ_set_certExt,5L + +#define SN_setCext_setQualf "setCext-setQualf" +#define NID_setCext_setQualf 614 +#define OBJ_setCext_setQualf OBJ_set_certExt,6L + +#define SN_setCext_PGWYcapabilities "setCext-PGWYcapabilities" +#define NID_setCext_PGWYcapabilities 615 +#define OBJ_setCext_PGWYcapabilities OBJ_set_certExt,7L + +#define SN_setCext_TokenIdentifier "setCext-TokenIdentifier" +#define NID_setCext_TokenIdentifier 616 +#define OBJ_setCext_TokenIdentifier OBJ_set_certExt,8L + +#define SN_setCext_Track2Data "setCext-Track2Data" +#define NID_setCext_Track2Data 617 +#define OBJ_setCext_Track2Data OBJ_set_certExt,9L + +#define SN_setCext_TokenType "setCext-TokenType" +#define NID_setCext_TokenType 618 +#define OBJ_setCext_TokenType OBJ_set_certExt,10L + +#define SN_setCext_IssuerCapabilities "setCext-IssuerCapabilities" +#define NID_setCext_IssuerCapabilities 619 +#define OBJ_setCext_IssuerCapabilities OBJ_set_certExt,11L + +#define SN_setAttr_Cert "setAttr-Cert" +#define NID_setAttr_Cert 620 +#define OBJ_setAttr_Cert OBJ_set_attr,0L + +#define SN_setAttr_PGWYcap "setAttr-PGWYcap" +#define LN_setAttr_PGWYcap "payment gateway capabilities" +#define NID_setAttr_PGWYcap 621 +#define OBJ_setAttr_PGWYcap OBJ_set_attr,1L + +#define SN_setAttr_TokenType "setAttr-TokenType" +#define NID_setAttr_TokenType 622 +#define OBJ_setAttr_TokenType OBJ_set_attr,2L + +#define SN_setAttr_IssCap "setAttr-IssCap" +#define LN_setAttr_IssCap "issuer capabilities" +#define NID_setAttr_IssCap 623 +#define OBJ_setAttr_IssCap OBJ_set_attr,3L + +#define SN_set_rootKeyThumb "set-rootKeyThumb" +#define NID_set_rootKeyThumb 624 +#define OBJ_set_rootKeyThumb OBJ_setAttr_Cert,0L + +#define SN_set_addPolicy "set-addPolicy" +#define NID_set_addPolicy 625 +#define OBJ_set_addPolicy OBJ_setAttr_Cert,1L + +#define SN_setAttr_Token_EMV "setAttr-Token-EMV" +#define NID_setAttr_Token_EMV 626 +#define OBJ_setAttr_Token_EMV OBJ_setAttr_TokenType,1L + +#define SN_setAttr_Token_B0Prime "setAttr-Token-B0Prime" +#define NID_setAttr_Token_B0Prime 627 +#define OBJ_setAttr_Token_B0Prime OBJ_setAttr_TokenType,2L + +#define SN_setAttr_IssCap_CVM "setAttr-IssCap-CVM" +#define NID_setAttr_IssCap_CVM 628 +#define OBJ_setAttr_IssCap_CVM OBJ_setAttr_IssCap,3L + +#define SN_setAttr_IssCap_T2 "setAttr-IssCap-T2" +#define NID_setAttr_IssCap_T2 629 +#define OBJ_setAttr_IssCap_T2 OBJ_setAttr_IssCap,4L + +#define SN_setAttr_IssCap_Sig "setAttr-IssCap-Sig" +#define NID_setAttr_IssCap_Sig 630 +#define OBJ_setAttr_IssCap_Sig OBJ_setAttr_IssCap,5L + +#define SN_setAttr_GenCryptgrm "setAttr-GenCryptgrm" +#define LN_setAttr_GenCryptgrm "generate cryptogram" +#define NID_setAttr_GenCryptgrm 631 +#define OBJ_setAttr_GenCryptgrm OBJ_setAttr_IssCap_CVM,1L + +#define SN_setAttr_T2Enc "setAttr-T2Enc" +#define LN_setAttr_T2Enc "encrypted track 2" +#define NID_setAttr_T2Enc 632 +#define OBJ_setAttr_T2Enc OBJ_setAttr_IssCap_T2,1L + +#define SN_setAttr_T2cleartxt "setAttr-T2cleartxt" +#define LN_setAttr_T2cleartxt "cleartext track 2" +#define NID_setAttr_T2cleartxt 633 +#define OBJ_setAttr_T2cleartxt OBJ_setAttr_IssCap_T2,2L + +#define SN_setAttr_TokICCsig "setAttr-TokICCsig" +#define LN_setAttr_TokICCsig "ICC or token signature" +#define NID_setAttr_TokICCsig 634 +#define OBJ_setAttr_TokICCsig OBJ_setAttr_IssCap_Sig,1L + +#define SN_setAttr_SecDevSig "setAttr-SecDevSig" +#define LN_setAttr_SecDevSig "secure device signature" +#define NID_setAttr_SecDevSig 635 +#define OBJ_setAttr_SecDevSig OBJ_setAttr_IssCap_Sig,2L + +#define SN_set_brand_IATA_ATA "set-brand-IATA-ATA" +#define NID_set_brand_IATA_ATA 636 +#define OBJ_set_brand_IATA_ATA OBJ_set_brand,1L + +#define SN_set_brand_Diners "set-brand-Diners" +#define NID_set_brand_Diners 637 +#define OBJ_set_brand_Diners OBJ_set_brand,30L + +#define SN_set_brand_AmericanExpress "set-brand-AmericanExpress" +#define NID_set_brand_AmericanExpress 638 +#define OBJ_set_brand_AmericanExpress OBJ_set_brand,34L + +#define SN_set_brand_JCB "set-brand-JCB" +#define NID_set_brand_JCB 639 +#define OBJ_set_brand_JCB OBJ_set_brand,35L + +#define SN_set_brand_Visa "set-brand-Visa" +#define NID_set_brand_Visa 640 +#define OBJ_set_brand_Visa OBJ_set_brand,4L + +#define SN_set_brand_MasterCard "set-brand-MasterCard" +#define NID_set_brand_MasterCard 641 +#define OBJ_set_brand_MasterCard OBJ_set_brand,5L + +#define SN_set_brand_Novus "set-brand-Novus" +#define NID_set_brand_Novus 642 +#define OBJ_set_brand_Novus OBJ_set_brand,6011L + +#define SN_des_cdmf "DES-CDMF" +#define LN_des_cdmf "des-cdmf" +#define NID_des_cdmf 643 +#define OBJ_des_cdmf OBJ_rsadsi,3L,10L + +#define SN_rsaOAEPEncryptionSET "rsaOAEPEncryptionSET" +#define NID_rsaOAEPEncryptionSET 644 +#define OBJ_rsaOAEPEncryptionSET OBJ_rsadsi,1L,1L,6L + +#define SN_ipsec3 "Oakley-EC2N-3" +#define LN_ipsec3 "ipsec3" +#define NID_ipsec3 749 + +#define SN_ipsec4 "Oakley-EC2N-4" +#define LN_ipsec4 "ipsec4" +#define NID_ipsec4 750 + +#define SN_whirlpool "whirlpool" +#define NID_whirlpool 804 +#define OBJ_whirlpool OBJ_iso,0L,10118L,3L,0L,55L + +#define SN_cryptopro "cryptopro" +#define NID_cryptopro 805 +#define OBJ_cryptopro OBJ_member_body,643L,2L,2L + +#define SN_cryptocom "cryptocom" +#define NID_cryptocom 806 +#define OBJ_cryptocom OBJ_member_body,643L,2L,9L + +#define SN_id_tc26 "id-tc26" +#define NID_id_tc26 974 +#define OBJ_id_tc26 OBJ_member_body,643L,7L,1L + +#define SN_id_GostR3411_94_with_GostR3410_2001 "id-GostR3411-94-with-GostR3410-2001" +#define LN_id_GostR3411_94_with_GostR3410_2001 "GOST R 34.11-94 with GOST R 34.10-2001" +#define NID_id_GostR3411_94_with_GostR3410_2001 807 +#define OBJ_id_GostR3411_94_with_GostR3410_2001 OBJ_cryptopro,3L + +#define SN_id_GostR3411_94_with_GostR3410_94 "id-GostR3411-94-with-GostR3410-94" +#define LN_id_GostR3411_94_with_GostR3410_94 "GOST R 34.11-94 with GOST R 34.10-94" +#define NID_id_GostR3411_94_with_GostR3410_94 808 +#define OBJ_id_GostR3411_94_with_GostR3410_94 OBJ_cryptopro,4L + +#define SN_id_GostR3411_94 "md_gost94" +#define LN_id_GostR3411_94 "GOST R 34.11-94" +#define NID_id_GostR3411_94 809 +#define OBJ_id_GostR3411_94 OBJ_cryptopro,9L + +#define SN_id_HMACGostR3411_94 "id-HMACGostR3411-94" +#define LN_id_HMACGostR3411_94 "HMAC GOST 34.11-94" +#define NID_id_HMACGostR3411_94 810 +#define OBJ_id_HMACGostR3411_94 OBJ_cryptopro,10L + +#define SN_id_GostR3410_2001 "gost2001" +#define LN_id_GostR3410_2001 "GOST R 34.10-2001" +#define NID_id_GostR3410_2001 811 +#define OBJ_id_GostR3410_2001 OBJ_cryptopro,19L + +#define SN_id_GostR3410_94 "gost94" +#define LN_id_GostR3410_94 "GOST R 34.10-94" +#define NID_id_GostR3410_94 812 +#define OBJ_id_GostR3410_94 OBJ_cryptopro,20L + +#define SN_id_Gost28147_89 "gost89" +#define LN_id_Gost28147_89 "GOST 28147-89" +#define NID_id_Gost28147_89 813 +#define OBJ_id_Gost28147_89 OBJ_cryptopro,21L + +#define SN_gost89_cnt "gost89-cnt" +#define NID_gost89_cnt 814 + +#define SN_gost89_cnt_12 "gost89-cnt-12" +#define NID_gost89_cnt_12 975 + +#define SN_gost89_cbc "gost89-cbc" +#define NID_gost89_cbc 1009 + +#define SN_gost89_ecb "gost89-ecb" +#define NID_gost89_ecb 1010 + +#define SN_gost89_ctr "gost89-ctr" +#define NID_gost89_ctr 1011 + +#define SN_id_Gost28147_89_MAC "gost-mac" +#define LN_id_Gost28147_89_MAC "GOST 28147-89 MAC" +#define NID_id_Gost28147_89_MAC 815 +#define OBJ_id_Gost28147_89_MAC OBJ_cryptopro,22L + +#define SN_gost_mac_12 "gost-mac-12" +#define NID_gost_mac_12 976 + +#define SN_id_GostR3411_94_prf "prf-gostr3411-94" +#define LN_id_GostR3411_94_prf "GOST R 34.11-94 PRF" +#define NID_id_GostR3411_94_prf 816 +#define OBJ_id_GostR3411_94_prf OBJ_cryptopro,23L + +#define SN_id_GostR3410_2001DH "id-GostR3410-2001DH" +#define LN_id_GostR3410_2001DH "GOST R 34.10-2001 DH" +#define NID_id_GostR3410_2001DH 817 +#define OBJ_id_GostR3410_2001DH OBJ_cryptopro,98L + +#define SN_id_GostR3410_94DH "id-GostR3410-94DH" +#define LN_id_GostR3410_94DH "GOST R 34.10-94 DH" +#define NID_id_GostR3410_94DH 818 +#define OBJ_id_GostR3410_94DH OBJ_cryptopro,99L + +#define SN_id_Gost28147_89_CryptoPro_KeyMeshing "id-Gost28147-89-CryptoPro-KeyMeshing" +#define NID_id_Gost28147_89_CryptoPro_KeyMeshing 819 +#define OBJ_id_Gost28147_89_CryptoPro_KeyMeshing OBJ_cryptopro,14L,1L + +#define SN_id_Gost28147_89_None_KeyMeshing "id-Gost28147-89-None-KeyMeshing" +#define NID_id_Gost28147_89_None_KeyMeshing 820 +#define OBJ_id_Gost28147_89_None_KeyMeshing OBJ_cryptopro,14L,0L + +#define SN_id_GostR3411_94_TestParamSet "id-GostR3411-94-TestParamSet" +#define NID_id_GostR3411_94_TestParamSet 821 +#define OBJ_id_GostR3411_94_TestParamSet OBJ_cryptopro,30L,0L + +#define SN_id_GostR3411_94_CryptoProParamSet "id-GostR3411-94-CryptoProParamSet" +#define NID_id_GostR3411_94_CryptoProParamSet 822 +#define OBJ_id_GostR3411_94_CryptoProParamSet OBJ_cryptopro,30L,1L + +#define SN_id_Gost28147_89_TestParamSet "id-Gost28147-89-TestParamSet" +#define NID_id_Gost28147_89_TestParamSet 823 +#define OBJ_id_Gost28147_89_TestParamSet OBJ_cryptopro,31L,0L + +#define SN_id_Gost28147_89_CryptoPro_A_ParamSet "id-Gost28147-89-CryptoPro-A-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_A_ParamSet 824 +#define OBJ_id_Gost28147_89_CryptoPro_A_ParamSet OBJ_cryptopro,31L,1L + +#define SN_id_Gost28147_89_CryptoPro_B_ParamSet "id-Gost28147-89-CryptoPro-B-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_B_ParamSet 825 +#define OBJ_id_Gost28147_89_CryptoPro_B_ParamSet OBJ_cryptopro,31L,2L + +#define SN_id_Gost28147_89_CryptoPro_C_ParamSet "id-Gost28147-89-CryptoPro-C-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_C_ParamSet 826 +#define OBJ_id_Gost28147_89_CryptoPro_C_ParamSet OBJ_cryptopro,31L,3L + +#define SN_id_Gost28147_89_CryptoPro_D_ParamSet "id-Gost28147-89-CryptoPro-D-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_D_ParamSet 827 +#define OBJ_id_Gost28147_89_CryptoPro_D_ParamSet OBJ_cryptopro,31L,4L + +#define SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet 828 +#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet OBJ_cryptopro,31L,5L + +#define SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet 829 +#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet OBJ_cryptopro,31L,6L + +#define SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet "id-Gost28147-89-CryptoPro-RIC-1-ParamSet" +#define NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet 830 +#define OBJ_id_Gost28147_89_CryptoPro_RIC_1_ParamSet OBJ_cryptopro,31L,7L + +#define SN_id_GostR3410_94_TestParamSet "id-GostR3410-94-TestParamSet" +#define NID_id_GostR3410_94_TestParamSet 831 +#define OBJ_id_GostR3410_94_TestParamSet OBJ_cryptopro,32L,0L + +#define SN_id_GostR3410_94_CryptoPro_A_ParamSet "id-GostR3410-94-CryptoPro-A-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_A_ParamSet 832 +#define OBJ_id_GostR3410_94_CryptoPro_A_ParamSet OBJ_cryptopro,32L,2L + +#define SN_id_GostR3410_94_CryptoPro_B_ParamSet "id-GostR3410-94-CryptoPro-B-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_B_ParamSet 833 +#define OBJ_id_GostR3410_94_CryptoPro_B_ParamSet OBJ_cryptopro,32L,3L + +#define SN_id_GostR3410_94_CryptoPro_C_ParamSet "id-GostR3410-94-CryptoPro-C-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_C_ParamSet 834 +#define OBJ_id_GostR3410_94_CryptoPro_C_ParamSet OBJ_cryptopro,32L,4L + +#define SN_id_GostR3410_94_CryptoPro_D_ParamSet "id-GostR3410-94-CryptoPro-D-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_D_ParamSet 835 +#define OBJ_id_GostR3410_94_CryptoPro_D_ParamSet OBJ_cryptopro,32L,5L + +#define SN_id_GostR3410_94_CryptoPro_XchA_ParamSet "id-GostR3410-94-CryptoPro-XchA-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_XchA_ParamSet 836 +#define OBJ_id_GostR3410_94_CryptoPro_XchA_ParamSet OBJ_cryptopro,33L,1L + +#define SN_id_GostR3410_94_CryptoPro_XchB_ParamSet "id-GostR3410-94-CryptoPro-XchB-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_XchB_ParamSet 837 +#define OBJ_id_GostR3410_94_CryptoPro_XchB_ParamSet OBJ_cryptopro,33L,2L + +#define SN_id_GostR3410_94_CryptoPro_XchC_ParamSet "id-GostR3410-94-CryptoPro-XchC-ParamSet" +#define NID_id_GostR3410_94_CryptoPro_XchC_ParamSet 838 +#define OBJ_id_GostR3410_94_CryptoPro_XchC_ParamSet OBJ_cryptopro,33L,3L + +#define SN_id_GostR3410_2001_TestParamSet "id-GostR3410-2001-TestParamSet" +#define NID_id_GostR3410_2001_TestParamSet 839 +#define OBJ_id_GostR3410_2001_TestParamSet OBJ_cryptopro,35L,0L + +#define SN_id_GostR3410_2001_CryptoPro_A_ParamSet "id-GostR3410-2001-CryptoPro-A-ParamSet" +#define NID_id_GostR3410_2001_CryptoPro_A_ParamSet 840 +#define OBJ_id_GostR3410_2001_CryptoPro_A_ParamSet OBJ_cryptopro,35L,1L + +#define SN_id_GostR3410_2001_CryptoPro_B_ParamSet "id-GostR3410-2001-CryptoPro-B-ParamSet" +#define NID_id_GostR3410_2001_CryptoPro_B_ParamSet 841 +#define OBJ_id_GostR3410_2001_CryptoPro_B_ParamSet OBJ_cryptopro,35L,2L + +#define SN_id_GostR3410_2001_CryptoPro_C_ParamSet "id-GostR3410-2001-CryptoPro-C-ParamSet" +#define NID_id_GostR3410_2001_CryptoPro_C_ParamSet 842 +#define OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet OBJ_cryptopro,35L,3L + +#define SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet "id-GostR3410-2001-CryptoPro-XchA-ParamSet" +#define NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet 843 +#define OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet OBJ_cryptopro,36L,0L + +#define SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet "id-GostR3410-2001-CryptoPro-XchB-ParamSet" +#define NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet 844 +#define OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet OBJ_cryptopro,36L,1L + +#define SN_id_GostR3410_94_a "id-GostR3410-94-a" +#define NID_id_GostR3410_94_a 845 +#define OBJ_id_GostR3410_94_a OBJ_id_GostR3410_94,1L + +#define SN_id_GostR3410_94_aBis "id-GostR3410-94-aBis" +#define NID_id_GostR3410_94_aBis 846 +#define OBJ_id_GostR3410_94_aBis OBJ_id_GostR3410_94,2L + +#define SN_id_GostR3410_94_b "id-GostR3410-94-b" +#define NID_id_GostR3410_94_b 847 +#define OBJ_id_GostR3410_94_b OBJ_id_GostR3410_94,3L + +#define SN_id_GostR3410_94_bBis "id-GostR3410-94-bBis" +#define NID_id_GostR3410_94_bBis 848 +#define OBJ_id_GostR3410_94_bBis OBJ_id_GostR3410_94,4L + +#define SN_id_Gost28147_89_cc "id-Gost28147-89-cc" +#define LN_id_Gost28147_89_cc "GOST 28147-89 Cryptocom ParamSet" +#define NID_id_Gost28147_89_cc 849 +#define OBJ_id_Gost28147_89_cc OBJ_cryptocom,1L,6L,1L + +#define SN_id_GostR3410_94_cc "gost94cc" +#define LN_id_GostR3410_94_cc "GOST 34.10-94 Cryptocom" +#define NID_id_GostR3410_94_cc 850 +#define OBJ_id_GostR3410_94_cc OBJ_cryptocom,1L,5L,3L + +#define SN_id_GostR3410_2001_cc "gost2001cc" +#define LN_id_GostR3410_2001_cc "GOST 34.10-2001 Cryptocom" +#define NID_id_GostR3410_2001_cc 851 +#define OBJ_id_GostR3410_2001_cc OBJ_cryptocom,1L,5L,4L + +#define SN_id_GostR3411_94_with_GostR3410_94_cc "id-GostR3411-94-with-GostR3410-94-cc" +#define LN_id_GostR3411_94_with_GostR3410_94_cc "GOST R 34.11-94 with GOST R 34.10-94 Cryptocom" +#define NID_id_GostR3411_94_with_GostR3410_94_cc 852 +#define OBJ_id_GostR3411_94_with_GostR3410_94_cc OBJ_cryptocom,1L,3L,3L + +#define SN_id_GostR3411_94_with_GostR3410_2001_cc "id-GostR3411-94-with-GostR3410-2001-cc" +#define LN_id_GostR3411_94_with_GostR3410_2001_cc "GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom" +#define NID_id_GostR3411_94_with_GostR3410_2001_cc 853 +#define OBJ_id_GostR3411_94_with_GostR3410_2001_cc OBJ_cryptocom,1L,3L,4L + +#define SN_id_GostR3410_2001_ParamSet_cc "id-GostR3410-2001-ParamSet-cc" +#define LN_id_GostR3410_2001_ParamSet_cc "GOST R 3410-2001 Parameter Set Cryptocom" +#define NID_id_GostR3410_2001_ParamSet_cc 854 +#define OBJ_id_GostR3410_2001_ParamSet_cc OBJ_cryptocom,1L,8L,1L + +#define SN_id_tc26_algorithms "id-tc26-algorithms" +#define NID_id_tc26_algorithms 977 +#define OBJ_id_tc26_algorithms OBJ_id_tc26,1L + +#define SN_id_tc26_sign "id-tc26-sign" +#define NID_id_tc26_sign 978 +#define OBJ_id_tc26_sign OBJ_id_tc26_algorithms,1L + +#define SN_id_GostR3410_2012_256 "gost2012_256" +#define LN_id_GostR3410_2012_256 "GOST R 34.10-2012 with 256 bit modulus" +#define NID_id_GostR3410_2012_256 979 +#define OBJ_id_GostR3410_2012_256 OBJ_id_tc26_sign,1L + +#define SN_id_GostR3410_2012_512 "gost2012_512" +#define LN_id_GostR3410_2012_512 "GOST R 34.10-2012 with 512 bit modulus" +#define NID_id_GostR3410_2012_512 980 +#define OBJ_id_GostR3410_2012_512 OBJ_id_tc26_sign,2L + +#define SN_id_tc26_digest "id-tc26-digest" +#define NID_id_tc26_digest 981 +#define OBJ_id_tc26_digest OBJ_id_tc26_algorithms,2L + +#define SN_id_GostR3411_2012_256 "md_gost12_256" +#define LN_id_GostR3411_2012_256 "GOST R 34.11-2012 with 256 bit hash" +#define NID_id_GostR3411_2012_256 982 +#define OBJ_id_GostR3411_2012_256 OBJ_id_tc26_digest,2L + +#define SN_id_GostR3411_2012_512 "md_gost12_512" +#define LN_id_GostR3411_2012_512 "GOST R 34.11-2012 with 512 bit hash" +#define NID_id_GostR3411_2012_512 983 +#define OBJ_id_GostR3411_2012_512 OBJ_id_tc26_digest,3L + +#define SN_id_tc26_signwithdigest "id-tc26-signwithdigest" +#define NID_id_tc26_signwithdigest 984 +#define OBJ_id_tc26_signwithdigest OBJ_id_tc26_algorithms,3L + +#define SN_id_tc26_signwithdigest_gost3410_2012_256 "id-tc26-signwithdigest-gost3410-2012-256" +#define LN_id_tc26_signwithdigest_gost3410_2012_256 "GOST R 34.10-2012 with GOST R 34.11-2012 (256 bit)" +#define NID_id_tc26_signwithdigest_gost3410_2012_256 985 +#define OBJ_id_tc26_signwithdigest_gost3410_2012_256 OBJ_id_tc26_signwithdigest,2L + +#define SN_id_tc26_signwithdigest_gost3410_2012_512 "id-tc26-signwithdigest-gost3410-2012-512" +#define LN_id_tc26_signwithdigest_gost3410_2012_512 "GOST R 34.10-2012 with GOST R 34.11-2012 (512 bit)" +#define NID_id_tc26_signwithdigest_gost3410_2012_512 986 +#define OBJ_id_tc26_signwithdigest_gost3410_2012_512 OBJ_id_tc26_signwithdigest,3L + +#define SN_id_tc26_mac "id-tc26-mac" +#define NID_id_tc26_mac 987 +#define OBJ_id_tc26_mac OBJ_id_tc26_algorithms,4L + +#define SN_id_tc26_hmac_gost_3411_2012_256 "id-tc26-hmac-gost-3411-2012-256" +#define LN_id_tc26_hmac_gost_3411_2012_256 "HMAC GOST 34.11-2012 256 bit" +#define NID_id_tc26_hmac_gost_3411_2012_256 988 +#define OBJ_id_tc26_hmac_gost_3411_2012_256 OBJ_id_tc26_mac,1L + +#define SN_id_tc26_hmac_gost_3411_2012_512 "id-tc26-hmac-gost-3411-2012-512" +#define LN_id_tc26_hmac_gost_3411_2012_512 "HMAC GOST 34.11-2012 512 bit" +#define NID_id_tc26_hmac_gost_3411_2012_512 989 +#define OBJ_id_tc26_hmac_gost_3411_2012_512 OBJ_id_tc26_mac,2L + +#define SN_id_tc26_cipher "id-tc26-cipher" +#define NID_id_tc26_cipher 990 +#define OBJ_id_tc26_cipher OBJ_id_tc26_algorithms,5L + +#define SN_id_tc26_cipher_gostr3412_2015_magma "id-tc26-cipher-gostr3412-2015-magma" +#define NID_id_tc26_cipher_gostr3412_2015_magma 1173 +#define OBJ_id_tc26_cipher_gostr3412_2015_magma OBJ_id_tc26_cipher,1L + +#define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm "id-tc26-cipher-gostr3412-2015-magma-ctracpkm" +#define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm 1174 +#define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm OBJ_id_tc26_cipher_gostr3412_2015_magma,1L + +#define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac" +#define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac 1175 +#define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_magma,2L + +#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik "id-tc26-cipher-gostr3412-2015-kuznyechik" +#define NID_id_tc26_cipher_gostr3412_2015_kuznyechik 1176 +#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik OBJ_id_tc26_cipher,2L + +#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm" +#define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm 1177 +#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,1L + +#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac" +#define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac 1178 +#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,2L + +#define SN_id_tc26_agreement "id-tc26-agreement" +#define NID_id_tc26_agreement 991 +#define OBJ_id_tc26_agreement OBJ_id_tc26_algorithms,6L + +#define SN_id_tc26_agreement_gost_3410_2012_256 "id-tc26-agreement-gost-3410-2012-256" +#define NID_id_tc26_agreement_gost_3410_2012_256 992 +#define OBJ_id_tc26_agreement_gost_3410_2012_256 OBJ_id_tc26_agreement,1L + +#define SN_id_tc26_agreement_gost_3410_2012_512 "id-tc26-agreement-gost-3410-2012-512" +#define NID_id_tc26_agreement_gost_3410_2012_512 993 +#define OBJ_id_tc26_agreement_gost_3410_2012_512 OBJ_id_tc26_agreement,2L + +#define SN_id_tc26_wrap "id-tc26-wrap" +#define NID_id_tc26_wrap 1179 +#define OBJ_id_tc26_wrap OBJ_id_tc26_algorithms,7L + +#define SN_id_tc26_wrap_gostr3412_2015_magma "id-tc26-wrap-gostr3412-2015-magma" +#define NID_id_tc26_wrap_gostr3412_2015_magma 1180 +#define OBJ_id_tc26_wrap_gostr3412_2015_magma OBJ_id_tc26_wrap,1L + +#define SN_id_tc26_wrap_gostr3412_2015_magma_kexp15 "id-tc26-wrap-gostr3412-2015-magma-kexp15" +#define NID_id_tc26_wrap_gostr3412_2015_magma_kexp15 1181 +#define OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_magma,1L + +#define SN_id_tc26_wrap_gostr3412_2015_kuznyechik "id-tc26-wrap-gostr3412-2015-kuznyechik" +#define NID_id_tc26_wrap_gostr3412_2015_kuznyechik 1182 +#define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik OBJ_id_tc26_wrap,2L + +#define SN_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15" +#define NID_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 1183 +#define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik,1L + +#define SN_id_tc26_constants "id-tc26-constants" +#define NID_id_tc26_constants 994 +#define OBJ_id_tc26_constants OBJ_id_tc26,2L + +#define SN_id_tc26_sign_constants "id-tc26-sign-constants" +#define NID_id_tc26_sign_constants 995 +#define OBJ_id_tc26_sign_constants OBJ_id_tc26_constants,1L + +#define SN_id_tc26_gost_3410_2012_256_constants "id-tc26-gost-3410-2012-256-constants" +#define NID_id_tc26_gost_3410_2012_256_constants 1147 +#define OBJ_id_tc26_gost_3410_2012_256_constants OBJ_id_tc26_sign_constants,1L + +#define SN_id_tc26_gost_3410_2012_256_paramSetA "id-tc26-gost-3410-2012-256-paramSetA" +#define LN_id_tc26_gost_3410_2012_256_paramSetA "GOST R 34.10-2012 (256 bit) ParamSet A" +#define NID_id_tc26_gost_3410_2012_256_paramSetA 1148 +#define OBJ_id_tc26_gost_3410_2012_256_paramSetA OBJ_id_tc26_gost_3410_2012_256_constants,1L + +#define SN_id_tc26_gost_3410_2012_256_paramSetB "id-tc26-gost-3410-2012-256-paramSetB" +#define LN_id_tc26_gost_3410_2012_256_paramSetB "GOST R 34.10-2012 (256 bit) ParamSet B" +#define NID_id_tc26_gost_3410_2012_256_paramSetB 1184 +#define OBJ_id_tc26_gost_3410_2012_256_paramSetB OBJ_id_tc26_gost_3410_2012_256_constants,2L + +#define SN_id_tc26_gost_3410_2012_256_paramSetC "id-tc26-gost-3410-2012-256-paramSetC" +#define LN_id_tc26_gost_3410_2012_256_paramSetC "GOST R 34.10-2012 (256 bit) ParamSet C" +#define NID_id_tc26_gost_3410_2012_256_paramSetC 1185 +#define OBJ_id_tc26_gost_3410_2012_256_paramSetC OBJ_id_tc26_gost_3410_2012_256_constants,3L + +#define SN_id_tc26_gost_3410_2012_256_paramSetD "id-tc26-gost-3410-2012-256-paramSetD" +#define LN_id_tc26_gost_3410_2012_256_paramSetD "GOST R 34.10-2012 (256 bit) ParamSet D" +#define NID_id_tc26_gost_3410_2012_256_paramSetD 1186 +#define OBJ_id_tc26_gost_3410_2012_256_paramSetD OBJ_id_tc26_gost_3410_2012_256_constants,4L + +#define SN_id_tc26_gost_3410_2012_512_constants "id-tc26-gost-3410-2012-512-constants" +#define NID_id_tc26_gost_3410_2012_512_constants 996 +#define OBJ_id_tc26_gost_3410_2012_512_constants OBJ_id_tc26_sign_constants,2L + +#define SN_id_tc26_gost_3410_2012_512_paramSetTest "id-tc26-gost-3410-2012-512-paramSetTest" +#define LN_id_tc26_gost_3410_2012_512_paramSetTest "GOST R 34.10-2012 (512 bit) testing parameter set" +#define NID_id_tc26_gost_3410_2012_512_paramSetTest 997 +#define OBJ_id_tc26_gost_3410_2012_512_paramSetTest OBJ_id_tc26_gost_3410_2012_512_constants,0L + +#define SN_id_tc26_gost_3410_2012_512_paramSetA "id-tc26-gost-3410-2012-512-paramSetA" +#define LN_id_tc26_gost_3410_2012_512_paramSetA "GOST R 34.10-2012 (512 bit) ParamSet A" +#define NID_id_tc26_gost_3410_2012_512_paramSetA 998 +#define OBJ_id_tc26_gost_3410_2012_512_paramSetA OBJ_id_tc26_gost_3410_2012_512_constants,1L + +#define SN_id_tc26_gost_3410_2012_512_paramSetB "id-tc26-gost-3410-2012-512-paramSetB" +#define LN_id_tc26_gost_3410_2012_512_paramSetB "GOST R 34.10-2012 (512 bit) ParamSet B" +#define NID_id_tc26_gost_3410_2012_512_paramSetB 999 +#define OBJ_id_tc26_gost_3410_2012_512_paramSetB OBJ_id_tc26_gost_3410_2012_512_constants,2L + +#define SN_id_tc26_gost_3410_2012_512_paramSetC "id-tc26-gost-3410-2012-512-paramSetC" +#define LN_id_tc26_gost_3410_2012_512_paramSetC "GOST R 34.10-2012 (512 bit) ParamSet C" +#define NID_id_tc26_gost_3410_2012_512_paramSetC 1149 +#define OBJ_id_tc26_gost_3410_2012_512_paramSetC OBJ_id_tc26_gost_3410_2012_512_constants,3L + +#define SN_id_tc26_digest_constants "id-tc26-digest-constants" +#define NID_id_tc26_digest_constants 1000 +#define OBJ_id_tc26_digest_constants OBJ_id_tc26_constants,2L + +#define SN_id_tc26_cipher_constants "id-tc26-cipher-constants" +#define NID_id_tc26_cipher_constants 1001 +#define OBJ_id_tc26_cipher_constants OBJ_id_tc26_constants,5L + +#define SN_id_tc26_gost_28147_constants "id-tc26-gost-28147-constants" +#define NID_id_tc26_gost_28147_constants 1002 +#define OBJ_id_tc26_gost_28147_constants OBJ_id_tc26_cipher_constants,1L + +#define SN_id_tc26_gost_28147_param_Z "id-tc26-gost-28147-param-Z" +#define LN_id_tc26_gost_28147_param_Z "GOST 28147-89 TC26 parameter set" +#define NID_id_tc26_gost_28147_param_Z 1003 +#define OBJ_id_tc26_gost_28147_param_Z OBJ_id_tc26_gost_28147_constants,1L + +#define SN_INN "INN" +#define LN_INN "INN" +#define NID_INN 1004 +#define OBJ_INN OBJ_member_body,643L,3L,131L,1L,1L + +#define SN_OGRN "OGRN" +#define LN_OGRN "OGRN" +#define NID_OGRN 1005 +#define OBJ_OGRN OBJ_member_body,643L,100L,1L + +#define SN_SNILS "SNILS" +#define LN_SNILS "SNILS" +#define NID_SNILS 1006 +#define OBJ_SNILS OBJ_member_body,643L,100L,3L + +#define SN_subjectSignTool "subjectSignTool" +#define LN_subjectSignTool "Signing Tool of Subject" +#define NID_subjectSignTool 1007 +#define OBJ_subjectSignTool OBJ_member_body,643L,100L,111L + +#define SN_issuerSignTool "issuerSignTool" +#define LN_issuerSignTool "Signing Tool of Issuer" +#define NID_issuerSignTool 1008 +#define OBJ_issuerSignTool OBJ_member_body,643L,100L,112L + +#define SN_grasshopper_ecb "grasshopper-ecb" +#define NID_grasshopper_ecb 1012 + +#define SN_grasshopper_ctr "grasshopper-ctr" +#define NID_grasshopper_ctr 1013 + +#define SN_grasshopper_ofb "grasshopper-ofb" +#define NID_grasshopper_ofb 1014 + +#define SN_grasshopper_cbc "grasshopper-cbc" +#define NID_grasshopper_cbc 1015 + +#define SN_grasshopper_cfb "grasshopper-cfb" +#define NID_grasshopper_cfb 1016 + +#define SN_grasshopper_mac "grasshopper-mac" +#define NID_grasshopper_mac 1017 + +#define SN_magma_ecb "magma-ecb" +#define NID_magma_ecb 1187 + +#define SN_magma_ctr "magma-ctr" +#define NID_magma_ctr 1188 + +#define SN_magma_ofb "magma-ofb" +#define NID_magma_ofb 1189 + +#define SN_magma_cbc "magma-cbc" +#define NID_magma_cbc 1190 + +#define SN_magma_cfb "magma-cfb" +#define NID_magma_cfb 1191 + +#define SN_magma_mac "magma-mac" +#define NID_magma_mac 1192 + +#define SN_camellia_128_cbc "CAMELLIA-128-CBC" +#define LN_camellia_128_cbc "camellia-128-cbc" +#define NID_camellia_128_cbc 751 +#define OBJ_camellia_128_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,2L + +#define SN_camellia_192_cbc "CAMELLIA-192-CBC" +#define LN_camellia_192_cbc "camellia-192-cbc" +#define NID_camellia_192_cbc 752 +#define OBJ_camellia_192_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,3L + +#define SN_camellia_256_cbc "CAMELLIA-256-CBC" +#define LN_camellia_256_cbc "camellia-256-cbc" +#define NID_camellia_256_cbc 753 +#define OBJ_camellia_256_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,4L + +#define SN_id_camellia128_wrap "id-camellia128-wrap" +#define NID_id_camellia128_wrap 907 +#define OBJ_id_camellia128_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,2L + +#define SN_id_camellia192_wrap "id-camellia192-wrap" +#define NID_id_camellia192_wrap 908 +#define OBJ_id_camellia192_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,3L + +#define SN_id_camellia256_wrap "id-camellia256-wrap" +#define NID_id_camellia256_wrap 909 +#define OBJ_id_camellia256_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,4L + +#define OBJ_ntt_ds 0L,3L,4401L,5L + +#define OBJ_camellia OBJ_ntt_ds,3L,1L,9L + +#define SN_camellia_128_ecb "CAMELLIA-128-ECB" +#define LN_camellia_128_ecb "camellia-128-ecb" +#define NID_camellia_128_ecb 754 +#define OBJ_camellia_128_ecb OBJ_camellia,1L + +#define SN_camellia_128_ofb128 "CAMELLIA-128-OFB" +#define LN_camellia_128_ofb128 "camellia-128-ofb" +#define NID_camellia_128_ofb128 766 +#define OBJ_camellia_128_ofb128 OBJ_camellia,3L + +#define SN_camellia_128_cfb128 "CAMELLIA-128-CFB" +#define LN_camellia_128_cfb128 "camellia-128-cfb" +#define NID_camellia_128_cfb128 757 +#define OBJ_camellia_128_cfb128 OBJ_camellia,4L + +#define SN_camellia_128_gcm "CAMELLIA-128-GCM" +#define LN_camellia_128_gcm "camellia-128-gcm" +#define NID_camellia_128_gcm 961 +#define OBJ_camellia_128_gcm OBJ_camellia,6L + +#define SN_camellia_128_ccm "CAMELLIA-128-CCM" +#define LN_camellia_128_ccm "camellia-128-ccm" +#define NID_camellia_128_ccm 962 +#define OBJ_camellia_128_ccm OBJ_camellia,7L + +#define SN_camellia_128_ctr "CAMELLIA-128-CTR" +#define LN_camellia_128_ctr "camellia-128-ctr" +#define NID_camellia_128_ctr 963 +#define OBJ_camellia_128_ctr OBJ_camellia,9L + +#define SN_camellia_128_cmac "CAMELLIA-128-CMAC" +#define LN_camellia_128_cmac "camellia-128-cmac" +#define NID_camellia_128_cmac 964 +#define OBJ_camellia_128_cmac OBJ_camellia,10L + +#define SN_camellia_192_ecb "CAMELLIA-192-ECB" +#define LN_camellia_192_ecb "camellia-192-ecb" +#define NID_camellia_192_ecb 755 +#define OBJ_camellia_192_ecb OBJ_camellia,21L + +#define SN_camellia_192_ofb128 "CAMELLIA-192-OFB" +#define LN_camellia_192_ofb128 "camellia-192-ofb" +#define NID_camellia_192_ofb128 767 +#define OBJ_camellia_192_ofb128 OBJ_camellia,23L + +#define SN_camellia_192_cfb128 "CAMELLIA-192-CFB" +#define LN_camellia_192_cfb128 "camellia-192-cfb" +#define NID_camellia_192_cfb128 758 +#define OBJ_camellia_192_cfb128 OBJ_camellia,24L + +#define SN_camellia_192_gcm "CAMELLIA-192-GCM" +#define LN_camellia_192_gcm "camellia-192-gcm" +#define NID_camellia_192_gcm 965 +#define OBJ_camellia_192_gcm OBJ_camellia,26L + +#define SN_camellia_192_ccm "CAMELLIA-192-CCM" +#define LN_camellia_192_ccm "camellia-192-ccm" +#define NID_camellia_192_ccm 966 +#define OBJ_camellia_192_ccm OBJ_camellia,27L + +#define SN_camellia_192_ctr "CAMELLIA-192-CTR" +#define LN_camellia_192_ctr "camellia-192-ctr" +#define NID_camellia_192_ctr 967 +#define OBJ_camellia_192_ctr OBJ_camellia,29L + +#define SN_camellia_192_cmac "CAMELLIA-192-CMAC" +#define LN_camellia_192_cmac "camellia-192-cmac" +#define NID_camellia_192_cmac 968 +#define OBJ_camellia_192_cmac OBJ_camellia,30L + +#define SN_camellia_256_ecb "CAMELLIA-256-ECB" +#define LN_camellia_256_ecb "camellia-256-ecb" +#define NID_camellia_256_ecb 756 +#define OBJ_camellia_256_ecb OBJ_camellia,41L + +#define SN_camellia_256_ofb128 "CAMELLIA-256-OFB" +#define LN_camellia_256_ofb128 "camellia-256-ofb" +#define NID_camellia_256_ofb128 768 +#define OBJ_camellia_256_ofb128 OBJ_camellia,43L + +#define SN_camellia_256_cfb128 "CAMELLIA-256-CFB" +#define LN_camellia_256_cfb128 "camellia-256-cfb" +#define NID_camellia_256_cfb128 759 +#define OBJ_camellia_256_cfb128 OBJ_camellia,44L + +#define SN_camellia_256_gcm "CAMELLIA-256-GCM" +#define LN_camellia_256_gcm "camellia-256-gcm" +#define NID_camellia_256_gcm 969 +#define OBJ_camellia_256_gcm OBJ_camellia,46L + +#define SN_camellia_256_ccm "CAMELLIA-256-CCM" +#define LN_camellia_256_ccm "camellia-256-ccm" +#define NID_camellia_256_ccm 970 +#define OBJ_camellia_256_ccm OBJ_camellia,47L + +#define SN_camellia_256_ctr "CAMELLIA-256-CTR" +#define LN_camellia_256_ctr "camellia-256-ctr" +#define NID_camellia_256_ctr 971 +#define OBJ_camellia_256_ctr OBJ_camellia,49L + +#define SN_camellia_256_cmac "CAMELLIA-256-CMAC" +#define LN_camellia_256_cmac "camellia-256-cmac" +#define NID_camellia_256_cmac 972 +#define OBJ_camellia_256_cmac OBJ_camellia,50L + +#define SN_camellia_128_cfb1 "CAMELLIA-128-CFB1" +#define LN_camellia_128_cfb1 "camellia-128-cfb1" +#define NID_camellia_128_cfb1 760 + +#define SN_camellia_192_cfb1 "CAMELLIA-192-CFB1" +#define LN_camellia_192_cfb1 "camellia-192-cfb1" +#define NID_camellia_192_cfb1 761 + +#define SN_camellia_256_cfb1 "CAMELLIA-256-CFB1" +#define LN_camellia_256_cfb1 "camellia-256-cfb1" +#define NID_camellia_256_cfb1 762 + +#define SN_camellia_128_cfb8 "CAMELLIA-128-CFB8" +#define LN_camellia_128_cfb8 "camellia-128-cfb8" +#define NID_camellia_128_cfb8 763 + +#define SN_camellia_192_cfb8 "CAMELLIA-192-CFB8" +#define LN_camellia_192_cfb8 "camellia-192-cfb8" +#define NID_camellia_192_cfb8 764 + +#define SN_camellia_256_cfb8 "CAMELLIA-256-CFB8" +#define LN_camellia_256_cfb8 "camellia-256-cfb8" +#define NID_camellia_256_cfb8 765 + +#define OBJ_aria 1L,2L,410L,200046L,1L,1L + +#define SN_aria_128_ecb "ARIA-128-ECB" +#define LN_aria_128_ecb "aria-128-ecb" +#define NID_aria_128_ecb 1065 +#define OBJ_aria_128_ecb OBJ_aria,1L + +#define SN_aria_128_cbc "ARIA-128-CBC" +#define LN_aria_128_cbc "aria-128-cbc" +#define NID_aria_128_cbc 1066 +#define OBJ_aria_128_cbc OBJ_aria,2L + +#define SN_aria_128_cfb128 "ARIA-128-CFB" +#define LN_aria_128_cfb128 "aria-128-cfb" +#define NID_aria_128_cfb128 1067 +#define OBJ_aria_128_cfb128 OBJ_aria,3L + +#define SN_aria_128_ofb128 "ARIA-128-OFB" +#define LN_aria_128_ofb128 "aria-128-ofb" +#define NID_aria_128_ofb128 1068 +#define OBJ_aria_128_ofb128 OBJ_aria,4L + +#define SN_aria_128_ctr "ARIA-128-CTR" +#define LN_aria_128_ctr "aria-128-ctr" +#define NID_aria_128_ctr 1069 +#define OBJ_aria_128_ctr OBJ_aria,5L + +#define SN_aria_192_ecb "ARIA-192-ECB" +#define LN_aria_192_ecb "aria-192-ecb" +#define NID_aria_192_ecb 1070 +#define OBJ_aria_192_ecb OBJ_aria,6L + +#define SN_aria_192_cbc "ARIA-192-CBC" +#define LN_aria_192_cbc "aria-192-cbc" +#define NID_aria_192_cbc 1071 +#define OBJ_aria_192_cbc OBJ_aria,7L + +#define SN_aria_192_cfb128 "ARIA-192-CFB" +#define LN_aria_192_cfb128 "aria-192-cfb" +#define NID_aria_192_cfb128 1072 +#define OBJ_aria_192_cfb128 OBJ_aria,8L + +#define SN_aria_192_ofb128 "ARIA-192-OFB" +#define LN_aria_192_ofb128 "aria-192-ofb" +#define NID_aria_192_ofb128 1073 +#define OBJ_aria_192_ofb128 OBJ_aria,9L + +#define SN_aria_192_ctr "ARIA-192-CTR" +#define LN_aria_192_ctr "aria-192-ctr" +#define NID_aria_192_ctr 1074 +#define OBJ_aria_192_ctr OBJ_aria,10L + +#define SN_aria_256_ecb "ARIA-256-ECB" +#define LN_aria_256_ecb "aria-256-ecb" +#define NID_aria_256_ecb 1075 +#define OBJ_aria_256_ecb OBJ_aria,11L + +#define SN_aria_256_cbc "ARIA-256-CBC" +#define LN_aria_256_cbc "aria-256-cbc" +#define NID_aria_256_cbc 1076 +#define OBJ_aria_256_cbc OBJ_aria,12L + +#define SN_aria_256_cfb128 "ARIA-256-CFB" +#define LN_aria_256_cfb128 "aria-256-cfb" +#define NID_aria_256_cfb128 1077 +#define OBJ_aria_256_cfb128 OBJ_aria,13L + +#define SN_aria_256_ofb128 "ARIA-256-OFB" +#define LN_aria_256_ofb128 "aria-256-ofb" +#define NID_aria_256_ofb128 1078 +#define OBJ_aria_256_ofb128 OBJ_aria,14L + +#define SN_aria_256_ctr "ARIA-256-CTR" +#define LN_aria_256_ctr "aria-256-ctr" +#define NID_aria_256_ctr 1079 +#define OBJ_aria_256_ctr OBJ_aria,15L + +#define SN_aria_128_cfb1 "ARIA-128-CFB1" +#define LN_aria_128_cfb1 "aria-128-cfb1" +#define NID_aria_128_cfb1 1080 + +#define SN_aria_192_cfb1 "ARIA-192-CFB1" +#define LN_aria_192_cfb1 "aria-192-cfb1" +#define NID_aria_192_cfb1 1081 + +#define SN_aria_256_cfb1 "ARIA-256-CFB1" +#define LN_aria_256_cfb1 "aria-256-cfb1" +#define NID_aria_256_cfb1 1082 + +#define SN_aria_128_cfb8 "ARIA-128-CFB8" +#define LN_aria_128_cfb8 "aria-128-cfb8" +#define NID_aria_128_cfb8 1083 + +#define SN_aria_192_cfb8 "ARIA-192-CFB8" +#define LN_aria_192_cfb8 "aria-192-cfb8" +#define NID_aria_192_cfb8 1084 + +#define SN_aria_256_cfb8 "ARIA-256-CFB8" +#define LN_aria_256_cfb8 "aria-256-cfb8" +#define NID_aria_256_cfb8 1085 + +#define SN_aria_128_ccm "ARIA-128-CCM" +#define LN_aria_128_ccm "aria-128-ccm" +#define NID_aria_128_ccm 1120 +#define OBJ_aria_128_ccm OBJ_aria,37L + +#define SN_aria_192_ccm "ARIA-192-CCM" +#define LN_aria_192_ccm "aria-192-ccm" +#define NID_aria_192_ccm 1121 +#define OBJ_aria_192_ccm OBJ_aria,38L + +#define SN_aria_256_ccm "ARIA-256-CCM" +#define LN_aria_256_ccm "aria-256-ccm" +#define NID_aria_256_ccm 1122 +#define OBJ_aria_256_ccm OBJ_aria,39L + +#define SN_aria_128_gcm "ARIA-128-GCM" +#define LN_aria_128_gcm "aria-128-gcm" +#define NID_aria_128_gcm 1123 +#define OBJ_aria_128_gcm OBJ_aria,34L + +#define SN_aria_192_gcm "ARIA-192-GCM" +#define LN_aria_192_gcm "aria-192-gcm" +#define NID_aria_192_gcm 1124 +#define OBJ_aria_192_gcm OBJ_aria,35L + +#define SN_aria_256_gcm "ARIA-256-GCM" +#define LN_aria_256_gcm "aria-256-gcm" +#define NID_aria_256_gcm 1125 +#define OBJ_aria_256_gcm OBJ_aria,36L + +#define SN_kisa "KISA" +#define LN_kisa "kisa" +#define NID_kisa 773 +#define OBJ_kisa OBJ_member_body,410L,200004L + +#define SN_seed_ecb "SEED-ECB" +#define LN_seed_ecb "seed-ecb" +#define NID_seed_ecb 776 +#define OBJ_seed_ecb OBJ_kisa,1L,3L + +#define SN_seed_cbc "SEED-CBC" +#define LN_seed_cbc "seed-cbc" +#define NID_seed_cbc 777 +#define OBJ_seed_cbc OBJ_kisa,1L,4L + +#define SN_seed_cfb128 "SEED-CFB" +#define LN_seed_cfb128 "seed-cfb" +#define NID_seed_cfb128 779 +#define OBJ_seed_cfb128 OBJ_kisa,1L,5L + +#define SN_seed_ofb128 "SEED-OFB" +#define LN_seed_ofb128 "seed-ofb" +#define NID_seed_ofb128 778 +#define OBJ_seed_ofb128 OBJ_kisa,1L,6L + +#define SN_sm4_ecb "SM4-ECB" +#define LN_sm4_ecb "sm4-ecb" +#define NID_sm4_ecb 1133 +#define OBJ_sm4_ecb OBJ_sm_scheme,104L,1L + +#define SN_sm4_cbc "SM4-CBC" +#define LN_sm4_cbc "sm4-cbc" +#define NID_sm4_cbc 1134 +#define OBJ_sm4_cbc OBJ_sm_scheme,104L,2L + +#define SN_sm4_ofb128 "SM4-OFB" +#define LN_sm4_ofb128 "sm4-ofb" +#define NID_sm4_ofb128 1135 +#define OBJ_sm4_ofb128 OBJ_sm_scheme,104L,3L + +#define SN_sm4_cfb128 "SM4-CFB" +#define LN_sm4_cfb128 "sm4-cfb" +#define NID_sm4_cfb128 1137 +#define OBJ_sm4_cfb128 OBJ_sm_scheme,104L,4L + +#define SN_sm4_cfb1 "SM4-CFB1" +#define LN_sm4_cfb1 "sm4-cfb1" +#define NID_sm4_cfb1 1136 +#define OBJ_sm4_cfb1 OBJ_sm_scheme,104L,5L + +#define SN_sm4_cfb8 "SM4-CFB8" +#define LN_sm4_cfb8 "sm4-cfb8" +#define NID_sm4_cfb8 1138 +#define OBJ_sm4_cfb8 OBJ_sm_scheme,104L,6L + +#define SN_sm4_ctr "SM4-CTR" +#define LN_sm4_ctr "sm4-ctr" +#define NID_sm4_ctr 1139 +#define OBJ_sm4_ctr OBJ_sm_scheme,104L,7L + +#define SN_hmac "HMAC" +#define LN_hmac "hmac" +#define NID_hmac 855 + +#define SN_cmac "CMAC" +#define LN_cmac "cmac" +#define NID_cmac 894 + +#define SN_rc4_hmac_md5 "RC4-HMAC-MD5" +#define LN_rc4_hmac_md5 "rc4-hmac-md5" +#define NID_rc4_hmac_md5 915 + +#define SN_aes_128_cbc_hmac_sha1 "AES-128-CBC-HMAC-SHA1" +#define LN_aes_128_cbc_hmac_sha1 "aes-128-cbc-hmac-sha1" +#define NID_aes_128_cbc_hmac_sha1 916 + +#define SN_aes_192_cbc_hmac_sha1 "AES-192-CBC-HMAC-SHA1" +#define LN_aes_192_cbc_hmac_sha1 "aes-192-cbc-hmac-sha1" +#define NID_aes_192_cbc_hmac_sha1 917 + +#define SN_aes_256_cbc_hmac_sha1 "AES-256-CBC-HMAC-SHA1" +#define LN_aes_256_cbc_hmac_sha1 "aes-256-cbc-hmac-sha1" +#define NID_aes_256_cbc_hmac_sha1 918 + +#define SN_aes_128_cbc_hmac_sha256 "AES-128-CBC-HMAC-SHA256" +#define LN_aes_128_cbc_hmac_sha256 "aes-128-cbc-hmac-sha256" +#define NID_aes_128_cbc_hmac_sha256 948 + +#define SN_aes_192_cbc_hmac_sha256 "AES-192-CBC-HMAC-SHA256" +#define LN_aes_192_cbc_hmac_sha256 "aes-192-cbc-hmac-sha256" +#define NID_aes_192_cbc_hmac_sha256 949 + +#define SN_aes_256_cbc_hmac_sha256 "AES-256-CBC-HMAC-SHA256" +#define LN_aes_256_cbc_hmac_sha256 "aes-256-cbc-hmac-sha256" +#define NID_aes_256_cbc_hmac_sha256 950 + +#define SN_chacha20_poly1305 "ChaCha20-Poly1305" +#define LN_chacha20_poly1305 "chacha20-poly1305" +#define NID_chacha20_poly1305 1018 + +#define SN_chacha20 "ChaCha20" +#define LN_chacha20 "chacha20" +#define NID_chacha20 1019 + +#define SN_dhpublicnumber "dhpublicnumber" +#define LN_dhpublicnumber "X9.42 DH" +#define NID_dhpublicnumber 920 +#define OBJ_dhpublicnumber OBJ_ISO_US,10046L,2L,1L + +#define SN_brainpoolP160r1 "brainpoolP160r1" +#define NID_brainpoolP160r1 921 +#define OBJ_brainpoolP160r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,1L + +#define SN_brainpoolP160t1 "brainpoolP160t1" +#define NID_brainpoolP160t1 922 +#define OBJ_brainpoolP160t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,2L + +#define SN_brainpoolP192r1 "brainpoolP192r1" +#define NID_brainpoolP192r1 923 +#define OBJ_brainpoolP192r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,3L + +#define SN_brainpoolP192t1 "brainpoolP192t1" +#define NID_brainpoolP192t1 924 +#define OBJ_brainpoolP192t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,4L + +#define SN_brainpoolP224r1 "brainpoolP224r1" +#define NID_brainpoolP224r1 925 +#define OBJ_brainpoolP224r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,5L + +#define SN_brainpoolP224t1 "brainpoolP224t1" +#define NID_brainpoolP224t1 926 +#define OBJ_brainpoolP224t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,6L + +#define SN_brainpoolP256r1 "brainpoolP256r1" +#define NID_brainpoolP256r1 927 +#define OBJ_brainpoolP256r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,7L + +#define SN_brainpoolP256t1 "brainpoolP256t1" +#define NID_brainpoolP256t1 928 +#define OBJ_brainpoolP256t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,8L + +#define SN_brainpoolP320r1 "brainpoolP320r1" +#define NID_brainpoolP320r1 929 +#define OBJ_brainpoolP320r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,9L + +#define SN_brainpoolP320t1 "brainpoolP320t1" +#define NID_brainpoolP320t1 930 +#define OBJ_brainpoolP320t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,10L + +#define SN_brainpoolP384r1 "brainpoolP384r1" +#define NID_brainpoolP384r1 931 +#define OBJ_brainpoolP384r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,11L + +#define SN_brainpoolP384t1 "brainpoolP384t1" +#define NID_brainpoolP384t1 932 +#define OBJ_brainpoolP384t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,12L + +#define SN_brainpoolP512r1 "brainpoolP512r1" +#define NID_brainpoolP512r1 933 +#define OBJ_brainpoolP512r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,13L + +#define SN_brainpoolP512t1 "brainpoolP512t1" +#define NID_brainpoolP512t1 934 +#define OBJ_brainpoolP512t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,14L + +#define OBJ_x9_63_scheme 1L,3L,133L,16L,840L,63L,0L + +#define OBJ_secg_scheme OBJ_certicom_arc,1L + +#define SN_dhSinglePass_stdDH_sha1kdf_scheme "dhSinglePass-stdDH-sha1kdf-scheme" +#define NID_dhSinglePass_stdDH_sha1kdf_scheme 936 +#define OBJ_dhSinglePass_stdDH_sha1kdf_scheme OBJ_x9_63_scheme,2L + +#define SN_dhSinglePass_stdDH_sha224kdf_scheme "dhSinglePass-stdDH-sha224kdf-scheme" +#define NID_dhSinglePass_stdDH_sha224kdf_scheme 937 +#define OBJ_dhSinglePass_stdDH_sha224kdf_scheme OBJ_secg_scheme,11L,0L + +#define SN_dhSinglePass_stdDH_sha256kdf_scheme "dhSinglePass-stdDH-sha256kdf-scheme" +#define NID_dhSinglePass_stdDH_sha256kdf_scheme 938 +#define OBJ_dhSinglePass_stdDH_sha256kdf_scheme OBJ_secg_scheme,11L,1L + +#define SN_dhSinglePass_stdDH_sha384kdf_scheme "dhSinglePass-stdDH-sha384kdf-scheme" +#define NID_dhSinglePass_stdDH_sha384kdf_scheme 939 +#define OBJ_dhSinglePass_stdDH_sha384kdf_scheme OBJ_secg_scheme,11L,2L + +#define SN_dhSinglePass_stdDH_sha512kdf_scheme "dhSinglePass-stdDH-sha512kdf-scheme" +#define NID_dhSinglePass_stdDH_sha512kdf_scheme 940 +#define OBJ_dhSinglePass_stdDH_sha512kdf_scheme OBJ_secg_scheme,11L,3L + +#define SN_dhSinglePass_cofactorDH_sha1kdf_scheme "dhSinglePass-cofactorDH-sha1kdf-scheme" +#define NID_dhSinglePass_cofactorDH_sha1kdf_scheme 941 +#define OBJ_dhSinglePass_cofactorDH_sha1kdf_scheme OBJ_x9_63_scheme,3L + +#define SN_dhSinglePass_cofactorDH_sha224kdf_scheme "dhSinglePass-cofactorDH-sha224kdf-scheme" +#define NID_dhSinglePass_cofactorDH_sha224kdf_scheme 942 +#define OBJ_dhSinglePass_cofactorDH_sha224kdf_scheme OBJ_secg_scheme,14L,0L + +#define SN_dhSinglePass_cofactorDH_sha256kdf_scheme "dhSinglePass-cofactorDH-sha256kdf-scheme" +#define NID_dhSinglePass_cofactorDH_sha256kdf_scheme 943 +#define OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme OBJ_secg_scheme,14L,1L + +#define SN_dhSinglePass_cofactorDH_sha384kdf_scheme "dhSinglePass-cofactorDH-sha384kdf-scheme" +#define NID_dhSinglePass_cofactorDH_sha384kdf_scheme 944 +#define OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme OBJ_secg_scheme,14L,2L + +#define SN_dhSinglePass_cofactorDH_sha512kdf_scheme "dhSinglePass-cofactorDH-sha512kdf-scheme" +#define NID_dhSinglePass_cofactorDH_sha512kdf_scheme 945 +#define OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme OBJ_secg_scheme,14L,3L + +#define SN_dh_std_kdf "dh-std-kdf" +#define NID_dh_std_kdf 946 + +#define SN_dh_cofactor_kdf "dh-cofactor-kdf" +#define NID_dh_cofactor_kdf 947 + +#define SN_ct_precert_scts "ct_precert_scts" +#define LN_ct_precert_scts "CT Precertificate SCTs" +#define NID_ct_precert_scts 951 +#define OBJ_ct_precert_scts 1L,3L,6L,1L,4L,1L,11129L,2L,4L,2L + +#define SN_ct_precert_poison "ct_precert_poison" +#define LN_ct_precert_poison "CT Precertificate Poison" +#define NID_ct_precert_poison 952 +#define OBJ_ct_precert_poison 1L,3L,6L,1L,4L,1L,11129L,2L,4L,3L + +#define SN_ct_precert_signer "ct_precert_signer" +#define LN_ct_precert_signer "CT Precertificate Signer" +#define NID_ct_precert_signer 953 +#define OBJ_ct_precert_signer 1L,3L,6L,1L,4L,1L,11129L,2L,4L,4L + +#define SN_ct_cert_scts "ct_cert_scts" +#define LN_ct_cert_scts "CT Certificate SCTs" +#define NID_ct_cert_scts 954 +#define OBJ_ct_cert_scts 1L,3L,6L,1L,4L,1L,11129L,2L,4L,5L + +#define SN_jurisdictionLocalityName "jurisdictionL" +#define LN_jurisdictionLocalityName "jurisdictionLocalityName" +#define NID_jurisdictionLocalityName 955 +#define OBJ_jurisdictionLocalityName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,1L + +#define SN_jurisdictionStateOrProvinceName "jurisdictionST" +#define LN_jurisdictionStateOrProvinceName "jurisdictionStateOrProvinceName" +#define NID_jurisdictionStateOrProvinceName 956 +#define OBJ_jurisdictionStateOrProvinceName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,2L + +#define SN_jurisdictionCountryName "jurisdictionC" +#define LN_jurisdictionCountryName "jurisdictionCountryName" +#define NID_jurisdictionCountryName 957 +#define OBJ_jurisdictionCountryName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,3L + +#define SN_id_scrypt "id-scrypt" +#define LN_id_scrypt "scrypt" +#define NID_id_scrypt 973 +#define OBJ_id_scrypt 1L,3L,6L,1L,4L,1L,11591L,4L,11L + +#define SN_tls1_prf "TLS1-PRF" +#define LN_tls1_prf "tls1-prf" +#define NID_tls1_prf 1021 + +#define SN_hkdf "HKDF" +#define LN_hkdf "hkdf" +#define NID_hkdf 1036 + +#define SN_id_pkinit "id-pkinit" +#define NID_id_pkinit 1031 +#define OBJ_id_pkinit 1L,3L,6L,1L,5L,2L,3L + +#define SN_pkInitClientAuth "pkInitClientAuth" +#define LN_pkInitClientAuth "PKINIT Client Auth" +#define NID_pkInitClientAuth 1032 +#define OBJ_pkInitClientAuth OBJ_id_pkinit,4L + +#define SN_pkInitKDC "pkInitKDC" +#define LN_pkInitKDC "Signing KDC Response" +#define NID_pkInitKDC 1033 +#define OBJ_pkInitKDC OBJ_id_pkinit,5L + +#define SN_X25519 "X25519" +#define NID_X25519 1034 +#define OBJ_X25519 1L,3L,101L,110L + +#define SN_X448 "X448" +#define NID_X448 1035 +#define OBJ_X448 1L,3L,101L,111L + +#define SN_ED25519 "ED25519" +#define NID_ED25519 1087 +#define OBJ_ED25519 1L,3L,101L,112L + +#define SN_ED448 "ED448" +#define NID_ED448 1088 +#define OBJ_ED448 1L,3L,101L,113L + +#define SN_kx_rsa "KxRSA" +#define LN_kx_rsa "kx-rsa" +#define NID_kx_rsa 1037 + +#define SN_kx_ecdhe "KxECDHE" +#define LN_kx_ecdhe "kx-ecdhe" +#define NID_kx_ecdhe 1038 + +#define SN_kx_dhe "KxDHE" +#define LN_kx_dhe "kx-dhe" +#define NID_kx_dhe 1039 + +#define SN_kx_ecdhe_psk "KxECDHE-PSK" +#define LN_kx_ecdhe_psk "kx-ecdhe-psk" +#define NID_kx_ecdhe_psk 1040 + +#define SN_kx_dhe_psk "KxDHE-PSK" +#define LN_kx_dhe_psk "kx-dhe-psk" +#define NID_kx_dhe_psk 1041 + +#define SN_kx_rsa_psk "KxRSA_PSK" +#define LN_kx_rsa_psk "kx-rsa-psk" +#define NID_kx_rsa_psk 1042 + +#define SN_kx_psk "KxPSK" +#define LN_kx_psk "kx-psk" +#define NID_kx_psk 1043 + +#define SN_kx_srp "KxSRP" +#define LN_kx_srp "kx-srp" +#define NID_kx_srp 1044 + +#define SN_kx_gost "KxGOST" +#define LN_kx_gost "kx-gost" +#define NID_kx_gost 1045 + +#define SN_kx_any "KxANY" +#define LN_kx_any "kx-any" +#define NID_kx_any 1063 + +#define SN_auth_rsa "AuthRSA" +#define LN_auth_rsa "auth-rsa" +#define NID_auth_rsa 1046 + +#define SN_auth_ecdsa "AuthECDSA" +#define LN_auth_ecdsa "auth-ecdsa" +#define NID_auth_ecdsa 1047 + +#define SN_auth_psk "AuthPSK" +#define LN_auth_psk "auth-psk" +#define NID_auth_psk 1048 + +#define SN_auth_dss "AuthDSS" +#define LN_auth_dss "auth-dss" +#define NID_auth_dss 1049 + +#define SN_auth_gost01 "AuthGOST01" +#define LN_auth_gost01 "auth-gost01" +#define NID_auth_gost01 1050 + +#define SN_auth_gost12 "AuthGOST12" +#define LN_auth_gost12 "auth-gost12" +#define NID_auth_gost12 1051 + +#define SN_auth_srp "AuthSRP" +#define LN_auth_srp "auth-srp" +#define NID_auth_srp 1052 + +#define SN_auth_null "AuthNULL" +#define LN_auth_null "auth-null" +#define NID_auth_null 1053 + +#define SN_auth_any "AuthANY" +#define LN_auth_any "auth-any" +#define NID_auth_any 1064 + +#define SN_poly1305 "Poly1305" +#define LN_poly1305 "poly1305" +#define NID_poly1305 1061 + +#define SN_siphash "SipHash" +#define LN_siphash "siphash" +#define NID_siphash 1062 + +#define SN_ffdhe2048 "ffdhe2048" +#define NID_ffdhe2048 1126 + +#define SN_ffdhe3072 "ffdhe3072" +#define NID_ffdhe3072 1127 + +#define SN_ffdhe4096 "ffdhe4096" +#define NID_ffdhe4096 1128 + +#define SN_ffdhe6144 "ffdhe6144" +#define NID_ffdhe6144 1129 + +#define SN_ffdhe8192 "ffdhe8192" +#define NID_ffdhe8192 1130 + +#define SN_ISO_UA "ISO-UA" +#define NID_ISO_UA 1150 +#define OBJ_ISO_UA OBJ_member_body,804L + +#define SN_ua_pki "ua-pki" +#define NID_ua_pki 1151 +#define OBJ_ua_pki OBJ_ISO_UA,2L,1L,1L,1L + +#define SN_dstu28147 "dstu28147" +#define LN_dstu28147 "DSTU Gost 28147-2009" +#define NID_dstu28147 1152 +#define OBJ_dstu28147 OBJ_ua_pki,1L,1L,1L + +#define SN_dstu28147_ofb "dstu28147-ofb" +#define LN_dstu28147_ofb "DSTU Gost 28147-2009 OFB mode" +#define NID_dstu28147_ofb 1153 +#define OBJ_dstu28147_ofb OBJ_dstu28147,2L + +#define SN_dstu28147_cfb "dstu28147-cfb" +#define LN_dstu28147_cfb "DSTU Gost 28147-2009 CFB mode" +#define NID_dstu28147_cfb 1154 +#define OBJ_dstu28147_cfb OBJ_dstu28147,3L + +#define SN_dstu28147_wrap "dstu28147-wrap" +#define LN_dstu28147_wrap "DSTU Gost 28147-2009 key wrap" +#define NID_dstu28147_wrap 1155 +#define OBJ_dstu28147_wrap OBJ_dstu28147,5L + +#define SN_hmacWithDstu34311 "hmacWithDstu34311" +#define LN_hmacWithDstu34311 "HMAC DSTU Gost 34311-95" +#define NID_hmacWithDstu34311 1156 +#define OBJ_hmacWithDstu34311 OBJ_ua_pki,1L,1L,2L + +#define SN_dstu34311 "dstu34311" +#define LN_dstu34311 "DSTU Gost 34311-95" +#define NID_dstu34311 1157 +#define OBJ_dstu34311 OBJ_ua_pki,1L,2L,1L + +#define SN_dstu4145le "dstu4145le" +#define LN_dstu4145le "DSTU 4145-2002 little endian" +#define NID_dstu4145le 1158 +#define OBJ_dstu4145le OBJ_ua_pki,1L,3L,1L,1L + +#define SN_dstu4145be "dstu4145be" +#define LN_dstu4145be "DSTU 4145-2002 big endian" +#define NID_dstu4145be 1159 +#define OBJ_dstu4145be OBJ_dstu4145le,1L,1L + +#define SN_uacurve0 "uacurve0" +#define LN_uacurve0 "DSTU curve 0" +#define NID_uacurve0 1160 +#define OBJ_uacurve0 OBJ_dstu4145le,2L,0L + +#define SN_uacurve1 "uacurve1" +#define LN_uacurve1 "DSTU curve 1" +#define NID_uacurve1 1161 +#define OBJ_uacurve1 OBJ_dstu4145le,2L,1L + +#define SN_uacurve2 "uacurve2" +#define LN_uacurve2 "DSTU curve 2" +#define NID_uacurve2 1162 +#define OBJ_uacurve2 OBJ_dstu4145le,2L,2L + +#define SN_uacurve3 "uacurve3" +#define LN_uacurve3 "DSTU curve 3" +#define NID_uacurve3 1163 +#define OBJ_uacurve3 OBJ_dstu4145le,2L,3L + +#define SN_uacurve4 "uacurve4" +#define LN_uacurve4 "DSTU curve 4" +#define NID_uacurve4 1164 +#define OBJ_uacurve4 OBJ_dstu4145le,2L,4L + +#define SN_uacurve5 "uacurve5" +#define LN_uacurve5 "DSTU curve 5" +#define NID_uacurve5 1165 +#define OBJ_uacurve5 OBJ_dstu4145le,2L,5L + +#define SN_uacurve6 "uacurve6" +#define LN_uacurve6 "DSTU curve 6" +#define NID_uacurve6 1166 +#define OBJ_uacurve6 OBJ_dstu4145le,2L,6L + +#define SN_uacurve7 "uacurve7" +#define LN_uacurve7 "DSTU curve 7" +#define NID_uacurve7 1167 +#define OBJ_uacurve7 OBJ_dstu4145le,2L,7L + +#define SN_uacurve8 "uacurve8" +#define LN_uacurve8 "DSTU curve 8" +#define NID_uacurve8 1168 +#define OBJ_uacurve8 OBJ_dstu4145le,2L,8L + +#define SN_uacurve9 "uacurve9" +#define LN_uacurve9 "DSTU curve 9" +#define NID_uacurve9 1169 +#define OBJ_uacurve9 OBJ_dstu4145le,2L,9L diff --git a/src/Mayaqua/win32_inc/openssl/objects.h b/src/Mayaqua/win32_inc/openssl/objects.h index 695c988d..5e8b5762 100644 --- a/src/Mayaqua/win32_inc/openssl/objects.h +++ b/src/Mayaqua/win32_inc/openssl/objects.h @@ -1,1143 +1,175 @@ -/* crypto/objects/objects.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_OBJECTS_H -# define HEADER_OBJECTS_H - -# define USE_OBJ_MAC - -# ifdef USE_OBJ_MAC -# include -# else -# define SN_undef "UNDEF" -# define LN_undef "undefined" -# define NID_undef 0 -# define OBJ_undef 0L - -# define SN_Algorithm "Algorithm" -# define LN_algorithm "algorithm" -# define NID_algorithm 38 -# define OBJ_algorithm 1L,3L,14L,3L,2L - -# define LN_rsadsi "rsadsi" -# define NID_rsadsi 1 -# define OBJ_rsadsi 1L,2L,840L,113549L - -# define LN_pkcs "pkcs" -# define NID_pkcs 2 -# define OBJ_pkcs OBJ_rsadsi,1L - -# define SN_md2 "MD2" -# define LN_md2 "md2" -# define NID_md2 3 -# define OBJ_md2 OBJ_rsadsi,2L,2L - -# define SN_md5 "MD5" -# define LN_md5 "md5" -# define NID_md5 4 -# define OBJ_md5 OBJ_rsadsi,2L,5L - -# define SN_rc4 "RC4" -# define LN_rc4 "rc4" -# define NID_rc4 5 -# define OBJ_rc4 OBJ_rsadsi,3L,4L - -# define LN_rsaEncryption "rsaEncryption" -# define NID_rsaEncryption 6 -# define OBJ_rsaEncryption OBJ_pkcs,1L,1L - -# define SN_md2WithRSAEncryption "RSA-MD2" -# define LN_md2WithRSAEncryption "md2WithRSAEncryption" -# define NID_md2WithRSAEncryption 7 -# define OBJ_md2WithRSAEncryption OBJ_pkcs,1L,2L - -# define SN_md5WithRSAEncryption "RSA-MD5" -# define LN_md5WithRSAEncryption "md5WithRSAEncryption" -# define NID_md5WithRSAEncryption 8 -# define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L - -# define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" -# define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" -# define NID_pbeWithMD2AndDES_CBC 9 -# define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L - -# define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" -# define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" -# define NID_pbeWithMD5AndDES_CBC 10 -# define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L - -# define LN_X500 "X500" -# define NID_X500 11 -# define OBJ_X500 2L,5L - -# define LN_X509 "X509" -# define NID_X509 12 -# define OBJ_X509 OBJ_X500,4L - -# define SN_commonName "CN" -# define LN_commonName "commonName" -# define NID_commonName 13 -# define OBJ_commonName OBJ_X509,3L - -# define SN_countryName "C" -# define LN_countryName "countryName" -# define NID_countryName 14 -# define OBJ_countryName OBJ_X509,6L - -# define SN_localityName "L" -# define LN_localityName "localityName" -# define NID_localityName 15 -# define OBJ_localityName OBJ_X509,7L - -/* Postal Address? PA */ - -/* should be "ST" (rfc1327) but MS uses 'S' */ -# define SN_stateOrProvinceName "ST" -# define LN_stateOrProvinceName "stateOrProvinceName" -# define NID_stateOrProvinceName 16 -# define OBJ_stateOrProvinceName OBJ_X509,8L - -# define SN_organizationName "O" -# define LN_organizationName "organizationName" -# define NID_organizationName 17 -# define OBJ_organizationName OBJ_X509,10L - -# define SN_organizationalUnitName "OU" -# define LN_organizationalUnitName "organizationalUnitName" -# define NID_organizationalUnitName 18 -# define OBJ_organizationalUnitName OBJ_X509,11L - -# define SN_rsa "RSA" -# define LN_rsa "rsa" -# define NID_rsa 19 -# define OBJ_rsa OBJ_X500,8L,1L,1L - -# define LN_pkcs7 "pkcs7" -# define NID_pkcs7 20 -# define OBJ_pkcs7 OBJ_pkcs,7L - -# define LN_pkcs7_data "pkcs7-data" -# define NID_pkcs7_data 21 -# define OBJ_pkcs7_data OBJ_pkcs7,1L - -# define LN_pkcs7_signed "pkcs7-signedData" -# define NID_pkcs7_signed 22 -# define OBJ_pkcs7_signed OBJ_pkcs7,2L - -# define LN_pkcs7_enveloped "pkcs7-envelopedData" -# define NID_pkcs7_enveloped 23 -# define OBJ_pkcs7_enveloped OBJ_pkcs7,3L - -# define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" -# define NID_pkcs7_signedAndEnveloped 24 -# define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L - -# define LN_pkcs7_digest "pkcs7-digestData" -# define NID_pkcs7_digest 25 -# define OBJ_pkcs7_digest OBJ_pkcs7,5L - -# define LN_pkcs7_encrypted "pkcs7-encryptedData" -# define NID_pkcs7_encrypted 26 -# define OBJ_pkcs7_encrypted OBJ_pkcs7,6L - -# define LN_pkcs3 "pkcs3" -# define NID_pkcs3 27 -# define OBJ_pkcs3 OBJ_pkcs,3L - -# define LN_dhKeyAgreement "dhKeyAgreement" -# define NID_dhKeyAgreement 28 -# define OBJ_dhKeyAgreement OBJ_pkcs3,1L - -# define SN_des_ecb "DES-ECB" -# define LN_des_ecb "des-ecb" -# define NID_des_ecb 29 -# define OBJ_des_ecb OBJ_algorithm,6L - -# define SN_des_cfb64 "DES-CFB" -# define LN_des_cfb64 "des-cfb" -# define NID_des_cfb64 30 -/* IV + num */ -# define OBJ_des_cfb64 OBJ_algorithm,9L - -# define SN_des_cbc "DES-CBC" -# define LN_des_cbc "des-cbc" -# define NID_des_cbc 31 -/* IV */ -# define OBJ_des_cbc OBJ_algorithm,7L - -# define SN_des_ede "DES-EDE" -# define LN_des_ede "des-ede" -# define NID_des_ede 32 -/* ?? */ -# define OBJ_des_ede OBJ_algorithm,17L - -# define SN_des_ede3 "DES-EDE3" -# define LN_des_ede3 "des-ede3" -# define NID_des_ede3 33 - -# define SN_idea_cbc "IDEA-CBC" -# define LN_idea_cbc "idea-cbc" -# define NID_idea_cbc 34 -# define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L - -# define SN_idea_cfb64 "IDEA-CFB" -# define LN_idea_cfb64 "idea-cfb" -# define NID_idea_cfb64 35 - -# define SN_idea_ecb "IDEA-ECB" -# define LN_idea_ecb "idea-ecb" -# define NID_idea_ecb 36 - -# define SN_rc2_cbc "RC2-CBC" -# define LN_rc2_cbc "rc2-cbc" -# define NID_rc2_cbc 37 -# define OBJ_rc2_cbc OBJ_rsadsi,3L,2L - -# define SN_rc2_ecb "RC2-ECB" -# define LN_rc2_ecb "rc2-ecb" -# define NID_rc2_ecb 38 - -# define SN_rc2_cfb64 "RC2-CFB" -# define LN_rc2_cfb64 "rc2-cfb" -# define NID_rc2_cfb64 39 - -# define SN_rc2_ofb64 "RC2-OFB" -# define LN_rc2_ofb64 "rc2-ofb" -# define NID_rc2_ofb64 40 - -# define SN_sha "SHA" -# define LN_sha "sha" -# define NID_sha 41 -# define OBJ_sha OBJ_algorithm,18L - -# define SN_shaWithRSAEncryption "RSA-SHA" -# define LN_shaWithRSAEncryption "shaWithRSAEncryption" -# define NID_shaWithRSAEncryption 42 -# define OBJ_shaWithRSAEncryption OBJ_algorithm,15L - -# define SN_des_ede_cbc "DES-EDE-CBC" -# define LN_des_ede_cbc "des-ede-cbc" -# define NID_des_ede_cbc 43 - -# define SN_des_ede3_cbc "DES-EDE3-CBC" -# define LN_des_ede3_cbc "des-ede3-cbc" -# define NID_des_ede3_cbc 44 -# define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L - -# define SN_des_ofb64 "DES-OFB" -# define LN_des_ofb64 "des-ofb" -# define NID_des_ofb64 45 -# define OBJ_des_ofb64 OBJ_algorithm,8L - -# define SN_idea_ofb64 "IDEA-OFB" -# define LN_idea_ofb64 "idea-ofb" -# define NID_idea_ofb64 46 - -# define LN_pkcs9 "pkcs9" -# define NID_pkcs9 47 -# define OBJ_pkcs9 OBJ_pkcs,9L - -# define SN_pkcs9_emailAddress "Email" -# define LN_pkcs9_emailAddress "emailAddress" -# define NID_pkcs9_emailAddress 48 -# define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L - -# define LN_pkcs9_unstructuredName "unstructuredName" -# define NID_pkcs9_unstructuredName 49 -# define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L - -# define LN_pkcs9_contentType "contentType" -# define NID_pkcs9_contentType 50 -# define OBJ_pkcs9_contentType OBJ_pkcs9,3L - -# define LN_pkcs9_messageDigest "messageDigest" -# define NID_pkcs9_messageDigest 51 -# define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L - -# define LN_pkcs9_signingTime "signingTime" -# define NID_pkcs9_signingTime 52 -# define OBJ_pkcs9_signingTime OBJ_pkcs9,5L - -# define LN_pkcs9_countersignature "countersignature" -# define NID_pkcs9_countersignature 53 -# define OBJ_pkcs9_countersignature OBJ_pkcs9,6L - -# define LN_pkcs9_challengePassword "challengePassword" -# define NID_pkcs9_challengePassword 54 -# define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L - -# define LN_pkcs9_unstructuredAddress "unstructuredAddress" -# define NID_pkcs9_unstructuredAddress 55 -# define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L - -# define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" -# define NID_pkcs9_extCertAttributes 56 -# define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L - -# define SN_netscape "Netscape" -# define LN_netscape "Netscape Communications Corp." -# define NID_netscape 57 -# define OBJ_netscape 2L,16L,840L,1L,113730L - -# define SN_netscape_cert_extension "nsCertExt" -# define LN_netscape_cert_extension "Netscape Certificate Extension" -# define NID_netscape_cert_extension 58 -# define OBJ_netscape_cert_extension OBJ_netscape,1L - -# define SN_netscape_data_type "nsDataType" -# define LN_netscape_data_type "Netscape Data Type" -# define NID_netscape_data_type 59 -# define OBJ_netscape_data_type OBJ_netscape,2L - -# define SN_des_ede_cfb64 "DES-EDE-CFB" -# define LN_des_ede_cfb64 "des-ede-cfb" -# define NID_des_ede_cfb64 60 - -# define SN_des_ede3_cfb64 "DES-EDE3-CFB" -# define LN_des_ede3_cfb64 "des-ede3-cfb" -# define NID_des_ede3_cfb64 61 - -# define SN_des_ede_ofb64 "DES-EDE-OFB" -# define LN_des_ede_ofb64 "des-ede-ofb" -# define NID_des_ede_ofb64 62 - -# define SN_des_ede3_ofb64 "DES-EDE3-OFB" -# define LN_des_ede3_ofb64 "des-ede3-ofb" -# define NID_des_ede3_ofb64 63 - -/* I'm not sure about the object ID */ -# define SN_sha1 "SHA1" -# define LN_sha1 "sha1" -# define NID_sha1 64 -# define OBJ_sha1 OBJ_algorithm,26L -/* 28 Jun 1996 - eay */ -/* #define OBJ_sha1 1L,3L,14L,2L,26L,05L <- wrong */ - -# define SN_sha1WithRSAEncryption "RSA-SHA1" -# define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" -# define NID_sha1WithRSAEncryption 65 -# define OBJ_sha1WithRSAEncryption OBJ_pkcs,1L,5L - -# define SN_dsaWithSHA "DSA-SHA" -# define LN_dsaWithSHA "dsaWithSHA" -# define NID_dsaWithSHA 66 -# define OBJ_dsaWithSHA OBJ_algorithm,13L - -# define SN_dsa_2 "DSA-old" -# define LN_dsa_2 "dsaEncryption-old" -# define NID_dsa_2 67 -# define OBJ_dsa_2 OBJ_algorithm,12L - -/* proposed by microsoft to RSA */ -# define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" -# define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" -# define NID_pbeWithSHA1AndRC2_CBC 68 -# define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L - -/* - * proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now defined - * explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something completely - * different. - */ -# define LN_id_pbkdf2 "PBKDF2" -# define NID_id_pbkdf2 69 -# define OBJ_id_pbkdf2 OBJ_pkcs,5L,12L - -# define SN_dsaWithSHA1_2 "DSA-SHA1-old" -# define LN_dsaWithSHA1_2 "dsaWithSHA1-old" -# define NID_dsaWithSHA1_2 70 -/* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ -# define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L - -# define SN_netscape_cert_type "nsCertType" -# define LN_netscape_cert_type "Netscape Cert Type" -# define NID_netscape_cert_type 71 -# define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L - -# define SN_netscape_base_url "nsBaseUrl" -# define LN_netscape_base_url "Netscape Base Url" -# define NID_netscape_base_url 72 -# define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L - -# define SN_netscape_revocation_url "nsRevocationUrl" -# define LN_netscape_revocation_url "Netscape Revocation Url" -# define NID_netscape_revocation_url 73 -# define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L - -# define SN_netscape_ca_revocation_url "nsCaRevocationUrl" -# define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" -# define NID_netscape_ca_revocation_url 74 -# define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L - -# define SN_netscape_renewal_url "nsRenewalUrl" -# define LN_netscape_renewal_url "Netscape Renewal Url" -# define NID_netscape_renewal_url 75 -# define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L - -# define SN_netscape_ca_policy_url "nsCaPolicyUrl" -# define LN_netscape_ca_policy_url "Netscape CA Policy Url" -# define NID_netscape_ca_policy_url 76 -# define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L - -# define SN_netscape_ssl_server_name "nsSslServerName" -# define LN_netscape_ssl_server_name "Netscape SSL Server Name" -# define NID_netscape_ssl_server_name 77 -# define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L - -# define SN_netscape_comment "nsComment" -# define LN_netscape_comment "Netscape Comment" -# define NID_netscape_comment 78 -# define OBJ_netscape_comment OBJ_netscape_cert_extension,13L - -# define SN_netscape_cert_sequence "nsCertSequence" -# define LN_netscape_cert_sequence "Netscape Certificate Sequence" -# define NID_netscape_cert_sequence 79 -# define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L - -# define SN_desx_cbc "DESX-CBC" -# define LN_desx_cbc "desx-cbc" -# define NID_desx_cbc 80 - -# define SN_id_ce "id-ce" -# define NID_id_ce 81 -# define OBJ_id_ce 2L,5L,29L - -# define SN_subject_key_identifier "subjectKeyIdentifier" -# define LN_subject_key_identifier "X509v3 Subject Key Identifier" -# define NID_subject_key_identifier 82 -# define OBJ_subject_key_identifier OBJ_id_ce,14L - -# define SN_key_usage "keyUsage" -# define LN_key_usage "X509v3 Key Usage" -# define NID_key_usage 83 -# define OBJ_key_usage OBJ_id_ce,15L - -# define SN_private_key_usage_period "privateKeyUsagePeriod" -# define LN_private_key_usage_period "X509v3 Private Key Usage Period" -# define NID_private_key_usage_period 84 -# define OBJ_private_key_usage_period OBJ_id_ce,16L - -# define SN_subject_alt_name "subjectAltName" -# define LN_subject_alt_name "X509v3 Subject Alternative Name" -# define NID_subject_alt_name 85 -# define OBJ_subject_alt_name OBJ_id_ce,17L - -# define SN_issuer_alt_name "issuerAltName" -# define LN_issuer_alt_name "X509v3 Issuer Alternative Name" -# define NID_issuer_alt_name 86 -# define OBJ_issuer_alt_name OBJ_id_ce,18L - -# define SN_basic_constraints "basicConstraints" -# define LN_basic_constraints "X509v3 Basic Constraints" -# define NID_basic_constraints 87 -# define OBJ_basic_constraints OBJ_id_ce,19L - -# define SN_crl_number "crlNumber" -# define LN_crl_number "X509v3 CRL Number" -# define NID_crl_number 88 -# define OBJ_crl_number OBJ_id_ce,20L - -# define SN_certificate_policies "certificatePolicies" -# define LN_certificate_policies "X509v3 Certificate Policies" -# define NID_certificate_policies 89 -# define OBJ_certificate_policies OBJ_id_ce,32L - -# define SN_authority_key_identifier "authorityKeyIdentifier" -# define LN_authority_key_identifier "X509v3 Authority Key Identifier" -# define NID_authority_key_identifier 90 -# define OBJ_authority_key_identifier OBJ_id_ce,35L - -# define SN_bf_cbc "BF-CBC" -# define LN_bf_cbc "bf-cbc" -# define NID_bf_cbc 91 -# define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L - -# define SN_bf_ecb "BF-ECB" -# define LN_bf_ecb "bf-ecb" -# define NID_bf_ecb 92 - -# define SN_bf_cfb64 "BF-CFB" -# define LN_bf_cfb64 "bf-cfb" -# define NID_bf_cfb64 93 - -# define SN_bf_ofb64 "BF-OFB" -# define LN_bf_ofb64 "bf-ofb" -# define NID_bf_ofb64 94 - -# define SN_mdc2 "MDC2" -# define LN_mdc2 "mdc2" -# define NID_mdc2 95 -# define OBJ_mdc2 2L,5L,8L,3L,101L -/* An alternative? 1L,3L,14L,3L,2L,19L */ - -# define SN_mdc2WithRSA "RSA-MDC2" -# define LN_mdc2WithRSA "mdc2withRSA" -# define NID_mdc2WithRSA 96 -# define OBJ_mdc2WithRSA 2L,5L,8L,3L,100L - -# define SN_rc4_40 "RC4-40" -# define LN_rc4_40 "rc4-40" -# define NID_rc4_40 97 - -# define SN_rc2_40_cbc "RC2-40-CBC" -# define LN_rc2_40_cbc "rc2-40-cbc" -# define NID_rc2_40_cbc 98 - -# define SN_givenName "G" -# define LN_givenName "givenName" -# define NID_givenName 99 -# define OBJ_givenName OBJ_X509,42L - -# define SN_surname "S" -# define LN_surname "surname" -# define NID_surname 100 -# define OBJ_surname OBJ_X509,4L - -# define SN_initials "I" -# define LN_initials "initials" -# define NID_initials 101 -# define OBJ_initials OBJ_X509,43L - -# define SN_uniqueIdentifier "UID" -# define LN_uniqueIdentifier "uniqueIdentifier" -# define NID_uniqueIdentifier 102 -# define OBJ_uniqueIdentifier OBJ_X509,45L - -# define SN_crl_distribution_points "crlDistributionPoints" -# define LN_crl_distribution_points "X509v3 CRL Distribution Points" -# define NID_crl_distribution_points 103 -# define OBJ_crl_distribution_points OBJ_id_ce,31L - -# define SN_md5WithRSA "RSA-NP-MD5" -# define LN_md5WithRSA "md5WithRSA" -# define NID_md5WithRSA 104 -# define OBJ_md5WithRSA OBJ_algorithm,3L - -# define SN_serialNumber "SN" -# define LN_serialNumber "serialNumber" -# define NID_serialNumber 105 -# define OBJ_serialNumber OBJ_X509,5L - -# define SN_title "T" -# define LN_title "title" -# define NID_title 106 -# define OBJ_title OBJ_X509,12L - -# define SN_description "D" -# define LN_description "description" -# define NID_description 107 -# define OBJ_description OBJ_X509,13L - -/* CAST5 is CAST-128, I'm just sticking with the documentation */ -# define SN_cast5_cbc "CAST5-CBC" -# define LN_cast5_cbc "cast5-cbc" -# define NID_cast5_cbc 108 -# define OBJ_cast5_cbc 1L,2L,840L,113533L,7L,66L,10L - -# define SN_cast5_ecb "CAST5-ECB" -# define LN_cast5_ecb "cast5-ecb" -# define NID_cast5_ecb 109 - -# define SN_cast5_cfb64 "CAST5-CFB" -# define LN_cast5_cfb64 "cast5-cfb" -# define NID_cast5_cfb64 110 - -# define SN_cast5_ofb64 "CAST5-OFB" -# define LN_cast5_ofb64 "cast5-ofb" -# define NID_cast5_ofb64 111 - -# define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" -# define NID_pbeWithMD5AndCast5_CBC 112 -# define OBJ_pbeWithMD5AndCast5_CBC 1L,2L,840L,113533L,7L,66L,12L - -/*- - * This is one sun will soon be using :-( - * id-dsa-with-sha1 ID ::= { - * iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 } - */ -# define SN_dsaWithSHA1 "DSA-SHA1" -# define LN_dsaWithSHA1 "dsaWithSHA1" -# define NID_dsaWithSHA1 113 -# define OBJ_dsaWithSHA1 1L,2L,840L,10040L,4L,3L - -# define NID_md5_sha1 114 -# define SN_md5_sha1 "MD5-SHA1" -# define LN_md5_sha1 "md5-sha1" - -# define SN_sha1WithRSA "RSA-SHA1-2" -# define LN_sha1WithRSA "sha1WithRSA" -# define NID_sha1WithRSA 115 -# define OBJ_sha1WithRSA OBJ_algorithm,29L - -# define SN_dsa "DSA" -# define LN_dsa "dsaEncryption" -# define NID_dsa 116 -# define OBJ_dsa 1L,2L,840L,10040L,4L,1L - -# define SN_ripemd160 "RIPEMD160" -# define LN_ripemd160 "ripemd160" -# define NID_ripemd160 117 -# define OBJ_ripemd160 1L,3L,36L,3L,2L,1L - -/* - * The name should actually be rsaSignatureWithripemd160, but I'm going to - * continue using the convention I'm using with the other ciphers - */ -# define SN_ripemd160WithRSA "RSA-RIPEMD160" -# define LN_ripemd160WithRSA "ripemd160WithRSA" -# define NID_ripemd160WithRSA 119 -# define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L - -/*- - * Taken from rfc2040 - * RC5_CBC_Parameters ::= SEQUENCE { - * version INTEGER (v1_0(16)), - * rounds INTEGER (8..127), - * blockSizeInBits INTEGER (64, 128), - * iv OCTET STRING OPTIONAL - * } - */ -# define SN_rc5_cbc "RC5-CBC" -# define LN_rc5_cbc "rc5-cbc" -# define NID_rc5_cbc 120 -# define OBJ_rc5_cbc OBJ_rsadsi,3L,8L - -# define SN_rc5_ecb "RC5-ECB" -# define LN_rc5_ecb "rc5-ecb" -# define NID_rc5_ecb 121 - -# define SN_rc5_cfb64 "RC5-CFB" -# define LN_rc5_cfb64 "rc5-cfb" -# define NID_rc5_cfb64 122 - -# define SN_rc5_ofb64 "RC5-OFB" -# define LN_rc5_ofb64 "rc5-ofb" -# define NID_rc5_ofb64 123 - -# define SN_rle_compression "RLE" -# define LN_rle_compression "run length compression" -# define NID_rle_compression 124 -# define OBJ_rle_compression 1L,1L,1L,1L,666L,1L - -# define SN_zlib_compression "ZLIB" -# define LN_zlib_compression "zlib compression" -# define NID_zlib_compression 125 -# define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L - -# define SN_ext_key_usage "extendedKeyUsage" -# define LN_ext_key_usage "X509v3 Extended Key Usage" -# define NID_ext_key_usage 126 -# define OBJ_ext_key_usage OBJ_id_ce,37 - -# define SN_id_pkix "PKIX" -# define NID_id_pkix 127 -# define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L - -# define SN_id_kp "id-kp" -# define NID_id_kp 128 -# define OBJ_id_kp OBJ_id_pkix,3L - -/* PKIX extended key usage OIDs */ - -# define SN_server_auth "serverAuth" -# define LN_server_auth "TLS Web Server Authentication" -# define NID_server_auth 129 -# define OBJ_server_auth OBJ_id_kp,1L - -# define SN_client_auth "clientAuth" -# define LN_client_auth "TLS Web Client Authentication" -# define NID_client_auth 130 -# define OBJ_client_auth OBJ_id_kp,2L - -# define SN_code_sign "codeSigning" -# define LN_code_sign "Code Signing" -# define NID_code_sign 131 -# define OBJ_code_sign OBJ_id_kp,3L - -# define SN_email_protect "emailProtection" -# define LN_email_protect "E-mail Protection" -# define NID_email_protect 132 -# define OBJ_email_protect OBJ_id_kp,4L - -# define SN_time_stamp "timeStamping" -# define LN_time_stamp "Time Stamping" -# define NID_time_stamp 133 -# define OBJ_time_stamp OBJ_id_kp,8L - -/* Additional extended key usage OIDs: Microsoft */ - -# define SN_ms_code_ind "msCodeInd" -# define LN_ms_code_ind "Microsoft Individual Code Signing" -# define NID_ms_code_ind 134 -# define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L - -# define SN_ms_code_com "msCodeCom" -# define LN_ms_code_com "Microsoft Commercial Code Signing" -# define NID_ms_code_com 135 -# define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L - -# define SN_ms_ctl_sign "msCTLSign" -# define LN_ms_ctl_sign "Microsoft Trust List Signing" -# define NID_ms_ctl_sign 136 -# define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L - -# define SN_ms_sgc "msSGC" -# define LN_ms_sgc "Microsoft Server Gated Crypto" -# define NID_ms_sgc 137 -# define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L - -# define SN_ms_efs "msEFS" -# define LN_ms_efs "Microsoft Encrypted File System" -# define NID_ms_efs 138 -# define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L - -/* Additional usage: Netscape */ - -# define SN_ns_sgc "nsSGC" -# define LN_ns_sgc "Netscape Server Gated Crypto" -# define NID_ns_sgc 139 -# define OBJ_ns_sgc OBJ_netscape,4L,1L - -# define SN_delta_crl "deltaCRL" -# define LN_delta_crl "X509v3 Delta CRL Indicator" -# define NID_delta_crl 140 -# define OBJ_delta_crl OBJ_id_ce,27L - -# define SN_crl_reason "CRLReason" -# define LN_crl_reason "CRL Reason Code" -# define NID_crl_reason 141 -# define OBJ_crl_reason OBJ_id_ce,21L - -# define SN_invalidity_date "invalidityDate" -# define LN_invalidity_date "Invalidity Date" -# define NID_invalidity_date 142 -# define OBJ_invalidity_date OBJ_id_ce,24L - -# define SN_sxnet "SXNetID" -# define LN_sxnet "Strong Extranet ID" -# define NID_sxnet 143 -# define OBJ_sxnet 1L,3L,101L,1L,4L,1L - -/* PKCS12 and related OBJECT IDENTIFIERS */ - -# define OBJ_pkcs12 OBJ_pkcs,12L -# define OBJ_pkcs12_pbeids OBJ_pkcs12, 1 - -# define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" -# define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" -# define NID_pbe_WithSHA1And128BitRC4 144 -# define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids, 1L - -# define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" -# define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" -# define NID_pbe_WithSHA1And40BitRC4 145 -# define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids, 2L - -# define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" -# define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" -# define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 -# define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 3L - -# define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" -# define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" -# define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 -# define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 4L - -# define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" -# define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" -# define NID_pbe_WithSHA1And128BitRC2_CBC 148 -# define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids, 5L - -# define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" -# define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" -# define NID_pbe_WithSHA1And40BitRC2_CBC 149 -# define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L - -# define OBJ_pkcs12_Version1 OBJ_pkcs12, 10L - -# define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1, 1L - -# define LN_keyBag "keyBag" -# define NID_keyBag 150 -# define OBJ_keyBag OBJ_pkcs12_BagIds, 1L - -# define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" -# define NID_pkcs8ShroudedKeyBag 151 -# define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L - -# define LN_certBag "certBag" -# define NID_certBag 152 -# define OBJ_certBag OBJ_pkcs12_BagIds, 3L - -# define LN_crlBag "crlBag" -# define NID_crlBag 153 -# define OBJ_crlBag OBJ_pkcs12_BagIds, 4L - -# define LN_secretBag "secretBag" -# define NID_secretBag 154 -# define OBJ_secretBag OBJ_pkcs12_BagIds, 5L - -# define LN_safeContentsBag "safeContentsBag" -# define NID_safeContentsBag 155 -# define OBJ_safeContentsBag OBJ_pkcs12_BagIds, 6L - -# define LN_friendlyName "friendlyName" -# define NID_friendlyName 156 -# define OBJ_friendlyName OBJ_pkcs9, 20L - -# define LN_localKeyID "localKeyID" -# define NID_localKeyID 157 -# define OBJ_localKeyID OBJ_pkcs9, 21L - -# define OBJ_certTypes OBJ_pkcs9, 22L - -# define LN_x509Certificate "x509Certificate" -# define NID_x509Certificate 158 -# define OBJ_x509Certificate OBJ_certTypes, 1L - -# define LN_sdsiCertificate "sdsiCertificate" -# define NID_sdsiCertificate 159 -# define OBJ_sdsiCertificate OBJ_certTypes, 2L - -# define OBJ_crlTypes OBJ_pkcs9, 23L - -# define LN_x509Crl "x509Crl" -# define NID_x509Crl 160 -# define OBJ_x509Crl OBJ_crlTypes, 1L - -/* PKCS#5 v2 OIDs */ - -# define LN_pbes2 "PBES2" -# define NID_pbes2 161 -# define OBJ_pbes2 OBJ_pkcs,5L,13L - -# define LN_pbmac1 "PBMAC1" -# define NID_pbmac1 162 -# define OBJ_pbmac1 OBJ_pkcs,5L,14L - -# define LN_hmacWithSHA1 "hmacWithSHA1" -# define NID_hmacWithSHA1 163 -# define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L - -/* Policy Qualifier Ids */ - -# define LN_id_qt_cps "Policy Qualifier CPS" -# define SN_id_qt_cps "id-qt-cps" -# define NID_id_qt_cps 164 -# define OBJ_id_qt_cps OBJ_id_pkix,2L,1L - -# define LN_id_qt_unotice "Policy Qualifier User Notice" -# define SN_id_qt_unotice "id-qt-unotice" -# define NID_id_qt_unotice 165 -# define OBJ_id_qt_unotice OBJ_id_pkix,2L,2L - -# define SN_rc2_64_cbc "RC2-64-CBC" -# define LN_rc2_64_cbc "rc2-64-cbc" -# define NID_rc2_64_cbc 166 - -# define SN_SMIMECapabilities "SMIME-CAPS" -# define LN_SMIMECapabilities "S/MIME Capabilities" -# define NID_SMIMECapabilities 167 -# define OBJ_SMIMECapabilities OBJ_pkcs9,15L - -# define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" -# define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" -# define NID_pbeWithMD2AndRC2_CBC 168 -# define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs,5L,4L - -# define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" -# define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" -# define NID_pbeWithMD5AndRC2_CBC 169 -# define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs,5L,6L - -# define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" -# define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" -# define NID_pbeWithSHA1AndDES_CBC 170 -# define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs,5L,10L - -/* Extension request OIDs */ - -# define LN_ms_ext_req "Microsoft Extension Request" -# define SN_ms_ext_req "msExtReq" -# define NID_ms_ext_req 171 -# define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L - -# define LN_ext_req "Extension Request" -# define SN_ext_req "extReq" -# define NID_ext_req 172 -# define OBJ_ext_req OBJ_pkcs9,14L - -# define SN_name "name" -# define LN_name "name" -# define NID_name 173 -# define OBJ_name OBJ_X509,41L - -# define SN_dnQualifier "dnQualifier" -# define LN_dnQualifier "dnQualifier" -# define NID_dnQualifier 174 -# define OBJ_dnQualifier OBJ_X509,46L - -# define SN_id_pe "id-pe" -# define NID_id_pe 175 -# define OBJ_id_pe OBJ_id_pkix,1L - -# define SN_id_ad "id-ad" -# define NID_id_ad 176 -# define OBJ_id_ad OBJ_id_pkix,48L - -# define SN_info_access "authorityInfoAccess" -# define LN_info_access "Authority Information Access" -# define NID_info_access 177 -# define OBJ_info_access OBJ_id_pe,1L - -# define SN_ad_OCSP "OCSP" -# define LN_ad_OCSP "OCSP" -# define NID_ad_OCSP 178 -# define OBJ_ad_OCSP OBJ_id_ad,1L - -# define SN_ad_ca_issuers "caIssuers" -# define LN_ad_ca_issuers "CA Issuers" -# define NID_ad_ca_issuers 179 -# define OBJ_ad_ca_issuers OBJ_id_ad,2L - -# define SN_OCSP_sign "OCSPSigning" -# define LN_OCSP_sign "OCSP Signing" -# define NID_OCSP_sign 180 -# define OBJ_OCSP_sign OBJ_id_kp,9L -# endif /* USE_OBJ_MAC */ - -# include -# include - -# define OBJ_NAME_TYPE_UNDEF 0x00 -# define OBJ_NAME_TYPE_MD_METH 0x01 -# define OBJ_NAME_TYPE_CIPHER_METH 0x02 -# define OBJ_NAME_TYPE_PKEY_METH 0x03 -# define OBJ_NAME_TYPE_COMP_METH 0x04 -# define OBJ_NAME_TYPE_NUM 0x05 - -# define OBJ_NAME_ALIAS 0x8000 - -# define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01 -# define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02 - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct obj_name_st { - int type; - int alias; - const char *name; - const char *data; -} OBJ_NAME; - -# define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) - -int OBJ_NAME_init(void); -int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *), - int (*cmp_func) (const char *, const char *), - void (*free_func) (const char *, int, const char *)); -const char *OBJ_NAME_get(const char *name, int type); -int OBJ_NAME_add(const char *name, int type, const char *data); -int OBJ_NAME_remove(const char *name, int type); -void OBJ_NAME_cleanup(int type); /* -1 for everything */ -void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg), - void *arg); -void OBJ_NAME_do_all_sorted(int type, - void (*fn) (const OBJ_NAME *, void *arg), - void *arg); - -ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o); -ASN1_OBJECT *OBJ_nid2obj(int n); -const char *OBJ_nid2ln(int n); -const char *OBJ_nid2sn(int n); -int OBJ_obj2nid(const ASN1_OBJECT *o); -ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name); -int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); -int OBJ_txt2nid(const char *s); -int OBJ_ln2nid(const char *s); -int OBJ_sn2nid(const char *s); -int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b); -const void *OBJ_bsearch_(const void *key, const void *base, int num, int size, - int (*cmp) (const void *, const void *)); -const void *OBJ_bsearch_ex_(const void *key, const void *base, int num, - int size, - int (*cmp) (const void *, const void *), - int flags); - -# define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm) \ - static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \ - static int nm##_cmp(type1 const *, type2 const *); \ - scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) - -# define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \ - _DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp) -# define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ - type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) - -/*- - * Unsolved problem: if a type is actually a pointer type, like - * nid_triple is, then its impossible to get a const where you need - * it. Consider: - * - * typedef int nid_triple[3]; - * const void *a_; - * const nid_triple const *a = a_; - * - * The assignement discards a const because what you really want is: - * - * const int const * const *a = a_; - * - * But if you do that, you lose the fact that a is an array of 3 ints, - * which breaks comparison functions. - * - * Thus we end up having to cast, sadly, or unpack the - * declarations. Or, as I finally did in this case, delcare nid_triple - * to be a struct, which it should have been in the first place. - * - * Ben, August 2008. - * - * Also, strictly speaking not all types need be const, but handling - * the non-constness means a lot of complication, and in practice - * comparison routines do always not touch their arguments. - */ - -# define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm) \ - static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ - { \ - type1 const *a = a_; \ - type2 const *b = b_; \ - return nm##_cmp(a,b); \ - } \ - static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ - { \ - return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ - nm##_cmp_BSEARCH_CMP_FN); \ - } \ - extern void dummy_prototype(void) - -# define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ - static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ - { \ - type1 const *a = a_; \ - type2 const *b = b_; \ - return nm##_cmp(a,b); \ - } \ - type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ - { \ - return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ - nm##_cmp_BSEARCH_CMP_FN); \ - } \ - extern void dummy_prototype(void) - -# define OBJ_bsearch(type1,key,type2,base,num,cmp) \ - ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ - num,sizeof(type2), \ - ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ - (void)CHECKED_PTR_OF(type2,cmp##_type_2), \ - cmp##_BSEARCH_CMP_FN))) - -# define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags) \ - ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ - num,sizeof(type2), \ - ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ - (void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \ - cmp##_BSEARCH_CMP_FN)),flags) - -int OBJ_new_nid(int num); -int OBJ_add_object(const ASN1_OBJECT *obj); -int OBJ_create(const char *oid, const char *sn, const char *ln); -void OBJ_cleanup(void); -int OBJ_create_objects(BIO *in); - -int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); -int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); -int OBJ_add_sigid(int signid, int dig_id, int pkey_id); -void OBJ_sigid_free(void); - -extern int obj_cleanup_defer; -void check_defer(int nid); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_OBJ_strings(void); - -/* Error codes for the OBJ functions. */ - -/* Function codes. */ -# define OBJ_F_OBJ_ADD_OBJECT 105 -# define OBJ_F_OBJ_CREATE 100 -# define OBJ_F_OBJ_DUP 101 -# define OBJ_F_OBJ_NAME_NEW_INDEX 106 -# define OBJ_F_OBJ_NID2LN 102 -# define OBJ_F_OBJ_NID2OBJ 103 -# define OBJ_F_OBJ_NID2SN 104 - -/* Reason codes. */ -# define OBJ_R_MALLOC_FAILURE 100 -# define OBJ_R_UNKNOWN_NID 101 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OBJECTS_H +# define HEADER_OBJECTS_H + +# include +# include +# include +# include + +# define OBJ_NAME_TYPE_UNDEF 0x00 +# define OBJ_NAME_TYPE_MD_METH 0x01 +# define OBJ_NAME_TYPE_CIPHER_METH 0x02 +# define OBJ_NAME_TYPE_PKEY_METH 0x03 +# define OBJ_NAME_TYPE_COMP_METH 0x04 +# define OBJ_NAME_TYPE_NUM 0x05 + +# define OBJ_NAME_ALIAS 0x8000 + +# define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01 +# define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02 + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct obj_name_st { + int type; + int alias; + const char *name; + const char *data; +} OBJ_NAME; + +# define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) + +int OBJ_NAME_init(void); +int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *), + int (*cmp_func) (const char *, const char *), + void (*free_func) (const char *, int, const char *)); +const char *OBJ_NAME_get(const char *name, int type); +int OBJ_NAME_add(const char *name, int type, const char *data); +int OBJ_NAME_remove(const char *name, int type); +void OBJ_NAME_cleanup(int type); /* -1 for everything */ +void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg), + void *arg); +void OBJ_NAME_do_all_sorted(int type, + void (*fn) (const OBJ_NAME *, void *arg), + void *arg); + +ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o); +ASN1_OBJECT *OBJ_nid2obj(int n); +const char *OBJ_nid2ln(int n); +const char *OBJ_nid2sn(int n); +int OBJ_obj2nid(const ASN1_OBJECT *o); +ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name); +int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); +int OBJ_txt2nid(const char *s); +int OBJ_ln2nid(const char *s); +int OBJ_sn2nid(const char *s); +int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b); +const void *OBJ_bsearch_(const void *key, const void *base, int num, int size, + int (*cmp) (const void *, const void *)); +const void *OBJ_bsearch_ex_(const void *key, const void *base, int num, + int size, + int (*cmp) (const void *, const void *), + int flags); + +# define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm) \ + static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \ + static int nm##_cmp(type1 const *, type2 const *); \ + scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) + +# define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \ + _DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp) +# define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ + type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) + +/*- + * Unsolved problem: if a type is actually a pointer type, like + * nid_triple is, then its impossible to get a const where you need + * it. Consider: + * + * typedef int nid_triple[3]; + * const void *a_; + * const nid_triple const *a = a_; + * + * The assignment discards a const because what you really want is: + * + * const int const * const *a = a_; + * + * But if you do that, you lose the fact that a is an array of 3 ints, + * which breaks comparison functions. + * + * Thus we end up having to cast, sadly, or unpack the + * declarations. Or, as I finally did in this case, declare nid_triple + * to be a struct, which it should have been in the first place. + * + * Ben, August 2008. + * + * Also, strictly speaking not all types need be const, but handling + * the non-constness means a lot of complication, and in practice + * comparison routines do always not touch their arguments. + */ + +# define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm) \ + static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ + { \ + type1 const *a = a_; \ + type2 const *b = b_; \ + return nm##_cmp(a,b); \ + } \ + static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ + { \ + return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ + nm##_cmp_BSEARCH_CMP_FN); \ + } \ + extern void dummy_prototype(void) + +# define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ + static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ + { \ + type1 const *a = a_; \ + type2 const *b = b_; \ + return nm##_cmp(a,b); \ + } \ + type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ + { \ + return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ + nm##_cmp_BSEARCH_CMP_FN); \ + } \ + extern void dummy_prototype(void) + +# define OBJ_bsearch(type1,key,type2,base,num,cmp) \ + ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ + num,sizeof(type2), \ + ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ + (void)CHECKED_PTR_OF(type2,cmp##_type_2), \ + cmp##_BSEARCH_CMP_FN))) + +# define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags) \ + ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ + num,sizeof(type2), \ + ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ + (void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \ + cmp##_BSEARCH_CMP_FN)),flags) + +int OBJ_new_nid(int num); +int OBJ_add_object(const ASN1_OBJECT *obj); +int OBJ_create(const char *oid, const char *sn, const char *ln); +#if OPENSSL_API_COMPAT < 0x10100000L +# define OBJ_cleanup() while(0) continue +#endif +int OBJ_create_objects(BIO *in); + +size_t OBJ_length(const ASN1_OBJECT *obj); +const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); + +int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); +int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); +int OBJ_add_sigid(int signid, int dig_id, int pkey_id); +void OBJ_sigid_free(void); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/objectserr.h b/src/Mayaqua/win32_inc/openssl/objectserr.h new file mode 100644 index 00000000..02e166f1 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/objectserr.h @@ -0,0 +1,42 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OBJERR_H +# define HEADER_OBJERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_OBJ_strings(void); + +/* + * OBJ function codes. + */ +# define OBJ_F_OBJ_ADD_OBJECT 105 +# define OBJ_F_OBJ_ADD_SIGID 107 +# define OBJ_F_OBJ_CREATE 100 +# define OBJ_F_OBJ_DUP 101 +# define OBJ_F_OBJ_NAME_NEW_INDEX 106 +# define OBJ_F_OBJ_NID2LN 102 +# define OBJ_F_OBJ_NID2OBJ 103 +# define OBJ_F_OBJ_NID2SN 104 +# define OBJ_F_OBJ_TXT2OBJ 108 + +/* + * OBJ reason codes. + */ +# define OBJ_R_OID_EXISTS 102 +# define OBJ_R_UNKNOWN_NID 101 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ocsp.h b/src/Mayaqua/win32_inc/openssl/ocsp.h index cc6f44dc..8582fe1e 100644 --- a/src/Mayaqua/win32_inc/openssl/ocsp.h +++ b/src/Mayaqua/win32_inc/openssl/ocsp.h @@ -1,637 +1,352 @@ -/* ocsp.h */ -/* - * Written by Tom Titchener for the OpenSSL - * project. - */ - -/* - * History: This file was transfered to Richard Levitte from CertCo by Kathy - * Weinhold in mid-spring 2000 to be included in OpenSSL or released as a - * patch kit. - */ - -/* ==================================================================== - * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_OCSP_H -# define HEADER_OCSP_H - -# include -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Various flags and values */ - -# define OCSP_DEFAULT_NONCE_LENGTH 16 - -# define OCSP_NOCERTS 0x1 -# define OCSP_NOINTERN 0x2 -# define OCSP_NOSIGS 0x4 -# define OCSP_NOCHAIN 0x8 -# define OCSP_NOVERIFY 0x10 -# define OCSP_NOEXPLICIT 0x20 -# define OCSP_NOCASIGN 0x40 -# define OCSP_NODELEGATED 0x80 -# define OCSP_NOCHECKS 0x100 -# define OCSP_TRUSTOTHER 0x200 -# define OCSP_RESPID_KEY 0x400 -# define OCSP_NOTIME 0x800 - -/*- CertID ::= SEQUENCE { - * hashAlgorithm AlgorithmIdentifier, - * issuerNameHash OCTET STRING, -- Hash of Issuer's DN - * issuerKeyHash OCTET STRING, -- Hash of Issuers public key (excluding the tag & length fields) - * serialNumber CertificateSerialNumber } - */ -typedef struct ocsp_cert_id_st { - X509_ALGOR *hashAlgorithm; - ASN1_OCTET_STRING *issuerNameHash; - ASN1_OCTET_STRING *issuerKeyHash; - ASN1_INTEGER *serialNumber; -} OCSP_CERTID; - -DECLARE_STACK_OF(OCSP_CERTID) - -/*- Request ::= SEQUENCE { - * reqCert CertID, - * singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_one_request_st { - OCSP_CERTID *reqCert; - STACK_OF(X509_EXTENSION) *singleRequestExtensions; -} OCSP_ONEREQ; - -DECLARE_STACK_OF(OCSP_ONEREQ) -DECLARE_ASN1_SET_OF(OCSP_ONEREQ) - -/*- TBSRequest ::= SEQUENCE { - * version [0] EXPLICIT Version DEFAULT v1, - * requestorName [1] EXPLICIT GeneralName OPTIONAL, - * requestList SEQUENCE OF Request, - * requestExtensions [2] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_req_info_st { - ASN1_INTEGER *version; - GENERAL_NAME *requestorName; - STACK_OF(OCSP_ONEREQ) *requestList; - STACK_OF(X509_EXTENSION) *requestExtensions; -} OCSP_REQINFO; - -/*- Signature ::= SEQUENCE { - * signatureAlgorithm AlgorithmIdentifier, - * signature BIT STRING, - * certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - */ -typedef struct ocsp_signature_st { - X509_ALGOR *signatureAlgorithm; - ASN1_BIT_STRING *signature; - STACK_OF(X509) *certs; -} OCSP_SIGNATURE; - -/*- OCSPRequest ::= SEQUENCE { - * tbsRequest TBSRequest, - * optionalSignature [0] EXPLICIT Signature OPTIONAL } - */ -typedef struct ocsp_request_st { - OCSP_REQINFO *tbsRequest; - OCSP_SIGNATURE *optionalSignature; /* OPTIONAL */ -} OCSP_REQUEST; - -/*- OCSPResponseStatus ::= ENUMERATED { - * successful (0), --Response has valid confirmations - * malformedRequest (1), --Illegal confirmation request - * internalError (2), --Internal error in issuer - * tryLater (3), --Try again later - * --(4) is not used - * sigRequired (5), --Must sign the request - * unauthorized (6) --Request unauthorized - * } - */ -# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0 -# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1 -# define OCSP_RESPONSE_STATUS_INTERNALERROR 2 -# define OCSP_RESPONSE_STATUS_TRYLATER 3 -# define OCSP_RESPONSE_STATUS_SIGREQUIRED 5 -# define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6 - -/*- ResponseBytes ::= SEQUENCE { - * responseType OBJECT IDENTIFIER, - * response OCTET STRING } - */ -typedef struct ocsp_resp_bytes_st { - ASN1_OBJECT *responseType; - ASN1_OCTET_STRING *response; -} OCSP_RESPBYTES; - -/*- OCSPResponse ::= SEQUENCE { - * responseStatus OCSPResponseStatus, - * responseBytes [0] EXPLICIT ResponseBytes OPTIONAL } - */ -struct ocsp_response_st { - ASN1_ENUMERATED *responseStatus; - OCSP_RESPBYTES *responseBytes; -}; - -/*- ResponderID ::= CHOICE { - * byName [1] Name, - * byKey [2] KeyHash } - */ -# define V_OCSP_RESPID_NAME 0 -# define V_OCSP_RESPID_KEY 1 -struct ocsp_responder_id_st { - int type; - union { - X509_NAME *byName; - ASN1_OCTET_STRING *byKey; - } value; -}; - -DECLARE_STACK_OF(OCSP_RESPID) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) - -/*- KeyHash ::= OCTET STRING --SHA-1 hash of responder's public key - * --(excluding the tag and length fields) - */ - -/*- RevokedInfo ::= SEQUENCE { - * revocationTime GeneralizedTime, - * revocationReason [0] EXPLICIT CRLReason OPTIONAL } - */ -typedef struct ocsp_revoked_info_st { - ASN1_GENERALIZEDTIME *revocationTime; - ASN1_ENUMERATED *revocationReason; -} OCSP_REVOKEDINFO; - -/*- CertStatus ::= CHOICE { - * good [0] IMPLICIT NULL, - * revoked [1] IMPLICIT RevokedInfo, - * unknown [2] IMPLICIT UnknownInfo } - */ -# define V_OCSP_CERTSTATUS_GOOD 0 -# define V_OCSP_CERTSTATUS_REVOKED 1 -# define V_OCSP_CERTSTATUS_UNKNOWN 2 -typedef struct ocsp_cert_status_st { - int type; - union { - ASN1_NULL *good; - OCSP_REVOKEDINFO *revoked; - ASN1_NULL *unknown; - } value; -} OCSP_CERTSTATUS; - -/*- SingleResponse ::= SEQUENCE { - * certID CertID, - * certStatus CertStatus, - * thisUpdate GeneralizedTime, - * nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL, - * singleExtensions [1] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_single_response_st { - OCSP_CERTID *certId; - OCSP_CERTSTATUS *certStatus; - ASN1_GENERALIZEDTIME *thisUpdate; - ASN1_GENERALIZEDTIME *nextUpdate; - STACK_OF(X509_EXTENSION) *singleExtensions; -} OCSP_SINGLERESP; - -DECLARE_STACK_OF(OCSP_SINGLERESP) -DECLARE_ASN1_SET_OF(OCSP_SINGLERESP) - -/*- ResponseData ::= SEQUENCE { - * version [0] EXPLICIT Version DEFAULT v1, - * responderID ResponderID, - * producedAt GeneralizedTime, - * responses SEQUENCE OF SingleResponse, - * responseExtensions [1] EXPLICIT Extensions OPTIONAL } - */ -typedef struct ocsp_response_data_st { - ASN1_INTEGER *version; - OCSP_RESPID *responderId; - ASN1_GENERALIZEDTIME *producedAt; - STACK_OF(OCSP_SINGLERESP) *responses; - STACK_OF(X509_EXTENSION) *responseExtensions; -} OCSP_RESPDATA; - -/*- BasicOCSPResponse ::= SEQUENCE { - * tbsResponseData ResponseData, - * signatureAlgorithm AlgorithmIdentifier, - * signature BIT STRING, - * certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - */ - /* - * Note 1: The value for "signature" is specified in the OCSP rfc2560 as - * follows: "The value for the signature SHALL be computed on the hash of - * the DER encoding ResponseData." This means that you must hash the - * DER-encoded tbsResponseData, and then run it through a crypto-signing - * function, which will (at least w/RSA) do a hash-'n'-private-encrypt - * operation. This seems a bit odd, but that's the spec. Also note that - * the data structures do not leave anywhere to independently specify the - * algorithm used for the initial hash. So, we look at the - * signature-specification algorithm, and try to do something intelligent. - * -- Kathy Weinhold, CertCo - */ - /* - * Note 2: It seems that the mentioned passage from RFC 2560 (section - * 4.2.1) is open for interpretation. I've done tests against another - * responder, and found that it doesn't do the double hashing that the RFC - * seems to say one should. Therefore, all relevant functions take a flag - * saying which variant should be used. -- Richard Levitte, OpenSSL team - * and CeloCom - */ -typedef struct ocsp_basic_response_st { - OCSP_RESPDATA *tbsResponseData; - X509_ALGOR *signatureAlgorithm; - ASN1_BIT_STRING *signature; - STACK_OF(X509) *certs; -} OCSP_BASICRESP; - -/*- - * CRLReason ::= ENUMERATED { - * unspecified (0), - * keyCompromise (1), - * cACompromise (2), - * affiliationChanged (3), - * superseded (4), - * cessationOfOperation (5), - * certificateHold (6), - * removeFromCRL (8) } - */ -# define OCSP_REVOKED_STATUS_NOSTATUS -1 -# define OCSP_REVOKED_STATUS_UNSPECIFIED 0 -# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1 -# define OCSP_REVOKED_STATUS_CACOMPROMISE 2 -# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3 -# define OCSP_REVOKED_STATUS_SUPERSEDED 4 -# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5 -# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6 -# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8 - -/*- - * CrlID ::= SEQUENCE { - * crlUrl [0] EXPLICIT IA5String OPTIONAL, - * crlNum [1] EXPLICIT INTEGER OPTIONAL, - * crlTime [2] EXPLICIT GeneralizedTime OPTIONAL } - */ -typedef struct ocsp_crl_id_st { - ASN1_IA5STRING *crlUrl; - ASN1_INTEGER *crlNum; - ASN1_GENERALIZEDTIME *crlTime; -} OCSP_CRLID; - -/*- - * ServiceLocator ::= SEQUENCE { - * issuer Name, - * locator AuthorityInfoAccessSyntax OPTIONAL } - */ -typedef struct ocsp_service_locator_st { - X509_NAME *issuer; - STACK_OF(ACCESS_DESCRIPTION) *locator; -} OCSP_SERVICELOC; - -# define PEM_STRING_OCSP_REQUEST "OCSP REQUEST" -# define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE" - -# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p) - -# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p) - -# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \ - (char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,bp,(char **)x,cb,NULL) - -# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb)(OCSP_RESPONSE *)PEM_ASN1_read_bio(\ - (char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,bp,(char **)x,cb,NULL) - -# define PEM_write_bio_OCSP_REQUEST(bp,o) \ - PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\ - bp,(char *)o, NULL,NULL,0,NULL,NULL) - -# define PEM_write_bio_OCSP_RESPONSE(bp,o) \ - PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\ - bp,(char *)o, NULL,NULL,0,NULL,NULL) - -# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o) - -# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o) - -# define OCSP_REQUEST_sign(o,pkey,md) \ - ASN1_item_sign(ASN1_ITEM_rptr(OCSP_REQINFO),\ - o->optionalSignature->signatureAlgorithm,NULL,\ - o->optionalSignature->signature,o->tbsRequest,pkey,md) - -# define OCSP_BASICRESP_sign(o,pkey,md,d) \ - ASN1_item_sign(ASN1_ITEM_rptr(OCSP_RESPDATA),o->signatureAlgorithm,NULL,\ - o->signature,o->tbsResponseData,pkey,md) - -# define OCSP_REQUEST_verify(a,r) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_REQINFO),\ - a->optionalSignature->signatureAlgorithm,\ - a->optionalSignature->signature,a->tbsRequest,r) - -# define OCSP_BASICRESP_verify(a,r,d) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_RESPDATA),\ - a->signatureAlgorithm,a->signature,a->tbsResponseData,r) - -# define ASN1_BIT_STRING_digest(data,type,md,len) \ - ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len) - -# define OCSP_CERTSTATUS_dup(cs)\ - (OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\ - (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs)) - -OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); - -OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req); -OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, - int maxline); -int OCSP_REQ_CTX_nbio(OCSP_REQ_CTX *rctx); -int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); -OCSP_REQ_CTX *OCSP_REQ_CTX_new(BIO *io, int maxline); -void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); -void OCSP_set_max_response_length(OCSP_REQ_CTX *rctx, unsigned long len); -int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it, - ASN1_VALUE *val); -int OCSP_REQ_CTX_nbio_d2i(OCSP_REQ_CTX *rctx, ASN1_VALUE **pval, - const ASN1_ITEM *it); -BIO *OCSP_REQ_CTX_get0_mem_bio(OCSP_REQ_CTX *rctx); -int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it, - ASN1_VALUE *val); -int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, const char *op, const char *path); -int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req); -int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, - const char *name, const char *value); - -OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer); - -OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, - X509_NAME *issuerName, - ASN1_BIT_STRING *issuerKey, - ASN1_INTEGER *serialNumber); - -OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid); - -int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len); -int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len); -int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs); -int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req); - -int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm); -int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert); - -int OCSP_request_sign(OCSP_REQUEST *req, - X509 *signer, - EVP_PKEY *key, - const EVP_MD *dgst, - STACK_OF(X509) *certs, unsigned long flags); - -int OCSP_response_status(OCSP_RESPONSE *resp); -OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); - -int OCSP_resp_count(OCSP_BASICRESP *bs); -OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); -int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last); -int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, - ASN1_GENERALIZEDTIME **revtime, - ASN1_GENERALIZEDTIME **thisupd, - ASN1_GENERALIZEDTIME **nextupd); -int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, - int *reason, - ASN1_GENERALIZEDTIME **revtime, - ASN1_GENERALIZEDTIME **thisupd, - ASN1_GENERALIZEDTIME **nextupd); -int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, - ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec); - -int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, - X509_STORE *store, unsigned long flags); - -int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, - int *pssl); - -int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b); -int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); - -int OCSP_request_onereq_count(OCSP_REQUEST *req); -OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i); -OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one); -int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, - ASN1_OCTET_STRING **pikeyHash, - ASN1_INTEGER **pserial, OCSP_CERTID *cid); -int OCSP_request_is_signed(OCSP_REQUEST *req); -OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs); -OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp, - OCSP_CERTID *cid, - int status, int reason, - ASN1_TIME *revtime, - ASN1_TIME *thisupd, - ASN1_TIME *nextupd); -int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert); -int OCSP_basic_sign(OCSP_BASICRESP *brsp, - X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, - STACK_OF(X509) *certs, unsigned long flags); - -X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); - -X509_EXTENSION *OCSP_accept_responses_new(char **oids); - -X509_EXTENSION *OCSP_archive_cutoff_new(char *tim); - -X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, char **urls); - -int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); -int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); -int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, ASN1_OBJECT *obj, - int lastpos); -int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos); -X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc); -X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc); -void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, - int *idx); -int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, - unsigned long flags); -int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc); - -int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x); -int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos); -int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, ASN1_OBJECT *obj, int lastpos); -int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos); -X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc); -X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc); -void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx); -int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, - unsigned long flags); -int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc); - -int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x); -int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos); -int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, ASN1_OBJECT *obj, - int lastpos); -int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, - int lastpos); -X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc); -X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc); -void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, - int *idx); -int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, - int crit, unsigned long flags); -int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc); - -int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x); -int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos); -int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, ASN1_OBJECT *obj, - int lastpos); -int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, - int lastpos); -X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc); -X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc); -void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, - int *idx); -int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, - int crit, unsigned long flags); -int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc); - -DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP) -DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS) -DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO) -DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE) -DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES) -DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ) -DECLARE_ASN1_FUNCTIONS(OCSP_CERTID) -DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST) -DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE) -DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO) -DECLARE_ASN1_FUNCTIONS(OCSP_CRLID) -DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC) - -const char *OCSP_response_status_str(long s); -const char *OCSP_cert_status_str(long s); -const char *OCSP_crl_reason_str(long s); - -int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags); -int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags); - -int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, - X509_STORE *st, unsigned long flags); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_OCSP_strings(void); - -/* Error codes for the OCSP functions. */ - -/* Function codes. */ -# define OCSP_F_ASN1_STRING_ENCODE 100 -# define OCSP_F_D2I_OCSP_NONCE 102 -# define OCSP_F_OCSP_BASIC_ADD1_STATUS 103 -# define OCSP_F_OCSP_BASIC_SIGN 104 -# define OCSP_F_OCSP_BASIC_VERIFY 105 -# define OCSP_F_OCSP_CERT_ID_NEW 101 -# define OCSP_F_OCSP_CHECK_DELEGATED 106 -# define OCSP_F_OCSP_CHECK_IDS 107 -# define OCSP_F_OCSP_CHECK_ISSUER 108 -# define OCSP_F_OCSP_CHECK_VALIDITY 115 -# define OCSP_F_OCSP_MATCH_ISSUERID 109 -# define OCSP_F_OCSP_PARSE_URL 114 -# define OCSP_F_OCSP_REQUEST_SIGN 110 -# define OCSP_F_OCSP_REQUEST_VERIFY 116 -# define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111 -# define OCSP_F_OCSP_SENDREQ_BIO 112 -# define OCSP_F_OCSP_SENDREQ_NBIO 117 -# define OCSP_F_PARSE_HTTP_LINE1 118 -# define OCSP_F_REQUEST_VERIFY 113 - -/* Reason codes. */ -# define OCSP_R_BAD_DATA 100 -# define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 -# define OCSP_R_DIGEST_ERR 102 -# define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 -# define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 -# define OCSP_R_ERROR_PARSING_URL 121 -# define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 -# define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 -# define OCSP_R_NOT_BASIC_RESPONSE 104 -# define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 -# define OCSP_R_NO_CONTENT 106 -# define OCSP_R_NO_PUBLIC_KEY 107 -# define OCSP_R_NO_RESPONSE_DATA 108 -# define OCSP_R_NO_REVOKED_TIME 109 -# define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 -# define OCSP_R_REQUEST_NOT_SIGNED 128 -# define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 -# define OCSP_R_ROOT_CA_NOT_TRUSTED 112 -# define OCSP_R_SERVER_READ_ERROR 113 -# define OCSP_R_SERVER_RESPONSE_ERROR 114 -# define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 115 -# define OCSP_R_SERVER_WRITE_ERROR 116 -# define OCSP_R_SIGNATURE_FAILURE 117 -# define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 -# define OCSP_R_STATUS_EXPIRED 125 -# define OCSP_R_STATUS_NOT_YET_VALID 126 -# define OCSP_R_STATUS_TOO_OLD 127 -# define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 -# define OCSP_R_UNKNOWN_NID 120 -# define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OCSP_H +# define HEADER_OCSP_H + +#include + +/* + * These definitions are outside the OPENSSL_NO_OCSP guard because although for + * historical reasons they have OCSP_* names, they can actually be used + * independently of OCSP. E.g. see RFC5280 + */ +/*- + * CRLReason ::= ENUMERATED { + * unspecified (0), + * keyCompromise (1), + * cACompromise (2), + * affiliationChanged (3), + * superseded (4), + * cessationOfOperation (5), + * certificateHold (6), + * removeFromCRL (8) } + */ +# define OCSP_REVOKED_STATUS_NOSTATUS -1 +# define OCSP_REVOKED_STATUS_UNSPECIFIED 0 +# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1 +# define OCSP_REVOKED_STATUS_CACOMPROMISE 2 +# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3 +# define OCSP_REVOKED_STATUS_SUPERSEDED 4 +# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5 +# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6 +# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8 + + +# ifndef OPENSSL_NO_OCSP + +# include +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Various flags and values */ + +# define OCSP_DEFAULT_NONCE_LENGTH 16 + +# define OCSP_NOCERTS 0x1 +# define OCSP_NOINTERN 0x2 +# define OCSP_NOSIGS 0x4 +# define OCSP_NOCHAIN 0x8 +# define OCSP_NOVERIFY 0x10 +# define OCSP_NOEXPLICIT 0x20 +# define OCSP_NOCASIGN 0x40 +# define OCSP_NODELEGATED 0x80 +# define OCSP_NOCHECKS 0x100 +# define OCSP_TRUSTOTHER 0x200 +# define OCSP_RESPID_KEY 0x400 +# define OCSP_NOTIME 0x800 + +typedef struct ocsp_cert_id_st OCSP_CERTID; + +DEFINE_STACK_OF(OCSP_CERTID) + +typedef struct ocsp_one_request_st OCSP_ONEREQ; + +DEFINE_STACK_OF(OCSP_ONEREQ) + +typedef struct ocsp_req_info_st OCSP_REQINFO; +typedef struct ocsp_signature_st OCSP_SIGNATURE; +typedef struct ocsp_request_st OCSP_REQUEST; + +# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0 +# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1 +# define OCSP_RESPONSE_STATUS_INTERNALERROR 2 +# define OCSP_RESPONSE_STATUS_TRYLATER 3 +# define OCSP_RESPONSE_STATUS_SIGREQUIRED 5 +# define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6 + +typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES; + +# define V_OCSP_RESPID_NAME 0 +# define V_OCSP_RESPID_KEY 1 + +DEFINE_STACK_OF(OCSP_RESPID) + +typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO; + +# define V_OCSP_CERTSTATUS_GOOD 0 +# define V_OCSP_CERTSTATUS_REVOKED 1 +# define V_OCSP_CERTSTATUS_UNKNOWN 2 + +typedef struct ocsp_cert_status_st OCSP_CERTSTATUS; +typedef struct ocsp_single_response_st OCSP_SINGLERESP; + +DEFINE_STACK_OF(OCSP_SINGLERESP) + +typedef struct ocsp_response_data_st OCSP_RESPDATA; + +typedef struct ocsp_basic_response_st OCSP_BASICRESP; + +typedef struct ocsp_crl_id_st OCSP_CRLID; +typedef struct ocsp_service_locator_st OCSP_SERVICELOC; + +# define PEM_STRING_OCSP_REQUEST "OCSP REQUEST" +# define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE" + +# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p) + +# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p) + +# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \ + (char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \ + bp,(char **)(x),cb,NULL) + +# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb)(OCSP_RESPONSE *)PEM_ASN1_read_bio(\ + (char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \ + bp,(char **)(x),cb,NULL) + +# define PEM_write_bio_OCSP_REQUEST(bp,o) \ + PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\ + bp,(char *)(o), NULL,NULL,0,NULL,NULL) + +# define PEM_write_bio_OCSP_RESPONSE(bp,o) \ + PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\ + bp,(char *)(o), NULL,NULL,0,NULL,NULL) + +# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o) + +# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o) + +# define ASN1_BIT_STRING_digest(data,type,md,len) \ + ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len) + +# define OCSP_CERTSTATUS_dup(cs)\ + (OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\ + (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs)) + +OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); + +OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req); +OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, + int maxline); +int OCSP_REQ_CTX_nbio(OCSP_REQ_CTX *rctx); +int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); +OCSP_REQ_CTX *OCSP_REQ_CTX_new(BIO *io, int maxline); +void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); +void OCSP_set_max_response_length(OCSP_REQ_CTX *rctx, unsigned long len); +int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it, + ASN1_VALUE *val); +int OCSP_REQ_CTX_nbio_d2i(OCSP_REQ_CTX *rctx, ASN1_VALUE **pval, + const ASN1_ITEM *it); +BIO *OCSP_REQ_CTX_get0_mem_bio(OCSP_REQ_CTX *rctx); +int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, const char *op, const char *path); +int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req); +int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, + const char *name, const char *value); + +OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, + const X509 *issuer); + +OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, + const X509_NAME *issuerName, + const ASN1_BIT_STRING *issuerKey, + const ASN1_INTEGER *serialNumber); + +OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid); + +int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len); +int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len); +int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs); +int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req); + +int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm); +int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert); + +int OCSP_request_sign(OCSP_REQUEST *req, + X509 *signer, + EVP_PKEY *key, + const EVP_MD *dgst, + STACK_OF(X509) *certs, unsigned long flags); + +int OCSP_response_status(OCSP_RESPONSE *resp); +OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); + +const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs); +const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs); +const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs); +int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer, + STACK_OF(X509) *extra_certs); + +int OCSP_resp_count(OCSP_BASICRESP *bs); +OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); +const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs); +const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs); +int OCSP_resp_get0_id(const OCSP_BASICRESP *bs, + const ASN1_OCTET_STRING **pid, + const X509_NAME **pname); +int OCSP_resp_get1_id(const OCSP_BASICRESP *bs, + ASN1_OCTET_STRING **pid, + X509_NAME **pname); + +int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last); +int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, + ASN1_GENERALIZEDTIME **revtime, + ASN1_GENERALIZEDTIME **thisupd, + ASN1_GENERALIZEDTIME **nextupd); +int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, + int *reason, + ASN1_GENERALIZEDTIME **revtime, + ASN1_GENERALIZEDTIME **thisupd, + ASN1_GENERALIZEDTIME **nextupd); +int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, + ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec); + +int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, + X509_STORE *store, unsigned long flags); + +int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, + int *pssl); + +int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); +int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); + +int OCSP_request_onereq_count(OCSP_REQUEST *req); +OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i); +OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one); +int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, + ASN1_OCTET_STRING **pikeyHash, + ASN1_INTEGER **pserial, OCSP_CERTID *cid); +int OCSP_request_is_signed(OCSP_REQUEST *req); +OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs); +OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp, + OCSP_CERTID *cid, + int status, int reason, + ASN1_TIME *revtime, + ASN1_TIME *thisupd, + ASN1_TIME *nextupd); +int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert); +int OCSP_basic_sign(OCSP_BASICRESP *brsp, + X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, + STACK_OF(X509) *certs, unsigned long flags); +int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp, + X509 *signer, EVP_MD_CTX *ctx, + STACK_OF(X509) *certs, unsigned long flags); +int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert); +int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert); +int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert); + +X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim); + +X509_EXTENSION *OCSP_accept_responses_new(char **oids); + +X509_EXTENSION *OCSP_archive_cutoff_new(char *tim); + +X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, const char **urls); + +int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); +int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); +int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj, + int lastpos); +int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos); +X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc); +X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc); +void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, + int *idx); +int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, + unsigned long flags); +int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc); + +int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x); +int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos); +int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos); +int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos); +X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc); +X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc); +void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx); +int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, + unsigned long flags); +int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc); + +int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x); +int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos); +int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj, + int lastpos); +int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, + int lastpos); +X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc); +X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc); +void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, + int *idx); +int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, + int crit, unsigned long flags); +int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc); + +int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x); +int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos); +int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj, + int lastpos); +int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, + int lastpos); +X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc); +X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc); +void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, + int *idx); +int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, + int crit, unsigned long flags); +int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc); +const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x); + +DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP) +DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS) +DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO) +DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP) +DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA) +DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) +DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE) +DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES) +DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ) +DECLARE_ASN1_FUNCTIONS(OCSP_CERTID) +DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST) +DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE) +DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO) +DECLARE_ASN1_FUNCTIONS(OCSP_CRLID) +DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC) + +const char *OCSP_response_status_str(long s); +const char *OCSP_cert_status_str(long s); +const char *OCSP_crl_reason_str(long s); + +int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags); +int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags); + +int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, + X509_STORE *st, unsigned long flags); + + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ocsperr.h b/src/Mayaqua/win32_inc/openssl/ocsperr.h new file mode 100644 index 00000000..8dd9e01a --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/ocsperr.h @@ -0,0 +1,78 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OCSPERR_H +# define HEADER_OCSPERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_OCSP + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_OCSP_strings(void); + +/* + * OCSP function codes. + */ +# define OCSP_F_D2I_OCSP_NONCE 102 +# define OCSP_F_OCSP_BASIC_ADD1_STATUS 103 +# define OCSP_F_OCSP_BASIC_SIGN 104 +# define OCSP_F_OCSP_BASIC_SIGN_CTX 119 +# define OCSP_F_OCSP_BASIC_VERIFY 105 +# define OCSP_F_OCSP_CERT_ID_NEW 101 +# define OCSP_F_OCSP_CHECK_DELEGATED 106 +# define OCSP_F_OCSP_CHECK_IDS 107 +# define OCSP_F_OCSP_CHECK_ISSUER 108 +# define OCSP_F_OCSP_CHECK_VALIDITY 115 +# define OCSP_F_OCSP_MATCH_ISSUERID 109 +# define OCSP_F_OCSP_PARSE_URL 114 +# define OCSP_F_OCSP_REQUEST_SIGN 110 +# define OCSP_F_OCSP_REQUEST_VERIFY 116 +# define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111 +# define OCSP_F_PARSE_HTTP_LINE1 118 + +/* + * OCSP reason codes. + */ +# define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 +# define OCSP_R_DIGEST_ERR 102 +# define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 +# define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 +# define OCSP_R_ERROR_PARSING_URL 121 +# define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 +# define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 +# define OCSP_R_NOT_BASIC_RESPONSE 104 +# define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 +# define OCSP_R_NO_RESPONSE_DATA 108 +# define OCSP_R_NO_REVOKED_TIME 109 +# define OCSP_R_NO_SIGNER_KEY 130 +# define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 +# define OCSP_R_REQUEST_NOT_SIGNED 128 +# define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 +# define OCSP_R_ROOT_CA_NOT_TRUSTED 112 +# define OCSP_R_SERVER_RESPONSE_ERROR 114 +# define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 115 +# define OCSP_R_SIGNATURE_FAILURE 117 +# define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 +# define OCSP_R_STATUS_EXPIRED 125 +# define OCSP_R_STATUS_NOT_YET_VALID 126 +# define OCSP_R_STATUS_TOO_OLD 127 +# define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 +# define OCSP_R_UNKNOWN_NID 120 +# define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/opensslconf.h b/src/Mayaqua/win32_inc/openssl/opensslconf.h index c905f130..99e2d974 100644 --- a/src/Mayaqua/win32_inc/openssl/opensslconf.h +++ b/src/Mayaqua/win32_inc/openssl/opensslconf.h @@ -1,30 +1,31 @@ -/* opensslconf.h */ -/* WARNING: Generated automatically from opensslconf.h.in by Configure. */ +/* + * WARNING: do not edit! + * Generated by makefile from include\openssl\opensslconf.h.in + * + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include #ifdef __cplusplus extern "C" { #endif -/* OpenSSL was configured with the following options: */ -#ifndef OPENSSL_SYSNAME_WIN32 -# define OPENSSL_SYSNAME_WIN32 -#endif -#ifndef OPENSSL_DOING_MAKEDEPEND +#ifdef OPENSSL_ALGORITHM_DEFINES +# error OPENSSL_ALGORITHM_DEFINES no longer supported +#endif -#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 -# define OPENSSL_NO_EC_NISTP_64_GCC_128 -#endif -#ifndef OPENSSL_NO_GMP -# define OPENSSL_NO_GMP -#endif -#ifndef OPENSSL_NO_JPAKE -# define OPENSSL_NO_JPAKE -#endif -#ifndef OPENSSL_NO_KRB5 -# define OPENSSL_NO_KRB5 -#endif -#ifndef OPENSSL_NO_LIBUNBOUND -# define OPENSSL_NO_LIBUNBOUND +/* + * OpenSSL was configured with the following options: + */ + +#ifndef OPENSSL_SYS_WIN32 +# define OPENSSL_SYS_WIN32 1 #endif #ifndef OPENSSL_NO_MD2 # define OPENSSL_NO_MD2 @@ -32,8 +33,53 @@ extern "C" { #ifndef OPENSSL_NO_RC5 # define OPENSSL_NO_RC5 #endif -#ifndef OPENSSL_NO_RFC3779 -# define OPENSSL_NO_RFC3779 +#ifndef OPENSSL_THREADS +# define OPENSSL_THREADS +#endif +#ifndef OPENSSL_RAND_SEED_OS +# define OPENSSL_RAND_SEED_OS +#endif +#ifndef OPENSSL_NO_AFALGENG +# define OPENSSL_NO_AFALGENG +#endif +#ifndef OPENSSL_NO_ASAN +# define OPENSSL_NO_ASAN +#endif +#ifndef OPENSSL_NO_ASYNC +# define OPENSSL_NO_ASYNC +#endif +#ifndef OPENSSL_NO_CRYPTO_MDEBUG +# define OPENSSL_NO_CRYPTO_MDEBUG +#endif +#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE +# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE +#endif +#ifndef OPENSSL_NO_DEVCRYPTOENG +# define OPENSSL_NO_DEVCRYPTOENG +#endif +#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 +# define OPENSSL_NO_EC_NISTP_64_GCC_128 +#endif +#ifndef OPENSSL_NO_EGD +# define OPENSSL_NO_EGD +#endif +#ifndef OPENSSL_NO_ENGINE +# define OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_EXTERNAL_TESTS +# define OPENSSL_NO_EXTERNAL_TESTS +#endif +#ifndef OPENSSL_NO_FUZZ_AFL +# define OPENSSL_NO_FUZZ_AFL +#endif +#ifndef OPENSSL_NO_FUZZ_LIBFUZZER +# define OPENSSL_NO_FUZZ_LIBFUZZER +#endif +#ifndef OPENSSL_NO_HEARTBEATS +# define OPENSSL_NO_HEARTBEATS +#endif +#ifndef OPENSSL_NO_MSAN +# define OPENSSL_NO_MSAN #endif #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP @@ -41,231 +87,112 @@ extern "C" { #ifndef OPENSSL_NO_SSL_TRACE # define OPENSSL_NO_SSL_TRACE #endif -#ifndef OPENSSL_NO_SSL2 -# define OPENSSL_NO_SSL2 -#endif -#ifndef OPENSSL_NO_STORE -# define OPENSSL_NO_STORE +#ifndef OPENSSL_NO_UBSAN +# define OPENSSL_NO_UBSAN #endif #ifndef OPENSSL_NO_UNIT_TEST # define OPENSSL_NO_UNIT_TEST #endif -#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS -# define OPENSSL_NO_WEAK_SSL_CIPHERS +#ifndef OPENSSL_NO_DYNAMIC_ENGINE +# define OPENSSL_NO_DYNAMIC_ENGINE +#endif +#ifndef OPENSSL_NO_AFALGENG +# define OPENSSL_NO_AFALGENG #endif -#endif /* OPENSSL_DOING_MAKEDEPEND */ -#ifndef OPENSSL_THREADS -# define OPENSSL_THREADS -#endif +/* + * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers + * don't like that. This will hopefully silence them. + */ +#define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy; -/* The OPENSSL_NO_* macros are also defined as NO_* if the application - asks for it. This is a transient feature that is provided for those - who haven't had the time to do the appropriate changes in their - applications. */ -#ifdef OPENSSL_ALGORITHM_DEFINES -# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128) -# define NO_EC_NISTP_64_GCC_128 -# endif -# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) -# define NO_GMP -# endif -# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) -# define NO_JPAKE -# endif -# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) -# define NO_KRB5 -# endif -# if defined(OPENSSL_NO_LIBUNBOUND) && !defined(NO_LIBUNBOUND) -# define NO_LIBUNBOUND -# endif -# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2) -# define NO_MD2 -# endif -# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5) -# define NO_RC5 -# endif -# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779) -# define NO_RFC3779 -# endif -# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) -# define NO_SCTP -# endif -# if defined(OPENSSL_NO_SSL_TRACE) && !defined(NO_SSL_TRACE) -# define NO_SSL_TRACE -# endif -# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) -# define NO_SSL2 -# endif -# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) -# define NO_STORE -# endif -# if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST) -# define NO_UNIT_TEST -# endif -# if defined(OPENSSL_NO_WEAK_SSL_CIPHERS) && !defined(NO_WEAK_SSL_CIPHERS) -# define NO_WEAK_SSL_CIPHERS +/* + * Applications should use -DOPENSSL_API_COMPAT= to suppress the + * declarations of functions deprecated in or before . Otherwise, they + * still won't see them if the library has been built to disable deprecated + * functions. + */ +#ifndef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f; +# ifdef __GNUC__ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif # endif #endif -#define OPENSSL_CPUID_OBJ +#ifndef OPENSSL_FILE +# ifdef OPENSSL_NO_FILENAMES +# define OPENSSL_FILE "" +# define OPENSSL_LINE 0 +# else +# define OPENSSL_FILE __FILE__ +# define OPENSSL_LINE __LINE__ +# endif +#endif -/* crypto/opensslconf.h.in */ +#ifndef OPENSSL_MIN_API +# define OPENSSL_MIN_API 0 +#endif + +#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API +# undef OPENSSL_API_COMPAT +# define OPENSSL_API_COMPAT OPENSSL_MIN_API +#endif + +/* + * Do not deprecate things to be deprecated in version 1.2.0 before the + * OpenSSL version number matches. + */ +#if OPENSSL_VERSION_NUMBER < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) f; +#elif OPENSSL_API_COMPAT < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_2_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x10100000L +# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_1_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x10000000L +# define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_0_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x00908000L +# define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_0_9_8(f) +#endif /* Generate 80386 code? */ #undef I386_ONLY -#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/local/ssl/lib/engines" -#define OPENSSLDIR "/usr/local/ssl" -#endif -#endif - #undef OPENSSL_UNISTD #define OPENSSL_UNISTD -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION #define OPENSSL_EXPORT_VAR_AS_FUNCTION -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ /* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; + * The following are cipher-specific, but are part of the public API. */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned long -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - +#if !defined(OPENSSL_SYS_UEFI) +# define BN_LLONG /* Only one for the following should be defined */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT +# undef SIXTY_FOUR_BIT_LONG +# undef SIXTY_FOUR_BIT +# define THIRTY_TWO_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif +#define RC4_INT unsigned int -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#undef DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( __sun ) || defined ( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ #ifdef __cplusplus } #endif diff --git a/src/Mayaqua/win32_inc/openssl/opensslconf.h.in b/src/Mayaqua/win32_inc/openssl/opensslconf.h.in new file mode 100644 index 00000000..bc98cad5 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/opensslconf.h.in @@ -0,0 +1,155 @@ +/* + * {- join("\n * ", @autowarntext) -} + * + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef OPENSSL_ALGORITHM_DEFINES +# error OPENSSL_ALGORITHM_DEFINES no longer supported +#endif + +/* + * OpenSSL was configured with the following options: + */ + +{- if (@{$config{openssl_sys_defines}}) { + foreach (@{$config{openssl_sys_defines}}) { + $OUT .= "#ifndef $_\n"; + $OUT .= "# define $_ 1\n"; + $OUT .= "#endif\n"; + } + } + foreach (@{$config{openssl_api_defines}}) { + (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/; + $OUT .= "#define $macro $value\n"; + } + if (@{$config{openssl_algorithm_defines}}) { + foreach (@{$config{openssl_algorithm_defines}}) { + $OUT .= "#ifndef $_\n"; + $OUT .= "# define $_\n"; + $OUT .= "#endif\n"; + } + } + if (@{$config{openssl_thread_defines}}) { + foreach (@{$config{openssl_thread_defines}}) { + $OUT .= "#ifndef $_\n"; + $OUT .= "# define $_\n"; + $OUT .= "#endif\n"; + } + } + if (@{$config{openssl_other_defines}}) { + foreach (@{$config{openssl_other_defines}}) { + $OUT .= "#ifndef $_\n"; + $OUT .= "# define $_\n"; + $OUT .= "#endif\n"; + } + } + ""; +-} + +/* + * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers + * don't like that. This will hopefully silence them. + */ +#define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy; + +/* + * Applications should use -DOPENSSL_API_COMPAT= to suppress the + * declarations of functions deprecated in or before . Otherwise, they + * still won't see them if the library has been built to disable deprecated + * functions. + */ +#ifndef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f; +# ifdef __GNUC__ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif +# endif +#endif + +#ifndef OPENSSL_FILE +# ifdef OPENSSL_NO_FILENAMES +# define OPENSSL_FILE "" +# define OPENSSL_LINE 0 +# else +# define OPENSSL_FILE __FILE__ +# define OPENSSL_LINE __LINE__ +# endif +#endif + +#ifndef OPENSSL_MIN_API +# define OPENSSL_MIN_API 0 +#endif + +#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API +# undef OPENSSL_API_COMPAT +# define OPENSSL_API_COMPAT OPENSSL_MIN_API +#endif + +/* + * Do not deprecate things to be deprecated in version 1.2.0 before the + * OpenSSL version number matches. + */ +#if OPENSSL_VERSION_NUMBER < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) f; +#elif OPENSSL_API_COMPAT < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_2_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x10100000L +# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_1_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x10000000L +# define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_0_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x00908000L +# define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_0_9_8(f) +#endif + +/* Generate 80386 code? */ +{- $config{processor} eq "386" ? "#define" : "#undef" -} I386_ONLY + +#undef OPENSSL_UNISTD +#define OPENSSL_UNISTD {- $target{unistd} -} + +{- $config{export_var_as_fn} ? "#define" : "#undef" -} OPENSSL_EXPORT_VAR_AS_FUNCTION + +/* + * The following are cipher-specific, but are part of the public API. + */ +#if !defined(OPENSSL_SYS_UEFI) +{- $config{bn_ll} ? "# define" : "# undef" -} BN_LLONG +/* Only one for the following should be defined */ +{- $config{b64l} ? "# define" : "# undef" -} SIXTY_FOUR_BIT_LONG +{- $config{b64} ? "# define" : "# undef" -} SIXTY_FOUR_BIT +{- $config{b32} ? "# define" : "# undef" -} THIRTY_TWO_BIT +#endif + +#define RC4_INT {- $config{rc4_int} -} + +#ifdef __cplusplus +} +#endif diff --git a/src/Mayaqua/win32_inc/openssl/opensslv.h b/src/Mayaqua/win32_inc/openssl/opensslv.h index 3fd92c5a..c28e632c 100644 --- a/src/Mayaqua/win32_inc/openssl/opensslv.h +++ b/src/Mayaqua/win32_inc/openssl/opensslv.h @@ -1,97 +1,101 @@ -#ifndef HEADER_OPENSSLV_H -# define HEADER_OPENSSLV_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*- - * Numeric release version identifier: - * MNNFFPPS: major minor fix patch status - * The status nibble has one of the values 0 for development, 1 to e for betas - * 1 to 14, and f for release. The patch level is exactly that. - * For example: - * 0.9.3-dev 0x00903000 - * 0.9.3-beta1 0x00903001 - * 0.9.3-beta2-dev 0x00903002 - * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) - * 0.9.3 0x0090300f - * 0.9.3a 0x0090301f - * 0.9.4 0x0090400f - * 1.2.3z 0x102031af - * - * For continuity reasons (because 0.9.5 is already out, and is coded - * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level - * part is slightly different, by setting the highest bit. This means - * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start - * with 0x0090600S... - * - * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) - * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for - * major minor fix final patch/beta) - */ -# define OPENSSL_VERSION_NUMBER 0x100020afL -# ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" -# else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j 26 Sep 2016" -# endif -# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT - -/*- - * The macros below are to be used for shared library (.so, .dll, ...) - * versioning. That kind of versioning works a bit differently between - * operating systems. The most usual scheme is to set a major and a minor - * number, and have the runtime loader check that the major number is equal - * to what it was at application link time, while the minor number has to - * be greater or equal to what it was at application link time. With this - * scheme, the version number is usually part of the file name, like this: - * - * libcrypto.so.0.9 - * - * Some unixen also make a softlink with the major verson number only: - * - * libcrypto.so.0 - * - * On Tru64 and IRIX 6.x it works a little bit differently. There, the - * shared library version is stored in the file, and is actually a series - * of versions, separated by colons. The rightmost version present in the - * library when linking an application is stored in the application to be - * matched at run time. When the application is run, a check is done to - * see if the library version stored in the application matches any of the - * versions in the version string of the library itself. - * This version string can be constructed in any way, depending on what - * kind of matching is desired. However, to implement the same scheme as - * the one used in the other unixen, all compatible versions, from lowest - * to highest, should be part of the string. Consecutive builds would - * give the following versions strings: - * - * 3.0 - * 3.0:3.1 - * 3.0:3.1:3.2 - * 4.0 - * 4.0:4.1 - * - * Notice how version 4 is completely incompatible with version, and - * therefore give the breach you can see. - * - * There may be other schemes as well that I haven't yet discovered. - * - * So, here's the way it works here: first of all, the library version - * number doesn't need at all to match the overall OpenSSL version. - * However, it's nice and more understandable if it actually does. - * The current library version is stored in the macro SHLIB_VERSION_NUMBER, - * which is just a piece of text in the format "M.m.e" (Major, minor, edit). - * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, - * we need to keep a history of version numbers, which is done in the - * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and - * should only keep the versions that are binary compatible with the current. - */ -# define SHLIB_VERSION_HISTORY "" -# define SHLIB_VERSION_NUMBER "1.0.0" - - -#ifdef __cplusplus -} -#endif -#endif /* HEADER_OPENSSLV_H */ +/* + * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OPENSSLV_H +# define HEADER_OPENSSLV_H + +#ifdef __cplusplus +extern "C" { +#endif + +/*- + * Numeric release version identifier: + * MNNFFPPS: major minor fix patch status + * The status nibble has one of the values 0 for development, 1 to e for betas + * 1 to 14, and f for release. The patch level is exactly that. + * For example: + * 0.9.3-dev 0x00903000 + * 0.9.3-beta1 0x00903001 + * 0.9.3-beta2-dev 0x00903002 + * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) + * 0.9.3 0x0090300f + * 0.9.3a 0x0090301f + * 0.9.4 0x0090400f + * 1.2.3z 0x102031af + * + * For continuity reasons (because 0.9.5 is already out, and is coded + * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level + * part is slightly different, by setting the highest bit. This means + * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start + * with 0x0090600S... + * + * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) + * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for + * major minor fix final patch/beta) + */ +# define OPENSSL_VERSION_NUMBER 0x1010104fL +# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1d 10 Sep 2019" + +/*- + * The macros below are to be used for shared library (.so, .dll, ...) + * versioning. That kind of versioning works a bit differently between + * operating systems. The most usual scheme is to set a major and a minor + * number, and have the runtime loader check that the major number is equal + * to what it was at application link time, while the minor number has to + * be greater or equal to what it was at application link time. With this + * scheme, the version number is usually part of the file name, like this: + * + * libcrypto.so.0.9 + * + * Some unixen also make a softlink with the major version number only: + * + * libcrypto.so.0 + * + * On Tru64 and IRIX 6.x it works a little bit differently. There, the + * shared library version is stored in the file, and is actually a series + * of versions, separated by colons. The rightmost version present in the + * library when linking an application is stored in the application to be + * matched at run time. When the application is run, a check is done to + * see if the library version stored in the application matches any of the + * versions in the version string of the library itself. + * This version string can be constructed in any way, depending on what + * kind of matching is desired. However, to implement the same scheme as + * the one used in the other unixen, all compatible versions, from lowest + * to highest, should be part of the string. Consecutive builds would + * give the following versions strings: + * + * 3.0 + * 3.0:3.1 + * 3.0:3.1:3.2 + * 4.0 + * 4.0:4.1 + * + * Notice how version 4 is completely incompatible with version, and + * therefore give the breach you can see. + * + * There may be other schemes as well that I haven't yet discovered. + * + * So, here's the way it works here: first of all, the library version + * number doesn't need at all to match the overall OpenSSL version. + * However, it's nice and more understandable if it actually does. + * The current library version is stored in the macro SHLIB_VERSION_NUMBER, + * which is just a piece of text in the format "M.m.e" (Major, minor, edit). + * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, + * we need to keep a history of version numbers, which is done in the + * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and + * should only keep the versions that are binary compatible with the current. + */ +# define SHLIB_VERSION_HISTORY "" +# define SHLIB_VERSION_NUMBER "1.1" + + +#ifdef __cplusplus +} +#endif +#endif /* HEADER_OPENSSLV_H */ diff --git a/src/Mayaqua/win32_inc/openssl/ossl_typ.h b/src/Mayaqua/win32_inc/openssl/ossl_typ.h index 707991ea..7993ca28 100644 --- a/src/Mayaqua/win32_inc/openssl/ossl_typ.h +++ b/src/Mayaqua/win32_inc/openssl/ossl_typ.h @@ -1,213 +1,196 @@ -/* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_OPENSSL_TYPES_H -# define HEADER_OPENSSL_TYPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -# include - -# ifdef NO_ASN1_TYPEDEFS -# define ASN1_INTEGER ASN1_STRING -# define ASN1_ENUMERATED ASN1_STRING -# define ASN1_BIT_STRING ASN1_STRING -# define ASN1_OCTET_STRING ASN1_STRING -# define ASN1_PRINTABLESTRING ASN1_STRING -# define ASN1_T61STRING ASN1_STRING -# define ASN1_IA5STRING ASN1_STRING -# define ASN1_UTCTIME ASN1_STRING -# define ASN1_GENERALIZEDTIME ASN1_STRING -# define ASN1_TIME ASN1_STRING -# define ASN1_GENERALSTRING ASN1_STRING -# define ASN1_UNIVERSALSTRING ASN1_STRING -# define ASN1_BMPSTRING ASN1_STRING -# define ASN1_VISIBLESTRING ASN1_STRING -# define ASN1_UTF8STRING ASN1_STRING -# define ASN1_BOOLEAN int -# define ASN1_NULL int -# else -typedef struct asn1_string_st ASN1_INTEGER; -typedef struct asn1_string_st ASN1_ENUMERATED; -typedef struct asn1_string_st ASN1_BIT_STRING; -typedef struct asn1_string_st ASN1_OCTET_STRING; -typedef struct asn1_string_st ASN1_PRINTABLESTRING; -typedef struct asn1_string_st ASN1_T61STRING; -typedef struct asn1_string_st ASN1_IA5STRING; -typedef struct asn1_string_st ASN1_GENERALSTRING; -typedef struct asn1_string_st ASN1_UNIVERSALSTRING; -typedef struct asn1_string_st ASN1_BMPSTRING; -typedef struct asn1_string_st ASN1_UTCTIME; -typedef struct asn1_string_st ASN1_TIME; -typedef struct asn1_string_st ASN1_GENERALIZEDTIME; -typedef struct asn1_string_st ASN1_VISIBLESTRING; -typedef struct asn1_string_st ASN1_UTF8STRING; -typedef struct asn1_string_st ASN1_STRING; -typedef int ASN1_BOOLEAN; -typedef int ASN1_NULL; -# endif - -typedef struct asn1_object_st ASN1_OBJECT; - -typedef struct ASN1_ITEM_st ASN1_ITEM; -typedef struct asn1_pctx_st ASN1_PCTX; - -# ifdef OPENSSL_SYS_WIN32 -# undef X509_NAME -# undef X509_EXTENSIONS -# undef X509_CERT_PAIR -# undef PKCS7_ISSUER_AND_SERIAL -# undef OCSP_REQUEST -# undef OCSP_RESPONSE -# endif - -# ifdef BIGNUM -# undef BIGNUM -# endif -typedef struct bignum_st BIGNUM; -typedef struct bignum_ctx BN_CTX; -typedef struct bn_blinding_st BN_BLINDING; -typedef struct bn_mont_ctx_st BN_MONT_CTX; -typedef struct bn_recp_ctx_st BN_RECP_CTX; -typedef struct bn_gencb_st BN_GENCB; - -typedef struct buf_mem_st BUF_MEM; - -typedef struct evp_cipher_st EVP_CIPHER; -typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; -typedef struct env_md_st EVP_MD; -typedef struct env_md_ctx_st EVP_MD_CTX; -typedef struct evp_pkey_st EVP_PKEY; - -typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; - -typedef struct evp_pkey_method_st EVP_PKEY_METHOD; -typedef struct evp_pkey_ctx_st EVP_PKEY_CTX; - -typedef struct dh_st DH; -typedef struct dh_method DH_METHOD; - -typedef struct dsa_st DSA; -typedef struct dsa_method DSA_METHOD; - -typedef struct rsa_st RSA; -typedef struct rsa_meth_st RSA_METHOD; - -typedef struct rand_meth_st RAND_METHOD; - -typedef struct ecdh_method ECDH_METHOD; -typedef struct ecdsa_method ECDSA_METHOD; - -typedef struct x509_st X509; -typedef struct X509_algor_st X509_ALGOR; -typedef struct X509_crl_st X509_CRL; -typedef struct x509_crl_method_st X509_CRL_METHOD; -typedef struct x509_revoked_st X509_REVOKED; -typedef struct X509_name_st X509_NAME; -typedef struct X509_pubkey_st X509_PUBKEY; -typedef struct x509_store_st X509_STORE; -typedef struct x509_store_ctx_st X509_STORE_CTX; - -typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO; - -typedef struct v3_ext_ctx X509V3_CTX; -typedef struct conf_st CONF; - -typedef struct store_st STORE; -typedef struct store_method_st STORE_METHOD; - -typedef struct ui_st UI; -typedef struct ui_method_st UI_METHOD; - -typedef struct st_ERR_FNS ERR_FNS; - -typedef struct engine_st ENGINE; -typedef struct ssl_st SSL; -typedef struct ssl_ctx_st SSL_CTX; - -typedef struct comp_method_st COMP_METHOD; - -typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; -typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; -typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; -typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; - -typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID; -typedef struct DIST_POINT_st DIST_POINT; -typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT; -typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS; - - /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */ -# define DECLARE_PKCS12_STACK_OF(type)/* Nothing */ -# define IMPLEMENT_PKCS12_STACK_OF(type)/* Nothing */ - -typedef struct crypto_ex_data_st CRYPTO_EX_DATA; -/* Callback types for crypto.h */ -typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int idx, long argl, void *argp); -typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, - void *from_d, int idx, long argl, void *argp); - -typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; -typedef struct ocsp_response_st OCSP_RESPONSE; -typedef struct ocsp_responder_id_st OCSP_RESPID; - -#ifdef __cplusplus -} -#endif -#endif /* def HEADER_OPENSSL_TYPES_H */ +/* + * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OPENSSL_TYPES_H +# define HEADER_OPENSSL_TYPES_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +# include + +# ifdef NO_ASN1_TYPEDEFS +# define ASN1_INTEGER ASN1_STRING +# define ASN1_ENUMERATED ASN1_STRING +# define ASN1_BIT_STRING ASN1_STRING +# define ASN1_OCTET_STRING ASN1_STRING +# define ASN1_PRINTABLESTRING ASN1_STRING +# define ASN1_T61STRING ASN1_STRING +# define ASN1_IA5STRING ASN1_STRING +# define ASN1_UTCTIME ASN1_STRING +# define ASN1_GENERALIZEDTIME ASN1_STRING +# define ASN1_TIME ASN1_STRING +# define ASN1_GENERALSTRING ASN1_STRING +# define ASN1_UNIVERSALSTRING ASN1_STRING +# define ASN1_BMPSTRING ASN1_STRING +# define ASN1_VISIBLESTRING ASN1_STRING +# define ASN1_UTF8STRING ASN1_STRING +# define ASN1_BOOLEAN int +# define ASN1_NULL int +# else +typedef struct asn1_string_st ASN1_INTEGER; +typedef struct asn1_string_st ASN1_ENUMERATED; +typedef struct asn1_string_st ASN1_BIT_STRING; +typedef struct asn1_string_st ASN1_OCTET_STRING; +typedef struct asn1_string_st ASN1_PRINTABLESTRING; +typedef struct asn1_string_st ASN1_T61STRING; +typedef struct asn1_string_st ASN1_IA5STRING; +typedef struct asn1_string_st ASN1_GENERALSTRING; +typedef struct asn1_string_st ASN1_UNIVERSALSTRING; +typedef struct asn1_string_st ASN1_BMPSTRING; +typedef struct asn1_string_st ASN1_UTCTIME; +typedef struct asn1_string_st ASN1_TIME; +typedef struct asn1_string_st ASN1_GENERALIZEDTIME; +typedef struct asn1_string_st ASN1_VISIBLESTRING; +typedef struct asn1_string_st ASN1_UTF8STRING; +typedef struct asn1_string_st ASN1_STRING; +typedef int ASN1_BOOLEAN; +typedef int ASN1_NULL; +# endif + +typedef struct asn1_object_st ASN1_OBJECT; + +typedef struct ASN1_ITEM_st ASN1_ITEM; +typedef struct asn1_pctx_st ASN1_PCTX; +typedef struct asn1_sctx_st ASN1_SCTX; + +# ifdef _WIN32 +# undef X509_NAME +# undef X509_EXTENSIONS +# undef PKCS7_ISSUER_AND_SERIAL +# undef PKCS7_SIGNER_INFO +# undef OCSP_REQUEST +# undef OCSP_RESPONSE +# endif + +# ifdef BIGNUM +# undef BIGNUM +# endif +struct dane_st; +typedef struct bio_st BIO; +typedef struct bignum_st BIGNUM; +typedef struct bignum_ctx BN_CTX; +typedef struct bn_blinding_st BN_BLINDING; +typedef struct bn_mont_ctx_st BN_MONT_CTX; +typedef struct bn_recp_ctx_st BN_RECP_CTX; +typedef struct bn_gencb_st BN_GENCB; + +typedef struct buf_mem_st BUF_MEM; + +typedef struct evp_cipher_st EVP_CIPHER; +typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; +typedef struct evp_md_st EVP_MD; +typedef struct evp_md_ctx_st EVP_MD_CTX; +typedef struct evp_pkey_st EVP_PKEY; + +typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; + +typedef struct evp_pkey_method_st EVP_PKEY_METHOD; +typedef struct evp_pkey_ctx_st EVP_PKEY_CTX; + +typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX; + +typedef struct hmac_ctx_st HMAC_CTX; + +typedef struct dh_st DH; +typedef struct dh_method DH_METHOD; + +typedef struct dsa_st DSA; +typedef struct dsa_method DSA_METHOD; + +typedef struct rsa_st RSA; +typedef struct rsa_meth_st RSA_METHOD; + +typedef struct ec_key_st EC_KEY; +typedef struct ec_key_method_st EC_KEY_METHOD; + +typedef struct rand_meth_st RAND_METHOD; +typedef struct rand_drbg_st RAND_DRBG; + +typedef struct ssl_dane_st SSL_DANE; +typedef struct x509_st X509; +typedef struct X509_algor_st X509_ALGOR; +typedef struct X509_crl_st X509_CRL; +typedef struct x509_crl_method_st X509_CRL_METHOD; +typedef struct x509_revoked_st X509_REVOKED; +typedef struct X509_name_st X509_NAME; +typedef struct X509_pubkey_st X509_PUBKEY; +typedef struct x509_store_st X509_STORE; +typedef struct x509_store_ctx_st X509_STORE_CTX; + +typedef struct x509_object_st X509_OBJECT; +typedef struct x509_lookup_st X509_LOOKUP; +typedef struct x509_lookup_method_st X509_LOOKUP_METHOD; +typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM; + +typedef struct x509_sig_info_st X509_SIG_INFO; + +typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO; + +typedef struct v3_ext_ctx X509V3_CTX; +typedef struct conf_st CONF; +typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS; + +typedef struct ui_st UI; +typedef struct ui_method_st UI_METHOD; + +typedef struct engine_st ENGINE; +typedef struct ssl_st SSL; +typedef struct ssl_ctx_st SSL_CTX; + +typedef struct comp_ctx_st COMP_CTX; +typedef struct comp_method_st COMP_METHOD; + +typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; +typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; +typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; +typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; + +typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID; +typedef struct DIST_POINT_st DIST_POINT; +typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT; +typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS; + +typedef struct crypto_ex_data_st CRYPTO_EX_DATA; + +typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; +typedef struct ocsp_response_st OCSP_RESPONSE; +typedef struct ocsp_responder_id_st OCSP_RESPID; + +typedef struct sct_st SCT; +typedef struct sct_ctx_st SCT_CTX; +typedef struct ctlog_st CTLOG; +typedef struct ctlog_store_st CTLOG_STORE; +typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX; + +typedef struct ossl_store_info_st OSSL_STORE_INFO; +typedef struct ossl_store_search_st OSSL_STORE_SEARCH; + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ + defined(INTMAX_MAX) && defined(UINTMAX_MAX) +typedef intmax_t ossl_intmax_t; +typedef uintmax_t ossl_uintmax_t; +#else +/* + * Not long long, because the C-library can only be expected to provide + * strtoll(), strtoull() at the same time as intmax_t and strtoimax(), + * strtoumax(). Since we use these for parsing arguments, we need the + * conversion functions, not just the sizes. + */ +typedef long ossl_intmax_t; +typedef unsigned long ossl_uintmax_t; +#endif + +#ifdef __cplusplus +} +#endif +#endif /* def HEADER_OPENSSL_TYPES_H */ diff --git a/src/Mayaqua/win32_inc/openssl/pem.h b/src/Mayaqua/win32_inc/openssl/pem.h index 8b0fc658..2ef5b5d0 100644 --- a/src/Mayaqua/win32_inc/openssl/pem.h +++ b/src/Mayaqua/win32_inc/openssl/pem.h @@ -1,617 +1,378 @@ -/* crypto/pem/pem.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_PEM_H -# define HEADER_PEM_H - -# include -# ifndef OPENSSL_NO_BIO -# include -# endif -# ifndef OPENSSL_NO_STACK -# include -# endif -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# define PEM_BUFSIZE 1024 - -# define PEM_OBJ_UNDEF 0 -# define PEM_OBJ_X509 1 -# define PEM_OBJ_X509_REQ 2 -# define PEM_OBJ_CRL 3 -# define PEM_OBJ_SSL_SESSION 4 -# define PEM_OBJ_PRIV_KEY 10 -# define PEM_OBJ_PRIV_RSA 11 -# define PEM_OBJ_PRIV_DSA 12 -# define PEM_OBJ_PRIV_DH 13 -# define PEM_OBJ_PUB_RSA 14 -# define PEM_OBJ_PUB_DSA 15 -# define PEM_OBJ_PUB_DH 16 -# define PEM_OBJ_DHPARAMS 17 -# define PEM_OBJ_DSAPARAMS 18 -# define PEM_OBJ_PRIV_RSA_PUBLIC 19 -# define PEM_OBJ_PRIV_ECDSA 20 -# define PEM_OBJ_PUB_ECDSA 21 -# define PEM_OBJ_ECPARAMETERS 22 - -# define PEM_ERROR 30 -# define PEM_DEK_DES_CBC 40 -# define PEM_DEK_IDEA_CBC 45 -# define PEM_DEK_DES_EDE 50 -# define PEM_DEK_DES_ECB 60 -# define PEM_DEK_RSA 70 -# define PEM_DEK_RSA_MD2 80 -# define PEM_DEK_RSA_MD5 90 - -# define PEM_MD_MD2 NID_md2 -# define PEM_MD_MD5 NID_md5 -# define PEM_MD_SHA NID_sha -# define PEM_MD_MD2_RSA NID_md2WithRSAEncryption -# define PEM_MD_MD5_RSA NID_md5WithRSAEncryption -# define PEM_MD_SHA_RSA NID_sha1WithRSAEncryption - -# define PEM_STRING_X509_OLD "X509 CERTIFICATE" -# define PEM_STRING_X509 "CERTIFICATE" -# define PEM_STRING_X509_PAIR "CERTIFICATE PAIR" -# define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE" -# define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST" -# define PEM_STRING_X509_REQ "CERTIFICATE REQUEST" -# define PEM_STRING_X509_CRL "X509 CRL" -# define PEM_STRING_EVP_PKEY "ANY PRIVATE KEY" -# define PEM_STRING_PUBLIC "PUBLIC KEY" -# define PEM_STRING_RSA "RSA PRIVATE KEY" -# define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY" -# define PEM_STRING_DSA "DSA PRIVATE KEY" -# define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY" -# define PEM_STRING_PKCS7 "PKCS7" -# define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA" -# define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY" -# define PEM_STRING_PKCS8INF "PRIVATE KEY" -# define PEM_STRING_DHPARAMS "DH PARAMETERS" -# define PEM_STRING_DHXPARAMS "X9.42 DH PARAMETERS" -# define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" -# define PEM_STRING_DSAPARAMS "DSA PARAMETERS" -# define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY" -# define PEM_STRING_ECPARAMETERS "EC PARAMETERS" -# define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" -# define PEM_STRING_PARAMETERS "PARAMETERS" -# define PEM_STRING_CMS "CMS" - - /* - * Note that this structure is initialised by PEM_SealInit and cleaned up - * by PEM_SealFinal (at least for now) - */ -typedef struct PEM_Encode_Seal_st { - EVP_ENCODE_CTX encode; - EVP_MD_CTX md; - EVP_CIPHER_CTX cipher; -} PEM_ENCODE_SEAL_CTX; - -/* enc_type is one off */ -# define PEM_TYPE_ENCRYPTED 10 -# define PEM_TYPE_MIC_ONLY 20 -# define PEM_TYPE_MIC_CLEAR 30 -# define PEM_TYPE_CLEAR 40 - -typedef struct pem_recip_st { - char *name; - X509_NAME *dn; - int cipher; - int key_enc; - /* char iv[8]; unused and wrong size */ -} PEM_USER; - -typedef struct pem_ctx_st { - int type; /* what type of object */ - struct { - int version; - int mode; - } proc_type; - - char *domain; - - struct { - int cipher; - /*- - unused, and wrong size - unsigned char iv[8]; */ - } DEK_info; - - PEM_USER *originator; - - int num_recipient; - PEM_USER **recipient; -/*- - XXX(ben): don#t think this is used! - STACK *x509_chain; / * certificate chain */ - EVP_MD *md; /* signature type */ - - int md_enc; /* is the md encrypted or not? */ - int md_len; /* length of md_data */ - char *md_data; /* message digest, could be pkey encrypted */ - - EVP_CIPHER *dec; /* date encryption cipher */ - int key_len; /* key length */ - unsigned char *key; /* key */ - /*- - unused, and wrong size - unsigned char iv[8]; */ - - int data_enc; /* is the data encrypted */ - int data_len; - unsigned char *data; -} PEM_CTX; - -/* - * These macros make the PEM_read/PEM_write functions easier to maintain and - * write. Now they are all implemented with either: IMPLEMENT_PEM_rw(...) or - * IMPLEMENT_PEM_rw_cb(...) - */ - -# ifdef OPENSSL_NO_FP_API - -# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/ -# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/ -# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/ -# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/ -# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/ -# else - -# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ -type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ -{ \ -return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \ -} - -# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, type *x) \ -{ \ -return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \ -} - -# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, const type *x) \ -{ \ -return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \ -} - -# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, \ - void *u) \ - { \ - return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ - } - -# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ -int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, \ - void *u) \ - { \ - return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ - } - -# endif - -# define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ -type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ -{ \ -return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \ -} - -# define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, type *x) \ -{ \ -return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \ -} - -# define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, const type *x) \ -{ \ -return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \ -} - -# define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ - { \ - return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \ - } - -# define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ -int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ - { \ - return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \ - } - -# define IMPLEMENT_PEM_write(name, type, str, asn1) \ - IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ - IMPLEMENT_PEM_write_fp(name, type, str, asn1) - -# define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) - -# define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) - -# define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) - -# define IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ - IMPLEMENT_PEM_read_fp(name, type, str, asn1) - -# define IMPLEMENT_PEM_rw(name, type, str, asn1) \ - IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_write(name, type, str, asn1) - -# define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \ - IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_write_const(name, type, str, asn1) - -# define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \ - IMPLEMENT_PEM_read(name, type, str, asn1) \ - IMPLEMENT_PEM_write_cb(name, type, str, asn1) - -/* These are the same except they are for the declarations */ - -# if defined(OPENSSL_NO_FP_API) - -# define DECLARE_PEM_read_fp(name, type) /**/ -# define DECLARE_PEM_write_fp(name, type) /**/ -# define DECLARE_PEM_write_cb_fp(name, type) /**/ -# else - -# define DECLARE_PEM_read_fp(name, type) \ - type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u); - -# define DECLARE_PEM_write_fp(name, type) \ - int PEM_write_##name(FILE *fp, type *x); - -# define DECLARE_PEM_write_fp_const(name, type) \ - int PEM_write_##name(FILE *fp, const type *x); - -# define DECLARE_PEM_write_cb_fp(name, type) \ - int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u); - -# endif - -# ifndef OPENSSL_NO_BIO -# define DECLARE_PEM_read_bio(name, type) \ - type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); - -# define DECLARE_PEM_write_bio(name, type) \ - int PEM_write_bio_##name(BIO *bp, type *x); - -# define DECLARE_PEM_write_bio_const(name, type) \ - int PEM_write_bio_##name(BIO *bp, const type *x); - -# define DECLARE_PEM_write_cb_bio(name, type) \ - int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ - unsigned char *kstr, int klen, pem_password_cb *cb, void *u); - -# else - -# define DECLARE_PEM_read_bio(name, type) /**/ -# define DECLARE_PEM_write_bio(name, type) /**/ -# define DECLARE_PEM_write_bio_const(name, type) /**/ -# define DECLARE_PEM_write_cb_bio(name, type) /**/ -# endif -# define DECLARE_PEM_write(name, type) \ - DECLARE_PEM_write_bio(name, type) \ - DECLARE_PEM_write_fp(name, type) -# define DECLARE_PEM_write_const(name, type) \ - DECLARE_PEM_write_bio_const(name, type) \ - DECLARE_PEM_write_fp_const(name, type) -# define DECLARE_PEM_write_cb(name, type) \ - DECLARE_PEM_write_cb_bio(name, type) \ - DECLARE_PEM_write_cb_fp(name, type) -# define DECLARE_PEM_read(name, type) \ - DECLARE_PEM_read_bio(name, type) \ - DECLARE_PEM_read_fp(name, type) -# define DECLARE_PEM_rw(name, type) \ - DECLARE_PEM_read(name, type) \ - DECLARE_PEM_write(name, type) -# define DECLARE_PEM_rw_const(name, type) \ - DECLARE_PEM_read(name, type) \ - DECLARE_PEM_write_const(name, type) -# define DECLARE_PEM_rw_cb(name, type) \ - DECLARE_PEM_read(name, type) \ - DECLARE_PEM_write_cb(name, type) -# if 1 -/* "userdata": new with OpenSSL 0.9.4 */ -typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata); -# else -/* OpenSSL 0.9.3, 0.9.3a */ -typedef int pem_password_cb (char *buf, int size, int rwflag); -# endif - -int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); -int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len, - pem_password_cb *callback, void *u); - -# ifndef OPENSSL_NO_BIO -int PEM_read_bio(BIO *bp, char **name, char **header, - unsigned char **data, long *len); -int PEM_write_bio(BIO *bp, const char *name, const char *hdr, - const unsigned char *data, long len); -int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, - const char *name, BIO *bp, pem_password_cb *cb, - void *u); -void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, - pem_password_cb *cb, void *u); -int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, - const EVP_CIPHER *enc, unsigned char *kstr, int klen, - pem_password_cb *cb, void *u); - -STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, - pem_password_cb *cb, void *u); -int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, - unsigned char *kstr, int klen, - pem_password_cb *cd, void *u); -# endif - -int PEM_read(FILE *fp, char **name, char **header, - unsigned char **data, long *len); -int PEM_write(FILE *fp, const char *name, const char *hdr, - const unsigned char *data, long len); -void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, - pem_password_cb *cb, void *u); -int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, - void *x, const EVP_CIPHER *enc, unsigned char *kstr, - int klen, pem_password_cb *callback, void *u); -STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, - pem_password_cb *cb, void *u); - -int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, - EVP_MD *md_type, unsigned char **ek, int *ekl, - unsigned char *iv, EVP_PKEY **pubk, int npubk); -void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, - unsigned char *in, int inl); -int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, - unsigned char *out, int *outl, EVP_PKEY *priv); - -void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); -void PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); -int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, - unsigned int *siglen, EVP_PKEY *pkey); - -int PEM_def_callback(char *buf, int num, int w, void *key); -void PEM_proc_type(char *buf, int type); -void PEM_dek_info(char *buf, const char *type, int len, char *str); - -# include - -DECLARE_PEM_rw(X509, X509) -DECLARE_PEM_rw(X509_AUX, X509) -DECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR) -DECLARE_PEM_rw(X509_REQ, X509_REQ) -DECLARE_PEM_write(X509_REQ_NEW, X509_REQ) -DECLARE_PEM_rw(X509_CRL, X509_CRL) -DECLARE_PEM_rw(PKCS7, PKCS7) -DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE) -DECLARE_PEM_rw(PKCS8, X509_SIG) -DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) -# ifndef OPENSSL_NO_RSA -DECLARE_PEM_rw_cb(RSAPrivateKey, RSA) -DECLARE_PEM_rw_const(RSAPublicKey, RSA) -DECLARE_PEM_rw(RSA_PUBKEY, RSA) -# endif -# ifndef OPENSSL_NO_DSA -DECLARE_PEM_rw_cb(DSAPrivateKey, DSA) -DECLARE_PEM_rw(DSA_PUBKEY, DSA) -DECLARE_PEM_rw_const(DSAparams, DSA) -# endif -# ifndef OPENSSL_NO_EC -DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP) -DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) -DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) -# endif -# ifndef OPENSSL_NO_DH -DECLARE_PEM_rw_const(DHparams, DH) -DECLARE_PEM_write_const(DHxparams, DH) -# endif -DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) -DECLARE_PEM_rw(PUBKEY, EVP_PKEY) - -int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, - char *, int, pem_password_cb *, void *); -int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); -EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, - void *u); - -int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); -int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, - char *kstr, int klen, - pem_password_cb *cb, void *u); - -EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, - void *u); - -int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, - char *kstr, int klen, pem_password_cb *cd, - void *u); - -EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); -int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); - -EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length); -EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length); -EVP_PKEY *b2i_PrivateKey_bio(BIO *in); -EVP_PKEY *b2i_PublicKey_bio(BIO *in); -int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk); -int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); -# ifndef OPENSSL_NO_RC4 -EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); -int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, - pem_password_cb *cb, void *u); -# endif - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ - -void ERR_load_PEM_strings(void); - -/* Error codes for the PEM functions. */ - -/* Function codes. */ -# define PEM_F_B2I_DSS 127 -# define PEM_F_B2I_PVK_BIO 128 -# define PEM_F_B2I_RSA 129 -# define PEM_F_CHECK_BITLEN_DSA 130 -# define PEM_F_CHECK_BITLEN_RSA 131 -# define PEM_F_D2I_PKCS8PRIVATEKEY_BIO 120 -# define PEM_F_D2I_PKCS8PRIVATEKEY_FP 121 -# define PEM_F_DO_B2I 132 -# define PEM_F_DO_B2I_BIO 133 -# define PEM_F_DO_BLOB_HEADER 134 -# define PEM_F_DO_PK8PKEY 126 -# define PEM_F_DO_PK8PKEY_FP 125 -# define PEM_F_DO_PVK_BODY 135 -# define PEM_F_DO_PVK_HEADER 136 -# define PEM_F_I2B_PVK 137 -# define PEM_F_I2B_PVK_BIO 138 -# define PEM_F_LOAD_IV 101 -# define PEM_F_PEM_ASN1_READ 102 -# define PEM_F_PEM_ASN1_READ_BIO 103 -# define PEM_F_PEM_ASN1_WRITE 104 -# define PEM_F_PEM_ASN1_WRITE_BIO 105 -# define PEM_F_PEM_DEF_CALLBACK 100 -# define PEM_F_PEM_DO_HEADER 106 -# define PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY 118 -# define PEM_F_PEM_GET_EVP_CIPHER_INFO 107 -# define PEM_F_PEM_PK8PKEY 119 -# define PEM_F_PEM_READ 108 -# define PEM_F_PEM_READ_BIO 109 -# define PEM_F_PEM_READ_BIO_DHPARAMS 141 -# define PEM_F_PEM_READ_BIO_PARAMETERS 140 -# define PEM_F_PEM_READ_BIO_PRIVATEKEY 123 -# define PEM_F_PEM_READ_DHPARAMS 142 -# define PEM_F_PEM_READ_PRIVATEKEY 124 -# define PEM_F_PEM_SEALFINAL 110 -# define PEM_F_PEM_SEALINIT 111 -# define PEM_F_PEM_SIGNFINAL 112 -# define PEM_F_PEM_WRITE 113 -# define PEM_F_PEM_WRITE_BIO 114 -# define PEM_F_PEM_WRITE_PRIVATEKEY 139 -# define PEM_F_PEM_X509_INFO_READ 115 -# define PEM_F_PEM_X509_INFO_READ_BIO 116 -# define PEM_F_PEM_X509_INFO_WRITE_BIO 117 - -/* Reason codes. */ -# define PEM_R_BAD_BASE64_DECODE 100 -# define PEM_R_BAD_DECRYPT 101 -# define PEM_R_BAD_END_LINE 102 -# define PEM_R_BAD_IV_CHARS 103 -# define PEM_R_BAD_MAGIC_NUMBER 116 -# define PEM_R_BAD_PASSWORD_READ 104 -# define PEM_R_BAD_VERSION_NUMBER 117 -# define PEM_R_BIO_WRITE_FAILURE 118 -# define PEM_R_CIPHER_IS_NULL 127 -# define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 -# define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119 -# define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120 -# define PEM_R_HEADER_TOO_LONG 128 -# define PEM_R_INCONSISTENT_HEADER 121 -# define PEM_R_KEYBLOB_HEADER_PARSE_ERROR 122 -# define PEM_R_KEYBLOB_TOO_SHORT 123 -# define PEM_R_NOT_DEK_INFO 105 -# define PEM_R_NOT_ENCRYPTED 106 -# define PEM_R_NOT_PROC_TYPE 107 -# define PEM_R_NO_START_LINE 108 -# define PEM_R_PROBLEMS_GETTING_PASSWORD 109 -# define PEM_R_PUBLIC_KEY_NO_RSA 110 -# define PEM_R_PVK_DATA_TOO_SHORT 124 -# define PEM_R_PVK_TOO_SHORT 125 -# define PEM_R_READ_KEY 111 -# define PEM_R_SHORT_HEADER 112 -# define PEM_R_UNSUPPORTED_CIPHER 113 -# define PEM_R_UNSUPPORTED_ENCRYPTION 114 -# define PEM_R_UNSUPPORTED_KEY_COMPONENTS 126 - -# ifdef __cplusplus -} -# endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PEM_H +# define HEADER_PEM_H + +# include +# include +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +# define PEM_BUFSIZE 1024 + +# define PEM_STRING_X509_OLD "X509 CERTIFICATE" +# define PEM_STRING_X509 "CERTIFICATE" +# define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE" +# define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST" +# define PEM_STRING_X509_REQ "CERTIFICATE REQUEST" +# define PEM_STRING_X509_CRL "X509 CRL" +# define PEM_STRING_EVP_PKEY "ANY PRIVATE KEY" +# define PEM_STRING_PUBLIC "PUBLIC KEY" +# define PEM_STRING_RSA "RSA PRIVATE KEY" +# define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY" +# define PEM_STRING_DSA "DSA PRIVATE KEY" +# define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY" +# define PEM_STRING_PKCS7 "PKCS7" +# define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA" +# define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY" +# define PEM_STRING_PKCS8INF "PRIVATE KEY" +# define PEM_STRING_DHPARAMS "DH PARAMETERS" +# define PEM_STRING_DHXPARAMS "X9.42 DH PARAMETERS" +# define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" +# define PEM_STRING_DSAPARAMS "DSA PARAMETERS" +# define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY" +# define PEM_STRING_ECPARAMETERS "EC PARAMETERS" +# define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" +# define PEM_STRING_PARAMETERS "PARAMETERS" +# define PEM_STRING_CMS "CMS" + +# define PEM_TYPE_ENCRYPTED 10 +# define PEM_TYPE_MIC_ONLY 20 +# define PEM_TYPE_MIC_CLEAR 30 +# define PEM_TYPE_CLEAR 40 + +/* + * These macros make the PEM_read/PEM_write functions easier to maintain and + * write. Now they are all implemented with either: IMPLEMENT_PEM_rw(...) or + * IMPLEMENT_PEM_rw_cb(...) + */ + +# ifdef OPENSSL_NO_STDIO + +# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/ +# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/ +# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/ +# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/ +# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/ +# else + +# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ +type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ +{ \ +return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \ +} + +# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ +int PEM_write_##name(FILE *fp, type *x) \ +{ \ +return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \ +} + +# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ +int PEM_write_##name(FILE *fp, const type *x) \ +{ \ +return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \ +} + +# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ +int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, \ + void *u) \ + { \ + return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ + } + +# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ +int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, \ + void *u) \ + { \ + return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ + } + +# endif + +# define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ +type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ +{ \ +return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \ +} + +# define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ +int PEM_write_bio_##name(BIO *bp, type *x) \ +{ \ +return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \ +} + +# define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ +int PEM_write_bio_##name(BIO *bp, const type *x) \ +{ \ +return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \ +} + +# define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ +int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ + { \ + return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \ + } + +# define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ +int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ + { \ + return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \ + } + +# define IMPLEMENT_PEM_write(name, type, str, asn1) \ + IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ + IMPLEMENT_PEM_write_fp(name, type, str, asn1) + +# define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ + IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ + IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) + +# define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ + IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ + IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) + +# define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ + IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ + IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) + +# define IMPLEMENT_PEM_read(name, type, str, asn1) \ + IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ + IMPLEMENT_PEM_read_fp(name, type, str, asn1) + +# define IMPLEMENT_PEM_rw(name, type, str, asn1) \ + IMPLEMENT_PEM_read(name, type, str, asn1) \ + IMPLEMENT_PEM_write(name, type, str, asn1) + +# define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \ + IMPLEMENT_PEM_read(name, type, str, asn1) \ + IMPLEMENT_PEM_write_const(name, type, str, asn1) + +# define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \ + IMPLEMENT_PEM_read(name, type, str, asn1) \ + IMPLEMENT_PEM_write_cb(name, type, str, asn1) + +/* These are the same except they are for the declarations */ + +# if defined(OPENSSL_NO_STDIO) + +# define DECLARE_PEM_read_fp(name, type) /**/ +# define DECLARE_PEM_write_fp(name, type) /**/ +# define DECLARE_PEM_write_fp_const(name, type) /**/ +# define DECLARE_PEM_write_cb_fp(name, type) /**/ +# else + +# define DECLARE_PEM_read_fp(name, type) \ + type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u); + +# define DECLARE_PEM_write_fp(name, type) \ + int PEM_write_##name(FILE *fp, type *x); + +# define DECLARE_PEM_write_fp_const(name, type) \ + int PEM_write_##name(FILE *fp, const type *x); + +# define DECLARE_PEM_write_cb_fp(name, type) \ + int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, void *u); + +# endif + +# define DECLARE_PEM_read_bio(name, type) \ + type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); + +# define DECLARE_PEM_write_bio(name, type) \ + int PEM_write_bio_##name(BIO *bp, type *x); + +# define DECLARE_PEM_write_bio_const(name, type) \ + int PEM_write_bio_##name(BIO *bp, const type *x); + +# define DECLARE_PEM_write_cb_bio(name, type) \ + int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ + unsigned char *kstr, int klen, pem_password_cb *cb, void *u); + +# define DECLARE_PEM_write(name, type) \ + DECLARE_PEM_write_bio(name, type) \ + DECLARE_PEM_write_fp(name, type) +# define DECLARE_PEM_write_const(name, type) \ + DECLARE_PEM_write_bio_const(name, type) \ + DECLARE_PEM_write_fp_const(name, type) +# define DECLARE_PEM_write_cb(name, type) \ + DECLARE_PEM_write_cb_bio(name, type) \ + DECLARE_PEM_write_cb_fp(name, type) +# define DECLARE_PEM_read(name, type) \ + DECLARE_PEM_read_bio(name, type) \ + DECLARE_PEM_read_fp(name, type) +# define DECLARE_PEM_rw(name, type) \ + DECLARE_PEM_read(name, type) \ + DECLARE_PEM_write(name, type) +# define DECLARE_PEM_rw_const(name, type) \ + DECLARE_PEM_read(name, type) \ + DECLARE_PEM_write_const(name, type) +# define DECLARE_PEM_rw_cb(name, type) \ + DECLARE_PEM_read(name, type) \ + DECLARE_PEM_write_cb(name, type) +typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata); + +int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); +int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len, + pem_password_cb *callback, void *u); + +int PEM_read_bio(BIO *bp, char **name, char **header, + unsigned char **data, long *len); +# define PEM_FLAG_SECURE 0x1 +# define PEM_FLAG_EAY_COMPATIBLE 0x2 +# define PEM_FLAG_ONLY_B64 0x4 +int PEM_read_bio_ex(BIO *bp, char **name, char **header, + unsigned char **data, long *len, unsigned int flags); +int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm, + const char *name, BIO *bp, pem_password_cb *cb, + void *u); +int PEM_write_bio(BIO *bp, const char *name, const char *hdr, + const unsigned char *data, long len); +int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, + const char *name, BIO *bp, pem_password_cb *cb, + void *u); +void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, + pem_password_cb *cb, void *u); +int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, + const EVP_CIPHER *enc, unsigned char *kstr, int klen, + pem_password_cb *cb, void *u); + +STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, + pem_password_cb *cb, void *u); +int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cd, void *u); + +#ifndef OPENSSL_NO_STDIO +int PEM_read(FILE *fp, char **name, char **header, + unsigned char **data, long *len); +int PEM_write(FILE *fp, const char *name, const char *hdr, + const unsigned char *data, long len); +void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, + pem_password_cb *cb, void *u); +int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, + void *x, const EVP_CIPHER *enc, unsigned char *kstr, + int klen, pem_password_cb *callback, void *u); +STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, + pem_password_cb *cb, void *u); +#endif + +int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); +int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); +int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, + unsigned int *siglen, EVP_PKEY *pkey); + +/* The default pem_password_cb that's used internally */ +int PEM_def_callback(char *buf, int num, int rwflag, void *userdata); +void PEM_proc_type(char *buf, int type); +void PEM_dek_info(char *buf, const char *type, int len, char *str); + +# include + +DECLARE_PEM_rw(X509, X509) +DECLARE_PEM_rw(X509_AUX, X509) +DECLARE_PEM_rw(X509_REQ, X509_REQ) +DECLARE_PEM_write(X509_REQ_NEW, X509_REQ) +DECLARE_PEM_rw(X509_CRL, X509_CRL) +DECLARE_PEM_rw(PKCS7, PKCS7) +DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE) +DECLARE_PEM_rw(PKCS8, X509_SIG) +DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) +# ifndef OPENSSL_NO_RSA +DECLARE_PEM_rw_cb(RSAPrivateKey, RSA) +DECLARE_PEM_rw_const(RSAPublicKey, RSA) +DECLARE_PEM_rw(RSA_PUBKEY, RSA) +# endif +# ifndef OPENSSL_NO_DSA +DECLARE_PEM_rw_cb(DSAPrivateKey, DSA) +DECLARE_PEM_rw(DSA_PUBKEY, DSA) +DECLARE_PEM_rw_const(DSAparams, DSA) +# endif +# ifndef OPENSSL_NO_EC +DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP) +DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) +DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) +# endif +# ifndef OPENSSL_NO_DH +DECLARE_PEM_rw_const(DHparams, DH) +DECLARE_PEM_write_const(DHxparams, DH) +# endif +DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) +DECLARE_PEM_rw(PUBKEY, EVP_PKEY) + +int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, + const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u); + +int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, + char *kstr, int klen, + pem_password_cb *cb, void *u); +int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, + char *, int, pem_password_cb *, void *); +int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, + char *kstr, int klen, + pem_password_cb *cb, void *u); +int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, + char *kstr, int klen, + pem_password_cb *cb, void *u); +EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, + void *u); + +# ifndef OPENSSL_NO_STDIO +int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, + char *kstr, int klen, + pem_password_cb *cb, void *u); +int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, + char *kstr, int klen, + pem_password_cb *cb, void *u); +int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, + char *kstr, int klen, + pem_password_cb *cb, void *u); + +EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, + void *u); + +int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, + char *kstr, int klen, pem_password_cb *cd, + void *u); +# endif +EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); +int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); + +# ifndef OPENSSL_NO_DSA +EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length); +EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length); +EVP_PKEY *b2i_PrivateKey_bio(BIO *in); +EVP_PKEY *b2i_PublicKey_bio(BIO *in); +int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk); +int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); +# ifndef OPENSSL_NO_RC4 +EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); +int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, + pem_password_cb *cb, void *u); +# endif +# endif + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pem2.h b/src/Mayaqua/win32_inc/openssl/pem2.h index ad73e485..038fe790 100644 --- a/src/Mayaqua/win32_inc/openssl/pem2.h +++ b/src/Mayaqua/win32_inc/openssl/pem2.h @@ -1,70 +1,13 @@ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -/* - * This header only exists to break a circular dependency between pem and err - * Ben 30 Jan 1999. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HEADER_PEM_H -void ERR_load_PEM_strings(void); -#endif - -#ifdef __cplusplus -} -#endif +/* + * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PEM2_H +# define HEADER_PEM2_H +# include +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pemerr.h b/src/Mayaqua/win32_inc/openssl/pemerr.h new file mode 100644 index 00000000..0c45918f --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/pemerr.h @@ -0,0 +1,103 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PEMERR_H +# define HEADER_PEMERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_PEM_strings(void); + +/* + * PEM function codes. + */ +# define PEM_F_B2I_DSS 127 +# define PEM_F_B2I_PVK_BIO 128 +# define PEM_F_B2I_RSA 129 +# define PEM_F_CHECK_BITLEN_DSA 130 +# define PEM_F_CHECK_BITLEN_RSA 131 +# define PEM_F_D2I_PKCS8PRIVATEKEY_BIO 120 +# define PEM_F_D2I_PKCS8PRIVATEKEY_FP 121 +# define PEM_F_DO_B2I 132 +# define PEM_F_DO_B2I_BIO 133 +# define PEM_F_DO_BLOB_HEADER 134 +# define PEM_F_DO_I2B 146 +# define PEM_F_DO_PK8PKEY 126 +# define PEM_F_DO_PK8PKEY_FP 125 +# define PEM_F_DO_PVK_BODY 135 +# define PEM_F_DO_PVK_HEADER 136 +# define PEM_F_GET_HEADER_AND_DATA 143 +# define PEM_F_GET_NAME 144 +# define PEM_F_I2B_PVK 137 +# define PEM_F_I2B_PVK_BIO 138 +# define PEM_F_LOAD_IV 101 +# define PEM_F_PEM_ASN1_READ 102 +# define PEM_F_PEM_ASN1_READ_BIO 103 +# define PEM_F_PEM_ASN1_WRITE 104 +# define PEM_F_PEM_ASN1_WRITE_BIO 105 +# define PEM_F_PEM_DEF_CALLBACK 100 +# define PEM_F_PEM_DO_HEADER 106 +# define PEM_F_PEM_GET_EVP_CIPHER_INFO 107 +# define PEM_F_PEM_READ 108 +# define PEM_F_PEM_READ_BIO 109 +# define PEM_F_PEM_READ_BIO_DHPARAMS 141 +# define PEM_F_PEM_READ_BIO_EX 145 +# define PEM_F_PEM_READ_BIO_PARAMETERS 140 +# define PEM_F_PEM_READ_BIO_PRIVATEKEY 123 +# define PEM_F_PEM_READ_DHPARAMS 142 +# define PEM_F_PEM_READ_PRIVATEKEY 124 +# define PEM_F_PEM_SIGNFINAL 112 +# define PEM_F_PEM_WRITE 113 +# define PEM_F_PEM_WRITE_BIO 114 +# define PEM_F_PEM_WRITE_PRIVATEKEY 139 +# define PEM_F_PEM_X509_INFO_READ 115 +# define PEM_F_PEM_X509_INFO_READ_BIO 116 +# define PEM_F_PEM_X509_INFO_WRITE_BIO 117 + +/* + * PEM reason codes. + */ +# define PEM_R_BAD_BASE64_DECODE 100 +# define PEM_R_BAD_DECRYPT 101 +# define PEM_R_BAD_END_LINE 102 +# define PEM_R_BAD_IV_CHARS 103 +# define PEM_R_BAD_MAGIC_NUMBER 116 +# define PEM_R_BAD_PASSWORD_READ 104 +# define PEM_R_BAD_VERSION_NUMBER 117 +# define PEM_R_BIO_WRITE_FAILURE 118 +# define PEM_R_CIPHER_IS_NULL 127 +# define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 +# define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119 +# define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120 +# define PEM_R_HEADER_TOO_LONG 128 +# define PEM_R_INCONSISTENT_HEADER 121 +# define PEM_R_KEYBLOB_HEADER_PARSE_ERROR 122 +# define PEM_R_KEYBLOB_TOO_SHORT 123 +# define PEM_R_MISSING_DEK_IV 129 +# define PEM_R_NOT_DEK_INFO 105 +# define PEM_R_NOT_ENCRYPTED 106 +# define PEM_R_NOT_PROC_TYPE 107 +# define PEM_R_NO_START_LINE 108 +# define PEM_R_PROBLEMS_GETTING_PASSWORD 109 +# define PEM_R_PVK_DATA_TOO_SHORT 124 +# define PEM_R_PVK_TOO_SHORT 125 +# define PEM_R_READ_KEY 111 +# define PEM_R_SHORT_HEADER 112 +# define PEM_R_UNEXPECTED_DEK_IV 130 +# define PEM_R_UNSUPPORTED_CIPHER 113 +# define PEM_R_UNSUPPORTED_ENCRYPTION 114 +# define PEM_R_UNSUPPORTED_KEY_COMPONENTS 126 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pkcs12.h b/src/Mayaqua/win32_inc/openssl/pkcs12.h index 4112dfe9..3f43dad6 100644 --- a/src/Mayaqua/win32_inc/openssl/pkcs12.h +++ b/src/Mayaqua/win32_inc/openssl/pkcs12.h @@ -1,342 +1,223 @@ -/* pkcs12.h */ -/* - * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project - * 1999. - */ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_PKCS12_H -# define HEADER_PKCS12_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# define PKCS12_KEY_ID 1 -# define PKCS12_IV_ID 2 -# define PKCS12_MAC_ID 3 - -/* Default iteration count */ -# ifndef PKCS12_DEFAULT_ITER -# define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER -# endif - -# define PKCS12_MAC_KEY_LENGTH 20 - -# define PKCS12_SALT_LEN 8 - -/* Uncomment out next line for unicode password and names, otherwise ASCII */ - -/* - * #define PBE_UNICODE - */ - -# ifdef PBE_UNICODE -# define PKCS12_key_gen PKCS12_key_gen_uni -# define PKCS12_add_friendlyname PKCS12_add_friendlyname_uni -# else -# define PKCS12_key_gen PKCS12_key_gen_asc -# define PKCS12_add_friendlyname PKCS12_add_friendlyname_asc -# endif - -/* MS key usage constants */ - -# define KEY_EX 0x10 -# define KEY_SIG 0x80 - -typedef struct { - X509_SIG *dinfo; - ASN1_OCTET_STRING *salt; - ASN1_INTEGER *iter; /* defaults to 1 */ -} PKCS12_MAC_DATA; - -typedef struct { - ASN1_INTEGER *version; - PKCS12_MAC_DATA *mac; - PKCS7 *authsafes; -} PKCS12; - -typedef struct { - ASN1_OBJECT *type; - union { - struct pkcs12_bag_st *bag; /* secret, crl and certbag */ - struct pkcs8_priv_key_info_st *keybag; /* keybag */ - X509_SIG *shkeybag; /* shrouded key bag */ - STACK_OF(PKCS12_SAFEBAG) *safes; - ASN1_TYPE *other; - } value; - STACK_OF(X509_ATTRIBUTE) *attrib; -} PKCS12_SAFEBAG; - -DECLARE_STACK_OF(PKCS12_SAFEBAG) -DECLARE_ASN1_SET_OF(PKCS12_SAFEBAG) -DECLARE_PKCS12_STACK_OF(PKCS12_SAFEBAG) - -typedef struct pkcs12_bag_st { - ASN1_OBJECT *type; - union { - ASN1_OCTET_STRING *x509cert; - ASN1_OCTET_STRING *x509crl; - ASN1_OCTET_STRING *octet; - ASN1_IA5STRING *sdsicert; - ASN1_TYPE *other; /* Secret or other bag */ - } value; -} PKCS12_BAGS; - -# define PKCS12_ERROR 0 -# define PKCS12_OK 1 - -/* Compatibility macros */ - -# define M_PKCS12_x5092certbag PKCS12_x5092certbag -# define M_PKCS12_x509crl2certbag PKCS12_x509crl2certbag - -# define M_PKCS12_certbag2x509 PKCS12_certbag2x509 -# define M_PKCS12_certbag2x509crl PKCS12_certbag2x509crl - -# define M_PKCS12_unpack_p7data PKCS12_unpack_p7data -# define M_PKCS12_pack_authsafes PKCS12_pack_authsafes -# define M_PKCS12_unpack_authsafes PKCS12_unpack_authsafes -# define M_PKCS12_unpack_p7encdata PKCS12_unpack_p7encdata - -# define M_PKCS12_decrypt_skey PKCS12_decrypt_skey -# define M_PKCS8_decrypt PKCS8_decrypt - -# define M_PKCS12_bag_type(bg) OBJ_obj2nid((bg)->type) -# define M_PKCS12_cert_bag_type(bg) OBJ_obj2nid((bg)->value.bag->type) -# define M_PKCS12_crl_bag_type M_PKCS12_cert_bag_type - -# define PKCS12_get_attr(bag, attr_nid) \ - PKCS12_get_attr_gen(bag->attrib, attr_nid) - -# define PKCS8_get_attr(p8, attr_nid) \ - PKCS12_get_attr_gen(p8->attributes, attr_nid) - -# define PKCS12_mac_present(p12) ((p12)->mac ? 1 : 0) - -PKCS12_SAFEBAG *PKCS12_x5092certbag(X509 *x509); -PKCS12_SAFEBAG *PKCS12_x509crl2certbag(X509_CRL *crl); -X509 *PKCS12_certbag2x509(PKCS12_SAFEBAG *bag); -X509_CRL *PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag); - -PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, - int nid1, int nid2); -PKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG(PKCS8_PRIV_KEY_INFO *p8); -PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(X509_SIG *p8, const char *pass, - int passlen); -PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(PKCS12_SAFEBAG *bag, - const char *pass, int passlen); -X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, - const char *pass, int passlen, unsigned char *salt, - int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8); -PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass, - int passlen, unsigned char *salt, - int saltlen, int iter, - PKCS8_PRIV_KEY_INFO *p8); -PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); -STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7); -PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, - unsigned char *salt, int saltlen, int iter, - STACK_OF(PKCS12_SAFEBAG) *bags); -STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, - int passlen); - -int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); -STACK_OF(PKCS7) *PKCS12_unpack_authsafes(PKCS12 *p12); - -int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, - int namelen); -int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, - int namelen); -int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, - int namelen); -int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, - const unsigned char *name, int namelen); -int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage); -ASN1_TYPE *PKCS12_get_attr_gen(STACK_OF(X509_ATTRIBUTE) *attrs, int attr_nid); -char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag); -unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass, - int passlen, unsigned char *in, int inlen, - unsigned char **data, int *datalen, - int en_de); -void *PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it, - const char *pass, int passlen, - ASN1_OCTET_STRING *oct, int zbuf); -ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, - const ASN1_ITEM *it, - const char *pass, int passlen, - void *obj, int zbuf); -PKCS12 *PKCS12_init(int mode); -int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, - int saltlen, int id, int iter, int n, - unsigned char *out, const EVP_MD *md_type); -int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, - int saltlen, int id, int iter, int n, - unsigned char *out, const EVP_MD *md_type); -int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, - ASN1_TYPE *param, const EVP_CIPHER *cipher, - const EVP_MD *md_type, int en_de); -int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, - unsigned char *mac, unsigned int *maclen); -int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); -int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, - unsigned char *salt, int saltlen, int iter, - const EVP_MD *md_type); -int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, - int saltlen, const EVP_MD *md_type); -unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, - unsigned char **uni, int *unilen); -char *OPENSSL_uni2asc(unsigned char *uni, int unilen); - -DECLARE_ASN1_FUNCTIONS(PKCS12) -DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA) -DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG) -DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS) - -DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS) -DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES) - -void PKCS12_PBE_add(void); -int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, - STACK_OF(X509) **ca); -PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, - STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter, - int mac_iter, int keytype); - -PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert); -PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags, - EVP_PKEY *key, int key_usage, int iter, - int key_nid, char *pass); -int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags, - int safe_nid, int iter, char *pass); -PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid); - -int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12); -int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12); -PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12); -PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12); -int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_PKCS12_strings(void); - -/* Error codes for the PKCS12 functions. */ - -/* Function codes. */ -# define PKCS12_F_PARSE_BAG 129 -# define PKCS12_F_PARSE_BAGS 103 -# define PKCS12_F_PKCS12_ADD_FRIENDLYNAME 100 -# define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC 127 -# define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI 102 -# define PKCS12_F_PKCS12_ADD_LOCALKEYID 104 -# define PKCS12_F_PKCS12_CREATE 105 -# define PKCS12_F_PKCS12_GEN_MAC 107 -# define PKCS12_F_PKCS12_INIT 109 -# define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 106 -# define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 108 -# define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 117 -# define PKCS12_F_PKCS12_KEY_GEN_ASC 110 -# define PKCS12_F_PKCS12_KEY_GEN_UNI 111 -# define PKCS12_F_PKCS12_MAKE_KEYBAG 112 -# define PKCS12_F_PKCS12_MAKE_SHKEYBAG 113 -# define PKCS12_F_PKCS12_NEWPASS 128 -# define PKCS12_F_PKCS12_PACK_P7DATA 114 -# define PKCS12_F_PKCS12_PACK_P7ENCDATA 115 -# define PKCS12_F_PKCS12_PARSE 118 -# define PKCS12_F_PKCS12_PBE_CRYPT 119 -# define PKCS12_F_PKCS12_PBE_KEYIVGEN 120 -# define PKCS12_F_PKCS12_SETUP_MAC 122 -# define PKCS12_F_PKCS12_SET_MAC 123 -# define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 130 -# define PKCS12_F_PKCS12_UNPACK_P7DATA 131 -# define PKCS12_F_PKCS12_VERIFY_MAC 126 -# define PKCS12_F_PKCS8_ADD_KEYUSAGE 124 -# define PKCS12_F_PKCS8_ENCRYPT 125 - -/* Reason codes. */ -# define PKCS12_R_CANT_PACK_STRUCTURE 100 -# define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 -# define PKCS12_R_DECODE_ERROR 101 -# define PKCS12_R_ENCODE_ERROR 102 -# define PKCS12_R_ENCRYPT_ERROR 103 -# define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 -# define PKCS12_R_INVALID_NULL_ARGUMENT 104 -# define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 -# define PKCS12_R_IV_GEN_ERROR 106 -# define PKCS12_R_KEY_GEN_ERROR 107 -# define PKCS12_R_MAC_ABSENT 108 -# define PKCS12_R_MAC_GENERATION_ERROR 109 -# define PKCS12_R_MAC_SETUP_ERROR 110 -# define PKCS12_R_MAC_STRING_SET_ERROR 111 -# define PKCS12_R_MAC_VERIFY_ERROR 112 -# define PKCS12_R_MAC_VERIFY_FAILURE 113 -# define PKCS12_R_PARSE_ERROR 114 -# define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR 115 -# define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 -# define PKCS12_R_PKCS12_PBE_CRYPT_ERROR 117 -# define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 -# define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PKCS12_H +# define HEADER_PKCS12_H + +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +# define PKCS12_KEY_ID 1 +# define PKCS12_IV_ID 2 +# define PKCS12_MAC_ID 3 + +/* Default iteration count */ +# ifndef PKCS12_DEFAULT_ITER +# define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER +# endif + +# define PKCS12_MAC_KEY_LENGTH 20 + +# define PKCS12_SALT_LEN 8 + +/* It's not clear if these are actually needed... */ +# define PKCS12_key_gen PKCS12_key_gen_utf8 +# define PKCS12_add_friendlyname PKCS12_add_friendlyname_utf8 + +/* MS key usage constants */ + +# define KEY_EX 0x10 +# define KEY_SIG 0x80 + +typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA; + +typedef struct PKCS12_st PKCS12; + +typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG; + +DEFINE_STACK_OF(PKCS12_SAFEBAG) + +typedef struct pkcs12_bag_st PKCS12_BAGS; + +# define PKCS12_ERROR 0 +# define PKCS12_OK 1 + +/* Compatibility macros */ + +#if OPENSSL_API_COMPAT < 0x10100000L + +# define M_PKCS12_bag_type PKCS12_bag_type +# define M_PKCS12_cert_bag_type PKCS12_cert_bag_type +# define M_PKCS12_crl_bag_type PKCS12_cert_bag_type + +# define PKCS12_certbag2x509 PKCS12_SAFEBAG_get1_cert +# define PKCS12_certbag2scrl PKCS12_SAFEBAG_get1_crl +# define PKCS12_bag_type PKCS12_SAFEBAG_get_nid +# define PKCS12_cert_bag_type PKCS12_SAFEBAG_get_bag_nid +# define PKCS12_x5092certbag PKCS12_SAFEBAG_create_cert +# define PKCS12_x509crl2certbag PKCS12_SAFEBAG_create_crl +# define PKCS12_MAKE_KEYBAG PKCS12_SAFEBAG_create0_p8inf +# define PKCS12_MAKE_SHKEYBAG PKCS12_SAFEBAG_create_pkcs8_encrypt + +#endif + +DEPRECATEDIN_1_1_0(ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag, int attr_nid)) + +ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid); +int PKCS12_mac_present(const PKCS12 *p12); +void PKCS12_get0_mac(const ASN1_OCTET_STRING **pmac, + const X509_ALGOR **pmacalg, + const ASN1_OCTET_STRING **psalt, + const ASN1_INTEGER **piter, + const PKCS12 *p12); + +const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag, + int attr_nid); +const ASN1_OBJECT *PKCS12_SAFEBAG_get0_type(const PKCS12_SAFEBAG *bag); +int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag); +int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag); + +X509 *PKCS12_SAFEBAG_get1_cert(const PKCS12_SAFEBAG *bag); +X509_CRL *PKCS12_SAFEBAG_get1_crl(const PKCS12_SAFEBAG *bag); +const STACK_OF(PKCS12_SAFEBAG) * +PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag); +const PKCS8_PRIV_KEY_INFO *PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag); +const X509_SIG *PKCS12_SAFEBAG_get0_pkcs8(const PKCS12_SAFEBAG *bag); + +PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_cert(X509 *x509); +PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_crl(X509_CRL *crl); +PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8); +PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8); +PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt(int pbe_nid, + const char *pass, + int passlen, + unsigned char *salt, + int saltlen, int iter, + PKCS8_PRIV_KEY_INFO *p8inf); + +PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, + int nid1, int nid2); +PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass, + int passlen); +PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag, + const char *pass, int passlen); +X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, + const char *pass, int passlen, unsigned char *salt, + int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8); +X509_SIG *PKCS8_set0_pbe(const char *pass, int passlen, + PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe); +PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); +STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7); +PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, + unsigned char *salt, int saltlen, int iter, + STACK_OF(PKCS12_SAFEBAG) *bags); +STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, + int passlen); + +int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); +STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12); + +int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, + int namelen); +int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, + int namelen); +int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name, + int namelen); +int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, + int namelen); +int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, + const unsigned char *name, int namelen); +int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage); +ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs, + int attr_nid); +char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag); +const STACK_OF(X509_ATTRIBUTE) * +PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag); +unsigned char *PKCS12_pbe_crypt(const X509_ALGOR *algor, + const char *pass, int passlen, + const unsigned char *in, int inlen, + unsigned char **data, int *datalen, + int en_de); +void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it, + const char *pass, int passlen, + const ASN1_OCTET_STRING *oct, int zbuf); +ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, + const ASN1_ITEM *it, + const char *pass, int passlen, + void *obj, int zbuf); +PKCS12 *PKCS12_init(int mode); +int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, + int saltlen, int id, int iter, int n, + unsigned char *out, const EVP_MD *md_type); +int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, + int saltlen, int id, int iter, int n, + unsigned char *out, const EVP_MD *md_type); +int PKCS12_key_gen_utf8(const char *pass, int passlen, unsigned char *salt, + int saltlen, int id, int iter, int n, + unsigned char *out, const EVP_MD *md_type); +int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, + ASN1_TYPE *param, const EVP_CIPHER *cipher, + const EVP_MD *md_type, int en_de); +int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, + unsigned char *mac, unsigned int *maclen); +int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); +int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, + unsigned char *salt, int saltlen, int iter, + const EVP_MD *md_type); +int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, + int saltlen, const EVP_MD *md_type); +unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, + unsigned char **uni, int *unilen); +char *OPENSSL_uni2asc(const unsigned char *uni, int unilen); +unsigned char *OPENSSL_utf82uni(const char *asc, int asclen, + unsigned char **uni, int *unilen); +char *OPENSSL_uni2utf8(const unsigned char *uni, int unilen); + +DECLARE_ASN1_FUNCTIONS(PKCS12) +DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA) +DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG) +DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS) + +DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS) +DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES) + +void PKCS12_PBE_add(void); +int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, + STACK_OF(X509) **ca); +PKCS12 *PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey, + X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert, + int iter, int mac_iter, int keytype); + +PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert); +PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags, + EVP_PKEY *key, int key_usage, int iter, + int key_nid, const char *pass); +int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags, + int safe_nid, int iter, const char *pass); +PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid); + +int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12); +# ifndef OPENSSL_NO_STDIO +int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12); +# endif +PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12); +# ifndef OPENSSL_NO_STDIO +PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12); +# endif +int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pkcs12err.h b/src/Mayaqua/win32_inc/openssl/pkcs12err.h new file mode 100644 index 00000000..eff5eb26 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/pkcs12err.h @@ -0,0 +1,81 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PKCS12ERR_H +# define HEADER_PKCS12ERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_PKCS12_strings(void); + +/* + * PKCS12 function codes. + */ +# define PKCS12_F_OPENSSL_ASC2UNI 121 +# define PKCS12_F_OPENSSL_UNI2ASC 124 +# define PKCS12_F_OPENSSL_UNI2UTF8 127 +# define PKCS12_F_OPENSSL_UTF82UNI 129 +# define PKCS12_F_PKCS12_CREATE 105 +# define PKCS12_F_PKCS12_GEN_MAC 107 +# define PKCS12_F_PKCS12_INIT 109 +# define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 106 +# define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 108 +# define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 117 +# define PKCS12_F_PKCS12_KEY_GEN_ASC 110 +# define PKCS12_F_PKCS12_KEY_GEN_UNI 111 +# define PKCS12_F_PKCS12_KEY_GEN_UTF8 116 +# define PKCS12_F_PKCS12_NEWPASS 128 +# define PKCS12_F_PKCS12_PACK_P7DATA 114 +# define PKCS12_F_PKCS12_PACK_P7ENCDATA 115 +# define PKCS12_F_PKCS12_PARSE 118 +# define PKCS12_F_PKCS12_PBE_CRYPT 119 +# define PKCS12_F_PKCS12_PBE_KEYIVGEN 120 +# define PKCS12_F_PKCS12_SAFEBAG_CREATE0_P8INF 112 +# define PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8 113 +# define PKCS12_F_PKCS12_SAFEBAG_CREATE_PKCS8_ENCRYPT 133 +# define PKCS12_F_PKCS12_SETUP_MAC 122 +# define PKCS12_F_PKCS12_SET_MAC 123 +# define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 130 +# define PKCS12_F_PKCS12_UNPACK_P7DATA 131 +# define PKCS12_F_PKCS12_VERIFY_MAC 126 +# define PKCS12_F_PKCS8_ENCRYPT 125 +# define PKCS12_F_PKCS8_SET0_PBE 132 + +/* + * PKCS12 reason codes. + */ +# define PKCS12_R_CANT_PACK_STRUCTURE 100 +# define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 +# define PKCS12_R_DECODE_ERROR 101 +# define PKCS12_R_ENCODE_ERROR 102 +# define PKCS12_R_ENCRYPT_ERROR 103 +# define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 +# define PKCS12_R_INVALID_NULL_ARGUMENT 104 +# define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 +# define PKCS12_R_IV_GEN_ERROR 106 +# define PKCS12_R_KEY_GEN_ERROR 107 +# define PKCS12_R_MAC_ABSENT 108 +# define PKCS12_R_MAC_GENERATION_ERROR 109 +# define PKCS12_R_MAC_SETUP_ERROR 110 +# define PKCS12_R_MAC_STRING_SET_ERROR 111 +# define PKCS12_R_MAC_VERIFY_FAILURE 113 +# define PKCS12_R_PARSE_ERROR 114 +# define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR 115 +# define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 +# define PKCS12_R_PKCS12_PBE_CRYPT_ERROR 117 +# define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 +# define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pkcs7.h b/src/Mayaqua/win32_inc/openssl/pkcs7.h index 0414ca79..9b66e002 100644 --- a/src/Mayaqua/win32_inc/openssl/pkcs7.h +++ b/src/Mayaqua/win32_inc/openssl/pkcs7.h @@ -1,481 +1,319 @@ -/* crypto/pkcs7/pkcs7.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_PKCS7_H -# define HEADER_PKCS7_H - -# include -# include -# include - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_SYS_WIN32 -/* Under Win32 thes are defined in wincrypt.h */ -# undef PKCS7_ISSUER_AND_SERIAL -# undef PKCS7_SIGNER_INFO -# endif - -/*- -Encryption_ID DES-CBC -Digest_ID MD5 -Digest_Encryption_ID rsaEncryption -Key_Encryption_ID rsaEncryption -*/ - -typedef struct pkcs7_issuer_and_serial_st { - X509_NAME *issuer; - ASN1_INTEGER *serial; -} PKCS7_ISSUER_AND_SERIAL; - -typedef struct pkcs7_signer_info_st { - ASN1_INTEGER *version; /* version 1 */ - PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; - X509_ALGOR *digest_alg; - STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */ - X509_ALGOR *digest_enc_alg; - ASN1_OCTET_STRING *enc_digest; - STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */ - /* The private key to sign with */ - EVP_PKEY *pkey; -} PKCS7_SIGNER_INFO; - -DECLARE_STACK_OF(PKCS7_SIGNER_INFO) -DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) - -typedef struct pkcs7_recip_info_st { - ASN1_INTEGER *version; /* version 0 */ - PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; - X509_ALGOR *key_enc_algor; - ASN1_OCTET_STRING *enc_key; - X509 *cert; /* get the pub-key from this */ -} PKCS7_RECIP_INFO; - -DECLARE_STACK_OF(PKCS7_RECIP_INFO) -DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) - -typedef struct pkcs7_signed_st { - ASN1_INTEGER *version; /* version 1 */ - STACK_OF(X509_ALGOR) *md_algs; /* md used */ - STACK_OF(X509) *cert; /* [ 0 ] */ - STACK_OF(X509_CRL) *crl; /* [ 1 ] */ - STACK_OF(PKCS7_SIGNER_INFO) *signer_info; - struct pkcs7_st *contents; -} PKCS7_SIGNED; -/* - * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about - * merging the two - */ - -typedef struct pkcs7_enc_content_st { - ASN1_OBJECT *content_type; - X509_ALGOR *algorithm; - ASN1_OCTET_STRING *enc_data; /* [ 0 ] */ - const EVP_CIPHER *cipher; -} PKCS7_ENC_CONTENT; - -typedef struct pkcs7_enveloped_st { - ASN1_INTEGER *version; /* version 0 */ - STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; - PKCS7_ENC_CONTENT *enc_data; -} PKCS7_ENVELOPE; - -typedef struct pkcs7_signedandenveloped_st { - ASN1_INTEGER *version; /* version 1 */ - STACK_OF(X509_ALGOR) *md_algs; /* md used */ - STACK_OF(X509) *cert; /* [ 0 ] */ - STACK_OF(X509_CRL) *crl; /* [ 1 ] */ - STACK_OF(PKCS7_SIGNER_INFO) *signer_info; - PKCS7_ENC_CONTENT *enc_data; - STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; -} PKCS7_SIGN_ENVELOPE; - -typedef struct pkcs7_digest_st { - ASN1_INTEGER *version; /* version 0 */ - X509_ALGOR *md; /* md used */ - struct pkcs7_st *contents; - ASN1_OCTET_STRING *digest; -} PKCS7_DIGEST; - -typedef struct pkcs7_encrypted_st { - ASN1_INTEGER *version; /* version 0 */ - PKCS7_ENC_CONTENT *enc_data; -} PKCS7_ENCRYPT; - -typedef struct pkcs7_st { - /* - * The following is non NULL if it contains ASN1 encoding of this - * structure - */ - unsigned char *asn1; - long length; -# define PKCS7_S_HEADER 0 -# define PKCS7_S_BODY 1 -# define PKCS7_S_TAIL 2 - int state; /* used during processing */ - int detached; - ASN1_OBJECT *type; - /* content as defined by the type */ - /* - * all encryption/message digests are applied to the 'contents', leaving - * out the 'type' field. - */ - union { - char *ptr; - /* NID_pkcs7_data */ - ASN1_OCTET_STRING *data; - /* NID_pkcs7_signed */ - PKCS7_SIGNED *sign; - /* NID_pkcs7_enveloped */ - PKCS7_ENVELOPE *enveloped; - /* NID_pkcs7_signedAndEnveloped */ - PKCS7_SIGN_ENVELOPE *signed_and_enveloped; - /* NID_pkcs7_digest */ - PKCS7_DIGEST *digest; - /* NID_pkcs7_encrypted */ - PKCS7_ENCRYPT *encrypted; - /* Anything else */ - ASN1_TYPE *other; - } d; -} PKCS7; - -DECLARE_STACK_OF(PKCS7) -DECLARE_ASN1_SET_OF(PKCS7) -DECLARE_PKCS12_STACK_OF(PKCS7) - -# define PKCS7_OP_SET_DETACHED_SIGNATURE 1 -# define PKCS7_OP_GET_DETACHED_SIGNATURE 2 - -# define PKCS7_get_signed_attributes(si) ((si)->auth_attr) -# define PKCS7_get_attributes(si) ((si)->unauth_attr) - -# define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed) -# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted) -# define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped) -# define PKCS7_type_is_signedAndEnveloped(a) \ - (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped) -# define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data) -# define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest) - -# define PKCS7_set_detached(p,v) \ - PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL) -# define PKCS7_get_detached(p) \ - PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL) - -# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7)) - -/* S/MIME related flags */ - -# define PKCS7_TEXT 0x1 -# define PKCS7_NOCERTS 0x2 -# define PKCS7_NOSIGS 0x4 -# define PKCS7_NOCHAIN 0x8 -# define PKCS7_NOINTERN 0x10 -# define PKCS7_NOVERIFY 0x20 -# define PKCS7_DETACHED 0x40 -# define PKCS7_BINARY 0x80 -# define PKCS7_NOATTR 0x100 -# define PKCS7_NOSMIMECAP 0x200 -# define PKCS7_NOOLDMIMETYPE 0x400 -# define PKCS7_CRLFEOL 0x800 -# define PKCS7_STREAM 0x1000 -# define PKCS7_NOCRL 0x2000 -# define PKCS7_PARTIAL 0x4000 -# define PKCS7_REUSE_DIGEST 0x8000 - -/* Flags: for compatibility with older code */ - -# define SMIME_TEXT PKCS7_TEXT -# define SMIME_NOCERTS PKCS7_NOCERTS -# define SMIME_NOSIGS PKCS7_NOSIGS -# define SMIME_NOCHAIN PKCS7_NOCHAIN -# define SMIME_NOINTERN PKCS7_NOINTERN -# define SMIME_NOVERIFY PKCS7_NOVERIFY -# define SMIME_DETACHED PKCS7_DETACHED -# define SMIME_BINARY PKCS7_BINARY -# define SMIME_NOATTR PKCS7_NOATTR - -DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL) - -int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data, - const EVP_MD *type, unsigned char *md, - unsigned int *len); -# ifndef OPENSSL_NO_FP_API -PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7); -int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7); -# endif -PKCS7 *PKCS7_dup(PKCS7 *p7); -PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7); -int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7); -int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags); -int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags); - -DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO) -DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO) -DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED) -DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT) -DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE) -DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE) -DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST) -DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT) -DECLARE_ASN1_FUNCTIONS(PKCS7) - -DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN) -DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY) - -DECLARE_ASN1_NDEF_FUNCTION(PKCS7) -DECLARE_ASN1_PRINT_FUNCTION(PKCS7) - -long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg); - -int PKCS7_set_type(PKCS7 *p7, int type); -int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other); -int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data); -int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, - const EVP_MD *dgst); -int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si); -int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i); -int PKCS7_add_certificate(PKCS7 *p7, X509 *x509); -int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509); -int PKCS7_content_new(PKCS7 *p7, int nid); -int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, - BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si); -int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, - X509 *x509); - -BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio); -int PKCS7_dataFinal(PKCS7 *p7, BIO *bio); -BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert); - -PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509, - EVP_PKEY *pkey, const EVP_MD *dgst); -X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si); -int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md); -STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7); - -PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509); -void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk, - X509_ALGOR **pdig, X509_ALGOR **psig); -void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc); -int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri); -int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509); -int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher); -int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7); - -PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx); -ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk); -int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type, - void *data); -int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, - void *value); -ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid); -ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid); -int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si, - STACK_OF(X509_ATTRIBUTE) *sk); -int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si, - STACK_OF(X509_ATTRIBUTE) *sk); - -PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, - BIO *data, int flags); - -PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, - X509 *signcert, EVP_PKEY *pkey, - const EVP_MD *md, int flags); - -int PKCS7_final(PKCS7 *p7, BIO *data, int flags); -int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, - BIO *indata, BIO *out, int flags); -STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, - int flags); -PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, - int flags); -int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, - int flags); - -int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, - STACK_OF(X509_ALGOR) *cap); -STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); -int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg); - -int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid); -int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t); -int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si, - const unsigned char *md, int mdlen); - -int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); -PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); - -BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_PKCS7_strings(void); - -/* Error codes for the PKCS7 functions. */ - -/* Function codes. */ -# define PKCS7_F_B64_READ_PKCS7 120 -# define PKCS7_F_B64_WRITE_PKCS7 121 -# define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 136 -# define PKCS7_F_I2D_PKCS7_BIO_STREAM 140 -# define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 135 -# define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 118 -# define PKCS7_F_PKCS7_ADD_CERTIFICATE 100 -# define PKCS7_F_PKCS7_ADD_CRL 101 -# define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 102 -# define PKCS7_F_PKCS7_ADD_SIGNATURE 131 -# define PKCS7_F_PKCS7_ADD_SIGNER 103 -# define PKCS7_F_PKCS7_BIO_ADD_DIGEST 125 -# define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST 138 -# define PKCS7_F_PKCS7_CTRL 104 -# define PKCS7_F_PKCS7_DATADECODE 112 -# define PKCS7_F_PKCS7_DATAFINAL 128 -# define PKCS7_F_PKCS7_DATAINIT 105 -# define PKCS7_F_PKCS7_DATASIGN 106 -# define PKCS7_F_PKCS7_DATAVERIFY 107 -# define PKCS7_F_PKCS7_DECRYPT 114 -# define PKCS7_F_PKCS7_DECRYPT_RINFO 133 -# define PKCS7_F_PKCS7_ENCODE_RINFO 132 -# define PKCS7_F_PKCS7_ENCRYPT 115 -# define PKCS7_F_PKCS7_FINAL 134 -# define PKCS7_F_PKCS7_FIND_DIGEST 127 -# define PKCS7_F_PKCS7_GET0_SIGNERS 124 -# define PKCS7_F_PKCS7_RECIP_INFO_SET 130 -# define PKCS7_F_PKCS7_SET_CIPHER 108 -# define PKCS7_F_PKCS7_SET_CONTENT 109 -# define PKCS7_F_PKCS7_SET_DIGEST 126 -# define PKCS7_F_PKCS7_SET_TYPE 110 -# define PKCS7_F_PKCS7_SIGN 116 -# define PKCS7_F_PKCS7_SIGNATUREVERIFY 113 -# define PKCS7_F_PKCS7_SIGNER_INFO_SET 129 -# define PKCS7_F_PKCS7_SIGNER_INFO_SIGN 139 -# define PKCS7_F_PKCS7_SIGN_ADD_SIGNER 137 -# define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 119 -# define PKCS7_F_PKCS7_VERIFY 117 -# define PKCS7_F_SMIME_READ_PKCS7 122 -# define PKCS7_F_SMIME_TEXT 123 - -/* Reason codes. */ -# define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117 -# define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144 -# define PKCS7_R_CIPHER_NOT_INITIALIZED 116 -# define PKCS7_R_CONTENT_AND_DATA_PRESENT 118 -# define PKCS7_R_CTRL_ERROR 152 -# define PKCS7_R_DECODE_ERROR 130 -# define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH 100 -# define PKCS7_R_DECRYPT_ERROR 119 -# define PKCS7_R_DIGEST_FAILURE 101 -# define PKCS7_R_ENCRYPTION_CTRL_FAILURE 149 -# define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150 -# define PKCS7_R_ERROR_ADDING_RECIPIENT 120 -# define PKCS7_R_ERROR_SETTING_CIPHER 121 -# define PKCS7_R_INVALID_MIME_TYPE 131 -# define PKCS7_R_INVALID_NULL_POINTER 143 -# define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155 -# define PKCS7_R_MIME_NO_CONTENT_TYPE 132 -# define PKCS7_R_MIME_PARSE_ERROR 133 -# define PKCS7_R_MIME_SIG_PARSE_ERROR 134 -# define PKCS7_R_MISSING_CERIPEND_INFO 103 -# define PKCS7_R_NO_CONTENT 122 -# define PKCS7_R_NO_CONTENT_TYPE 135 -# define PKCS7_R_NO_DEFAULT_DIGEST 151 -# define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 154 -# define PKCS7_R_NO_MULTIPART_BODY_FAILURE 136 -# define PKCS7_R_NO_MULTIPART_BOUNDARY 137 -# define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115 -# define PKCS7_R_NO_RECIPIENT_MATCHES_KEY 146 -# define PKCS7_R_NO_SIGNATURES_ON_DATA 123 -# define PKCS7_R_NO_SIGNERS 142 -# define PKCS7_R_NO_SIG_CONTENT_TYPE 138 -# define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104 -# define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124 -# define PKCS7_R_PKCS7_ADD_SIGNER_ERROR 153 -# define PKCS7_R_PKCS7_DATAFINAL 126 -# define PKCS7_R_PKCS7_DATAFINAL_ERROR 125 -# define PKCS7_R_PKCS7_DATASIGN 145 -# define PKCS7_R_PKCS7_PARSE_ERROR 139 -# define PKCS7_R_PKCS7_SIG_PARSE_ERROR 140 -# define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127 -# define PKCS7_R_SIGNATURE_FAILURE 105 -# define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128 -# define PKCS7_R_SIGNING_CTRL_FAILURE 147 -# define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 148 -# define PKCS7_R_SIG_INVALID_MIME_TYPE 141 -# define PKCS7_R_SMIME_TEXT_ERROR 129 -# define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106 -# define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107 -# define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108 -# define PKCS7_R_UNKNOWN_DIGEST_TYPE 109 -# define PKCS7_R_UNKNOWN_OPERATION 110 -# define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111 -# define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112 -# define PKCS7_R_WRONG_CONTENT_TYPE 113 -# define PKCS7_R_WRONG_PKCS7_TYPE 114 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PKCS7_H +# define HEADER_PKCS7_H + +# include +# include +# include + +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/*- +Encryption_ID DES-CBC +Digest_ID MD5 +Digest_Encryption_ID rsaEncryption +Key_Encryption_ID rsaEncryption +*/ + +typedef struct pkcs7_issuer_and_serial_st { + X509_NAME *issuer; + ASN1_INTEGER *serial; +} PKCS7_ISSUER_AND_SERIAL; + +typedef struct pkcs7_signer_info_st { + ASN1_INTEGER *version; /* version 1 */ + PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; + X509_ALGOR *digest_alg; + STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */ + X509_ALGOR *digest_enc_alg; + ASN1_OCTET_STRING *enc_digest; + STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */ + /* The private key to sign with */ + EVP_PKEY *pkey; +} PKCS7_SIGNER_INFO; + +DEFINE_STACK_OF(PKCS7_SIGNER_INFO) + +typedef struct pkcs7_recip_info_st { + ASN1_INTEGER *version; /* version 0 */ + PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; + X509_ALGOR *key_enc_algor; + ASN1_OCTET_STRING *enc_key; + X509 *cert; /* get the pub-key from this */ +} PKCS7_RECIP_INFO; + +DEFINE_STACK_OF(PKCS7_RECIP_INFO) + +typedef struct pkcs7_signed_st { + ASN1_INTEGER *version; /* version 1 */ + STACK_OF(X509_ALGOR) *md_algs; /* md used */ + STACK_OF(X509) *cert; /* [ 0 ] */ + STACK_OF(X509_CRL) *crl; /* [ 1 ] */ + STACK_OF(PKCS7_SIGNER_INFO) *signer_info; + struct pkcs7_st *contents; +} PKCS7_SIGNED; +/* + * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about + * merging the two + */ + +typedef struct pkcs7_enc_content_st { + ASN1_OBJECT *content_type; + X509_ALGOR *algorithm; + ASN1_OCTET_STRING *enc_data; /* [ 0 ] */ + const EVP_CIPHER *cipher; +} PKCS7_ENC_CONTENT; + +typedef struct pkcs7_enveloped_st { + ASN1_INTEGER *version; /* version 0 */ + STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; + PKCS7_ENC_CONTENT *enc_data; +} PKCS7_ENVELOPE; + +typedef struct pkcs7_signedandenveloped_st { + ASN1_INTEGER *version; /* version 1 */ + STACK_OF(X509_ALGOR) *md_algs; /* md used */ + STACK_OF(X509) *cert; /* [ 0 ] */ + STACK_OF(X509_CRL) *crl; /* [ 1 ] */ + STACK_OF(PKCS7_SIGNER_INFO) *signer_info; + PKCS7_ENC_CONTENT *enc_data; + STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; +} PKCS7_SIGN_ENVELOPE; + +typedef struct pkcs7_digest_st { + ASN1_INTEGER *version; /* version 0 */ + X509_ALGOR *md; /* md used */ + struct pkcs7_st *contents; + ASN1_OCTET_STRING *digest; +} PKCS7_DIGEST; + +typedef struct pkcs7_encrypted_st { + ASN1_INTEGER *version; /* version 0 */ + PKCS7_ENC_CONTENT *enc_data; +} PKCS7_ENCRYPT; + +typedef struct pkcs7_st { + /* + * The following is non NULL if it contains ASN1 encoding of this + * structure + */ + unsigned char *asn1; + long length; +# define PKCS7_S_HEADER 0 +# define PKCS7_S_BODY 1 +# define PKCS7_S_TAIL 2 + int state; /* used during processing */ + int detached; + ASN1_OBJECT *type; + /* content as defined by the type */ + /* + * all encryption/message digests are applied to the 'contents', leaving + * out the 'type' field. + */ + union { + char *ptr; + /* NID_pkcs7_data */ + ASN1_OCTET_STRING *data; + /* NID_pkcs7_signed */ + PKCS7_SIGNED *sign; + /* NID_pkcs7_enveloped */ + PKCS7_ENVELOPE *enveloped; + /* NID_pkcs7_signedAndEnveloped */ + PKCS7_SIGN_ENVELOPE *signed_and_enveloped; + /* NID_pkcs7_digest */ + PKCS7_DIGEST *digest; + /* NID_pkcs7_encrypted */ + PKCS7_ENCRYPT *encrypted; + /* Anything else */ + ASN1_TYPE *other; + } d; +} PKCS7; + +DEFINE_STACK_OF(PKCS7) + +# define PKCS7_OP_SET_DETACHED_SIGNATURE 1 +# define PKCS7_OP_GET_DETACHED_SIGNATURE 2 + +# define PKCS7_get_signed_attributes(si) ((si)->auth_attr) +# define PKCS7_get_attributes(si) ((si)->unauth_attr) + +# define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed) +# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted) +# define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped) +# define PKCS7_type_is_signedAndEnveloped(a) \ + (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped) +# define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data) +# define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest) + +# define PKCS7_set_detached(p,v) \ + PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL) +# define PKCS7_get_detached(p) \ + PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL) + +# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7)) + +/* S/MIME related flags */ + +# define PKCS7_TEXT 0x1 +# define PKCS7_NOCERTS 0x2 +# define PKCS7_NOSIGS 0x4 +# define PKCS7_NOCHAIN 0x8 +# define PKCS7_NOINTERN 0x10 +# define PKCS7_NOVERIFY 0x20 +# define PKCS7_DETACHED 0x40 +# define PKCS7_BINARY 0x80 +# define PKCS7_NOATTR 0x100 +# define PKCS7_NOSMIMECAP 0x200 +# define PKCS7_NOOLDMIMETYPE 0x400 +# define PKCS7_CRLFEOL 0x800 +# define PKCS7_STREAM 0x1000 +# define PKCS7_NOCRL 0x2000 +# define PKCS7_PARTIAL 0x4000 +# define PKCS7_REUSE_DIGEST 0x8000 +# define PKCS7_NO_DUAL_CONTENT 0x10000 + +/* Flags: for compatibility with older code */ + +# define SMIME_TEXT PKCS7_TEXT +# define SMIME_NOCERTS PKCS7_NOCERTS +# define SMIME_NOSIGS PKCS7_NOSIGS +# define SMIME_NOCHAIN PKCS7_NOCHAIN +# define SMIME_NOINTERN PKCS7_NOINTERN +# define SMIME_NOVERIFY PKCS7_NOVERIFY +# define SMIME_DETACHED PKCS7_DETACHED +# define SMIME_BINARY PKCS7_BINARY +# define SMIME_NOATTR PKCS7_NOATTR + +/* CRLF ASCII canonicalisation */ +# define SMIME_ASCIICRLF 0x80000 + +DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL) + +int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data, + const EVP_MD *type, unsigned char *md, + unsigned int *len); +# ifndef OPENSSL_NO_STDIO +PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7); +int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7); +# endif +PKCS7 *PKCS7_dup(PKCS7 *p7); +PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7); +int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7); +int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags); +int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags); + +DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO) +DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO) +DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED) +DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT) +DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE) +DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE) +DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST) +DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT) +DECLARE_ASN1_FUNCTIONS(PKCS7) + +DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN) +DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY) + +DECLARE_ASN1_NDEF_FUNCTION(PKCS7) +DECLARE_ASN1_PRINT_FUNCTION(PKCS7) + +long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg); + +int PKCS7_set_type(PKCS7 *p7, int type); +int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other); +int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data); +int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, + const EVP_MD *dgst); +int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si); +int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i); +int PKCS7_add_certificate(PKCS7 *p7, X509 *x509); +int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509); +int PKCS7_content_new(PKCS7 *p7, int nid); +int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, + BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si); +int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, + X509 *x509); + +BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio); +int PKCS7_dataFinal(PKCS7 *p7, BIO *bio); +BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert); + +PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509, + EVP_PKEY *pkey, const EVP_MD *dgst); +X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si); +int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md); +STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7); + +PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509); +void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk, + X509_ALGOR **pdig, X509_ALGOR **psig); +void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc); +int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri); +int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509); +int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher); +int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7); + +PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx); +ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk); +int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type, + void *data); +int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, + void *value); +ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid); +ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid); +int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si, + STACK_OF(X509_ATTRIBUTE) *sk); +int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si, + STACK_OF(X509_ATTRIBUTE) *sk); + +PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, + BIO *data, int flags); + +PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, + X509 *signcert, EVP_PKEY *pkey, + const EVP_MD *md, int flags); + +int PKCS7_final(PKCS7 *p7, BIO *data, int flags); +int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, + BIO *indata, BIO *out, int flags); +STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, + int flags); +PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, + int flags); +int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, + int flags); + +int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, + STACK_OF(X509_ALGOR) *cap); +STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); +int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg); + +int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid); +int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t); +int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si, + const unsigned char *md, int mdlen); + +int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); +PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); + +BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pkcs7err.h b/src/Mayaqua/win32_inc/openssl/pkcs7err.h new file mode 100644 index 00000000..02e0299a --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/pkcs7err.h @@ -0,0 +1,103 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_PKCS7ERR_H +# define HEADER_PKCS7ERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_PKCS7_strings(void); + +/* + * PKCS7 function codes. + */ +# define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 136 +# define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 135 +# define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 118 +# define PKCS7_F_PKCS7_ADD_CERTIFICATE 100 +# define PKCS7_F_PKCS7_ADD_CRL 101 +# define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 102 +# define PKCS7_F_PKCS7_ADD_SIGNATURE 131 +# define PKCS7_F_PKCS7_ADD_SIGNER 103 +# define PKCS7_F_PKCS7_BIO_ADD_DIGEST 125 +# define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST 138 +# define PKCS7_F_PKCS7_CTRL 104 +# define PKCS7_F_PKCS7_DATADECODE 112 +# define PKCS7_F_PKCS7_DATAFINAL 128 +# define PKCS7_F_PKCS7_DATAINIT 105 +# define PKCS7_F_PKCS7_DATAVERIFY 107 +# define PKCS7_F_PKCS7_DECRYPT 114 +# define PKCS7_F_PKCS7_DECRYPT_RINFO 133 +# define PKCS7_F_PKCS7_ENCODE_RINFO 132 +# define PKCS7_F_PKCS7_ENCRYPT 115 +# define PKCS7_F_PKCS7_FINAL 134 +# define PKCS7_F_PKCS7_FIND_DIGEST 127 +# define PKCS7_F_PKCS7_GET0_SIGNERS 124 +# define PKCS7_F_PKCS7_RECIP_INFO_SET 130 +# define PKCS7_F_PKCS7_SET_CIPHER 108 +# define PKCS7_F_PKCS7_SET_CONTENT 109 +# define PKCS7_F_PKCS7_SET_DIGEST 126 +# define PKCS7_F_PKCS7_SET_TYPE 110 +# define PKCS7_F_PKCS7_SIGN 116 +# define PKCS7_F_PKCS7_SIGNATUREVERIFY 113 +# define PKCS7_F_PKCS7_SIGNER_INFO_SET 129 +# define PKCS7_F_PKCS7_SIGNER_INFO_SIGN 139 +# define PKCS7_F_PKCS7_SIGN_ADD_SIGNER 137 +# define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 119 +# define PKCS7_F_PKCS7_VERIFY 117 + +/* + * PKCS7 reason codes. + */ +# define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117 +# define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144 +# define PKCS7_R_CIPHER_NOT_INITIALIZED 116 +# define PKCS7_R_CONTENT_AND_DATA_PRESENT 118 +# define PKCS7_R_CTRL_ERROR 152 +# define PKCS7_R_DECRYPT_ERROR 119 +# define PKCS7_R_DIGEST_FAILURE 101 +# define PKCS7_R_ENCRYPTION_CTRL_FAILURE 149 +# define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150 +# define PKCS7_R_ERROR_ADDING_RECIPIENT 120 +# define PKCS7_R_ERROR_SETTING_CIPHER 121 +# define PKCS7_R_INVALID_NULL_POINTER 143 +# define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155 +# define PKCS7_R_NO_CONTENT 122 +# define PKCS7_R_NO_DEFAULT_DIGEST 151 +# define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 154 +# define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115 +# define PKCS7_R_NO_SIGNATURES_ON_DATA 123 +# define PKCS7_R_NO_SIGNERS 142 +# define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104 +# define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124 +# define PKCS7_R_PKCS7_ADD_SIGNER_ERROR 153 +# define PKCS7_R_PKCS7_DATASIGN 145 +# define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127 +# define PKCS7_R_SIGNATURE_FAILURE 105 +# define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128 +# define PKCS7_R_SIGNING_CTRL_FAILURE 147 +# define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 148 +# define PKCS7_R_SMIME_TEXT_ERROR 129 +# define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106 +# define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107 +# define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108 +# define PKCS7_R_UNKNOWN_DIGEST_TYPE 109 +# define PKCS7_R_UNKNOWN_OPERATION 110 +# define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111 +# define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112 +# define PKCS7_R_WRONG_CONTENT_TYPE 113 +# define PKCS7_R_WRONG_PKCS7_TYPE 114 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/pqueue.h b/src/Mayaqua/win32_inc/openssl/pqueue.h deleted file mode 100644 index 63933aa4..00000000 --- a/src/Mayaqua/win32_inc/openssl/pqueue.h +++ /dev/null @@ -1,99 +0,0 @@ -/* crypto/pqueue/pqueue.h */ -/* - * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. - */ -/* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_PQUEUE_H -# define HEADER_PQUEUE_H - -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif -typedef struct _pqueue *pqueue; - -typedef struct _pitem { - unsigned char priority[8]; /* 64-bit value in big-endian encoding */ - void *data; - struct _pitem *next; -} pitem; - -typedef struct _pitem *piterator; - -pitem *pitem_new(unsigned char *prio64be, void *data); -void pitem_free(pitem *item); - -pqueue pqueue_new(void); -void pqueue_free(pqueue pq); - -pitem *pqueue_insert(pqueue pq, pitem *item); -pitem *pqueue_peek(pqueue pq); -pitem *pqueue_pop(pqueue pq); -pitem *pqueue_find(pqueue pq, unsigned char *prio64be); -pitem *pqueue_iterator(pqueue pq); -pitem *pqueue_next(piterator *iter); - -void pqueue_print(pqueue pq); -int pqueue_size(pqueue pq); - -#ifdef __cplusplus -} -#endif -#endif /* ! HEADER_PQUEUE_H */ diff --git a/src/Mayaqua/win32_inc/openssl/rand.h b/src/Mayaqua/win32_inc/openssl/rand.h index b3240b80..38a2a271 100644 --- a/src/Mayaqua/win32_inc/openssl/rand.h +++ b/src/Mayaqua/win32_inc/openssl/rand.h @@ -1,150 +1,77 @@ -/* crypto/rand/rand.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RAND_H -# define HEADER_RAND_H - -# include -# include -# include - -# if defined(OPENSSL_SYS_WINDOWS) -# include -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# if defined(OPENSSL_FIPS) -# define FIPS_RAND_SIZE_T size_t -# endif - -/* Already defined in ossl_typ.h */ -/* typedef struct rand_meth_st RAND_METHOD; */ - -struct rand_meth_st { - void (*seed) (const void *buf, int num); - int (*bytes) (unsigned char *buf, int num); - void (*cleanup) (void); - void (*add) (const void *buf, int num, double entropy); - int (*pseudorand) (unsigned char *buf, int num); - int (*status) (void); -}; - -# ifdef BN_DEBUG -extern int rand_predictable; -# endif - -int RAND_set_rand_method(const RAND_METHOD *meth); -const RAND_METHOD *RAND_get_rand_method(void); -# ifndef OPENSSL_NO_ENGINE -int RAND_set_rand_engine(ENGINE *engine); -# endif -RAND_METHOD *RAND_SSLeay(void); -void RAND_cleanup(void); -int RAND_bytes(unsigned char *buf, int num); -int RAND_pseudo_bytes(unsigned char *buf, int num); -void RAND_seed(const void *buf, int num); -void RAND_add(const void *buf, int num, double entropy); -int RAND_load_file(const char *file, long max_bytes); -int RAND_write_file(const char *file); -const char *RAND_file_name(char *file, size_t num); -int RAND_status(void); -int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); -int RAND_egd(const char *path); -int RAND_egd_bytes(const char *path, int bytes); -int RAND_poll(void); - -# if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) - -void RAND_screen(void); -int RAND_event(UINT, WPARAM, LPARAM); - -# endif - -# ifdef OPENSSL_FIPS -void RAND_set_fips_drbg_type(int type, int flags); -int RAND_init_fips(void); -# endif - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_RAND_strings(void); - -/* Error codes for the RAND functions. */ - -/* Function codes. */ -# define RAND_F_RAND_GET_RAND_METHOD 101 -# define RAND_F_RAND_INIT_FIPS 102 -# define RAND_F_SSLEAY_RAND_BYTES 100 - -/* Reason codes. */ -# define RAND_R_DUAL_EC_DRBG_DISABLED 104 -# define RAND_R_ERROR_INITIALISING_DRBG 102 -# define RAND_R_ERROR_INSTANTIATING_DRBG 103 -# define RAND_R_NO_FIPS_RANDOM_METHOD_SET 101 -# define RAND_R_PRNG_NOT_SEEDED 100 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RAND_H +# define HEADER_RAND_H + +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +struct rand_meth_st { + int (*seed) (const void *buf, int num); + int (*bytes) (unsigned char *buf, int num); + void (*cleanup) (void); + int (*add) (const void *buf, int num, double randomness); + int (*pseudorand) (unsigned char *buf, int num); + int (*status) (void); +}; + +int RAND_set_rand_method(const RAND_METHOD *meth); +const RAND_METHOD *RAND_get_rand_method(void); +# ifndef OPENSSL_NO_ENGINE +int RAND_set_rand_engine(ENGINE *engine); +# endif + +RAND_METHOD *RAND_OpenSSL(void); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define RAND_cleanup() while(0) continue +# endif +int RAND_bytes(unsigned char *buf, int num); +int RAND_priv_bytes(unsigned char *buf, int num); +DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num)) + +void RAND_seed(const void *buf, int num); +void RAND_keep_random_devices_open(int keep); + +# if defined(__ANDROID__) && defined(__NDK_FPABI__) +__NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */ +# endif +void RAND_add(const void *buf, int num, double randomness); +int RAND_load_file(const char *file, long max_bytes); +int RAND_write_file(const char *file); +const char *RAND_file_name(char *file, size_t num); +int RAND_status(void); + +# ifndef OPENSSL_NO_EGD +int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); +int RAND_egd(const char *path); +int RAND_egd_bytes(const char *path, int bytes); +# endif + +int RAND_poll(void); + +# if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H)) +/* application has to include in order to use these */ +DEPRECATEDIN_1_1_0(void RAND_screen(void)) +DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM)) +# endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/rand_drbg.h b/src/Mayaqua/win32_inc/openssl/rand_drbg.h new file mode 100644 index 00000000..45b731b7 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/rand_drbg.h @@ -0,0 +1,130 @@ +/* + * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DRBG_RAND_H +# define HEADER_DRBG_RAND_H + +# include +# include +# include + +/* + * RAND_DRBG flags + * + * Note: if new flags are added, the constant `rand_drbg_used_flags` + * in drbg_lib.c needs to be updated accordingly. + */ + +/* In CTR mode, disable derivation function ctr_df */ +# define RAND_DRBG_FLAG_CTR_NO_DF 0x1 + + +# if OPENSSL_API_COMPAT < 0x10200000L +/* This #define was replaced by an internal constant and should not be used. */ +# define RAND_DRBG_USED_FLAGS (RAND_DRBG_FLAG_CTR_NO_DF) +# endif + +/* + * Default security strength (in the sense of [NIST SP 800-90Ar1]) + * + * NIST SP 800-90Ar1 supports the strength of the DRBG being smaller than that + * of the cipher by collecting less entropy. The current DRBG implementation + * does not take RAND_DRBG_STRENGTH into account and sets the strength of the + * DRBG to that of the cipher. + * + * RAND_DRBG_STRENGTH is currently only used for the legacy RAND + * implementation. + * + * Currently supported ciphers are: NID_aes_128_ctr, NID_aes_192_ctr and + * NID_aes_256_ctr + */ +# define RAND_DRBG_STRENGTH 256 +/* Default drbg type */ +# define RAND_DRBG_TYPE NID_aes_256_ctr +/* Default drbg flags */ +# define RAND_DRBG_FLAGS 0 + + +# ifdef __cplusplus +extern "C" { +# endif + +/* + * Object lifetime functions. + */ +RAND_DRBG *RAND_DRBG_new(int type, unsigned int flags, RAND_DRBG *parent); +RAND_DRBG *RAND_DRBG_secure_new(int type, unsigned int flags, RAND_DRBG *parent); +int RAND_DRBG_set(RAND_DRBG *drbg, int type, unsigned int flags); +int RAND_DRBG_set_defaults(int type, unsigned int flags); +int RAND_DRBG_instantiate(RAND_DRBG *drbg, + const unsigned char *pers, size_t perslen); +int RAND_DRBG_uninstantiate(RAND_DRBG *drbg); +void RAND_DRBG_free(RAND_DRBG *drbg); + +/* + * Object "use" functions. + */ +int RAND_DRBG_reseed(RAND_DRBG *drbg, + const unsigned char *adin, size_t adinlen, + int prediction_resistance); +int RAND_DRBG_generate(RAND_DRBG *drbg, unsigned char *out, size_t outlen, + int prediction_resistance, + const unsigned char *adin, size_t adinlen); +int RAND_DRBG_bytes(RAND_DRBG *drbg, unsigned char *out, size_t outlen); + +int RAND_DRBG_set_reseed_interval(RAND_DRBG *drbg, unsigned int interval); +int RAND_DRBG_set_reseed_time_interval(RAND_DRBG *drbg, time_t interval); + +int RAND_DRBG_set_reseed_defaults( + unsigned int master_reseed_interval, + unsigned int slave_reseed_interval, + time_t master_reseed_time_interval, + time_t slave_reseed_time_interval + ); + +RAND_DRBG *RAND_DRBG_get0_master(void); +RAND_DRBG *RAND_DRBG_get0_public(void); +RAND_DRBG *RAND_DRBG_get0_private(void); + +/* + * EXDATA + */ +# define RAND_DRBG_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG, l, p, newf, dupf, freef) +int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *arg); +void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx); + +/* + * Callback function typedefs + */ +typedef size_t (*RAND_DRBG_get_entropy_fn)(RAND_DRBG *drbg, + unsigned char **pout, + int entropy, size_t min_len, + size_t max_len, + int prediction_resistance); +typedef void (*RAND_DRBG_cleanup_entropy_fn)(RAND_DRBG *ctx, + unsigned char *out, size_t outlen); +typedef size_t (*RAND_DRBG_get_nonce_fn)(RAND_DRBG *drbg, unsigned char **pout, + int entropy, size_t min_len, + size_t max_len); +typedef void (*RAND_DRBG_cleanup_nonce_fn)(RAND_DRBG *drbg, + unsigned char *out, size_t outlen); + +int RAND_DRBG_set_callbacks(RAND_DRBG *drbg, + RAND_DRBG_get_entropy_fn get_entropy, + RAND_DRBG_cleanup_entropy_fn cleanup_entropy, + RAND_DRBG_get_nonce_fn get_nonce, + RAND_DRBG_cleanup_nonce_fn cleanup_nonce); + + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/randerr.h b/src/Mayaqua/win32_inc/openssl/randerr.h new file mode 100644 index 00000000..70d1a17a --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/randerr.h @@ -0,0 +1,92 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RANDERR_H +# define HEADER_RANDERR_H + +# include + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_RAND_strings(void); + +/* + * RAND function codes. + */ +# define RAND_F_DRBG_BYTES 101 +# define RAND_F_DRBG_GET_ENTROPY 105 +# define RAND_F_DRBG_SETUP 117 +# define RAND_F_GET_ENTROPY 106 +# define RAND_F_RAND_BYTES 100 +# define RAND_F_RAND_DRBG_ENABLE_LOCKING 119 +# define RAND_F_RAND_DRBG_GENERATE 107 +# define RAND_F_RAND_DRBG_GET_ENTROPY 120 +# define RAND_F_RAND_DRBG_GET_NONCE 123 +# define RAND_F_RAND_DRBG_INSTANTIATE 108 +# define RAND_F_RAND_DRBG_NEW 109 +# define RAND_F_RAND_DRBG_RESEED 110 +# define RAND_F_RAND_DRBG_RESTART 102 +# define RAND_F_RAND_DRBG_SET 104 +# define RAND_F_RAND_DRBG_SET_DEFAULTS 121 +# define RAND_F_RAND_DRBG_UNINSTANTIATE 118 +# define RAND_F_RAND_LOAD_FILE 111 +# define RAND_F_RAND_POOL_ACQUIRE_ENTROPY 122 +# define RAND_F_RAND_POOL_ADD 103 +# define RAND_F_RAND_POOL_ADD_BEGIN 113 +# define RAND_F_RAND_POOL_ADD_END 114 +# define RAND_F_RAND_POOL_ATTACH 124 +# define RAND_F_RAND_POOL_BYTES_NEEDED 115 +# define RAND_F_RAND_POOL_GROW 125 +# define RAND_F_RAND_POOL_NEW 116 +# define RAND_F_RAND_WRITE_FILE 112 + +/* + * RAND reason codes. + */ +# define RAND_R_ADDITIONAL_INPUT_TOO_LONG 102 +# define RAND_R_ALREADY_INSTANTIATED 103 +# define RAND_R_ARGUMENT_OUT_OF_RANGE 105 +# define RAND_R_CANNOT_OPEN_FILE 121 +# define RAND_R_DRBG_ALREADY_INITIALIZED 129 +# define RAND_R_DRBG_NOT_INITIALISED 104 +# define RAND_R_ENTROPY_INPUT_TOO_LONG 106 +# define RAND_R_ENTROPY_OUT_OF_RANGE 124 +# define RAND_R_ERROR_ENTROPY_POOL_WAS_IGNORED 127 +# define RAND_R_ERROR_INITIALISING_DRBG 107 +# define RAND_R_ERROR_INSTANTIATING_DRBG 108 +# define RAND_R_ERROR_RETRIEVING_ADDITIONAL_INPUT 109 +# define RAND_R_ERROR_RETRIEVING_ENTROPY 110 +# define RAND_R_ERROR_RETRIEVING_NONCE 111 +# define RAND_R_FAILED_TO_CREATE_LOCK 126 +# define RAND_R_FUNC_NOT_IMPLEMENTED 101 +# define RAND_R_FWRITE_ERROR 123 +# define RAND_R_GENERATE_ERROR 112 +# define RAND_R_INTERNAL_ERROR 113 +# define RAND_R_IN_ERROR_STATE 114 +# define RAND_R_NOT_A_REGULAR_FILE 122 +# define RAND_R_NOT_INSTANTIATED 115 +# define RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED 128 +# define RAND_R_PARENT_LOCKING_NOT_ENABLED 130 +# define RAND_R_PARENT_STRENGTH_TOO_WEAK 131 +# define RAND_R_PERSONALISATION_STRING_TOO_LONG 116 +# define RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED 133 +# define RAND_R_PRNG_NOT_SEEDED 100 +# define RAND_R_RANDOM_POOL_OVERFLOW 125 +# define RAND_R_RANDOM_POOL_UNDERFLOW 134 +# define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117 +# define RAND_R_RESEED_ERROR 118 +# define RAND_R_SELFTEST_FAILURE 119 +# define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135 +# define RAND_R_TOO_MUCH_NONCE_REQUESTED 136 +# define RAND_R_UNSUPPORTED_DRBG_FLAGS 132 +# define RAND_R_UNSUPPORTED_DRBG_TYPE 120 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/rc2.h b/src/Mayaqua/win32_inc/openssl/rc2.h index ab6424a0..585f9e4c 100644 --- a/src/Mayaqua/win32_inc/openssl/rc2.h +++ b/src/Mayaqua/win32_inc/openssl/rc2.h @@ -1,103 +1,51 @@ -/* crypto/rc2/rc2.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RC2_H -# define HEADER_RC2_H - -# include /* OPENSSL_NO_RC2, RC2_INT */ -# ifdef OPENSSL_NO_RC2 -# error RC2 is disabled. -# endif - -# define RC2_ENCRYPT 1 -# define RC2_DECRYPT 0 - -# define RC2_BLOCK 8 -# define RC2_KEY_LENGTH 16 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct rc2_key_st { - RC2_INT data[64]; -} RC2_KEY; - -# ifdef OPENSSL_FIPS -void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, - int bits); -# endif -void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); -void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, - RC2_KEY *key, int enc); -void RC2_encrypt(unsigned long *data, RC2_KEY *key); -void RC2_decrypt(unsigned long *data, RC2_KEY *key); -void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - RC2_KEY *ks, unsigned char *iv, int enc); -void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, RC2_KEY *schedule, unsigned char *ivec, - int *num, int enc); -void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, RC2_KEY *schedule, unsigned char *ivec, - int *num); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RC2_H +# define HEADER_RC2_H + +# include + +# ifndef OPENSSL_NO_RC2 +# ifdef __cplusplus +extern "C" { +# endif + +typedef unsigned int RC2_INT; + +# define RC2_ENCRYPT 1 +# define RC2_DECRYPT 0 + +# define RC2_BLOCK 8 +# define RC2_KEY_LENGTH 16 + +typedef struct rc2_key_st { + RC2_INT data[64]; +} RC2_KEY; + +void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); +void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, + RC2_KEY *key, int enc); +void RC2_encrypt(unsigned long *data, RC2_KEY *key); +void RC2_decrypt(unsigned long *data, RC2_KEY *key); +void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, + RC2_KEY *ks, unsigned char *iv, int enc); +void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC2_KEY *schedule, unsigned char *ivec, + int *num, int enc); +void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC2_KEY *schedule, unsigned char *ivec, + int *num); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/rc4.h b/src/Mayaqua/win32_inc/openssl/rc4.h index c08ec3f5..86803b37 100644 --- a/src/Mayaqua/win32_inc/openssl/rc4.h +++ b/src/Mayaqua/win32_inc/openssl/rc4.h @@ -1,88 +1,36 @@ -/* crypto/rc4/rc4.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RC4_H -# define HEADER_RC4_H - -# include /* OPENSSL_NO_RC4, RC4_INT */ -# ifdef OPENSSL_NO_RC4 -# error RC4 is disabled. -# endif - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct rc4_key_st { - RC4_INT x, y; - RC4_INT data[256]; -} RC4_KEY; - -const char *RC4_options(void); -void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); -void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); -void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, - unsigned char *outdata); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RC4_H +# define HEADER_RC4_H + +# include + +# ifndef OPENSSL_NO_RC4 +# include +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct rc4_key_st { + RC4_INT x, y; + RC4_INT data[256]; +} RC4_KEY; + +const char *RC4_options(void); +void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); +void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, + unsigned char *outdata); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/rc5.h b/src/Mayaqua/win32_inc/openssl/rc5.h new file mode 100644 index 00000000..793f88e4 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/rc5.h @@ -0,0 +1,63 @@ +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RC5_H +# define HEADER_RC5_H + +# include + +# ifndef OPENSSL_NO_RC5 +# ifdef __cplusplus +extern "C" { +# endif + +# define RC5_ENCRYPT 1 +# define RC5_DECRYPT 0 + +# define RC5_32_INT unsigned int + +# define RC5_32_BLOCK 8 +# define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ + +/* + * This are the only values supported. Tweak the code if you want more The + * most supported modes will be RC5-32/12/16 RC5-32/16/8 + */ +# define RC5_8_ROUNDS 8 +# define RC5_12_ROUNDS 12 +# define RC5_16_ROUNDS 16 + +typedef struct rc5_key_st { + /* Number of rounds */ + int rounds; + RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; +} RC5_32_KEY; + +void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, + int rounds); +void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out, + RC5_32_KEY *key, int enc); +void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); +void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); +void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, + long length, RC5_32_KEY *ks, unsigned char *iv, + int enc); +void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC5_32_KEY *schedule, + unsigned char *ivec, int *num, int enc); +void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC5_32_KEY *schedule, + unsigned char *ivec, int *num); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ripemd.h b/src/Mayaqua/win32_inc/openssl/ripemd.h index a4dfcbcf..c42026aa 100644 --- a/src/Mayaqua/win32_inc/openssl/ripemd.h +++ b/src/Mayaqua/win32_inc/openssl/ripemd.h @@ -1,105 +1,47 @@ -/* crypto/ripemd/ripemd.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RIPEMD_H -# define HEADER_RIPEMD_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_NO_RIPEMD -# error RIPEMD is disabled. -# endif - -# if defined(__LP32__) -# define RIPEMD160_LONG unsigned long -# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -# define RIPEMD160_LONG unsigned long -# define RIPEMD160_LONG_LOG2 3 -# else -# define RIPEMD160_LONG unsigned int -# endif - -# define RIPEMD160_CBLOCK 64 -# define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) -# define RIPEMD160_DIGEST_LENGTH 20 - -typedef struct RIPEMD160state_st { - RIPEMD160_LONG A, B, C, D, E; - RIPEMD160_LONG Nl, Nh; - RIPEMD160_LONG data[RIPEMD160_LBLOCK]; - unsigned int num; -} RIPEMD160_CTX; - -# ifdef OPENSSL_FIPS -int private_RIPEMD160_Init(RIPEMD160_CTX *c); -# endif -int RIPEMD160_Init(RIPEMD160_CTX *c); -int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); -int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); -unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); -void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RIPEMD_H +# define HEADER_RIPEMD_H + +# include + +#ifndef OPENSSL_NO_RMD160 +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +# define RIPEMD160_LONG unsigned int + +# define RIPEMD160_CBLOCK 64 +# define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) +# define RIPEMD160_DIGEST_LENGTH 20 + +typedef struct RIPEMD160state_st { + RIPEMD160_LONG A, B, C, D, E; + RIPEMD160_LONG Nl, Nh; + RIPEMD160_LONG data[RIPEMD160_LBLOCK]; + unsigned int num; +} RIPEMD160_CTX; + +int RIPEMD160_Init(RIPEMD160_CTX *c); +int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); +int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); +unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); +void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); + +# ifdef __cplusplus +} +# endif +# endif + + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/rsa.h b/src/Mayaqua/win32_inc/openssl/rsa.h index 79d01d8d..cdce1264 100644 --- a/src/Mayaqua/win32_inc/openssl/rsa.h +++ b/src/Mayaqua/win32_inc/openssl/rsa.h @@ -1,664 +1,512 @@ -/* crypto/rsa/rsa.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_RSA_H -# define HEADER_RSA_H - -# include - -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# include -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif - -# ifdef OPENSSL_NO_RSA -# error RSA is disabled. -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Declared already in ossl_typ.h */ -/* typedef struct rsa_st RSA; */ -/* typedef struct rsa_meth_st RSA_METHOD; */ - -struct rsa_meth_st { - const char *name; - int (*rsa_pub_enc) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); - int (*rsa_pub_dec) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); - int (*rsa_priv_enc) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); - int (*rsa_priv_dec) (int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); - /* Can be null */ - int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); - /* Can be null */ - int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - /* called at new */ - int (*init) (RSA *rsa); - /* called at free */ - int (*finish) (RSA *rsa); - /* RSA_METHOD_FLAG_* things */ - int flags; - /* may be needed! */ - char *app_data; - /* - * New sign and verify functions: some libraries don't allow arbitrary - * data to be signed/verified: this allows them to be used. Note: for - * this to work the RSA_public_decrypt() and RSA_private_encrypt() should - * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note: - * for backwards compatibility this functionality is only enabled if the - * RSA_FLAG_SIGN_VER option is set in 'flags'. - */ - int (*rsa_sign) (int type, - const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, - const RSA *rsa); - int (*rsa_verify) (int dtype, const unsigned char *m, - unsigned int m_length, const unsigned char *sigbuf, - unsigned int siglen, const RSA *rsa); - /* - * If this callback is NULL, the builtin software RSA key-gen will be - * used. This is for behavioural compatibility whilst the code gets - * rewired, but one day it would be nice to assume there are no such - * things as "builtin software" implementations. - */ - int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); -}; - -struct rsa_st { - /* - * The first parameter is used to pickup errors where this is passed - * instead of aEVP_PKEY, it is set to 0 - */ - int pad; - long version; - const RSA_METHOD *meth; - /* functional reference if 'meth' is ENGINE-provided */ - ENGINE *engine; - BIGNUM *n; - BIGNUM *e; - BIGNUM *d; - BIGNUM *p; - BIGNUM *q; - BIGNUM *dmp1; - BIGNUM *dmq1; - BIGNUM *iqmp; - /* be careful using this if the RSA structure is shared */ - CRYPTO_EX_DATA ex_data; - int references; - int flags; - /* Used to cache montgomery values */ - BN_MONT_CTX *_method_mod_n; - BN_MONT_CTX *_method_mod_p; - BN_MONT_CTX *_method_mod_q; - /* - * all BIGNUM values are actually in the following data, if it is not - * NULL - */ - char *bignum_data; - BN_BLINDING *blinding; - BN_BLINDING *mt_blinding; -}; - -# ifndef OPENSSL_RSA_MAX_MODULUS_BITS -# define OPENSSL_RSA_MAX_MODULUS_BITS 16384 -# endif - -# ifndef OPENSSL_RSA_SMALL_MODULUS_BITS -# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 -# endif -# ifndef OPENSSL_RSA_MAX_PUBEXP_BITS - -/* exponent limit enforced for "large" modulus only */ -# define OPENSSL_RSA_MAX_PUBEXP_BITS 64 -# endif - -# define RSA_3 0x3L -# define RSA_F4 0x10001L - -# define RSA_METHOD_FLAG_NO_CHECK 0x0001/* don't check pub/private - * match */ - -# define RSA_FLAG_CACHE_PUBLIC 0x0002 -# define RSA_FLAG_CACHE_PRIVATE 0x0004 -# define RSA_FLAG_BLINDING 0x0008 -# define RSA_FLAG_THREAD_SAFE 0x0010 -/* - * This flag means the private key operations will be handled by rsa_mod_exp - * and that they do not depend on the private key components being present: - * for example a key stored in external hardware. Without this flag - * bn_mod_exp gets called when private key components are absent. - */ -# define RSA_FLAG_EXT_PKEY 0x0020 - -/* - * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify - * functions. - */ -# define RSA_FLAG_SIGN_VER 0x0040 - -/* - * new with 0.9.6j and 0.9.7b; the built-in - * RSA implementation now uses blinding by - * default (ignoring RSA_FLAG_BLINDING), - * but other engines might not need it - */ -# define RSA_FLAG_NO_BLINDING 0x0080 -/* - * new with 0.9.8f; the built-in RSA - * implementation now uses constant time - * operations by default in private key operations, - * e.g., constant time modular exponentiation, - * modular inverse without leaking branches, - * division without leaking branches. This - * flag disables these constant time - * operations and results in faster RSA - * private key operations. - */ -# define RSA_FLAG_NO_CONSTTIME 0x0100 -# ifdef OPENSSL_USE_DEPRECATED -/* deprecated name for the flag*/ -/* - * new with 0.9.7h; the built-in RSA - * implementation now uses constant time - * modular exponentiation for secret exponents - * by default. This flag causes the - * faster variable sliding window method to - * be used for all exponents. - */ -# define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME -# endif - -# define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \ - pad, NULL) - -# define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, \ - EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad) - -# define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \ - (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ - EVP_PKEY_CTRL_RSA_PSS_SALTLEN, \ - len, NULL) - -# define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \ - (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ - EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, \ - 0, plen) - -# define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN, \ - EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL) - -# define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN, \ - EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp) - -# define EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \ - EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ - EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)md) - -# define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ - EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)md) - -# define EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \ - EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ - EVP_PKEY_CTRL_GET_RSA_MGF1_MD, 0, (void *)pmd) - -# define EVP_PKEY_CTX_get_rsa_oaep_md(ctx, pmd) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ - EVP_PKEY_CTRL_GET_RSA_OAEP_MD, 0, (void *)pmd) - -# define EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, l, llen) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ - EVP_PKEY_CTRL_RSA_OAEP_LABEL, llen, (void *)l) - -# define EVP_PKEY_CTX_get0_rsa_oaep_label(ctx, l) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ - EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)l) - -# define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1) -# define EVP_PKEY_CTRL_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 2) - -# define EVP_PKEY_CTRL_RSA_KEYGEN_BITS (EVP_PKEY_ALG_CTRL + 3) -# define EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP (EVP_PKEY_ALG_CTRL + 4) -# define EVP_PKEY_CTRL_RSA_MGF1_MD (EVP_PKEY_ALG_CTRL + 5) - -# define EVP_PKEY_CTRL_GET_RSA_PADDING (EVP_PKEY_ALG_CTRL + 6) -# define EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 7) -# define EVP_PKEY_CTRL_GET_RSA_MGF1_MD (EVP_PKEY_ALG_CTRL + 8) - -# define EVP_PKEY_CTRL_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 9) -# define EVP_PKEY_CTRL_RSA_OAEP_LABEL (EVP_PKEY_ALG_CTRL + 10) - -# define EVP_PKEY_CTRL_GET_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 11) -# define EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL (EVP_PKEY_ALG_CTRL + 12) - -# define RSA_PKCS1_PADDING 1 -# define RSA_SSLV23_PADDING 2 -# define RSA_NO_PADDING 3 -# define RSA_PKCS1_OAEP_PADDING 4 -# define RSA_X931_PADDING 5 -/* EVP_PKEY_ only */ -# define RSA_PKCS1_PSS_PADDING 6 - -# define RSA_PKCS1_PADDING_SIZE 11 - -# define RSA_set_app_data(s,arg) RSA_set_ex_data(s,0,arg) -# define RSA_get_app_data(s) RSA_get_ex_data(s,0) - -RSA *RSA_new(void); -RSA *RSA_new_method(ENGINE *engine); -int RSA_size(const RSA *rsa); - -/* Deprecated version */ -# ifndef OPENSSL_NO_DEPRECATED -RSA *RSA_generate_key(int bits, unsigned long e, void - (*callback) (int, int, void *), void *cb_arg); -# endif /* !defined(OPENSSL_NO_DEPRECATED) */ - -/* New version */ -int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); - -int RSA_check_key(const RSA *); - /* next 4 return -1 on error */ -int RSA_public_encrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); -int RSA_private_encrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); -int RSA_public_decrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); -int RSA_private_decrypt(int flen, const unsigned char *from, - unsigned char *to, RSA *rsa, int padding); -void RSA_free(RSA *r); -/* "up" the RSA object's reference count */ -int RSA_up_ref(RSA *r); - -int RSA_flags(const RSA *r); - -void RSA_set_default_method(const RSA_METHOD *meth); -const RSA_METHOD *RSA_get_default_method(void); -const RSA_METHOD *RSA_get_method(const RSA *rsa); -int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); - -/* This function needs the memory locking malloc callbacks to be installed */ -int RSA_memory_lock(RSA *r); - -/* these are the actual SSLeay RSA functions */ -const RSA_METHOD *RSA_PKCS1_SSLeay(void); - -const RSA_METHOD *RSA_null_method(void); - -DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey) - -typedef struct rsa_pss_params_st { - X509_ALGOR *hashAlgorithm; - X509_ALGOR *maskGenAlgorithm; - ASN1_INTEGER *saltLength; - ASN1_INTEGER *trailerField; -} RSA_PSS_PARAMS; - -DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS) - -typedef struct rsa_oaep_params_st { - X509_ALGOR *hashFunc; - X509_ALGOR *maskGenFunc; - X509_ALGOR *pSourceFunc; -} RSA_OAEP_PARAMS; - -DECLARE_ASN1_FUNCTIONS(RSA_OAEP_PARAMS) - -# ifndef OPENSSL_NO_FP_API -int RSA_print_fp(FILE *fp, const RSA *r, int offset); -# endif - -# ifndef OPENSSL_NO_BIO -int RSA_print(BIO *bp, const RSA *r, int offset); -# endif - -# ifndef OPENSSL_NO_RC4 -int i2d_RSA_NET(const RSA *a, unsigned char **pp, - int (*cb) (char *buf, int len, const char *prompt, - int verify), int sgckey); -RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length, - int (*cb) (char *buf, int len, const char *prompt, - int verify), int sgckey); - -int i2d_Netscape_RSA(const RSA *a, unsigned char **pp, - int (*cb) (char *buf, int len, const char *prompt, - int verify)); -RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, - int (*cb) (char *buf, int len, const char *prompt, - int verify)); -# endif - -/* - * The following 2 functions sign and verify a X509_SIG ASN1 object inside - * PKCS#1 padded RSA encryption - */ -int RSA_sign(int type, const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, RSA *rsa); -int RSA_verify(int type, const unsigned char *m, unsigned int m_length, - const unsigned char *sigbuf, unsigned int siglen, RSA *rsa); - -/* - * The following 2 function sign and verify a ASN1_OCTET_STRING object inside - * PKCS#1 padded RSA encryption - */ -int RSA_sign_ASN1_OCTET_STRING(int type, - const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, - RSA *rsa); -int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m, - unsigned int m_length, unsigned char *sigbuf, - unsigned int siglen, RSA *rsa); - -int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); -void RSA_blinding_off(RSA *rsa); -BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); - -int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, - const unsigned char *f, int fl); -int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, - const unsigned char *f, int fl, - int rsa_len); -int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, - const unsigned char *f, int fl); -int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, - const unsigned char *f, int fl, - int rsa_len); -int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, - long seedlen, const EVP_MD *dgst); -int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, - const unsigned char *f, int fl, - const unsigned char *p, int pl); -int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, - const unsigned char *f, int fl, int rsa_len, - const unsigned char *p, int pl); -int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, - const unsigned char *from, int flen, - const unsigned char *param, int plen, - const EVP_MD *md, const EVP_MD *mgf1md); -int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, - const unsigned char *from, int flen, - int num, const unsigned char *param, - int plen, const EVP_MD *md, - const EVP_MD *mgf1md); -int RSA_padding_add_SSLv23(unsigned char *to, int tlen, - const unsigned char *f, int fl); -int RSA_padding_check_SSLv23(unsigned char *to, int tlen, - const unsigned char *f, int fl, int rsa_len); -int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f, - int fl); -int RSA_padding_check_none(unsigned char *to, int tlen, - const unsigned char *f, int fl, int rsa_len); -int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f, - int fl); -int RSA_padding_check_X931(unsigned char *to, int tlen, - const unsigned char *f, int fl, int rsa_len); -int RSA_X931_hash_id(int nid); - -int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, - const EVP_MD *Hash, const unsigned char *EM, - int sLen); -int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, - const unsigned char *mHash, const EVP_MD *Hash, - int sLen); - -int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, - const EVP_MD *Hash, const EVP_MD *mgf1Hash, - const unsigned char *EM, int sLen); - -int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, - const unsigned char *mHash, - const EVP_MD *Hash, const EVP_MD *mgf1Hash, - int sLen); - -int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int RSA_set_ex_data(RSA *r, int idx, void *arg); -void *RSA_get_ex_data(const RSA *r, int idx); - -RSA *RSAPublicKey_dup(RSA *rsa); -RSA *RSAPrivateKey_dup(RSA *rsa); - -/* - * If this flag is set the RSA method is FIPS compliant and can be used in - * FIPS mode. This is set in the validated module method. If an application - * sets this flag in its own methods it is its responsibility to ensure the - * result is compliant. - */ - -# define RSA_FLAG_FIPS_METHOD 0x0400 - -/* - * If this flag is set the operations normally disabled in FIPS mode are - * permitted it is then the applications responsibility to ensure that the - * usage is compliant. - */ - -# define RSA_FLAG_NON_FIPS_ALLOW 0x0400 -/* - * Application has decided PRNG is good enough to generate a key: don't - * check. - */ -# define RSA_FLAG_CHECKED 0x0800 - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_RSA_strings(void); - -/* Error codes for the RSA functions. */ - -/* Function codes. */ -# define RSA_F_CHECK_PADDING_MD 140 -# define RSA_F_DO_RSA_PRINT 146 -# define RSA_F_INT_RSA_VERIFY 145 -# define RSA_F_MEMORY_LOCK 100 -# define RSA_F_OLD_RSA_PRIV_DECODE 147 -# define RSA_F_PKEY_RSA_CTRL 143 -# define RSA_F_PKEY_RSA_CTRL_STR 144 -# define RSA_F_PKEY_RSA_SIGN 142 -# define RSA_F_PKEY_RSA_VERIFY 154 -# define RSA_F_PKEY_RSA_VERIFYRECOVER 141 -# define RSA_F_RSA_ALGOR_TO_MD 157 -# define RSA_F_RSA_BUILTIN_KEYGEN 129 -# define RSA_F_RSA_CHECK_KEY 123 -# define RSA_F_RSA_CMS_DECRYPT 158 -# define RSA_F_RSA_EAY_PRIVATE_DECRYPT 101 -# define RSA_F_RSA_EAY_PRIVATE_ENCRYPT 102 -# define RSA_F_RSA_EAY_PUBLIC_DECRYPT 103 -# define RSA_F_RSA_EAY_PUBLIC_ENCRYPT 104 -# define RSA_F_RSA_GENERATE_KEY 105 -# define RSA_F_RSA_GENERATE_KEY_EX 155 -# define RSA_F_RSA_ITEM_VERIFY 156 -# define RSA_F_RSA_MEMORY_LOCK 130 -# define RSA_F_RSA_MGF1_TO_MD 159 -# define RSA_F_RSA_NEW_METHOD 106 -# define RSA_F_RSA_NULL 124 -# define RSA_F_RSA_NULL_MOD_EXP 131 -# define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132 -# define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 133 -# define RSA_F_RSA_NULL_PUBLIC_DECRYPT 134 -# define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 135 -# define RSA_F_RSA_PADDING_ADD_NONE 107 -# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121 -# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 160 -# define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 125 -# define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1 148 -# define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 108 -# define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 109 -# define RSA_F_RSA_PADDING_ADD_SSLV23 110 -# define RSA_F_RSA_PADDING_ADD_X931 127 -# define RSA_F_RSA_PADDING_CHECK_NONE 111 -# define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 122 -# define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1 161 -# define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 112 -# define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 113 -# define RSA_F_RSA_PADDING_CHECK_SSLV23 114 -# define RSA_F_RSA_PADDING_CHECK_X931 128 -# define RSA_F_RSA_PRINT 115 -# define RSA_F_RSA_PRINT_FP 116 -# define RSA_F_RSA_PRIVATE_DECRYPT 150 -# define RSA_F_RSA_PRIVATE_ENCRYPT 151 -# define RSA_F_RSA_PRIV_DECODE 137 -# define RSA_F_RSA_PRIV_ENCODE 138 -# define RSA_F_RSA_PSS_TO_CTX 162 -# define RSA_F_RSA_PUBLIC_DECRYPT 152 -# define RSA_F_RSA_PUBLIC_ENCRYPT 153 -# define RSA_F_RSA_PUB_DECODE 139 -# define RSA_F_RSA_SETUP_BLINDING 136 -# define RSA_F_RSA_SIGN 117 -# define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118 -# define RSA_F_RSA_VERIFY 119 -# define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120 -# define RSA_F_RSA_VERIFY_PKCS1_PSS 126 -# define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 149 - -/* Reason codes. */ -# define RSA_R_ALGORITHM_MISMATCH 100 -# define RSA_R_BAD_E_VALUE 101 -# define RSA_R_BAD_FIXED_HEADER_DECRYPT 102 -# define RSA_R_BAD_PAD_BYTE_COUNT 103 -# define RSA_R_BAD_SIGNATURE 104 -# define RSA_R_BLOCK_TYPE_IS_NOT_01 106 -# define RSA_R_BLOCK_TYPE_IS_NOT_02 107 -# define RSA_R_DATA_GREATER_THAN_MOD_LEN 108 -# define RSA_R_DATA_TOO_LARGE 109 -# define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110 -# define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 132 -# define RSA_R_DATA_TOO_SMALL 111 -# define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122 -# define RSA_R_DIGEST_DOES_NOT_MATCH 166 -# define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112 -# define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124 -# define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125 -# define RSA_R_D_E_NOT_CONGRUENT_TO_1 123 -# define RSA_R_FIRST_OCTET_INVALID 133 -# define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE 144 -# define RSA_R_INVALID_DIGEST 160 -# define RSA_R_INVALID_DIGEST_LENGTH 143 -# define RSA_R_INVALID_HEADER 137 -# define RSA_R_INVALID_KEYBITS 145 -# define RSA_R_INVALID_LABEL 161 -# define RSA_R_INVALID_MESSAGE_LENGTH 131 -# define RSA_R_INVALID_MGF1_MD 156 -# define RSA_R_INVALID_OAEP_PARAMETERS 162 -# define RSA_R_INVALID_PADDING 138 -# define RSA_R_INVALID_PADDING_MODE 141 -# define RSA_R_INVALID_PSS_PARAMETERS 149 -# define RSA_R_INVALID_PSS_SALTLEN 146 -# define RSA_R_INVALID_SALT_LENGTH 150 -# define RSA_R_INVALID_TRAILER 139 -# define RSA_R_INVALID_X931_DIGEST 142 -# define RSA_R_IQMP_NOT_INVERSE_OF_Q 126 -# define RSA_R_KEY_SIZE_TOO_SMALL 120 -# define RSA_R_LAST_OCTET_INVALID 134 -# define RSA_R_MODULUS_TOO_LARGE 105 -# define RSA_R_NON_FIPS_RSA_METHOD 157 -# define RSA_R_NO_PUBLIC_EXPONENT 140 -# define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 -# define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 -# define RSA_R_OAEP_DECODING_ERROR 121 -# define RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 158 -# define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 148 -# define RSA_R_PADDING_CHECK_FAILED 114 -# define RSA_R_PKCS_DECODING_ERROR 159 -# define RSA_R_P_NOT_PRIME 128 -# define RSA_R_Q_NOT_PRIME 129 -# define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130 -# define RSA_R_SLEN_CHECK_FAILED 136 -# define RSA_R_SLEN_RECOVERY_FAILED 135 -# define RSA_R_SSLV3_ROLLBACK_ATTACK 115 -# define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116 -# define RSA_R_UNKNOWN_ALGORITHM_TYPE 117 -# define RSA_R_UNKNOWN_DIGEST 163 -# define RSA_R_UNKNOWN_MASK_DIGEST 151 -# define RSA_R_UNKNOWN_PADDING_TYPE 118 -# define RSA_R_UNKNOWN_PSS_DIGEST 152 -# define RSA_R_UNSUPPORTED_ENCRYPTION_TYPE 164 -# define RSA_R_UNSUPPORTED_LABEL_SOURCE 165 -# define RSA_R_UNSUPPORTED_MASK_ALGORITHM 153 -# define RSA_R_UNSUPPORTED_MASK_PARAMETER 154 -# define RSA_R_UNSUPPORTED_SIGNATURE_TYPE 155 -# define RSA_R_VALUE_MISSING 147 -# define RSA_R_WRONG_SIGNATURE_LENGTH 119 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RSA_H +# define HEADER_RSA_H + +# include + +# ifndef OPENSSL_NO_RSA +# include +# include +# include +# include +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif +# include +# ifdef __cplusplus +extern "C" { +# endif + +/* The types RSA and RSA_METHOD are defined in ossl_typ.h */ + +# ifndef OPENSSL_RSA_MAX_MODULUS_BITS +# define OPENSSL_RSA_MAX_MODULUS_BITS 16384 +# endif + +# define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 1024 + +# ifndef OPENSSL_RSA_SMALL_MODULUS_BITS +# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 +# endif +# ifndef OPENSSL_RSA_MAX_PUBEXP_BITS + +/* exponent limit enforced for "large" modulus only */ +# define OPENSSL_RSA_MAX_PUBEXP_BITS 64 +# endif + +# define RSA_3 0x3L +# define RSA_F4 0x10001L + +/* based on RFC 8017 appendix A.1.2 */ +# define RSA_ASN1_VERSION_DEFAULT 0 +# define RSA_ASN1_VERSION_MULTI 1 + +# define RSA_DEFAULT_PRIME_NUM 2 + +# define RSA_METHOD_FLAG_NO_CHECK 0x0001/* don't check pub/private + * match */ + +# define RSA_FLAG_CACHE_PUBLIC 0x0002 +# define RSA_FLAG_CACHE_PRIVATE 0x0004 +# define RSA_FLAG_BLINDING 0x0008 +# define RSA_FLAG_THREAD_SAFE 0x0010 +/* + * This flag means the private key operations will be handled by rsa_mod_exp + * and that they do not depend on the private key components being present: + * for example a key stored in external hardware. Without this flag + * bn_mod_exp gets called when private key components are absent. + */ +# define RSA_FLAG_EXT_PKEY 0x0020 + +/* + * new with 0.9.6j and 0.9.7b; the built-in + * RSA implementation now uses blinding by + * default (ignoring RSA_FLAG_BLINDING), + * but other engines might not need it + */ +# define RSA_FLAG_NO_BLINDING 0x0080 +# if OPENSSL_API_COMPAT < 0x10100000L +/* + * Does nothing. Previously this switched off constant time behaviour. + */ +# define RSA_FLAG_NO_CONSTTIME 0x0000 +# endif +# if OPENSSL_API_COMPAT < 0x00908000L +/* deprecated name for the flag*/ +/* + * new with 0.9.7h; the built-in RSA + * implementation now uses constant time + * modular exponentiation for secret exponents + * by default. This flag causes the + * faster variable sliding window method to + * be used for all exponents. + */ +# define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME +# endif + +# define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ + RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_RSA_PADDING, pad, NULL) + +# define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \ + RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad) + +# define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \ + RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ + EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) +/* Salt length matches digest */ +# define RSA_PSS_SALTLEN_DIGEST -1 +/* Verify only: auto detect salt length */ +# define RSA_PSS_SALTLEN_AUTO -2 +/* Set salt length to maximum possible */ +# define RSA_PSS_SALTLEN_MAX -3 +/* Old compatible max salt length for sign only */ +# define RSA_PSS_SALTLEN_MAX_SIGN -2 + +# define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) + +# define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \ + RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ + EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, 0, plen) + +# define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \ + RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL) + +# define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \ + RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp) + +# define EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) \ + RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES, primes, NULL) + +# define EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md) \ + RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ + EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ + EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ + EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)(md)) + +# define EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \ + RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ + EVP_PKEY_CTRL_GET_RSA_MGF1_MD, 0, (void *)(pmd)) + +# define EVP_PKEY_CTX_get_rsa_oaep_md(ctx, pmd) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ + EVP_PKEY_CTRL_GET_RSA_OAEP_MD, 0, (void *)(pmd)) + +# define EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, l, llen) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ + EVP_PKEY_CTRL_RSA_OAEP_LABEL, llen, (void *)(l)) + +# define EVP_PKEY_CTX_get0_rsa_oaep_label(ctx, l) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ + EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)(l)) + +# define EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, \ + EVP_PKEY_OP_KEYGEN, EVP_PKEY_CTRL_MD, \ + 0, (void *)(md)) + +# define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1) +# define EVP_PKEY_CTRL_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 2) + +# define EVP_PKEY_CTRL_RSA_KEYGEN_BITS (EVP_PKEY_ALG_CTRL + 3) +# define EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP (EVP_PKEY_ALG_CTRL + 4) +# define EVP_PKEY_CTRL_RSA_MGF1_MD (EVP_PKEY_ALG_CTRL + 5) + +# define EVP_PKEY_CTRL_GET_RSA_PADDING (EVP_PKEY_ALG_CTRL + 6) +# define EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 7) +# define EVP_PKEY_CTRL_GET_RSA_MGF1_MD (EVP_PKEY_ALG_CTRL + 8) + +# define EVP_PKEY_CTRL_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 9) +# define EVP_PKEY_CTRL_RSA_OAEP_LABEL (EVP_PKEY_ALG_CTRL + 10) + +# define EVP_PKEY_CTRL_GET_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 11) +# define EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL (EVP_PKEY_ALG_CTRL + 12) + +# define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES (EVP_PKEY_ALG_CTRL + 13) + +# define RSA_PKCS1_PADDING 1 +# define RSA_SSLV23_PADDING 2 +# define RSA_NO_PADDING 3 +# define RSA_PKCS1_OAEP_PADDING 4 +# define RSA_X931_PADDING 5 +/* EVP_PKEY_ only */ +# define RSA_PKCS1_PSS_PADDING 6 + +# define RSA_PKCS1_PADDING_SIZE 11 + +# define RSA_set_app_data(s,arg) RSA_set_ex_data(s,0,arg) +# define RSA_get_app_data(s) RSA_get_ex_data(s,0) + +RSA *RSA_new(void); +RSA *RSA_new_method(ENGINE *engine); +int RSA_bits(const RSA *rsa); +int RSA_size(const RSA *rsa); +int RSA_security_bits(const RSA *rsa); + +int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); +int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); +int RSA_set0_crt_params(RSA *r,BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); +int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], + BIGNUM *coeffs[], int pnum); +void RSA_get0_key(const RSA *r, + const BIGNUM **n, const BIGNUM **e, const BIGNUM **d); +void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); +int RSA_get_multi_prime_extra_count(const RSA *r); +int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]); +void RSA_get0_crt_params(const RSA *r, + const BIGNUM **dmp1, const BIGNUM **dmq1, + const BIGNUM **iqmp); +int RSA_get0_multi_prime_crt_params(const RSA *r, const BIGNUM *exps[], + const BIGNUM *coeffs[]); +const BIGNUM *RSA_get0_n(const RSA *d); +const BIGNUM *RSA_get0_e(const RSA *d); +const BIGNUM *RSA_get0_d(const RSA *d); +const BIGNUM *RSA_get0_p(const RSA *d); +const BIGNUM *RSA_get0_q(const RSA *d); +const BIGNUM *RSA_get0_dmp1(const RSA *r); +const BIGNUM *RSA_get0_dmq1(const RSA *r); +const BIGNUM *RSA_get0_iqmp(const RSA *r); +void RSA_clear_flags(RSA *r, int flags); +int RSA_test_flags(const RSA *r, int flags); +void RSA_set_flags(RSA *r, int flags); +int RSA_get_version(RSA *r); +ENGINE *RSA_get0_engine(const RSA *r); + +/* Deprecated version */ +DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void + (*callback) (int, int, void *), + void *cb_arg)) + +/* New version */ +int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); +/* Multi-prime version */ +int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, + BIGNUM *e, BN_GENCB *cb); + +int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, + BIGNUM *q2, const BIGNUM *Xp1, const BIGNUM *Xp2, + const BIGNUM *Xp, const BIGNUM *Xq1, const BIGNUM *Xq2, + const BIGNUM *Xq, const BIGNUM *e, BN_GENCB *cb); +int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, + BN_GENCB *cb); + +int RSA_check_key(const RSA *); +int RSA_check_key_ex(const RSA *, BN_GENCB *cb); + /* next 4 return -1 on error */ +int RSA_public_encrypt(int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_private_encrypt(int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_public_decrypt(int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_private_decrypt(int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +void RSA_free(RSA *r); +/* "up" the RSA object's reference count */ +int RSA_up_ref(RSA *r); + +int RSA_flags(const RSA *r); + +void RSA_set_default_method(const RSA_METHOD *meth); +const RSA_METHOD *RSA_get_default_method(void); +const RSA_METHOD *RSA_null_method(void); +const RSA_METHOD *RSA_get_method(const RSA *rsa); +int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); + +/* these are the actual RSA functions */ +const RSA_METHOD *RSA_PKCS1_OpenSSL(void); + +int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2); + +DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey) + +typedef struct rsa_pss_params_st { + X509_ALGOR *hashAlgorithm; + X509_ALGOR *maskGenAlgorithm; + ASN1_INTEGER *saltLength; + ASN1_INTEGER *trailerField; + /* Decoded hash algorithm from maskGenAlgorithm */ + X509_ALGOR *maskHash; +} RSA_PSS_PARAMS; + +DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS) + +typedef struct rsa_oaep_params_st { + X509_ALGOR *hashFunc; + X509_ALGOR *maskGenFunc; + X509_ALGOR *pSourceFunc; + /* Decoded hash algorithm from maskGenFunc */ + X509_ALGOR *maskHash; +} RSA_OAEP_PARAMS; + +DECLARE_ASN1_FUNCTIONS(RSA_OAEP_PARAMS) + +# ifndef OPENSSL_NO_STDIO +int RSA_print_fp(FILE *fp, const RSA *r, int offset); +# endif + +int RSA_print(BIO *bp, const RSA *r, int offset); + +/* + * The following 2 functions sign and verify a X509_SIG ASN1 object inside + * PKCS#1 padded RSA encryption + */ +int RSA_sign(int type, const unsigned char *m, unsigned int m_length, + unsigned char *sigret, unsigned int *siglen, RSA *rsa); +int RSA_verify(int type, const unsigned char *m, unsigned int m_length, + const unsigned char *sigbuf, unsigned int siglen, RSA *rsa); + +/* + * The following 2 function sign and verify a ASN1_OCTET_STRING object inside + * PKCS#1 padded RSA encryption + */ +int RSA_sign_ASN1_OCTET_STRING(int type, + const unsigned char *m, unsigned int m_length, + unsigned char *sigret, unsigned int *siglen, + RSA *rsa); +int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m, + unsigned int m_length, unsigned char *sigbuf, + unsigned int siglen, RSA *rsa); + +int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); +void RSA_blinding_off(RSA *rsa); +BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); + +int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, + const unsigned char *f, int fl); +int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, + const unsigned char *f, int fl, + int rsa_len); +int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, + const unsigned char *f, int fl); +int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, + const unsigned char *f, int fl, + int rsa_len); +int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, + long seedlen, const EVP_MD *dgst); +int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, + const unsigned char *f, int fl, + const unsigned char *p, int pl); +int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, + const unsigned char *f, int fl, int rsa_len, + const unsigned char *p, int pl); +int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, + const unsigned char *from, int flen, + const unsigned char *param, int plen, + const EVP_MD *md, const EVP_MD *mgf1md); +int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, + const unsigned char *from, int flen, + int num, const unsigned char *param, + int plen, const EVP_MD *md, + const EVP_MD *mgf1md); +int RSA_padding_add_SSLv23(unsigned char *to, int tlen, + const unsigned char *f, int fl); +int RSA_padding_check_SSLv23(unsigned char *to, int tlen, + const unsigned char *f, int fl, int rsa_len); +int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f, + int fl); +int RSA_padding_check_none(unsigned char *to, int tlen, + const unsigned char *f, int fl, int rsa_len); +int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f, + int fl); +int RSA_padding_check_X931(unsigned char *to, int tlen, + const unsigned char *f, int fl, int rsa_len); +int RSA_X931_hash_id(int nid); + +int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, + const EVP_MD *Hash, const unsigned char *EM, + int sLen); +int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, + const unsigned char *mHash, const EVP_MD *Hash, + int sLen); + +int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, + const EVP_MD *Hash, const EVP_MD *mgf1Hash, + const unsigned char *EM, int sLen); + +int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, + const unsigned char *mHash, + const EVP_MD *Hash, const EVP_MD *mgf1Hash, + int sLen); + +#define RSA_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, l, p, newf, dupf, freef) +int RSA_set_ex_data(RSA *r, int idx, void *arg); +void *RSA_get_ex_data(const RSA *r, int idx); + +RSA *RSAPublicKey_dup(RSA *rsa); +RSA *RSAPrivateKey_dup(RSA *rsa); + +/* + * If this flag is set the RSA method is FIPS compliant and can be used in + * FIPS mode. This is set in the validated module method. If an application + * sets this flag in its own methods it is its responsibility to ensure the + * result is compliant. + */ + +# define RSA_FLAG_FIPS_METHOD 0x0400 + +/* + * If this flag is set the operations normally disabled in FIPS mode are + * permitted it is then the applications responsibility to ensure that the + * usage is compliant. + */ + +# define RSA_FLAG_NON_FIPS_ALLOW 0x0400 +/* + * Application has decided PRNG is good enough to generate a key: don't + * check. + */ +# define RSA_FLAG_CHECKED 0x0800 + +RSA_METHOD *RSA_meth_new(const char *name, int flags); +void RSA_meth_free(RSA_METHOD *meth); +RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); +const char *RSA_meth_get0_name(const RSA_METHOD *meth); +int RSA_meth_set1_name(RSA_METHOD *meth, const char *name); +int RSA_meth_get_flags(const RSA_METHOD *meth); +int RSA_meth_set_flags(RSA_METHOD *meth, int flags); +void *RSA_meth_get0_app_data(const RSA_METHOD *meth); +int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data); +int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) + (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_meth_set_pub_enc(RSA_METHOD *rsa, + int (*pub_enc) (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, + int padding)); +int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) + (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_meth_set_pub_dec(RSA_METHOD *rsa, + int (*pub_dec) (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, + int padding)); +int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) + (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_meth_set_priv_enc(RSA_METHOD *rsa, + int (*priv_enc) (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, + int padding)); +int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth)) + (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding); +int RSA_meth_set_priv_dec(RSA_METHOD *rsa, + int (*priv_dec) (int flen, const unsigned char *from, + unsigned char *to, RSA *rsa, + int padding)); +int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) + (BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx); +int RSA_meth_set_mod_exp(RSA_METHOD *rsa, + int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa, + BN_CTX *ctx)); +int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth)) + (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); +int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa, + int (*bn_mod_exp) (BIGNUM *r, + const BIGNUM *a, + const BIGNUM *p, + const BIGNUM *m, + BN_CTX *ctx, + BN_MONT_CTX *m_ctx)); +int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa); +int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa)); +int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa); +int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa)); +int (*RSA_meth_get_sign(const RSA_METHOD *meth)) + (int type, + const unsigned char *m, unsigned int m_length, + unsigned char *sigret, unsigned int *siglen, + const RSA *rsa); +int RSA_meth_set_sign(RSA_METHOD *rsa, + int (*sign) (int type, const unsigned char *m, + unsigned int m_length, + unsigned char *sigret, unsigned int *siglen, + const RSA *rsa)); +int (*RSA_meth_get_verify(const RSA_METHOD *meth)) + (int dtype, const unsigned char *m, + unsigned int m_length, const unsigned char *sigbuf, + unsigned int siglen, const RSA *rsa); +int RSA_meth_set_verify(RSA_METHOD *rsa, + int (*verify) (int dtype, const unsigned char *m, + unsigned int m_length, + const unsigned char *sigbuf, + unsigned int siglen, const RSA *rsa)); +int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) + (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); +int RSA_meth_set_keygen(RSA_METHOD *rsa, + int (*keygen) (RSA *rsa, int bits, BIGNUM *e, + BN_GENCB *cb)); +int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth)) + (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); +int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth, + int (*keygen) (RSA *rsa, int bits, + int primes, BIGNUM *e, + BN_GENCB *cb)); + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/rsaerr.h b/src/Mayaqua/win32_inc/openssl/rsaerr.h new file mode 100644 index 00000000..59b15e13 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/rsaerr.h @@ -0,0 +1,167 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_RSAERR_H +# define HEADER_RSAERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_RSA_strings(void); + +/* + * RSA function codes. + */ +# define RSA_F_CHECK_PADDING_MD 140 +# define RSA_F_ENCODE_PKCS1 146 +# define RSA_F_INT_RSA_VERIFY 145 +# define RSA_F_OLD_RSA_PRIV_DECODE 147 +# define RSA_F_PKEY_PSS_INIT 165 +# define RSA_F_PKEY_RSA_CTRL 143 +# define RSA_F_PKEY_RSA_CTRL_STR 144 +# define RSA_F_PKEY_RSA_SIGN 142 +# define RSA_F_PKEY_RSA_VERIFY 149 +# define RSA_F_PKEY_RSA_VERIFYRECOVER 141 +# define RSA_F_RSA_ALGOR_TO_MD 156 +# define RSA_F_RSA_BUILTIN_KEYGEN 129 +# define RSA_F_RSA_CHECK_KEY 123 +# define RSA_F_RSA_CHECK_KEY_EX 160 +# define RSA_F_RSA_CMS_DECRYPT 159 +# define RSA_F_RSA_CMS_VERIFY 158 +# define RSA_F_RSA_ITEM_VERIFY 148 +# define RSA_F_RSA_METH_DUP 161 +# define RSA_F_RSA_METH_NEW 162 +# define RSA_F_RSA_METH_SET1_NAME 163 +# define RSA_F_RSA_MGF1_TO_MD 157 +# define RSA_F_RSA_MULTIP_INFO_NEW 166 +# define RSA_F_RSA_NEW_METHOD 106 +# define RSA_F_RSA_NULL 124 +# define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132 +# define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 133 +# define RSA_F_RSA_NULL_PUBLIC_DECRYPT 134 +# define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 135 +# define RSA_F_RSA_OSSL_PRIVATE_DECRYPT 101 +# define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 102 +# define RSA_F_RSA_OSSL_PUBLIC_DECRYPT 103 +# define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT 104 +# define RSA_F_RSA_PADDING_ADD_NONE 107 +# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121 +# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 154 +# define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 125 +# define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1 152 +# define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 108 +# define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 109 +# define RSA_F_RSA_PADDING_ADD_SSLV23 110 +# define RSA_F_RSA_PADDING_ADD_X931 127 +# define RSA_F_RSA_PADDING_CHECK_NONE 111 +# define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 122 +# define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1 153 +# define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 112 +# define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 113 +# define RSA_F_RSA_PADDING_CHECK_SSLV23 114 +# define RSA_F_RSA_PADDING_CHECK_X931 128 +# define RSA_F_RSA_PARAM_DECODE 164 +# define RSA_F_RSA_PRINT 115 +# define RSA_F_RSA_PRINT_FP 116 +# define RSA_F_RSA_PRIV_DECODE 150 +# define RSA_F_RSA_PRIV_ENCODE 138 +# define RSA_F_RSA_PSS_GET_PARAM 151 +# define RSA_F_RSA_PSS_TO_CTX 155 +# define RSA_F_RSA_PUB_DECODE 139 +# define RSA_F_RSA_SETUP_BLINDING 136 +# define RSA_F_RSA_SIGN 117 +# define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118 +# define RSA_F_RSA_VERIFY 119 +# define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120 +# define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 126 +# define RSA_F_SETUP_TBUF 167 + +/* + * RSA reason codes. + */ +# define RSA_R_ALGORITHM_MISMATCH 100 +# define RSA_R_BAD_E_VALUE 101 +# define RSA_R_BAD_FIXED_HEADER_DECRYPT 102 +# define RSA_R_BAD_PAD_BYTE_COUNT 103 +# define RSA_R_BAD_SIGNATURE 104 +# define RSA_R_BLOCK_TYPE_IS_NOT_01 106 +# define RSA_R_BLOCK_TYPE_IS_NOT_02 107 +# define RSA_R_DATA_GREATER_THAN_MOD_LEN 108 +# define RSA_R_DATA_TOO_LARGE 109 +# define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110 +# define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 132 +# define RSA_R_DATA_TOO_SMALL 111 +# define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122 +# define RSA_R_DIGEST_DOES_NOT_MATCH 158 +# define RSA_R_DIGEST_NOT_ALLOWED 145 +# define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112 +# define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124 +# define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125 +# define RSA_R_D_E_NOT_CONGRUENT_TO_1 123 +# define RSA_R_FIRST_OCTET_INVALID 133 +# define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE 144 +# define RSA_R_INVALID_DIGEST 157 +# define RSA_R_INVALID_DIGEST_LENGTH 143 +# define RSA_R_INVALID_HEADER 137 +# define RSA_R_INVALID_LABEL 160 +# define RSA_R_INVALID_MESSAGE_LENGTH 131 +# define RSA_R_INVALID_MGF1_MD 156 +# define RSA_R_INVALID_MULTI_PRIME_KEY 167 +# define RSA_R_INVALID_OAEP_PARAMETERS 161 +# define RSA_R_INVALID_PADDING 138 +# define RSA_R_INVALID_PADDING_MODE 141 +# define RSA_R_INVALID_PSS_PARAMETERS 149 +# define RSA_R_INVALID_PSS_SALTLEN 146 +# define RSA_R_INVALID_SALT_LENGTH 150 +# define RSA_R_INVALID_TRAILER 139 +# define RSA_R_INVALID_X931_DIGEST 142 +# define RSA_R_IQMP_NOT_INVERSE_OF_Q 126 +# define RSA_R_KEY_PRIME_NUM_INVALID 165 +# define RSA_R_KEY_SIZE_TOO_SMALL 120 +# define RSA_R_LAST_OCTET_INVALID 134 +# define RSA_R_MISSING_PRIVATE_KEY 179 +# define RSA_R_MGF1_DIGEST_NOT_ALLOWED 152 +# define RSA_R_MODULUS_TOO_LARGE 105 +# define RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R 168 +# define RSA_R_MP_EXPONENT_NOT_CONGRUENT_TO_D 169 +# define RSA_R_MP_R_NOT_PRIME 170 +# define RSA_R_NO_PUBLIC_EXPONENT 140 +# define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 +# define RSA_R_N_DOES_NOT_EQUAL_PRODUCT_OF_PRIMES 172 +# define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 +# define RSA_R_OAEP_DECODING_ERROR 121 +# define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 148 +# define RSA_R_PADDING_CHECK_FAILED 114 +# define RSA_R_PKCS_DECODING_ERROR 159 +# define RSA_R_PSS_SALTLEN_TOO_SMALL 164 +# define RSA_R_P_NOT_PRIME 128 +# define RSA_R_Q_NOT_PRIME 129 +# define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130 +# define RSA_R_SLEN_CHECK_FAILED 136 +# define RSA_R_SLEN_RECOVERY_FAILED 135 +# define RSA_R_SSLV3_ROLLBACK_ATTACK 115 +# define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116 +# define RSA_R_UNKNOWN_ALGORITHM_TYPE 117 +# define RSA_R_UNKNOWN_DIGEST 166 +# define RSA_R_UNKNOWN_MASK_DIGEST 151 +# define RSA_R_UNKNOWN_PADDING_TYPE 118 +# define RSA_R_UNSUPPORTED_ENCRYPTION_TYPE 162 +# define RSA_R_UNSUPPORTED_LABEL_SOURCE 163 +# define RSA_R_UNSUPPORTED_MASK_ALGORITHM 153 +# define RSA_R_UNSUPPORTED_MASK_PARAMETER 154 +# define RSA_R_UNSUPPORTED_SIGNATURE_TYPE 155 +# define RSA_R_VALUE_MISSING 147 +# define RSA_R_WRONG_SIGNATURE_LENGTH 119 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/safestack.h b/src/Mayaqua/win32_inc/openssl/safestack.h index e21584eb..38b55789 100644 --- a/src/Mayaqua/win32_inc/openssl/safestack.h +++ b/src/Mayaqua/win32_inc/openssl/safestack.h @@ -1,2672 +1,207 @@ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_SAFESTACK_H -# define HEADER_SAFESTACK_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifndef CHECKED_PTR_OF -# define CHECKED_PTR_OF(type, p) \ - ((void*) (1 ? p : (type*)0)) -# endif - -/* - * In C++ we get problems because an explicit cast is needed from (void *) we - * use CHECKED_STACK_OF to ensure the correct type is passed in the macros - * below. - */ - -# define CHECKED_STACK_OF(type, p) \ - ((_STACK*) (1 ? p : (STACK_OF(type)*)0)) - -# define CHECKED_SK_COPY_FUNC(type, p) \ - ((void *(*)(void *)) ((1 ? p : (type *(*)(const type *))0))) - -# define CHECKED_SK_FREE_FUNC(type, p) \ - ((void (*)(void *)) ((1 ? p : (void (*)(type *))0))) - -# define CHECKED_SK_CMP_FUNC(type, p) \ - ((int (*)(const void *, const void *)) \ - ((1 ? p : (int (*)(const type * const *, const type * const *))0))) - -# define STACK_OF(type) struct stack_st_##type -# define PREDECLARE_STACK_OF(type) STACK_OF(type); - -# define DECLARE_STACK_OF(type) \ -STACK_OF(type) \ - { \ - _STACK stack; \ - }; -# define DECLARE_SPECIAL_STACK_OF(type, type2) \ -STACK_OF(type) \ - { \ - _STACK stack; \ - }; - -/* nada (obsolete in new safestack approach)*/ -# define IMPLEMENT_STACK_OF(type) - -/*- - * Strings are special: normally an lhash entry will point to a single - * (somewhat) mutable object. In the case of strings: - * - * a) Instead of a single char, there is an array of chars, NUL-terminated. - * b) The string may have be immutable. - * - * So, they need their own declarations. Especially important for - * type-checking tools, such as Deputy. - * - * In practice, however, it appears to be hard to have a const - * string. For now, I'm settling for dealing with the fact it is a - * string at all. - */ -typedef char *OPENSSL_STRING; - -typedef const char *OPENSSL_CSTRING; - -/* - * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but - * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned - * above, instead of a single char each entry is a NUL-terminated array of - * chars. So, we have to implement STRING specially for STACK_OF. This is - * dealt with in the autogenerated macros below. - */ - -DECLARE_SPECIAL_STACK_OF(OPENSSL_STRING, char) - -/* - * Similarly, we sometimes use a block of characters, NOT nul-terminated. - * These should also be distinguished from "normal" stacks. - */ -typedef void *OPENSSL_BLOCK; -DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) - -/* - * SKM_sk_... stack macros are internal to safestack.h: never use them - * directly, use sk__... instead - */ -# define SKM_sk_new(type, cmp) \ - ((STACK_OF(type) *)sk_new(CHECKED_SK_CMP_FUNC(type, cmp))) -# define SKM_sk_new_null(type) \ - ((STACK_OF(type) *)sk_new_null()) -# define SKM_sk_free(type, st) \ - sk_free(CHECKED_STACK_OF(type, st)) -# define SKM_sk_num(type, st) \ - sk_num(CHECKED_STACK_OF(type, st)) -# define SKM_sk_value(type, st,i) \ - ((type *)sk_value(CHECKED_STACK_OF(type, st), i)) -# define SKM_sk_set(type, st,i,val) \ - sk_set(CHECKED_STACK_OF(type, st), i, CHECKED_PTR_OF(type, val)) -# define SKM_sk_zero(type, st) \ - sk_zero(CHECKED_STACK_OF(type, st)) -# define SKM_sk_push(type, st, val) \ - sk_push(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val)) -# define SKM_sk_unshift(type, st, val) \ - sk_unshift(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val)) -# define SKM_sk_find(type, st, val) \ - sk_find(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val)) -# define SKM_sk_find_ex(type, st, val) \ - sk_find_ex(CHECKED_STACK_OF(type, st), \ - CHECKED_PTR_OF(type, val)) -# define SKM_sk_delete(type, st, i) \ - (type *)sk_delete(CHECKED_STACK_OF(type, st), i) -# define SKM_sk_delete_ptr(type, st, ptr) \ - (type *)sk_delete_ptr(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, ptr)) -# define SKM_sk_insert(type, st,val, i) \ - sk_insert(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val), i) -# define SKM_sk_set_cmp_func(type, st, cmp) \ - ((int (*)(const type * const *,const type * const *)) \ - sk_set_cmp_func(CHECKED_STACK_OF(type, st), CHECKED_SK_CMP_FUNC(type, cmp))) -# define SKM_sk_dup(type, st) \ - (STACK_OF(type) *)sk_dup(CHECKED_STACK_OF(type, st)) -# define SKM_sk_pop_free(type, st, free_func) \ - sk_pop_free(CHECKED_STACK_OF(type, st), CHECKED_SK_FREE_FUNC(type, free_func)) -# define SKM_sk_deep_copy(type, st, copy_func, free_func) \ - (STACK_OF(type) *)sk_deep_copy(CHECKED_STACK_OF(type, st), CHECKED_SK_COPY_FUNC(type, copy_func), CHECKED_SK_FREE_FUNC(type, free_func)) -# define SKM_sk_shift(type, st) \ - (type *)sk_shift(CHECKED_STACK_OF(type, st)) -# define SKM_sk_pop(type, st) \ - (type *)sk_pop(CHECKED_STACK_OF(type, st)) -# define SKM_sk_sort(type, st) \ - sk_sort(CHECKED_STACK_OF(type, st)) -# define SKM_sk_is_sorted(type, st) \ - sk_is_sorted(CHECKED_STACK_OF(type, st)) -# define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - (STACK_OF(type) *)d2i_ASN1_SET( \ - (STACK_OF(OPENSSL_BLOCK) **)CHECKED_PTR_OF(STACK_OF(type)*, st), \ - pp, length, \ - CHECKED_D2I_OF(type, d2i_func), \ - CHECKED_SK_FREE_FUNC(type, free_func), \ - ex_tag, ex_class) -# define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \ - i2d_ASN1_SET((STACK_OF(OPENSSL_BLOCK) *)CHECKED_STACK_OF(type, st), pp, \ - CHECKED_I2D_OF(type, i2d_func), \ - ex_tag, ex_class, is_set) -# define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ - ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \ - CHECKED_I2D_OF(type, i2d_func), buf, len) -# define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ - (STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func)) -# define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ - (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ - CHECKED_D2I_OF(type, d2i_func), \ - CHECKED_SK_FREE_FUNC(type, free_func), \ - pass, passlen, oct, seq) -/* - * This block of defines is updated by util/mkstack.pl, please do not touch! - */ -# define sk_ACCESS_DESCRIPTION_new(cmp) SKM_sk_new(ACCESS_DESCRIPTION, (cmp)) -# define sk_ACCESS_DESCRIPTION_new_null() SKM_sk_new_null(ACCESS_DESCRIPTION) -# define sk_ACCESS_DESCRIPTION_free(st) SKM_sk_free(ACCESS_DESCRIPTION, (st)) -# define sk_ACCESS_DESCRIPTION_num(st) SKM_sk_num(ACCESS_DESCRIPTION, (st)) -# define sk_ACCESS_DESCRIPTION_value(st, i) SKM_sk_value(ACCESS_DESCRIPTION, (st), (i)) -# define sk_ACCESS_DESCRIPTION_set(st, i, val) SKM_sk_set(ACCESS_DESCRIPTION, (st), (i), (val)) -# define sk_ACCESS_DESCRIPTION_zero(st) SKM_sk_zero(ACCESS_DESCRIPTION, (st)) -# define sk_ACCESS_DESCRIPTION_push(st, val) SKM_sk_push(ACCESS_DESCRIPTION, (st), (val)) -# define sk_ACCESS_DESCRIPTION_unshift(st, val) SKM_sk_unshift(ACCESS_DESCRIPTION, (st), (val)) -# define sk_ACCESS_DESCRIPTION_find(st, val) SKM_sk_find(ACCESS_DESCRIPTION, (st), (val)) -# define sk_ACCESS_DESCRIPTION_find_ex(st, val) SKM_sk_find_ex(ACCESS_DESCRIPTION, (st), (val)) -# define sk_ACCESS_DESCRIPTION_delete(st, i) SKM_sk_delete(ACCESS_DESCRIPTION, (st), (i)) -# define sk_ACCESS_DESCRIPTION_delete_ptr(st, ptr) SKM_sk_delete_ptr(ACCESS_DESCRIPTION, (st), (ptr)) -# define sk_ACCESS_DESCRIPTION_insert(st, val, i) SKM_sk_insert(ACCESS_DESCRIPTION, (st), (val), (i)) -# define sk_ACCESS_DESCRIPTION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ACCESS_DESCRIPTION, (st), (cmp)) -# define sk_ACCESS_DESCRIPTION_dup(st) SKM_sk_dup(ACCESS_DESCRIPTION, st) -# define sk_ACCESS_DESCRIPTION_pop_free(st, free_func) SKM_sk_pop_free(ACCESS_DESCRIPTION, (st), (free_func)) -# define sk_ACCESS_DESCRIPTION_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ACCESS_DESCRIPTION, (st), (copy_func), (free_func)) -# define sk_ACCESS_DESCRIPTION_shift(st) SKM_sk_shift(ACCESS_DESCRIPTION, (st)) -# define sk_ACCESS_DESCRIPTION_pop(st) SKM_sk_pop(ACCESS_DESCRIPTION, (st)) -# define sk_ACCESS_DESCRIPTION_sort(st) SKM_sk_sort(ACCESS_DESCRIPTION, (st)) -# define sk_ACCESS_DESCRIPTION_is_sorted(st) SKM_sk_is_sorted(ACCESS_DESCRIPTION, (st)) -# define sk_ASIdOrRange_new(cmp) SKM_sk_new(ASIdOrRange, (cmp)) -# define sk_ASIdOrRange_new_null() SKM_sk_new_null(ASIdOrRange) -# define sk_ASIdOrRange_free(st) SKM_sk_free(ASIdOrRange, (st)) -# define sk_ASIdOrRange_num(st) SKM_sk_num(ASIdOrRange, (st)) -# define sk_ASIdOrRange_value(st, i) SKM_sk_value(ASIdOrRange, (st), (i)) -# define sk_ASIdOrRange_set(st, i, val) SKM_sk_set(ASIdOrRange, (st), (i), (val)) -# define sk_ASIdOrRange_zero(st) SKM_sk_zero(ASIdOrRange, (st)) -# define sk_ASIdOrRange_push(st, val) SKM_sk_push(ASIdOrRange, (st), (val)) -# define sk_ASIdOrRange_unshift(st, val) SKM_sk_unshift(ASIdOrRange, (st), (val)) -# define sk_ASIdOrRange_find(st, val) SKM_sk_find(ASIdOrRange, (st), (val)) -# define sk_ASIdOrRange_find_ex(st, val) SKM_sk_find_ex(ASIdOrRange, (st), (val)) -# define sk_ASIdOrRange_delete(st, i) SKM_sk_delete(ASIdOrRange, (st), (i)) -# define sk_ASIdOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASIdOrRange, (st), (ptr)) -# define sk_ASIdOrRange_insert(st, val, i) SKM_sk_insert(ASIdOrRange, (st), (val), (i)) -# define sk_ASIdOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASIdOrRange, (st), (cmp)) -# define sk_ASIdOrRange_dup(st) SKM_sk_dup(ASIdOrRange, st) -# define sk_ASIdOrRange_pop_free(st, free_func) SKM_sk_pop_free(ASIdOrRange, (st), (free_func)) -# define sk_ASIdOrRange_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASIdOrRange, (st), (copy_func), (free_func)) -# define sk_ASIdOrRange_shift(st) SKM_sk_shift(ASIdOrRange, (st)) -# define sk_ASIdOrRange_pop(st) SKM_sk_pop(ASIdOrRange, (st)) -# define sk_ASIdOrRange_sort(st) SKM_sk_sort(ASIdOrRange, (st)) -# define sk_ASIdOrRange_is_sorted(st) SKM_sk_is_sorted(ASIdOrRange, (st)) -# define sk_ASN1_GENERALSTRING_new(cmp) SKM_sk_new(ASN1_GENERALSTRING, (cmp)) -# define sk_ASN1_GENERALSTRING_new_null() SKM_sk_new_null(ASN1_GENERALSTRING) -# define sk_ASN1_GENERALSTRING_free(st) SKM_sk_free(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_GENERALSTRING_num(st) SKM_sk_num(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_GENERALSTRING_value(st, i) SKM_sk_value(ASN1_GENERALSTRING, (st), (i)) -# define sk_ASN1_GENERALSTRING_set(st, i, val) SKM_sk_set(ASN1_GENERALSTRING, (st), (i), (val)) -# define sk_ASN1_GENERALSTRING_zero(st) SKM_sk_zero(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_GENERALSTRING_push(st, val) SKM_sk_push(ASN1_GENERALSTRING, (st), (val)) -# define sk_ASN1_GENERALSTRING_unshift(st, val) SKM_sk_unshift(ASN1_GENERALSTRING, (st), (val)) -# define sk_ASN1_GENERALSTRING_find(st, val) SKM_sk_find(ASN1_GENERALSTRING, (st), (val)) -# define sk_ASN1_GENERALSTRING_find_ex(st, val) SKM_sk_find_ex(ASN1_GENERALSTRING, (st), (val)) -# define sk_ASN1_GENERALSTRING_delete(st, i) SKM_sk_delete(ASN1_GENERALSTRING, (st), (i)) -# define sk_ASN1_GENERALSTRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_GENERALSTRING, (st), (ptr)) -# define sk_ASN1_GENERALSTRING_insert(st, val, i) SKM_sk_insert(ASN1_GENERALSTRING, (st), (val), (i)) -# define sk_ASN1_GENERALSTRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_GENERALSTRING, (st), (cmp)) -# define sk_ASN1_GENERALSTRING_dup(st) SKM_sk_dup(ASN1_GENERALSTRING, st) -# define sk_ASN1_GENERALSTRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_GENERALSTRING, (st), (free_func)) -# define sk_ASN1_GENERALSTRING_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_GENERALSTRING, (st), (copy_func), (free_func)) -# define sk_ASN1_GENERALSTRING_shift(st) SKM_sk_shift(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_GENERALSTRING_pop(st) SKM_sk_pop(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_GENERALSTRING_sort(st) SKM_sk_sort(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_GENERALSTRING_is_sorted(st) SKM_sk_is_sorted(ASN1_GENERALSTRING, (st)) -# define sk_ASN1_INTEGER_new(cmp) SKM_sk_new(ASN1_INTEGER, (cmp)) -# define sk_ASN1_INTEGER_new_null() SKM_sk_new_null(ASN1_INTEGER) -# define sk_ASN1_INTEGER_free(st) SKM_sk_free(ASN1_INTEGER, (st)) -# define sk_ASN1_INTEGER_num(st) SKM_sk_num(ASN1_INTEGER, (st)) -# define sk_ASN1_INTEGER_value(st, i) SKM_sk_value(ASN1_INTEGER, (st), (i)) -# define sk_ASN1_INTEGER_set(st, i, val) SKM_sk_set(ASN1_INTEGER, (st), (i), (val)) -# define sk_ASN1_INTEGER_zero(st) SKM_sk_zero(ASN1_INTEGER, (st)) -# define sk_ASN1_INTEGER_push(st, val) SKM_sk_push(ASN1_INTEGER, (st), (val)) -# define sk_ASN1_INTEGER_unshift(st, val) SKM_sk_unshift(ASN1_INTEGER, (st), (val)) -# define sk_ASN1_INTEGER_find(st, val) SKM_sk_find(ASN1_INTEGER, (st), (val)) -# define sk_ASN1_INTEGER_find_ex(st, val) SKM_sk_find_ex(ASN1_INTEGER, (st), (val)) -# define sk_ASN1_INTEGER_delete(st, i) SKM_sk_delete(ASN1_INTEGER, (st), (i)) -# define sk_ASN1_INTEGER_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_INTEGER, (st), (ptr)) -# define sk_ASN1_INTEGER_insert(st, val, i) SKM_sk_insert(ASN1_INTEGER, (st), (val), (i)) -# define sk_ASN1_INTEGER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_INTEGER, (st), (cmp)) -# define sk_ASN1_INTEGER_dup(st) SKM_sk_dup(ASN1_INTEGER, st) -# define sk_ASN1_INTEGER_pop_free(st, free_func) SKM_sk_pop_free(ASN1_INTEGER, (st), (free_func)) -# define sk_ASN1_INTEGER_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_INTEGER, (st), (copy_func), (free_func)) -# define sk_ASN1_INTEGER_shift(st) SKM_sk_shift(ASN1_INTEGER, (st)) -# define sk_ASN1_INTEGER_pop(st) SKM_sk_pop(ASN1_INTEGER, (st)) -# define sk_ASN1_INTEGER_sort(st) SKM_sk_sort(ASN1_INTEGER, (st)) -# define sk_ASN1_INTEGER_is_sorted(st) SKM_sk_is_sorted(ASN1_INTEGER, (st)) -# define sk_ASN1_OBJECT_new(cmp) SKM_sk_new(ASN1_OBJECT, (cmp)) -# define sk_ASN1_OBJECT_new_null() SKM_sk_new_null(ASN1_OBJECT) -# define sk_ASN1_OBJECT_free(st) SKM_sk_free(ASN1_OBJECT, (st)) -# define sk_ASN1_OBJECT_num(st) SKM_sk_num(ASN1_OBJECT, (st)) -# define sk_ASN1_OBJECT_value(st, i) SKM_sk_value(ASN1_OBJECT, (st), (i)) -# define sk_ASN1_OBJECT_set(st, i, val) SKM_sk_set(ASN1_OBJECT, (st), (i), (val)) -# define sk_ASN1_OBJECT_zero(st) SKM_sk_zero(ASN1_OBJECT, (st)) -# define sk_ASN1_OBJECT_push(st, val) SKM_sk_push(ASN1_OBJECT, (st), (val)) -# define sk_ASN1_OBJECT_unshift(st, val) SKM_sk_unshift(ASN1_OBJECT, (st), (val)) -# define sk_ASN1_OBJECT_find(st, val) SKM_sk_find(ASN1_OBJECT, (st), (val)) -# define sk_ASN1_OBJECT_find_ex(st, val) SKM_sk_find_ex(ASN1_OBJECT, (st), (val)) -# define sk_ASN1_OBJECT_delete(st, i) SKM_sk_delete(ASN1_OBJECT, (st), (i)) -# define sk_ASN1_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_OBJECT, (st), (ptr)) -# define sk_ASN1_OBJECT_insert(st, val, i) SKM_sk_insert(ASN1_OBJECT, (st), (val), (i)) -# define sk_ASN1_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_OBJECT, (st), (cmp)) -# define sk_ASN1_OBJECT_dup(st) SKM_sk_dup(ASN1_OBJECT, st) -# define sk_ASN1_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(ASN1_OBJECT, (st), (free_func)) -# define sk_ASN1_OBJECT_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_OBJECT, (st), (copy_func), (free_func)) -# define sk_ASN1_OBJECT_shift(st) SKM_sk_shift(ASN1_OBJECT, (st)) -# define sk_ASN1_OBJECT_pop(st) SKM_sk_pop(ASN1_OBJECT, (st)) -# define sk_ASN1_OBJECT_sort(st) SKM_sk_sort(ASN1_OBJECT, (st)) -# define sk_ASN1_OBJECT_is_sorted(st) SKM_sk_is_sorted(ASN1_OBJECT, (st)) -# define sk_ASN1_STRING_TABLE_new(cmp) SKM_sk_new(ASN1_STRING_TABLE, (cmp)) -# define sk_ASN1_STRING_TABLE_new_null() SKM_sk_new_null(ASN1_STRING_TABLE) -# define sk_ASN1_STRING_TABLE_free(st) SKM_sk_free(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_STRING_TABLE_num(st) SKM_sk_num(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_STRING_TABLE_value(st, i) SKM_sk_value(ASN1_STRING_TABLE, (st), (i)) -# define sk_ASN1_STRING_TABLE_set(st, i, val) SKM_sk_set(ASN1_STRING_TABLE, (st), (i), (val)) -# define sk_ASN1_STRING_TABLE_zero(st) SKM_sk_zero(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_STRING_TABLE_push(st, val) SKM_sk_push(ASN1_STRING_TABLE, (st), (val)) -# define sk_ASN1_STRING_TABLE_unshift(st, val) SKM_sk_unshift(ASN1_STRING_TABLE, (st), (val)) -# define sk_ASN1_STRING_TABLE_find(st, val) SKM_sk_find(ASN1_STRING_TABLE, (st), (val)) -# define sk_ASN1_STRING_TABLE_find_ex(st, val) SKM_sk_find_ex(ASN1_STRING_TABLE, (st), (val)) -# define sk_ASN1_STRING_TABLE_delete(st, i) SKM_sk_delete(ASN1_STRING_TABLE, (st), (i)) -# define sk_ASN1_STRING_TABLE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_STRING_TABLE, (st), (ptr)) -# define sk_ASN1_STRING_TABLE_insert(st, val, i) SKM_sk_insert(ASN1_STRING_TABLE, (st), (val), (i)) -# define sk_ASN1_STRING_TABLE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_STRING_TABLE, (st), (cmp)) -# define sk_ASN1_STRING_TABLE_dup(st) SKM_sk_dup(ASN1_STRING_TABLE, st) -# define sk_ASN1_STRING_TABLE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_STRING_TABLE, (st), (free_func)) -# define sk_ASN1_STRING_TABLE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_STRING_TABLE, (st), (copy_func), (free_func)) -# define sk_ASN1_STRING_TABLE_shift(st) SKM_sk_shift(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_STRING_TABLE_pop(st) SKM_sk_pop(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_STRING_TABLE_sort(st) SKM_sk_sort(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_STRING_TABLE_is_sorted(st) SKM_sk_is_sorted(ASN1_STRING_TABLE, (st)) -# define sk_ASN1_TYPE_new(cmp) SKM_sk_new(ASN1_TYPE, (cmp)) -# define sk_ASN1_TYPE_new_null() SKM_sk_new_null(ASN1_TYPE) -# define sk_ASN1_TYPE_free(st) SKM_sk_free(ASN1_TYPE, (st)) -# define sk_ASN1_TYPE_num(st) SKM_sk_num(ASN1_TYPE, (st)) -# define sk_ASN1_TYPE_value(st, i) SKM_sk_value(ASN1_TYPE, (st), (i)) -# define sk_ASN1_TYPE_set(st, i, val) SKM_sk_set(ASN1_TYPE, (st), (i), (val)) -# define sk_ASN1_TYPE_zero(st) SKM_sk_zero(ASN1_TYPE, (st)) -# define sk_ASN1_TYPE_push(st, val) SKM_sk_push(ASN1_TYPE, (st), (val)) -# define sk_ASN1_TYPE_unshift(st, val) SKM_sk_unshift(ASN1_TYPE, (st), (val)) -# define sk_ASN1_TYPE_find(st, val) SKM_sk_find(ASN1_TYPE, (st), (val)) -# define sk_ASN1_TYPE_find_ex(st, val) SKM_sk_find_ex(ASN1_TYPE, (st), (val)) -# define sk_ASN1_TYPE_delete(st, i) SKM_sk_delete(ASN1_TYPE, (st), (i)) -# define sk_ASN1_TYPE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_TYPE, (st), (ptr)) -# define sk_ASN1_TYPE_insert(st, val, i) SKM_sk_insert(ASN1_TYPE, (st), (val), (i)) -# define sk_ASN1_TYPE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_TYPE, (st), (cmp)) -# define sk_ASN1_TYPE_dup(st) SKM_sk_dup(ASN1_TYPE, st) -# define sk_ASN1_TYPE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_TYPE, (st), (free_func)) -# define sk_ASN1_TYPE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_TYPE, (st), (copy_func), (free_func)) -# define sk_ASN1_TYPE_shift(st) SKM_sk_shift(ASN1_TYPE, (st)) -# define sk_ASN1_TYPE_pop(st) SKM_sk_pop(ASN1_TYPE, (st)) -# define sk_ASN1_TYPE_sort(st) SKM_sk_sort(ASN1_TYPE, (st)) -# define sk_ASN1_TYPE_is_sorted(st) SKM_sk_is_sorted(ASN1_TYPE, (st)) -# define sk_ASN1_UTF8STRING_new(cmp) SKM_sk_new(ASN1_UTF8STRING, (cmp)) -# define sk_ASN1_UTF8STRING_new_null() SKM_sk_new_null(ASN1_UTF8STRING) -# define sk_ASN1_UTF8STRING_free(st) SKM_sk_free(ASN1_UTF8STRING, (st)) -# define sk_ASN1_UTF8STRING_num(st) SKM_sk_num(ASN1_UTF8STRING, (st)) -# define sk_ASN1_UTF8STRING_value(st, i) SKM_sk_value(ASN1_UTF8STRING, (st), (i)) -# define sk_ASN1_UTF8STRING_set(st, i, val) SKM_sk_set(ASN1_UTF8STRING, (st), (i), (val)) -# define sk_ASN1_UTF8STRING_zero(st) SKM_sk_zero(ASN1_UTF8STRING, (st)) -# define sk_ASN1_UTF8STRING_push(st, val) SKM_sk_push(ASN1_UTF8STRING, (st), (val)) -# define sk_ASN1_UTF8STRING_unshift(st, val) SKM_sk_unshift(ASN1_UTF8STRING, (st), (val)) -# define sk_ASN1_UTF8STRING_find(st, val) SKM_sk_find(ASN1_UTF8STRING, (st), (val)) -# define sk_ASN1_UTF8STRING_find_ex(st, val) SKM_sk_find_ex(ASN1_UTF8STRING, (st), (val)) -# define sk_ASN1_UTF8STRING_delete(st, i) SKM_sk_delete(ASN1_UTF8STRING, (st), (i)) -# define sk_ASN1_UTF8STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_UTF8STRING, (st), (ptr)) -# define sk_ASN1_UTF8STRING_insert(st, val, i) SKM_sk_insert(ASN1_UTF8STRING, (st), (val), (i)) -# define sk_ASN1_UTF8STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_UTF8STRING, (st), (cmp)) -# define sk_ASN1_UTF8STRING_dup(st) SKM_sk_dup(ASN1_UTF8STRING, st) -# define sk_ASN1_UTF8STRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_UTF8STRING, (st), (free_func)) -# define sk_ASN1_UTF8STRING_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_UTF8STRING, (st), (copy_func), (free_func)) -# define sk_ASN1_UTF8STRING_shift(st) SKM_sk_shift(ASN1_UTF8STRING, (st)) -# define sk_ASN1_UTF8STRING_pop(st) SKM_sk_pop(ASN1_UTF8STRING, (st)) -# define sk_ASN1_UTF8STRING_sort(st) SKM_sk_sort(ASN1_UTF8STRING, (st)) -# define sk_ASN1_UTF8STRING_is_sorted(st) SKM_sk_is_sorted(ASN1_UTF8STRING, (st)) -# define sk_ASN1_VALUE_new(cmp) SKM_sk_new(ASN1_VALUE, (cmp)) -# define sk_ASN1_VALUE_new_null() SKM_sk_new_null(ASN1_VALUE) -# define sk_ASN1_VALUE_free(st) SKM_sk_free(ASN1_VALUE, (st)) -# define sk_ASN1_VALUE_num(st) SKM_sk_num(ASN1_VALUE, (st)) -# define sk_ASN1_VALUE_value(st, i) SKM_sk_value(ASN1_VALUE, (st), (i)) -# define sk_ASN1_VALUE_set(st, i, val) SKM_sk_set(ASN1_VALUE, (st), (i), (val)) -# define sk_ASN1_VALUE_zero(st) SKM_sk_zero(ASN1_VALUE, (st)) -# define sk_ASN1_VALUE_push(st, val) SKM_sk_push(ASN1_VALUE, (st), (val)) -# define sk_ASN1_VALUE_unshift(st, val) SKM_sk_unshift(ASN1_VALUE, (st), (val)) -# define sk_ASN1_VALUE_find(st, val) SKM_sk_find(ASN1_VALUE, (st), (val)) -# define sk_ASN1_VALUE_find_ex(st, val) SKM_sk_find_ex(ASN1_VALUE, (st), (val)) -# define sk_ASN1_VALUE_delete(st, i) SKM_sk_delete(ASN1_VALUE, (st), (i)) -# define sk_ASN1_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_VALUE, (st), (ptr)) -# define sk_ASN1_VALUE_insert(st, val, i) SKM_sk_insert(ASN1_VALUE, (st), (val), (i)) -# define sk_ASN1_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_VALUE, (st), (cmp)) -# define sk_ASN1_VALUE_dup(st) SKM_sk_dup(ASN1_VALUE, st) -# define sk_ASN1_VALUE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_VALUE, (st), (free_func)) -# define sk_ASN1_VALUE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ASN1_VALUE, (st), (copy_func), (free_func)) -# define sk_ASN1_VALUE_shift(st) SKM_sk_shift(ASN1_VALUE, (st)) -# define sk_ASN1_VALUE_pop(st) SKM_sk_pop(ASN1_VALUE, (st)) -# define sk_ASN1_VALUE_sort(st) SKM_sk_sort(ASN1_VALUE, (st)) -# define sk_ASN1_VALUE_is_sorted(st) SKM_sk_is_sorted(ASN1_VALUE, (st)) -# define sk_BIO_new(cmp) SKM_sk_new(BIO, (cmp)) -# define sk_BIO_new_null() SKM_sk_new_null(BIO) -# define sk_BIO_free(st) SKM_sk_free(BIO, (st)) -# define sk_BIO_num(st) SKM_sk_num(BIO, (st)) -# define sk_BIO_value(st, i) SKM_sk_value(BIO, (st), (i)) -# define sk_BIO_set(st, i, val) SKM_sk_set(BIO, (st), (i), (val)) -# define sk_BIO_zero(st) SKM_sk_zero(BIO, (st)) -# define sk_BIO_push(st, val) SKM_sk_push(BIO, (st), (val)) -# define sk_BIO_unshift(st, val) SKM_sk_unshift(BIO, (st), (val)) -# define sk_BIO_find(st, val) SKM_sk_find(BIO, (st), (val)) -# define sk_BIO_find_ex(st, val) SKM_sk_find_ex(BIO, (st), (val)) -# define sk_BIO_delete(st, i) SKM_sk_delete(BIO, (st), (i)) -# define sk_BIO_delete_ptr(st, ptr) SKM_sk_delete_ptr(BIO, (st), (ptr)) -# define sk_BIO_insert(st, val, i) SKM_sk_insert(BIO, (st), (val), (i)) -# define sk_BIO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BIO, (st), (cmp)) -# define sk_BIO_dup(st) SKM_sk_dup(BIO, st) -# define sk_BIO_pop_free(st, free_func) SKM_sk_pop_free(BIO, (st), (free_func)) -# define sk_BIO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(BIO, (st), (copy_func), (free_func)) -# define sk_BIO_shift(st) SKM_sk_shift(BIO, (st)) -# define sk_BIO_pop(st) SKM_sk_pop(BIO, (st)) -# define sk_BIO_sort(st) SKM_sk_sort(BIO, (st)) -# define sk_BIO_is_sorted(st) SKM_sk_is_sorted(BIO, (st)) -# define sk_BY_DIR_ENTRY_new(cmp) SKM_sk_new(BY_DIR_ENTRY, (cmp)) -# define sk_BY_DIR_ENTRY_new_null() SKM_sk_new_null(BY_DIR_ENTRY) -# define sk_BY_DIR_ENTRY_free(st) SKM_sk_free(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_ENTRY_num(st) SKM_sk_num(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_ENTRY_value(st, i) SKM_sk_value(BY_DIR_ENTRY, (st), (i)) -# define sk_BY_DIR_ENTRY_set(st, i, val) SKM_sk_set(BY_DIR_ENTRY, (st), (i), (val)) -# define sk_BY_DIR_ENTRY_zero(st) SKM_sk_zero(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_ENTRY_push(st, val) SKM_sk_push(BY_DIR_ENTRY, (st), (val)) -# define sk_BY_DIR_ENTRY_unshift(st, val) SKM_sk_unshift(BY_DIR_ENTRY, (st), (val)) -# define sk_BY_DIR_ENTRY_find(st, val) SKM_sk_find(BY_DIR_ENTRY, (st), (val)) -# define sk_BY_DIR_ENTRY_find_ex(st, val) SKM_sk_find_ex(BY_DIR_ENTRY, (st), (val)) -# define sk_BY_DIR_ENTRY_delete(st, i) SKM_sk_delete(BY_DIR_ENTRY, (st), (i)) -# define sk_BY_DIR_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(BY_DIR_ENTRY, (st), (ptr)) -# define sk_BY_DIR_ENTRY_insert(st, val, i) SKM_sk_insert(BY_DIR_ENTRY, (st), (val), (i)) -# define sk_BY_DIR_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_ENTRY, (st), (cmp)) -# define sk_BY_DIR_ENTRY_dup(st) SKM_sk_dup(BY_DIR_ENTRY, st) -# define sk_BY_DIR_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_ENTRY, (st), (free_func)) -# define sk_BY_DIR_ENTRY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(BY_DIR_ENTRY, (st), (copy_func), (free_func)) -# define sk_BY_DIR_ENTRY_shift(st) SKM_sk_shift(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_ENTRY_pop(st) SKM_sk_pop(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_ENTRY_sort(st) SKM_sk_sort(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_ENTRY_is_sorted(st) SKM_sk_is_sorted(BY_DIR_ENTRY, (st)) -# define sk_BY_DIR_HASH_new(cmp) SKM_sk_new(BY_DIR_HASH, (cmp)) -# define sk_BY_DIR_HASH_new_null() SKM_sk_new_null(BY_DIR_HASH) -# define sk_BY_DIR_HASH_free(st) SKM_sk_free(BY_DIR_HASH, (st)) -# define sk_BY_DIR_HASH_num(st) SKM_sk_num(BY_DIR_HASH, (st)) -# define sk_BY_DIR_HASH_value(st, i) SKM_sk_value(BY_DIR_HASH, (st), (i)) -# define sk_BY_DIR_HASH_set(st, i, val) SKM_sk_set(BY_DIR_HASH, (st), (i), (val)) -# define sk_BY_DIR_HASH_zero(st) SKM_sk_zero(BY_DIR_HASH, (st)) -# define sk_BY_DIR_HASH_push(st, val) SKM_sk_push(BY_DIR_HASH, (st), (val)) -# define sk_BY_DIR_HASH_unshift(st, val) SKM_sk_unshift(BY_DIR_HASH, (st), (val)) -# define sk_BY_DIR_HASH_find(st, val) SKM_sk_find(BY_DIR_HASH, (st), (val)) -# define sk_BY_DIR_HASH_find_ex(st, val) SKM_sk_find_ex(BY_DIR_HASH, (st), (val)) -# define sk_BY_DIR_HASH_delete(st, i) SKM_sk_delete(BY_DIR_HASH, (st), (i)) -# define sk_BY_DIR_HASH_delete_ptr(st, ptr) SKM_sk_delete_ptr(BY_DIR_HASH, (st), (ptr)) -# define sk_BY_DIR_HASH_insert(st, val, i) SKM_sk_insert(BY_DIR_HASH, (st), (val), (i)) -# define sk_BY_DIR_HASH_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_HASH, (st), (cmp)) -# define sk_BY_DIR_HASH_dup(st) SKM_sk_dup(BY_DIR_HASH, st) -# define sk_BY_DIR_HASH_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_HASH, (st), (free_func)) -# define sk_BY_DIR_HASH_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(BY_DIR_HASH, (st), (copy_func), (free_func)) -# define sk_BY_DIR_HASH_shift(st) SKM_sk_shift(BY_DIR_HASH, (st)) -# define sk_BY_DIR_HASH_pop(st) SKM_sk_pop(BY_DIR_HASH, (st)) -# define sk_BY_DIR_HASH_sort(st) SKM_sk_sort(BY_DIR_HASH, (st)) -# define sk_BY_DIR_HASH_is_sorted(st) SKM_sk_is_sorted(BY_DIR_HASH, (st)) -# define sk_CMS_CertificateChoices_new(cmp) SKM_sk_new(CMS_CertificateChoices, (cmp)) -# define sk_CMS_CertificateChoices_new_null() SKM_sk_new_null(CMS_CertificateChoices) -# define sk_CMS_CertificateChoices_free(st) SKM_sk_free(CMS_CertificateChoices, (st)) -# define sk_CMS_CertificateChoices_num(st) SKM_sk_num(CMS_CertificateChoices, (st)) -# define sk_CMS_CertificateChoices_value(st, i) SKM_sk_value(CMS_CertificateChoices, (st), (i)) -# define sk_CMS_CertificateChoices_set(st, i, val) SKM_sk_set(CMS_CertificateChoices, (st), (i), (val)) -# define sk_CMS_CertificateChoices_zero(st) SKM_sk_zero(CMS_CertificateChoices, (st)) -# define sk_CMS_CertificateChoices_push(st, val) SKM_sk_push(CMS_CertificateChoices, (st), (val)) -# define sk_CMS_CertificateChoices_unshift(st, val) SKM_sk_unshift(CMS_CertificateChoices, (st), (val)) -# define sk_CMS_CertificateChoices_find(st, val) SKM_sk_find(CMS_CertificateChoices, (st), (val)) -# define sk_CMS_CertificateChoices_find_ex(st, val) SKM_sk_find_ex(CMS_CertificateChoices, (st), (val)) -# define sk_CMS_CertificateChoices_delete(st, i) SKM_sk_delete(CMS_CertificateChoices, (st), (i)) -# define sk_CMS_CertificateChoices_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_CertificateChoices, (st), (ptr)) -# define sk_CMS_CertificateChoices_insert(st, val, i) SKM_sk_insert(CMS_CertificateChoices, (st), (val), (i)) -# define sk_CMS_CertificateChoices_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_CertificateChoices, (st), (cmp)) -# define sk_CMS_CertificateChoices_dup(st) SKM_sk_dup(CMS_CertificateChoices, st) -# define sk_CMS_CertificateChoices_pop_free(st, free_func) SKM_sk_pop_free(CMS_CertificateChoices, (st), (free_func)) -# define sk_CMS_CertificateChoices_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CMS_CertificateChoices, (st), (copy_func), (free_func)) -# define sk_CMS_CertificateChoices_shift(st) SKM_sk_shift(CMS_CertificateChoices, (st)) -# define sk_CMS_CertificateChoices_pop(st) SKM_sk_pop(CMS_CertificateChoices, (st)) -# define sk_CMS_CertificateChoices_sort(st) SKM_sk_sort(CMS_CertificateChoices, (st)) -# define sk_CMS_CertificateChoices_is_sorted(st) SKM_sk_is_sorted(CMS_CertificateChoices, (st)) -# define sk_CMS_RecipientEncryptedKey_new(cmp) SKM_sk_new(CMS_RecipientEncryptedKey, (cmp)) -# define sk_CMS_RecipientEncryptedKey_new_null() SKM_sk_new_null(CMS_RecipientEncryptedKey) -# define sk_CMS_RecipientEncryptedKey_free(st) SKM_sk_free(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientEncryptedKey_num(st) SKM_sk_num(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientEncryptedKey_value(st, i) SKM_sk_value(CMS_RecipientEncryptedKey, (st), (i)) -# define sk_CMS_RecipientEncryptedKey_set(st, i, val) SKM_sk_set(CMS_RecipientEncryptedKey, (st), (i), (val)) -# define sk_CMS_RecipientEncryptedKey_zero(st) SKM_sk_zero(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientEncryptedKey_push(st, val) SKM_sk_push(CMS_RecipientEncryptedKey, (st), (val)) -# define sk_CMS_RecipientEncryptedKey_unshift(st, val) SKM_sk_unshift(CMS_RecipientEncryptedKey, (st), (val)) -# define sk_CMS_RecipientEncryptedKey_find(st, val) SKM_sk_find(CMS_RecipientEncryptedKey, (st), (val)) -# define sk_CMS_RecipientEncryptedKey_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientEncryptedKey, (st), (val)) -# define sk_CMS_RecipientEncryptedKey_delete(st, i) SKM_sk_delete(CMS_RecipientEncryptedKey, (st), (i)) -# define sk_CMS_RecipientEncryptedKey_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientEncryptedKey, (st), (ptr)) -# define sk_CMS_RecipientEncryptedKey_insert(st, val, i) SKM_sk_insert(CMS_RecipientEncryptedKey, (st), (val), (i)) -# define sk_CMS_RecipientEncryptedKey_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientEncryptedKey, (st), (cmp)) -# define sk_CMS_RecipientEncryptedKey_dup(st) SKM_sk_dup(CMS_RecipientEncryptedKey, st) -# define sk_CMS_RecipientEncryptedKey_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientEncryptedKey, (st), (free_func)) -# define sk_CMS_RecipientEncryptedKey_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CMS_RecipientEncryptedKey, (st), (copy_func), (free_func)) -# define sk_CMS_RecipientEncryptedKey_shift(st) SKM_sk_shift(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientEncryptedKey_pop(st) SKM_sk_pop(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientEncryptedKey_sort(st) SKM_sk_sort(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientEncryptedKey_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientEncryptedKey, (st)) -# define sk_CMS_RecipientInfo_new(cmp) SKM_sk_new(CMS_RecipientInfo, (cmp)) -# define sk_CMS_RecipientInfo_new_null() SKM_sk_new_null(CMS_RecipientInfo) -# define sk_CMS_RecipientInfo_free(st) SKM_sk_free(CMS_RecipientInfo, (st)) -# define sk_CMS_RecipientInfo_num(st) SKM_sk_num(CMS_RecipientInfo, (st)) -# define sk_CMS_RecipientInfo_value(st, i) SKM_sk_value(CMS_RecipientInfo, (st), (i)) -# define sk_CMS_RecipientInfo_set(st, i, val) SKM_sk_set(CMS_RecipientInfo, (st), (i), (val)) -# define sk_CMS_RecipientInfo_zero(st) SKM_sk_zero(CMS_RecipientInfo, (st)) -# define sk_CMS_RecipientInfo_push(st, val) SKM_sk_push(CMS_RecipientInfo, (st), (val)) -# define sk_CMS_RecipientInfo_unshift(st, val) SKM_sk_unshift(CMS_RecipientInfo, (st), (val)) -# define sk_CMS_RecipientInfo_find(st, val) SKM_sk_find(CMS_RecipientInfo, (st), (val)) -# define sk_CMS_RecipientInfo_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientInfo, (st), (val)) -# define sk_CMS_RecipientInfo_delete(st, i) SKM_sk_delete(CMS_RecipientInfo, (st), (i)) -# define sk_CMS_RecipientInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientInfo, (st), (ptr)) -# define sk_CMS_RecipientInfo_insert(st, val, i) SKM_sk_insert(CMS_RecipientInfo, (st), (val), (i)) -# define sk_CMS_RecipientInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientInfo, (st), (cmp)) -# define sk_CMS_RecipientInfo_dup(st) SKM_sk_dup(CMS_RecipientInfo, st) -# define sk_CMS_RecipientInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientInfo, (st), (free_func)) -# define sk_CMS_RecipientInfo_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CMS_RecipientInfo, (st), (copy_func), (free_func)) -# define sk_CMS_RecipientInfo_shift(st) SKM_sk_shift(CMS_RecipientInfo, (st)) -# define sk_CMS_RecipientInfo_pop(st) SKM_sk_pop(CMS_RecipientInfo, (st)) -# define sk_CMS_RecipientInfo_sort(st) SKM_sk_sort(CMS_RecipientInfo, (st)) -# define sk_CMS_RecipientInfo_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientInfo, (st)) -# define sk_CMS_RevocationInfoChoice_new(cmp) SKM_sk_new(CMS_RevocationInfoChoice, (cmp)) -# define sk_CMS_RevocationInfoChoice_new_null() SKM_sk_new_null(CMS_RevocationInfoChoice) -# define sk_CMS_RevocationInfoChoice_free(st) SKM_sk_free(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_RevocationInfoChoice_num(st) SKM_sk_num(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_RevocationInfoChoice_value(st, i) SKM_sk_value(CMS_RevocationInfoChoice, (st), (i)) -# define sk_CMS_RevocationInfoChoice_set(st, i, val) SKM_sk_set(CMS_RevocationInfoChoice, (st), (i), (val)) -# define sk_CMS_RevocationInfoChoice_zero(st) SKM_sk_zero(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_RevocationInfoChoice_push(st, val) SKM_sk_push(CMS_RevocationInfoChoice, (st), (val)) -# define sk_CMS_RevocationInfoChoice_unshift(st, val) SKM_sk_unshift(CMS_RevocationInfoChoice, (st), (val)) -# define sk_CMS_RevocationInfoChoice_find(st, val) SKM_sk_find(CMS_RevocationInfoChoice, (st), (val)) -# define sk_CMS_RevocationInfoChoice_find_ex(st, val) SKM_sk_find_ex(CMS_RevocationInfoChoice, (st), (val)) -# define sk_CMS_RevocationInfoChoice_delete(st, i) SKM_sk_delete(CMS_RevocationInfoChoice, (st), (i)) -# define sk_CMS_RevocationInfoChoice_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RevocationInfoChoice, (st), (ptr)) -# define sk_CMS_RevocationInfoChoice_insert(st, val, i) SKM_sk_insert(CMS_RevocationInfoChoice, (st), (val), (i)) -# define sk_CMS_RevocationInfoChoice_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RevocationInfoChoice, (st), (cmp)) -# define sk_CMS_RevocationInfoChoice_dup(st) SKM_sk_dup(CMS_RevocationInfoChoice, st) -# define sk_CMS_RevocationInfoChoice_pop_free(st, free_func) SKM_sk_pop_free(CMS_RevocationInfoChoice, (st), (free_func)) -# define sk_CMS_RevocationInfoChoice_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CMS_RevocationInfoChoice, (st), (copy_func), (free_func)) -# define sk_CMS_RevocationInfoChoice_shift(st) SKM_sk_shift(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_RevocationInfoChoice_pop(st) SKM_sk_pop(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_RevocationInfoChoice_sort(st) SKM_sk_sort(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_RevocationInfoChoice_is_sorted(st) SKM_sk_is_sorted(CMS_RevocationInfoChoice, (st)) -# define sk_CMS_SignerInfo_new(cmp) SKM_sk_new(CMS_SignerInfo, (cmp)) -# define sk_CMS_SignerInfo_new_null() SKM_sk_new_null(CMS_SignerInfo) -# define sk_CMS_SignerInfo_free(st) SKM_sk_free(CMS_SignerInfo, (st)) -# define sk_CMS_SignerInfo_num(st) SKM_sk_num(CMS_SignerInfo, (st)) -# define sk_CMS_SignerInfo_value(st, i) SKM_sk_value(CMS_SignerInfo, (st), (i)) -# define sk_CMS_SignerInfo_set(st, i, val) SKM_sk_set(CMS_SignerInfo, (st), (i), (val)) -# define sk_CMS_SignerInfo_zero(st) SKM_sk_zero(CMS_SignerInfo, (st)) -# define sk_CMS_SignerInfo_push(st, val) SKM_sk_push(CMS_SignerInfo, (st), (val)) -# define sk_CMS_SignerInfo_unshift(st, val) SKM_sk_unshift(CMS_SignerInfo, (st), (val)) -# define sk_CMS_SignerInfo_find(st, val) SKM_sk_find(CMS_SignerInfo, (st), (val)) -# define sk_CMS_SignerInfo_find_ex(st, val) SKM_sk_find_ex(CMS_SignerInfo, (st), (val)) -# define sk_CMS_SignerInfo_delete(st, i) SKM_sk_delete(CMS_SignerInfo, (st), (i)) -# define sk_CMS_SignerInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_SignerInfo, (st), (ptr)) -# define sk_CMS_SignerInfo_insert(st, val, i) SKM_sk_insert(CMS_SignerInfo, (st), (val), (i)) -# define sk_CMS_SignerInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_SignerInfo, (st), (cmp)) -# define sk_CMS_SignerInfo_dup(st) SKM_sk_dup(CMS_SignerInfo, st) -# define sk_CMS_SignerInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_SignerInfo, (st), (free_func)) -# define sk_CMS_SignerInfo_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CMS_SignerInfo, (st), (copy_func), (free_func)) -# define sk_CMS_SignerInfo_shift(st) SKM_sk_shift(CMS_SignerInfo, (st)) -# define sk_CMS_SignerInfo_pop(st) SKM_sk_pop(CMS_SignerInfo, (st)) -# define sk_CMS_SignerInfo_sort(st) SKM_sk_sort(CMS_SignerInfo, (st)) -# define sk_CMS_SignerInfo_is_sorted(st) SKM_sk_is_sorted(CMS_SignerInfo, (st)) -# define sk_CONF_IMODULE_new(cmp) SKM_sk_new(CONF_IMODULE, (cmp)) -# define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE) -# define sk_CONF_IMODULE_free(st) SKM_sk_free(CONF_IMODULE, (st)) -# define sk_CONF_IMODULE_num(st) SKM_sk_num(CONF_IMODULE, (st)) -# define sk_CONF_IMODULE_value(st, i) SKM_sk_value(CONF_IMODULE, (st), (i)) -# define sk_CONF_IMODULE_set(st, i, val) SKM_sk_set(CONF_IMODULE, (st), (i), (val)) -# define sk_CONF_IMODULE_zero(st) SKM_sk_zero(CONF_IMODULE, (st)) -# define sk_CONF_IMODULE_push(st, val) SKM_sk_push(CONF_IMODULE, (st), (val)) -# define sk_CONF_IMODULE_unshift(st, val) SKM_sk_unshift(CONF_IMODULE, (st), (val)) -# define sk_CONF_IMODULE_find(st, val) SKM_sk_find(CONF_IMODULE, (st), (val)) -# define sk_CONF_IMODULE_find_ex(st, val) SKM_sk_find_ex(CONF_IMODULE, (st), (val)) -# define sk_CONF_IMODULE_delete(st, i) SKM_sk_delete(CONF_IMODULE, (st), (i)) -# define sk_CONF_IMODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_IMODULE, (st), (ptr)) -# define sk_CONF_IMODULE_insert(st, val, i) SKM_sk_insert(CONF_IMODULE, (st), (val), (i)) -# define sk_CONF_IMODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_IMODULE, (st), (cmp)) -# define sk_CONF_IMODULE_dup(st) SKM_sk_dup(CONF_IMODULE, st) -# define sk_CONF_IMODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_IMODULE, (st), (free_func)) -# define sk_CONF_IMODULE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CONF_IMODULE, (st), (copy_func), (free_func)) -# define sk_CONF_IMODULE_shift(st) SKM_sk_shift(CONF_IMODULE, (st)) -# define sk_CONF_IMODULE_pop(st) SKM_sk_pop(CONF_IMODULE, (st)) -# define sk_CONF_IMODULE_sort(st) SKM_sk_sort(CONF_IMODULE, (st)) -# define sk_CONF_IMODULE_is_sorted(st) SKM_sk_is_sorted(CONF_IMODULE, (st)) -# define sk_CONF_MODULE_new(cmp) SKM_sk_new(CONF_MODULE, (cmp)) -# define sk_CONF_MODULE_new_null() SKM_sk_new_null(CONF_MODULE) -# define sk_CONF_MODULE_free(st) SKM_sk_free(CONF_MODULE, (st)) -# define sk_CONF_MODULE_num(st) SKM_sk_num(CONF_MODULE, (st)) -# define sk_CONF_MODULE_value(st, i) SKM_sk_value(CONF_MODULE, (st), (i)) -# define sk_CONF_MODULE_set(st, i, val) SKM_sk_set(CONF_MODULE, (st), (i), (val)) -# define sk_CONF_MODULE_zero(st) SKM_sk_zero(CONF_MODULE, (st)) -# define sk_CONF_MODULE_push(st, val) SKM_sk_push(CONF_MODULE, (st), (val)) -# define sk_CONF_MODULE_unshift(st, val) SKM_sk_unshift(CONF_MODULE, (st), (val)) -# define sk_CONF_MODULE_find(st, val) SKM_sk_find(CONF_MODULE, (st), (val)) -# define sk_CONF_MODULE_find_ex(st, val) SKM_sk_find_ex(CONF_MODULE, (st), (val)) -# define sk_CONF_MODULE_delete(st, i) SKM_sk_delete(CONF_MODULE, (st), (i)) -# define sk_CONF_MODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_MODULE, (st), (ptr)) -# define sk_CONF_MODULE_insert(st, val, i) SKM_sk_insert(CONF_MODULE, (st), (val), (i)) -# define sk_CONF_MODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_MODULE, (st), (cmp)) -# define sk_CONF_MODULE_dup(st) SKM_sk_dup(CONF_MODULE, st) -# define sk_CONF_MODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_MODULE, (st), (free_func)) -# define sk_CONF_MODULE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CONF_MODULE, (st), (copy_func), (free_func)) -# define sk_CONF_MODULE_shift(st) SKM_sk_shift(CONF_MODULE, (st)) -# define sk_CONF_MODULE_pop(st) SKM_sk_pop(CONF_MODULE, (st)) -# define sk_CONF_MODULE_sort(st) SKM_sk_sort(CONF_MODULE, (st)) -# define sk_CONF_MODULE_is_sorted(st) SKM_sk_is_sorted(CONF_MODULE, (st)) -# define sk_CONF_VALUE_new(cmp) SKM_sk_new(CONF_VALUE, (cmp)) -# define sk_CONF_VALUE_new_null() SKM_sk_new_null(CONF_VALUE) -# define sk_CONF_VALUE_free(st) SKM_sk_free(CONF_VALUE, (st)) -# define sk_CONF_VALUE_num(st) SKM_sk_num(CONF_VALUE, (st)) -# define sk_CONF_VALUE_value(st, i) SKM_sk_value(CONF_VALUE, (st), (i)) -# define sk_CONF_VALUE_set(st, i, val) SKM_sk_set(CONF_VALUE, (st), (i), (val)) -# define sk_CONF_VALUE_zero(st) SKM_sk_zero(CONF_VALUE, (st)) -# define sk_CONF_VALUE_push(st, val) SKM_sk_push(CONF_VALUE, (st), (val)) -# define sk_CONF_VALUE_unshift(st, val) SKM_sk_unshift(CONF_VALUE, (st), (val)) -# define sk_CONF_VALUE_find(st, val) SKM_sk_find(CONF_VALUE, (st), (val)) -# define sk_CONF_VALUE_find_ex(st, val) SKM_sk_find_ex(CONF_VALUE, (st), (val)) -# define sk_CONF_VALUE_delete(st, i) SKM_sk_delete(CONF_VALUE, (st), (i)) -# define sk_CONF_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_VALUE, (st), (ptr)) -# define sk_CONF_VALUE_insert(st, val, i) SKM_sk_insert(CONF_VALUE, (st), (val), (i)) -# define sk_CONF_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_VALUE, (st), (cmp)) -# define sk_CONF_VALUE_dup(st) SKM_sk_dup(CONF_VALUE, st) -# define sk_CONF_VALUE_pop_free(st, free_func) SKM_sk_pop_free(CONF_VALUE, (st), (free_func)) -# define sk_CONF_VALUE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CONF_VALUE, (st), (copy_func), (free_func)) -# define sk_CONF_VALUE_shift(st) SKM_sk_shift(CONF_VALUE, (st)) -# define sk_CONF_VALUE_pop(st) SKM_sk_pop(CONF_VALUE, (st)) -# define sk_CONF_VALUE_sort(st) SKM_sk_sort(CONF_VALUE, (st)) -# define sk_CONF_VALUE_is_sorted(st) SKM_sk_is_sorted(CONF_VALUE, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_new(cmp) SKM_sk_new(CRYPTO_EX_DATA_FUNCS, (cmp)) -# define sk_CRYPTO_EX_DATA_FUNCS_new_null() SKM_sk_new_null(CRYPTO_EX_DATA_FUNCS) -# define sk_CRYPTO_EX_DATA_FUNCS_free(st) SKM_sk_free(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_num(st) SKM_sk_num(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_value(st, i) SKM_sk_value(CRYPTO_EX_DATA_FUNCS, (st), (i)) -# define sk_CRYPTO_EX_DATA_FUNCS_set(st, i, val) SKM_sk_set(CRYPTO_EX_DATA_FUNCS, (st), (i), (val)) -# define sk_CRYPTO_EX_DATA_FUNCS_zero(st) SKM_sk_zero(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_push(st, val) SKM_sk_push(CRYPTO_EX_DATA_FUNCS, (st), (val)) -# define sk_CRYPTO_EX_DATA_FUNCS_unshift(st, val) SKM_sk_unshift(CRYPTO_EX_DATA_FUNCS, (st), (val)) -# define sk_CRYPTO_EX_DATA_FUNCS_find(st, val) SKM_sk_find(CRYPTO_EX_DATA_FUNCS, (st), (val)) -# define sk_CRYPTO_EX_DATA_FUNCS_find_ex(st, val) SKM_sk_find_ex(CRYPTO_EX_DATA_FUNCS, (st), (val)) -# define sk_CRYPTO_EX_DATA_FUNCS_delete(st, i) SKM_sk_delete(CRYPTO_EX_DATA_FUNCS, (st), (i)) -# define sk_CRYPTO_EX_DATA_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_EX_DATA_FUNCS, (st), (ptr)) -# define sk_CRYPTO_EX_DATA_FUNCS_insert(st, val, i) SKM_sk_insert(CRYPTO_EX_DATA_FUNCS, (st), (val), (i)) -# define sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_EX_DATA_FUNCS, (st), (cmp)) -# define sk_CRYPTO_EX_DATA_FUNCS_dup(st) SKM_sk_dup(CRYPTO_EX_DATA_FUNCS, st) -# define sk_CRYPTO_EX_DATA_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_EX_DATA_FUNCS, (st), (free_func)) -# define sk_CRYPTO_EX_DATA_FUNCS_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CRYPTO_EX_DATA_FUNCS, (st), (copy_func), (free_func)) -# define sk_CRYPTO_EX_DATA_FUNCS_shift(st) SKM_sk_shift(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_pop(st) SKM_sk_pop(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_sort(st) SKM_sk_sort(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_EX_DATA_FUNCS_is_sorted(st) SKM_sk_is_sorted(CRYPTO_EX_DATA_FUNCS, (st)) -# define sk_CRYPTO_dynlock_new(cmp) SKM_sk_new(CRYPTO_dynlock, (cmp)) -# define sk_CRYPTO_dynlock_new_null() SKM_sk_new_null(CRYPTO_dynlock) -# define sk_CRYPTO_dynlock_free(st) SKM_sk_free(CRYPTO_dynlock, (st)) -# define sk_CRYPTO_dynlock_num(st) SKM_sk_num(CRYPTO_dynlock, (st)) -# define sk_CRYPTO_dynlock_value(st, i) SKM_sk_value(CRYPTO_dynlock, (st), (i)) -# define sk_CRYPTO_dynlock_set(st, i, val) SKM_sk_set(CRYPTO_dynlock, (st), (i), (val)) -# define sk_CRYPTO_dynlock_zero(st) SKM_sk_zero(CRYPTO_dynlock, (st)) -# define sk_CRYPTO_dynlock_push(st, val) SKM_sk_push(CRYPTO_dynlock, (st), (val)) -# define sk_CRYPTO_dynlock_unshift(st, val) SKM_sk_unshift(CRYPTO_dynlock, (st), (val)) -# define sk_CRYPTO_dynlock_find(st, val) SKM_sk_find(CRYPTO_dynlock, (st), (val)) -# define sk_CRYPTO_dynlock_find_ex(st, val) SKM_sk_find_ex(CRYPTO_dynlock, (st), (val)) -# define sk_CRYPTO_dynlock_delete(st, i) SKM_sk_delete(CRYPTO_dynlock, (st), (i)) -# define sk_CRYPTO_dynlock_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_dynlock, (st), (ptr)) -# define sk_CRYPTO_dynlock_insert(st, val, i) SKM_sk_insert(CRYPTO_dynlock, (st), (val), (i)) -# define sk_CRYPTO_dynlock_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_dynlock, (st), (cmp)) -# define sk_CRYPTO_dynlock_dup(st) SKM_sk_dup(CRYPTO_dynlock, st) -# define sk_CRYPTO_dynlock_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_dynlock, (st), (free_func)) -# define sk_CRYPTO_dynlock_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(CRYPTO_dynlock, (st), (copy_func), (free_func)) -# define sk_CRYPTO_dynlock_shift(st) SKM_sk_shift(CRYPTO_dynlock, (st)) -# define sk_CRYPTO_dynlock_pop(st) SKM_sk_pop(CRYPTO_dynlock, (st)) -# define sk_CRYPTO_dynlock_sort(st) SKM_sk_sort(CRYPTO_dynlock, (st)) -# define sk_CRYPTO_dynlock_is_sorted(st) SKM_sk_is_sorted(CRYPTO_dynlock, (st)) -# define sk_DIST_POINT_new(cmp) SKM_sk_new(DIST_POINT, (cmp)) -# define sk_DIST_POINT_new_null() SKM_sk_new_null(DIST_POINT) -# define sk_DIST_POINT_free(st) SKM_sk_free(DIST_POINT, (st)) -# define sk_DIST_POINT_num(st) SKM_sk_num(DIST_POINT, (st)) -# define sk_DIST_POINT_value(st, i) SKM_sk_value(DIST_POINT, (st), (i)) -# define sk_DIST_POINT_set(st, i, val) SKM_sk_set(DIST_POINT, (st), (i), (val)) -# define sk_DIST_POINT_zero(st) SKM_sk_zero(DIST_POINT, (st)) -# define sk_DIST_POINT_push(st, val) SKM_sk_push(DIST_POINT, (st), (val)) -# define sk_DIST_POINT_unshift(st, val) SKM_sk_unshift(DIST_POINT, (st), (val)) -# define sk_DIST_POINT_find(st, val) SKM_sk_find(DIST_POINT, (st), (val)) -# define sk_DIST_POINT_find_ex(st, val) SKM_sk_find_ex(DIST_POINT, (st), (val)) -# define sk_DIST_POINT_delete(st, i) SKM_sk_delete(DIST_POINT, (st), (i)) -# define sk_DIST_POINT_delete_ptr(st, ptr) SKM_sk_delete_ptr(DIST_POINT, (st), (ptr)) -# define sk_DIST_POINT_insert(st, val, i) SKM_sk_insert(DIST_POINT, (st), (val), (i)) -# define sk_DIST_POINT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(DIST_POINT, (st), (cmp)) -# define sk_DIST_POINT_dup(st) SKM_sk_dup(DIST_POINT, st) -# define sk_DIST_POINT_pop_free(st, free_func) SKM_sk_pop_free(DIST_POINT, (st), (free_func)) -# define sk_DIST_POINT_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(DIST_POINT, (st), (copy_func), (free_func)) -# define sk_DIST_POINT_shift(st) SKM_sk_shift(DIST_POINT, (st)) -# define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st)) -# define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st)) -# define sk_DIST_POINT_is_sorted(st) SKM_sk_is_sorted(DIST_POINT, (st)) -# define sk_ENGINE_new(cmp) SKM_sk_new(ENGINE, (cmp)) -# define sk_ENGINE_new_null() SKM_sk_new_null(ENGINE) -# define sk_ENGINE_free(st) SKM_sk_free(ENGINE, (st)) -# define sk_ENGINE_num(st) SKM_sk_num(ENGINE, (st)) -# define sk_ENGINE_value(st, i) SKM_sk_value(ENGINE, (st), (i)) -# define sk_ENGINE_set(st, i, val) SKM_sk_set(ENGINE, (st), (i), (val)) -# define sk_ENGINE_zero(st) SKM_sk_zero(ENGINE, (st)) -# define sk_ENGINE_push(st, val) SKM_sk_push(ENGINE, (st), (val)) -# define sk_ENGINE_unshift(st, val) SKM_sk_unshift(ENGINE, (st), (val)) -# define sk_ENGINE_find(st, val) SKM_sk_find(ENGINE, (st), (val)) -# define sk_ENGINE_find_ex(st, val) SKM_sk_find_ex(ENGINE, (st), (val)) -# define sk_ENGINE_delete(st, i) SKM_sk_delete(ENGINE, (st), (i)) -# define sk_ENGINE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE, (st), (ptr)) -# define sk_ENGINE_insert(st, val, i) SKM_sk_insert(ENGINE, (st), (val), (i)) -# define sk_ENGINE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE, (st), (cmp)) -# define sk_ENGINE_dup(st) SKM_sk_dup(ENGINE, st) -# define sk_ENGINE_pop_free(st, free_func) SKM_sk_pop_free(ENGINE, (st), (free_func)) -# define sk_ENGINE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ENGINE, (st), (copy_func), (free_func)) -# define sk_ENGINE_shift(st) SKM_sk_shift(ENGINE, (st)) -# define sk_ENGINE_pop(st) SKM_sk_pop(ENGINE, (st)) -# define sk_ENGINE_sort(st) SKM_sk_sort(ENGINE, (st)) -# define sk_ENGINE_is_sorted(st) SKM_sk_is_sorted(ENGINE, (st)) -# define sk_ENGINE_CLEANUP_ITEM_new(cmp) SKM_sk_new(ENGINE_CLEANUP_ITEM, (cmp)) -# define sk_ENGINE_CLEANUP_ITEM_new_null() SKM_sk_new_null(ENGINE_CLEANUP_ITEM) -# define sk_ENGINE_CLEANUP_ITEM_free(st) SKM_sk_free(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ENGINE_CLEANUP_ITEM_num(st) SKM_sk_num(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ENGINE_CLEANUP_ITEM_value(st, i) SKM_sk_value(ENGINE_CLEANUP_ITEM, (st), (i)) -# define sk_ENGINE_CLEANUP_ITEM_set(st, i, val) SKM_sk_set(ENGINE_CLEANUP_ITEM, (st), (i), (val)) -# define sk_ENGINE_CLEANUP_ITEM_zero(st) SKM_sk_zero(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ENGINE_CLEANUP_ITEM_push(st, val) SKM_sk_push(ENGINE_CLEANUP_ITEM, (st), (val)) -# define sk_ENGINE_CLEANUP_ITEM_unshift(st, val) SKM_sk_unshift(ENGINE_CLEANUP_ITEM, (st), (val)) -# define sk_ENGINE_CLEANUP_ITEM_find(st, val) SKM_sk_find(ENGINE_CLEANUP_ITEM, (st), (val)) -# define sk_ENGINE_CLEANUP_ITEM_find_ex(st, val) SKM_sk_find_ex(ENGINE_CLEANUP_ITEM, (st), (val)) -# define sk_ENGINE_CLEANUP_ITEM_delete(st, i) SKM_sk_delete(ENGINE_CLEANUP_ITEM, (st), (i)) -# define sk_ENGINE_CLEANUP_ITEM_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE_CLEANUP_ITEM, (st), (ptr)) -# define sk_ENGINE_CLEANUP_ITEM_insert(st, val, i) SKM_sk_insert(ENGINE_CLEANUP_ITEM, (st), (val), (i)) -# define sk_ENGINE_CLEANUP_ITEM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE_CLEANUP_ITEM, (st), (cmp)) -# define sk_ENGINE_CLEANUP_ITEM_dup(st) SKM_sk_dup(ENGINE_CLEANUP_ITEM, st) -# define sk_ENGINE_CLEANUP_ITEM_pop_free(st, free_func) SKM_sk_pop_free(ENGINE_CLEANUP_ITEM, (st), (free_func)) -# define sk_ENGINE_CLEANUP_ITEM_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ENGINE_CLEANUP_ITEM, (st), (copy_func), (free_func)) -# define sk_ENGINE_CLEANUP_ITEM_shift(st) SKM_sk_shift(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ENGINE_CLEANUP_ITEM_pop(st) SKM_sk_pop(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ENGINE_CLEANUP_ITEM_sort(st) SKM_sk_sort(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ENGINE_CLEANUP_ITEM_is_sorted(st) SKM_sk_is_sorted(ENGINE_CLEANUP_ITEM, (st)) -# define sk_ESS_CERT_ID_new(cmp) SKM_sk_new(ESS_CERT_ID, (cmp)) -# define sk_ESS_CERT_ID_new_null() SKM_sk_new_null(ESS_CERT_ID) -# define sk_ESS_CERT_ID_free(st) SKM_sk_free(ESS_CERT_ID, (st)) -# define sk_ESS_CERT_ID_num(st) SKM_sk_num(ESS_CERT_ID, (st)) -# define sk_ESS_CERT_ID_value(st, i) SKM_sk_value(ESS_CERT_ID, (st), (i)) -# define sk_ESS_CERT_ID_set(st, i, val) SKM_sk_set(ESS_CERT_ID, (st), (i), (val)) -# define sk_ESS_CERT_ID_zero(st) SKM_sk_zero(ESS_CERT_ID, (st)) -# define sk_ESS_CERT_ID_push(st, val) SKM_sk_push(ESS_CERT_ID, (st), (val)) -# define sk_ESS_CERT_ID_unshift(st, val) SKM_sk_unshift(ESS_CERT_ID, (st), (val)) -# define sk_ESS_CERT_ID_find(st, val) SKM_sk_find(ESS_CERT_ID, (st), (val)) -# define sk_ESS_CERT_ID_find_ex(st, val) SKM_sk_find_ex(ESS_CERT_ID, (st), (val)) -# define sk_ESS_CERT_ID_delete(st, i) SKM_sk_delete(ESS_CERT_ID, (st), (i)) -# define sk_ESS_CERT_ID_delete_ptr(st, ptr) SKM_sk_delete_ptr(ESS_CERT_ID, (st), (ptr)) -# define sk_ESS_CERT_ID_insert(st, val, i) SKM_sk_insert(ESS_CERT_ID, (st), (val), (i)) -# define sk_ESS_CERT_ID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ESS_CERT_ID, (st), (cmp)) -# define sk_ESS_CERT_ID_dup(st) SKM_sk_dup(ESS_CERT_ID, st) -# define sk_ESS_CERT_ID_pop_free(st, free_func) SKM_sk_pop_free(ESS_CERT_ID, (st), (free_func)) -# define sk_ESS_CERT_ID_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(ESS_CERT_ID, (st), (copy_func), (free_func)) -# define sk_ESS_CERT_ID_shift(st) SKM_sk_shift(ESS_CERT_ID, (st)) -# define sk_ESS_CERT_ID_pop(st) SKM_sk_pop(ESS_CERT_ID, (st)) -# define sk_ESS_CERT_ID_sort(st) SKM_sk_sort(ESS_CERT_ID, (st)) -# define sk_ESS_CERT_ID_is_sorted(st) SKM_sk_is_sorted(ESS_CERT_ID, (st)) -# define sk_EVP_MD_new(cmp) SKM_sk_new(EVP_MD, (cmp)) -# define sk_EVP_MD_new_null() SKM_sk_new_null(EVP_MD) -# define sk_EVP_MD_free(st) SKM_sk_free(EVP_MD, (st)) -# define sk_EVP_MD_num(st) SKM_sk_num(EVP_MD, (st)) -# define sk_EVP_MD_value(st, i) SKM_sk_value(EVP_MD, (st), (i)) -# define sk_EVP_MD_set(st, i, val) SKM_sk_set(EVP_MD, (st), (i), (val)) -# define sk_EVP_MD_zero(st) SKM_sk_zero(EVP_MD, (st)) -# define sk_EVP_MD_push(st, val) SKM_sk_push(EVP_MD, (st), (val)) -# define sk_EVP_MD_unshift(st, val) SKM_sk_unshift(EVP_MD, (st), (val)) -# define sk_EVP_MD_find(st, val) SKM_sk_find(EVP_MD, (st), (val)) -# define sk_EVP_MD_find_ex(st, val) SKM_sk_find_ex(EVP_MD, (st), (val)) -# define sk_EVP_MD_delete(st, i) SKM_sk_delete(EVP_MD, (st), (i)) -# define sk_EVP_MD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_MD, (st), (ptr)) -# define sk_EVP_MD_insert(st, val, i) SKM_sk_insert(EVP_MD, (st), (val), (i)) -# define sk_EVP_MD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_MD, (st), (cmp)) -# define sk_EVP_MD_dup(st) SKM_sk_dup(EVP_MD, st) -# define sk_EVP_MD_pop_free(st, free_func) SKM_sk_pop_free(EVP_MD, (st), (free_func)) -# define sk_EVP_MD_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(EVP_MD, (st), (copy_func), (free_func)) -# define sk_EVP_MD_shift(st) SKM_sk_shift(EVP_MD, (st)) -# define sk_EVP_MD_pop(st) SKM_sk_pop(EVP_MD, (st)) -# define sk_EVP_MD_sort(st) SKM_sk_sort(EVP_MD, (st)) -# define sk_EVP_MD_is_sorted(st) SKM_sk_is_sorted(EVP_MD, (st)) -# define sk_EVP_PBE_CTL_new(cmp) SKM_sk_new(EVP_PBE_CTL, (cmp)) -# define sk_EVP_PBE_CTL_new_null() SKM_sk_new_null(EVP_PBE_CTL) -# define sk_EVP_PBE_CTL_free(st) SKM_sk_free(EVP_PBE_CTL, (st)) -# define sk_EVP_PBE_CTL_num(st) SKM_sk_num(EVP_PBE_CTL, (st)) -# define sk_EVP_PBE_CTL_value(st, i) SKM_sk_value(EVP_PBE_CTL, (st), (i)) -# define sk_EVP_PBE_CTL_set(st, i, val) SKM_sk_set(EVP_PBE_CTL, (st), (i), (val)) -# define sk_EVP_PBE_CTL_zero(st) SKM_sk_zero(EVP_PBE_CTL, (st)) -# define sk_EVP_PBE_CTL_push(st, val) SKM_sk_push(EVP_PBE_CTL, (st), (val)) -# define sk_EVP_PBE_CTL_unshift(st, val) SKM_sk_unshift(EVP_PBE_CTL, (st), (val)) -# define sk_EVP_PBE_CTL_find(st, val) SKM_sk_find(EVP_PBE_CTL, (st), (val)) -# define sk_EVP_PBE_CTL_find_ex(st, val) SKM_sk_find_ex(EVP_PBE_CTL, (st), (val)) -# define sk_EVP_PBE_CTL_delete(st, i) SKM_sk_delete(EVP_PBE_CTL, (st), (i)) -# define sk_EVP_PBE_CTL_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PBE_CTL, (st), (ptr)) -# define sk_EVP_PBE_CTL_insert(st, val, i) SKM_sk_insert(EVP_PBE_CTL, (st), (val), (i)) -# define sk_EVP_PBE_CTL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PBE_CTL, (st), (cmp)) -# define sk_EVP_PBE_CTL_dup(st) SKM_sk_dup(EVP_PBE_CTL, st) -# define sk_EVP_PBE_CTL_pop_free(st, free_func) SKM_sk_pop_free(EVP_PBE_CTL, (st), (free_func)) -# define sk_EVP_PBE_CTL_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(EVP_PBE_CTL, (st), (copy_func), (free_func)) -# define sk_EVP_PBE_CTL_shift(st) SKM_sk_shift(EVP_PBE_CTL, (st)) -# define sk_EVP_PBE_CTL_pop(st) SKM_sk_pop(EVP_PBE_CTL, (st)) -# define sk_EVP_PBE_CTL_sort(st) SKM_sk_sort(EVP_PBE_CTL, (st)) -# define sk_EVP_PBE_CTL_is_sorted(st) SKM_sk_is_sorted(EVP_PBE_CTL, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_new(cmp) SKM_sk_new(EVP_PKEY_ASN1_METHOD, (cmp)) -# define sk_EVP_PKEY_ASN1_METHOD_new_null() SKM_sk_new_null(EVP_PKEY_ASN1_METHOD) -# define sk_EVP_PKEY_ASN1_METHOD_free(st) SKM_sk_free(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_num(st) SKM_sk_num(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_value(st, i) SKM_sk_value(EVP_PKEY_ASN1_METHOD, (st), (i)) -# define sk_EVP_PKEY_ASN1_METHOD_set(st, i, val) SKM_sk_set(EVP_PKEY_ASN1_METHOD, (st), (i), (val)) -# define sk_EVP_PKEY_ASN1_METHOD_zero(st) SKM_sk_zero(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_push(st, val) SKM_sk_push(EVP_PKEY_ASN1_METHOD, (st), (val)) -# define sk_EVP_PKEY_ASN1_METHOD_unshift(st, val) SKM_sk_unshift(EVP_PKEY_ASN1_METHOD, (st), (val)) -# define sk_EVP_PKEY_ASN1_METHOD_find(st, val) SKM_sk_find(EVP_PKEY_ASN1_METHOD, (st), (val)) -# define sk_EVP_PKEY_ASN1_METHOD_find_ex(st, val) SKM_sk_find_ex(EVP_PKEY_ASN1_METHOD, (st), (val)) -# define sk_EVP_PKEY_ASN1_METHOD_delete(st, i) SKM_sk_delete(EVP_PKEY_ASN1_METHOD, (st), (i)) -# define sk_EVP_PKEY_ASN1_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PKEY_ASN1_METHOD, (st), (ptr)) -# define sk_EVP_PKEY_ASN1_METHOD_insert(st, val, i) SKM_sk_insert(EVP_PKEY_ASN1_METHOD, (st), (val), (i)) -# define sk_EVP_PKEY_ASN1_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PKEY_ASN1_METHOD, (st), (cmp)) -# define sk_EVP_PKEY_ASN1_METHOD_dup(st) SKM_sk_dup(EVP_PKEY_ASN1_METHOD, st) -# define sk_EVP_PKEY_ASN1_METHOD_pop_free(st, free_func) SKM_sk_pop_free(EVP_PKEY_ASN1_METHOD, (st), (free_func)) -# define sk_EVP_PKEY_ASN1_METHOD_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(EVP_PKEY_ASN1_METHOD, (st), (copy_func), (free_func)) -# define sk_EVP_PKEY_ASN1_METHOD_shift(st) SKM_sk_shift(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_pop(st) SKM_sk_pop(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_sort(st) SKM_sk_sort(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_ASN1_METHOD_is_sorted(st) SKM_sk_is_sorted(EVP_PKEY_ASN1_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_new(cmp) SKM_sk_new(EVP_PKEY_METHOD, (cmp)) -# define sk_EVP_PKEY_METHOD_new_null() SKM_sk_new_null(EVP_PKEY_METHOD) -# define sk_EVP_PKEY_METHOD_free(st) SKM_sk_free(EVP_PKEY_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_num(st) SKM_sk_num(EVP_PKEY_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_value(st, i) SKM_sk_value(EVP_PKEY_METHOD, (st), (i)) -# define sk_EVP_PKEY_METHOD_set(st, i, val) SKM_sk_set(EVP_PKEY_METHOD, (st), (i), (val)) -# define sk_EVP_PKEY_METHOD_zero(st) SKM_sk_zero(EVP_PKEY_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_push(st, val) SKM_sk_push(EVP_PKEY_METHOD, (st), (val)) -# define sk_EVP_PKEY_METHOD_unshift(st, val) SKM_sk_unshift(EVP_PKEY_METHOD, (st), (val)) -# define sk_EVP_PKEY_METHOD_find(st, val) SKM_sk_find(EVP_PKEY_METHOD, (st), (val)) -# define sk_EVP_PKEY_METHOD_find_ex(st, val) SKM_sk_find_ex(EVP_PKEY_METHOD, (st), (val)) -# define sk_EVP_PKEY_METHOD_delete(st, i) SKM_sk_delete(EVP_PKEY_METHOD, (st), (i)) -# define sk_EVP_PKEY_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PKEY_METHOD, (st), (ptr)) -# define sk_EVP_PKEY_METHOD_insert(st, val, i) SKM_sk_insert(EVP_PKEY_METHOD, (st), (val), (i)) -# define sk_EVP_PKEY_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PKEY_METHOD, (st), (cmp)) -# define sk_EVP_PKEY_METHOD_dup(st) SKM_sk_dup(EVP_PKEY_METHOD, st) -# define sk_EVP_PKEY_METHOD_pop_free(st, free_func) SKM_sk_pop_free(EVP_PKEY_METHOD, (st), (free_func)) -# define sk_EVP_PKEY_METHOD_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(EVP_PKEY_METHOD, (st), (copy_func), (free_func)) -# define sk_EVP_PKEY_METHOD_shift(st) SKM_sk_shift(EVP_PKEY_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_pop(st) SKM_sk_pop(EVP_PKEY_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_sort(st) SKM_sk_sort(EVP_PKEY_METHOD, (st)) -# define sk_EVP_PKEY_METHOD_is_sorted(st) SKM_sk_is_sorted(EVP_PKEY_METHOD, (st)) -# define sk_GENERAL_NAME_new(cmp) SKM_sk_new(GENERAL_NAME, (cmp)) -# define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME) -# define sk_GENERAL_NAME_free(st) SKM_sk_free(GENERAL_NAME, (st)) -# define sk_GENERAL_NAME_num(st) SKM_sk_num(GENERAL_NAME, (st)) -# define sk_GENERAL_NAME_value(st, i) SKM_sk_value(GENERAL_NAME, (st), (i)) -# define sk_GENERAL_NAME_set(st, i, val) SKM_sk_set(GENERAL_NAME, (st), (i), (val)) -# define sk_GENERAL_NAME_zero(st) SKM_sk_zero(GENERAL_NAME, (st)) -# define sk_GENERAL_NAME_push(st, val) SKM_sk_push(GENERAL_NAME, (st), (val)) -# define sk_GENERAL_NAME_unshift(st, val) SKM_sk_unshift(GENERAL_NAME, (st), (val)) -# define sk_GENERAL_NAME_find(st, val) SKM_sk_find(GENERAL_NAME, (st), (val)) -# define sk_GENERAL_NAME_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAME, (st), (val)) -# define sk_GENERAL_NAME_delete(st, i) SKM_sk_delete(GENERAL_NAME, (st), (i)) -# define sk_GENERAL_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAME, (st), (ptr)) -# define sk_GENERAL_NAME_insert(st, val, i) SKM_sk_insert(GENERAL_NAME, (st), (val), (i)) -# define sk_GENERAL_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAME, (st), (cmp)) -# define sk_GENERAL_NAME_dup(st) SKM_sk_dup(GENERAL_NAME, st) -# define sk_GENERAL_NAME_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAME, (st), (free_func)) -# define sk_GENERAL_NAME_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(GENERAL_NAME, (st), (copy_func), (free_func)) -# define sk_GENERAL_NAME_shift(st) SKM_sk_shift(GENERAL_NAME, (st)) -# define sk_GENERAL_NAME_pop(st) SKM_sk_pop(GENERAL_NAME, (st)) -# define sk_GENERAL_NAME_sort(st) SKM_sk_sort(GENERAL_NAME, (st)) -# define sk_GENERAL_NAME_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAME, (st)) -# define sk_GENERAL_NAMES_new(cmp) SKM_sk_new(GENERAL_NAMES, (cmp)) -# define sk_GENERAL_NAMES_new_null() SKM_sk_new_null(GENERAL_NAMES) -# define sk_GENERAL_NAMES_free(st) SKM_sk_free(GENERAL_NAMES, (st)) -# define sk_GENERAL_NAMES_num(st) SKM_sk_num(GENERAL_NAMES, (st)) -# define sk_GENERAL_NAMES_value(st, i) SKM_sk_value(GENERAL_NAMES, (st), (i)) -# define sk_GENERAL_NAMES_set(st, i, val) SKM_sk_set(GENERAL_NAMES, (st), (i), (val)) -# define sk_GENERAL_NAMES_zero(st) SKM_sk_zero(GENERAL_NAMES, (st)) -# define sk_GENERAL_NAMES_push(st, val) SKM_sk_push(GENERAL_NAMES, (st), (val)) -# define sk_GENERAL_NAMES_unshift(st, val) SKM_sk_unshift(GENERAL_NAMES, (st), (val)) -# define sk_GENERAL_NAMES_find(st, val) SKM_sk_find(GENERAL_NAMES, (st), (val)) -# define sk_GENERAL_NAMES_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAMES, (st), (val)) -# define sk_GENERAL_NAMES_delete(st, i) SKM_sk_delete(GENERAL_NAMES, (st), (i)) -# define sk_GENERAL_NAMES_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAMES, (st), (ptr)) -# define sk_GENERAL_NAMES_insert(st, val, i) SKM_sk_insert(GENERAL_NAMES, (st), (val), (i)) -# define sk_GENERAL_NAMES_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAMES, (st), (cmp)) -# define sk_GENERAL_NAMES_dup(st) SKM_sk_dup(GENERAL_NAMES, st) -# define sk_GENERAL_NAMES_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAMES, (st), (free_func)) -# define sk_GENERAL_NAMES_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(GENERAL_NAMES, (st), (copy_func), (free_func)) -# define sk_GENERAL_NAMES_shift(st) SKM_sk_shift(GENERAL_NAMES, (st)) -# define sk_GENERAL_NAMES_pop(st) SKM_sk_pop(GENERAL_NAMES, (st)) -# define sk_GENERAL_NAMES_sort(st) SKM_sk_sort(GENERAL_NAMES, (st)) -# define sk_GENERAL_NAMES_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAMES, (st)) -# define sk_GENERAL_SUBTREE_new(cmp) SKM_sk_new(GENERAL_SUBTREE, (cmp)) -# define sk_GENERAL_SUBTREE_new_null() SKM_sk_new_null(GENERAL_SUBTREE) -# define sk_GENERAL_SUBTREE_free(st) SKM_sk_free(GENERAL_SUBTREE, (st)) -# define sk_GENERAL_SUBTREE_num(st) SKM_sk_num(GENERAL_SUBTREE, (st)) -# define sk_GENERAL_SUBTREE_value(st, i) SKM_sk_value(GENERAL_SUBTREE, (st), (i)) -# define sk_GENERAL_SUBTREE_set(st, i, val) SKM_sk_set(GENERAL_SUBTREE, (st), (i), (val)) -# define sk_GENERAL_SUBTREE_zero(st) SKM_sk_zero(GENERAL_SUBTREE, (st)) -# define sk_GENERAL_SUBTREE_push(st, val) SKM_sk_push(GENERAL_SUBTREE, (st), (val)) -# define sk_GENERAL_SUBTREE_unshift(st, val) SKM_sk_unshift(GENERAL_SUBTREE, (st), (val)) -# define sk_GENERAL_SUBTREE_find(st, val) SKM_sk_find(GENERAL_SUBTREE, (st), (val)) -# define sk_GENERAL_SUBTREE_find_ex(st, val) SKM_sk_find_ex(GENERAL_SUBTREE, (st), (val)) -# define sk_GENERAL_SUBTREE_delete(st, i) SKM_sk_delete(GENERAL_SUBTREE, (st), (i)) -# define sk_GENERAL_SUBTREE_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_SUBTREE, (st), (ptr)) -# define sk_GENERAL_SUBTREE_insert(st, val, i) SKM_sk_insert(GENERAL_SUBTREE, (st), (val), (i)) -# define sk_GENERAL_SUBTREE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_SUBTREE, (st), (cmp)) -# define sk_GENERAL_SUBTREE_dup(st) SKM_sk_dup(GENERAL_SUBTREE, st) -# define sk_GENERAL_SUBTREE_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_SUBTREE, (st), (free_func)) -# define sk_GENERAL_SUBTREE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(GENERAL_SUBTREE, (st), (copy_func), (free_func)) -# define sk_GENERAL_SUBTREE_shift(st) SKM_sk_shift(GENERAL_SUBTREE, (st)) -# define sk_GENERAL_SUBTREE_pop(st) SKM_sk_pop(GENERAL_SUBTREE, (st)) -# define sk_GENERAL_SUBTREE_sort(st) SKM_sk_sort(GENERAL_SUBTREE, (st)) -# define sk_GENERAL_SUBTREE_is_sorted(st) SKM_sk_is_sorted(GENERAL_SUBTREE, (st)) -# define sk_IPAddressFamily_new(cmp) SKM_sk_new(IPAddressFamily, (cmp)) -# define sk_IPAddressFamily_new_null() SKM_sk_new_null(IPAddressFamily) -# define sk_IPAddressFamily_free(st) SKM_sk_free(IPAddressFamily, (st)) -# define sk_IPAddressFamily_num(st) SKM_sk_num(IPAddressFamily, (st)) -# define sk_IPAddressFamily_value(st, i) SKM_sk_value(IPAddressFamily, (st), (i)) -# define sk_IPAddressFamily_set(st, i, val) SKM_sk_set(IPAddressFamily, (st), (i), (val)) -# define sk_IPAddressFamily_zero(st) SKM_sk_zero(IPAddressFamily, (st)) -# define sk_IPAddressFamily_push(st, val) SKM_sk_push(IPAddressFamily, (st), (val)) -# define sk_IPAddressFamily_unshift(st, val) SKM_sk_unshift(IPAddressFamily, (st), (val)) -# define sk_IPAddressFamily_find(st, val) SKM_sk_find(IPAddressFamily, (st), (val)) -# define sk_IPAddressFamily_find_ex(st, val) SKM_sk_find_ex(IPAddressFamily, (st), (val)) -# define sk_IPAddressFamily_delete(st, i) SKM_sk_delete(IPAddressFamily, (st), (i)) -# define sk_IPAddressFamily_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressFamily, (st), (ptr)) -# define sk_IPAddressFamily_insert(st, val, i) SKM_sk_insert(IPAddressFamily, (st), (val), (i)) -# define sk_IPAddressFamily_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressFamily, (st), (cmp)) -# define sk_IPAddressFamily_dup(st) SKM_sk_dup(IPAddressFamily, st) -# define sk_IPAddressFamily_pop_free(st, free_func) SKM_sk_pop_free(IPAddressFamily, (st), (free_func)) -# define sk_IPAddressFamily_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(IPAddressFamily, (st), (copy_func), (free_func)) -# define sk_IPAddressFamily_shift(st) SKM_sk_shift(IPAddressFamily, (st)) -# define sk_IPAddressFamily_pop(st) SKM_sk_pop(IPAddressFamily, (st)) -# define sk_IPAddressFamily_sort(st) SKM_sk_sort(IPAddressFamily, (st)) -# define sk_IPAddressFamily_is_sorted(st) SKM_sk_is_sorted(IPAddressFamily, (st)) -# define sk_IPAddressOrRange_new(cmp) SKM_sk_new(IPAddressOrRange, (cmp)) -# define sk_IPAddressOrRange_new_null() SKM_sk_new_null(IPAddressOrRange) -# define sk_IPAddressOrRange_free(st) SKM_sk_free(IPAddressOrRange, (st)) -# define sk_IPAddressOrRange_num(st) SKM_sk_num(IPAddressOrRange, (st)) -# define sk_IPAddressOrRange_value(st, i) SKM_sk_value(IPAddressOrRange, (st), (i)) -# define sk_IPAddressOrRange_set(st, i, val) SKM_sk_set(IPAddressOrRange, (st), (i), (val)) -# define sk_IPAddressOrRange_zero(st) SKM_sk_zero(IPAddressOrRange, (st)) -# define sk_IPAddressOrRange_push(st, val) SKM_sk_push(IPAddressOrRange, (st), (val)) -# define sk_IPAddressOrRange_unshift(st, val) SKM_sk_unshift(IPAddressOrRange, (st), (val)) -# define sk_IPAddressOrRange_find(st, val) SKM_sk_find(IPAddressOrRange, (st), (val)) -# define sk_IPAddressOrRange_find_ex(st, val) SKM_sk_find_ex(IPAddressOrRange, (st), (val)) -# define sk_IPAddressOrRange_delete(st, i) SKM_sk_delete(IPAddressOrRange, (st), (i)) -# define sk_IPAddressOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressOrRange, (st), (ptr)) -# define sk_IPAddressOrRange_insert(st, val, i) SKM_sk_insert(IPAddressOrRange, (st), (val), (i)) -# define sk_IPAddressOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressOrRange, (st), (cmp)) -# define sk_IPAddressOrRange_dup(st) SKM_sk_dup(IPAddressOrRange, st) -# define sk_IPAddressOrRange_pop_free(st, free_func) SKM_sk_pop_free(IPAddressOrRange, (st), (free_func)) -# define sk_IPAddressOrRange_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(IPAddressOrRange, (st), (copy_func), (free_func)) -# define sk_IPAddressOrRange_shift(st) SKM_sk_shift(IPAddressOrRange, (st)) -# define sk_IPAddressOrRange_pop(st) SKM_sk_pop(IPAddressOrRange, (st)) -# define sk_IPAddressOrRange_sort(st) SKM_sk_sort(IPAddressOrRange, (st)) -# define sk_IPAddressOrRange_is_sorted(st) SKM_sk_is_sorted(IPAddressOrRange, (st)) -# define sk_KRB5_APREQBODY_new(cmp) SKM_sk_new(KRB5_APREQBODY, (cmp)) -# define sk_KRB5_APREQBODY_new_null() SKM_sk_new_null(KRB5_APREQBODY) -# define sk_KRB5_APREQBODY_free(st) SKM_sk_free(KRB5_APREQBODY, (st)) -# define sk_KRB5_APREQBODY_num(st) SKM_sk_num(KRB5_APREQBODY, (st)) -# define sk_KRB5_APREQBODY_value(st, i) SKM_sk_value(KRB5_APREQBODY, (st), (i)) -# define sk_KRB5_APREQBODY_set(st, i, val) SKM_sk_set(KRB5_APREQBODY, (st), (i), (val)) -# define sk_KRB5_APREQBODY_zero(st) SKM_sk_zero(KRB5_APREQBODY, (st)) -# define sk_KRB5_APREQBODY_push(st, val) SKM_sk_push(KRB5_APREQBODY, (st), (val)) -# define sk_KRB5_APREQBODY_unshift(st, val) SKM_sk_unshift(KRB5_APREQBODY, (st), (val)) -# define sk_KRB5_APREQBODY_find(st, val) SKM_sk_find(KRB5_APREQBODY, (st), (val)) -# define sk_KRB5_APREQBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_APREQBODY, (st), (val)) -# define sk_KRB5_APREQBODY_delete(st, i) SKM_sk_delete(KRB5_APREQBODY, (st), (i)) -# define sk_KRB5_APREQBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_APREQBODY, (st), (ptr)) -# define sk_KRB5_APREQBODY_insert(st, val, i) SKM_sk_insert(KRB5_APREQBODY, (st), (val), (i)) -# define sk_KRB5_APREQBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_APREQBODY, (st), (cmp)) -# define sk_KRB5_APREQBODY_dup(st) SKM_sk_dup(KRB5_APREQBODY, st) -# define sk_KRB5_APREQBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_APREQBODY, (st), (free_func)) -# define sk_KRB5_APREQBODY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_APREQBODY, (st), (copy_func), (free_func)) -# define sk_KRB5_APREQBODY_shift(st) SKM_sk_shift(KRB5_APREQBODY, (st)) -# define sk_KRB5_APREQBODY_pop(st) SKM_sk_pop(KRB5_APREQBODY, (st)) -# define sk_KRB5_APREQBODY_sort(st) SKM_sk_sort(KRB5_APREQBODY, (st)) -# define sk_KRB5_APREQBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_APREQBODY, (st)) -# define sk_KRB5_AUTHDATA_new(cmp) SKM_sk_new(KRB5_AUTHDATA, (cmp)) -# define sk_KRB5_AUTHDATA_new_null() SKM_sk_new_null(KRB5_AUTHDATA) -# define sk_KRB5_AUTHDATA_free(st) SKM_sk_free(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHDATA_num(st) SKM_sk_num(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHDATA_value(st, i) SKM_sk_value(KRB5_AUTHDATA, (st), (i)) -# define sk_KRB5_AUTHDATA_set(st, i, val) SKM_sk_set(KRB5_AUTHDATA, (st), (i), (val)) -# define sk_KRB5_AUTHDATA_zero(st) SKM_sk_zero(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHDATA_push(st, val) SKM_sk_push(KRB5_AUTHDATA, (st), (val)) -# define sk_KRB5_AUTHDATA_unshift(st, val) SKM_sk_unshift(KRB5_AUTHDATA, (st), (val)) -# define sk_KRB5_AUTHDATA_find(st, val) SKM_sk_find(KRB5_AUTHDATA, (st), (val)) -# define sk_KRB5_AUTHDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHDATA, (st), (val)) -# define sk_KRB5_AUTHDATA_delete(st, i) SKM_sk_delete(KRB5_AUTHDATA, (st), (i)) -# define sk_KRB5_AUTHDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHDATA, (st), (ptr)) -# define sk_KRB5_AUTHDATA_insert(st, val, i) SKM_sk_insert(KRB5_AUTHDATA, (st), (val), (i)) -# define sk_KRB5_AUTHDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHDATA, (st), (cmp)) -# define sk_KRB5_AUTHDATA_dup(st) SKM_sk_dup(KRB5_AUTHDATA, st) -# define sk_KRB5_AUTHDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHDATA, (st), (free_func)) -# define sk_KRB5_AUTHDATA_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_AUTHDATA, (st), (copy_func), (free_func)) -# define sk_KRB5_AUTHDATA_shift(st) SKM_sk_shift(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHDATA_pop(st) SKM_sk_pop(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHDATA_sort(st) SKM_sk_sort(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHDATA, (st)) -# define sk_KRB5_AUTHENTBODY_new(cmp) SKM_sk_new(KRB5_AUTHENTBODY, (cmp)) -# define sk_KRB5_AUTHENTBODY_new_null() SKM_sk_new_null(KRB5_AUTHENTBODY) -# define sk_KRB5_AUTHENTBODY_free(st) SKM_sk_free(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_AUTHENTBODY_num(st) SKM_sk_num(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_AUTHENTBODY_value(st, i) SKM_sk_value(KRB5_AUTHENTBODY, (st), (i)) -# define sk_KRB5_AUTHENTBODY_set(st, i, val) SKM_sk_set(KRB5_AUTHENTBODY, (st), (i), (val)) -# define sk_KRB5_AUTHENTBODY_zero(st) SKM_sk_zero(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_AUTHENTBODY_push(st, val) SKM_sk_push(KRB5_AUTHENTBODY, (st), (val)) -# define sk_KRB5_AUTHENTBODY_unshift(st, val) SKM_sk_unshift(KRB5_AUTHENTBODY, (st), (val)) -# define sk_KRB5_AUTHENTBODY_find(st, val) SKM_sk_find(KRB5_AUTHENTBODY, (st), (val)) -# define sk_KRB5_AUTHENTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHENTBODY, (st), (val)) -# define sk_KRB5_AUTHENTBODY_delete(st, i) SKM_sk_delete(KRB5_AUTHENTBODY, (st), (i)) -# define sk_KRB5_AUTHENTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHENTBODY, (st), (ptr)) -# define sk_KRB5_AUTHENTBODY_insert(st, val, i) SKM_sk_insert(KRB5_AUTHENTBODY, (st), (val), (i)) -# define sk_KRB5_AUTHENTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHENTBODY, (st), (cmp)) -# define sk_KRB5_AUTHENTBODY_dup(st) SKM_sk_dup(KRB5_AUTHENTBODY, st) -# define sk_KRB5_AUTHENTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHENTBODY, (st), (free_func)) -# define sk_KRB5_AUTHENTBODY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_AUTHENTBODY, (st), (copy_func), (free_func)) -# define sk_KRB5_AUTHENTBODY_shift(st) SKM_sk_shift(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_AUTHENTBODY_pop(st) SKM_sk_pop(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_AUTHENTBODY_sort(st) SKM_sk_sort(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_AUTHENTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHENTBODY, (st)) -# define sk_KRB5_CHECKSUM_new(cmp) SKM_sk_new(KRB5_CHECKSUM, (cmp)) -# define sk_KRB5_CHECKSUM_new_null() SKM_sk_new_null(KRB5_CHECKSUM) -# define sk_KRB5_CHECKSUM_free(st) SKM_sk_free(KRB5_CHECKSUM, (st)) -# define sk_KRB5_CHECKSUM_num(st) SKM_sk_num(KRB5_CHECKSUM, (st)) -# define sk_KRB5_CHECKSUM_value(st, i) SKM_sk_value(KRB5_CHECKSUM, (st), (i)) -# define sk_KRB5_CHECKSUM_set(st, i, val) SKM_sk_set(KRB5_CHECKSUM, (st), (i), (val)) -# define sk_KRB5_CHECKSUM_zero(st) SKM_sk_zero(KRB5_CHECKSUM, (st)) -# define sk_KRB5_CHECKSUM_push(st, val) SKM_sk_push(KRB5_CHECKSUM, (st), (val)) -# define sk_KRB5_CHECKSUM_unshift(st, val) SKM_sk_unshift(KRB5_CHECKSUM, (st), (val)) -# define sk_KRB5_CHECKSUM_find(st, val) SKM_sk_find(KRB5_CHECKSUM, (st), (val)) -# define sk_KRB5_CHECKSUM_find_ex(st, val) SKM_sk_find_ex(KRB5_CHECKSUM, (st), (val)) -# define sk_KRB5_CHECKSUM_delete(st, i) SKM_sk_delete(KRB5_CHECKSUM, (st), (i)) -# define sk_KRB5_CHECKSUM_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_CHECKSUM, (st), (ptr)) -# define sk_KRB5_CHECKSUM_insert(st, val, i) SKM_sk_insert(KRB5_CHECKSUM, (st), (val), (i)) -# define sk_KRB5_CHECKSUM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_CHECKSUM, (st), (cmp)) -# define sk_KRB5_CHECKSUM_dup(st) SKM_sk_dup(KRB5_CHECKSUM, st) -# define sk_KRB5_CHECKSUM_pop_free(st, free_func) SKM_sk_pop_free(KRB5_CHECKSUM, (st), (free_func)) -# define sk_KRB5_CHECKSUM_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_CHECKSUM, (st), (copy_func), (free_func)) -# define sk_KRB5_CHECKSUM_shift(st) SKM_sk_shift(KRB5_CHECKSUM, (st)) -# define sk_KRB5_CHECKSUM_pop(st) SKM_sk_pop(KRB5_CHECKSUM, (st)) -# define sk_KRB5_CHECKSUM_sort(st) SKM_sk_sort(KRB5_CHECKSUM, (st)) -# define sk_KRB5_CHECKSUM_is_sorted(st) SKM_sk_is_sorted(KRB5_CHECKSUM, (st)) -# define sk_KRB5_ENCDATA_new(cmp) SKM_sk_new(KRB5_ENCDATA, (cmp)) -# define sk_KRB5_ENCDATA_new_null() SKM_sk_new_null(KRB5_ENCDATA) -# define sk_KRB5_ENCDATA_free(st) SKM_sk_free(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCDATA_num(st) SKM_sk_num(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCDATA_value(st, i) SKM_sk_value(KRB5_ENCDATA, (st), (i)) -# define sk_KRB5_ENCDATA_set(st, i, val) SKM_sk_set(KRB5_ENCDATA, (st), (i), (val)) -# define sk_KRB5_ENCDATA_zero(st) SKM_sk_zero(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCDATA_push(st, val) SKM_sk_push(KRB5_ENCDATA, (st), (val)) -# define sk_KRB5_ENCDATA_unshift(st, val) SKM_sk_unshift(KRB5_ENCDATA, (st), (val)) -# define sk_KRB5_ENCDATA_find(st, val) SKM_sk_find(KRB5_ENCDATA, (st), (val)) -# define sk_KRB5_ENCDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCDATA, (st), (val)) -# define sk_KRB5_ENCDATA_delete(st, i) SKM_sk_delete(KRB5_ENCDATA, (st), (i)) -# define sk_KRB5_ENCDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCDATA, (st), (ptr)) -# define sk_KRB5_ENCDATA_insert(st, val, i) SKM_sk_insert(KRB5_ENCDATA, (st), (val), (i)) -# define sk_KRB5_ENCDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCDATA, (st), (cmp)) -# define sk_KRB5_ENCDATA_dup(st) SKM_sk_dup(KRB5_ENCDATA, st) -# define sk_KRB5_ENCDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCDATA, (st), (free_func)) -# define sk_KRB5_ENCDATA_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_ENCDATA, (st), (copy_func), (free_func)) -# define sk_KRB5_ENCDATA_shift(st) SKM_sk_shift(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCDATA_pop(st) SKM_sk_pop(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCDATA_sort(st) SKM_sk_sort(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCDATA, (st)) -# define sk_KRB5_ENCKEY_new(cmp) SKM_sk_new(KRB5_ENCKEY, (cmp)) -# define sk_KRB5_ENCKEY_new_null() SKM_sk_new_null(KRB5_ENCKEY) -# define sk_KRB5_ENCKEY_free(st) SKM_sk_free(KRB5_ENCKEY, (st)) -# define sk_KRB5_ENCKEY_num(st) SKM_sk_num(KRB5_ENCKEY, (st)) -# define sk_KRB5_ENCKEY_value(st, i) SKM_sk_value(KRB5_ENCKEY, (st), (i)) -# define sk_KRB5_ENCKEY_set(st, i, val) SKM_sk_set(KRB5_ENCKEY, (st), (i), (val)) -# define sk_KRB5_ENCKEY_zero(st) SKM_sk_zero(KRB5_ENCKEY, (st)) -# define sk_KRB5_ENCKEY_push(st, val) SKM_sk_push(KRB5_ENCKEY, (st), (val)) -# define sk_KRB5_ENCKEY_unshift(st, val) SKM_sk_unshift(KRB5_ENCKEY, (st), (val)) -# define sk_KRB5_ENCKEY_find(st, val) SKM_sk_find(KRB5_ENCKEY, (st), (val)) -# define sk_KRB5_ENCKEY_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCKEY, (st), (val)) -# define sk_KRB5_ENCKEY_delete(st, i) SKM_sk_delete(KRB5_ENCKEY, (st), (i)) -# define sk_KRB5_ENCKEY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCKEY, (st), (ptr)) -# define sk_KRB5_ENCKEY_insert(st, val, i) SKM_sk_insert(KRB5_ENCKEY, (st), (val), (i)) -# define sk_KRB5_ENCKEY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCKEY, (st), (cmp)) -# define sk_KRB5_ENCKEY_dup(st) SKM_sk_dup(KRB5_ENCKEY, st) -# define sk_KRB5_ENCKEY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCKEY, (st), (free_func)) -# define sk_KRB5_ENCKEY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_ENCKEY, (st), (copy_func), (free_func)) -# define sk_KRB5_ENCKEY_shift(st) SKM_sk_shift(KRB5_ENCKEY, (st)) -# define sk_KRB5_ENCKEY_pop(st) SKM_sk_pop(KRB5_ENCKEY, (st)) -# define sk_KRB5_ENCKEY_sort(st) SKM_sk_sort(KRB5_ENCKEY, (st)) -# define sk_KRB5_ENCKEY_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCKEY, (st)) -# define sk_KRB5_PRINCNAME_new(cmp) SKM_sk_new(KRB5_PRINCNAME, (cmp)) -# define sk_KRB5_PRINCNAME_new_null() SKM_sk_new_null(KRB5_PRINCNAME) -# define sk_KRB5_PRINCNAME_free(st) SKM_sk_free(KRB5_PRINCNAME, (st)) -# define sk_KRB5_PRINCNAME_num(st) SKM_sk_num(KRB5_PRINCNAME, (st)) -# define sk_KRB5_PRINCNAME_value(st, i) SKM_sk_value(KRB5_PRINCNAME, (st), (i)) -# define sk_KRB5_PRINCNAME_set(st, i, val) SKM_sk_set(KRB5_PRINCNAME, (st), (i), (val)) -# define sk_KRB5_PRINCNAME_zero(st) SKM_sk_zero(KRB5_PRINCNAME, (st)) -# define sk_KRB5_PRINCNAME_push(st, val) SKM_sk_push(KRB5_PRINCNAME, (st), (val)) -# define sk_KRB5_PRINCNAME_unshift(st, val) SKM_sk_unshift(KRB5_PRINCNAME, (st), (val)) -# define sk_KRB5_PRINCNAME_find(st, val) SKM_sk_find(KRB5_PRINCNAME, (st), (val)) -# define sk_KRB5_PRINCNAME_find_ex(st, val) SKM_sk_find_ex(KRB5_PRINCNAME, (st), (val)) -# define sk_KRB5_PRINCNAME_delete(st, i) SKM_sk_delete(KRB5_PRINCNAME, (st), (i)) -# define sk_KRB5_PRINCNAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_PRINCNAME, (st), (ptr)) -# define sk_KRB5_PRINCNAME_insert(st, val, i) SKM_sk_insert(KRB5_PRINCNAME, (st), (val), (i)) -# define sk_KRB5_PRINCNAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_PRINCNAME, (st), (cmp)) -# define sk_KRB5_PRINCNAME_dup(st) SKM_sk_dup(KRB5_PRINCNAME, st) -# define sk_KRB5_PRINCNAME_pop_free(st, free_func) SKM_sk_pop_free(KRB5_PRINCNAME, (st), (free_func)) -# define sk_KRB5_PRINCNAME_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_PRINCNAME, (st), (copy_func), (free_func)) -# define sk_KRB5_PRINCNAME_shift(st) SKM_sk_shift(KRB5_PRINCNAME, (st)) -# define sk_KRB5_PRINCNAME_pop(st) SKM_sk_pop(KRB5_PRINCNAME, (st)) -# define sk_KRB5_PRINCNAME_sort(st) SKM_sk_sort(KRB5_PRINCNAME, (st)) -# define sk_KRB5_PRINCNAME_is_sorted(st) SKM_sk_is_sorted(KRB5_PRINCNAME, (st)) -# define sk_KRB5_TKTBODY_new(cmp) SKM_sk_new(KRB5_TKTBODY, (cmp)) -# define sk_KRB5_TKTBODY_new_null() SKM_sk_new_null(KRB5_TKTBODY) -# define sk_KRB5_TKTBODY_free(st) SKM_sk_free(KRB5_TKTBODY, (st)) -# define sk_KRB5_TKTBODY_num(st) SKM_sk_num(KRB5_TKTBODY, (st)) -# define sk_KRB5_TKTBODY_value(st, i) SKM_sk_value(KRB5_TKTBODY, (st), (i)) -# define sk_KRB5_TKTBODY_set(st, i, val) SKM_sk_set(KRB5_TKTBODY, (st), (i), (val)) -# define sk_KRB5_TKTBODY_zero(st) SKM_sk_zero(KRB5_TKTBODY, (st)) -# define sk_KRB5_TKTBODY_push(st, val) SKM_sk_push(KRB5_TKTBODY, (st), (val)) -# define sk_KRB5_TKTBODY_unshift(st, val) SKM_sk_unshift(KRB5_TKTBODY, (st), (val)) -# define sk_KRB5_TKTBODY_find(st, val) SKM_sk_find(KRB5_TKTBODY, (st), (val)) -# define sk_KRB5_TKTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_TKTBODY, (st), (val)) -# define sk_KRB5_TKTBODY_delete(st, i) SKM_sk_delete(KRB5_TKTBODY, (st), (i)) -# define sk_KRB5_TKTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_TKTBODY, (st), (ptr)) -# define sk_KRB5_TKTBODY_insert(st, val, i) SKM_sk_insert(KRB5_TKTBODY, (st), (val), (i)) -# define sk_KRB5_TKTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_TKTBODY, (st), (cmp)) -# define sk_KRB5_TKTBODY_dup(st) SKM_sk_dup(KRB5_TKTBODY, st) -# define sk_KRB5_TKTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_TKTBODY, (st), (free_func)) -# define sk_KRB5_TKTBODY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(KRB5_TKTBODY, (st), (copy_func), (free_func)) -# define sk_KRB5_TKTBODY_shift(st) SKM_sk_shift(KRB5_TKTBODY, (st)) -# define sk_KRB5_TKTBODY_pop(st) SKM_sk_pop(KRB5_TKTBODY, (st)) -# define sk_KRB5_TKTBODY_sort(st) SKM_sk_sort(KRB5_TKTBODY, (st)) -# define sk_KRB5_TKTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_TKTBODY, (st)) -# define sk_MEM_OBJECT_DATA_new(cmp) SKM_sk_new(MEM_OBJECT_DATA, (cmp)) -# define sk_MEM_OBJECT_DATA_new_null() SKM_sk_new_null(MEM_OBJECT_DATA) -# define sk_MEM_OBJECT_DATA_free(st) SKM_sk_free(MEM_OBJECT_DATA, (st)) -# define sk_MEM_OBJECT_DATA_num(st) SKM_sk_num(MEM_OBJECT_DATA, (st)) -# define sk_MEM_OBJECT_DATA_value(st, i) SKM_sk_value(MEM_OBJECT_DATA, (st), (i)) -# define sk_MEM_OBJECT_DATA_set(st, i, val) SKM_sk_set(MEM_OBJECT_DATA, (st), (i), (val)) -# define sk_MEM_OBJECT_DATA_zero(st) SKM_sk_zero(MEM_OBJECT_DATA, (st)) -# define sk_MEM_OBJECT_DATA_push(st, val) SKM_sk_push(MEM_OBJECT_DATA, (st), (val)) -# define sk_MEM_OBJECT_DATA_unshift(st, val) SKM_sk_unshift(MEM_OBJECT_DATA, (st), (val)) -# define sk_MEM_OBJECT_DATA_find(st, val) SKM_sk_find(MEM_OBJECT_DATA, (st), (val)) -# define sk_MEM_OBJECT_DATA_find_ex(st, val) SKM_sk_find_ex(MEM_OBJECT_DATA, (st), (val)) -# define sk_MEM_OBJECT_DATA_delete(st, i) SKM_sk_delete(MEM_OBJECT_DATA, (st), (i)) -# define sk_MEM_OBJECT_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(MEM_OBJECT_DATA, (st), (ptr)) -# define sk_MEM_OBJECT_DATA_insert(st, val, i) SKM_sk_insert(MEM_OBJECT_DATA, (st), (val), (i)) -# define sk_MEM_OBJECT_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MEM_OBJECT_DATA, (st), (cmp)) -# define sk_MEM_OBJECT_DATA_dup(st) SKM_sk_dup(MEM_OBJECT_DATA, st) -# define sk_MEM_OBJECT_DATA_pop_free(st, free_func) SKM_sk_pop_free(MEM_OBJECT_DATA, (st), (free_func)) -# define sk_MEM_OBJECT_DATA_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(MEM_OBJECT_DATA, (st), (copy_func), (free_func)) -# define sk_MEM_OBJECT_DATA_shift(st) SKM_sk_shift(MEM_OBJECT_DATA, (st)) -# define sk_MEM_OBJECT_DATA_pop(st) SKM_sk_pop(MEM_OBJECT_DATA, (st)) -# define sk_MEM_OBJECT_DATA_sort(st) SKM_sk_sort(MEM_OBJECT_DATA, (st)) -# define sk_MEM_OBJECT_DATA_is_sorted(st) SKM_sk_is_sorted(MEM_OBJECT_DATA, (st)) -# define sk_MIME_HEADER_new(cmp) SKM_sk_new(MIME_HEADER, (cmp)) -# define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER) -# define sk_MIME_HEADER_free(st) SKM_sk_free(MIME_HEADER, (st)) -# define sk_MIME_HEADER_num(st) SKM_sk_num(MIME_HEADER, (st)) -# define sk_MIME_HEADER_value(st, i) SKM_sk_value(MIME_HEADER, (st), (i)) -# define sk_MIME_HEADER_set(st, i, val) SKM_sk_set(MIME_HEADER, (st), (i), (val)) -# define sk_MIME_HEADER_zero(st) SKM_sk_zero(MIME_HEADER, (st)) -# define sk_MIME_HEADER_push(st, val) SKM_sk_push(MIME_HEADER, (st), (val)) -# define sk_MIME_HEADER_unshift(st, val) SKM_sk_unshift(MIME_HEADER, (st), (val)) -# define sk_MIME_HEADER_find(st, val) SKM_sk_find(MIME_HEADER, (st), (val)) -# define sk_MIME_HEADER_find_ex(st, val) SKM_sk_find_ex(MIME_HEADER, (st), (val)) -# define sk_MIME_HEADER_delete(st, i) SKM_sk_delete(MIME_HEADER, (st), (i)) -# define sk_MIME_HEADER_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_HEADER, (st), (ptr)) -# define sk_MIME_HEADER_insert(st, val, i) SKM_sk_insert(MIME_HEADER, (st), (val), (i)) -# define sk_MIME_HEADER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_HEADER, (st), (cmp)) -# define sk_MIME_HEADER_dup(st) SKM_sk_dup(MIME_HEADER, st) -# define sk_MIME_HEADER_pop_free(st, free_func) SKM_sk_pop_free(MIME_HEADER, (st), (free_func)) -# define sk_MIME_HEADER_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(MIME_HEADER, (st), (copy_func), (free_func)) -# define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st)) -# define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st)) -# define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st)) -# define sk_MIME_HEADER_is_sorted(st) SKM_sk_is_sorted(MIME_HEADER, (st)) -# define sk_MIME_PARAM_new(cmp) SKM_sk_new(MIME_PARAM, (cmp)) -# define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM) -# define sk_MIME_PARAM_free(st) SKM_sk_free(MIME_PARAM, (st)) -# define sk_MIME_PARAM_num(st) SKM_sk_num(MIME_PARAM, (st)) -# define sk_MIME_PARAM_value(st, i) SKM_sk_value(MIME_PARAM, (st), (i)) -# define sk_MIME_PARAM_set(st, i, val) SKM_sk_set(MIME_PARAM, (st), (i), (val)) -# define sk_MIME_PARAM_zero(st) SKM_sk_zero(MIME_PARAM, (st)) -# define sk_MIME_PARAM_push(st, val) SKM_sk_push(MIME_PARAM, (st), (val)) -# define sk_MIME_PARAM_unshift(st, val) SKM_sk_unshift(MIME_PARAM, (st), (val)) -# define sk_MIME_PARAM_find(st, val) SKM_sk_find(MIME_PARAM, (st), (val)) -# define sk_MIME_PARAM_find_ex(st, val) SKM_sk_find_ex(MIME_PARAM, (st), (val)) -# define sk_MIME_PARAM_delete(st, i) SKM_sk_delete(MIME_PARAM, (st), (i)) -# define sk_MIME_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_PARAM, (st), (ptr)) -# define sk_MIME_PARAM_insert(st, val, i) SKM_sk_insert(MIME_PARAM, (st), (val), (i)) -# define sk_MIME_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_PARAM, (st), (cmp)) -# define sk_MIME_PARAM_dup(st) SKM_sk_dup(MIME_PARAM, st) -# define sk_MIME_PARAM_pop_free(st, free_func) SKM_sk_pop_free(MIME_PARAM, (st), (free_func)) -# define sk_MIME_PARAM_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(MIME_PARAM, (st), (copy_func), (free_func)) -# define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st)) -# define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st)) -# define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st)) -# define sk_MIME_PARAM_is_sorted(st) SKM_sk_is_sorted(MIME_PARAM, (st)) -# define sk_NAME_FUNCS_new(cmp) SKM_sk_new(NAME_FUNCS, (cmp)) -# define sk_NAME_FUNCS_new_null() SKM_sk_new_null(NAME_FUNCS) -# define sk_NAME_FUNCS_free(st) SKM_sk_free(NAME_FUNCS, (st)) -# define sk_NAME_FUNCS_num(st) SKM_sk_num(NAME_FUNCS, (st)) -# define sk_NAME_FUNCS_value(st, i) SKM_sk_value(NAME_FUNCS, (st), (i)) -# define sk_NAME_FUNCS_set(st, i, val) SKM_sk_set(NAME_FUNCS, (st), (i), (val)) -# define sk_NAME_FUNCS_zero(st) SKM_sk_zero(NAME_FUNCS, (st)) -# define sk_NAME_FUNCS_push(st, val) SKM_sk_push(NAME_FUNCS, (st), (val)) -# define sk_NAME_FUNCS_unshift(st, val) SKM_sk_unshift(NAME_FUNCS, (st), (val)) -# define sk_NAME_FUNCS_find(st, val) SKM_sk_find(NAME_FUNCS, (st), (val)) -# define sk_NAME_FUNCS_find_ex(st, val) SKM_sk_find_ex(NAME_FUNCS, (st), (val)) -# define sk_NAME_FUNCS_delete(st, i) SKM_sk_delete(NAME_FUNCS, (st), (i)) -# define sk_NAME_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(NAME_FUNCS, (st), (ptr)) -# define sk_NAME_FUNCS_insert(st, val, i) SKM_sk_insert(NAME_FUNCS, (st), (val), (i)) -# define sk_NAME_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(NAME_FUNCS, (st), (cmp)) -# define sk_NAME_FUNCS_dup(st) SKM_sk_dup(NAME_FUNCS, st) -# define sk_NAME_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(NAME_FUNCS, (st), (free_func)) -# define sk_NAME_FUNCS_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(NAME_FUNCS, (st), (copy_func), (free_func)) -# define sk_NAME_FUNCS_shift(st) SKM_sk_shift(NAME_FUNCS, (st)) -# define sk_NAME_FUNCS_pop(st) SKM_sk_pop(NAME_FUNCS, (st)) -# define sk_NAME_FUNCS_sort(st) SKM_sk_sort(NAME_FUNCS, (st)) -# define sk_NAME_FUNCS_is_sorted(st) SKM_sk_is_sorted(NAME_FUNCS, (st)) -# define sk_OCSP_CERTID_new(cmp) SKM_sk_new(OCSP_CERTID, (cmp)) -# define sk_OCSP_CERTID_new_null() SKM_sk_new_null(OCSP_CERTID) -# define sk_OCSP_CERTID_free(st) SKM_sk_free(OCSP_CERTID, (st)) -# define sk_OCSP_CERTID_num(st) SKM_sk_num(OCSP_CERTID, (st)) -# define sk_OCSP_CERTID_value(st, i) SKM_sk_value(OCSP_CERTID, (st), (i)) -# define sk_OCSP_CERTID_set(st, i, val) SKM_sk_set(OCSP_CERTID, (st), (i), (val)) -# define sk_OCSP_CERTID_zero(st) SKM_sk_zero(OCSP_CERTID, (st)) -# define sk_OCSP_CERTID_push(st, val) SKM_sk_push(OCSP_CERTID, (st), (val)) -# define sk_OCSP_CERTID_unshift(st, val) SKM_sk_unshift(OCSP_CERTID, (st), (val)) -# define sk_OCSP_CERTID_find(st, val) SKM_sk_find(OCSP_CERTID, (st), (val)) -# define sk_OCSP_CERTID_find_ex(st, val) SKM_sk_find_ex(OCSP_CERTID, (st), (val)) -# define sk_OCSP_CERTID_delete(st, i) SKM_sk_delete(OCSP_CERTID, (st), (i)) -# define sk_OCSP_CERTID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_CERTID, (st), (ptr)) -# define sk_OCSP_CERTID_insert(st, val, i) SKM_sk_insert(OCSP_CERTID, (st), (val), (i)) -# define sk_OCSP_CERTID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_CERTID, (st), (cmp)) -# define sk_OCSP_CERTID_dup(st) SKM_sk_dup(OCSP_CERTID, st) -# define sk_OCSP_CERTID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_CERTID, (st), (free_func)) -# define sk_OCSP_CERTID_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(OCSP_CERTID, (st), (copy_func), (free_func)) -# define sk_OCSP_CERTID_shift(st) SKM_sk_shift(OCSP_CERTID, (st)) -# define sk_OCSP_CERTID_pop(st) SKM_sk_pop(OCSP_CERTID, (st)) -# define sk_OCSP_CERTID_sort(st) SKM_sk_sort(OCSP_CERTID, (st)) -# define sk_OCSP_CERTID_is_sorted(st) SKM_sk_is_sorted(OCSP_CERTID, (st)) -# define sk_OCSP_ONEREQ_new(cmp) SKM_sk_new(OCSP_ONEREQ, (cmp)) -# define sk_OCSP_ONEREQ_new_null() SKM_sk_new_null(OCSP_ONEREQ) -# define sk_OCSP_ONEREQ_free(st) SKM_sk_free(OCSP_ONEREQ, (st)) -# define sk_OCSP_ONEREQ_num(st) SKM_sk_num(OCSP_ONEREQ, (st)) -# define sk_OCSP_ONEREQ_value(st, i) SKM_sk_value(OCSP_ONEREQ, (st), (i)) -# define sk_OCSP_ONEREQ_set(st, i, val) SKM_sk_set(OCSP_ONEREQ, (st), (i), (val)) -# define sk_OCSP_ONEREQ_zero(st) SKM_sk_zero(OCSP_ONEREQ, (st)) -# define sk_OCSP_ONEREQ_push(st, val) SKM_sk_push(OCSP_ONEREQ, (st), (val)) -# define sk_OCSP_ONEREQ_unshift(st, val) SKM_sk_unshift(OCSP_ONEREQ, (st), (val)) -# define sk_OCSP_ONEREQ_find(st, val) SKM_sk_find(OCSP_ONEREQ, (st), (val)) -# define sk_OCSP_ONEREQ_find_ex(st, val) SKM_sk_find_ex(OCSP_ONEREQ, (st), (val)) -# define sk_OCSP_ONEREQ_delete(st, i) SKM_sk_delete(OCSP_ONEREQ, (st), (i)) -# define sk_OCSP_ONEREQ_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_ONEREQ, (st), (ptr)) -# define sk_OCSP_ONEREQ_insert(st, val, i) SKM_sk_insert(OCSP_ONEREQ, (st), (val), (i)) -# define sk_OCSP_ONEREQ_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_ONEREQ, (st), (cmp)) -# define sk_OCSP_ONEREQ_dup(st) SKM_sk_dup(OCSP_ONEREQ, st) -# define sk_OCSP_ONEREQ_pop_free(st, free_func) SKM_sk_pop_free(OCSP_ONEREQ, (st), (free_func)) -# define sk_OCSP_ONEREQ_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(OCSP_ONEREQ, (st), (copy_func), (free_func)) -# define sk_OCSP_ONEREQ_shift(st) SKM_sk_shift(OCSP_ONEREQ, (st)) -# define sk_OCSP_ONEREQ_pop(st) SKM_sk_pop(OCSP_ONEREQ, (st)) -# define sk_OCSP_ONEREQ_sort(st) SKM_sk_sort(OCSP_ONEREQ, (st)) -# define sk_OCSP_ONEREQ_is_sorted(st) SKM_sk_is_sorted(OCSP_ONEREQ, (st)) -# define sk_OCSP_RESPID_new(cmp) SKM_sk_new(OCSP_RESPID, (cmp)) -# define sk_OCSP_RESPID_new_null() SKM_sk_new_null(OCSP_RESPID) -# define sk_OCSP_RESPID_free(st) SKM_sk_free(OCSP_RESPID, (st)) -# define sk_OCSP_RESPID_num(st) SKM_sk_num(OCSP_RESPID, (st)) -# define sk_OCSP_RESPID_value(st, i) SKM_sk_value(OCSP_RESPID, (st), (i)) -# define sk_OCSP_RESPID_set(st, i, val) SKM_sk_set(OCSP_RESPID, (st), (i), (val)) -# define sk_OCSP_RESPID_zero(st) SKM_sk_zero(OCSP_RESPID, (st)) -# define sk_OCSP_RESPID_push(st, val) SKM_sk_push(OCSP_RESPID, (st), (val)) -# define sk_OCSP_RESPID_unshift(st, val) SKM_sk_unshift(OCSP_RESPID, (st), (val)) -# define sk_OCSP_RESPID_find(st, val) SKM_sk_find(OCSP_RESPID, (st), (val)) -# define sk_OCSP_RESPID_find_ex(st, val) SKM_sk_find_ex(OCSP_RESPID, (st), (val)) -# define sk_OCSP_RESPID_delete(st, i) SKM_sk_delete(OCSP_RESPID, (st), (i)) -# define sk_OCSP_RESPID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_RESPID, (st), (ptr)) -# define sk_OCSP_RESPID_insert(st, val, i) SKM_sk_insert(OCSP_RESPID, (st), (val), (i)) -# define sk_OCSP_RESPID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_RESPID, (st), (cmp)) -# define sk_OCSP_RESPID_dup(st) SKM_sk_dup(OCSP_RESPID, st) -# define sk_OCSP_RESPID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_RESPID, (st), (free_func)) -# define sk_OCSP_RESPID_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(OCSP_RESPID, (st), (copy_func), (free_func)) -# define sk_OCSP_RESPID_shift(st) SKM_sk_shift(OCSP_RESPID, (st)) -# define sk_OCSP_RESPID_pop(st) SKM_sk_pop(OCSP_RESPID, (st)) -# define sk_OCSP_RESPID_sort(st) SKM_sk_sort(OCSP_RESPID, (st)) -# define sk_OCSP_RESPID_is_sorted(st) SKM_sk_is_sorted(OCSP_RESPID, (st)) -# define sk_OCSP_SINGLERESP_new(cmp) SKM_sk_new(OCSP_SINGLERESP, (cmp)) -# define sk_OCSP_SINGLERESP_new_null() SKM_sk_new_null(OCSP_SINGLERESP) -# define sk_OCSP_SINGLERESP_free(st) SKM_sk_free(OCSP_SINGLERESP, (st)) -# define sk_OCSP_SINGLERESP_num(st) SKM_sk_num(OCSP_SINGLERESP, (st)) -# define sk_OCSP_SINGLERESP_value(st, i) SKM_sk_value(OCSP_SINGLERESP, (st), (i)) -# define sk_OCSP_SINGLERESP_set(st, i, val) SKM_sk_set(OCSP_SINGLERESP, (st), (i), (val)) -# define sk_OCSP_SINGLERESP_zero(st) SKM_sk_zero(OCSP_SINGLERESP, (st)) -# define sk_OCSP_SINGLERESP_push(st, val) SKM_sk_push(OCSP_SINGLERESP, (st), (val)) -# define sk_OCSP_SINGLERESP_unshift(st, val) SKM_sk_unshift(OCSP_SINGLERESP, (st), (val)) -# define sk_OCSP_SINGLERESP_find(st, val) SKM_sk_find(OCSP_SINGLERESP, (st), (val)) -# define sk_OCSP_SINGLERESP_find_ex(st, val) SKM_sk_find_ex(OCSP_SINGLERESP, (st), (val)) -# define sk_OCSP_SINGLERESP_delete(st, i) SKM_sk_delete(OCSP_SINGLERESP, (st), (i)) -# define sk_OCSP_SINGLERESP_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_SINGLERESP, (st), (ptr)) -# define sk_OCSP_SINGLERESP_insert(st, val, i) SKM_sk_insert(OCSP_SINGLERESP, (st), (val), (i)) -# define sk_OCSP_SINGLERESP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_SINGLERESP, (st), (cmp)) -# define sk_OCSP_SINGLERESP_dup(st) SKM_sk_dup(OCSP_SINGLERESP, st) -# define sk_OCSP_SINGLERESP_pop_free(st, free_func) SKM_sk_pop_free(OCSP_SINGLERESP, (st), (free_func)) -# define sk_OCSP_SINGLERESP_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(OCSP_SINGLERESP, (st), (copy_func), (free_func)) -# define sk_OCSP_SINGLERESP_shift(st) SKM_sk_shift(OCSP_SINGLERESP, (st)) -# define sk_OCSP_SINGLERESP_pop(st) SKM_sk_pop(OCSP_SINGLERESP, (st)) -# define sk_OCSP_SINGLERESP_sort(st) SKM_sk_sort(OCSP_SINGLERESP, (st)) -# define sk_OCSP_SINGLERESP_is_sorted(st) SKM_sk_is_sorted(OCSP_SINGLERESP, (st)) -# define sk_PKCS12_SAFEBAG_new(cmp) SKM_sk_new(PKCS12_SAFEBAG, (cmp)) -# define sk_PKCS12_SAFEBAG_new_null() SKM_sk_new_null(PKCS12_SAFEBAG) -# define sk_PKCS12_SAFEBAG_free(st) SKM_sk_free(PKCS12_SAFEBAG, (st)) -# define sk_PKCS12_SAFEBAG_num(st) SKM_sk_num(PKCS12_SAFEBAG, (st)) -# define sk_PKCS12_SAFEBAG_value(st, i) SKM_sk_value(PKCS12_SAFEBAG, (st), (i)) -# define sk_PKCS12_SAFEBAG_set(st, i, val) SKM_sk_set(PKCS12_SAFEBAG, (st), (i), (val)) -# define sk_PKCS12_SAFEBAG_zero(st) SKM_sk_zero(PKCS12_SAFEBAG, (st)) -# define sk_PKCS12_SAFEBAG_push(st, val) SKM_sk_push(PKCS12_SAFEBAG, (st), (val)) -# define sk_PKCS12_SAFEBAG_unshift(st, val) SKM_sk_unshift(PKCS12_SAFEBAG, (st), (val)) -# define sk_PKCS12_SAFEBAG_find(st, val) SKM_sk_find(PKCS12_SAFEBAG, (st), (val)) -# define sk_PKCS12_SAFEBAG_find_ex(st, val) SKM_sk_find_ex(PKCS12_SAFEBAG, (st), (val)) -# define sk_PKCS12_SAFEBAG_delete(st, i) SKM_sk_delete(PKCS12_SAFEBAG, (st), (i)) -# define sk_PKCS12_SAFEBAG_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS12_SAFEBAG, (st), (ptr)) -# define sk_PKCS12_SAFEBAG_insert(st, val, i) SKM_sk_insert(PKCS12_SAFEBAG, (st), (val), (i)) -# define sk_PKCS12_SAFEBAG_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS12_SAFEBAG, (st), (cmp)) -# define sk_PKCS12_SAFEBAG_dup(st) SKM_sk_dup(PKCS12_SAFEBAG, st) -# define sk_PKCS12_SAFEBAG_pop_free(st, free_func) SKM_sk_pop_free(PKCS12_SAFEBAG, (st), (free_func)) -# define sk_PKCS12_SAFEBAG_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(PKCS12_SAFEBAG, (st), (copy_func), (free_func)) -# define sk_PKCS12_SAFEBAG_shift(st) SKM_sk_shift(PKCS12_SAFEBAG, (st)) -# define sk_PKCS12_SAFEBAG_pop(st) SKM_sk_pop(PKCS12_SAFEBAG, (st)) -# define sk_PKCS12_SAFEBAG_sort(st) SKM_sk_sort(PKCS12_SAFEBAG, (st)) -# define sk_PKCS12_SAFEBAG_is_sorted(st) SKM_sk_is_sorted(PKCS12_SAFEBAG, (st)) -# define sk_PKCS7_new(cmp) SKM_sk_new(PKCS7, (cmp)) -# define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7) -# define sk_PKCS7_free(st) SKM_sk_free(PKCS7, (st)) -# define sk_PKCS7_num(st) SKM_sk_num(PKCS7, (st)) -# define sk_PKCS7_value(st, i) SKM_sk_value(PKCS7, (st), (i)) -# define sk_PKCS7_set(st, i, val) SKM_sk_set(PKCS7, (st), (i), (val)) -# define sk_PKCS7_zero(st) SKM_sk_zero(PKCS7, (st)) -# define sk_PKCS7_push(st, val) SKM_sk_push(PKCS7, (st), (val)) -# define sk_PKCS7_unshift(st, val) SKM_sk_unshift(PKCS7, (st), (val)) -# define sk_PKCS7_find(st, val) SKM_sk_find(PKCS7, (st), (val)) -# define sk_PKCS7_find_ex(st, val) SKM_sk_find_ex(PKCS7, (st), (val)) -# define sk_PKCS7_delete(st, i) SKM_sk_delete(PKCS7, (st), (i)) -# define sk_PKCS7_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7, (st), (ptr)) -# define sk_PKCS7_insert(st, val, i) SKM_sk_insert(PKCS7, (st), (val), (i)) -# define sk_PKCS7_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7, (st), (cmp)) -# define sk_PKCS7_dup(st) SKM_sk_dup(PKCS7, st) -# define sk_PKCS7_pop_free(st, free_func) SKM_sk_pop_free(PKCS7, (st), (free_func)) -# define sk_PKCS7_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(PKCS7, (st), (copy_func), (free_func)) -# define sk_PKCS7_shift(st) SKM_sk_shift(PKCS7, (st)) -# define sk_PKCS7_pop(st) SKM_sk_pop(PKCS7, (st)) -# define sk_PKCS7_sort(st) SKM_sk_sort(PKCS7, (st)) -# define sk_PKCS7_is_sorted(st) SKM_sk_is_sorted(PKCS7, (st)) -# define sk_PKCS7_RECIP_INFO_new(cmp) SKM_sk_new(PKCS7_RECIP_INFO, (cmp)) -# define sk_PKCS7_RECIP_INFO_new_null() SKM_sk_new_null(PKCS7_RECIP_INFO) -# define sk_PKCS7_RECIP_INFO_free(st) SKM_sk_free(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_RECIP_INFO_num(st) SKM_sk_num(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_RECIP_INFO_value(st, i) SKM_sk_value(PKCS7_RECIP_INFO, (st), (i)) -# define sk_PKCS7_RECIP_INFO_set(st, i, val) SKM_sk_set(PKCS7_RECIP_INFO, (st), (i), (val)) -# define sk_PKCS7_RECIP_INFO_zero(st) SKM_sk_zero(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_RECIP_INFO_push(st, val) SKM_sk_push(PKCS7_RECIP_INFO, (st), (val)) -# define sk_PKCS7_RECIP_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_RECIP_INFO, (st), (val)) -# define sk_PKCS7_RECIP_INFO_find(st, val) SKM_sk_find(PKCS7_RECIP_INFO, (st), (val)) -# define sk_PKCS7_RECIP_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_RECIP_INFO, (st), (val)) -# define sk_PKCS7_RECIP_INFO_delete(st, i) SKM_sk_delete(PKCS7_RECIP_INFO, (st), (i)) -# define sk_PKCS7_RECIP_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_RECIP_INFO, (st), (ptr)) -# define sk_PKCS7_RECIP_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_RECIP_INFO, (st), (val), (i)) -# define sk_PKCS7_RECIP_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_RECIP_INFO, (st), (cmp)) -# define sk_PKCS7_RECIP_INFO_dup(st) SKM_sk_dup(PKCS7_RECIP_INFO, st) -# define sk_PKCS7_RECIP_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_RECIP_INFO, (st), (free_func)) -# define sk_PKCS7_RECIP_INFO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(PKCS7_RECIP_INFO, (st), (copy_func), (free_func)) -# define sk_PKCS7_RECIP_INFO_shift(st) SKM_sk_shift(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_RECIP_INFO_pop(st) SKM_sk_pop(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_RECIP_INFO_sort(st) SKM_sk_sort(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_RECIP_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_RECIP_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_new(cmp) SKM_sk_new(PKCS7_SIGNER_INFO, (cmp)) -# define sk_PKCS7_SIGNER_INFO_new_null() SKM_sk_new_null(PKCS7_SIGNER_INFO) -# define sk_PKCS7_SIGNER_INFO_free(st) SKM_sk_free(PKCS7_SIGNER_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_num(st) SKM_sk_num(PKCS7_SIGNER_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_value(st, i) SKM_sk_value(PKCS7_SIGNER_INFO, (st), (i)) -# define sk_PKCS7_SIGNER_INFO_set(st, i, val) SKM_sk_set(PKCS7_SIGNER_INFO, (st), (i), (val)) -# define sk_PKCS7_SIGNER_INFO_zero(st) SKM_sk_zero(PKCS7_SIGNER_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_push(st, val) SKM_sk_push(PKCS7_SIGNER_INFO, (st), (val)) -# define sk_PKCS7_SIGNER_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_SIGNER_INFO, (st), (val)) -# define sk_PKCS7_SIGNER_INFO_find(st, val) SKM_sk_find(PKCS7_SIGNER_INFO, (st), (val)) -# define sk_PKCS7_SIGNER_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_SIGNER_INFO, (st), (val)) -# define sk_PKCS7_SIGNER_INFO_delete(st, i) SKM_sk_delete(PKCS7_SIGNER_INFO, (st), (i)) -# define sk_PKCS7_SIGNER_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_SIGNER_INFO, (st), (ptr)) -# define sk_PKCS7_SIGNER_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_SIGNER_INFO, (st), (val), (i)) -# define sk_PKCS7_SIGNER_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_SIGNER_INFO, (st), (cmp)) -# define sk_PKCS7_SIGNER_INFO_dup(st) SKM_sk_dup(PKCS7_SIGNER_INFO, st) -# define sk_PKCS7_SIGNER_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_SIGNER_INFO, (st), (free_func)) -# define sk_PKCS7_SIGNER_INFO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(PKCS7_SIGNER_INFO, (st), (copy_func), (free_func)) -# define sk_PKCS7_SIGNER_INFO_shift(st) SKM_sk_shift(PKCS7_SIGNER_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_pop(st) SKM_sk_pop(PKCS7_SIGNER_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_sort(st) SKM_sk_sort(PKCS7_SIGNER_INFO, (st)) -# define sk_PKCS7_SIGNER_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_SIGNER_INFO, (st)) -# define sk_POLICYINFO_new(cmp) SKM_sk_new(POLICYINFO, (cmp)) -# define sk_POLICYINFO_new_null() SKM_sk_new_null(POLICYINFO) -# define sk_POLICYINFO_free(st) SKM_sk_free(POLICYINFO, (st)) -# define sk_POLICYINFO_num(st) SKM_sk_num(POLICYINFO, (st)) -# define sk_POLICYINFO_value(st, i) SKM_sk_value(POLICYINFO, (st), (i)) -# define sk_POLICYINFO_set(st, i, val) SKM_sk_set(POLICYINFO, (st), (i), (val)) -# define sk_POLICYINFO_zero(st) SKM_sk_zero(POLICYINFO, (st)) -# define sk_POLICYINFO_push(st, val) SKM_sk_push(POLICYINFO, (st), (val)) -# define sk_POLICYINFO_unshift(st, val) SKM_sk_unshift(POLICYINFO, (st), (val)) -# define sk_POLICYINFO_find(st, val) SKM_sk_find(POLICYINFO, (st), (val)) -# define sk_POLICYINFO_find_ex(st, val) SKM_sk_find_ex(POLICYINFO, (st), (val)) -# define sk_POLICYINFO_delete(st, i) SKM_sk_delete(POLICYINFO, (st), (i)) -# define sk_POLICYINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYINFO, (st), (ptr)) -# define sk_POLICYINFO_insert(st, val, i) SKM_sk_insert(POLICYINFO, (st), (val), (i)) -# define sk_POLICYINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYINFO, (st), (cmp)) -# define sk_POLICYINFO_dup(st) SKM_sk_dup(POLICYINFO, st) -# define sk_POLICYINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYINFO, (st), (free_func)) -# define sk_POLICYINFO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(POLICYINFO, (st), (copy_func), (free_func)) -# define sk_POLICYINFO_shift(st) SKM_sk_shift(POLICYINFO, (st)) -# define sk_POLICYINFO_pop(st) SKM_sk_pop(POLICYINFO, (st)) -# define sk_POLICYINFO_sort(st) SKM_sk_sort(POLICYINFO, (st)) -# define sk_POLICYINFO_is_sorted(st) SKM_sk_is_sorted(POLICYINFO, (st)) -# define sk_POLICYQUALINFO_new(cmp) SKM_sk_new(POLICYQUALINFO, (cmp)) -# define sk_POLICYQUALINFO_new_null() SKM_sk_new_null(POLICYQUALINFO) -# define sk_POLICYQUALINFO_free(st) SKM_sk_free(POLICYQUALINFO, (st)) -# define sk_POLICYQUALINFO_num(st) SKM_sk_num(POLICYQUALINFO, (st)) -# define sk_POLICYQUALINFO_value(st, i) SKM_sk_value(POLICYQUALINFO, (st), (i)) -# define sk_POLICYQUALINFO_set(st, i, val) SKM_sk_set(POLICYQUALINFO, (st), (i), (val)) -# define sk_POLICYQUALINFO_zero(st) SKM_sk_zero(POLICYQUALINFO, (st)) -# define sk_POLICYQUALINFO_push(st, val) SKM_sk_push(POLICYQUALINFO, (st), (val)) -# define sk_POLICYQUALINFO_unshift(st, val) SKM_sk_unshift(POLICYQUALINFO, (st), (val)) -# define sk_POLICYQUALINFO_find(st, val) SKM_sk_find(POLICYQUALINFO, (st), (val)) -# define sk_POLICYQUALINFO_find_ex(st, val) SKM_sk_find_ex(POLICYQUALINFO, (st), (val)) -# define sk_POLICYQUALINFO_delete(st, i) SKM_sk_delete(POLICYQUALINFO, (st), (i)) -# define sk_POLICYQUALINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYQUALINFO, (st), (ptr)) -# define sk_POLICYQUALINFO_insert(st, val, i) SKM_sk_insert(POLICYQUALINFO, (st), (val), (i)) -# define sk_POLICYQUALINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYQUALINFO, (st), (cmp)) -# define sk_POLICYQUALINFO_dup(st) SKM_sk_dup(POLICYQUALINFO, st) -# define sk_POLICYQUALINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYQUALINFO, (st), (free_func)) -# define sk_POLICYQUALINFO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(POLICYQUALINFO, (st), (copy_func), (free_func)) -# define sk_POLICYQUALINFO_shift(st) SKM_sk_shift(POLICYQUALINFO, (st)) -# define sk_POLICYQUALINFO_pop(st) SKM_sk_pop(POLICYQUALINFO, (st)) -# define sk_POLICYQUALINFO_sort(st) SKM_sk_sort(POLICYQUALINFO, (st)) -# define sk_POLICYQUALINFO_is_sorted(st) SKM_sk_is_sorted(POLICYQUALINFO, (st)) -# define sk_POLICY_MAPPING_new(cmp) SKM_sk_new(POLICY_MAPPING, (cmp)) -# define sk_POLICY_MAPPING_new_null() SKM_sk_new_null(POLICY_MAPPING) -# define sk_POLICY_MAPPING_free(st) SKM_sk_free(POLICY_MAPPING, (st)) -# define sk_POLICY_MAPPING_num(st) SKM_sk_num(POLICY_MAPPING, (st)) -# define sk_POLICY_MAPPING_value(st, i) SKM_sk_value(POLICY_MAPPING, (st), (i)) -# define sk_POLICY_MAPPING_set(st, i, val) SKM_sk_set(POLICY_MAPPING, (st), (i), (val)) -# define sk_POLICY_MAPPING_zero(st) SKM_sk_zero(POLICY_MAPPING, (st)) -# define sk_POLICY_MAPPING_push(st, val) SKM_sk_push(POLICY_MAPPING, (st), (val)) -# define sk_POLICY_MAPPING_unshift(st, val) SKM_sk_unshift(POLICY_MAPPING, (st), (val)) -# define sk_POLICY_MAPPING_find(st, val) SKM_sk_find(POLICY_MAPPING, (st), (val)) -# define sk_POLICY_MAPPING_find_ex(st, val) SKM_sk_find_ex(POLICY_MAPPING, (st), (val)) -# define sk_POLICY_MAPPING_delete(st, i) SKM_sk_delete(POLICY_MAPPING, (st), (i)) -# define sk_POLICY_MAPPING_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICY_MAPPING, (st), (ptr)) -# define sk_POLICY_MAPPING_insert(st, val, i) SKM_sk_insert(POLICY_MAPPING, (st), (val), (i)) -# define sk_POLICY_MAPPING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICY_MAPPING, (st), (cmp)) -# define sk_POLICY_MAPPING_dup(st) SKM_sk_dup(POLICY_MAPPING, st) -# define sk_POLICY_MAPPING_pop_free(st, free_func) SKM_sk_pop_free(POLICY_MAPPING, (st), (free_func)) -# define sk_POLICY_MAPPING_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(POLICY_MAPPING, (st), (copy_func), (free_func)) -# define sk_POLICY_MAPPING_shift(st) SKM_sk_shift(POLICY_MAPPING, (st)) -# define sk_POLICY_MAPPING_pop(st) SKM_sk_pop(POLICY_MAPPING, (st)) -# define sk_POLICY_MAPPING_sort(st) SKM_sk_sort(POLICY_MAPPING, (st)) -# define sk_POLICY_MAPPING_is_sorted(st) SKM_sk_is_sorted(POLICY_MAPPING, (st)) -# define sk_SCT_new(cmp) SKM_sk_new(SCT, (cmp)) -# define sk_SCT_new_null() SKM_sk_new_null(SCT) -# define sk_SCT_free(st) SKM_sk_free(SCT, (st)) -# define sk_SCT_num(st) SKM_sk_num(SCT, (st)) -# define sk_SCT_value(st, i) SKM_sk_value(SCT, (st), (i)) -# define sk_SCT_set(st, i, val) SKM_sk_set(SCT, (st), (i), (val)) -# define sk_SCT_zero(st) SKM_sk_zero(SCT, (st)) -# define sk_SCT_push(st, val) SKM_sk_push(SCT, (st), (val)) -# define sk_SCT_unshift(st, val) SKM_sk_unshift(SCT, (st), (val)) -# define sk_SCT_find(st, val) SKM_sk_find(SCT, (st), (val)) -# define sk_SCT_find_ex(st, val) SKM_sk_find_ex(SCT, (st), (val)) -# define sk_SCT_delete(st, i) SKM_sk_delete(SCT, (st), (i)) -# define sk_SCT_delete_ptr(st, ptr) SKM_sk_delete_ptr(SCT, (st), (ptr)) -# define sk_SCT_insert(st, val, i) SKM_sk_insert(SCT, (st), (val), (i)) -# define sk_SCT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SCT, (st), (cmp)) -# define sk_SCT_dup(st) SKM_sk_dup(SCT, st) -# define sk_SCT_pop_free(st, free_func) SKM_sk_pop_free(SCT, (st), (free_func)) -# define sk_SCT_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SCT, (st), (copy_func), (free_func)) -# define sk_SCT_shift(st) SKM_sk_shift(SCT, (st)) -# define sk_SCT_pop(st) SKM_sk_pop(SCT, (st)) -# define sk_SCT_sort(st) SKM_sk_sort(SCT, (st)) -# define sk_SCT_is_sorted(st) SKM_sk_is_sorted(SCT, (st)) -# define sk_SRP_gN_new(cmp) SKM_sk_new(SRP_gN, (cmp)) -# define sk_SRP_gN_new_null() SKM_sk_new_null(SRP_gN) -# define sk_SRP_gN_free(st) SKM_sk_free(SRP_gN, (st)) -# define sk_SRP_gN_num(st) SKM_sk_num(SRP_gN, (st)) -# define sk_SRP_gN_value(st, i) SKM_sk_value(SRP_gN, (st), (i)) -# define sk_SRP_gN_set(st, i, val) SKM_sk_set(SRP_gN, (st), (i), (val)) -# define sk_SRP_gN_zero(st) SKM_sk_zero(SRP_gN, (st)) -# define sk_SRP_gN_push(st, val) SKM_sk_push(SRP_gN, (st), (val)) -# define sk_SRP_gN_unshift(st, val) SKM_sk_unshift(SRP_gN, (st), (val)) -# define sk_SRP_gN_find(st, val) SKM_sk_find(SRP_gN, (st), (val)) -# define sk_SRP_gN_find_ex(st, val) SKM_sk_find_ex(SRP_gN, (st), (val)) -# define sk_SRP_gN_delete(st, i) SKM_sk_delete(SRP_gN, (st), (i)) -# define sk_SRP_gN_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRP_gN, (st), (ptr)) -# define sk_SRP_gN_insert(st, val, i) SKM_sk_insert(SRP_gN, (st), (val), (i)) -# define sk_SRP_gN_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRP_gN, (st), (cmp)) -# define sk_SRP_gN_dup(st) SKM_sk_dup(SRP_gN, st) -# define sk_SRP_gN_pop_free(st, free_func) SKM_sk_pop_free(SRP_gN, (st), (free_func)) -# define sk_SRP_gN_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SRP_gN, (st), (copy_func), (free_func)) -# define sk_SRP_gN_shift(st) SKM_sk_shift(SRP_gN, (st)) -# define sk_SRP_gN_pop(st) SKM_sk_pop(SRP_gN, (st)) -# define sk_SRP_gN_sort(st) SKM_sk_sort(SRP_gN, (st)) -# define sk_SRP_gN_is_sorted(st) SKM_sk_is_sorted(SRP_gN, (st)) -# define sk_SRP_gN_cache_new(cmp) SKM_sk_new(SRP_gN_cache, (cmp)) -# define sk_SRP_gN_cache_new_null() SKM_sk_new_null(SRP_gN_cache) -# define sk_SRP_gN_cache_free(st) SKM_sk_free(SRP_gN_cache, (st)) -# define sk_SRP_gN_cache_num(st) SKM_sk_num(SRP_gN_cache, (st)) -# define sk_SRP_gN_cache_value(st, i) SKM_sk_value(SRP_gN_cache, (st), (i)) -# define sk_SRP_gN_cache_set(st, i, val) SKM_sk_set(SRP_gN_cache, (st), (i), (val)) -# define sk_SRP_gN_cache_zero(st) SKM_sk_zero(SRP_gN_cache, (st)) -# define sk_SRP_gN_cache_push(st, val) SKM_sk_push(SRP_gN_cache, (st), (val)) -# define sk_SRP_gN_cache_unshift(st, val) SKM_sk_unshift(SRP_gN_cache, (st), (val)) -# define sk_SRP_gN_cache_find(st, val) SKM_sk_find(SRP_gN_cache, (st), (val)) -# define sk_SRP_gN_cache_find_ex(st, val) SKM_sk_find_ex(SRP_gN_cache, (st), (val)) -# define sk_SRP_gN_cache_delete(st, i) SKM_sk_delete(SRP_gN_cache, (st), (i)) -# define sk_SRP_gN_cache_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRP_gN_cache, (st), (ptr)) -# define sk_SRP_gN_cache_insert(st, val, i) SKM_sk_insert(SRP_gN_cache, (st), (val), (i)) -# define sk_SRP_gN_cache_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRP_gN_cache, (st), (cmp)) -# define sk_SRP_gN_cache_dup(st) SKM_sk_dup(SRP_gN_cache, st) -# define sk_SRP_gN_cache_pop_free(st, free_func) SKM_sk_pop_free(SRP_gN_cache, (st), (free_func)) -# define sk_SRP_gN_cache_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SRP_gN_cache, (st), (copy_func), (free_func)) -# define sk_SRP_gN_cache_shift(st) SKM_sk_shift(SRP_gN_cache, (st)) -# define sk_SRP_gN_cache_pop(st) SKM_sk_pop(SRP_gN_cache, (st)) -# define sk_SRP_gN_cache_sort(st) SKM_sk_sort(SRP_gN_cache, (st)) -# define sk_SRP_gN_cache_is_sorted(st) SKM_sk_is_sorted(SRP_gN_cache, (st)) -# define sk_SRP_user_pwd_new(cmp) SKM_sk_new(SRP_user_pwd, (cmp)) -# define sk_SRP_user_pwd_new_null() SKM_sk_new_null(SRP_user_pwd) -# define sk_SRP_user_pwd_free(st) SKM_sk_free(SRP_user_pwd, (st)) -# define sk_SRP_user_pwd_num(st) SKM_sk_num(SRP_user_pwd, (st)) -# define sk_SRP_user_pwd_value(st, i) SKM_sk_value(SRP_user_pwd, (st), (i)) -# define sk_SRP_user_pwd_set(st, i, val) SKM_sk_set(SRP_user_pwd, (st), (i), (val)) -# define sk_SRP_user_pwd_zero(st) SKM_sk_zero(SRP_user_pwd, (st)) -# define sk_SRP_user_pwd_push(st, val) SKM_sk_push(SRP_user_pwd, (st), (val)) -# define sk_SRP_user_pwd_unshift(st, val) SKM_sk_unshift(SRP_user_pwd, (st), (val)) -# define sk_SRP_user_pwd_find(st, val) SKM_sk_find(SRP_user_pwd, (st), (val)) -# define sk_SRP_user_pwd_find_ex(st, val) SKM_sk_find_ex(SRP_user_pwd, (st), (val)) -# define sk_SRP_user_pwd_delete(st, i) SKM_sk_delete(SRP_user_pwd, (st), (i)) -# define sk_SRP_user_pwd_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRP_user_pwd, (st), (ptr)) -# define sk_SRP_user_pwd_insert(st, val, i) SKM_sk_insert(SRP_user_pwd, (st), (val), (i)) -# define sk_SRP_user_pwd_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRP_user_pwd, (st), (cmp)) -# define sk_SRP_user_pwd_dup(st) SKM_sk_dup(SRP_user_pwd, st) -# define sk_SRP_user_pwd_pop_free(st, free_func) SKM_sk_pop_free(SRP_user_pwd, (st), (free_func)) -# define sk_SRP_user_pwd_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SRP_user_pwd, (st), (copy_func), (free_func)) -# define sk_SRP_user_pwd_shift(st) SKM_sk_shift(SRP_user_pwd, (st)) -# define sk_SRP_user_pwd_pop(st) SKM_sk_pop(SRP_user_pwd, (st)) -# define sk_SRP_user_pwd_sort(st) SKM_sk_sort(SRP_user_pwd, (st)) -# define sk_SRP_user_pwd_is_sorted(st) SKM_sk_is_sorted(SRP_user_pwd, (st)) -# define sk_SRTP_PROTECTION_PROFILE_new(cmp) SKM_sk_new(SRTP_PROTECTION_PROFILE, (cmp)) -# define sk_SRTP_PROTECTION_PROFILE_new_null() SKM_sk_new_null(SRTP_PROTECTION_PROFILE) -# define sk_SRTP_PROTECTION_PROFILE_free(st) SKM_sk_free(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SRTP_PROTECTION_PROFILE_num(st) SKM_sk_num(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SRTP_PROTECTION_PROFILE_value(st, i) SKM_sk_value(SRTP_PROTECTION_PROFILE, (st), (i)) -# define sk_SRTP_PROTECTION_PROFILE_set(st, i, val) SKM_sk_set(SRTP_PROTECTION_PROFILE, (st), (i), (val)) -# define sk_SRTP_PROTECTION_PROFILE_zero(st) SKM_sk_zero(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SRTP_PROTECTION_PROFILE_push(st, val) SKM_sk_push(SRTP_PROTECTION_PROFILE, (st), (val)) -# define sk_SRTP_PROTECTION_PROFILE_unshift(st, val) SKM_sk_unshift(SRTP_PROTECTION_PROFILE, (st), (val)) -# define sk_SRTP_PROTECTION_PROFILE_find(st, val) SKM_sk_find(SRTP_PROTECTION_PROFILE, (st), (val)) -# define sk_SRTP_PROTECTION_PROFILE_find_ex(st, val) SKM_sk_find_ex(SRTP_PROTECTION_PROFILE, (st), (val)) -# define sk_SRTP_PROTECTION_PROFILE_delete(st, i) SKM_sk_delete(SRTP_PROTECTION_PROFILE, (st), (i)) -# define sk_SRTP_PROTECTION_PROFILE_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRTP_PROTECTION_PROFILE, (st), (ptr)) -# define sk_SRTP_PROTECTION_PROFILE_insert(st, val, i) SKM_sk_insert(SRTP_PROTECTION_PROFILE, (st), (val), (i)) -# define sk_SRTP_PROTECTION_PROFILE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRTP_PROTECTION_PROFILE, (st), (cmp)) -# define sk_SRTP_PROTECTION_PROFILE_dup(st) SKM_sk_dup(SRTP_PROTECTION_PROFILE, st) -# define sk_SRTP_PROTECTION_PROFILE_pop_free(st, free_func) SKM_sk_pop_free(SRTP_PROTECTION_PROFILE, (st), (free_func)) -# define sk_SRTP_PROTECTION_PROFILE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SRTP_PROTECTION_PROFILE, (st), (copy_func), (free_func)) -# define sk_SRTP_PROTECTION_PROFILE_shift(st) SKM_sk_shift(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SRTP_PROTECTION_PROFILE_pop(st) SKM_sk_pop(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SRTP_PROTECTION_PROFILE_sort(st) SKM_sk_sort(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SRTP_PROTECTION_PROFILE_is_sorted(st) SKM_sk_is_sorted(SRTP_PROTECTION_PROFILE, (st)) -# define sk_SSL_CIPHER_new(cmp) SKM_sk_new(SSL_CIPHER, (cmp)) -# define sk_SSL_CIPHER_new_null() SKM_sk_new_null(SSL_CIPHER) -# define sk_SSL_CIPHER_free(st) SKM_sk_free(SSL_CIPHER, (st)) -# define sk_SSL_CIPHER_num(st) SKM_sk_num(SSL_CIPHER, (st)) -# define sk_SSL_CIPHER_value(st, i) SKM_sk_value(SSL_CIPHER, (st), (i)) -# define sk_SSL_CIPHER_set(st, i, val) SKM_sk_set(SSL_CIPHER, (st), (i), (val)) -# define sk_SSL_CIPHER_zero(st) SKM_sk_zero(SSL_CIPHER, (st)) -# define sk_SSL_CIPHER_push(st, val) SKM_sk_push(SSL_CIPHER, (st), (val)) -# define sk_SSL_CIPHER_unshift(st, val) SKM_sk_unshift(SSL_CIPHER, (st), (val)) -# define sk_SSL_CIPHER_find(st, val) SKM_sk_find(SSL_CIPHER, (st), (val)) -# define sk_SSL_CIPHER_find_ex(st, val) SKM_sk_find_ex(SSL_CIPHER, (st), (val)) -# define sk_SSL_CIPHER_delete(st, i) SKM_sk_delete(SSL_CIPHER, (st), (i)) -# define sk_SSL_CIPHER_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_CIPHER, (st), (ptr)) -# define sk_SSL_CIPHER_insert(st, val, i) SKM_sk_insert(SSL_CIPHER, (st), (val), (i)) -# define sk_SSL_CIPHER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_CIPHER, (st), (cmp)) -# define sk_SSL_CIPHER_dup(st) SKM_sk_dup(SSL_CIPHER, st) -# define sk_SSL_CIPHER_pop_free(st, free_func) SKM_sk_pop_free(SSL_CIPHER, (st), (free_func)) -# define sk_SSL_CIPHER_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SSL_CIPHER, (st), (copy_func), (free_func)) -# define sk_SSL_CIPHER_shift(st) SKM_sk_shift(SSL_CIPHER, (st)) -# define sk_SSL_CIPHER_pop(st) SKM_sk_pop(SSL_CIPHER, (st)) -# define sk_SSL_CIPHER_sort(st) SKM_sk_sort(SSL_CIPHER, (st)) -# define sk_SSL_CIPHER_is_sorted(st) SKM_sk_is_sorted(SSL_CIPHER, (st)) -# define sk_SSL_COMP_new(cmp) SKM_sk_new(SSL_COMP, (cmp)) -# define sk_SSL_COMP_new_null() SKM_sk_new_null(SSL_COMP) -# define sk_SSL_COMP_free(st) SKM_sk_free(SSL_COMP, (st)) -# define sk_SSL_COMP_num(st) SKM_sk_num(SSL_COMP, (st)) -# define sk_SSL_COMP_value(st, i) SKM_sk_value(SSL_COMP, (st), (i)) -# define sk_SSL_COMP_set(st, i, val) SKM_sk_set(SSL_COMP, (st), (i), (val)) -# define sk_SSL_COMP_zero(st) SKM_sk_zero(SSL_COMP, (st)) -# define sk_SSL_COMP_push(st, val) SKM_sk_push(SSL_COMP, (st), (val)) -# define sk_SSL_COMP_unshift(st, val) SKM_sk_unshift(SSL_COMP, (st), (val)) -# define sk_SSL_COMP_find(st, val) SKM_sk_find(SSL_COMP, (st), (val)) -# define sk_SSL_COMP_find_ex(st, val) SKM_sk_find_ex(SSL_COMP, (st), (val)) -# define sk_SSL_COMP_delete(st, i) SKM_sk_delete(SSL_COMP, (st), (i)) -# define sk_SSL_COMP_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_COMP, (st), (ptr)) -# define sk_SSL_COMP_insert(st, val, i) SKM_sk_insert(SSL_COMP, (st), (val), (i)) -# define sk_SSL_COMP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_COMP, (st), (cmp)) -# define sk_SSL_COMP_dup(st) SKM_sk_dup(SSL_COMP, st) -# define sk_SSL_COMP_pop_free(st, free_func) SKM_sk_pop_free(SSL_COMP, (st), (free_func)) -# define sk_SSL_COMP_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SSL_COMP, (st), (copy_func), (free_func)) -# define sk_SSL_COMP_shift(st) SKM_sk_shift(SSL_COMP, (st)) -# define sk_SSL_COMP_pop(st) SKM_sk_pop(SSL_COMP, (st)) -# define sk_SSL_COMP_sort(st) SKM_sk_sort(SSL_COMP, (st)) -# define sk_SSL_COMP_is_sorted(st) SKM_sk_is_sorted(SSL_COMP, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_new(cmp) SKM_sk_new(STACK_OF_X509_NAME_ENTRY, (cmp)) -# define sk_STACK_OF_X509_NAME_ENTRY_new_null() SKM_sk_new_null(STACK_OF_X509_NAME_ENTRY) -# define sk_STACK_OF_X509_NAME_ENTRY_free(st) SKM_sk_free(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_num(st) SKM_sk_num(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_value(st, i) SKM_sk_value(STACK_OF_X509_NAME_ENTRY, (st), (i)) -# define sk_STACK_OF_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(STACK_OF_X509_NAME_ENTRY, (st), (i), (val)) -# define sk_STACK_OF_X509_NAME_ENTRY_zero(st) SKM_sk_zero(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_push(st, val) SKM_sk_push(STACK_OF_X509_NAME_ENTRY, (st), (val)) -# define sk_STACK_OF_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(STACK_OF_X509_NAME_ENTRY, (st), (val)) -# define sk_STACK_OF_X509_NAME_ENTRY_find(st, val) SKM_sk_find(STACK_OF_X509_NAME_ENTRY, (st), (val)) -# define sk_STACK_OF_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(STACK_OF_X509_NAME_ENTRY, (st), (val)) -# define sk_STACK_OF_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(STACK_OF_X509_NAME_ENTRY, (st), (i)) -# define sk_STACK_OF_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(STACK_OF_X509_NAME_ENTRY, (st), (ptr)) -# define sk_STACK_OF_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(STACK_OF_X509_NAME_ENTRY, (st), (val), (i)) -# define sk_STACK_OF_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STACK_OF_X509_NAME_ENTRY, (st), (cmp)) -# define sk_STACK_OF_X509_NAME_ENTRY_dup(st) SKM_sk_dup(STACK_OF_X509_NAME_ENTRY, st) -# define sk_STACK_OF_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(STACK_OF_X509_NAME_ENTRY, (st), (free_func)) -# define sk_STACK_OF_X509_NAME_ENTRY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(STACK_OF_X509_NAME_ENTRY, (st), (copy_func), (free_func)) -# define sk_STACK_OF_X509_NAME_ENTRY_shift(st) SKM_sk_shift(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_pop(st) SKM_sk_pop(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_sort(st) SKM_sk_sort(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STACK_OF_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(STACK_OF_X509_NAME_ENTRY, (st)) -# define sk_STORE_ATTR_INFO_new(cmp) SKM_sk_new(STORE_ATTR_INFO, (cmp)) -# define sk_STORE_ATTR_INFO_new_null() SKM_sk_new_null(STORE_ATTR_INFO) -# define sk_STORE_ATTR_INFO_free(st) SKM_sk_free(STORE_ATTR_INFO, (st)) -# define sk_STORE_ATTR_INFO_num(st) SKM_sk_num(STORE_ATTR_INFO, (st)) -# define sk_STORE_ATTR_INFO_value(st, i) SKM_sk_value(STORE_ATTR_INFO, (st), (i)) -# define sk_STORE_ATTR_INFO_set(st, i, val) SKM_sk_set(STORE_ATTR_INFO, (st), (i), (val)) -# define sk_STORE_ATTR_INFO_zero(st) SKM_sk_zero(STORE_ATTR_INFO, (st)) -# define sk_STORE_ATTR_INFO_push(st, val) SKM_sk_push(STORE_ATTR_INFO, (st), (val)) -# define sk_STORE_ATTR_INFO_unshift(st, val) SKM_sk_unshift(STORE_ATTR_INFO, (st), (val)) -# define sk_STORE_ATTR_INFO_find(st, val) SKM_sk_find(STORE_ATTR_INFO, (st), (val)) -# define sk_STORE_ATTR_INFO_find_ex(st, val) SKM_sk_find_ex(STORE_ATTR_INFO, (st), (val)) -# define sk_STORE_ATTR_INFO_delete(st, i) SKM_sk_delete(STORE_ATTR_INFO, (st), (i)) -# define sk_STORE_ATTR_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_ATTR_INFO, (st), (ptr)) -# define sk_STORE_ATTR_INFO_insert(st, val, i) SKM_sk_insert(STORE_ATTR_INFO, (st), (val), (i)) -# define sk_STORE_ATTR_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_ATTR_INFO, (st), (cmp)) -# define sk_STORE_ATTR_INFO_dup(st) SKM_sk_dup(STORE_ATTR_INFO, st) -# define sk_STORE_ATTR_INFO_pop_free(st, free_func) SKM_sk_pop_free(STORE_ATTR_INFO, (st), (free_func)) -# define sk_STORE_ATTR_INFO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(STORE_ATTR_INFO, (st), (copy_func), (free_func)) -# define sk_STORE_ATTR_INFO_shift(st) SKM_sk_shift(STORE_ATTR_INFO, (st)) -# define sk_STORE_ATTR_INFO_pop(st) SKM_sk_pop(STORE_ATTR_INFO, (st)) -# define sk_STORE_ATTR_INFO_sort(st) SKM_sk_sort(STORE_ATTR_INFO, (st)) -# define sk_STORE_ATTR_INFO_is_sorted(st) SKM_sk_is_sorted(STORE_ATTR_INFO, (st)) -# define sk_STORE_OBJECT_new(cmp) SKM_sk_new(STORE_OBJECT, (cmp)) -# define sk_STORE_OBJECT_new_null() SKM_sk_new_null(STORE_OBJECT) -# define sk_STORE_OBJECT_free(st) SKM_sk_free(STORE_OBJECT, (st)) -# define sk_STORE_OBJECT_num(st) SKM_sk_num(STORE_OBJECT, (st)) -# define sk_STORE_OBJECT_value(st, i) SKM_sk_value(STORE_OBJECT, (st), (i)) -# define sk_STORE_OBJECT_set(st, i, val) SKM_sk_set(STORE_OBJECT, (st), (i), (val)) -# define sk_STORE_OBJECT_zero(st) SKM_sk_zero(STORE_OBJECT, (st)) -# define sk_STORE_OBJECT_push(st, val) SKM_sk_push(STORE_OBJECT, (st), (val)) -# define sk_STORE_OBJECT_unshift(st, val) SKM_sk_unshift(STORE_OBJECT, (st), (val)) -# define sk_STORE_OBJECT_find(st, val) SKM_sk_find(STORE_OBJECT, (st), (val)) -# define sk_STORE_OBJECT_find_ex(st, val) SKM_sk_find_ex(STORE_OBJECT, (st), (val)) -# define sk_STORE_OBJECT_delete(st, i) SKM_sk_delete(STORE_OBJECT, (st), (i)) -# define sk_STORE_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_OBJECT, (st), (ptr)) -# define sk_STORE_OBJECT_insert(st, val, i) SKM_sk_insert(STORE_OBJECT, (st), (val), (i)) -# define sk_STORE_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_OBJECT, (st), (cmp)) -# define sk_STORE_OBJECT_dup(st) SKM_sk_dup(STORE_OBJECT, st) -# define sk_STORE_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(STORE_OBJECT, (st), (free_func)) -# define sk_STORE_OBJECT_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(STORE_OBJECT, (st), (copy_func), (free_func)) -# define sk_STORE_OBJECT_shift(st) SKM_sk_shift(STORE_OBJECT, (st)) -# define sk_STORE_OBJECT_pop(st) SKM_sk_pop(STORE_OBJECT, (st)) -# define sk_STORE_OBJECT_sort(st) SKM_sk_sort(STORE_OBJECT, (st)) -# define sk_STORE_OBJECT_is_sorted(st) SKM_sk_is_sorted(STORE_OBJECT, (st)) -# define sk_SXNETID_new(cmp) SKM_sk_new(SXNETID, (cmp)) -# define sk_SXNETID_new_null() SKM_sk_new_null(SXNETID) -# define sk_SXNETID_free(st) SKM_sk_free(SXNETID, (st)) -# define sk_SXNETID_num(st) SKM_sk_num(SXNETID, (st)) -# define sk_SXNETID_value(st, i) SKM_sk_value(SXNETID, (st), (i)) -# define sk_SXNETID_set(st, i, val) SKM_sk_set(SXNETID, (st), (i), (val)) -# define sk_SXNETID_zero(st) SKM_sk_zero(SXNETID, (st)) -# define sk_SXNETID_push(st, val) SKM_sk_push(SXNETID, (st), (val)) -# define sk_SXNETID_unshift(st, val) SKM_sk_unshift(SXNETID, (st), (val)) -# define sk_SXNETID_find(st, val) SKM_sk_find(SXNETID, (st), (val)) -# define sk_SXNETID_find_ex(st, val) SKM_sk_find_ex(SXNETID, (st), (val)) -# define sk_SXNETID_delete(st, i) SKM_sk_delete(SXNETID, (st), (i)) -# define sk_SXNETID_delete_ptr(st, ptr) SKM_sk_delete_ptr(SXNETID, (st), (ptr)) -# define sk_SXNETID_insert(st, val, i) SKM_sk_insert(SXNETID, (st), (val), (i)) -# define sk_SXNETID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SXNETID, (st), (cmp)) -# define sk_SXNETID_dup(st) SKM_sk_dup(SXNETID, st) -# define sk_SXNETID_pop_free(st, free_func) SKM_sk_pop_free(SXNETID, (st), (free_func)) -# define sk_SXNETID_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(SXNETID, (st), (copy_func), (free_func)) -# define sk_SXNETID_shift(st) SKM_sk_shift(SXNETID, (st)) -# define sk_SXNETID_pop(st) SKM_sk_pop(SXNETID, (st)) -# define sk_SXNETID_sort(st) SKM_sk_sort(SXNETID, (st)) -# define sk_SXNETID_is_sorted(st) SKM_sk_is_sorted(SXNETID, (st)) -# define sk_UI_STRING_new(cmp) SKM_sk_new(UI_STRING, (cmp)) -# define sk_UI_STRING_new_null() SKM_sk_new_null(UI_STRING) -# define sk_UI_STRING_free(st) SKM_sk_free(UI_STRING, (st)) -# define sk_UI_STRING_num(st) SKM_sk_num(UI_STRING, (st)) -# define sk_UI_STRING_value(st, i) SKM_sk_value(UI_STRING, (st), (i)) -# define sk_UI_STRING_set(st, i, val) SKM_sk_set(UI_STRING, (st), (i), (val)) -# define sk_UI_STRING_zero(st) SKM_sk_zero(UI_STRING, (st)) -# define sk_UI_STRING_push(st, val) SKM_sk_push(UI_STRING, (st), (val)) -# define sk_UI_STRING_unshift(st, val) SKM_sk_unshift(UI_STRING, (st), (val)) -# define sk_UI_STRING_find(st, val) SKM_sk_find(UI_STRING, (st), (val)) -# define sk_UI_STRING_find_ex(st, val) SKM_sk_find_ex(UI_STRING, (st), (val)) -# define sk_UI_STRING_delete(st, i) SKM_sk_delete(UI_STRING, (st), (i)) -# define sk_UI_STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(UI_STRING, (st), (ptr)) -# define sk_UI_STRING_insert(st, val, i) SKM_sk_insert(UI_STRING, (st), (val), (i)) -# define sk_UI_STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(UI_STRING, (st), (cmp)) -# define sk_UI_STRING_dup(st) SKM_sk_dup(UI_STRING, st) -# define sk_UI_STRING_pop_free(st, free_func) SKM_sk_pop_free(UI_STRING, (st), (free_func)) -# define sk_UI_STRING_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(UI_STRING, (st), (copy_func), (free_func)) -# define sk_UI_STRING_shift(st) SKM_sk_shift(UI_STRING, (st)) -# define sk_UI_STRING_pop(st) SKM_sk_pop(UI_STRING, (st)) -# define sk_UI_STRING_sort(st) SKM_sk_sort(UI_STRING, (st)) -# define sk_UI_STRING_is_sorted(st) SKM_sk_is_sorted(UI_STRING, (st)) -# define sk_X509_new(cmp) SKM_sk_new(X509, (cmp)) -# define sk_X509_new_null() SKM_sk_new_null(X509) -# define sk_X509_free(st) SKM_sk_free(X509, (st)) -# define sk_X509_num(st) SKM_sk_num(X509, (st)) -# define sk_X509_value(st, i) SKM_sk_value(X509, (st), (i)) -# define sk_X509_set(st, i, val) SKM_sk_set(X509, (st), (i), (val)) -# define sk_X509_zero(st) SKM_sk_zero(X509, (st)) -# define sk_X509_push(st, val) SKM_sk_push(X509, (st), (val)) -# define sk_X509_unshift(st, val) SKM_sk_unshift(X509, (st), (val)) -# define sk_X509_find(st, val) SKM_sk_find(X509, (st), (val)) -# define sk_X509_find_ex(st, val) SKM_sk_find_ex(X509, (st), (val)) -# define sk_X509_delete(st, i) SKM_sk_delete(X509, (st), (i)) -# define sk_X509_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509, (st), (ptr)) -# define sk_X509_insert(st, val, i) SKM_sk_insert(X509, (st), (val), (i)) -# define sk_X509_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509, (st), (cmp)) -# define sk_X509_dup(st) SKM_sk_dup(X509, st) -# define sk_X509_pop_free(st, free_func) SKM_sk_pop_free(X509, (st), (free_func)) -# define sk_X509_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509, (st), (copy_func), (free_func)) -# define sk_X509_shift(st) SKM_sk_shift(X509, (st)) -# define sk_X509_pop(st) SKM_sk_pop(X509, (st)) -# define sk_X509_sort(st) SKM_sk_sort(X509, (st)) -# define sk_X509_is_sorted(st) SKM_sk_is_sorted(X509, (st)) -# define sk_X509V3_EXT_METHOD_new(cmp) SKM_sk_new(X509V3_EXT_METHOD, (cmp)) -# define sk_X509V3_EXT_METHOD_new_null() SKM_sk_new_null(X509V3_EXT_METHOD) -# define sk_X509V3_EXT_METHOD_free(st) SKM_sk_free(X509V3_EXT_METHOD, (st)) -# define sk_X509V3_EXT_METHOD_num(st) SKM_sk_num(X509V3_EXT_METHOD, (st)) -# define sk_X509V3_EXT_METHOD_value(st, i) SKM_sk_value(X509V3_EXT_METHOD, (st), (i)) -# define sk_X509V3_EXT_METHOD_set(st, i, val) SKM_sk_set(X509V3_EXT_METHOD, (st), (i), (val)) -# define sk_X509V3_EXT_METHOD_zero(st) SKM_sk_zero(X509V3_EXT_METHOD, (st)) -# define sk_X509V3_EXT_METHOD_push(st, val) SKM_sk_push(X509V3_EXT_METHOD, (st), (val)) -# define sk_X509V3_EXT_METHOD_unshift(st, val) SKM_sk_unshift(X509V3_EXT_METHOD, (st), (val)) -# define sk_X509V3_EXT_METHOD_find(st, val) SKM_sk_find(X509V3_EXT_METHOD, (st), (val)) -# define sk_X509V3_EXT_METHOD_find_ex(st, val) SKM_sk_find_ex(X509V3_EXT_METHOD, (st), (val)) -# define sk_X509V3_EXT_METHOD_delete(st, i) SKM_sk_delete(X509V3_EXT_METHOD, (st), (i)) -# define sk_X509V3_EXT_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509V3_EXT_METHOD, (st), (ptr)) -# define sk_X509V3_EXT_METHOD_insert(st, val, i) SKM_sk_insert(X509V3_EXT_METHOD, (st), (val), (i)) -# define sk_X509V3_EXT_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509V3_EXT_METHOD, (st), (cmp)) -# define sk_X509V3_EXT_METHOD_dup(st) SKM_sk_dup(X509V3_EXT_METHOD, st) -# define sk_X509V3_EXT_METHOD_pop_free(st, free_func) SKM_sk_pop_free(X509V3_EXT_METHOD, (st), (free_func)) -# define sk_X509V3_EXT_METHOD_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509V3_EXT_METHOD, (st), (copy_func), (free_func)) -# define sk_X509V3_EXT_METHOD_shift(st) SKM_sk_shift(X509V3_EXT_METHOD, (st)) -# define sk_X509V3_EXT_METHOD_pop(st) SKM_sk_pop(X509V3_EXT_METHOD, (st)) -# define sk_X509V3_EXT_METHOD_sort(st) SKM_sk_sort(X509V3_EXT_METHOD, (st)) -# define sk_X509V3_EXT_METHOD_is_sorted(st) SKM_sk_is_sorted(X509V3_EXT_METHOD, (st)) -# define sk_X509_ALGOR_new(cmp) SKM_sk_new(X509_ALGOR, (cmp)) -# define sk_X509_ALGOR_new_null() SKM_sk_new_null(X509_ALGOR) -# define sk_X509_ALGOR_free(st) SKM_sk_free(X509_ALGOR, (st)) -# define sk_X509_ALGOR_num(st) SKM_sk_num(X509_ALGOR, (st)) -# define sk_X509_ALGOR_value(st, i) SKM_sk_value(X509_ALGOR, (st), (i)) -# define sk_X509_ALGOR_set(st, i, val) SKM_sk_set(X509_ALGOR, (st), (i), (val)) -# define sk_X509_ALGOR_zero(st) SKM_sk_zero(X509_ALGOR, (st)) -# define sk_X509_ALGOR_push(st, val) SKM_sk_push(X509_ALGOR, (st), (val)) -# define sk_X509_ALGOR_unshift(st, val) SKM_sk_unshift(X509_ALGOR, (st), (val)) -# define sk_X509_ALGOR_find(st, val) SKM_sk_find(X509_ALGOR, (st), (val)) -# define sk_X509_ALGOR_find_ex(st, val) SKM_sk_find_ex(X509_ALGOR, (st), (val)) -# define sk_X509_ALGOR_delete(st, i) SKM_sk_delete(X509_ALGOR, (st), (i)) -# define sk_X509_ALGOR_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ALGOR, (st), (ptr)) -# define sk_X509_ALGOR_insert(st, val, i) SKM_sk_insert(X509_ALGOR, (st), (val), (i)) -# define sk_X509_ALGOR_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ALGOR, (st), (cmp)) -# define sk_X509_ALGOR_dup(st) SKM_sk_dup(X509_ALGOR, st) -# define sk_X509_ALGOR_pop_free(st, free_func) SKM_sk_pop_free(X509_ALGOR, (st), (free_func)) -# define sk_X509_ALGOR_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_ALGOR, (st), (copy_func), (free_func)) -# define sk_X509_ALGOR_shift(st) SKM_sk_shift(X509_ALGOR, (st)) -# define sk_X509_ALGOR_pop(st) SKM_sk_pop(X509_ALGOR, (st)) -# define sk_X509_ALGOR_sort(st) SKM_sk_sort(X509_ALGOR, (st)) -# define sk_X509_ALGOR_is_sorted(st) SKM_sk_is_sorted(X509_ALGOR, (st)) -# define sk_X509_ATTRIBUTE_new(cmp) SKM_sk_new(X509_ATTRIBUTE, (cmp)) -# define sk_X509_ATTRIBUTE_new_null() SKM_sk_new_null(X509_ATTRIBUTE) -# define sk_X509_ATTRIBUTE_free(st) SKM_sk_free(X509_ATTRIBUTE, (st)) -# define sk_X509_ATTRIBUTE_num(st) SKM_sk_num(X509_ATTRIBUTE, (st)) -# define sk_X509_ATTRIBUTE_value(st, i) SKM_sk_value(X509_ATTRIBUTE, (st), (i)) -# define sk_X509_ATTRIBUTE_set(st, i, val) SKM_sk_set(X509_ATTRIBUTE, (st), (i), (val)) -# define sk_X509_ATTRIBUTE_zero(st) SKM_sk_zero(X509_ATTRIBUTE, (st)) -# define sk_X509_ATTRIBUTE_push(st, val) SKM_sk_push(X509_ATTRIBUTE, (st), (val)) -# define sk_X509_ATTRIBUTE_unshift(st, val) SKM_sk_unshift(X509_ATTRIBUTE, (st), (val)) -# define sk_X509_ATTRIBUTE_find(st, val) SKM_sk_find(X509_ATTRIBUTE, (st), (val)) -# define sk_X509_ATTRIBUTE_find_ex(st, val) SKM_sk_find_ex(X509_ATTRIBUTE, (st), (val)) -# define sk_X509_ATTRIBUTE_delete(st, i) SKM_sk_delete(X509_ATTRIBUTE, (st), (i)) -# define sk_X509_ATTRIBUTE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ATTRIBUTE, (st), (ptr)) -# define sk_X509_ATTRIBUTE_insert(st, val, i) SKM_sk_insert(X509_ATTRIBUTE, (st), (val), (i)) -# define sk_X509_ATTRIBUTE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ATTRIBUTE, (st), (cmp)) -# define sk_X509_ATTRIBUTE_dup(st) SKM_sk_dup(X509_ATTRIBUTE, st) -# define sk_X509_ATTRIBUTE_pop_free(st, free_func) SKM_sk_pop_free(X509_ATTRIBUTE, (st), (free_func)) -# define sk_X509_ATTRIBUTE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_ATTRIBUTE, (st), (copy_func), (free_func)) -# define sk_X509_ATTRIBUTE_shift(st) SKM_sk_shift(X509_ATTRIBUTE, (st)) -# define sk_X509_ATTRIBUTE_pop(st) SKM_sk_pop(X509_ATTRIBUTE, (st)) -# define sk_X509_ATTRIBUTE_sort(st) SKM_sk_sort(X509_ATTRIBUTE, (st)) -# define sk_X509_ATTRIBUTE_is_sorted(st) SKM_sk_is_sorted(X509_ATTRIBUTE, (st)) -# define sk_X509_CRL_new(cmp) SKM_sk_new(X509_CRL, (cmp)) -# define sk_X509_CRL_new_null() SKM_sk_new_null(X509_CRL) -# define sk_X509_CRL_free(st) SKM_sk_free(X509_CRL, (st)) -# define sk_X509_CRL_num(st) SKM_sk_num(X509_CRL, (st)) -# define sk_X509_CRL_value(st, i) SKM_sk_value(X509_CRL, (st), (i)) -# define sk_X509_CRL_set(st, i, val) SKM_sk_set(X509_CRL, (st), (i), (val)) -# define sk_X509_CRL_zero(st) SKM_sk_zero(X509_CRL, (st)) -# define sk_X509_CRL_push(st, val) SKM_sk_push(X509_CRL, (st), (val)) -# define sk_X509_CRL_unshift(st, val) SKM_sk_unshift(X509_CRL, (st), (val)) -# define sk_X509_CRL_find(st, val) SKM_sk_find(X509_CRL, (st), (val)) -# define sk_X509_CRL_find_ex(st, val) SKM_sk_find_ex(X509_CRL, (st), (val)) -# define sk_X509_CRL_delete(st, i) SKM_sk_delete(X509_CRL, (st), (i)) -# define sk_X509_CRL_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_CRL, (st), (ptr)) -# define sk_X509_CRL_insert(st, val, i) SKM_sk_insert(X509_CRL, (st), (val), (i)) -# define sk_X509_CRL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_CRL, (st), (cmp)) -# define sk_X509_CRL_dup(st) SKM_sk_dup(X509_CRL, st) -# define sk_X509_CRL_pop_free(st, free_func) SKM_sk_pop_free(X509_CRL, (st), (free_func)) -# define sk_X509_CRL_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_CRL, (st), (copy_func), (free_func)) -# define sk_X509_CRL_shift(st) SKM_sk_shift(X509_CRL, (st)) -# define sk_X509_CRL_pop(st) SKM_sk_pop(X509_CRL, (st)) -# define sk_X509_CRL_sort(st) SKM_sk_sort(X509_CRL, (st)) -# define sk_X509_CRL_is_sorted(st) SKM_sk_is_sorted(X509_CRL, (st)) -# define sk_X509_EXTENSION_new(cmp) SKM_sk_new(X509_EXTENSION, (cmp)) -# define sk_X509_EXTENSION_new_null() SKM_sk_new_null(X509_EXTENSION) -# define sk_X509_EXTENSION_free(st) SKM_sk_free(X509_EXTENSION, (st)) -# define sk_X509_EXTENSION_num(st) SKM_sk_num(X509_EXTENSION, (st)) -# define sk_X509_EXTENSION_value(st, i) SKM_sk_value(X509_EXTENSION, (st), (i)) -# define sk_X509_EXTENSION_set(st, i, val) SKM_sk_set(X509_EXTENSION, (st), (i), (val)) -# define sk_X509_EXTENSION_zero(st) SKM_sk_zero(X509_EXTENSION, (st)) -# define sk_X509_EXTENSION_push(st, val) SKM_sk_push(X509_EXTENSION, (st), (val)) -# define sk_X509_EXTENSION_unshift(st, val) SKM_sk_unshift(X509_EXTENSION, (st), (val)) -# define sk_X509_EXTENSION_find(st, val) SKM_sk_find(X509_EXTENSION, (st), (val)) -# define sk_X509_EXTENSION_find_ex(st, val) SKM_sk_find_ex(X509_EXTENSION, (st), (val)) -# define sk_X509_EXTENSION_delete(st, i) SKM_sk_delete(X509_EXTENSION, (st), (i)) -# define sk_X509_EXTENSION_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_EXTENSION, (st), (ptr)) -# define sk_X509_EXTENSION_insert(st, val, i) SKM_sk_insert(X509_EXTENSION, (st), (val), (i)) -# define sk_X509_EXTENSION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_EXTENSION, (st), (cmp)) -# define sk_X509_EXTENSION_dup(st) SKM_sk_dup(X509_EXTENSION, st) -# define sk_X509_EXTENSION_pop_free(st, free_func) SKM_sk_pop_free(X509_EXTENSION, (st), (free_func)) -# define sk_X509_EXTENSION_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_EXTENSION, (st), (copy_func), (free_func)) -# define sk_X509_EXTENSION_shift(st) SKM_sk_shift(X509_EXTENSION, (st)) -# define sk_X509_EXTENSION_pop(st) SKM_sk_pop(X509_EXTENSION, (st)) -# define sk_X509_EXTENSION_sort(st) SKM_sk_sort(X509_EXTENSION, (st)) -# define sk_X509_EXTENSION_is_sorted(st) SKM_sk_is_sorted(X509_EXTENSION, (st)) -# define sk_X509_INFO_new(cmp) SKM_sk_new(X509_INFO, (cmp)) -# define sk_X509_INFO_new_null() SKM_sk_new_null(X509_INFO) -# define sk_X509_INFO_free(st) SKM_sk_free(X509_INFO, (st)) -# define sk_X509_INFO_num(st) SKM_sk_num(X509_INFO, (st)) -# define sk_X509_INFO_value(st, i) SKM_sk_value(X509_INFO, (st), (i)) -# define sk_X509_INFO_set(st, i, val) SKM_sk_set(X509_INFO, (st), (i), (val)) -# define sk_X509_INFO_zero(st) SKM_sk_zero(X509_INFO, (st)) -# define sk_X509_INFO_push(st, val) SKM_sk_push(X509_INFO, (st), (val)) -# define sk_X509_INFO_unshift(st, val) SKM_sk_unshift(X509_INFO, (st), (val)) -# define sk_X509_INFO_find(st, val) SKM_sk_find(X509_INFO, (st), (val)) -# define sk_X509_INFO_find_ex(st, val) SKM_sk_find_ex(X509_INFO, (st), (val)) -# define sk_X509_INFO_delete(st, i) SKM_sk_delete(X509_INFO, (st), (i)) -# define sk_X509_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_INFO, (st), (ptr)) -# define sk_X509_INFO_insert(st, val, i) SKM_sk_insert(X509_INFO, (st), (val), (i)) -# define sk_X509_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_INFO, (st), (cmp)) -# define sk_X509_INFO_dup(st) SKM_sk_dup(X509_INFO, st) -# define sk_X509_INFO_pop_free(st, free_func) SKM_sk_pop_free(X509_INFO, (st), (free_func)) -# define sk_X509_INFO_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_INFO, (st), (copy_func), (free_func)) -# define sk_X509_INFO_shift(st) SKM_sk_shift(X509_INFO, (st)) -# define sk_X509_INFO_pop(st) SKM_sk_pop(X509_INFO, (st)) -# define sk_X509_INFO_sort(st) SKM_sk_sort(X509_INFO, (st)) -# define sk_X509_INFO_is_sorted(st) SKM_sk_is_sorted(X509_INFO, (st)) -# define sk_X509_LOOKUP_new(cmp) SKM_sk_new(X509_LOOKUP, (cmp)) -# define sk_X509_LOOKUP_new_null() SKM_sk_new_null(X509_LOOKUP) -# define sk_X509_LOOKUP_free(st) SKM_sk_free(X509_LOOKUP, (st)) -# define sk_X509_LOOKUP_num(st) SKM_sk_num(X509_LOOKUP, (st)) -# define sk_X509_LOOKUP_value(st, i) SKM_sk_value(X509_LOOKUP, (st), (i)) -# define sk_X509_LOOKUP_set(st, i, val) SKM_sk_set(X509_LOOKUP, (st), (i), (val)) -# define sk_X509_LOOKUP_zero(st) SKM_sk_zero(X509_LOOKUP, (st)) -# define sk_X509_LOOKUP_push(st, val) SKM_sk_push(X509_LOOKUP, (st), (val)) -# define sk_X509_LOOKUP_unshift(st, val) SKM_sk_unshift(X509_LOOKUP, (st), (val)) -# define sk_X509_LOOKUP_find(st, val) SKM_sk_find(X509_LOOKUP, (st), (val)) -# define sk_X509_LOOKUP_find_ex(st, val) SKM_sk_find_ex(X509_LOOKUP, (st), (val)) -# define sk_X509_LOOKUP_delete(st, i) SKM_sk_delete(X509_LOOKUP, (st), (i)) -# define sk_X509_LOOKUP_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_LOOKUP, (st), (ptr)) -# define sk_X509_LOOKUP_insert(st, val, i) SKM_sk_insert(X509_LOOKUP, (st), (val), (i)) -# define sk_X509_LOOKUP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_LOOKUP, (st), (cmp)) -# define sk_X509_LOOKUP_dup(st) SKM_sk_dup(X509_LOOKUP, st) -# define sk_X509_LOOKUP_pop_free(st, free_func) SKM_sk_pop_free(X509_LOOKUP, (st), (free_func)) -# define sk_X509_LOOKUP_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_LOOKUP, (st), (copy_func), (free_func)) -# define sk_X509_LOOKUP_shift(st) SKM_sk_shift(X509_LOOKUP, (st)) -# define sk_X509_LOOKUP_pop(st) SKM_sk_pop(X509_LOOKUP, (st)) -# define sk_X509_LOOKUP_sort(st) SKM_sk_sort(X509_LOOKUP, (st)) -# define sk_X509_LOOKUP_is_sorted(st) SKM_sk_is_sorted(X509_LOOKUP, (st)) -# define sk_X509_NAME_new(cmp) SKM_sk_new(X509_NAME, (cmp)) -# define sk_X509_NAME_new_null() SKM_sk_new_null(X509_NAME) -# define sk_X509_NAME_free(st) SKM_sk_free(X509_NAME, (st)) -# define sk_X509_NAME_num(st) SKM_sk_num(X509_NAME, (st)) -# define sk_X509_NAME_value(st, i) SKM_sk_value(X509_NAME, (st), (i)) -# define sk_X509_NAME_set(st, i, val) SKM_sk_set(X509_NAME, (st), (i), (val)) -# define sk_X509_NAME_zero(st) SKM_sk_zero(X509_NAME, (st)) -# define sk_X509_NAME_push(st, val) SKM_sk_push(X509_NAME, (st), (val)) -# define sk_X509_NAME_unshift(st, val) SKM_sk_unshift(X509_NAME, (st), (val)) -# define sk_X509_NAME_find(st, val) SKM_sk_find(X509_NAME, (st), (val)) -# define sk_X509_NAME_find_ex(st, val) SKM_sk_find_ex(X509_NAME, (st), (val)) -# define sk_X509_NAME_delete(st, i) SKM_sk_delete(X509_NAME, (st), (i)) -# define sk_X509_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME, (st), (ptr)) -# define sk_X509_NAME_insert(st, val, i) SKM_sk_insert(X509_NAME, (st), (val), (i)) -# define sk_X509_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME, (st), (cmp)) -# define sk_X509_NAME_dup(st) SKM_sk_dup(X509_NAME, st) -# define sk_X509_NAME_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME, (st), (free_func)) -# define sk_X509_NAME_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_NAME, (st), (copy_func), (free_func)) -# define sk_X509_NAME_shift(st) SKM_sk_shift(X509_NAME, (st)) -# define sk_X509_NAME_pop(st) SKM_sk_pop(X509_NAME, (st)) -# define sk_X509_NAME_sort(st) SKM_sk_sort(X509_NAME, (st)) -# define sk_X509_NAME_is_sorted(st) SKM_sk_is_sorted(X509_NAME, (st)) -# define sk_X509_NAME_ENTRY_new(cmp) SKM_sk_new(X509_NAME_ENTRY, (cmp)) -# define sk_X509_NAME_ENTRY_new_null() SKM_sk_new_null(X509_NAME_ENTRY) -# define sk_X509_NAME_ENTRY_free(st) SKM_sk_free(X509_NAME_ENTRY, (st)) -# define sk_X509_NAME_ENTRY_num(st) SKM_sk_num(X509_NAME_ENTRY, (st)) -# define sk_X509_NAME_ENTRY_value(st, i) SKM_sk_value(X509_NAME_ENTRY, (st), (i)) -# define sk_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(X509_NAME_ENTRY, (st), (i), (val)) -# define sk_X509_NAME_ENTRY_zero(st) SKM_sk_zero(X509_NAME_ENTRY, (st)) -# define sk_X509_NAME_ENTRY_push(st, val) SKM_sk_push(X509_NAME_ENTRY, (st), (val)) -# define sk_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(X509_NAME_ENTRY, (st), (val)) -# define sk_X509_NAME_ENTRY_find(st, val) SKM_sk_find(X509_NAME_ENTRY, (st), (val)) -# define sk_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(X509_NAME_ENTRY, (st), (val)) -# define sk_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(X509_NAME_ENTRY, (st), (i)) -# define sk_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME_ENTRY, (st), (ptr)) -# define sk_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(X509_NAME_ENTRY, (st), (val), (i)) -# define sk_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME_ENTRY, (st), (cmp)) -# define sk_X509_NAME_ENTRY_dup(st) SKM_sk_dup(X509_NAME_ENTRY, st) -# define sk_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME_ENTRY, (st), (free_func)) -# define sk_X509_NAME_ENTRY_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_NAME_ENTRY, (st), (copy_func), (free_func)) -# define sk_X509_NAME_ENTRY_shift(st) SKM_sk_shift(X509_NAME_ENTRY, (st)) -# define sk_X509_NAME_ENTRY_pop(st) SKM_sk_pop(X509_NAME_ENTRY, (st)) -# define sk_X509_NAME_ENTRY_sort(st) SKM_sk_sort(X509_NAME_ENTRY, (st)) -# define sk_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(X509_NAME_ENTRY, (st)) -# define sk_X509_OBJECT_new(cmp) SKM_sk_new(X509_OBJECT, (cmp)) -# define sk_X509_OBJECT_new_null() SKM_sk_new_null(X509_OBJECT) -# define sk_X509_OBJECT_free(st) SKM_sk_free(X509_OBJECT, (st)) -# define sk_X509_OBJECT_num(st) SKM_sk_num(X509_OBJECT, (st)) -# define sk_X509_OBJECT_value(st, i) SKM_sk_value(X509_OBJECT, (st), (i)) -# define sk_X509_OBJECT_set(st, i, val) SKM_sk_set(X509_OBJECT, (st), (i), (val)) -# define sk_X509_OBJECT_zero(st) SKM_sk_zero(X509_OBJECT, (st)) -# define sk_X509_OBJECT_push(st, val) SKM_sk_push(X509_OBJECT, (st), (val)) -# define sk_X509_OBJECT_unshift(st, val) SKM_sk_unshift(X509_OBJECT, (st), (val)) -# define sk_X509_OBJECT_find(st, val) SKM_sk_find(X509_OBJECT, (st), (val)) -# define sk_X509_OBJECT_find_ex(st, val) SKM_sk_find_ex(X509_OBJECT, (st), (val)) -# define sk_X509_OBJECT_delete(st, i) SKM_sk_delete(X509_OBJECT, (st), (i)) -# define sk_X509_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_OBJECT, (st), (ptr)) -# define sk_X509_OBJECT_insert(st, val, i) SKM_sk_insert(X509_OBJECT, (st), (val), (i)) -# define sk_X509_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_OBJECT, (st), (cmp)) -# define sk_X509_OBJECT_dup(st) SKM_sk_dup(X509_OBJECT, st) -# define sk_X509_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(X509_OBJECT, (st), (free_func)) -# define sk_X509_OBJECT_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_OBJECT, (st), (copy_func), (free_func)) -# define sk_X509_OBJECT_shift(st) SKM_sk_shift(X509_OBJECT, (st)) -# define sk_X509_OBJECT_pop(st) SKM_sk_pop(X509_OBJECT, (st)) -# define sk_X509_OBJECT_sort(st) SKM_sk_sort(X509_OBJECT, (st)) -# define sk_X509_OBJECT_is_sorted(st) SKM_sk_is_sorted(X509_OBJECT, (st)) -# define sk_X509_POLICY_DATA_new(cmp) SKM_sk_new(X509_POLICY_DATA, (cmp)) -# define sk_X509_POLICY_DATA_new_null() SKM_sk_new_null(X509_POLICY_DATA) -# define sk_X509_POLICY_DATA_free(st) SKM_sk_free(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_DATA_num(st) SKM_sk_num(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_DATA_value(st, i) SKM_sk_value(X509_POLICY_DATA, (st), (i)) -# define sk_X509_POLICY_DATA_set(st, i, val) SKM_sk_set(X509_POLICY_DATA, (st), (i), (val)) -# define sk_X509_POLICY_DATA_zero(st) SKM_sk_zero(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_DATA_push(st, val) SKM_sk_push(X509_POLICY_DATA, (st), (val)) -# define sk_X509_POLICY_DATA_unshift(st, val) SKM_sk_unshift(X509_POLICY_DATA, (st), (val)) -# define sk_X509_POLICY_DATA_find(st, val) SKM_sk_find(X509_POLICY_DATA, (st), (val)) -# define sk_X509_POLICY_DATA_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_DATA, (st), (val)) -# define sk_X509_POLICY_DATA_delete(st, i) SKM_sk_delete(X509_POLICY_DATA, (st), (i)) -# define sk_X509_POLICY_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_DATA, (st), (ptr)) -# define sk_X509_POLICY_DATA_insert(st, val, i) SKM_sk_insert(X509_POLICY_DATA, (st), (val), (i)) -# define sk_X509_POLICY_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_DATA, (st), (cmp)) -# define sk_X509_POLICY_DATA_dup(st) SKM_sk_dup(X509_POLICY_DATA, st) -# define sk_X509_POLICY_DATA_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_DATA, (st), (free_func)) -# define sk_X509_POLICY_DATA_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_POLICY_DATA, (st), (copy_func), (free_func)) -# define sk_X509_POLICY_DATA_shift(st) SKM_sk_shift(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_DATA_pop(st) SKM_sk_pop(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_DATA_sort(st) SKM_sk_sort(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_DATA_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_DATA, (st)) -# define sk_X509_POLICY_NODE_new(cmp) SKM_sk_new(X509_POLICY_NODE, (cmp)) -# define sk_X509_POLICY_NODE_new_null() SKM_sk_new_null(X509_POLICY_NODE) -# define sk_X509_POLICY_NODE_free(st) SKM_sk_free(X509_POLICY_NODE, (st)) -# define sk_X509_POLICY_NODE_num(st) SKM_sk_num(X509_POLICY_NODE, (st)) -# define sk_X509_POLICY_NODE_value(st, i) SKM_sk_value(X509_POLICY_NODE, (st), (i)) -# define sk_X509_POLICY_NODE_set(st, i, val) SKM_sk_set(X509_POLICY_NODE, (st), (i), (val)) -# define sk_X509_POLICY_NODE_zero(st) SKM_sk_zero(X509_POLICY_NODE, (st)) -# define sk_X509_POLICY_NODE_push(st, val) SKM_sk_push(X509_POLICY_NODE, (st), (val)) -# define sk_X509_POLICY_NODE_unshift(st, val) SKM_sk_unshift(X509_POLICY_NODE, (st), (val)) -# define sk_X509_POLICY_NODE_find(st, val) SKM_sk_find(X509_POLICY_NODE, (st), (val)) -# define sk_X509_POLICY_NODE_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_NODE, (st), (val)) -# define sk_X509_POLICY_NODE_delete(st, i) SKM_sk_delete(X509_POLICY_NODE, (st), (i)) -# define sk_X509_POLICY_NODE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_NODE, (st), (ptr)) -# define sk_X509_POLICY_NODE_insert(st, val, i) SKM_sk_insert(X509_POLICY_NODE, (st), (val), (i)) -# define sk_X509_POLICY_NODE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_NODE, (st), (cmp)) -# define sk_X509_POLICY_NODE_dup(st) SKM_sk_dup(X509_POLICY_NODE, st) -# define sk_X509_POLICY_NODE_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_NODE, (st), (free_func)) -# define sk_X509_POLICY_NODE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_POLICY_NODE, (st), (copy_func), (free_func)) -# define sk_X509_POLICY_NODE_shift(st) SKM_sk_shift(X509_POLICY_NODE, (st)) -# define sk_X509_POLICY_NODE_pop(st) SKM_sk_pop(X509_POLICY_NODE, (st)) -# define sk_X509_POLICY_NODE_sort(st) SKM_sk_sort(X509_POLICY_NODE, (st)) -# define sk_X509_POLICY_NODE_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_NODE, (st)) -# define sk_X509_PURPOSE_new(cmp) SKM_sk_new(X509_PURPOSE, (cmp)) -# define sk_X509_PURPOSE_new_null() SKM_sk_new_null(X509_PURPOSE) -# define sk_X509_PURPOSE_free(st) SKM_sk_free(X509_PURPOSE, (st)) -# define sk_X509_PURPOSE_num(st) SKM_sk_num(X509_PURPOSE, (st)) -# define sk_X509_PURPOSE_value(st, i) SKM_sk_value(X509_PURPOSE, (st), (i)) -# define sk_X509_PURPOSE_set(st, i, val) SKM_sk_set(X509_PURPOSE, (st), (i), (val)) -# define sk_X509_PURPOSE_zero(st) SKM_sk_zero(X509_PURPOSE, (st)) -# define sk_X509_PURPOSE_push(st, val) SKM_sk_push(X509_PURPOSE, (st), (val)) -# define sk_X509_PURPOSE_unshift(st, val) SKM_sk_unshift(X509_PURPOSE, (st), (val)) -# define sk_X509_PURPOSE_find(st, val) SKM_sk_find(X509_PURPOSE, (st), (val)) -# define sk_X509_PURPOSE_find_ex(st, val) SKM_sk_find_ex(X509_PURPOSE, (st), (val)) -# define sk_X509_PURPOSE_delete(st, i) SKM_sk_delete(X509_PURPOSE, (st), (i)) -# define sk_X509_PURPOSE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_PURPOSE, (st), (ptr)) -# define sk_X509_PURPOSE_insert(st, val, i) SKM_sk_insert(X509_PURPOSE, (st), (val), (i)) -# define sk_X509_PURPOSE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_PURPOSE, (st), (cmp)) -# define sk_X509_PURPOSE_dup(st) SKM_sk_dup(X509_PURPOSE, st) -# define sk_X509_PURPOSE_pop_free(st, free_func) SKM_sk_pop_free(X509_PURPOSE, (st), (free_func)) -# define sk_X509_PURPOSE_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_PURPOSE, (st), (copy_func), (free_func)) -# define sk_X509_PURPOSE_shift(st) SKM_sk_shift(X509_PURPOSE, (st)) -# define sk_X509_PURPOSE_pop(st) SKM_sk_pop(X509_PURPOSE, (st)) -# define sk_X509_PURPOSE_sort(st) SKM_sk_sort(X509_PURPOSE, (st)) -# define sk_X509_PURPOSE_is_sorted(st) SKM_sk_is_sorted(X509_PURPOSE, (st)) -# define sk_X509_REVOKED_new(cmp) SKM_sk_new(X509_REVOKED, (cmp)) -# define sk_X509_REVOKED_new_null() SKM_sk_new_null(X509_REVOKED) -# define sk_X509_REVOKED_free(st) SKM_sk_free(X509_REVOKED, (st)) -# define sk_X509_REVOKED_num(st) SKM_sk_num(X509_REVOKED, (st)) -# define sk_X509_REVOKED_value(st, i) SKM_sk_value(X509_REVOKED, (st), (i)) -# define sk_X509_REVOKED_set(st, i, val) SKM_sk_set(X509_REVOKED, (st), (i), (val)) -# define sk_X509_REVOKED_zero(st) SKM_sk_zero(X509_REVOKED, (st)) -# define sk_X509_REVOKED_push(st, val) SKM_sk_push(X509_REVOKED, (st), (val)) -# define sk_X509_REVOKED_unshift(st, val) SKM_sk_unshift(X509_REVOKED, (st), (val)) -# define sk_X509_REVOKED_find(st, val) SKM_sk_find(X509_REVOKED, (st), (val)) -# define sk_X509_REVOKED_find_ex(st, val) SKM_sk_find_ex(X509_REVOKED, (st), (val)) -# define sk_X509_REVOKED_delete(st, i) SKM_sk_delete(X509_REVOKED, (st), (i)) -# define sk_X509_REVOKED_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_REVOKED, (st), (ptr)) -# define sk_X509_REVOKED_insert(st, val, i) SKM_sk_insert(X509_REVOKED, (st), (val), (i)) -# define sk_X509_REVOKED_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_REVOKED, (st), (cmp)) -# define sk_X509_REVOKED_dup(st) SKM_sk_dup(X509_REVOKED, st) -# define sk_X509_REVOKED_pop_free(st, free_func) SKM_sk_pop_free(X509_REVOKED, (st), (free_func)) -# define sk_X509_REVOKED_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_REVOKED, (st), (copy_func), (free_func)) -# define sk_X509_REVOKED_shift(st) SKM_sk_shift(X509_REVOKED, (st)) -# define sk_X509_REVOKED_pop(st) SKM_sk_pop(X509_REVOKED, (st)) -# define sk_X509_REVOKED_sort(st) SKM_sk_sort(X509_REVOKED, (st)) -# define sk_X509_REVOKED_is_sorted(st) SKM_sk_is_sorted(X509_REVOKED, (st)) -# define sk_X509_TRUST_new(cmp) SKM_sk_new(X509_TRUST, (cmp)) -# define sk_X509_TRUST_new_null() SKM_sk_new_null(X509_TRUST) -# define sk_X509_TRUST_free(st) SKM_sk_free(X509_TRUST, (st)) -# define sk_X509_TRUST_num(st) SKM_sk_num(X509_TRUST, (st)) -# define sk_X509_TRUST_value(st, i) SKM_sk_value(X509_TRUST, (st), (i)) -# define sk_X509_TRUST_set(st, i, val) SKM_sk_set(X509_TRUST, (st), (i), (val)) -# define sk_X509_TRUST_zero(st) SKM_sk_zero(X509_TRUST, (st)) -# define sk_X509_TRUST_push(st, val) SKM_sk_push(X509_TRUST, (st), (val)) -# define sk_X509_TRUST_unshift(st, val) SKM_sk_unshift(X509_TRUST, (st), (val)) -# define sk_X509_TRUST_find(st, val) SKM_sk_find(X509_TRUST, (st), (val)) -# define sk_X509_TRUST_find_ex(st, val) SKM_sk_find_ex(X509_TRUST, (st), (val)) -# define sk_X509_TRUST_delete(st, i) SKM_sk_delete(X509_TRUST, (st), (i)) -# define sk_X509_TRUST_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_TRUST, (st), (ptr)) -# define sk_X509_TRUST_insert(st, val, i) SKM_sk_insert(X509_TRUST, (st), (val), (i)) -# define sk_X509_TRUST_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_TRUST, (st), (cmp)) -# define sk_X509_TRUST_dup(st) SKM_sk_dup(X509_TRUST, st) -# define sk_X509_TRUST_pop_free(st, free_func) SKM_sk_pop_free(X509_TRUST, (st), (free_func)) -# define sk_X509_TRUST_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_TRUST, (st), (copy_func), (free_func)) -# define sk_X509_TRUST_shift(st) SKM_sk_shift(X509_TRUST, (st)) -# define sk_X509_TRUST_pop(st) SKM_sk_pop(X509_TRUST, (st)) -# define sk_X509_TRUST_sort(st) SKM_sk_sort(X509_TRUST, (st)) -# define sk_X509_TRUST_is_sorted(st) SKM_sk_is_sorted(X509_TRUST, (st)) -# define sk_X509_VERIFY_PARAM_new(cmp) SKM_sk_new(X509_VERIFY_PARAM, (cmp)) -# define sk_X509_VERIFY_PARAM_new_null() SKM_sk_new_null(X509_VERIFY_PARAM) -# define sk_X509_VERIFY_PARAM_free(st) SKM_sk_free(X509_VERIFY_PARAM, (st)) -# define sk_X509_VERIFY_PARAM_num(st) SKM_sk_num(X509_VERIFY_PARAM, (st)) -# define sk_X509_VERIFY_PARAM_value(st, i) SKM_sk_value(X509_VERIFY_PARAM, (st), (i)) -# define sk_X509_VERIFY_PARAM_set(st, i, val) SKM_sk_set(X509_VERIFY_PARAM, (st), (i), (val)) -# define sk_X509_VERIFY_PARAM_zero(st) SKM_sk_zero(X509_VERIFY_PARAM, (st)) -# define sk_X509_VERIFY_PARAM_push(st, val) SKM_sk_push(X509_VERIFY_PARAM, (st), (val)) -# define sk_X509_VERIFY_PARAM_unshift(st, val) SKM_sk_unshift(X509_VERIFY_PARAM, (st), (val)) -# define sk_X509_VERIFY_PARAM_find(st, val) SKM_sk_find(X509_VERIFY_PARAM, (st), (val)) -# define sk_X509_VERIFY_PARAM_find_ex(st, val) SKM_sk_find_ex(X509_VERIFY_PARAM, (st), (val)) -# define sk_X509_VERIFY_PARAM_delete(st, i) SKM_sk_delete(X509_VERIFY_PARAM, (st), (i)) -# define sk_X509_VERIFY_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_VERIFY_PARAM, (st), (ptr)) -# define sk_X509_VERIFY_PARAM_insert(st, val, i) SKM_sk_insert(X509_VERIFY_PARAM, (st), (val), (i)) -# define sk_X509_VERIFY_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_VERIFY_PARAM, (st), (cmp)) -# define sk_X509_VERIFY_PARAM_dup(st) SKM_sk_dup(X509_VERIFY_PARAM, st) -# define sk_X509_VERIFY_PARAM_pop_free(st, free_func) SKM_sk_pop_free(X509_VERIFY_PARAM, (st), (free_func)) -# define sk_X509_VERIFY_PARAM_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(X509_VERIFY_PARAM, (st), (copy_func), (free_func)) -# define sk_X509_VERIFY_PARAM_shift(st) SKM_sk_shift(X509_VERIFY_PARAM, (st)) -# define sk_X509_VERIFY_PARAM_pop(st) SKM_sk_pop(X509_VERIFY_PARAM, (st)) -# define sk_X509_VERIFY_PARAM_sort(st) SKM_sk_sort(X509_VERIFY_PARAM, (st)) -# define sk_X509_VERIFY_PARAM_is_sorted(st) SKM_sk_is_sorted(X509_VERIFY_PARAM, (st)) -# define sk_nid_triple_new(cmp) SKM_sk_new(nid_triple, (cmp)) -# define sk_nid_triple_new_null() SKM_sk_new_null(nid_triple) -# define sk_nid_triple_free(st) SKM_sk_free(nid_triple, (st)) -# define sk_nid_triple_num(st) SKM_sk_num(nid_triple, (st)) -# define sk_nid_triple_value(st, i) SKM_sk_value(nid_triple, (st), (i)) -# define sk_nid_triple_set(st, i, val) SKM_sk_set(nid_triple, (st), (i), (val)) -# define sk_nid_triple_zero(st) SKM_sk_zero(nid_triple, (st)) -# define sk_nid_triple_push(st, val) SKM_sk_push(nid_triple, (st), (val)) -# define sk_nid_triple_unshift(st, val) SKM_sk_unshift(nid_triple, (st), (val)) -# define sk_nid_triple_find(st, val) SKM_sk_find(nid_triple, (st), (val)) -# define sk_nid_triple_find_ex(st, val) SKM_sk_find_ex(nid_triple, (st), (val)) -# define sk_nid_triple_delete(st, i) SKM_sk_delete(nid_triple, (st), (i)) -# define sk_nid_triple_delete_ptr(st, ptr) SKM_sk_delete_ptr(nid_triple, (st), (ptr)) -# define sk_nid_triple_insert(st, val, i) SKM_sk_insert(nid_triple, (st), (val), (i)) -# define sk_nid_triple_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(nid_triple, (st), (cmp)) -# define sk_nid_triple_dup(st) SKM_sk_dup(nid_triple, st) -# define sk_nid_triple_pop_free(st, free_func) SKM_sk_pop_free(nid_triple, (st), (free_func)) -# define sk_nid_triple_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(nid_triple, (st), (copy_func), (free_func)) -# define sk_nid_triple_shift(st) SKM_sk_shift(nid_triple, (st)) -# define sk_nid_triple_pop(st) SKM_sk_pop(nid_triple, (st)) -# define sk_nid_triple_sort(st) SKM_sk_sort(nid_triple, (st)) -# define sk_nid_triple_is_sorted(st) SKM_sk_is_sorted(nid_triple, (st)) -# define sk_void_new(cmp) SKM_sk_new(void, (cmp)) -# define sk_void_new_null() SKM_sk_new_null(void) -# define sk_void_free(st) SKM_sk_free(void, (st)) -# define sk_void_num(st) SKM_sk_num(void, (st)) -# define sk_void_value(st, i) SKM_sk_value(void, (st), (i)) -# define sk_void_set(st, i, val) SKM_sk_set(void, (st), (i), (val)) -# define sk_void_zero(st) SKM_sk_zero(void, (st)) -# define sk_void_push(st, val) SKM_sk_push(void, (st), (val)) -# define sk_void_unshift(st, val) SKM_sk_unshift(void, (st), (val)) -# define sk_void_find(st, val) SKM_sk_find(void, (st), (val)) -# define sk_void_find_ex(st, val) SKM_sk_find_ex(void, (st), (val)) -# define sk_void_delete(st, i) SKM_sk_delete(void, (st), (i)) -# define sk_void_delete_ptr(st, ptr) SKM_sk_delete_ptr(void, (st), (ptr)) -# define sk_void_insert(st, val, i) SKM_sk_insert(void, (st), (val), (i)) -# define sk_void_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(void, (st), (cmp)) -# define sk_void_dup(st) SKM_sk_dup(void, st) -# define sk_void_pop_free(st, free_func) SKM_sk_pop_free(void, (st), (free_func)) -# define sk_void_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy(void, (st), (copy_func), (free_func)) -# define sk_void_shift(st) SKM_sk_shift(void, (st)) -# define sk_void_pop(st) SKM_sk_pop(void, (st)) -# define sk_void_sort(st) SKM_sk_sort(void, (st)) -# define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st)) -# define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp))) -# define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)sk_new_null()) -# define sk_OPENSSL_STRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val)) -# define sk_OPENSSL_STRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val)) -# define sk_OPENSSL_STRING_value(st, i) ((OPENSSL_STRING)sk_value(CHECKED_STACK_OF(OPENSSL_STRING, st), i)) -# define sk_OPENSSL_STRING_num(st) SKM_sk_num(OPENSSL_STRING, st) -# define sk_OPENSSL_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_FREE_FUNC(char, free_func)) -# define sk_OPENSSL_STRING_deep_copy(st, copy_func, free_func) ((STACK_OF(OPENSSL_STRING) *)sk_deep_copy(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_COPY_FUNC(char, copy_func), CHECKED_SK_FREE_FUNC(char, free_func))) -# define sk_OPENSSL_STRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val), i) -# define sk_OPENSSL_STRING_free(st) SKM_sk_free(OPENSSL_STRING, st) -# define sk_OPENSSL_STRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_STRING, st), i, CHECKED_PTR_OF(char, val)) -# define sk_OPENSSL_STRING_zero(st) SKM_sk_zero(OPENSSL_STRING, (st)) -# define sk_OPENSSL_STRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val)) -# define sk_OPENSSL_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_CONST_PTR_OF(char, val)) -# define sk_OPENSSL_STRING_delete(st, i) SKM_sk_delete(OPENSSL_STRING, (st), (i)) -# define sk_OPENSSL_STRING_delete_ptr(st, ptr) (OPENSSL_STRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, ptr)) -# define sk_OPENSSL_STRING_set_cmp_func(st, cmp) \ - ((int (*)(const char * const *,const char * const *)) \ - sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_CMP_FUNC(char, cmp))) -# define sk_OPENSSL_STRING_dup(st) SKM_sk_dup(OPENSSL_STRING, st) -# define sk_OPENSSL_STRING_shift(st) SKM_sk_shift(OPENSSL_STRING, (st)) -# define sk_OPENSSL_STRING_pop(st) (char *)sk_pop(CHECKED_STACK_OF(OPENSSL_STRING, st)) -# define sk_OPENSSL_STRING_sort(st) SKM_sk_sort(OPENSSL_STRING, (st)) -# define sk_OPENSSL_STRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_STRING, (st)) -# define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp))) -# define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)sk_new_null()) -# define sk_OPENSSL_BLOCK_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val)) -# define sk_OPENSSL_BLOCK_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val)) -# define sk_OPENSSL_BLOCK_value(st, i) ((OPENSSL_BLOCK)sk_value(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i)) -# define sk_OPENSSL_BLOCK_num(st) SKM_sk_num(OPENSSL_BLOCK, st) -# define sk_OPENSSL_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_FREE_FUNC(void, free_func)) -# define sk_OPENSSL_BLOCK_deep_copy(st, copy_func, free_func) ((STACK_OF(OPENSSL_BLOCK) *)sk_deep_copy(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_COPY_FUNC(void, copy_func), CHECKED_SK_FREE_FUNC(void, free_func))) -# define sk_OPENSSL_BLOCK_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val), i) -# define sk_OPENSSL_BLOCK_free(st) SKM_sk_free(OPENSSL_BLOCK, st) -# define sk_OPENSSL_BLOCK_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i, CHECKED_PTR_OF(void, val)) -# define sk_OPENSSL_BLOCK_zero(st) SKM_sk_zero(OPENSSL_BLOCK, (st)) -# define sk_OPENSSL_BLOCK_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val)) -# define sk_OPENSSL_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_CONST_PTR_OF(void, val)) -# define sk_OPENSSL_BLOCK_delete(st, i) SKM_sk_delete(OPENSSL_BLOCK, (st), (i)) -# define sk_OPENSSL_BLOCK_delete_ptr(st, ptr) (OPENSSL_BLOCK *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, ptr)) -# define sk_OPENSSL_BLOCK_set_cmp_func(st, cmp) \ - ((int (*)(const void * const *,const void * const *)) \ - sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_CMP_FUNC(void, cmp))) -# define sk_OPENSSL_BLOCK_dup(st) SKM_sk_dup(OPENSSL_BLOCK, st) -# define sk_OPENSSL_BLOCK_shift(st) SKM_sk_shift(OPENSSL_BLOCK, (st)) -# define sk_OPENSSL_BLOCK_pop(st) (void *)sk_pop(CHECKED_STACK_OF(OPENSSL_BLOCK, st)) -# define sk_OPENSSL_BLOCK_sort(st) SKM_sk_sort(OPENSSL_BLOCK, (st)) -# define sk_OPENSSL_BLOCK_is_sorted(st) SKM_sk_is_sorted(OPENSSL_BLOCK, (st)) -# define sk_OPENSSL_PSTRING_new(cmp) ((STACK_OF(OPENSSL_PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp))) -# define sk_OPENSSL_PSTRING_new_null() ((STACK_OF(OPENSSL_PSTRING) *)sk_new_null()) -# define sk_OPENSSL_PSTRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val)) -# define sk_OPENSSL_PSTRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val)) -# define sk_OPENSSL_PSTRING_value(st, i) ((OPENSSL_PSTRING)sk_value(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i)) -# define sk_OPENSSL_PSTRING_num(st) SKM_sk_num(OPENSSL_PSTRING, st) -# define sk_OPENSSL_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_FREE_FUNC(OPENSSL_STRING, free_func)) -# define sk_OPENSSL_PSTRING_deep_copy(st, copy_func, free_func) ((STACK_OF(OPENSSL_PSTRING) *)sk_deep_copy(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_COPY_FUNC(OPENSSL_STRING, copy_func), CHECKED_SK_FREE_FUNC(OPENSSL_STRING, free_func))) -# define sk_OPENSSL_PSTRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val), i) -# define sk_OPENSSL_PSTRING_free(st) SKM_sk_free(OPENSSL_PSTRING, st) -# define sk_OPENSSL_PSTRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i, CHECKED_PTR_OF(OPENSSL_STRING, val)) -# define sk_OPENSSL_PSTRING_zero(st) SKM_sk_zero(OPENSSL_PSTRING, (st)) -# define sk_OPENSSL_PSTRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val)) -# define sk_OPENSSL_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_CONST_PTR_OF(OPENSSL_STRING, val)) -# define sk_OPENSSL_PSTRING_delete(st, i) SKM_sk_delete(OPENSSL_PSTRING, (st), (i)) -# define sk_OPENSSL_PSTRING_delete_ptr(st, ptr) (OPENSSL_PSTRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, ptr)) -# define sk_OPENSSL_PSTRING_set_cmp_func(st, cmp) \ - ((int (*)(const OPENSSL_STRING * const *,const OPENSSL_STRING * const *)) \ - sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp))) -# define sk_OPENSSL_PSTRING_dup(st) SKM_sk_dup(OPENSSL_PSTRING, st) -# define sk_OPENSSL_PSTRING_shift(st) SKM_sk_shift(OPENSSL_PSTRING, (st)) -# define sk_OPENSSL_PSTRING_pop(st) (OPENSSL_STRING *)sk_pop(CHECKED_STACK_OF(OPENSSL_PSTRING, st)) -# define sk_OPENSSL_PSTRING_sort(st) SKM_sk_sort(OPENSSL_PSTRING, (st)) -# define sk_OPENSSL_PSTRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_PSTRING, (st)) -# define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_ASN1_UTF8STRING(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ASN1_UTF8STRING, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_ASN1_UTF8STRING(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ASN1_UTF8STRING, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_ESS_CERT_ID(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(ESS_CERT_ID, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_ESS_CERT_ID(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(ESS_CERT_ID, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_EVP_MD(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(EVP_MD, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_EVP_MD(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(EVP_MD, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_OCSP_ONEREQ(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(OCSP_ONEREQ, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_OCSP_ONEREQ(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(OCSP_ONEREQ, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_OCSP_SINGLERESP(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(OCSP_SINGLERESP, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_OCSP_SINGLERESP(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(OCSP_SINGLERESP, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func)) -# define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ - SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) -# define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ - SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) -# define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \ - SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len)) -# define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \ - SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func)) -# define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ - SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) -# define PKCS12_decrypt_d2i_PKCS7(algor, d2i_func, free_func, pass, passlen, oct, seq) \ - SKM_PKCS12_decrypt_d2i(PKCS7, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) -# define lh_ADDED_OBJ_new() LHM_lh_new(ADDED_OBJ,added_obj) -# define lh_ADDED_OBJ_insert(lh,inst) LHM_lh_insert(ADDED_OBJ,lh,inst) -# define lh_ADDED_OBJ_retrieve(lh,inst) LHM_lh_retrieve(ADDED_OBJ,lh,inst) -# define lh_ADDED_OBJ_delete(lh,inst) LHM_lh_delete(ADDED_OBJ,lh,inst) -# define lh_ADDED_OBJ_doall(lh,fn) LHM_lh_doall(ADDED_OBJ,lh,fn) -# define lh_ADDED_OBJ_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(ADDED_OBJ,lh,fn,arg_type,arg) -# define lh_ADDED_OBJ_error(lh) LHM_lh_error(ADDED_OBJ,lh) -# define lh_ADDED_OBJ_num_items(lh) LHM_lh_num_items(ADDED_OBJ,lh) -# define lh_ADDED_OBJ_down_load(lh) LHM_lh_down_load(ADDED_OBJ,lh) -# define lh_ADDED_OBJ_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(ADDED_OBJ,lh,out) -# define lh_ADDED_OBJ_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(ADDED_OBJ,lh,out) -# define lh_ADDED_OBJ_stats_bio(lh,out) \ - LHM_lh_stats_bio(ADDED_OBJ,lh,out) -# define lh_ADDED_OBJ_free(lh) LHM_lh_free(ADDED_OBJ,lh) -# define lh_APP_INFO_new() LHM_lh_new(APP_INFO,app_info) -# define lh_APP_INFO_insert(lh,inst) LHM_lh_insert(APP_INFO,lh,inst) -# define lh_APP_INFO_retrieve(lh,inst) LHM_lh_retrieve(APP_INFO,lh,inst) -# define lh_APP_INFO_delete(lh,inst) LHM_lh_delete(APP_INFO,lh,inst) -# define lh_APP_INFO_doall(lh,fn) LHM_lh_doall(APP_INFO,lh,fn) -# define lh_APP_INFO_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(APP_INFO,lh,fn,arg_type,arg) -# define lh_APP_INFO_error(lh) LHM_lh_error(APP_INFO,lh) -# define lh_APP_INFO_num_items(lh) LHM_lh_num_items(APP_INFO,lh) -# define lh_APP_INFO_down_load(lh) LHM_lh_down_load(APP_INFO,lh) -# define lh_APP_INFO_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(APP_INFO,lh,out) -# define lh_APP_INFO_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(APP_INFO,lh,out) -# define lh_APP_INFO_stats_bio(lh,out) \ - LHM_lh_stats_bio(APP_INFO,lh,out) -# define lh_APP_INFO_free(lh) LHM_lh_free(APP_INFO,lh) -# define lh_CONF_VALUE_new() LHM_lh_new(CONF_VALUE,conf_value) -# define lh_CONF_VALUE_insert(lh,inst) LHM_lh_insert(CONF_VALUE,lh,inst) -# define lh_CONF_VALUE_retrieve(lh,inst) LHM_lh_retrieve(CONF_VALUE,lh,inst) -# define lh_CONF_VALUE_delete(lh,inst) LHM_lh_delete(CONF_VALUE,lh,inst) -# define lh_CONF_VALUE_doall(lh,fn) LHM_lh_doall(CONF_VALUE,lh,fn) -# define lh_CONF_VALUE_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(CONF_VALUE,lh,fn,arg_type,arg) -# define lh_CONF_VALUE_error(lh) LHM_lh_error(CONF_VALUE,lh) -# define lh_CONF_VALUE_num_items(lh) LHM_lh_num_items(CONF_VALUE,lh) -# define lh_CONF_VALUE_down_load(lh) LHM_lh_down_load(CONF_VALUE,lh) -# define lh_CONF_VALUE_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(CONF_VALUE,lh,out) -# define lh_CONF_VALUE_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(CONF_VALUE,lh,out) -# define lh_CONF_VALUE_stats_bio(lh,out) \ - LHM_lh_stats_bio(CONF_VALUE,lh,out) -# define lh_CONF_VALUE_free(lh) LHM_lh_free(CONF_VALUE,lh) -# define lh_ENGINE_PILE_new() LHM_lh_new(ENGINE_PILE,engine_pile) -# define lh_ENGINE_PILE_insert(lh,inst) LHM_lh_insert(ENGINE_PILE,lh,inst) -# define lh_ENGINE_PILE_retrieve(lh,inst) LHM_lh_retrieve(ENGINE_PILE,lh,inst) -# define lh_ENGINE_PILE_delete(lh,inst) LHM_lh_delete(ENGINE_PILE,lh,inst) -# define lh_ENGINE_PILE_doall(lh,fn) LHM_lh_doall(ENGINE_PILE,lh,fn) -# define lh_ENGINE_PILE_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(ENGINE_PILE,lh,fn,arg_type,arg) -# define lh_ENGINE_PILE_error(lh) LHM_lh_error(ENGINE_PILE,lh) -# define lh_ENGINE_PILE_num_items(lh) LHM_lh_num_items(ENGINE_PILE,lh) -# define lh_ENGINE_PILE_down_load(lh) LHM_lh_down_load(ENGINE_PILE,lh) -# define lh_ENGINE_PILE_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(ENGINE_PILE,lh,out) -# define lh_ENGINE_PILE_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(ENGINE_PILE,lh,out) -# define lh_ENGINE_PILE_stats_bio(lh,out) \ - LHM_lh_stats_bio(ENGINE_PILE,lh,out) -# define lh_ENGINE_PILE_free(lh) LHM_lh_free(ENGINE_PILE,lh) -# define lh_ERR_STATE_new() LHM_lh_new(ERR_STATE,err_state) -# define lh_ERR_STATE_insert(lh,inst) LHM_lh_insert(ERR_STATE,lh,inst) -# define lh_ERR_STATE_retrieve(lh,inst) LHM_lh_retrieve(ERR_STATE,lh,inst) -# define lh_ERR_STATE_delete(lh,inst) LHM_lh_delete(ERR_STATE,lh,inst) -# define lh_ERR_STATE_doall(lh,fn) LHM_lh_doall(ERR_STATE,lh,fn) -# define lh_ERR_STATE_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(ERR_STATE,lh,fn,arg_type,arg) -# define lh_ERR_STATE_error(lh) LHM_lh_error(ERR_STATE,lh) -# define lh_ERR_STATE_num_items(lh) LHM_lh_num_items(ERR_STATE,lh) -# define lh_ERR_STATE_down_load(lh) LHM_lh_down_load(ERR_STATE,lh) -# define lh_ERR_STATE_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(ERR_STATE,lh,out) -# define lh_ERR_STATE_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(ERR_STATE,lh,out) -# define lh_ERR_STATE_stats_bio(lh,out) \ - LHM_lh_stats_bio(ERR_STATE,lh,out) -# define lh_ERR_STATE_free(lh) LHM_lh_free(ERR_STATE,lh) -# define lh_ERR_STRING_DATA_new() LHM_lh_new(ERR_STRING_DATA,err_string_data) -# define lh_ERR_STRING_DATA_insert(lh,inst) LHM_lh_insert(ERR_STRING_DATA,lh,inst) -# define lh_ERR_STRING_DATA_retrieve(lh,inst) LHM_lh_retrieve(ERR_STRING_DATA,lh,inst) -# define lh_ERR_STRING_DATA_delete(lh,inst) LHM_lh_delete(ERR_STRING_DATA,lh,inst) -# define lh_ERR_STRING_DATA_doall(lh,fn) LHM_lh_doall(ERR_STRING_DATA,lh,fn) -# define lh_ERR_STRING_DATA_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(ERR_STRING_DATA,lh,fn,arg_type,arg) -# define lh_ERR_STRING_DATA_error(lh) LHM_lh_error(ERR_STRING_DATA,lh) -# define lh_ERR_STRING_DATA_num_items(lh) LHM_lh_num_items(ERR_STRING_DATA,lh) -# define lh_ERR_STRING_DATA_down_load(lh) LHM_lh_down_load(ERR_STRING_DATA,lh) -# define lh_ERR_STRING_DATA_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(ERR_STRING_DATA,lh,out) -# define lh_ERR_STRING_DATA_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(ERR_STRING_DATA,lh,out) -# define lh_ERR_STRING_DATA_stats_bio(lh,out) \ - LHM_lh_stats_bio(ERR_STRING_DATA,lh,out) -# define lh_ERR_STRING_DATA_free(lh) LHM_lh_free(ERR_STRING_DATA,lh) -# define lh_EX_CLASS_ITEM_new() LHM_lh_new(EX_CLASS_ITEM,ex_class_item) -# define lh_EX_CLASS_ITEM_insert(lh,inst) LHM_lh_insert(EX_CLASS_ITEM,lh,inst) -# define lh_EX_CLASS_ITEM_retrieve(lh,inst) LHM_lh_retrieve(EX_CLASS_ITEM,lh,inst) -# define lh_EX_CLASS_ITEM_delete(lh,inst) LHM_lh_delete(EX_CLASS_ITEM,lh,inst) -# define lh_EX_CLASS_ITEM_doall(lh,fn) LHM_lh_doall(EX_CLASS_ITEM,lh,fn) -# define lh_EX_CLASS_ITEM_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(EX_CLASS_ITEM,lh,fn,arg_type,arg) -# define lh_EX_CLASS_ITEM_error(lh) LHM_lh_error(EX_CLASS_ITEM,lh) -# define lh_EX_CLASS_ITEM_num_items(lh) LHM_lh_num_items(EX_CLASS_ITEM,lh) -# define lh_EX_CLASS_ITEM_down_load(lh) LHM_lh_down_load(EX_CLASS_ITEM,lh) -# define lh_EX_CLASS_ITEM_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(EX_CLASS_ITEM,lh,out) -# define lh_EX_CLASS_ITEM_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(EX_CLASS_ITEM,lh,out) -# define lh_EX_CLASS_ITEM_stats_bio(lh,out) \ - LHM_lh_stats_bio(EX_CLASS_ITEM,lh,out) -# define lh_EX_CLASS_ITEM_free(lh) LHM_lh_free(EX_CLASS_ITEM,lh) -# define lh_FUNCTION_new() LHM_lh_new(FUNCTION,function) -# define lh_FUNCTION_insert(lh,inst) LHM_lh_insert(FUNCTION,lh,inst) -# define lh_FUNCTION_retrieve(lh,inst) LHM_lh_retrieve(FUNCTION,lh,inst) -# define lh_FUNCTION_delete(lh,inst) LHM_lh_delete(FUNCTION,lh,inst) -# define lh_FUNCTION_doall(lh,fn) LHM_lh_doall(FUNCTION,lh,fn) -# define lh_FUNCTION_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(FUNCTION,lh,fn,arg_type,arg) -# define lh_FUNCTION_error(lh) LHM_lh_error(FUNCTION,lh) -# define lh_FUNCTION_num_items(lh) LHM_lh_num_items(FUNCTION,lh) -# define lh_FUNCTION_down_load(lh) LHM_lh_down_load(FUNCTION,lh) -# define lh_FUNCTION_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(FUNCTION,lh,out) -# define lh_FUNCTION_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(FUNCTION,lh,out) -# define lh_FUNCTION_stats_bio(lh,out) \ - LHM_lh_stats_bio(FUNCTION,lh,out) -# define lh_FUNCTION_free(lh) LHM_lh_free(FUNCTION,lh) -# define lh_MEM_new() LHM_lh_new(MEM,mem) -# define lh_MEM_insert(lh,inst) LHM_lh_insert(MEM,lh,inst) -# define lh_MEM_retrieve(lh,inst) LHM_lh_retrieve(MEM,lh,inst) -# define lh_MEM_delete(lh,inst) LHM_lh_delete(MEM,lh,inst) -# define lh_MEM_doall(lh,fn) LHM_lh_doall(MEM,lh,fn) -# define lh_MEM_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(MEM,lh,fn,arg_type,arg) -# define lh_MEM_error(lh) LHM_lh_error(MEM,lh) -# define lh_MEM_num_items(lh) LHM_lh_num_items(MEM,lh) -# define lh_MEM_down_load(lh) LHM_lh_down_load(MEM,lh) -# define lh_MEM_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(MEM,lh,out) -# define lh_MEM_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(MEM,lh,out) -# define lh_MEM_stats_bio(lh,out) \ - LHM_lh_stats_bio(MEM,lh,out) -# define lh_MEM_free(lh) LHM_lh_free(MEM,lh) -# define lh_OBJ_NAME_new() LHM_lh_new(OBJ_NAME,obj_name) -# define lh_OBJ_NAME_insert(lh,inst) LHM_lh_insert(OBJ_NAME,lh,inst) -# define lh_OBJ_NAME_retrieve(lh,inst) LHM_lh_retrieve(OBJ_NAME,lh,inst) -# define lh_OBJ_NAME_delete(lh,inst) LHM_lh_delete(OBJ_NAME,lh,inst) -# define lh_OBJ_NAME_doall(lh,fn) LHM_lh_doall(OBJ_NAME,lh,fn) -# define lh_OBJ_NAME_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(OBJ_NAME,lh,fn,arg_type,arg) -# define lh_OBJ_NAME_error(lh) LHM_lh_error(OBJ_NAME,lh) -# define lh_OBJ_NAME_num_items(lh) LHM_lh_num_items(OBJ_NAME,lh) -# define lh_OBJ_NAME_down_load(lh) LHM_lh_down_load(OBJ_NAME,lh) -# define lh_OBJ_NAME_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(OBJ_NAME,lh,out) -# define lh_OBJ_NAME_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(OBJ_NAME,lh,out) -# define lh_OBJ_NAME_stats_bio(lh,out) \ - LHM_lh_stats_bio(OBJ_NAME,lh,out) -# define lh_OBJ_NAME_free(lh) LHM_lh_free(OBJ_NAME,lh) -# define lh_OPENSSL_CSTRING_new() LHM_lh_new(OPENSSL_CSTRING,openssl_cstring) -# define lh_OPENSSL_CSTRING_insert(lh,inst) LHM_lh_insert(OPENSSL_CSTRING,lh,inst) -# define lh_OPENSSL_CSTRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_CSTRING,lh,inst) -# define lh_OPENSSL_CSTRING_delete(lh,inst) LHM_lh_delete(OPENSSL_CSTRING,lh,inst) -# define lh_OPENSSL_CSTRING_doall(lh,fn) LHM_lh_doall(OPENSSL_CSTRING,lh,fn) -# define lh_OPENSSL_CSTRING_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(OPENSSL_CSTRING,lh,fn,arg_type,arg) -# define lh_OPENSSL_CSTRING_error(lh) LHM_lh_error(OPENSSL_CSTRING,lh) -# define lh_OPENSSL_CSTRING_num_items(lh) LHM_lh_num_items(OPENSSL_CSTRING,lh) -# define lh_OPENSSL_CSTRING_down_load(lh) LHM_lh_down_load(OPENSSL_CSTRING,lh) -# define lh_OPENSSL_CSTRING_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(OPENSSL_CSTRING,lh,out) -# define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(OPENSSL_CSTRING,lh,out) -# define lh_OPENSSL_CSTRING_stats_bio(lh,out) \ - LHM_lh_stats_bio(OPENSSL_CSTRING,lh,out) -# define lh_OPENSSL_CSTRING_free(lh) LHM_lh_free(OPENSSL_CSTRING,lh) -# define lh_OPENSSL_STRING_new() LHM_lh_new(OPENSSL_STRING,openssl_string) -# define lh_OPENSSL_STRING_insert(lh,inst) LHM_lh_insert(OPENSSL_STRING,lh,inst) -# define lh_OPENSSL_STRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_STRING,lh,inst) -# define lh_OPENSSL_STRING_delete(lh,inst) LHM_lh_delete(OPENSSL_STRING,lh,inst) -# define lh_OPENSSL_STRING_doall(lh,fn) LHM_lh_doall(OPENSSL_STRING,lh,fn) -# define lh_OPENSSL_STRING_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(OPENSSL_STRING,lh,fn,arg_type,arg) -# define lh_OPENSSL_STRING_error(lh) LHM_lh_error(OPENSSL_STRING,lh) -# define lh_OPENSSL_STRING_num_items(lh) LHM_lh_num_items(OPENSSL_STRING,lh) -# define lh_OPENSSL_STRING_down_load(lh) LHM_lh_down_load(OPENSSL_STRING,lh) -# define lh_OPENSSL_STRING_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(OPENSSL_STRING,lh,out) -# define lh_OPENSSL_STRING_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(OPENSSL_STRING,lh,out) -# define lh_OPENSSL_STRING_stats_bio(lh,out) \ - LHM_lh_stats_bio(OPENSSL_STRING,lh,out) -# define lh_OPENSSL_STRING_free(lh) LHM_lh_free(OPENSSL_STRING,lh) -# define lh_SSL_SESSION_new() LHM_lh_new(SSL_SESSION,ssl_session) -# define lh_SSL_SESSION_insert(lh,inst) LHM_lh_insert(SSL_SESSION,lh,inst) -# define lh_SSL_SESSION_retrieve(lh,inst) LHM_lh_retrieve(SSL_SESSION,lh,inst) -# define lh_SSL_SESSION_delete(lh,inst) LHM_lh_delete(SSL_SESSION,lh,inst) -# define lh_SSL_SESSION_doall(lh,fn) LHM_lh_doall(SSL_SESSION,lh,fn) -# define lh_SSL_SESSION_doall_arg(lh,fn,arg_type,arg) \ - LHM_lh_doall_arg(SSL_SESSION,lh,fn,arg_type,arg) -# define lh_SSL_SESSION_error(lh) LHM_lh_error(SSL_SESSION,lh) -# define lh_SSL_SESSION_num_items(lh) LHM_lh_num_items(SSL_SESSION,lh) -# define lh_SSL_SESSION_down_load(lh) LHM_lh_down_load(SSL_SESSION,lh) -# define lh_SSL_SESSION_node_stats_bio(lh,out) \ - LHM_lh_node_stats_bio(SSL_SESSION,lh,out) -# define lh_SSL_SESSION_node_usage_stats_bio(lh,out) \ - LHM_lh_node_usage_stats_bio(SSL_SESSION,lh,out) -# define lh_SSL_SESSION_stats_bio(lh,out) \ - LHM_lh_stats_bio(SSL_SESSION,lh,out) -# define lh_SSL_SESSION_free(lh) LHM_lh_free(SSL_SESSION,lh) -#ifdef __cplusplus -} -#endif -#endif /* !defined HEADER_SAFESTACK_H */ +/* + * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SAFESTACK_H +# define HEADER_SAFESTACK_H + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +# define STACK_OF(type) struct stack_st_##type + +# define SKM_DEFINE_STACK_OF(t1, t2, t3) \ + STACK_OF(t1); \ + typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \ + typedef void (*sk_##t1##_freefunc)(t3 *a); \ + typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \ + static ossl_unused ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \ + { \ + return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \ + { \ + return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \ + } \ + static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new(sk_##t1##_compfunc compare) \ + { \ + return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \ + } \ + static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_null(void) \ + { \ + return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \ + } \ + static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \ + { \ + return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \ + { \ + return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \ + } \ + static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \ + { \ + OPENSSL_sk_free((OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline void sk_##t1##_zero(STACK_OF(t1) *sk) \ + { \ + OPENSSL_sk_zero((OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \ + { \ + return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \ + } \ + static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \ + { \ + return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \ + (const void *)ptr); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \ + { \ + return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \ + { \ + return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); \ + } \ + static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \ + { \ + return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \ + { \ + return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \ + { \ + OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \ + { \ + return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); \ + } \ + static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \ + { \ + return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \ + { \ + return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \ + { \ + return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \ + } \ + static ossl_unused ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \ + { \ + OPENSSL_sk_sort((OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline int sk_##t1##_is_sorted(const STACK_OF(t1) *sk) \ + { \ + return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline STACK_OF(t1) * sk_##t1##_dup(const STACK_OF(t1) *sk) \ + { \ + return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \ + } \ + static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_deep_copy(const STACK_OF(t1) *sk, \ + sk_##t1##_copyfunc copyfunc, \ + sk_##t1##_freefunc freefunc) \ + { \ + return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \ + (OPENSSL_sk_copyfunc)copyfunc, \ + (OPENSSL_sk_freefunc)freefunc); \ + } \ + static ossl_unused ossl_inline sk_##t1##_compfunc sk_##t1##_set_cmp_func(STACK_OF(t1) *sk, sk_##t1##_compfunc compare) \ + { \ + return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \ + } + +# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2) +# define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t) +# define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \ + SKM_DEFINE_STACK_OF(t1, const t2, t2) +# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t) + +/*- + * Strings are special: normally an lhash entry will point to a single + * (somewhat) mutable object. In the case of strings: + * + * a) Instead of a single char, there is an array of chars, NUL-terminated. + * b) The string may have be immutable. + * + * So, they need their own declarations. Especially important for + * type-checking tools, such as Deputy. + * + * In practice, however, it appears to be hard to have a const + * string. For now, I'm settling for dealing with the fact it is a + * string at all. + */ +typedef char *OPENSSL_STRING; +typedef const char *OPENSSL_CSTRING; + +/*- + * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but + * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned + * above, instead of a single char each entry is a NUL-terminated array of + * chars. So, we have to implement STRING specially for STACK_OF. This is + * dealt with in the autogenerated macros below. + */ +DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char) +DEFINE_SPECIAL_STACK_OF_CONST(OPENSSL_CSTRING, char) + +/* + * Similarly, we sometimes use a block of characters, NOT nul-terminated. + * These should also be distinguished from "normal" stacks. + */ +typedef void *OPENSSL_BLOCK; +DEFINE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) + +/* + * If called without higher optimization (min. -xO3) the Oracle Developer + * Studio compiler generates code for the defined (static inline) functions + * above. + * This would later lead to the linker complaining about missing symbols when + * this header file is included but the resulting object is not linked against + * the Crypto library (openssl#6912). + */ +# ifdef __SUNPRO_C +# pragma weak OPENSSL_sk_num +# pragma weak OPENSSL_sk_value +# pragma weak OPENSSL_sk_new +# pragma weak OPENSSL_sk_new_null +# pragma weak OPENSSL_sk_new_reserve +# pragma weak OPENSSL_sk_reserve +# pragma weak OPENSSL_sk_free +# pragma weak OPENSSL_sk_zero +# pragma weak OPENSSL_sk_delete +# pragma weak OPENSSL_sk_delete_ptr +# pragma weak OPENSSL_sk_push +# pragma weak OPENSSL_sk_unshift +# pragma weak OPENSSL_sk_pop +# pragma weak OPENSSL_sk_shift +# pragma weak OPENSSL_sk_pop_free +# pragma weak OPENSSL_sk_insert +# pragma weak OPENSSL_sk_set +# pragma weak OPENSSL_sk_find +# pragma weak OPENSSL_sk_find_ex +# pragma weak OPENSSL_sk_sort +# pragma weak OPENSSL_sk_is_sorted +# pragma weak OPENSSL_sk_dup +# pragma weak OPENSSL_sk_deep_copy +# pragma weak OPENSSL_sk_set_cmp_func +# endif /* __SUNPRO_C */ + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/seed.h b/src/Mayaqua/win32_inc/openssl/seed.h index 11fd1819..de10b085 100644 --- a/src/Mayaqua/win32_inc/openssl/seed.h +++ b/src/Mayaqua/win32_inc/openssl/seed.h @@ -1,149 +1,96 @@ -/* - * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Neither the name of author nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -/* ==================================================================== - * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_SEED_H -# define HEADER_SEED_H - -# include -# include -# include - -# ifdef OPENSSL_NO_SEED -# error SEED is disabled. -# endif - -/* look whether we need 'long' to get 32 bits */ -# ifdef AES_LONG -# ifndef SEED_LONG -# define SEED_LONG 1 -# endif -# endif - -# if !defined(NO_SYS_TYPES_H) -# include -# endif - -# define SEED_BLOCK_SIZE 16 -# define SEED_KEY_LENGTH 16 - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct seed_key_st { -# ifdef SEED_LONG - unsigned long data[32]; -# else - unsigned int data[32]; -# endif -} SEED_KEY_SCHEDULE; - -# ifdef OPENSSL_FIPS -void private_SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], - SEED_KEY_SCHEDULE *ks); -# endif -void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], - SEED_KEY_SCHEDULE *ks); - -void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], - unsigned char d[SEED_BLOCK_SIZE], - const SEED_KEY_SCHEDULE *ks); -void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], - unsigned char d[SEED_BLOCK_SIZE], - const SEED_KEY_SCHEDULE *ks); - -void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, - const SEED_KEY_SCHEDULE *ks, int enc); -void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, - const SEED_KEY_SCHEDULE *ks, - unsigned char ivec[SEED_BLOCK_SIZE], int enc); -void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const SEED_KEY_SCHEDULE *ks, - unsigned char ivec[SEED_BLOCK_SIZE], int *num, - int enc); -void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, - size_t len, const SEED_KEY_SCHEDULE *ks, - unsigned char ivec[SEED_BLOCK_SIZE], int *num); - -#ifdef __cplusplus -} -#endif - -#endif /* HEADER_SEED_H */ +/* + * Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* + * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Neither the name of author nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef HEADER_SEED_H +# define HEADER_SEED_H + +# include + +# ifndef OPENSSL_NO_SEED +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* look whether we need 'long' to get 32 bits */ +# ifdef AES_LONG +# ifndef SEED_LONG +# define SEED_LONG 1 +# endif +# endif + +# include + +# define SEED_BLOCK_SIZE 16 +# define SEED_KEY_LENGTH 16 + +typedef struct seed_key_st { +# ifdef SEED_LONG + unsigned long data[32]; +# else + unsigned int data[32]; +# endif +} SEED_KEY_SCHEDULE; + +void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], + SEED_KEY_SCHEDULE *ks); + +void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], + unsigned char d[SEED_BLOCK_SIZE], + const SEED_KEY_SCHEDULE *ks); +void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], + unsigned char d[SEED_BLOCK_SIZE], + const SEED_KEY_SCHEDULE *ks); + +void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, + const SEED_KEY_SCHEDULE *ks, int enc); +void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, + const SEED_KEY_SCHEDULE *ks, + unsigned char ivec[SEED_BLOCK_SIZE], int enc); +void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const SEED_KEY_SCHEDULE *ks, + unsigned char ivec[SEED_BLOCK_SIZE], int *num, + int enc); +void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, + size_t len, const SEED_KEY_SCHEDULE *ks, + unsigned char ivec[SEED_BLOCK_SIZE], int *num); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/sha.h b/src/Mayaqua/win32_inc/openssl/sha.h index a2d15663..6a1eb0de 100644 --- a/src/Mayaqua/win32_inc/openssl/sha.h +++ b/src/Mayaqua/win32_inc/openssl/sha.h @@ -1,214 +1,119 @@ -/* crypto/sha/sha.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_SHA_H -# define HEADER_SHA_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1)) -# error SHA is disabled. -# endif - -# if defined(OPENSSL_FIPS) -# define FIPS_SHA_SIZE_T size_t -# endif - -/*- - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then ! - * ! SHA_LONG_LOG2 has to be defined along. ! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - -# if defined(__LP32__) -# define SHA_LONG unsigned long -# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) -# define SHA_LONG unsigned long -# define SHA_LONG_LOG2 3 -# else -# define SHA_LONG unsigned int -# endif - -# define SHA_LBLOCK 16 -# define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a - * contiguous array of 32 bit wide - * big-endian values. */ -# define SHA_LAST_BLOCK (SHA_CBLOCK-8) -# define SHA_DIGEST_LENGTH 20 - -typedef struct SHAstate_st { - SHA_LONG h0, h1, h2, h3, h4; - SHA_LONG Nl, Nh; - SHA_LONG data[SHA_LBLOCK]; - unsigned int num; -} SHA_CTX; - -# ifndef OPENSSL_NO_SHA0 -# ifdef OPENSSL_FIPS -int private_SHA_Init(SHA_CTX *c); -# endif -int SHA_Init(SHA_CTX *c); -int SHA_Update(SHA_CTX *c, const void *data, size_t len); -int SHA_Final(unsigned char *md, SHA_CTX *c); -unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md); -void SHA_Transform(SHA_CTX *c, const unsigned char *data); -# endif -# ifndef OPENSSL_NO_SHA1 -# ifdef OPENSSL_FIPS -int private_SHA1_Init(SHA_CTX *c); -# endif -int SHA1_Init(SHA_CTX *c); -int SHA1_Update(SHA_CTX *c, const void *data, size_t len); -int SHA1_Final(unsigned char *md, SHA_CTX *c); -unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); -void SHA1_Transform(SHA_CTX *c, const unsigned char *data); -# endif - -# define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a - * contiguous array of 32 bit wide - * big-endian values. */ -# define SHA224_DIGEST_LENGTH 28 -# define SHA256_DIGEST_LENGTH 32 - -typedef struct SHA256state_st { - SHA_LONG h[8]; - SHA_LONG Nl, Nh; - SHA_LONG data[SHA_LBLOCK]; - unsigned int num, md_len; -} SHA256_CTX; - -# ifndef OPENSSL_NO_SHA256 -# ifdef OPENSSL_FIPS -int private_SHA224_Init(SHA256_CTX *c); -int private_SHA256_Init(SHA256_CTX *c); -# endif -int SHA224_Init(SHA256_CTX *c); -int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); -int SHA224_Final(unsigned char *md, SHA256_CTX *c); -unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); -int SHA256_Init(SHA256_CTX *c); -int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); -int SHA256_Final(unsigned char *md, SHA256_CTX *c); -unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); -void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); -# endif - -# define SHA384_DIGEST_LENGTH 48 -# define SHA512_DIGEST_LENGTH 64 - -# ifndef OPENSSL_NO_SHA512 -/* - * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 - * being exactly 64-bit wide. See Implementation Notes in sha512.c - * for further details. - */ -/* - * SHA-512 treats input data as a - * contiguous array of 64 bit - * wide big-endian values. - */ -# define SHA512_CBLOCK (SHA_LBLOCK*8) -# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) -# define SHA_LONG64 unsigned __int64 -# define U64(C) C##UI64 -# elif defined(__arch64__) -# define SHA_LONG64 unsigned long -# define U64(C) C##UL -# else -# define SHA_LONG64 unsigned long long -# define U64(C) C##ULL -# endif - -typedef struct SHA512state_st { - SHA_LONG64 h[8]; - SHA_LONG64 Nl, Nh; - union { - SHA_LONG64 d[SHA_LBLOCK]; - unsigned char p[SHA512_CBLOCK]; - } u; - unsigned int num, md_len; -} SHA512_CTX; -# endif - -# ifndef OPENSSL_NO_SHA512 -# ifdef OPENSSL_FIPS -int private_SHA384_Init(SHA512_CTX *c); -int private_SHA512_Init(SHA512_CTX *c); -# endif -int SHA384_Init(SHA512_CTX *c); -int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); -int SHA384_Final(unsigned char *md, SHA512_CTX *c); -unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); -int SHA512_Init(SHA512_CTX *c); -int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); -int SHA512_Final(unsigned char *md, SHA512_CTX *c); -unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); -void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); -# endif - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SHA_H +# define HEADER_SHA_H + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/*- + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * ! SHA_LONG has to be at least 32 bits wide. ! + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + */ +# define SHA_LONG unsigned int + +# define SHA_LBLOCK 16 +# define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a + * contiguous array of 32 bit wide + * big-endian values. */ +# define SHA_LAST_BLOCK (SHA_CBLOCK-8) +# define SHA_DIGEST_LENGTH 20 + +typedef struct SHAstate_st { + SHA_LONG h0, h1, h2, h3, h4; + SHA_LONG Nl, Nh; + SHA_LONG data[SHA_LBLOCK]; + unsigned int num; +} SHA_CTX; + +int SHA1_Init(SHA_CTX *c); +int SHA1_Update(SHA_CTX *c, const void *data, size_t len); +int SHA1_Final(unsigned char *md, SHA_CTX *c); +unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); +void SHA1_Transform(SHA_CTX *c, const unsigned char *data); + +# define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a + * contiguous array of 32 bit wide + * big-endian values. */ + +typedef struct SHA256state_st { + SHA_LONG h[8]; + SHA_LONG Nl, Nh; + SHA_LONG data[SHA_LBLOCK]; + unsigned int num, md_len; +} SHA256_CTX; + +int SHA224_Init(SHA256_CTX *c); +int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); +int SHA224_Final(unsigned char *md, SHA256_CTX *c); +unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); +int SHA256_Init(SHA256_CTX *c); +int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); +int SHA256_Final(unsigned char *md, SHA256_CTX *c); +unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); +void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); + +# define SHA224_DIGEST_LENGTH 28 +# define SHA256_DIGEST_LENGTH 32 +# define SHA384_DIGEST_LENGTH 48 +# define SHA512_DIGEST_LENGTH 64 + +/* + * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 + * being exactly 64-bit wide. See Implementation Notes in sha512.c + * for further details. + */ +/* + * SHA-512 treats input data as a + * contiguous array of 64 bit + * wide big-endian values. + */ +# define SHA512_CBLOCK (SHA_LBLOCK*8) +# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) +# define SHA_LONG64 unsigned __int64 +# define U64(C) C##UI64 +# elif defined(__arch64__) +# define SHA_LONG64 unsigned long +# define U64(C) C##UL +# else +# define SHA_LONG64 unsigned long long +# define U64(C) C##ULL +# endif + +typedef struct SHA512state_st { + SHA_LONG64 h[8]; + SHA_LONG64 Nl, Nh; + union { + SHA_LONG64 d[SHA_LBLOCK]; + unsigned char p[SHA512_CBLOCK]; + } u; + unsigned int num, md_len; +} SHA512_CTX; + +int SHA384_Init(SHA512_CTX *c); +int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); +int SHA384_Final(unsigned char *md, SHA512_CTX *c); +unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); +int SHA512_Init(SHA512_CTX *c); +int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); +int SHA512_Final(unsigned char *md, SHA512_CTX *c); +unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); +void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/srp.h b/src/Mayaqua/win32_inc/openssl/srp.h index 14c21cfe..aaf13558 100644 --- a/src/Mayaqua/win32_inc/openssl/srp.h +++ b/src/Mayaqua/win32_inc/openssl/srp.h @@ -1,179 +1,135 @@ -/* crypto/srp/srp.h */ -/* - * Written by Christophe Renou (christophe.renou@edelweb.fr) with the - * precious help of Peter Sylvester (peter.sylvester@edelweb.fr) for the - * EdelKey project and contributed to the OpenSSL project 2004. - */ -/* ==================================================================== - * Copyright (c) 2004 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef __SRP_H__ -# define __SRP_H__ - -# ifndef OPENSSL_NO_SRP - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# include -# include -# include - -typedef struct SRP_gN_cache_st { - char *b64_bn; - BIGNUM *bn; -} SRP_gN_cache; - - -DECLARE_STACK_OF(SRP_gN_cache) - -typedef struct SRP_user_pwd_st { - /* Owned by us. */ - char *id; - BIGNUM *s; - BIGNUM *v; - /* Not owned by us. */ - const BIGNUM *g; - const BIGNUM *N; - /* Owned by us. */ - char *info; -} SRP_user_pwd; - -DECLARE_STACK_OF(SRP_user_pwd) - -void SRP_user_pwd_free(SRP_user_pwd *user_pwd); - -typedef struct SRP_VBASE_st { - STACK_OF(SRP_user_pwd) *users_pwd; - STACK_OF(SRP_gN_cache) *gN_cache; -/* to simulate a user */ - char *seed_key; - BIGNUM *default_g; - BIGNUM *default_N; -} SRP_VBASE; - -/* - * Structure interne pour retenir les couples N et g - */ -typedef struct SRP_gN_st { - char *id; - BIGNUM *g; - BIGNUM *N; -} SRP_gN; - -DECLARE_STACK_OF(SRP_gN) - -SRP_VBASE *SRP_VBASE_new(char *seed_key); -int SRP_VBASE_free(SRP_VBASE *vb); -int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file); - -/* This method ignores the configured seed and fails for an unknown user. */ -SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username); -/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/ -SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username); - -char *SRP_create_verifier(const char *user, const char *pass, char **salt, - char **verifier, const char *N, const char *g); -int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, - BIGNUM **verifier, BIGNUM *N, BIGNUM *g); - -# define SRP_NO_ERROR 0 -# define SRP_ERR_VBASE_INCOMPLETE_FILE 1 -# define SRP_ERR_VBASE_BN_LIB 2 -# define SRP_ERR_OPEN_FILE 3 -# define SRP_ERR_MEMORY 4 - -# define DB_srptype 0 -# define DB_srpverifier 1 -# define DB_srpsalt 2 -# define DB_srpid 3 -# define DB_srpgN 4 -# define DB_srpinfo 5 -# undef DB_NUMBER -# define DB_NUMBER 6 - -# define DB_SRP_INDEX 'I' -# define DB_SRP_VALID 'V' -# define DB_SRP_REVOKED 'R' -# define DB_SRP_MODIF 'v' - -/* see srp.c */ -char *SRP_check_known_gN_param(BIGNUM *g, BIGNUM *N); -SRP_gN *SRP_get_default_gN(const char *id); - -/* server side .... */ -BIGNUM *SRP_Calc_server_key(BIGNUM *A, BIGNUM *v, BIGNUM *u, BIGNUM *b, - BIGNUM *N); -BIGNUM *SRP_Calc_B(BIGNUM *b, BIGNUM *N, BIGNUM *g, BIGNUM *v); -int SRP_Verify_A_mod_N(BIGNUM *A, BIGNUM *N); -BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N); - -/* client side .... */ -BIGNUM *SRP_Calc_x(BIGNUM *s, const char *user, const char *pass); -BIGNUM *SRP_Calc_A(BIGNUM *a, BIGNUM *N, BIGNUM *g); -BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x, - BIGNUM *a, BIGNUM *u); -int SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N); - -# define SRP_MINIMAL_N 1024 - -#ifdef __cplusplus -} -#endif - -# endif -#endif +/* + * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2004, EdelKey Project. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + * + * Originally written by Christophe Renou and Peter Sylvester, + * for the EdelKey project. + */ + +#ifndef HEADER_SRP_H +# define HEADER_SRP_H + +#include + +#ifndef OPENSSL_NO_SRP +# include +# include +# include +# include +# include + +# ifdef __cplusplus +extern "C" { +# endif + +typedef struct SRP_gN_cache_st { + char *b64_bn; + BIGNUM *bn; +} SRP_gN_cache; + + +DEFINE_STACK_OF(SRP_gN_cache) + +typedef struct SRP_user_pwd_st { + /* Owned by us. */ + char *id; + BIGNUM *s; + BIGNUM *v; + /* Not owned by us. */ + const BIGNUM *g; + const BIGNUM *N; + /* Owned by us. */ + char *info; +} SRP_user_pwd; + +void SRP_user_pwd_free(SRP_user_pwd *user_pwd); + +DEFINE_STACK_OF(SRP_user_pwd) + +typedef struct SRP_VBASE_st { + STACK_OF(SRP_user_pwd) *users_pwd; + STACK_OF(SRP_gN_cache) *gN_cache; +/* to simulate a user */ + char *seed_key; + const BIGNUM *default_g; + const BIGNUM *default_N; +} SRP_VBASE; + +/* + * Internal structure storing N and g pair + */ +typedef struct SRP_gN_st { + char *id; + const BIGNUM *g; + const BIGNUM *N; +} SRP_gN; + +DEFINE_STACK_OF(SRP_gN) + +SRP_VBASE *SRP_VBASE_new(char *seed_key); +void SRP_VBASE_free(SRP_VBASE *vb); +int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file); + +/* This method ignores the configured seed and fails for an unknown user. */ +DEPRECATEDIN_1_1_0(SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)) +/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/ +SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username); + +char *SRP_create_verifier(const char *user, const char *pass, char **salt, + char **verifier, const char *N, const char *g); +int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, + BIGNUM **verifier, const BIGNUM *N, + const BIGNUM *g); + +# define SRP_NO_ERROR 0 +# define SRP_ERR_VBASE_INCOMPLETE_FILE 1 +# define SRP_ERR_VBASE_BN_LIB 2 +# define SRP_ERR_OPEN_FILE 3 +# define SRP_ERR_MEMORY 4 + +# define DB_srptype 0 +# define DB_srpverifier 1 +# define DB_srpsalt 2 +# define DB_srpid 3 +# define DB_srpgN 4 +# define DB_srpinfo 5 +# undef DB_NUMBER +# define DB_NUMBER 6 + +# define DB_SRP_INDEX 'I' +# define DB_SRP_VALID 'V' +# define DB_SRP_REVOKED 'R' +# define DB_SRP_MODIF 'v' + +/* see srp.c */ +char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N); +SRP_gN *SRP_get_default_gN(const char *id); + +/* server side .... */ +BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u, + const BIGNUM *b, const BIGNUM *N); +BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, + const BIGNUM *v); +int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N); +BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N); + +/* client side .... */ +BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass); +BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g); +BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, + const BIGNUM *x, const BIGNUM *a, const BIGNUM *u); +int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N); + +# define SRP_MINIMAL_N 1024 + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/srtp.h b/src/Mayaqua/win32_inc/openssl/srtp.h index e0954a52..0b57c235 100644 --- a/src/Mayaqua/win32_inc/openssl/srtp.h +++ b/src/Mayaqua/win32_inc/openssl/srtp.h @@ -1,147 +1,50 @@ -/* ssl/srtp.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* - * DTLS code by Eric Rescorla - * - * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. - */ - -#ifndef HEADER_D1_SRTP_H -# define HEADER_D1_SRTP_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# define SRTP_AES128_CM_SHA1_80 0x0001 -# define SRTP_AES128_CM_SHA1_32 0x0002 -# define SRTP_AES128_F8_SHA1_80 0x0003 -# define SRTP_AES128_F8_SHA1_32 0x0004 -# define SRTP_NULL_SHA1_80 0x0005 -# define SRTP_NULL_SHA1_32 0x0006 - -# ifndef OPENSSL_NO_SRTP - -int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); -int SSL_set_tlsext_use_srtp(SSL *ctx, const char *profiles); - -STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); -SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); - -# endif - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* + * DTLS code by Eric Rescorla + * + * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. + */ + +#ifndef HEADER_D1_SRTP_H +# define HEADER_D1_SRTP_H + +# include + +#ifdef __cplusplus +extern "C" { +#endif + +# define SRTP_AES128_CM_SHA1_80 0x0001 +# define SRTP_AES128_CM_SHA1_32 0x0002 +# define SRTP_AES128_F8_SHA1_80 0x0003 +# define SRTP_AES128_F8_SHA1_32 0x0004 +# define SRTP_NULL_SHA1_80 0x0005 +# define SRTP_NULL_SHA1_32 0x0006 + +/* AEAD SRTP protection profiles from RFC 7714 */ +# define SRTP_AEAD_AES_128_GCM 0x0007 +# define SRTP_AEAD_AES_256_GCM 0x0008 + +# ifndef OPENSSL_NO_SRTP + +__owur int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); +__owur int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); + +__owur STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); +__owur SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); + +# endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ssl.h b/src/Mayaqua/win32_inc/openssl/ssl.h index 06b73094..6724ccf2 100644 --- a/src/Mayaqua/win32_inc/openssl/ssl.h +++ b/src/Mayaqua/win32_inc/openssl/ssl.h @@ -1,3163 +1,2438 @@ -/* ssl/ssl.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECC cipher suite support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ -/* ==================================================================== - * Copyright 2005 Nokia. All rights reserved. - * - * The portions of the attached software ("Contribution") is developed by - * Nokia Corporation and is licensed pursuant to the OpenSSL open source - * license. - * - * The Contribution, originally written by Mika Kousa and Pasi Eronen of - * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites - * support (see RFC 4279) to OpenSSL. - * - * No patent licenses or other rights except those expressly stated in - * the OpenSSL open source license shall be deemed granted or received - * expressly, by implication, estoppel, or otherwise. - * - * No assurances are provided by Nokia that the Contribution does not - * infringe the patent or other intellectual property rights of any third - * party or that the license provides you with all the necessary rights - * to make use of the Contribution. - * - * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN - * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA - * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY - * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR - * OTHERWISE. - */ - -#ifndef HEADER_SSL_H -# define HEADER_SSL_H - -# include - -# ifndef OPENSSL_NO_COMP -# include -# endif -# ifndef OPENSSL_NO_BIO -# include -# endif -# ifndef OPENSSL_NO_DEPRECATED -# ifndef OPENSSL_NO_X509 -# include -# endif -# include -# include -# include -# endif -# include -# include - -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* SSLeay version number for ASN.1 encoding of the session information */ -/*- - * Version 0 - initial version - * Version 1 - added the optional peer certificate - */ -# define SSL_SESSION_ASN1_VERSION 0x0001 - -/* text strings for the ciphers */ -# define SSL_TXT_NULL_WITH_MD5 SSL2_TXT_NULL_WITH_MD5 -# define SSL_TXT_RC4_128_WITH_MD5 SSL2_TXT_RC4_128_WITH_MD5 -# define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5 -# define SSL_TXT_RC2_128_CBC_WITH_MD5 SSL2_TXT_RC2_128_CBC_WITH_MD5 -# define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 -# define SSL_TXT_IDEA_128_CBC_WITH_MD5 SSL2_TXT_IDEA_128_CBC_WITH_MD5 -# define SSL_TXT_DES_64_CBC_WITH_MD5 SSL2_TXT_DES_64_CBC_WITH_MD5 -# define SSL_TXT_DES_64_CBC_WITH_SHA SSL2_TXT_DES_64_CBC_WITH_SHA -# define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5 -# define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA - -/* - * VRS Additional Kerberos5 entries - */ -# define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA -# define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA -# define SSL_TXT_KRB5_RC4_128_SHA SSL3_TXT_KRB5_RC4_128_SHA -# define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA -# define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5 -# define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5 -# define SSL_TXT_KRB5_RC4_128_MD5 SSL3_TXT_KRB5_RC4_128_MD5 -# define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5 - -# define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA -# define SSL_TXT_KRB5_RC2_40_CBC_SHA SSL3_TXT_KRB5_RC2_40_CBC_SHA -# define SSL_TXT_KRB5_RC4_40_SHA SSL3_TXT_KRB5_RC4_40_SHA -# define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5 -# define SSL_TXT_KRB5_RC2_40_CBC_MD5 SSL3_TXT_KRB5_RC2_40_CBC_MD5 -# define SSL_TXT_KRB5_RC4_40_MD5 SSL3_TXT_KRB5_RC4_40_MD5 - -# define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA -# define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5 -# define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA -# define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5 -# define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA -# define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5 -# define SSL_MAX_KRB5_PRINCIPAL_LENGTH 256 - -# define SSL_MAX_SSL_SESSION_ID_LENGTH 32 -# define SSL_MAX_SID_CTX_LENGTH 32 - -# define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8) -# define SSL_MAX_KEY_ARG_LENGTH 8 -# define SSL_MAX_MASTER_KEY_LENGTH 48 - -/* These are used to specify which ciphers to use and not to use */ - -# define SSL_TXT_EXP40 "EXPORT40" -# define SSL_TXT_EXP56 "EXPORT56" -# define SSL_TXT_LOW "LOW" -# define SSL_TXT_MEDIUM "MEDIUM" -# define SSL_TXT_HIGH "HIGH" -# define SSL_TXT_FIPS "FIPS" - -# define SSL_TXT_kFZA "kFZA"/* unused! */ -# define SSL_TXT_aFZA "aFZA"/* unused! */ -# define SSL_TXT_eFZA "eFZA"/* unused! */ -# define SSL_TXT_FZA "FZA"/* unused! */ - -# define SSL_TXT_aNULL "aNULL" -# define SSL_TXT_eNULL "eNULL" -# define SSL_TXT_NULL "NULL" - -# define SSL_TXT_kRSA "kRSA" -# define SSL_TXT_kDHr "kDHr" -# define SSL_TXT_kDHd "kDHd" -# define SSL_TXT_kDH "kDH" -# define SSL_TXT_kEDH "kEDH" -# define SSL_TXT_kDHE "kDHE"/* alias for kEDH */ -# define SSL_TXT_kKRB5 "kKRB5" -# define SSL_TXT_kECDHr "kECDHr" -# define SSL_TXT_kECDHe "kECDHe" -# define SSL_TXT_kECDH "kECDH" -# define SSL_TXT_kEECDH "kEECDH" -# define SSL_TXT_kECDHE "kECDHE"/* alias for kEECDH */ -# define SSL_TXT_kPSK "kPSK" -# define SSL_TXT_kGOST "kGOST" -# define SSL_TXT_kSRP "kSRP" - -# define SSL_TXT_aRSA "aRSA" -# define SSL_TXT_aDSS "aDSS" -# define SSL_TXT_aDH "aDH" -# define SSL_TXT_aECDH "aECDH" -# define SSL_TXT_aKRB5 "aKRB5" -# define SSL_TXT_aECDSA "aECDSA" -# define SSL_TXT_aPSK "aPSK" -# define SSL_TXT_aGOST94 "aGOST94" -# define SSL_TXT_aGOST01 "aGOST01" -# define SSL_TXT_aGOST "aGOST" -# define SSL_TXT_aSRP "aSRP" - -# define SSL_TXT_DSS "DSS" -# define SSL_TXT_DH "DH" -# define SSL_TXT_EDH "EDH"/* same as "kEDH:-ADH" */ -# define SSL_TXT_DHE "DHE"/* alias for EDH */ -# define SSL_TXT_ADH "ADH" -# define SSL_TXT_RSA "RSA" -# define SSL_TXT_ECDH "ECDH" -# define SSL_TXT_EECDH "EECDH"/* same as "kEECDH:-AECDH" */ -# define SSL_TXT_ECDHE "ECDHE"/* alias for ECDHE" */ -# define SSL_TXT_AECDH "AECDH" -# define SSL_TXT_ECDSA "ECDSA" -# define SSL_TXT_KRB5 "KRB5" -# define SSL_TXT_PSK "PSK" -# define SSL_TXT_SRP "SRP" - -# define SSL_TXT_DES "DES" -# define SSL_TXT_3DES "3DES" -# define SSL_TXT_RC4 "RC4" -# define SSL_TXT_RC2 "RC2" -# define SSL_TXT_IDEA "IDEA" -# define SSL_TXT_SEED "SEED" -# define SSL_TXT_AES128 "AES128" -# define SSL_TXT_AES256 "AES256" -# define SSL_TXT_AES "AES" -# define SSL_TXT_AES_GCM "AESGCM" -# define SSL_TXT_CAMELLIA128 "CAMELLIA128" -# define SSL_TXT_CAMELLIA256 "CAMELLIA256" -# define SSL_TXT_CAMELLIA "CAMELLIA" - -# define SSL_TXT_MD5 "MD5" -# define SSL_TXT_SHA1 "SHA1" -# define SSL_TXT_SHA "SHA"/* same as "SHA1" */ -# define SSL_TXT_GOST94 "GOST94" -# define SSL_TXT_GOST89MAC "GOST89MAC" -# define SSL_TXT_SHA256 "SHA256" -# define SSL_TXT_SHA384 "SHA384" - -# define SSL_TXT_SSLV2 "SSLv2" -# define SSL_TXT_SSLV3 "SSLv3" -# define SSL_TXT_TLSV1 "TLSv1" -# define SSL_TXT_TLSV1_1 "TLSv1.1" -# define SSL_TXT_TLSV1_2 "TLSv1.2" - -# define SSL_TXT_EXP "EXP" -# define SSL_TXT_EXPORT "EXPORT" - -# define SSL_TXT_ALL "ALL" - -/*- - * COMPLEMENTOF* definitions. These identifiers are used to (de-select) - * ciphers normally not being used. - * Example: "RC4" will activate all ciphers using RC4 including ciphers - * without authentication, which would normally disabled by DEFAULT (due - * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT" - * will make sure that it is also disabled in the specific selection. - * COMPLEMENTOF* identifiers are portable between version, as adjustments - * to the default cipher setup will also be included here. - * - * COMPLEMENTOFDEFAULT does not experience the same special treatment that - * DEFAULT gets, as only selection is being done and no sorting as needed - * for DEFAULT. - */ -# define SSL_TXT_CMPALL "COMPLEMENTOFALL" -# define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT" - -/* - * The following cipher list is used by default. It also is substituted when - * an application-defined cipher list string starts with 'DEFAULT'. - */ -# define SSL_DEFAULT_CIPHER_LIST "ALL:!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2" -/* - * As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always - * starts with a reasonable order, and all we have to do for DEFAULT is - * throwing out anonymous and unencrypted ciphersuites! (The latter are not - * actually enabled by ALL, but "ALL:RSA" would enable some of them.) - */ - -/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */ -# define SSL_SENT_SHUTDOWN 1 -# define SSL_RECEIVED_SHUTDOWN 2 - -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -# if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2) -# define OPENSSL_NO_SSL2 -# endif - -# define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1 -# define SSL_FILETYPE_PEM X509_FILETYPE_PEM - -/* - * This is needed to stop compilers complaining about the 'struct ssl_st *' - * function parameters used to prototype callbacks in SSL_CTX. - */ -typedef struct ssl_st *ssl_crock_st; -typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT; -typedef struct ssl_method_st SSL_METHOD; -typedef struct ssl_cipher_st SSL_CIPHER; -typedef struct ssl_session_st SSL_SESSION; -typedef struct tls_sigalgs_st TLS_SIGALGS; -typedef struct ssl_conf_ctx_st SSL_CONF_CTX; - -DECLARE_STACK_OF(SSL_CIPHER) - -/* SRTP protection profiles for use with the use_srtp extension (RFC 5764)*/ -typedef struct srtp_protection_profile_st { - const char *name; - unsigned long id; -} SRTP_PROTECTION_PROFILE; - -DECLARE_STACK_OF(SRTP_PROTECTION_PROFILE) - -typedef int (*tls_session_ticket_ext_cb_fn) (SSL *s, - const unsigned char *data, - int len, void *arg); -typedef int (*tls_session_secret_cb_fn) (SSL *s, void *secret, - int *secret_len, - STACK_OF(SSL_CIPHER) *peer_ciphers, - SSL_CIPHER **cipher, void *arg); - -# ifndef OPENSSL_NO_TLSEXT - -/* Typedefs for handling custom extensions */ - -typedef int (*custom_ext_add_cb) (SSL *s, unsigned int ext_type, - const unsigned char **out, - size_t *outlen, int *al, void *add_arg); - -typedef void (*custom_ext_free_cb) (SSL *s, unsigned int ext_type, - const unsigned char *out, void *add_arg); - -typedef int (*custom_ext_parse_cb) (SSL *s, unsigned int ext_type, - const unsigned char *in, - size_t inlen, int *al, void *parse_arg); - -# endif - -# ifndef OPENSSL_NO_SSL_INTERN - -/* used to hold info on the particular ciphers used */ -struct ssl_cipher_st { - int valid; - const char *name; /* text name */ - unsigned long id; /* id, 4 bytes, first is version */ - /* - * changed in 0.9.9: these four used to be portions of a single value - * 'algorithms' - */ - unsigned long algorithm_mkey; /* key exchange algorithm */ - unsigned long algorithm_auth; /* server authentication */ - unsigned long algorithm_enc; /* symmetric encryption */ - unsigned long algorithm_mac; /* symmetric authentication */ - unsigned long algorithm_ssl; /* (major) protocol version */ - unsigned long algo_strength; /* strength and export flags */ - unsigned long algorithm2; /* Extra flags */ - int strength_bits; /* Number of bits really used */ - int alg_bits; /* Number of bits for algorithm */ -}; - -/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */ -struct ssl_method_st { - int version; - int (*ssl_new) (SSL *s); - void (*ssl_clear) (SSL *s); - void (*ssl_free) (SSL *s); - int (*ssl_accept) (SSL *s); - int (*ssl_connect) (SSL *s); - int (*ssl_read) (SSL *s, void *buf, int len); - int (*ssl_peek) (SSL *s, void *buf, int len); - int (*ssl_write) (SSL *s, const void *buf, int len); - int (*ssl_shutdown) (SSL *s); - int (*ssl_renegotiate) (SSL *s); - int (*ssl_renegotiate_check) (SSL *s); - long (*ssl_get_message) (SSL *s, int st1, int stn, int mt, long - max, int *ok); - int (*ssl_read_bytes) (SSL *s, int type, unsigned char *buf, int len, - int peek); - int (*ssl_write_bytes) (SSL *s, int type, const void *buf_, int len); - int (*ssl_dispatch_alert) (SSL *s); - long (*ssl_ctrl) (SSL *s, int cmd, long larg, void *parg); - long (*ssl_ctx_ctrl) (SSL_CTX *ctx, int cmd, long larg, void *parg); - const SSL_CIPHER *(*get_cipher_by_char) (const unsigned char *ptr); - int (*put_cipher_by_char) (const SSL_CIPHER *cipher, unsigned char *ptr); - int (*ssl_pending) (const SSL *s); - int (*num_ciphers) (void); - const SSL_CIPHER *(*get_cipher) (unsigned ncipher); - const struct ssl_method_st *(*get_ssl_method) (int version); - long (*get_timeout) (void); - struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */ - int (*ssl_version) (void); - long (*ssl_callback_ctrl) (SSL *s, int cb_id, void (*fp) (void)); - long (*ssl_ctx_callback_ctrl) (SSL_CTX *s, int cb_id, void (*fp) (void)); -}; - -/*- - * Lets make this into an ASN.1 type structure as follows - * SSL_SESSION_ID ::= SEQUENCE { - * version INTEGER, -- structure version number - * SSLversion INTEGER, -- SSL version number - * Cipher OCTET STRING, -- the 3 byte cipher ID - * Session_ID OCTET STRING, -- the Session ID - * Master_key OCTET STRING, -- the master key - * KRB5_principal OCTET STRING -- optional Kerberos principal - * Key_Arg [ 0 ] IMPLICIT OCTET STRING, -- the optional Key argument - * Time [ 1 ] EXPLICIT INTEGER, -- optional Start Time - * Timeout [ 2 ] EXPLICIT INTEGER, -- optional Timeout ins seconds - * Peer [ 3 ] EXPLICIT X509, -- optional Peer Certificate - * Session_ID_context [ 4 ] EXPLICIT OCTET STRING, -- the Session ID context - * Verify_result [ 5 ] EXPLICIT INTEGER, -- X509_V_... code for `Peer' - * HostName [ 6 ] EXPLICIT OCTET STRING, -- optional HostName from servername TLS extension - * PSK_identity_hint [ 7 ] EXPLICIT OCTET STRING, -- optional PSK identity hint - * PSK_identity [ 8 ] EXPLICIT OCTET STRING, -- optional PSK identity - * Ticket_lifetime_hint [9] EXPLICIT INTEGER, -- server's lifetime hint for session ticket - * Ticket [10] EXPLICIT OCTET STRING, -- session ticket (clients only) - * Compression_meth [11] EXPLICIT OCTET STRING, -- optional compression method - * SRP_username [ 12 ] EXPLICIT OCTET STRING -- optional SRP username - * } - * Look in ssl/ssl_asn1.c for more details - * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-). - */ -struct ssl_session_st { - int ssl_version; /* what ssl version session info is being - * kept in here? */ - /* only really used in SSLv2 */ - unsigned int key_arg_length; - unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH]; - int master_key_length; - unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH]; - /* session_id - valid? */ - unsigned int session_id_length; - unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH]; - /* - * this is used to determine whether the session is being reused in the - * appropriate context. It is up to the application to set this, via - * SSL_new - */ - unsigned int sid_ctx_length; - unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; -# ifndef OPENSSL_NO_KRB5 - unsigned int krb5_client_princ_len; - unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH]; -# endif /* OPENSSL_NO_KRB5 */ -# ifndef OPENSSL_NO_PSK - char *psk_identity_hint; - char *psk_identity; -# endif - /* - * Used to indicate that session resumption is not allowed. Applications - * can also set this bit for a new session via not_resumable_session_cb - * to disable session caching and tickets. - */ - int not_resumable; - /* The cert is the certificate used to establish this connection */ - struct sess_cert_st /* SESS_CERT */ *sess_cert; - /* - * This is the cert for the other end. On clients, it will be the same as - * sess_cert->peer_key->x509 (the latter is not enough as sess_cert is - * not retained in the external representation of sessions, see - * ssl_asn1.c). - */ - X509 *peer; - /* - * when app_verify_callback accepts a session where the peer's - * certificate is not ok, we must remember the error for session reuse: - */ - long verify_result; /* only for servers */ - int references; - long timeout; - long time; - unsigned int compress_meth; /* Need to lookup the method */ - const SSL_CIPHER *cipher; - unsigned long cipher_id; /* when ASN.1 loaded, this needs to be used - * to load the 'cipher' structure */ - STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */ - CRYPTO_EX_DATA ex_data; /* application specific data */ - /* - * These are used to make removal of session-ids more efficient and to - * implement a maximum cache size. - */ - struct ssl_session_st *prev, *next; -# ifndef OPENSSL_NO_TLSEXT - char *tlsext_hostname; -# ifndef OPENSSL_NO_EC - size_t tlsext_ecpointformatlist_length; - unsigned char *tlsext_ecpointformatlist; /* peer's list */ - size_t tlsext_ellipticcurvelist_length; - unsigned char *tlsext_ellipticcurvelist; /* peer's list */ -# endif /* OPENSSL_NO_EC */ - /* RFC4507 info */ - unsigned char *tlsext_tick; /* Session ticket */ - size_t tlsext_ticklen; /* Session ticket length */ - long tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */ -# endif -# ifndef OPENSSL_NO_SRP - char *srp_username; -# endif -}; - -# endif - -# define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L -# define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L -/* Allow initial connection to servers that don't support RI */ -# define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004L -# define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L -# define SSL_OP_TLSEXT_PADDING 0x00000010L -# define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L -# define SSL_OP_SAFARI_ECDHE_ECDSA_BUG 0x00000040L -# define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x00000080L -# define SSL_OP_TLS_D5_BUG 0x00000100L -# define SSL_OP_TLS_BLOCK_PADDING_BUG 0x00000200L - -/* Hasn't done anything since OpenSSL 0.9.7h, retained for compatibility */ -# define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x0 -/* Refers to ancient SSLREF and SSLv2, retained for compatibility */ -# define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x0 - -/* - * Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added in - * OpenSSL 0.9.6d. Usually (depending on the application protocol) the - * workaround is not needed. Unfortunately some broken SSL/TLS - * implementations cannot handle it at all, which is why we include it in - * SSL_OP_ALL. - */ -/* added in 0.9.6e */ -# define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800L - -/* - * SSL_OP_ALL: various bug workarounds that should be rather harmless. This - * used to be 0x000FFFFFL before 0.9.7. - */ -# define SSL_OP_ALL 0x80000BFFL - -/* DTLS options */ -# define SSL_OP_NO_QUERY_MTU 0x00001000L -/* Turn on Cookie Exchange (on relevant for servers) */ -# define SSL_OP_COOKIE_EXCHANGE 0x00002000L -/* Don't use RFC4507 ticket extension */ -# define SSL_OP_NO_TICKET 0x00004000L -/* Use Cisco's "speshul" version of DTLS_BAD_VER (as client) */ -# define SSL_OP_CISCO_ANYCONNECT 0x00008000L - -/* As server, disallow session resumption on renegotiation */ -# define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L -/* Don't use compression even if supported */ -# define SSL_OP_NO_COMPRESSION 0x00020000L -/* Permit unsafe legacy renegotiation */ -# define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x00040000L -/* If set, always create a new key when using tmp_ecdh parameters */ -# define SSL_OP_SINGLE_ECDH_USE 0x00080000L -/* Does nothing: retained for compatibility */ -# define SSL_OP_SINGLE_DH_USE 0x00100000L -/* Does nothing: retained for compatibiity */ -# define SSL_OP_EPHEMERAL_RSA 0x0 -/* - * Set on servers to choose the cipher according to the server's preferences - */ -# define SSL_OP_CIPHER_SERVER_PREFERENCE 0x00400000L -/* - * If set, a server will allow a client to issue a SSLv3.0 version number as - * latest version supported in the premaster secret, even when TLSv1.0 - * (version 3.1) was announced in the client hello. Normally this is - * forbidden to prevent version rollback attacks. - */ -# define SSL_OP_TLS_ROLLBACK_BUG 0x00800000L - -# define SSL_OP_NO_SSLv2 0x01000000L -# define SSL_OP_NO_SSLv3 0x02000000L -# define SSL_OP_NO_TLSv1 0x04000000L -# define SSL_OP_NO_TLSv1_2 0x08000000L -# define SSL_OP_NO_TLSv1_1 0x10000000L - -# define SSL_OP_NO_DTLSv1 0x04000000L -# define SSL_OP_NO_DTLSv1_2 0x08000000L - -# define SSL_OP_NO_SSL_MASK (SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|\ - SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1|SSL_OP_NO_TLSv1_2) - -/* - * These next two were never actually used for anything since SSLeay zap so - * we have some more flags. - */ -/* - * The next flag deliberately changes the ciphertest, this is a check for the - * PKCS#1 attack - */ -# define SSL_OP_PKCS1_CHECK_1 0x0 -# define SSL_OP_PKCS1_CHECK_2 0x0 - -# define SSL_OP_NETSCAPE_CA_DN_BUG 0x20000000L -# define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x40000000L -/* - * Make server add server-hello extension from early version of cryptopro - * draft, when GOST ciphersuite is negotiated. Required for interoperability - * with CryptoPro CSP 3.x - */ -# define SSL_OP_CRYPTOPRO_TLSEXT_BUG 0x80000000L - -/* - * Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success - * when just a single record has been written): - */ -# define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001L -/* - * Make it possible to retry SSL_write() with changed buffer location (buffer - * contents must stay the same!); this is not the default to avoid the - * misconception that non-blocking SSL_write() behaves like non-blocking - * write(): - */ -# define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L -/* - * Never bother the application with retries if the transport is blocking: - */ -# define SSL_MODE_AUTO_RETRY 0x00000004L -/* Don't attempt to automatically build certificate chain */ -# define SSL_MODE_NO_AUTO_CHAIN 0x00000008L -/* - * Save RAM by releasing read and write buffers when they're empty. (SSL3 and - * TLS only.) "Released" buffers are put onto a free-list in the context or - * just freed (depending on the context's setting for freelist_max_len). - */ -# define SSL_MODE_RELEASE_BUFFERS 0x00000010L -/* - * Send the current time in the Random fields of the ClientHello and - * ServerHello records for compatibility with hypothetical implementations - * that require it. - */ -# define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020L -# define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040L -/* - * Send TLS_FALLBACK_SCSV in the ClientHello. To be set only by applications - * that reconnect with a downgraded protocol version; see - * draft-ietf-tls-downgrade-scsv-00 for details. DO NOT ENABLE THIS if your - * application attempts a normal handshake. Only use this in explicit - * fallback retries, following the guidance in - * draft-ietf-tls-downgrade-scsv-00. - */ -# define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080L - -/* Cert related flags */ -/* - * Many implementations ignore some aspects of the TLS standards such as - * enforcing certifcate chain algorithms. When this is set we enforce them. - */ -# define SSL_CERT_FLAG_TLS_STRICT 0x00000001L - -/* Suite B modes, takes same values as certificate verify flags */ -# define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000 -/* Suite B 192 bit only mode */ -# define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000 -/* Suite B 128 bit mode allowing 192 bit algorithms */ -# define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000 - -/* Perform all sorts of protocol violations for testing purposes */ -# define SSL_CERT_FLAG_BROKEN_PROTOCOL 0x10000000 - -/* Flags for building certificate chains */ -/* Treat any existing certificates as untrusted CAs */ -# define SSL_BUILD_CHAIN_FLAG_UNTRUSTED 0x1 -/* Don't include root CA in chain */ -# define SSL_BUILD_CHAIN_FLAG_NO_ROOT 0x2 -/* Just check certificates already there */ -# define SSL_BUILD_CHAIN_FLAG_CHECK 0x4 -/* Ignore verification errors */ -# define SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR 0x8 -/* Clear verification errors from queue */ -# define SSL_BUILD_CHAIN_FLAG_CLEAR_ERROR 0x10 - -/* Flags returned by SSL_check_chain */ -/* Certificate can be used with this session */ -# define CERT_PKEY_VALID 0x1 -/* Certificate can also be used for signing */ -# define CERT_PKEY_SIGN 0x2 -/* EE certificate signing algorithm OK */ -# define CERT_PKEY_EE_SIGNATURE 0x10 -/* CA signature algorithms OK */ -# define CERT_PKEY_CA_SIGNATURE 0x20 -/* EE certificate parameters OK */ -# define CERT_PKEY_EE_PARAM 0x40 -/* CA certificate parameters OK */ -# define CERT_PKEY_CA_PARAM 0x80 -/* Signing explicitly allowed as opposed to SHA1 fallback */ -# define CERT_PKEY_EXPLICIT_SIGN 0x100 -/* Client CA issuer names match (always set for server cert) */ -# define CERT_PKEY_ISSUER_NAME 0x200 -/* Cert type matches client types (always set for server cert) */ -# define CERT_PKEY_CERT_TYPE 0x400 -/* Cert chain suitable to Suite B */ -# define CERT_PKEY_SUITEB 0x800 - -# define SSL_CONF_FLAG_CMDLINE 0x1 -# define SSL_CONF_FLAG_FILE 0x2 -# define SSL_CONF_FLAG_CLIENT 0x4 -# define SSL_CONF_FLAG_SERVER 0x8 -# define SSL_CONF_FLAG_SHOW_ERRORS 0x10 -# define SSL_CONF_FLAG_CERTIFICATE 0x20 -/* Configuration value types */ -# define SSL_CONF_TYPE_UNKNOWN 0x0 -# define SSL_CONF_TYPE_STRING 0x1 -# define SSL_CONF_TYPE_FILE 0x2 -# define SSL_CONF_TYPE_DIR 0x3 - -/* - * Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, they - * cannot be used to clear bits. - */ - -# define SSL_CTX_set_options(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL) -# define SSL_CTX_clear_options(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_OPTIONS,(op),NULL) -# define SSL_CTX_get_options(ctx) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL) -# define SSL_set_options(ssl,op) \ - SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL) -# define SSL_clear_options(ssl,op) \ - SSL_ctrl((ssl),SSL_CTRL_CLEAR_OPTIONS,(op),NULL) -# define SSL_get_options(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL) - -# define SSL_CTX_set_mode(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL) -# define SSL_CTX_clear_mode(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL) -# define SSL_CTX_get_mode(ctx) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL) -# define SSL_clear_mode(ssl,op) \ - SSL_ctrl((ssl),SSL_CTRL_CLEAR_MODE,(op),NULL) -# define SSL_set_mode(ssl,op) \ - SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL) -# define SSL_get_mode(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL) -# define SSL_set_mtu(ssl, mtu) \ - SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL) -# define DTLS_set_link_mtu(ssl, mtu) \ - SSL_ctrl((ssl),DTLS_CTRL_SET_LINK_MTU,(mtu),NULL) -# define DTLS_get_link_min_mtu(ssl) \ - SSL_ctrl((ssl),DTLS_CTRL_GET_LINK_MIN_MTU,0,NULL) - -# define SSL_get_secure_renegotiation_support(ssl) \ - SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL) - -# ifndef OPENSSL_NO_HEARTBEATS -# define SSL_heartbeat(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_TLS_EXT_SEND_HEARTBEAT,0,NULL) -# endif - -# define SSL_CTX_set_cert_flags(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_CERT_FLAGS,(op),NULL) -# define SSL_set_cert_flags(s,op) \ - SSL_ctrl((s),SSL_CTRL_CERT_FLAGS,(op),NULL) -# define SSL_CTX_clear_cert_flags(ctx,op) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_CERT_FLAGS,(op),NULL) -# define SSL_clear_cert_flags(s,op) \ - SSL_ctrl((s),SSL_CTRL_CLEAR_CERT_FLAGS,(op),NULL) - -void SSL_CTX_set_msg_callback(SSL_CTX *ctx, - void (*cb) (int write_p, int version, - int content_type, const void *buf, - size_t len, SSL *ssl, void *arg)); -void SSL_set_msg_callback(SSL *ssl, - void (*cb) (int write_p, int version, - int content_type, const void *buf, - size_t len, SSL *ssl, void *arg)); -# define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) -# define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) - -# ifndef OPENSSL_NO_SRP - -# ifndef OPENSSL_NO_SSL_INTERN - -typedef struct srp_ctx_st { - /* param for all the callbacks */ - void *SRP_cb_arg; - /* set client Hello login callback */ - int (*TLS_ext_srp_username_callback) (SSL *, int *, void *); - /* set SRP N/g param callback for verification */ - int (*SRP_verify_param_callback) (SSL *, void *); - /* set SRP client passwd callback */ - char *(*SRP_give_srp_client_pwd_callback) (SSL *, void *); - char *login; - BIGNUM *N, *g, *s, *B, *A; - BIGNUM *a, *b, *v; - char *info; - int strength; - unsigned long srp_Mask; -} SRP_CTX; - -# endif - -/* see tls_srp.c */ -int SSL_SRP_CTX_init(SSL *s); -int SSL_CTX_SRP_CTX_init(SSL_CTX *ctx); -int SSL_SRP_CTX_free(SSL *ctx); -int SSL_CTX_SRP_CTX_free(SSL_CTX *ctx); -int SSL_srp_server_param_with_username(SSL *s, int *ad); -int SRP_generate_server_master_secret(SSL *s, unsigned char *master_key); -int SRP_Calc_A_param(SSL *s); -int SRP_generate_client_master_secret(SSL *s, unsigned char *master_key); - -# endif - -# if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) -# define SSL_MAX_CERT_LIST_DEFAULT 1024*30 - /* 30k max cert list :-) */ -# else -# define SSL_MAX_CERT_LIST_DEFAULT 1024*100 - /* 100k max cert list :-) */ -# endif - -# define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) - -/* - * This callback type is used inside SSL_CTX, SSL, and in the functions that - * set them. It is used to override the generation of SSL/TLS session IDs in - * a server. Return value should be zero on an error, non-zero to proceed. - * Also, callbacks should themselves check if the id they generate is unique - * otherwise the SSL handshake will fail with an error - callbacks can do - * this using the 'ssl' value they're passed by; - * SSL_has_matching_session_id(ssl, id, *id_len) The length value passed in - * is set at the maximum size the session ID can be. In SSLv2 this is 16 - * bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback can alter this - * length to be less if desired, but under SSLv2 session IDs are supposed to - * be fixed at 16 bytes so the id will be padded after the callback returns - * in this case. It is also an error for the callback to set the size to - * zero. - */ -typedef int (*GEN_SESSION_CB) (const SSL *ssl, unsigned char *id, - unsigned int *id_len); - -typedef struct ssl_comp_st SSL_COMP; - -# ifndef OPENSSL_NO_SSL_INTERN - -struct ssl_comp_st { - int id; - const char *name; -# ifndef OPENSSL_NO_COMP - COMP_METHOD *method; -# else - char *method; -# endif -}; - -DECLARE_STACK_OF(SSL_COMP) -DECLARE_LHASH_OF(SSL_SESSION); - -struct ssl_ctx_st { - const SSL_METHOD *method; - STACK_OF(SSL_CIPHER) *cipher_list; - /* same as above but sorted for lookup */ - STACK_OF(SSL_CIPHER) *cipher_list_by_id; - struct x509_store_st /* X509_STORE */ *cert_store; - LHASH_OF(SSL_SESSION) *sessions; - /* - * Most session-ids that will be cached, default is - * SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited. - */ - unsigned long session_cache_size; - struct ssl_session_st *session_cache_head; - struct ssl_session_st *session_cache_tail; - /* - * This can have one of 2 values, ored together, SSL_SESS_CACHE_CLIENT, - * SSL_SESS_CACHE_SERVER, Default is SSL_SESSION_CACHE_SERVER, which - * means only SSL_accept which cache SSL_SESSIONS. - */ - int session_cache_mode; - /* - * If timeout is not 0, it is the default timeout value set when - * SSL_new() is called. This has been put in to make life easier to set - * things up - */ - long session_timeout; - /* - * If this callback is not null, it will be called each time a session id - * is added to the cache. If this function returns 1, it means that the - * callback will do a SSL_SESSION_free() when it has finished using it. - * Otherwise, on 0, it means the callback has finished with it. If - * remove_session_cb is not null, it will be called when a session-id is - * removed from the cache. After the call, OpenSSL will - * SSL_SESSION_free() it. - */ - int (*new_session_cb) (struct ssl_st *ssl, SSL_SESSION *sess); - void (*remove_session_cb) (struct ssl_ctx_st *ctx, SSL_SESSION *sess); - SSL_SESSION *(*get_session_cb) (struct ssl_st *ssl, - unsigned char *data, int len, int *copy); - struct { - int sess_connect; /* SSL new conn - started */ - int sess_connect_renegotiate; /* SSL reneg - requested */ - int sess_connect_good; /* SSL new conne/reneg - finished */ - int sess_accept; /* SSL new accept - started */ - int sess_accept_renegotiate; /* SSL reneg - requested */ - int sess_accept_good; /* SSL accept/reneg - finished */ - int sess_miss; /* session lookup misses */ - int sess_timeout; /* reuse attempt on timeouted session */ - int sess_cache_full; /* session removed due to full cache */ - int sess_hit; /* session reuse actually done */ - int sess_cb_hit; /* session-id that was not in the cache was - * passed back via the callback. This - * indicates that the application is - * supplying session-id's from other - * processes - spooky :-) */ - } stats; - - int references; - - /* if defined, these override the X509_verify_cert() calls */ - int (*app_verify_callback) (X509_STORE_CTX *, void *); - void *app_verify_arg; - /* - * before OpenSSL 0.9.7, 'app_verify_arg' was ignored - * ('app_verify_callback' was called with just one argument) - */ - - /* Default password callback. */ - pem_password_cb *default_passwd_callback; - - /* Default password callback user data. */ - void *default_passwd_callback_userdata; - - /* get client cert callback */ - int (*client_cert_cb) (SSL *ssl, X509 **x509, EVP_PKEY **pkey); - - /* cookie generate callback */ - int (*app_gen_cookie_cb) (SSL *ssl, unsigned char *cookie, - unsigned int *cookie_len); - - /* verify cookie callback */ - int (*app_verify_cookie_cb) (SSL *ssl, unsigned char *cookie, - unsigned int cookie_len); - - CRYPTO_EX_DATA ex_data; - - const EVP_MD *rsa_md5; /* For SSLv2 - name is 'ssl2-md5' */ - const EVP_MD *md5; /* For SSLv3/TLSv1 'ssl3-md5' */ - const EVP_MD *sha1; /* For SSLv3/TLSv1 'ssl3->sha1' */ - - STACK_OF(X509) *extra_certs; - STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */ - - /* Default values used when no per-SSL value is defined follow */ - - /* used if SSL's info_callback is NULL */ - void (*info_callback) (const SSL *ssl, int type, int val); - - /* what we put in client cert requests */ - STACK_OF(X509_NAME) *client_CA; - - /* - * Default values to use in SSL structures follow (these are copied by - * SSL_new) - */ - - unsigned long options; - unsigned long mode; - long max_cert_list; - - struct cert_st /* CERT */ *cert; - int read_ahead; - - /* callback that allows applications to peek at protocol messages */ - void (*msg_callback) (int write_p, int version, int content_type, - const void *buf, size_t len, SSL *ssl, void *arg); - void *msg_callback_arg; - - int verify_mode; - unsigned int sid_ctx_length; - unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; - /* called 'verify_callback' in the SSL */ - int (*default_verify_callback) (int ok, X509_STORE_CTX *ctx); - - /* Default generate session ID callback. */ - GEN_SESSION_CB generate_session_id; - - X509_VERIFY_PARAM *param; - -# if 0 - int purpose; /* Purpose setting */ - int trust; /* Trust setting */ -# endif - - int quiet_shutdown; - - /* - * Maximum amount of data to send in one fragment. actual record size can - * be more than this due to padding and MAC overheads. - */ - unsigned int max_send_fragment; - -# ifndef OPENSSL_NO_ENGINE - /* - * Engine to pass requests for client certs to - */ - ENGINE *client_cert_engine; -# endif - -# ifndef OPENSSL_NO_TLSEXT - /* TLS extensions servername callback */ - int (*tlsext_servername_callback) (SSL *, int *, void *); - void *tlsext_servername_arg; - /* RFC 4507 session ticket keys */ - unsigned char tlsext_tick_key_name[16]; - unsigned char tlsext_tick_hmac_key[16]; - unsigned char tlsext_tick_aes_key[16]; - /* Callback to support customisation of ticket key setting */ - int (*tlsext_ticket_key_cb) (SSL *ssl, - unsigned char *name, unsigned char *iv, - EVP_CIPHER_CTX *ectx, - HMAC_CTX *hctx, int enc); - - /* certificate status request info */ - /* Callback for status request */ - int (*tlsext_status_cb) (SSL *ssl, void *arg); - void *tlsext_status_arg; - - /* draft-rescorla-tls-opaque-prf-input-00.txt information */ - int (*tlsext_opaque_prf_input_callback) (SSL *, void *peerinput, - size_t len, void *arg); - void *tlsext_opaque_prf_input_callback_arg; -# endif - -# ifndef OPENSSL_NO_PSK - char *psk_identity_hint; - unsigned int (*psk_client_callback) (SSL *ssl, const char *hint, - char *identity, - unsigned int max_identity_len, - unsigned char *psk, - unsigned int max_psk_len); - unsigned int (*psk_server_callback) (SSL *ssl, const char *identity, - unsigned char *psk, - unsigned int max_psk_len); -# endif - -# ifndef OPENSSL_NO_BUF_FREELISTS -# define SSL_MAX_BUF_FREELIST_LEN_DEFAULT 32 - unsigned int freelist_max_len; - struct ssl3_buf_freelist_st *wbuf_freelist; - struct ssl3_buf_freelist_st *rbuf_freelist; -# endif -# ifndef OPENSSL_NO_SRP - SRP_CTX srp_ctx; /* ctx for SRP authentication */ -# endif - -# ifndef OPENSSL_NO_TLSEXT - -# ifndef OPENSSL_NO_NEXTPROTONEG - /* Next protocol negotiation information */ - /* (for experimental NPN extension). */ - - /* - * For a server, this contains a callback function by which the set of - * advertised protocols can be provided. - */ - int (*next_protos_advertised_cb) (SSL *s, const unsigned char **buf, - unsigned int *len, void *arg); - void *next_protos_advertised_cb_arg; - /* - * For a client, this contains a callback function that selects the next - * protocol from the list provided by the server. - */ - int (*next_proto_select_cb) (SSL *s, unsigned char **out, - unsigned char *outlen, - const unsigned char *in, - unsigned int inlen, void *arg); - void *next_proto_select_cb_arg; -# endif - /* SRTP profiles we are willing to do from RFC 5764 */ - STACK_OF(SRTP_PROTECTION_PROFILE) *srtp_profiles; - - /* - * ALPN information (we are in the process of transitioning from NPN to - * ALPN.) - */ - - /*- - * For a server, this contains a callback function that allows the - * server to select the protocol for the connection. - * out: on successful return, this must point to the raw protocol - * name (without the length prefix). - * outlen: on successful return, this contains the length of |*out|. - * in: points to the client's list of supported protocols in - * wire-format. - * inlen: the length of |in|. - */ - int (*alpn_select_cb) (SSL *s, - const unsigned char **out, - unsigned char *outlen, - const unsigned char *in, - unsigned int inlen, void *arg); - void *alpn_select_cb_arg; - - /* - * For a client, this contains the list of supported protocols in wire - * format. - */ - unsigned char *alpn_client_proto_list; - unsigned alpn_client_proto_list_len; - -# ifndef OPENSSL_NO_EC - /* EC extension values inherited by SSL structure */ - size_t tlsext_ecpointformatlist_length; - unsigned char *tlsext_ecpointformatlist; - size_t tlsext_ellipticcurvelist_length; - unsigned char *tlsext_ellipticcurvelist; -# endif /* OPENSSL_NO_EC */ -# endif -}; - -# endif - -# define SSL_SESS_CACHE_OFF 0x0000 -# define SSL_SESS_CACHE_CLIENT 0x0001 -# define SSL_SESS_CACHE_SERVER 0x0002 -# define SSL_SESS_CACHE_BOTH (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER) -# define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080 -/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */ -# define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100 -# define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200 -# define SSL_SESS_CACHE_NO_INTERNAL \ - (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE) - -LHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx); -# define SSL_CTX_sess_number(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL) -# define SSL_CTX_sess_connect(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL) -# define SSL_CTX_sess_connect_good(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL) -# define SSL_CTX_sess_connect_renegotiate(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL) -# define SSL_CTX_sess_accept(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL) -# define SSL_CTX_sess_accept_renegotiate(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL) -# define SSL_CTX_sess_accept_good(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL) -# define SSL_CTX_sess_hits(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL) -# define SSL_CTX_sess_cb_hits(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL) -# define SSL_CTX_sess_misses(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL) -# define SSL_CTX_sess_timeouts(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL) -# define SSL_CTX_sess_cache_full(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL) - -void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, - int (*new_session_cb) (struct ssl_st *ssl, - SSL_SESSION *sess)); -int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, - SSL_SESSION *sess); -void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, - void (*remove_session_cb) (struct ssl_ctx_st - *ctx, - SSL_SESSION - *sess)); -void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx, - SSL_SESSION *sess); -void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, - SSL_SESSION *(*get_session_cb) (struct ssl_st - *ssl, - unsigned char - *data, int len, - int *copy)); -SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, - unsigned char *Data, - int len, int *copy); -void SSL_CTX_set_info_callback(SSL_CTX *ctx, - void (*cb) (const SSL *ssl, int type, - int val)); -void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, - int val); -void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, - int (*client_cert_cb) (SSL *ssl, X509 **x509, - EVP_PKEY **pkey)); -int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509, - EVP_PKEY **pkey); -# ifndef OPENSSL_NO_ENGINE -int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); -# endif -void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, - int (*app_gen_cookie_cb) (SSL *ssl, - unsigned char - *cookie, - unsigned int - *cookie_len)); -void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, - int (*app_verify_cookie_cb) (SSL *ssl, - unsigned char - *cookie, - unsigned int - cookie_len)); -# ifndef OPENSSL_NO_NEXTPROTONEG -void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s, - int (*cb) (SSL *ssl, - const unsigned char - **out, - unsigned int *outlen, - void *arg), void *arg); -void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s, - int (*cb) (SSL *ssl, - unsigned char **out, - unsigned char *outlen, - const unsigned char *in, - unsigned int inlen, - void *arg), void *arg); -void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, - unsigned *len); -# endif - -# ifndef OPENSSL_NO_TLSEXT -int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, - const unsigned char *in, unsigned int inlen, - const unsigned char *client, - unsigned int client_len); -# endif - -# define OPENSSL_NPN_UNSUPPORTED 0 -# define OPENSSL_NPN_NEGOTIATED 1 -# define OPENSSL_NPN_NO_OVERLAP 2 - -int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, - unsigned protos_len); -int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, - unsigned protos_len); -void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx, - int (*cb) (SSL *ssl, - const unsigned char **out, - unsigned char *outlen, - const unsigned char *in, - unsigned int inlen, - void *arg), void *arg); -void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, - unsigned *len); - -# ifndef OPENSSL_NO_PSK -/* - * the maximum length of the buffer given to callbacks containing the - * resulting identity/psk - */ -# define PSK_MAX_IDENTITY_LEN 128 -# define PSK_MAX_PSK_LEN 256 -void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, - unsigned int (*psk_client_callback) (SSL - *ssl, - const - char - *hint, - char - *identity, - unsigned - int - max_identity_len, - unsigned - char - *psk, - unsigned - int - max_psk_len)); -void SSL_set_psk_client_callback(SSL *ssl, - unsigned int (*psk_client_callback) (SSL - *ssl, - const - char - *hint, - char - *identity, - unsigned - int - max_identity_len, - unsigned - char - *psk, - unsigned - int - max_psk_len)); -void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, - unsigned int (*psk_server_callback) (SSL - *ssl, - const - char - *identity, - unsigned - char - *psk, - unsigned - int - max_psk_len)); -void SSL_set_psk_server_callback(SSL *ssl, - unsigned int (*psk_server_callback) (SSL - *ssl, - const - char - *identity, - unsigned - char - *psk, - unsigned - int - max_psk_len)); -int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint); -int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint); -const char *SSL_get_psk_identity_hint(const SSL *s); -const char *SSL_get_psk_identity(const SSL *s); -# endif - -# ifndef OPENSSL_NO_TLSEXT -/* Register callbacks to handle custom TLS Extensions for client or server. */ - -int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type, - custom_ext_add_cb add_cb, - custom_ext_free_cb free_cb, - void *add_arg, - custom_ext_parse_cb parse_cb, - void *parse_arg); - -int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, unsigned int ext_type, - custom_ext_add_cb add_cb, - custom_ext_free_cb free_cb, - void *add_arg, - custom_ext_parse_cb parse_cb, - void *parse_arg); - -int SSL_extension_supported(unsigned int ext_type); - -# endif - -# define SSL_NOTHING 1 -# define SSL_WRITING 2 -# define SSL_READING 3 -# define SSL_X509_LOOKUP 4 - -/* These will only be used when doing non-blocking IO */ -# define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) -# define SSL_want_read(s) (SSL_want(s) == SSL_READING) -# define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) -# define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) - -# define SSL_MAC_FLAG_READ_MAC_STREAM 1 -# define SSL_MAC_FLAG_WRITE_MAC_STREAM 2 - -# ifndef OPENSSL_NO_SSL_INTERN - -struct ssl_st { - /* - * protocol version (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, - * DTLS1_VERSION) - */ - int version; - /* SSL_ST_CONNECT or SSL_ST_ACCEPT */ - int type; - /* SSLv3 */ - const SSL_METHOD *method; - /* - * There are 2 BIO's even though they are normally both the same. This - * is so data can be read and written to different handlers - */ -# ifndef OPENSSL_NO_BIO - /* used by SSL_read */ - BIO *rbio; - /* used by SSL_write */ - BIO *wbio; - /* used during session-id reuse to concatenate messages */ - BIO *bbio; -# else - /* used by SSL_read */ - char *rbio; - /* used by SSL_write */ - char *wbio; - char *bbio; -# endif - /* - * This holds a variable that indicates what we were doing when a 0 or -1 - * is returned. This is needed for non-blocking IO so we know what - * request needs re-doing when in SSL_accept or SSL_connect - */ - int rwstate; - /* true when we are actually in SSL_accept() or SSL_connect() */ - int in_handshake; - int (*handshake_func) (SSL *); - /* - * Imagine that here's a boolean member "init" that is switched as soon - * as SSL_set_{accept/connect}_state is called for the first time, so - * that "state" and "handshake_func" are properly initialized. But as - * handshake_func is == 0 until then, we use this test instead of an - * "init" member. - */ - /* are we the server side? - mostly used by SSL_clear */ - int server; - /* - * Generate a new session or reuse an old one. - * NB: For servers, the 'new' session may actually be a previously - * cached session or even the previous session unless - * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set - */ - int new_session; - /* don't send shutdown packets */ - int quiet_shutdown; - /* we have shut things down, 0x01 sent, 0x02 for received */ - int shutdown; - /* where we are */ - int state; - /* where we are when reading */ - int rstate; - BUF_MEM *init_buf; /* buffer used during init */ - void *init_msg; /* pointer to handshake message body, set by - * ssl3_get_message() */ - int init_num; /* amount read/written */ - int init_off; /* amount read/written */ - /* used internally to point at a raw packet */ - unsigned char *packet; - unsigned int packet_length; - struct ssl2_state_st *s2; /* SSLv2 variables */ - struct ssl3_state_st *s3; /* SSLv3 variables */ - struct dtls1_state_st *d1; /* DTLSv1 variables */ - int read_ahead; /* Read as many input bytes as possible (for - * non-blocking reads) */ - /* callback that allows applications to peek at protocol messages */ - void (*msg_callback) (int write_p, int version, int content_type, - const void *buf, size_t len, SSL *ssl, void *arg); - void *msg_callback_arg; - int hit; /* reusing a previous session */ - X509_VERIFY_PARAM *param; -# if 0 - int purpose; /* Purpose setting */ - int trust; /* Trust setting */ -# endif - /* crypto */ - STACK_OF(SSL_CIPHER) *cipher_list; - STACK_OF(SSL_CIPHER) *cipher_list_by_id; - /* - * These are the ones being used, the ones in SSL_SESSION are the ones to - * be 'copied' into these ones - */ - int mac_flags; - EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ - EVP_MD_CTX *read_hash; /* used for mac generation */ -# ifndef OPENSSL_NO_COMP - COMP_CTX *expand; /* uncompress */ -# else - char *expand; -# endif - EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ - EVP_MD_CTX *write_hash; /* used for mac generation */ -# ifndef OPENSSL_NO_COMP - COMP_CTX *compress; /* compression */ -# else - char *compress; -# endif - /* session info */ - /* client cert? */ - /* This is used to hold the server certificate used */ - struct cert_st /* CERT */ *cert; - /* - * the session_id_context is used to ensure sessions are only reused in - * the appropriate context - */ - unsigned int sid_ctx_length; - unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH]; - /* This can also be in the session once a session is established */ - SSL_SESSION *session; - /* Default generate session ID callback. */ - GEN_SESSION_CB generate_session_id; - /* Used in SSL2 and SSL3 */ - /* - * 0 don't care about verify failure. - * 1 fail if verify fails - */ - int verify_mode; - /* fail if callback returns 0 */ - int (*verify_callback) (int ok, X509_STORE_CTX *ctx); - /* optional informational callback */ - void (*info_callback) (const SSL *ssl, int type, int val); - /* error bytes to be written */ - int error; - /* actual code */ - int error_code; -# ifndef OPENSSL_NO_KRB5 - /* Kerberos 5 context */ - KSSL_CTX *kssl_ctx; -# endif /* OPENSSL_NO_KRB5 */ -# ifndef OPENSSL_NO_PSK - unsigned int (*psk_client_callback) (SSL *ssl, const char *hint, - char *identity, - unsigned int max_identity_len, - unsigned char *psk, - unsigned int max_psk_len); - unsigned int (*psk_server_callback) (SSL *ssl, const char *identity, - unsigned char *psk, - unsigned int max_psk_len); -# endif - SSL_CTX *ctx; - /* - * set this flag to 1 and a sleep(1) is put into all SSL_read() and - * SSL_write() calls, good for nbio debuging :-) - */ - int debug; - /* extra application data */ - long verify_result; - CRYPTO_EX_DATA ex_data; - /* for server side, keep the list of CA_dn we can use */ - STACK_OF(X509_NAME) *client_CA; - int references; - /* protocol behaviour */ - unsigned long options; - /* API behaviour */ - unsigned long mode; - long max_cert_list; - int first_packet; - /* what was passed, used for SSLv3/TLS rollback check */ - int client_version; - unsigned int max_send_fragment; -# ifndef OPENSSL_NO_TLSEXT - /* TLS extension debug callback */ - void (*tlsext_debug_cb) (SSL *s, int client_server, int type, - unsigned char *data, int len, void *arg); - void *tlsext_debug_arg; - char *tlsext_hostname; - /*- - * no further mod of servername - * 0 : call the servername extension callback. - * 1 : prepare 2, allow last ack just after in server callback. - * 2 : don't call servername callback, no ack in server hello - */ - int servername_done; - /* certificate status request info */ - /* Status type or -1 if no status type */ - int tlsext_status_type; - /* Expect OCSP CertificateStatus message */ - int tlsext_status_expected; - /* OCSP status request only */ - STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids; - X509_EXTENSIONS *tlsext_ocsp_exts; - /* OCSP response received or to be sent */ - unsigned char *tlsext_ocsp_resp; - int tlsext_ocsp_resplen; - /* RFC4507 session ticket expected to be received or sent */ - int tlsext_ticket_expected; -# ifndef OPENSSL_NO_EC - size_t tlsext_ecpointformatlist_length; - /* our list */ - unsigned char *tlsext_ecpointformatlist; - size_t tlsext_ellipticcurvelist_length; - /* our list */ - unsigned char *tlsext_ellipticcurvelist; -# endif /* OPENSSL_NO_EC */ - /* - * draft-rescorla-tls-opaque-prf-input-00.txt information to be used for - * handshakes - */ - void *tlsext_opaque_prf_input; - size_t tlsext_opaque_prf_input_len; - /* TLS Session Ticket extension override */ - TLS_SESSION_TICKET_EXT *tlsext_session_ticket; - /* TLS Session Ticket extension callback */ - tls_session_ticket_ext_cb_fn tls_session_ticket_ext_cb; - void *tls_session_ticket_ext_cb_arg; - /* TLS pre-shared secret session resumption */ - tls_session_secret_cb_fn tls_session_secret_cb; - void *tls_session_secret_cb_arg; - SSL_CTX *initial_ctx; /* initial ctx, used to store sessions */ -# ifndef OPENSSL_NO_NEXTPROTONEG - /* - * Next protocol negotiation. For the client, this is the protocol that - * we sent in NextProtocol and is set when handling ServerHello - * extensions. For a server, this is the client's selected_protocol from - * NextProtocol and is set when handling the NextProtocol message, before - * the Finished message. - */ - unsigned char *next_proto_negotiated; - unsigned char next_proto_negotiated_len; -# endif -# define session_ctx initial_ctx - /* What we'll do */ - STACK_OF(SRTP_PROTECTION_PROFILE) *srtp_profiles; - /* What's been chosen */ - SRTP_PROTECTION_PROFILE *srtp_profile; - /*- - * Is use of the Heartbeat extension negotiated? - * 0: disabled - * 1: enabled - * 2: enabled, but not allowed to send Requests - */ - unsigned int tlsext_heartbeat; - /* Indicates if a HeartbeatRequest is in flight */ - unsigned int tlsext_hb_pending; - /* HeartbeatRequest sequence number */ - unsigned int tlsext_hb_seq; -# else -# define session_ctx ctx -# endif /* OPENSSL_NO_TLSEXT */ - /*- - * 1 if we are renegotiating. - * 2 if we are a server and are inside a handshake - * (i.e. not just sending a HelloRequest) - */ - int renegotiate; -# ifndef OPENSSL_NO_SRP - /* ctx for SRP authentication */ - SRP_CTX srp_ctx; -# endif -# ifndef OPENSSL_NO_TLSEXT - /* - * For a client, this contains the list of supported protocols in wire - * format. - */ - unsigned char *alpn_client_proto_list; - unsigned alpn_client_proto_list_len; -# endif /* OPENSSL_NO_TLSEXT */ -}; - -# endif - -#ifdef __cplusplus -} -#endif - -# include -# include -# include /* This is mostly sslv3 with a few tweaks */ -# include /* Datagram TLS */ -# include -# include /* Support for the use_srtp extension */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* compatibility */ -# define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) -# define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) -# define SSL_SESSION_set_app_data(s,a) (SSL_SESSION_set_ex_data(s,0,(char *)a)) -# define SSL_SESSION_get_app_data(s) (SSL_SESSION_get_ex_data(s,0)) -# define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0)) -# define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0,(char *)arg)) - -/* - * The following are the possible values for ssl->state are are used to - * indicate where we are up to in the SSL connection establishment. The - * macros that follow are about the only things you should need to use and - * even then, only when using non-blocking IO. It can also be useful to work - * out where you were when the connection failed - */ - -# define SSL_ST_CONNECT 0x1000 -# define SSL_ST_ACCEPT 0x2000 -# define SSL_ST_MASK 0x0FFF -# define SSL_ST_INIT (SSL_ST_CONNECT|SSL_ST_ACCEPT) -# define SSL_ST_BEFORE 0x4000 -# define SSL_ST_OK 0x03 -# define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) -# define SSL_ST_ERR 0x05 - -# define SSL_CB_LOOP 0x01 -# define SSL_CB_EXIT 0x02 -# define SSL_CB_READ 0x04 -# define SSL_CB_WRITE 0x08 -# define SSL_CB_ALERT 0x4000/* used in callback */ -# define SSL_CB_READ_ALERT (SSL_CB_ALERT|SSL_CB_READ) -# define SSL_CB_WRITE_ALERT (SSL_CB_ALERT|SSL_CB_WRITE) -# define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT|SSL_CB_LOOP) -# define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT|SSL_CB_EXIT) -# define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT|SSL_CB_LOOP) -# define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT|SSL_CB_EXIT) -# define SSL_CB_HANDSHAKE_START 0x10 -# define SSL_CB_HANDSHAKE_DONE 0x20 - -/* Is the SSL_connection established? */ -# define SSL_get_state(a) SSL_state(a) -# define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK) -# define SSL_in_init(a) (SSL_state(a)&SSL_ST_INIT) -# define SSL_in_before(a) (SSL_state(a)&SSL_ST_BEFORE) -# define SSL_in_connect_init(a) (SSL_state(a)&SSL_ST_CONNECT) -# define SSL_in_accept_init(a) (SSL_state(a)&SSL_ST_ACCEPT) - -/* - * The following 2 states are kept in ssl->rstate when reads fail, you should - * not need these - */ -# define SSL_ST_READ_HEADER 0xF0 -# define SSL_ST_READ_BODY 0xF1 -# define SSL_ST_READ_DONE 0xF2 - -/*- - * Obtain latest Finished message - * -- that we sent (SSL_get_finished) - * -- that we expected from peer (SSL_get_peer_finished). - * Returns length (0 == no Finished so far), copies up to 'count' bytes. - */ -size_t SSL_get_finished(const SSL *s, void *buf, size_t count); -size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count); - -/* - * use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options are - * 'ored' with SSL_VERIFY_PEER if they are desired - */ -# define SSL_VERIFY_NONE 0x00 -# define SSL_VERIFY_PEER 0x01 -# define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02 -# define SSL_VERIFY_CLIENT_ONCE 0x04 - -# define OpenSSL_add_ssl_algorithms() SSL_library_init() -# define SSLeay_add_ssl_algorithms() SSL_library_init() - -/* this is for backward compatibility */ -# if 0 /* NEW_SSLEAY */ -# define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c) -# define SSL_set_pref_cipher(c,n) SSL_set_cipher_list(c,n) -# define SSL_add_session(a,b) SSL_CTX_add_session((a),(b)) -# define SSL_remove_session(a,b) SSL_CTX_remove_session((a),(b)) -# define SSL_flush_sessions(a,b) SSL_CTX_flush_sessions((a),(b)) -# endif -/* More backward compatibility */ -# define SSL_get_cipher(s) \ - SSL_CIPHER_get_name(SSL_get_current_cipher(s)) -# define SSL_get_cipher_bits(s,np) \ - SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) -# define SSL_get_cipher_version(s) \ - SSL_CIPHER_get_version(SSL_get_current_cipher(s)) -# define SSL_get_cipher_name(s) \ - SSL_CIPHER_get_name(SSL_get_current_cipher(s)) -# define SSL_get_time(a) SSL_SESSION_get_time(a) -# define SSL_set_time(a,b) SSL_SESSION_set_time((a),(b)) -# define SSL_get_timeout(a) SSL_SESSION_get_timeout(a) -# define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b)) - -# define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id) -# define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id) - -DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) -# define SSL_AD_REASON_OFFSET 1000/* offset to get SSL_R_... value - * from SSL_AD_... */ -/* These alert types are for SSLv3 and TLSv1 */ -# define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY -/* fatal */ -# define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE -/* fatal */ -# define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC -# define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED -# define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW -/* fatal */ -# define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE -/* fatal */ -# define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE -/* Not for TLS */ -# define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE -# define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE -# define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE -# define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED -# define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED -# define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN -/* fatal */ -# define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER -/* fatal */ -# define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA -/* fatal */ -# define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED -/* fatal */ -# define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR -# define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR -/* fatal */ -# define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION -/* fatal */ -# define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION -/* fatal */ -# define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY -/* fatal */ -# define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR -# define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED -# define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION -# define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION -# define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE -# define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME -# define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE -# define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE -/* fatal */ -# define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY -/* fatal */ -# define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK -# define SSL_ERROR_NONE 0 -# define SSL_ERROR_SSL 1 -# define SSL_ERROR_WANT_READ 2 -# define SSL_ERROR_WANT_WRITE 3 -# define SSL_ERROR_WANT_X509_LOOKUP 4 -# define SSL_ERROR_SYSCALL 5/* look at error stack/return - * value/errno */ -# define SSL_ERROR_ZERO_RETURN 6 -# define SSL_ERROR_WANT_CONNECT 7 -# define SSL_ERROR_WANT_ACCEPT 8 -# define SSL_CTRL_NEED_TMP_RSA 1 -# define SSL_CTRL_SET_TMP_RSA 2 -# define SSL_CTRL_SET_TMP_DH 3 -# define SSL_CTRL_SET_TMP_ECDH 4 -# define SSL_CTRL_SET_TMP_RSA_CB 5 -# define SSL_CTRL_SET_TMP_DH_CB 6 -# define SSL_CTRL_SET_TMP_ECDH_CB 7 -# define SSL_CTRL_GET_SESSION_REUSED 8 -# define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9 -# define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10 -# define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11 -# define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12 -# define SSL_CTRL_GET_FLAGS 13 -# define SSL_CTRL_EXTRA_CHAIN_CERT 14 -# define SSL_CTRL_SET_MSG_CALLBACK 15 -# define SSL_CTRL_SET_MSG_CALLBACK_ARG 16 -/* only applies to datagram connections */ -# define SSL_CTRL_SET_MTU 17 -/* Stats */ -# define SSL_CTRL_SESS_NUMBER 20 -# define SSL_CTRL_SESS_CONNECT 21 -# define SSL_CTRL_SESS_CONNECT_GOOD 22 -# define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 -# define SSL_CTRL_SESS_ACCEPT 24 -# define SSL_CTRL_SESS_ACCEPT_GOOD 25 -# define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26 -# define SSL_CTRL_SESS_HIT 27 -# define SSL_CTRL_SESS_CB_HIT 28 -# define SSL_CTRL_SESS_MISSES 29 -# define SSL_CTRL_SESS_TIMEOUTS 30 -# define SSL_CTRL_SESS_CACHE_FULL 31 -# define SSL_CTRL_OPTIONS 32 -# define SSL_CTRL_MODE 33 -# define SSL_CTRL_GET_READ_AHEAD 40 -# define SSL_CTRL_SET_READ_AHEAD 41 -# define SSL_CTRL_SET_SESS_CACHE_SIZE 42 -# define SSL_CTRL_GET_SESS_CACHE_SIZE 43 -# define SSL_CTRL_SET_SESS_CACHE_MODE 44 -# define SSL_CTRL_GET_SESS_CACHE_MODE 45 -# define SSL_CTRL_GET_MAX_CERT_LIST 50 -# define SSL_CTRL_SET_MAX_CERT_LIST 51 -# define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52 -/* see tls1.h for macros based on these */ -# ifndef OPENSSL_NO_TLSEXT -# define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 -# define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54 -# define SSL_CTRL_SET_TLSEXT_HOSTNAME 55 -# define SSL_CTRL_SET_TLSEXT_DEBUG_CB 56 -# define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57 -# define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58 -# define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59 -# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT 60 -# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB 61 -# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG 62 -# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB 63 -# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64 -# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65 -# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66 -# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67 -# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68 -# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69 -# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70 -# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71 -# define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 72 -# define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB 75 -# define SSL_CTRL_SET_SRP_VERIFY_PARAM_CB 76 -# define SSL_CTRL_SET_SRP_GIVE_CLIENT_PWD_CB 77 -# define SSL_CTRL_SET_SRP_ARG 78 -# define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79 -# define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80 -# define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81 -# ifndef OPENSSL_NO_HEARTBEATS -# define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT 85 -# define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING 86 -# define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS 87 -# endif -# endif /* OPENSSL_NO_TLSEXT */ -# define DTLS_CTRL_GET_TIMEOUT 73 -# define DTLS_CTRL_HANDLE_TIMEOUT 74 -# define DTLS_CTRL_LISTEN 75 -# define SSL_CTRL_GET_RI_SUPPORT 76 -# define SSL_CTRL_CLEAR_OPTIONS 77 -# define SSL_CTRL_CLEAR_MODE 78 -# define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82 -# define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83 -# define SSL_CTRL_CHAIN 88 -# define SSL_CTRL_CHAIN_CERT 89 -# define SSL_CTRL_GET_CURVES 90 -# define SSL_CTRL_SET_CURVES 91 -# define SSL_CTRL_SET_CURVES_LIST 92 -# define SSL_CTRL_GET_SHARED_CURVE 93 -# define SSL_CTRL_SET_ECDH_AUTO 94 -# define SSL_CTRL_SET_SIGALGS 97 -# define SSL_CTRL_SET_SIGALGS_LIST 98 -# define SSL_CTRL_CERT_FLAGS 99 -# define SSL_CTRL_CLEAR_CERT_FLAGS 100 -# define SSL_CTRL_SET_CLIENT_SIGALGS 101 -# define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102 -# define SSL_CTRL_GET_CLIENT_CERT_TYPES 103 -# define SSL_CTRL_SET_CLIENT_CERT_TYPES 104 -# define SSL_CTRL_BUILD_CERT_CHAIN 105 -# define SSL_CTRL_SET_VERIFY_CERT_STORE 106 -# define SSL_CTRL_SET_CHAIN_CERT_STORE 107 -# define SSL_CTRL_GET_PEER_SIGNATURE_NID 108 -# define SSL_CTRL_GET_SERVER_TMP_KEY 109 -# define SSL_CTRL_GET_RAW_CIPHERLIST 110 -# define SSL_CTRL_GET_EC_POINT_FORMATS 111 -# define SSL_CTRL_GET_CHAIN_CERTS 115 -# define SSL_CTRL_SELECT_CURRENT_CERT 116 -# define SSL_CTRL_SET_CURRENT_CERT 117 -# define SSL_CTRL_CHECK_PROTO_VERSION 119 -# define DTLS_CTRL_SET_LINK_MTU 120 -# define DTLS_CTRL_GET_LINK_MIN_MTU 121 -# define SSL_CERT_SET_FIRST 1 -# define SSL_CERT_SET_NEXT 2 -# define SSL_CERT_SET_SERVER 3 -# define DTLSv1_get_timeout(ssl, arg) \ - SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg) -# define DTLSv1_handle_timeout(ssl) \ - SSL_ctrl(ssl,DTLS_CTRL_HANDLE_TIMEOUT,0, NULL) -# define DTLSv1_listen(ssl, peer) \ - SSL_ctrl(ssl,DTLS_CTRL_LISTEN,0, (void *)peer) -# define SSL_session_reused(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL) -# define SSL_num_renegotiations(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL) -# define SSL_clear_num_renegotiations(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL) -# define SSL_total_renegotiations(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL) -# define SSL_CTX_need_tmp_RSA(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL) -# define SSL_CTX_set_tmp_rsa(ctx,rsa) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) -# define SSL_CTX_set_tmp_dh(ctx,dh) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh) -# define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) -# define SSL_need_tmp_RSA(ssl) \ - SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL) -# define SSL_set_tmp_rsa(ssl,rsa) \ - SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) -# define SSL_set_tmp_dh(ssl,dh) \ - SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh) -# define SSL_set_tmp_ecdh(ssl,ecdh) \ - SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) -# define SSL_CTX_add_extra_chain_cert(ctx,x509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509) -# define SSL_CTX_get_extra_chain_certs(ctx,px509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,0,px509) -# define SSL_CTX_get_extra_chain_certs_only(ctx,px509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,1,px509) -# define SSL_CTX_clear_extra_chain_certs(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS,0,NULL) -# define SSL_CTX_set0_chain(ctx,sk) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,0,(char *)sk) -# define SSL_CTX_set1_chain(ctx,sk) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,1,(char *)sk) -# define SSL_CTX_add0_chain_cert(ctx,x509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN_CERT,0,(char *)x509) -# define SSL_CTX_add1_chain_cert(ctx,x509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN_CERT,1,(char *)x509) -# define SSL_CTX_get0_chain_certs(ctx,px509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_CHAIN_CERTS,0,px509) -# define SSL_CTX_clear_chain_certs(ctx) \ - SSL_CTX_set0_chain(ctx,NULL) -# define SSL_CTX_build_cert_chain(ctx, flags) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_BUILD_CERT_CHAIN, flags, NULL) -# define SSL_CTX_select_current_cert(ctx,x509) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SELECT_CURRENT_CERT,0,(char *)x509) -# define SSL_CTX_set_current_cert(ctx, op) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURRENT_CERT, op, NULL) -# define SSL_CTX_set0_verify_cert_store(ctx,st) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_VERIFY_CERT_STORE,0,(char *)st) -# define SSL_CTX_set1_verify_cert_store(ctx,st) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_VERIFY_CERT_STORE,1,(char *)st) -# define SSL_CTX_set0_chain_cert_store(ctx,st) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CHAIN_CERT_STORE,0,(char *)st) -# define SSL_CTX_set1_chain_cert_store(ctx,st) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)st) -# define SSL_set0_chain(ctx,sk) \ - SSL_ctrl(ctx,SSL_CTRL_CHAIN,0,(char *)sk) -# define SSL_set1_chain(ctx,sk) \ - SSL_ctrl(ctx,SSL_CTRL_CHAIN,1,(char *)sk) -# define SSL_add0_chain_cert(ctx,x509) \ - SSL_ctrl(ctx,SSL_CTRL_CHAIN_CERT,0,(char *)x509) -# define SSL_add1_chain_cert(ctx,x509) \ - SSL_ctrl(ctx,SSL_CTRL_CHAIN_CERT,1,(char *)x509) -# define SSL_get0_chain_certs(ctx,px509) \ - SSL_ctrl(ctx,SSL_CTRL_GET_CHAIN_CERTS,0,px509) -# define SSL_clear_chain_certs(ctx) \ - SSL_set0_chain(ctx,NULL) -# define SSL_build_cert_chain(s, flags) \ - SSL_ctrl(s,SSL_CTRL_BUILD_CERT_CHAIN, flags, NULL) -# define SSL_select_current_cert(ctx,x509) \ - SSL_ctrl(ctx,SSL_CTRL_SELECT_CURRENT_CERT,0,(char *)x509) -# define SSL_set_current_cert(ctx,op) \ - SSL_ctrl(ctx,SSL_CTRL_SET_CURRENT_CERT, op, NULL) -# define SSL_set0_verify_cert_store(s,st) \ - SSL_ctrl(s,SSL_CTRL_SET_VERIFY_CERT_STORE,0,(char *)st) -# define SSL_set1_verify_cert_store(s,st) \ - SSL_ctrl(s,SSL_CTRL_SET_VERIFY_CERT_STORE,1,(char *)st) -# define SSL_set0_chain_cert_store(s,st) \ - SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,0,(char *)st) -# define SSL_set1_chain_cert_store(s,st) \ - SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)st) -# define SSL_get1_curves(ctx, s) \ - SSL_ctrl(ctx,SSL_CTRL_GET_CURVES,0,(char *)s) -# define SSL_CTX_set1_curves(ctx, clist, clistlen) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURVES,clistlen,(char *)clist) -# define SSL_CTX_set1_curves_list(ctx, s) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURVES_LIST,0,(char *)s) -# define SSL_set1_curves(ctx, clist, clistlen) \ - SSL_ctrl(ctx,SSL_CTRL_SET_CURVES,clistlen,(char *)clist) -# define SSL_set1_curves_list(ctx, s) \ - SSL_ctrl(ctx,SSL_CTRL_SET_CURVES_LIST,0,(char *)s) -# define SSL_get_shared_curve(s, n) \ - SSL_ctrl(s,SSL_CTRL_GET_SHARED_CURVE,n,NULL) -# define SSL_CTX_set_ecdh_auto(ctx, onoff) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL) -# define SSL_set_ecdh_auto(s, onoff) \ - SSL_ctrl(s,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL) -# define SSL_CTX_set1_sigalgs(ctx, slist, slistlen) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)slist) -# define SSL_CTX_set1_sigalgs_list(ctx, s) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)s) -# define SSL_set1_sigalgs(ctx, slist, slistlen) \ - SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)slist) -# define SSL_set1_sigalgs_list(ctx, s) \ - SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)s) -# define SSL_CTX_set1_client_sigalgs(ctx, slist, slistlen) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS,slistlen,(int *)slist) -# define SSL_CTX_set1_client_sigalgs_list(ctx, s) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)s) -# define SSL_set1_client_sigalgs(ctx, slist, slistlen) \ - SSL_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS,clistlen,(int *)slist) -# define SSL_set1_client_sigalgs_list(ctx, s) \ - SSL_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)s) -# define SSL_get0_certificate_types(s, clist) \ - SSL_ctrl(s, SSL_CTRL_GET_CLIENT_CERT_TYPES, 0, (char *)clist) -# define SSL_CTX_set1_client_certificate_types(ctx, clist, clistlen) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen,(char *)clist) -# define SSL_set1_client_certificate_types(s, clist, clistlen) \ - SSL_ctrl(s,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen,(char *)clist) -# define SSL_get_peer_signature_nid(s, pn) \ - SSL_ctrl(s,SSL_CTRL_GET_PEER_SIGNATURE_NID,0,pn) -# define SSL_get_server_tmp_key(s, pk) \ - SSL_ctrl(s,SSL_CTRL_GET_SERVER_TMP_KEY,0,pk) -# define SSL_get0_raw_cipherlist(s, plst) \ - SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,(char *)plst) -# define SSL_get0_ec_point_formats(s, plst) \ - SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,(char *)plst) -# ifndef OPENSSL_NO_BIO -BIO_METHOD *BIO_f_ssl(void); -BIO *BIO_new_ssl(SSL_CTX *ctx, int client); -BIO *BIO_new_ssl_connect(SSL_CTX *ctx); -BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx); -int BIO_ssl_copy_session_id(BIO *to, BIO *from); -void BIO_ssl_shutdown(BIO *ssl_bio); - -# endif - -int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str); -SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); -void SSL_CTX_free(SSL_CTX *); -long SSL_CTX_set_timeout(SSL_CTX *ctx, long t); -long SSL_CTX_get_timeout(const SSL_CTX *ctx); -X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *); -void SSL_CTX_set_cert_store(SSL_CTX *, X509_STORE *); -int SSL_want(const SSL *s); -int SSL_clear(SSL *s); - -void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); - -const SSL_CIPHER *SSL_get_current_cipher(const SSL *s); -int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits); -char *SSL_CIPHER_get_version(const SSL_CIPHER *c); -const char *SSL_CIPHER_get_name(const SSL_CIPHER *c); -unsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c); - -int SSL_get_fd(const SSL *s); -int SSL_get_rfd(const SSL *s); -int SSL_get_wfd(const SSL *s); -const char *SSL_get_cipher_list(const SSL *s, int n); -char *SSL_get_shared_ciphers(const SSL *s, char *buf, int len); -int SSL_get_read_ahead(const SSL *s); -int SSL_pending(const SSL *s); -# ifndef OPENSSL_NO_SOCK -int SSL_set_fd(SSL *s, int fd); -int SSL_set_rfd(SSL *s, int fd); -int SSL_set_wfd(SSL *s, int fd); -# endif -# ifndef OPENSSL_NO_BIO -void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); -BIO *SSL_get_rbio(const SSL *s); -BIO *SSL_get_wbio(const SSL *s); -# endif -int SSL_set_cipher_list(SSL *s, const char *str); -void SSL_set_read_ahead(SSL *s, int yes); -int SSL_get_verify_mode(const SSL *s); -int SSL_get_verify_depth(const SSL *s); -int (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *); -void SSL_set_verify(SSL *s, int mode, - int (*callback) (int ok, X509_STORE_CTX *ctx)); -void SSL_set_verify_depth(SSL *s, int depth); -void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg); -# ifndef OPENSSL_NO_RSA -int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa); -# endif -int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len); -int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); -int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d, - long len); -int SSL_use_certificate(SSL *ssl, X509 *x); -int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len); - -# ifndef OPENSSL_NO_TLSEXT -/* Set serverinfo data for the current active cert. */ -int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo, - size_t serverinfo_length); -# ifndef OPENSSL_NO_STDIO -int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file); -# endif /* NO_STDIO */ - -# endif - -# ifndef OPENSSL_NO_STDIO -int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type); -int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type); -int SSL_use_certificate_file(SSL *ssl, const char *file, int type); -int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type); -int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type); -int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type); -/* PEM type */ -int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); -STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); -int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, - const char *file); -# ifndef OPENSSL_SYS_VMS -/* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */ -# ifndef OPENSSL_SYS_MACINTOSH_CLASSIC -int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, - const char *dir); -# endif -# endif - -# endif - -void SSL_load_error_strings(void); -const char *SSL_state_string(const SSL *s); -const char *SSL_rstate_string(const SSL *s); -const char *SSL_state_string_long(const SSL *s); -const char *SSL_rstate_string_long(const SSL *s); -long SSL_SESSION_get_time(const SSL_SESSION *s); -long SSL_SESSION_set_time(SSL_SESSION *s, long t); -long SSL_SESSION_get_timeout(const SSL_SESSION *s); -long SSL_SESSION_set_timeout(SSL_SESSION *s, long t); -void SSL_copy_session_id(SSL *to, const SSL *from); -X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); -int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, - unsigned int sid_ctx_len); - -SSL_SESSION *SSL_SESSION_new(void); -const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, - unsigned int *len); -unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s); -# ifndef OPENSSL_NO_FP_API -int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); -# endif -# ifndef OPENSSL_NO_BIO -int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses); -# endif -void SSL_SESSION_free(SSL_SESSION *ses); -int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); -int SSL_set_session(SSL *to, SSL_SESSION *session); -int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c); -int SSL_CTX_remove_session(SSL_CTX *, SSL_SESSION *c); -int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB); -int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB); -int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, - unsigned int id_len); -SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, - long length); - -# ifdef HEADER_X509_H -X509 *SSL_get_peer_certificate(const SSL *s); -# endif - -STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s); - -int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); -int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); -int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int, - X509_STORE_CTX *); -void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, - int (*callback) (int, X509_STORE_CTX *)); -void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth); -void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, - int (*cb) (X509_STORE_CTX *, void *), - void *arg); -void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), - void *arg); -# ifndef OPENSSL_NO_RSA -int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); -# endif -int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, - long len); -int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); -int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx, - const unsigned char *d, long len); -int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); -int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, - const unsigned char *d); - -void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); -void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); - -int SSL_CTX_check_private_key(const SSL_CTX *ctx); -int SSL_check_private_key(const SSL *ctx); - -int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, - unsigned int sid_ctx_len); - -SSL *SSL_new(SSL_CTX *ctx); -int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, - unsigned int sid_ctx_len); - -int SSL_CTX_set_purpose(SSL_CTX *s, int purpose); -int SSL_set_purpose(SSL *s, int purpose); -int SSL_CTX_set_trust(SSL_CTX *s, int trust); -int SSL_set_trust(SSL *s, int trust); - -int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm); -int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); - -X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx); -X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); - -# ifndef OPENSSL_NO_SRP -int SSL_CTX_set_srp_username(SSL_CTX *ctx, char *name); -int SSL_CTX_set_srp_password(SSL_CTX *ctx, char *password); -int SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength); -int SSL_CTX_set_srp_client_pwd_callback(SSL_CTX *ctx, - char *(*cb) (SSL *, void *)); -int SSL_CTX_set_srp_verify_param_callback(SSL_CTX *ctx, - int (*cb) (SSL *, void *)); -int SSL_CTX_set_srp_username_callback(SSL_CTX *ctx, - int (*cb) (SSL *, int *, void *)); -int SSL_CTX_set_srp_cb_arg(SSL_CTX *ctx, void *arg); - -int SSL_set_srp_server_param(SSL *s, const BIGNUM *N, const BIGNUM *g, - BIGNUM *sa, BIGNUM *v, char *info); -int SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass, - const char *grp); - -BIGNUM *SSL_get_srp_g(SSL *s); -BIGNUM *SSL_get_srp_N(SSL *s); - -char *SSL_get_srp_username(SSL *s); -char *SSL_get_srp_userinfo(SSL *s); -# endif - -void SSL_certs_clear(SSL *s); -void SSL_free(SSL *ssl); -int SSL_accept(SSL *ssl); -int SSL_connect(SSL *ssl); -int SSL_read(SSL *ssl, void *buf, int num); -int SSL_peek(SSL *ssl, void *buf, int num); -int SSL_write(SSL *ssl, const void *buf, int num); -long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); -long SSL_callback_ctrl(SSL *, int, void (*)(void)); -long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); -long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void)); - -int SSL_get_error(const SSL *s, int ret_code); -const char *SSL_get_version(const SSL *s); - -/* This sets the 'default' SSL version that SSL_new() will create */ -int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth); - -# ifndef OPENSSL_NO_SSL2_METHOD -const SSL_METHOD *SSLv2_method(void); /* SSLv2 */ -const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */ -const SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */ -# endif - -# ifndef OPENSSL_NO_SSL3_METHOD -const SSL_METHOD *SSLv3_method(void); /* SSLv3 */ -const SSL_METHOD *SSLv3_server_method(void); /* SSLv3 */ -const SSL_METHOD *SSLv3_client_method(void); /* SSLv3 */ -# endif - -const SSL_METHOD *SSLv23_method(void); /* Negotiate highest available SSL/TLS - * version */ -const SSL_METHOD *SSLv23_server_method(void); /* Negotiate highest available - * SSL/TLS version */ -const SSL_METHOD *SSLv23_client_method(void); /* Negotiate highest available - * SSL/TLS version */ - -const SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */ -const SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */ -const SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */ - -const SSL_METHOD *TLSv1_1_method(void); /* TLSv1.1 */ -const SSL_METHOD *TLSv1_1_server_method(void); /* TLSv1.1 */ -const SSL_METHOD *TLSv1_1_client_method(void); /* TLSv1.1 */ - -const SSL_METHOD *TLSv1_2_method(void); /* TLSv1.2 */ -const SSL_METHOD *TLSv1_2_server_method(void); /* TLSv1.2 */ -const SSL_METHOD *TLSv1_2_client_method(void); /* TLSv1.2 */ - -const SSL_METHOD *DTLSv1_method(void); /* DTLSv1.0 */ -const SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */ -const SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */ - -const SSL_METHOD *DTLSv1_2_method(void); /* DTLSv1.2 */ -const SSL_METHOD *DTLSv1_2_server_method(void); /* DTLSv1.2 */ -const SSL_METHOD *DTLSv1_2_client_method(void); /* DTLSv1.2 */ - -const SSL_METHOD *DTLS_method(void); /* DTLS 1.0 and 1.2 */ -const SSL_METHOD *DTLS_server_method(void); /* DTLS 1.0 and 1.2 */ -const SSL_METHOD *DTLS_client_method(void); /* DTLS 1.0 and 1.2 */ - -STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); - -int SSL_do_handshake(SSL *s); -int SSL_renegotiate(SSL *s); -int SSL_renegotiate_abbreviated(SSL *s); -int SSL_renegotiate_pending(SSL *s); -int SSL_shutdown(SSL *s); - -const SSL_METHOD *SSL_CTX_get_ssl_method(SSL_CTX *ctx); -const SSL_METHOD *SSL_get_ssl_method(SSL *s); -int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); -const char *SSL_alert_type_string_long(int value); -const char *SSL_alert_type_string(int value); -const char *SSL_alert_desc_string_long(int value); -const char *SSL_alert_desc_string(int value); - -void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); -void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); -STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s); -STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s); -int SSL_add_client_CA(SSL *ssl, X509 *x); -int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x); - -void SSL_set_connect_state(SSL *s); -void SSL_set_accept_state(SSL *s); - -long SSL_get_default_timeout(const SSL *s); - -int SSL_library_init(void); - -char *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size); -STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk); - -SSL *SSL_dup(SSL *ssl); - -X509 *SSL_get_certificate(const SSL *ssl); -/* - * EVP_PKEY - */ struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl); - -X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx); -EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx); - -void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode); -int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); -void SSL_set_quiet_shutdown(SSL *ssl, int mode); -int SSL_get_quiet_shutdown(const SSL *ssl); -void SSL_set_shutdown(SSL *ssl, int mode); -int SSL_get_shutdown(const SSL *ssl); -int SSL_version(const SSL *ssl); -int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); -int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, - const char *CApath); -# define SSL_get0_session SSL_get_session/* just peek at pointer */ -SSL_SESSION *SSL_get_session(const SSL *ssl); -SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ -SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); -SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx); -void SSL_set_info_callback(SSL *ssl, - void (*cb) (const SSL *ssl, int type, int val)); -void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type, - int val); -int SSL_state(const SSL *ssl); -void SSL_set_state(SSL *ssl, int state); - -void SSL_set_verify_result(SSL *ssl, long v); -long SSL_get_verify_result(const SSL *ssl); - -int SSL_set_ex_data(SSL *ssl, int idx, void *data); -void *SSL_get_ex_data(const SSL *ssl, int idx); -int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); - -int SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data); -void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss, int idx); -int SSL_SESSION_get_ex_new_index(long argl, void *argp, - CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); - -int SSL_CTX_set_ex_data(SSL_CTX *ssl, int idx, void *data); -void *SSL_CTX_get_ex_data(const SSL_CTX *ssl, int idx); -int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); - -int SSL_get_ex_data_X509_STORE_CTX_idx(void); - -# define SSL_CTX_sess_set_cache_size(ctx,t) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL) -# define SSL_CTX_sess_get_cache_size(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL) -# define SSL_CTX_set_session_cache_mode(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL) -# define SSL_CTX_get_session_cache_mode(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL) - -# define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx) -# define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m) -# define SSL_CTX_get_read_ahead(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL) -# define SSL_CTX_set_read_ahead(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL) -# define SSL_CTX_get_max_cert_list(ctx) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) -# define SSL_CTX_set_max_cert_list(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) -# define SSL_get_max_cert_list(ssl) \ - SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) -# define SSL_set_max_cert_list(ssl,m) \ - SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) - -# define SSL_CTX_set_max_send_fragment(ctx,m) \ - SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL) -# define SSL_set_max_send_fragment(ssl,m) \ - SSL_ctrl(ssl,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL) - - /* NB: the keylength is only applicable when is_export is true */ -# ifndef OPENSSL_NO_RSA -void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, - RSA *(*cb) (SSL *ssl, int is_export, - int keylength)); - -void SSL_set_tmp_rsa_callback(SSL *ssl, - RSA *(*cb) (SSL *ssl, int is_export, - int keylength)); -# endif -# ifndef OPENSSL_NO_DH -void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, - DH *(*dh) (SSL *ssl, int is_export, - int keylength)); -void SSL_set_tmp_dh_callback(SSL *ssl, - DH *(*dh) (SSL *ssl, int is_export, - int keylength)); -# endif -# ifndef OPENSSL_NO_ECDH -void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, - EC_KEY *(*ecdh) (SSL *ssl, int is_export, - int keylength)); -void SSL_set_tmp_ecdh_callback(SSL *ssl, - EC_KEY *(*ecdh) (SSL *ssl, int is_export, - int keylength)); -# endif - -const COMP_METHOD *SSL_get_current_compression(SSL *s); -const COMP_METHOD *SSL_get_current_expansion(SSL *s); -const char *SSL_COMP_get_name(const COMP_METHOD *comp); -STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); -STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) - *meths); -void SSL_COMP_free_compression_methods(void); -int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm); - -const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr); - -/* TLS extensions functions */ -int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len); - -int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb, - void *arg); - -/* Pre-shared secret session resumption functions */ -int SSL_set_session_secret_cb(SSL *s, - tls_session_secret_cb_fn tls_session_secret_cb, - void *arg); - -void SSL_set_debug(SSL *s, int debug); -int SSL_cache_hit(SSL *s); -int SSL_is_server(SSL *s); - -SSL_CONF_CTX *SSL_CONF_CTX_new(void); -int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); -void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); -unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags); -unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, unsigned int flags); -int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre); - -void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl); -void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx); - -int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value); -int SSL_CONF_cmd_argv(SSL_CONF_CTX *cctx, int *pargc, char ***pargv); -int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd); - -# ifndef OPENSSL_NO_SSL_TRACE -void SSL_trace(int write_p, int version, int content_type, - const void *buf, size_t len, SSL *ssl, void *arg); -const char *SSL_CIPHER_standard_name(const SSL_CIPHER *c); -# endif - -# ifndef OPENSSL_NO_UNIT_TEST -const struct openssl_ssl_test_functions *SSL_test_functions(void); -# endif - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_SSL_strings(void); - -/* Error codes for the SSL functions. */ - -/* Function codes. */ -# define SSL_F_CHECK_SUITEB_CIPHER_LIST 331 -# define SSL_F_CLIENT_CERTIFICATE 100 -# define SSL_F_CLIENT_FINISHED 167 -# define SSL_F_CLIENT_HELLO 101 -# define SSL_F_CLIENT_MASTER_KEY 102 -# define SSL_F_D2I_SSL_SESSION 103 -# define SSL_F_DO_DTLS1_WRITE 245 -# define SSL_F_DO_SSL3_WRITE 104 -# define SSL_F_DTLS1_ACCEPT 246 -# define SSL_F_DTLS1_ADD_CERT_TO_BUF 295 -# define SSL_F_DTLS1_BUFFER_RECORD 247 -# define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 316 -# define SSL_F_DTLS1_CLIENT_HELLO 248 -# define SSL_F_DTLS1_CONNECT 249 -# define SSL_F_DTLS1_ENC 250 -# define SSL_F_DTLS1_GET_HELLO_VERIFY 251 -# define SSL_F_DTLS1_GET_MESSAGE 252 -# define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT 253 -# define SSL_F_DTLS1_GET_RECORD 254 -# define SSL_F_DTLS1_HANDLE_TIMEOUT 297 -# define SSL_F_DTLS1_HEARTBEAT 305 -# define SSL_F_DTLS1_OUTPUT_CERT_CHAIN 255 -# define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 -# define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 -# define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE 256 -# define SSL_F_DTLS1_PROCESS_RECORD 257 -# define SSL_F_DTLS1_READ_BYTES 258 -# define SSL_F_DTLS1_READ_FAILED 259 -# define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST 260 -# define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE 261 -# define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE 262 -# define SSL_F_DTLS1_SEND_CLIENT_VERIFY 263 -# define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST 264 -# define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE 265 -# define SSL_F_DTLS1_SEND_SERVER_HELLO 266 -# define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE 267 -# define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268 -# define SSL_F_GET_CLIENT_FINISHED 105 -# define SSL_F_GET_CLIENT_HELLO 106 -# define SSL_F_GET_CLIENT_MASTER_KEY 107 -# define SSL_F_GET_SERVER_FINISHED 108 -# define SSL_F_GET_SERVER_HELLO 109 -# define SSL_F_GET_SERVER_STATIC_DH_KEY 340 -# define SSL_F_GET_SERVER_VERIFY 110 -# define SSL_F_I2D_SSL_SESSION 111 -# define SSL_F_READ_N 112 -# define SSL_F_REQUEST_CERTIFICATE 113 -# define SSL_F_SERVER_FINISH 239 -# define SSL_F_SERVER_HELLO 114 -# define SSL_F_SERVER_VERIFY 240 -# define SSL_F_SSL23_ACCEPT 115 -# define SSL_F_SSL23_CLIENT_HELLO 116 -# define SSL_F_SSL23_CONNECT 117 -# define SSL_F_SSL23_GET_CLIENT_HELLO 118 -# define SSL_F_SSL23_GET_SERVER_HELLO 119 -# define SSL_F_SSL23_PEEK 237 -# define SSL_F_SSL23_READ 120 -# define SSL_F_SSL23_WRITE 121 -# define SSL_F_SSL2_ACCEPT 122 -# define SSL_F_SSL2_CONNECT 123 -# define SSL_F_SSL2_ENC_INIT 124 -# define SSL_F_SSL2_GENERATE_KEY_MATERIAL 241 -# define SSL_F_SSL2_PEEK 234 -# define SSL_F_SSL2_READ 125 -# define SSL_F_SSL2_READ_INTERNAL 236 -# define SSL_F_SSL2_SET_CERTIFICATE 126 -# define SSL_F_SSL2_WRITE 127 -# define SSL_F_SSL3_ACCEPT 128 -# define SSL_F_SSL3_ADD_CERT_TO_BUF 296 -# define SSL_F_SSL3_CALLBACK_CTRL 233 -# define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 -# define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 -# define SSL_F_SSL3_CHECK_CLIENT_HELLO 304 -# define SSL_F_SSL3_CHECK_FINISHED 339 -# define SSL_F_SSL3_CLIENT_HELLO 131 -# define SSL_F_SSL3_CONNECT 132 -# define SSL_F_SSL3_CTRL 213 -# define SSL_F_SSL3_CTX_CTRL 133 -# define SSL_F_SSL3_DIGEST_CACHED_RECORDS 293 -# define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC 292 -# define SSL_F_SSL3_ENC 134 -# define SSL_F_SSL3_GENERATE_KEY_BLOCK 238 -# define SSL_F_SSL3_GENERATE_MASTER_SECRET 388 -# define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135 -# define SSL_F_SSL3_GET_CERT_STATUS 289 -# define SSL_F_SSL3_GET_CERT_VERIFY 136 -# define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137 -# define SSL_F_SSL3_GET_CLIENT_HELLO 138 -# define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE 139 -# define SSL_F_SSL3_GET_FINISHED 140 -# define SSL_F_SSL3_GET_KEY_EXCHANGE 141 -# define SSL_F_SSL3_GET_MESSAGE 142 -# define SSL_F_SSL3_GET_NEW_SESSION_TICKET 283 -# define SSL_F_SSL3_GET_NEXT_PROTO 306 -# define SSL_F_SSL3_GET_RECORD 143 -# define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144 -# define SSL_F_SSL3_GET_SERVER_DONE 145 -# define SSL_F_SSL3_GET_SERVER_HELLO 146 -# define SSL_F_SSL3_HANDSHAKE_MAC 285 -# define SSL_F_SSL3_NEW_SESSION_TICKET 287 -# define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 -# define SSL_F_SSL3_PEEK 235 -# define SSL_F_SSL3_READ_BYTES 148 -# define SSL_F_SSL3_READ_N 149 -# define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST 150 -# define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE 151 -# define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE 152 -# define SSL_F_SSL3_SEND_CLIENT_VERIFY 153 -# define SSL_F_SSL3_SEND_SERVER_CERTIFICATE 154 -# define SSL_F_SSL3_SEND_SERVER_HELLO 242 -# define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE 155 -# define SSL_F_SSL3_SETUP_KEY_BLOCK 157 -# define SSL_F_SSL3_SETUP_READ_BUFFER 156 -# define SSL_F_SSL3_SETUP_WRITE_BUFFER 291 -# define SSL_F_SSL3_WRITE_BYTES 158 -# define SSL_F_SSL3_WRITE_PENDING 159 -# define SSL_F_SSL_ADD_CERT_CHAIN 318 -# define SSL_F_SSL_ADD_CERT_TO_BUF 319 -# define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT 298 -# define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 277 -# define SSL_F_SSL_ADD_CLIENTHELLO_USE_SRTP_EXT 307 -# define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 -# define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 -# define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT 299 -# define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 278 -# define SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT 308 -# define SSL_F_SSL_BAD_METHOD 160 -# define SSL_F_SSL_BUILD_CERT_CHAIN 332 -# define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 -# define SSL_F_SSL_CERT_DUP 221 -# define SSL_F_SSL_CERT_INST 222 -# define SSL_F_SSL_CERT_INSTANTIATE 214 -# define SSL_F_SSL_CERT_NEW 162 -# define SSL_F_SSL_CHECK_PRIVATE_KEY 163 -# define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 280 -# define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279 -# define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 -# define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 -# define SSL_F_SSL_CLEAR 164 -# define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 -# define SSL_F_SSL_CONF_CMD 334 -# define SSL_F_SSL_CREATE_CIPHER_LIST 166 -# define SSL_F_SSL_CTRL 232 -# define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168 -# define SSL_F_SSL_CTX_MAKE_PROFILES 309 -# define SSL_F_SSL_CTX_NEW 169 -# define SSL_F_SSL_CTX_SET_CIPHER_LIST 269 -# define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE 290 -# define SSL_F_SSL_CTX_SET_PURPOSE 226 -# define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219 -# define SSL_F_SSL_CTX_SET_SSL_VERSION 170 -# define SSL_F_SSL_CTX_SET_TRUST 229 -# define SSL_F_SSL_CTX_USE_CERTIFICATE 171 -# define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172 -# define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE 220 -# define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173 -# define SSL_F_SSL_CTX_USE_PRIVATEKEY 174 -# define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175 -# define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176 -# define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT 272 -# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177 -# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178 -# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179 -# define SSL_F_SSL_CTX_USE_SERVERINFO 336 -# define SSL_F_SSL_CTX_USE_SERVERINFO_FILE 337 -# define SSL_F_SSL_DO_HANDSHAKE 180 -# define SSL_F_SSL_GET_NEW_SESSION 181 -# define SSL_F_SSL_GET_PREV_SESSION 217 -# define SSL_F_SSL_GET_SERVER_CERT_INDEX 322 -# define SSL_F_SSL_GET_SERVER_SEND_CERT 182 -# define SSL_F_SSL_GET_SERVER_SEND_PKEY 317 -# define SSL_F_SSL_GET_SIGN_PKEY 183 -# define SSL_F_SSL_INIT_WBIO_BUFFER 184 -# define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 -# define SSL_F_SSL_NEW 186 -# define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT 300 -# define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT 302 -# define SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT 310 -# define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT 301 -# define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT 303 -# define SSL_F_SSL_PARSE_SERVERHELLO_USE_SRTP_EXT 311 -# define SSL_F_SSL_PEEK 270 -# define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT 281 -# define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT 282 -# define SSL_F_SSL_READ 223 -# define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187 -# define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188 -# define SSL_F_SSL_SCAN_CLIENTHELLO_TLSEXT 320 -# define SSL_F_SSL_SCAN_SERVERHELLO_TLSEXT 321 -# define SSL_F_SSL_SESSION_DUP 348 -# define SSL_F_SSL_SESSION_NEW 189 -# define SSL_F_SSL_SESSION_PRINT_FP 190 -# define SSL_F_SSL_SESSION_SET1_ID_CONTEXT 312 -# define SSL_F_SSL_SESS_CERT_NEW 225 -# define SSL_F_SSL_SET_CERT 191 -# define SSL_F_SSL_SET_CIPHER_LIST 271 -# define SSL_F_SSL_SET_FD 192 -# define SSL_F_SSL_SET_PKEY 193 -# define SSL_F_SSL_SET_PURPOSE 227 -# define SSL_F_SSL_SET_RFD 194 -# define SSL_F_SSL_SET_SESSION 195 -# define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218 -# define SSL_F_SSL_SET_SESSION_TICKET_EXT 294 -# define SSL_F_SSL_SET_TRUST 228 -# define SSL_F_SSL_SET_WFD 196 -# define SSL_F_SSL_SHUTDOWN 224 -# define SSL_F_SSL_SRP_CTX_INIT 313 -# define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243 -# define SSL_F_SSL_UNDEFINED_FUNCTION 197 -# define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244 -# define SSL_F_SSL_USE_CERTIFICATE 198 -# define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 -# define SSL_F_SSL_USE_CERTIFICATE_FILE 200 -# define SSL_F_SSL_USE_PRIVATEKEY 201 -# define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202 -# define SSL_F_SSL_USE_PRIVATEKEY_FILE 203 -# define SSL_F_SSL_USE_PSK_IDENTITY_HINT 273 -# define SSL_F_SSL_USE_RSAPRIVATEKEY 204 -# define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205 -# define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206 -# define SSL_F_SSL_VERIFY_CERT_CHAIN 207 -# define SSL_F_SSL_WRITE 208 -# define SSL_F_TLS12_CHECK_PEER_SIGALG 333 -# define SSL_F_TLS1_CERT_VERIFY_MAC 286 -# define SSL_F_TLS1_CHANGE_CIPHER_STATE 209 -# define SSL_F_TLS1_CHECK_SERVERHELLO_TLSEXT 274 -# define SSL_F_TLS1_ENC 210 -# define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314 -# define SSL_F_TLS1_GET_CURVELIST 338 -# define SSL_F_TLS1_HEARTBEAT 315 -# define SSL_F_TLS1_PREPARE_CLIENTHELLO_TLSEXT 275 -# define SSL_F_TLS1_PREPARE_SERVERHELLO_TLSEXT 276 -# define SSL_F_TLS1_PRF 284 -# define SSL_F_TLS1_SETUP_KEY_BLOCK 211 -# define SSL_F_TLS1_SET_SERVER_SIGALGS 335 -# define SSL_F_WRITE_PENDING 212 - -/* Reason codes. */ -# define SSL_R_APP_DATA_IN_HANDSHAKE 100 -# define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272 -# define SSL_R_BAD_ALERT_RECORD 101 -# define SSL_R_BAD_AUTHENTICATION_TYPE 102 -# define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 -# define SSL_R_BAD_CHECKSUM 104 -# define SSL_R_BAD_DATA 390 -# define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 -# define SSL_R_BAD_DECOMPRESSION 107 -# define SSL_R_BAD_DH_G_LENGTH 108 -# define SSL_R_BAD_DH_G_VALUE 375 -# define SSL_R_BAD_DH_PUB_KEY_LENGTH 109 -# define SSL_R_BAD_DH_PUB_KEY_VALUE 393 -# define SSL_R_BAD_DH_P_LENGTH 110 -# define SSL_R_BAD_DH_P_VALUE 395 -# define SSL_R_BAD_DIGEST_LENGTH 111 -# define SSL_R_BAD_DSA_SIGNATURE 112 -# define SSL_R_BAD_ECC_CERT 304 -# define SSL_R_BAD_ECDSA_SIGNATURE 305 -# define SSL_R_BAD_ECPOINT 306 -# define SSL_R_BAD_HANDSHAKE_LENGTH 332 -# define SSL_R_BAD_HELLO_REQUEST 105 -# define SSL_R_BAD_LENGTH 271 -# define SSL_R_BAD_MAC_DECODE 113 -# define SSL_R_BAD_MAC_LENGTH 333 -# define SSL_R_BAD_MESSAGE_TYPE 114 -# define SSL_R_BAD_PACKET_LENGTH 115 -# define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116 -# define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH 316 -# define SSL_R_BAD_RESPONSE_ARGUMENT 117 -# define SSL_R_BAD_RSA_DECRYPT 118 -# define SSL_R_BAD_RSA_ENCRYPT 119 -# define SSL_R_BAD_RSA_E_LENGTH 120 -# define SSL_R_BAD_RSA_MODULUS_LENGTH 121 -# define SSL_R_BAD_RSA_SIGNATURE 122 -# define SSL_R_BAD_SIGNATURE 123 -# define SSL_R_BAD_SRP_A_LENGTH 347 -# define SSL_R_BAD_SRP_B_LENGTH 348 -# define SSL_R_BAD_SRP_G_LENGTH 349 -# define SSL_R_BAD_SRP_N_LENGTH 350 -# define SSL_R_BAD_SRP_PARAMETERS 371 -# define SSL_R_BAD_SRP_S_LENGTH 351 -# define SSL_R_BAD_SRTP_MKI_VALUE 352 -# define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST 353 -# define SSL_R_BAD_SSL_FILETYPE 124 -# define SSL_R_BAD_SSL_SESSION_ID_LENGTH 125 -# define SSL_R_BAD_STATE 126 -# define SSL_R_BAD_VALUE 384 -# define SSL_R_BAD_WRITE_RETRY 127 -# define SSL_R_BIO_NOT_SET 128 -# define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129 -# define SSL_R_BN_LIB 130 -# define SSL_R_CA_DN_LENGTH_MISMATCH 131 -# define SSL_R_CA_DN_TOO_LONG 132 -# define SSL_R_CCS_RECEIVED_EARLY 133 -# define SSL_R_CERTIFICATE_VERIFY_FAILED 134 -# define SSL_R_CERT_CB_ERROR 377 -# define SSL_R_CERT_LENGTH_MISMATCH 135 -# define SSL_R_CHALLENGE_IS_DIFFERENT 136 -# define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 -# define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 -# define SSL_R_CIPHER_TABLE_SRC_ERROR 139 -# define SSL_R_CLIENTHELLO_TLSEXT 226 -# define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 -# define SSL_R_COMPRESSION_DISABLED 343 -# define SSL_R_COMPRESSION_FAILURE 141 -# define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307 -# define SSL_R_COMPRESSION_LIBRARY_ERROR 142 -# define SSL_R_CONNECTION_ID_IS_DIFFERENT 143 -# define SSL_R_CONNECTION_TYPE_NOT_SET 144 -# define SSL_R_COOKIE_MISMATCH 308 -# define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145 -# define SSL_R_DATA_LENGTH_TOO_LONG 146 -# define SSL_R_DECRYPTION_FAILED 147 -# define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281 -# define SSL_R_DH_KEY_TOO_SMALL 372 -# define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 -# define SSL_R_DIGEST_CHECK_FAILED 149 -# define SSL_R_DTLS_MESSAGE_TOO_BIG 334 -# define SSL_R_DUPLICATE_COMPRESSION_ID 309 -# define SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT 317 -# define SSL_R_ECC_CERT_NOT_FOR_SIGNING 318 -# define SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE 322 -# define SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE 323 -# define SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE 374 -# define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER 310 -# define SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST 354 -# define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 -# define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 282 -# define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 -# define SSL_R_EXCESSIVE_MESSAGE_SIZE 152 -# define SSL_R_EXTRA_DATA_IN_MESSAGE 153 -# define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154 -# define SSL_R_GOT_NEXT_PROTO_BEFORE_A_CCS 355 -# define SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION 356 -# define SSL_R_HTTPS_PROXY_REQUEST 155 -# define SSL_R_HTTP_REQUEST 156 -# define SSL_R_ILLEGAL_PADDING 283 -# define SSL_R_ILLEGAL_SUITEB_DIGEST 380 -# define SSL_R_INAPPROPRIATE_FALLBACK 373 -# define SSL_R_INCONSISTENT_COMPRESSION 340 -# define SSL_R_INVALID_CHALLENGE_LENGTH 158 -# define SSL_R_INVALID_COMMAND 280 -# define SSL_R_INVALID_COMPRESSION_ALGORITHM 341 -# define SSL_R_INVALID_NULL_CMD_NAME 385 -# define SSL_R_INVALID_PURPOSE 278 -# define SSL_R_INVALID_SERVERINFO_DATA 388 -# define SSL_R_INVALID_SRP_USERNAME 357 -# define SSL_R_INVALID_STATUS_RESPONSE 328 -# define SSL_R_INVALID_TICKET_KEYS_LENGTH 325 -# define SSL_R_INVALID_TRUST 279 -# define SSL_R_KEY_ARG_TOO_LONG 284 -# define SSL_R_KRB5 285 -# define SSL_R_KRB5_C_CC_PRINC 286 -# define SSL_R_KRB5_C_GET_CRED 287 -# define SSL_R_KRB5_C_INIT 288 -# define SSL_R_KRB5_C_MK_REQ 289 -# define SSL_R_KRB5_S_BAD_TICKET 290 -# define SSL_R_KRB5_S_INIT 291 -# define SSL_R_KRB5_S_RD_REQ 292 -# define SSL_R_KRB5_S_TKT_EXPIRED 293 -# define SSL_R_KRB5_S_TKT_NYV 294 -# define SSL_R_KRB5_S_TKT_SKEW 295 -# define SSL_R_LENGTH_MISMATCH 159 -# define SSL_R_LENGTH_TOO_SHORT 160 -# define SSL_R_LIBRARY_BUG 274 -# define SSL_R_LIBRARY_HAS_NO_CIPHERS 161 -# define SSL_R_MESSAGE_TOO_LONG 296 -# define SSL_R_MISSING_DH_DSA_CERT 162 -# define SSL_R_MISSING_DH_KEY 163 -# define SSL_R_MISSING_DH_RSA_CERT 164 -# define SSL_R_MISSING_DSA_SIGNING_CERT 165 -# define SSL_R_MISSING_ECDH_CERT 382 -# define SSL_R_MISSING_ECDSA_SIGNING_CERT 381 -# define SSL_R_MISSING_EXPORT_TMP_DH_KEY 166 -# define SSL_R_MISSING_EXPORT_TMP_RSA_KEY 167 -# define SSL_R_MISSING_RSA_CERTIFICATE 168 -# define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 -# define SSL_R_MISSING_RSA_SIGNING_CERT 170 -# define SSL_R_MISSING_SRP_PARAM 358 -# define SSL_R_MISSING_TMP_DH_KEY 171 -# define SSL_R_MISSING_TMP_ECDH_KEY 311 -# define SSL_R_MISSING_TMP_RSA_KEY 172 -# define SSL_R_MISSING_TMP_RSA_PKEY 173 -# define SSL_R_MISSING_VERIFY_MESSAGE 174 -# define SSL_R_MULTIPLE_SGC_RESTARTS 346 -# define SSL_R_NON_SSLV2_INITIAL_PACKET 175 -# define SSL_R_NO_CERTIFICATES_RETURNED 176 -# define SSL_R_NO_CERTIFICATE_ASSIGNED 177 -# define SSL_R_NO_CERTIFICATE_RETURNED 178 -# define SSL_R_NO_CERTIFICATE_SET 179 -# define SSL_R_NO_CERTIFICATE_SPECIFIED 180 -# define SSL_R_NO_CIPHERS_AVAILABLE 181 -# define SSL_R_NO_CIPHERS_PASSED 182 -# define SSL_R_NO_CIPHERS_SPECIFIED 183 -# define SSL_R_NO_CIPHER_LIST 184 -# define SSL_R_NO_CIPHER_MATCH 185 -# define SSL_R_NO_CLIENT_CERT_METHOD 331 -# define SSL_R_NO_CLIENT_CERT_RECEIVED 186 -# define SSL_R_NO_COMPRESSION_SPECIFIED 187 -# define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER 330 -# define SSL_R_NO_METHOD_SPECIFIED 188 -# define SSL_R_NO_PEM_EXTENSIONS 389 -# define SSL_R_NO_PRIVATEKEY 189 -# define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190 -# define SSL_R_NO_PROTOCOLS_AVAILABLE 191 -# define SSL_R_NO_PUBLICKEY 192 -# define SSL_R_NO_RENEGOTIATION 339 -# define SSL_R_NO_REQUIRED_DIGEST 324 -# define SSL_R_NO_SHARED_CIPHER 193 -# define SSL_R_NO_SHARED_SIGATURE_ALGORITHMS 376 -# define SSL_R_NO_SRTP_PROFILES 359 -# define SSL_R_NO_VERIFY_CALLBACK 194 -# define SSL_R_NULL_SSL_CTX 195 -# define SSL_R_NULL_SSL_METHOD_PASSED 196 -# define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 -# define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344 -# define SSL_R_ONLY_DTLS_1_2_ALLOWED_IN_SUITEB_MODE 387 -# define SSL_R_ONLY_TLS_1_2_ALLOWED_IN_SUITEB_MODE 379 -# define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 297 -# define SSL_R_OPAQUE_PRF_INPUT_TOO_LONG 327 -# define SSL_R_PACKET_LENGTH_TOO_LONG 198 -# define SSL_R_PARSE_TLSEXT 227 -# define SSL_R_PATH_TOO_LONG 270 -# define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 -# define SSL_R_PEER_ERROR 200 -# define SSL_R_PEER_ERROR_CERTIFICATE 201 -# define SSL_R_PEER_ERROR_NO_CERTIFICATE 202 -# define SSL_R_PEER_ERROR_NO_CIPHER 203 -# define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 204 -# define SSL_R_PEM_NAME_BAD_PREFIX 391 -# define SSL_R_PEM_NAME_TOO_SHORT 392 -# define SSL_R_PRE_MAC_LENGTH_TOO_LONG 205 -# define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 206 -# define SSL_R_PROTOCOL_IS_SHUTDOWN 207 -# define SSL_R_PSK_IDENTITY_NOT_FOUND 223 -# define SSL_R_PSK_NO_CLIENT_CB 224 -# define SSL_R_PSK_NO_SERVER_CB 225 -# define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR 208 -# define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209 -# define SSL_R_PUBLIC_KEY_NOT_RSA 210 -# define SSL_R_READ_BIO_NOT_SET 211 -# define SSL_R_READ_TIMEOUT_EXPIRED 312 -# define SSL_R_READ_WRONG_PACKET_TYPE 212 -# define SSL_R_RECORD_LENGTH_MISMATCH 213 -# define SSL_R_RECORD_TOO_LARGE 214 -# define SSL_R_RECORD_TOO_SMALL 298 -# define SSL_R_RENEGOTIATE_EXT_TOO_LONG 335 -# define SSL_R_RENEGOTIATION_ENCODING_ERR 336 -# define SSL_R_RENEGOTIATION_MISMATCH 337 -# define SSL_R_REQUIRED_CIPHER_MISSING 215 -# define SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING 342 -# define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 -# define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 -# define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218 -# define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING 345 -# define SSL_R_SERVERHELLO_TLSEXT 275 -# define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 -# define SSL_R_SHORT_READ 219 -# define SSL_R_SHUTDOWN_WHILE_IN_INIT 407 -# define SSL_R_SIGNATURE_ALGORITHMS_ERROR 360 -# define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 -# define SSL_R_SRP_A_CALC 361 -# define SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES 362 -# define SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG 363 -# define SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE 364 -# define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221 -# define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 299 -# define SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT 321 -# define SSL_R_SSL3_EXT_INVALID_SERVERNAME 319 -# define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 320 -# define SSL_R_SSL3_SESSION_ID_TOO_LONG 300 -# define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222 -# define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 -# define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 -# define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 -# define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 -# define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 -# define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 -# define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 -# define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 -# define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 -# define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 -# define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 -# define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228 -# define SSL_R_SSL_HANDSHAKE_FAILURE 229 -# define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230 -# define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 301 -# define SSL_R_SSL_SESSION_ID_CONFLICT 302 -# define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273 -# define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 303 -# define SSL_R_SSL_SESSION_ID_IS_DIFFERENT 231 -# define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 -# define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 -# define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 -# define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 -# define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060 -# define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086 -# define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 -# define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 -# define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 -# define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 -# define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 -# define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 -# define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 -# define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114 -# define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113 -# define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111 -# define SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 -# define SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 -# define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232 -# define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT 365 -# define SSL_R_TLS_HEARTBEAT_PENDING 366 -# define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL 367 -# define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 157 -# define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233 -# define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234 -# define SSL_R_TOO_MANY_WARN_ALERTS 409 -# define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235 -# define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236 -# define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS 313 -# define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237 -# define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238 -# define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314 -# define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 -# define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240 -# define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241 -# define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242 -# define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 -# define SSL_R_UNEXPECTED_MESSAGE 244 -# define SSL_R_UNEXPECTED_RECORD 245 -# define SSL_R_UNINITIALIZED 276 -# define SSL_R_UNKNOWN_ALERT_TYPE 246 -# define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247 -# define SSL_R_UNKNOWN_CIPHER_RETURNED 248 -# define SSL_R_UNKNOWN_CIPHER_TYPE 249 -# define SSL_R_UNKNOWN_CMD_NAME 386 -# define SSL_R_UNKNOWN_DIGEST 368 -# define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250 -# define SSL_R_UNKNOWN_PKEY_TYPE 251 -# define SSL_R_UNKNOWN_PROTOCOL 252 -# define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE 253 -# define SSL_R_UNKNOWN_SSL_VERSION 254 -# define SSL_R_UNKNOWN_STATE 255 -# define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED 338 -# define SSL_R_UNSUPPORTED_CIPHER 256 -# define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 -# define SSL_R_UNSUPPORTED_DIGEST_TYPE 326 -# define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315 -# define SSL_R_UNSUPPORTED_PROTOCOL 258 -# define SSL_R_UNSUPPORTED_SSL_VERSION 259 -# define SSL_R_UNSUPPORTED_STATUS_TYPE 329 -# define SSL_R_USE_SRTP_NOT_NEGOTIATED 369 -# define SSL_R_WRITE_BIO_NOT_SET 260 -# define SSL_R_WRONG_CERTIFICATE_TYPE 383 -# define SSL_R_WRONG_CIPHER_RETURNED 261 -# define SSL_R_WRONG_CURVE 378 -# define SSL_R_WRONG_MESSAGE_TYPE 262 -# define SSL_R_WRONG_NUMBER_OF_KEY_BITS 263 -# define SSL_R_WRONG_SIGNATURE_LENGTH 264 -# define SSL_R_WRONG_SIGNATURE_SIZE 265 -# define SSL_R_WRONG_SIGNATURE_TYPE 370 -# define SSL_R_WRONG_SSL_VERSION 266 -# define SSL_R_WRONG_VERSION_NUMBER 267 -# define SSL_R_X509_LIB 268 -# define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * Copyright 2005 Nokia. All rights reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SSL_H +# define HEADER_SSL_H + +# include +# include +# include +# include +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# include +# include +# endif +# include +# include +# include +# include + +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* OpenSSL version number for ASN.1 encoding of the session information */ +/*- + * Version 0 - initial version + * Version 1 - added the optional peer certificate + */ +# define SSL_SESSION_ASN1_VERSION 0x0001 + +# define SSL_MAX_SSL_SESSION_ID_LENGTH 32 +# define SSL_MAX_SID_CTX_LENGTH 32 + +# define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8) +# define SSL_MAX_KEY_ARG_LENGTH 8 +# define SSL_MAX_MASTER_KEY_LENGTH 48 + +/* The maximum number of encrypt/decrypt pipelines we can support */ +# define SSL_MAX_PIPELINES 32 + +/* text strings for the ciphers */ + +/* These are used to specify which ciphers to use and not to use */ + +# define SSL_TXT_LOW "LOW" +# define SSL_TXT_MEDIUM "MEDIUM" +# define SSL_TXT_HIGH "HIGH" +# define SSL_TXT_FIPS "FIPS" + +# define SSL_TXT_aNULL "aNULL" +# define SSL_TXT_eNULL "eNULL" +# define SSL_TXT_NULL "NULL" + +# define SSL_TXT_kRSA "kRSA" +# define SSL_TXT_kDHr "kDHr"/* this cipher class has been removed */ +# define SSL_TXT_kDHd "kDHd"/* this cipher class has been removed */ +# define SSL_TXT_kDH "kDH"/* this cipher class has been removed */ +# define SSL_TXT_kEDH "kEDH"/* alias for kDHE */ +# define SSL_TXT_kDHE "kDHE" +# define SSL_TXT_kECDHr "kECDHr"/* this cipher class has been removed */ +# define SSL_TXT_kECDHe "kECDHe"/* this cipher class has been removed */ +# define SSL_TXT_kECDH "kECDH"/* this cipher class has been removed */ +# define SSL_TXT_kEECDH "kEECDH"/* alias for kECDHE */ +# define SSL_TXT_kECDHE "kECDHE" +# define SSL_TXT_kPSK "kPSK" +# define SSL_TXT_kRSAPSK "kRSAPSK" +# define SSL_TXT_kECDHEPSK "kECDHEPSK" +# define SSL_TXT_kDHEPSK "kDHEPSK" +# define SSL_TXT_kGOST "kGOST" +# define SSL_TXT_kSRP "kSRP" + +# define SSL_TXT_aRSA "aRSA" +# define SSL_TXT_aDSS "aDSS" +# define SSL_TXT_aDH "aDH"/* this cipher class has been removed */ +# define SSL_TXT_aECDH "aECDH"/* this cipher class has been removed */ +# define SSL_TXT_aECDSA "aECDSA" +# define SSL_TXT_aPSK "aPSK" +# define SSL_TXT_aGOST94 "aGOST94" +# define SSL_TXT_aGOST01 "aGOST01" +# define SSL_TXT_aGOST12 "aGOST12" +# define SSL_TXT_aGOST "aGOST" +# define SSL_TXT_aSRP "aSRP" + +# define SSL_TXT_DSS "DSS" +# define SSL_TXT_DH "DH" +# define SSL_TXT_DHE "DHE"/* same as "kDHE:-ADH" */ +# define SSL_TXT_EDH "EDH"/* alias for DHE */ +# define SSL_TXT_ADH "ADH" +# define SSL_TXT_RSA "RSA" +# define SSL_TXT_ECDH "ECDH" +# define SSL_TXT_EECDH "EECDH"/* alias for ECDHE" */ +# define SSL_TXT_ECDHE "ECDHE"/* same as "kECDHE:-AECDH" */ +# define SSL_TXT_AECDH "AECDH" +# define SSL_TXT_ECDSA "ECDSA" +# define SSL_TXT_PSK "PSK" +# define SSL_TXT_SRP "SRP" + +# define SSL_TXT_DES "DES" +# define SSL_TXT_3DES "3DES" +# define SSL_TXT_RC4 "RC4" +# define SSL_TXT_RC2 "RC2" +# define SSL_TXT_IDEA "IDEA" +# define SSL_TXT_SEED "SEED" +# define SSL_TXT_AES128 "AES128" +# define SSL_TXT_AES256 "AES256" +# define SSL_TXT_AES "AES" +# define SSL_TXT_AES_GCM "AESGCM" +# define SSL_TXT_AES_CCM "AESCCM" +# define SSL_TXT_AES_CCM_8 "AESCCM8" +# define SSL_TXT_CAMELLIA128 "CAMELLIA128" +# define SSL_TXT_CAMELLIA256 "CAMELLIA256" +# define SSL_TXT_CAMELLIA "CAMELLIA" +# define SSL_TXT_CHACHA20 "CHACHA20" +# define SSL_TXT_GOST "GOST89" +# define SSL_TXT_ARIA "ARIA" +# define SSL_TXT_ARIA_GCM "ARIAGCM" +# define SSL_TXT_ARIA128 "ARIA128" +# define SSL_TXT_ARIA256 "ARIA256" + +# define SSL_TXT_MD5 "MD5" +# define SSL_TXT_SHA1 "SHA1" +# define SSL_TXT_SHA "SHA"/* same as "SHA1" */ +# define SSL_TXT_GOST94 "GOST94" +# define SSL_TXT_GOST89MAC "GOST89MAC" +# define SSL_TXT_GOST12 "GOST12" +# define SSL_TXT_GOST89MAC12 "GOST89MAC12" +# define SSL_TXT_SHA256 "SHA256" +# define SSL_TXT_SHA384 "SHA384" + +# define SSL_TXT_SSLV3 "SSLv3" +# define SSL_TXT_TLSV1 "TLSv1" +# define SSL_TXT_TLSV1_1 "TLSv1.1" +# define SSL_TXT_TLSV1_2 "TLSv1.2" + +# define SSL_TXT_ALL "ALL" + +/*- + * COMPLEMENTOF* definitions. These identifiers are used to (de-select) + * ciphers normally not being used. + * Example: "RC4" will activate all ciphers using RC4 including ciphers + * without authentication, which would normally disabled by DEFAULT (due + * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT" + * will make sure that it is also disabled in the specific selection. + * COMPLEMENTOF* identifiers are portable between version, as adjustments + * to the default cipher setup will also be included here. + * + * COMPLEMENTOFDEFAULT does not experience the same special treatment that + * DEFAULT gets, as only selection is being done and no sorting as needed + * for DEFAULT. + */ +# define SSL_TXT_CMPALL "COMPLEMENTOFALL" +# define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT" + +/* + * The following cipher list is used by default. It also is substituted when + * an application-defined cipher list string starts with 'DEFAULT'. + * This applies to ciphersuites for TLSv1.2 and below. + */ +# define SSL_DEFAULT_CIPHER_LIST "ALL:!COMPLEMENTOFDEFAULT:!eNULL" +/* This is the default set of TLSv1.3 ciphersuites */ +# if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) +# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \ + "TLS_CHACHA20_POLY1305_SHA256:" \ + "TLS_AES_128_GCM_SHA256" +# else +# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \ + "TLS_AES_128_GCM_SHA256" +#endif +/* + * As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always + * starts with a reasonable order, and all we have to do for DEFAULT is + * throwing out anonymous and unencrypted ciphersuites! (The latter are not + * actually enabled by ALL, but "ALL:RSA" would enable some of them.) + */ + +/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */ +# define SSL_SENT_SHUTDOWN 1 +# define SSL_RECEIVED_SHUTDOWN 2 + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +# define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1 +# define SSL_FILETYPE_PEM X509_FILETYPE_PEM + +/* + * This is needed to stop compilers complaining about the 'struct ssl_st *' + * function parameters used to prototype callbacks in SSL_CTX. + */ +typedef struct ssl_st *ssl_crock_st; +typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT; +typedef struct ssl_method_st SSL_METHOD; +typedef struct ssl_cipher_st SSL_CIPHER; +typedef struct ssl_session_st SSL_SESSION; +typedef struct tls_sigalgs_st TLS_SIGALGS; +typedef struct ssl_conf_ctx_st SSL_CONF_CTX; +typedef struct ssl_comp_st SSL_COMP; + +STACK_OF(SSL_CIPHER); +STACK_OF(SSL_COMP); + +/* SRTP protection profiles for use with the use_srtp extension (RFC 5764)*/ +typedef struct srtp_protection_profile_st { + const char *name; + unsigned long id; +} SRTP_PROTECTION_PROFILE; + +DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE) + +typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data, + int len, void *arg); +typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len, + STACK_OF(SSL_CIPHER) *peer_ciphers, + const SSL_CIPHER **cipher, void *arg); + +/* Extension context codes */ +/* This extension is only allowed in TLS */ +#define SSL_EXT_TLS_ONLY 0x0001 +/* This extension is only allowed in DTLS */ +#define SSL_EXT_DTLS_ONLY 0x0002 +/* Some extensions may be allowed in DTLS but we don't implement them for it */ +#define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x0004 +/* Most extensions are not defined for SSLv3 but EXT_TYPE_renegotiate is */ +#define SSL_EXT_SSL3_ALLOWED 0x0008 +/* Extension is only defined for TLS1.2 and below */ +#define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x0010 +/* Extension is only defined for TLS1.3 and above */ +#define SSL_EXT_TLS1_3_ONLY 0x0020 +/* Ignore this extension during parsing if we are resuming */ +#define SSL_EXT_IGNORE_ON_RESUMPTION 0x0040 +#define SSL_EXT_CLIENT_HELLO 0x0080 +/* Really means TLS1.2 or below */ +#define SSL_EXT_TLS1_2_SERVER_HELLO 0x0100 +#define SSL_EXT_TLS1_3_SERVER_HELLO 0x0200 +#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x0400 +#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x0800 +#define SSL_EXT_TLS1_3_CERTIFICATE 0x1000 +#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x2000 +#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x4000 + +/* Typedefs for handling custom extensions */ + +typedef int (*custom_ext_add_cb)(SSL *s, unsigned int ext_type, + const unsigned char **out, size_t *outlen, + int *al, void *add_arg); + +typedef void (*custom_ext_free_cb)(SSL *s, unsigned int ext_type, + const unsigned char *out, void *add_arg); + +typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type, + const unsigned char *in, size_t inlen, + int *al, void *parse_arg); + + +typedef int (*SSL_custom_ext_add_cb_ex)(SSL *s, unsigned int ext_type, + unsigned int context, + const unsigned char **out, + size_t *outlen, X509 *x, + size_t chainidx, + int *al, void *add_arg); + +typedef void (*SSL_custom_ext_free_cb_ex)(SSL *s, unsigned int ext_type, + unsigned int context, + const unsigned char *out, + void *add_arg); + +typedef int (*SSL_custom_ext_parse_cb_ex)(SSL *s, unsigned int ext_type, + unsigned int context, + const unsigned char *in, + size_t inlen, X509 *x, + size_t chainidx, + int *al, void *parse_arg); + +/* Typedef for verification callback */ +typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx); + +/* + * Some values are reserved until OpenSSL 1.2.0 because they were previously + * included in SSL_OP_ALL in a 1.1.x release. + * + * Reserved value (until OpenSSL 1.2.0) 0x00000001U + * Reserved value (until OpenSSL 1.2.0) 0x00000002U + */ +/* Allow initial connection to servers that don't support RI */ +# define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004U + +/* Reserved value (until OpenSSL 1.2.0) 0x00000008U */ +# define SSL_OP_TLSEXT_PADDING 0x00000010U +/* Reserved value (until OpenSSL 1.2.0) 0x00000020U */ +# define SSL_OP_SAFARI_ECDHE_ECDSA_BUG 0x00000040U +/* + * Reserved value (until OpenSSL 1.2.0) 0x00000080U + * Reserved value (until OpenSSL 1.2.0) 0x00000100U + * Reserved value (until OpenSSL 1.2.0) 0x00000200U + */ + +/* In TLSv1.3 allow a non-(ec)dhe based kex_mode */ +# define SSL_OP_ALLOW_NO_DHE_KEX 0x00000400U + +/* + * Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added in + * OpenSSL 0.9.6d. Usually (depending on the application protocol) the + * workaround is not needed. Unfortunately some broken SSL/TLS + * implementations cannot handle it at all, which is why we include it in + * SSL_OP_ALL. Added in 0.9.6e + */ +# define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800U + +/* DTLS options */ +# define SSL_OP_NO_QUERY_MTU 0x00001000U +/* Turn on Cookie Exchange (on relevant for servers) */ +# define SSL_OP_COOKIE_EXCHANGE 0x00002000U +/* Don't use RFC4507 ticket extension */ +# define SSL_OP_NO_TICKET 0x00004000U +# ifndef OPENSSL_NO_DTLS1_METHOD +/* Use Cisco's "speshul" version of DTLS_BAD_VER + * (only with deprecated DTLSv1_client_method()) */ +# define SSL_OP_CISCO_ANYCONNECT 0x00008000U +# endif + +/* As server, disallow session resumption on renegotiation */ +# define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000U +/* Don't use compression even if supported */ +# define SSL_OP_NO_COMPRESSION 0x00020000U +/* Permit unsafe legacy renegotiation */ +# define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x00040000U +/* Disable encrypt-then-mac */ +# define SSL_OP_NO_ENCRYPT_THEN_MAC 0x00080000U + +/* + * Enable TLSv1.3 Compatibility mode. This is on by default. A future version + * of OpenSSL may have this disabled by default. + */ +# define SSL_OP_ENABLE_MIDDLEBOX_COMPAT 0x00100000U + +/* Prioritize Chacha20Poly1305 when client does. + * Modifies SSL_OP_CIPHER_SERVER_PREFERENCE */ +# define SSL_OP_PRIORITIZE_CHACHA 0x00200000U + +/* + * Set on servers to choose the cipher according to the server's preferences + */ +# define SSL_OP_CIPHER_SERVER_PREFERENCE 0x00400000U +/* + * If set, a server will allow a client to issue a SSLv3.0 version number as + * latest version supported in the premaster secret, even when TLSv1.0 + * (version 3.1) was announced in the client hello. Normally this is + * forbidden to prevent version rollback attacks. + */ +# define SSL_OP_TLS_ROLLBACK_BUG 0x00800000U + +/* + * Switches off automatic TLSv1.3 anti-replay protection for early data. This + * is a server-side option only (no effect on the client). + */ +# define SSL_OP_NO_ANTI_REPLAY 0x01000000U + +# define SSL_OP_NO_SSLv3 0x02000000U +# define SSL_OP_NO_TLSv1 0x04000000U +# define SSL_OP_NO_TLSv1_2 0x08000000U +# define SSL_OP_NO_TLSv1_1 0x10000000U +# define SSL_OP_NO_TLSv1_3 0x20000000U + +# define SSL_OP_NO_DTLSv1 0x04000000U +# define SSL_OP_NO_DTLSv1_2 0x08000000U + +# define SSL_OP_NO_SSL_MASK (SSL_OP_NO_SSLv3|\ + SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1|SSL_OP_NO_TLSv1_2|SSL_OP_NO_TLSv1_3) +# define SSL_OP_NO_DTLS_MASK (SSL_OP_NO_DTLSv1|SSL_OP_NO_DTLSv1_2) + +/* Disallow all renegotiation */ +# define SSL_OP_NO_RENEGOTIATION 0x40000000U + +/* + * Make server add server-hello extension from early version of cryptopro + * draft, when GOST ciphersuite is negotiated. Required for interoperability + * with CryptoPro CSP 3.x + */ +# define SSL_OP_CRYPTOPRO_TLSEXT_BUG 0x80000000U + +/* + * SSL_OP_ALL: various bug workarounds that should be rather harmless. + * This used to be 0x000FFFFFL before 0.9.7. + * This used to be 0x80000BFFU before 1.1.1. + */ +# define SSL_OP_ALL (SSL_OP_CRYPTOPRO_TLSEXT_BUG|\ + SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS|\ + SSL_OP_LEGACY_SERVER_CONNECT|\ + SSL_OP_TLSEXT_PADDING|\ + SSL_OP_SAFARI_ECDHE_ECDSA_BUG) + +/* OBSOLETE OPTIONS: retained for compatibility */ + +/* Removed from OpenSSL 1.1.0. Was 0x00000001L */ +/* Related to removed SSLv2. */ +# define SSL_OP_MICROSOFT_SESS_ID_BUG 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00000002L */ +/* Related to removed SSLv2. */ +# define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x0 +/* Removed from OpenSSL 0.9.8q and 1.0.0c. Was 0x00000008L */ +/* Dead forever, see CVE-2010-4180 */ +# define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x0 +/* Removed from OpenSSL 1.0.1h and 1.0.2. Was 0x00000010L */ +/* Refers to ancient SSLREF and SSLv2. */ +# define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00000020 */ +# define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x0 +/* Removed from OpenSSL 0.9.7h and 0.9.8b. Was 0x00000040L */ +# define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00000080 */ +/* Ancient SSLeay version. */ +# define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00000100L */ +# define SSL_OP_TLS_D5_BUG 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00000200L */ +# define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00080000L */ +# define SSL_OP_SINGLE_ECDH_USE 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x00100000L */ +# define SSL_OP_SINGLE_DH_USE 0x0 +/* Removed from OpenSSL 1.0.1k and 1.0.2. Was 0x00200000L */ +# define SSL_OP_EPHEMERAL_RSA 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x01000000L */ +# define SSL_OP_NO_SSLv2 0x0 +/* Removed from OpenSSL 1.0.1. Was 0x08000000L */ +# define SSL_OP_PKCS1_CHECK_1 0x0 +/* Removed from OpenSSL 1.0.1. Was 0x10000000L */ +# define SSL_OP_PKCS1_CHECK_2 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x20000000L */ +# define SSL_OP_NETSCAPE_CA_DN_BUG 0x0 +/* Removed from OpenSSL 1.1.0. Was 0x40000000L */ +# define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x0 + +/* + * Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success + * when just a single record has been written): + */ +# define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001U +/* + * Make it possible to retry SSL_write() with changed buffer location (buffer + * contents must stay the same!); this is not the default to avoid the + * misconception that non-blocking SSL_write() behaves like non-blocking + * write(): + */ +# define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U +/* + * Never bother the application with retries if the transport is blocking: + */ +# define SSL_MODE_AUTO_RETRY 0x00000004U +/* Don't attempt to automatically build certificate chain */ +# define SSL_MODE_NO_AUTO_CHAIN 0x00000008U +/* + * Save RAM by releasing read and write buffers when they're empty. (SSL3 and + * TLS only.) Released buffers are freed. + */ +# define SSL_MODE_RELEASE_BUFFERS 0x00000010U +/* + * Send the current time in the Random fields of the ClientHello and + * ServerHello records for compatibility with hypothetical implementations + * that require it. + */ +# define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U +# define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U +/* + * Send TLS_FALLBACK_SCSV in the ClientHello. To be set only by applications + * that reconnect with a downgraded protocol version; see + * draft-ietf-tls-downgrade-scsv-00 for details. DO NOT ENABLE THIS if your + * application attempts a normal handshake. Only use this in explicit + * fallback retries, following the guidance in + * draft-ietf-tls-downgrade-scsv-00. + */ +# define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U +/* + * Support Asynchronous operation + */ +# define SSL_MODE_ASYNC 0x00000100U + +/* + * When using DTLS/SCTP, include the terminating zero in the label + * used for computing the endpoint-pair shared secret. Required for + * interoperability with implementations having this bug like these + * older version of OpenSSL: + * - OpenSSL 1.0.0 series + * - OpenSSL 1.0.1 series + * - OpenSSL 1.0.2 series + * - OpenSSL 1.1.0 series + * - OpenSSL 1.1.1 and 1.1.1a + */ +# define SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG 0x00000400U + +/* Cert related flags */ +/* + * Many implementations ignore some aspects of the TLS standards such as + * enforcing certificate chain algorithms. When this is set we enforce them. + */ +# define SSL_CERT_FLAG_TLS_STRICT 0x00000001U + +/* Suite B modes, takes same values as certificate verify flags */ +# define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000 +/* Suite B 192 bit only mode */ +# define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000 +/* Suite B 128 bit mode allowing 192 bit algorithms */ +# define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000 + +/* Perform all sorts of protocol violations for testing purposes */ +# define SSL_CERT_FLAG_BROKEN_PROTOCOL 0x10000000 + +/* Flags for building certificate chains */ +/* Treat any existing certificates as untrusted CAs */ +# define SSL_BUILD_CHAIN_FLAG_UNTRUSTED 0x1 +/* Don't include root CA in chain */ +# define SSL_BUILD_CHAIN_FLAG_NO_ROOT 0x2 +/* Just check certificates already there */ +# define SSL_BUILD_CHAIN_FLAG_CHECK 0x4 +/* Ignore verification errors */ +# define SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR 0x8 +/* Clear verification errors from queue */ +# define SSL_BUILD_CHAIN_FLAG_CLEAR_ERROR 0x10 + +/* Flags returned by SSL_check_chain */ +/* Certificate can be used with this session */ +# define CERT_PKEY_VALID 0x1 +/* Certificate can also be used for signing */ +# define CERT_PKEY_SIGN 0x2 +/* EE certificate signing algorithm OK */ +# define CERT_PKEY_EE_SIGNATURE 0x10 +/* CA signature algorithms OK */ +# define CERT_PKEY_CA_SIGNATURE 0x20 +/* EE certificate parameters OK */ +# define CERT_PKEY_EE_PARAM 0x40 +/* CA certificate parameters OK */ +# define CERT_PKEY_CA_PARAM 0x80 +/* Signing explicitly allowed as opposed to SHA1 fallback */ +# define CERT_PKEY_EXPLICIT_SIGN 0x100 +/* Client CA issuer names match (always set for server cert) */ +# define CERT_PKEY_ISSUER_NAME 0x200 +/* Cert type matches client types (always set for server cert) */ +# define CERT_PKEY_CERT_TYPE 0x400 +/* Cert chain suitable to Suite B */ +# define CERT_PKEY_SUITEB 0x800 + +# define SSL_CONF_FLAG_CMDLINE 0x1 +# define SSL_CONF_FLAG_FILE 0x2 +# define SSL_CONF_FLAG_CLIENT 0x4 +# define SSL_CONF_FLAG_SERVER 0x8 +# define SSL_CONF_FLAG_SHOW_ERRORS 0x10 +# define SSL_CONF_FLAG_CERTIFICATE 0x20 +# define SSL_CONF_FLAG_REQUIRE_PRIVATE 0x40 +/* Configuration value types */ +# define SSL_CONF_TYPE_UNKNOWN 0x0 +# define SSL_CONF_TYPE_STRING 0x1 +# define SSL_CONF_TYPE_FILE 0x2 +# define SSL_CONF_TYPE_DIR 0x3 +# define SSL_CONF_TYPE_NONE 0x4 + +/* Maximum length of the application-controlled segment of a a TLSv1.3 cookie */ +# define SSL_COOKIE_LENGTH 4096 + +/* + * Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, they + * cannot be used to clear bits. + */ + +unsigned long SSL_CTX_get_options(const SSL_CTX *ctx); +unsigned long SSL_get_options(const SSL *s); +unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op); +unsigned long SSL_clear_options(SSL *s, unsigned long op); +unsigned long SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op); +unsigned long SSL_set_options(SSL *s, unsigned long op); + +# define SSL_CTX_set_mode(ctx,op) \ + SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL) +# define SSL_CTX_clear_mode(ctx,op) \ + SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL) +# define SSL_CTX_get_mode(ctx) \ + SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL) +# define SSL_clear_mode(ssl,op) \ + SSL_ctrl((ssl),SSL_CTRL_CLEAR_MODE,(op),NULL) +# define SSL_set_mode(ssl,op) \ + SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL) +# define SSL_get_mode(ssl) \ + SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL) +# define SSL_set_mtu(ssl, mtu) \ + SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL) +# define DTLS_set_link_mtu(ssl, mtu) \ + SSL_ctrl((ssl),DTLS_CTRL_SET_LINK_MTU,(mtu),NULL) +# define DTLS_get_link_min_mtu(ssl) \ + SSL_ctrl((ssl),DTLS_CTRL_GET_LINK_MIN_MTU,0,NULL) + +# define SSL_get_secure_renegotiation_support(ssl) \ + SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL) + +# ifndef OPENSSL_NO_HEARTBEATS +# define SSL_heartbeat(ssl) \ + SSL_ctrl((ssl),SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT,0,NULL) +# endif + +# define SSL_CTX_set_cert_flags(ctx,op) \ + SSL_CTX_ctrl((ctx),SSL_CTRL_CERT_FLAGS,(op),NULL) +# define SSL_set_cert_flags(s,op) \ + SSL_ctrl((s),SSL_CTRL_CERT_FLAGS,(op),NULL) +# define SSL_CTX_clear_cert_flags(ctx,op) \ + SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_CERT_FLAGS,(op),NULL) +# define SSL_clear_cert_flags(s,op) \ + SSL_ctrl((s),SSL_CTRL_CLEAR_CERT_FLAGS,(op),NULL) + +void SSL_CTX_set_msg_callback(SSL_CTX *ctx, + void (*cb) (int write_p, int version, + int content_type, const void *buf, + size_t len, SSL *ssl, void *arg)); +void SSL_set_msg_callback(SSL *ssl, + void (*cb) (int write_p, int version, + int content_type, const void *buf, + size_t len, SSL *ssl, void *arg)); +# define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) +# define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) + +# define SSL_get_extms_support(s) \ + SSL_ctrl((s),SSL_CTRL_GET_EXTMS_SUPPORT,0,NULL) + +# ifndef OPENSSL_NO_SRP + +/* see tls_srp.c */ +__owur int SSL_SRP_CTX_init(SSL *s); +__owur int SSL_CTX_SRP_CTX_init(SSL_CTX *ctx); +int SSL_SRP_CTX_free(SSL *ctx); +int SSL_CTX_SRP_CTX_free(SSL_CTX *ctx); +__owur int SSL_srp_server_param_with_username(SSL *s, int *ad); +__owur int SRP_Calc_A_param(SSL *s); + +# endif + +/* 100k max cert list */ +# define SSL_MAX_CERT_LIST_DEFAULT 1024*100 + +# define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) + +/* + * This callback type is used inside SSL_CTX, SSL, and in the functions that + * set them. It is used to override the generation of SSL/TLS session IDs in + * a server. Return value should be zero on an error, non-zero to proceed. + * Also, callbacks should themselves check if the id they generate is unique + * otherwise the SSL handshake will fail with an error - callbacks can do + * this using the 'ssl' value they're passed by; + * SSL_has_matching_session_id(ssl, id, *id_len) The length value passed in + * is set at the maximum size the session ID can be. In SSLv3/TLSv1 it is 32 + * bytes. The callback can alter this length to be less if desired. It is + * also an error for the callback to set the size to zero. + */ +typedef int (*GEN_SESSION_CB) (SSL *ssl, unsigned char *id, + unsigned int *id_len); + +# define SSL_SESS_CACHE_OFF 0x0000 +# define SSL_SESS_CACHE_CLIENT 0x0001 +# define SSL_SESS_CACHE_SERVER 0x0002 +# define SSL_SESS_CACHE_BOTH (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER) +# define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080 +/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */ +# define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100 +# define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200 +# define SSL_SESS_CACHE_NO_INTERNAL \ + (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE) + +LHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx); +# define SSL_CTX_sess_number(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL) +# define SSL_CTX_sess_connect(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL) +# define SSL_CTX_sess_connect_good(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL) +# define SSL_CTX_sess_connect_renegotiate(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL) +# define SSL_CTX_sess_accept(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL) +# define SSL_CTX_sess_accept_renegotiate(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL) +# define SSL_CTX_sess_accept_good(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL) +# define SSL_CTX_sess_hits(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL) +# define SSL_CTX_sess_cb_hits(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL) +# define SSL_CTX_sess_misses(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL) +# define SSL_CTX_sess_timeouts(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL) +# define SSL_CTX_sess_cache_full(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL) + +void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, + int (*new_session_cb) (struct ssl_st *ssl, + SSL_SESSION *sess)); +int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, + SSL_SESSION *sess); +void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, + void (*remove_session_cb) (struct ssl_ctx_st + *ctx, + SSL_SESSION *sess)); +void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx, + SSL_SESSION *sess); +void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, + SSL_SESSION *(*get_session_cb) (struct ssl_st + *ssl, + const unsigned char + *data, int len, + int *copy)); +SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, + const unsigned char *data, + int len, int *copy); +void SSL_CTX_set_info_callback(SSL_CTX *ctx, + void (*cb) (const SSL *ssl, int type, int val)); +void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, + int val); +void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, + int (*client_cert_cb) (SSL *ssl, X509 **x509, + EVP_PKEY **pkey)); +int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509, + EVP_PKEY **pkey); +# ifndef OPENSSL_NO_ENGINE +__owur int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); +# endif +void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, + int (*app_gen_cookie_cb) (SSL *ssl, + unsigned char + *cookie, + unsigned int + *cookie_len)); +void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, + int (*app_verify_cookie_cb) (SSL *ssl, + const unsigned + char *cookie, + unsigned int + cookie_len)); + +void SSL_CTX_set_stateless_cookie_generate_cb( + SSL_CTX *ctx, + int (*gen_stateless_cookie_cb) (SSL *ssl, + unsigned char *cookie, + size_t *cookie_len)); +void SSL_CTX_set_stateless_cookie_verify_cb( + SSL_CTX *ctx, + int (*verify_stateless_cookie_cb) (SSL *ssl, + const unsigned char *cookie, + size_t cookie_len)); +# ifndef OPENSSL_NO_NEXTPROTONEG + +typedef int (*SSL_CTX_npn_advertised_cb_func)(SSL *ssl, + const unsigned char **out, + unsigned int *outlen, + void *arg); +void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s, + SSL_CTX_npn_advertised_cb_func cb, + void *arg); +# define SSL_CTX_set_npn_advertised_cb SSL_CTX_set_next_protos_advertised_cb + +typedef int (*SSL_CTX_npn_select_cb_func)(SSL *s, + unsigned char **out, + unsigned char *outlen, + const unsigned char *in, + unsigned int inlen, + void *arg); +void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s, + SSL_CTX_npn_select_cb_func cb, + void *arg); +# define SSL_CTX_set_npn_select_cb SSL_CTX_set_next_proto_select_cb + +void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, + unsigned *len); +# define SSL_get0_npn_negotiated SSL_get0_next_proto_negotiated +# endif + +__owur int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, + const unsigned char *in, unsigned int inlen, + const unsigned char *client, + unsigned int client_len); + +# define OPENSSL_NPN_UNSUPPORTED 0 +# define OPENSSL_NPN_NEGOTIATED 1 +# define OPENSSL_NPN_NO_OVERLAP 2 + +__owur int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, + unsigned int protos_len); +__owur int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, + unsigned int protos_len); +typedef int (*SSL_CTX_alpn_select_cb_func)(SSL *ssl, + const unsigned char **out, + unsigned char *outlen, + const unsigned char *in, + unsigned int inlen, + void *arg); +void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx, + SSL_CTX_alpn_select_cb_func cb, + void *arg); +void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, + unsigned int *len); + +# ifndef OPENSSL_NO_PSK +/* + * the maximum length of the buffer given to callbacks containing the + * resulting identity/psk + */ +# define PSK_MAX_IDENTITY_LEN 128 +# define PSK_MAX_PSK_LEN 256 +typedef unsigned int (*SSL_psk_client_cb_func)(SSL *ssl, + const char *hint, + char *identity, + unsigned int max_identity_len, + unsigned char *psk, + unsigned int max_psk_len); +void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb); +void SSL_set_psk_client_callback(SSL *ssl, SSL_psk_client_cb_func cb); + +typedef unsigned int (*SSL_psk_server_cb_func)(SSL *ssl, + const char *identity, + unsigned char *psk, + unsigned int max_psk_len); +void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb); +void SSL_set_psk_server_callback(SSL *ssl, SSL_psk_server_cb_func cb); + +__owur int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint); +__owur int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint); +const char *SSL_get_psk_identity_hint(const SSL *s); +const char *SSL_get_psk_identity(const SSL *s); +# endif + +typedef int (*SSL_psk_find_session_cb_func)(SSL *ssl, + const unsigned char *identity, + size_t identity_len, + SSL_SESSION **sess); +typedef int (*SSL_psk_use_session_cb_func)(SSL *ssl, const EVP_MD *md, + const unsigned char **id, + size_t *idlen, + SSL_SESSION **sess); + +void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb); +void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx, + SSL_psk_find_session_cb_func cb); +void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb); +void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx, + SSL_psk_use_session_cb_func cb); + +/* Register callbacks to handle custom TLS Extensions for client or server. */ + +__owur int SSL_CTX_has_client_custom_ext(const SSL_CTX *ctx, + unsigned int ext_type); + +__owur int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, + unsigned int ext_type, + custom_ext_add_cb add_cb, + custom_ext_free_cb free_cb, + void *add_arg, + custom_ext_parse_cb parse_cb, + void *parse_arg); + +__owur int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, + unsigned int ext_type, + custom_ext_add_cb add_cb, + custom_ext_free_cb free_cb, + void *add_arg, + custom_ext_parse_cb parse_cb, + void *parse_arg); + +__owur int SSL_CTX_add_custom_ext(SSL_CTX *ctx, unsigned int ext_type, + unsigned int context, + SSL_custom_ext_add_cb_ex add_cb, + SSL_custom_ext_free_cb_ex free_cb, + void *add_arg, + SSL_custom_ext_parse_cb_ex parse_cb, + void *parse_arg); + +__owur int SSL_extension_supported(unsigned int ext_type); + +# define SSL_NOTHING 1 +# define SSL_WRITING 2 +# define SSL_READING 3 +# define SSL_X509_LOOKUP 4 +# define SSL_ASYNC_PAUSED 5 +# define SSL_ASYNC_NO_JOBS 6 +# define SSL_CLIENT_HELLO_CB 7 + +/* These will only be used when doing non-blocking IO */ +# define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) +# define SSL_want_read(s) (SSL_want(s) == SSL_READING) +# define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) +# define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) +# define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED) +# define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS) +# define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB) + +# define SSL_MAC_FLAG_READ_MAC_STREAM 1 +# define SSL_MAC_FLAG_WRITE_MAC_STREAM 2 + +/* + * A callback for logging out TLS key material. This callback should log out + * |line| followed by a newline. + */ +typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line); + +/* + * SSL_CTX_set_keylog_callback configures a callback to log key material. This + * is intended for debugging use with tools like Wireshark. The cb function + * should log line followed by a newline. + */ +void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb); + +/* + * SSL_CTX_get_keylog_callback returns the callback configured by + * SSL_CTX_set_keylog_callback. + */ +SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx); + +int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data); +uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx); +int SSL_set_max_early_data(SSL *s, uint32_t max_early_data); +uint32_t SSL_get_max_early_data(const SSL *s); +int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data); +uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx); +int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data); +uint32_t SSL_get_recv_max_early_data(const SSL *s); + +#ifdef __cplusplus +} +#endif + +# include +# include +# include /* This is mostly sslv3 with a few tweaks */ +# include /* Datagram TLS */ +# include /* Support for the use_srtp extension */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * These need to be after the above set of includes due to a compiler bug + * in VisualStudio 2015 + */ +DEFINE_STACK_OF_CONST(SSL_CIPHER) +DEFINE_STACK_OF(SSL_COMP) + +/* compatibility */ +# define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)(arg))) +# define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) +# define SSL_SESSION_set_app_data(s,a) (SSL_SESSION_set_ex_data(s,0, \ + (char *)(a))) +# define SSL_SESSION_get_app_data(s) (SSL_SESSION_get_ex_data(s,0)) +# define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0)) +# define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0, \ + (char *)(arg))) +DEPRECATEDIN_1_1_0(void SSL_set_debug(SSL *s, int debug)) + +/* TLSv1.3 KeyUpdate message types */ +/* -1 used so that this is an invalid value for the on-the-wire protocol */ +#define SSL_KEY_UPDATE_NONE -1 +/* Values as defined for the on-the-wire protocol */ +#define SSL_KEY_UPDATE_NOT_REQUESTED 0 +#define SSL_KEY_UPDATE_REQUESTED 1 + +/* + * The valid handshake states (one for each type message sent and one for each + * type of message received). There are also two "special" states: + * TLS = TLS or DTLS state + * DTLS = DTLS specific state + * CR/SR = Client Read/Server Read + * CW/SW = Client Write/Server Write + * + * The "special" states are: + * TLS_ST_BEFORE = No handshake has been initiated yet + * TLS_ST_OK = A handshake has been successfully completed + */ +typedef enum { + TLS_ST_BEFORE, + TLS_ST_OK, + DTLS_ST_CR_HELLO_VERIFY_REQUEST, + TLS_ST_CR_SRVR_HELLO, + TLS_ST_CR_CERT, + TLS_ST_CR_CERT_STATUS, + TLS_ST_CR_KEY_EXCH, + TLS_ST_CR_CERT_REQ, + TLS_ST_CR_SRVR_DONE, + TLS_ST_CR_SESSION_TICKET, + TLS_ST_CR_CHANGE, + TLS_ST_CR_FINISHED, + TLS_ST_CW_CLNT_HELLO, + TLS_ST_CW_CERT, + TLS_ST_CW_KEY_EXCH, + TLS_ST_CW_CERT_VRFY, + TLS_ST_CW_CHANGE, + TLS_ST_CW_NEXT_PROTO, + TLS_ST_CW_FINISHED, + TLS_ST_SW_HELLO_REQ, + TLS_ST_SR_CLNT_HELLO, + DTLS_ST_SW_HELLO_VERIFY_REQUEST, + TLS_ST_SW_SRVR_HELLO, + TLS_ST_SW_CERT, + TLS_ST_SW_KEY_EXCH, + TLS_ST_SW_CERT_REQ, + TLS_ST_SW_SRVR_DONE, + TLS_ST_SR_CERT, + TLS_ST_SR_KEY_EXCH, + TLS_ST_SR_CERT_VRFY, + TLS_ST_SR_NEXT_PROTO, + TLS_ST_SR_CHANGE, + TLS_ST_SR_FINISHED, + TLS_ST_SW_SESSION_TICKET, + TLS_ST_SW_CERT_STATUS, + TLS_ST_SW_CHANGE, + TLS_ST_SW_FINISHED, + TLS_ST_SW_ENCRYPTED_EXTENSIONS, + TLS_ST_CR_ENCRYPTED_EXTENSIONS, + TLS_ST_CR_CERT_VRFY, + TLS_ST_SW_CERT_VRFY, + TLS_ST_CR_HELLO_REQ, + TLS_ST_SW_KEY_UPDATE, + TLS_ST_CW_KEY_UPDATE, + TLS_ST_SR_KEY_UPDATE, + TLS_ST_CR_KEY_UPDATE, + TLS_ST_EARLY_DATA, + TLS_ST_PENDING_EARLY_DATA_END, + TLS_ST_CW_END_OF_EARLY_DATA, + TLS_ST_SR_END_OF_EARLY_DATA +} OSSL_HANDSHAKE_STATE; + +/* + * Most of the following state values are no longer used and are defined to be + * the closest equivalent value in the current state machine code. Not all + * defines have an equivalent and are set to a dummy value (-1). SSL_ST_CONNECT + * and SSL_ST_ACCEPT are still in use in the definition of SSL_CB_ACCEPT_LOOP, + * SSL_CB_ACCEPT_EXIT, SSL_CB_CONNECT_LOOP and SSL_CB_CONNECT_EXIT. + */ + +# define SSL_ST_CONNECT 0x1000 +# define SSL_ST_ACCEPT 0x2000 + +# define SSL_ST_MASK 0x0FFF + +# define SSL_CB_LOOP 0x01 +# define SSL_CB_EXIT 0x02 +# define SSL_CB_READ 0x04 +# define SSL_CB_WRITE 0x08 +# define SSL_CB_ALERT 0x4000/* used in callback */ +# define SSL_CB_READ_ALERT (SSL_CB_ALERT|SSL_CB_READ) +# define SSL_CB_WRITE_ALERT (SSL_CB_ALERT|SSL_CB_WRITE) +# define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT|SSL_CB_LOOP) +# define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT|SSL_CB_EXIT) +# define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT|SSL_CB_LOOP) +# define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT|SSL_CB_EXIT) +# define SSL_CB_HANDSHAKE_START 0x10 +# define SSL_CB_HANDSHAKE_DONE 0x20 + +/* Is the SSL_connection established? */ +# define SSL_in_connect_init(a) (SSL_in_init(a) && !SSL_is_server(a)) +# define SSL_in_accept_init(a) (SSL_in_init(a) && SSL_is_server(a)) +int SSL_in_init(const SSL *s); +int SSL_in_before(const SSL *s); +int SSL_is_init_finished(const SSL *s); + +/* + * The following 3 states are kept in ssl->rlayer.rstate when reads fail, you + * should not need these + */ +# define SSL_ST_READ_HEADER 0xF0 +# define SSL_ST_READ_BODY 0xF1 +# define SSL_ST_READ_DONE 0xF2 + +/*- + * Obtain latest Finished message + * -- that we sent (SSL_get_finished) + * -- that we expected from peer (SSL_get_peer_finished). + * Returns length (0 == no Finished so far), copies up to 'count' bytes. + */ +size_t SSL_get_finished(const SSL *s, void *buf, size_t count); +size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count); + +/* + * use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 3 options are + * 'ored' with SSL_VERIFY_PEER if they are desired + */ +# define SSL_VERIFY_NONE 0x00 +# define SSL_VERIFY_PEER 0x01 +# define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02 +# define SSL_VERIFY_CLIENT_ONCE 0x04 +# define SSL_VERIFY_POST_HANDSHAKE 0x08 + +# if OPENSSL_API_COMPAT < 0x10100000L +# define OpenSSL_add_ssl_algorithms() SSL_library_init() +# define SSLeay_add_ssl_algorithms() SSL_library_init() +# endif + +/* More backward compatibility */ +# define SSL_get_cipher(s) \ + SSL_CIPHER_get_name(SSL_get_current_cipher(s)) +# define SSL_get_cipher_bits(s,np) \ + SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) +# define SSL_get_cipher_version(s) \ + SSL_CIPHER_get_version(SSL_get_current_cipher(s)) +# define SSL_get_cipher_name(s) \ + SSL_CIPHER_get_name(SSL_get_current_cipher(s)) +# define SSL_get_time(a) SSL_SESSION_get_time(a) +# define SSL_set_time(a,b) SSL_SESSION_set_time((a),(b)) +# define SSL_get_timeout(a) SSL_SESSION_get_timeout(a) +# define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b)) + +# define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id) +# define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id) + +DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) +# define SSL_AD_REASON_OFFSET 1000/* offset to get SSL_R_... value + * from SSL_AD_... */ +/* These alert types are for SSLv3 and TLSv1 */ +# define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY +/* fatal */ +# define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE +/* fatal */ +# define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC +# define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED +# define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW +/* fatal */ +# define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE +/* fatal */ +# define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE +/* Not for TLS */ +# define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE +# define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE +# define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE +# define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED +# define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED +# define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN +/* fatal */ +# define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER +/* fatal */ +# define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA +/* fatal */ +# define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED +/* fatal */ +# define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR +# define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR +/* fatal */ +# define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION +/* fatal */ +# define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION +/* fatal */ +# define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY +/* fatal */ +# define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR +# define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED +# define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION +# define SSL_AD_MISSING_EXTENSION TLS13_AD_MISSING_EXTENSION +# define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED +# define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION +# define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE +# define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME +# define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE +# define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE +/* fatal */ +# define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY +/* fatal */ +# define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK +# define SSL_AD_NO_APPLICATION_PROTOCOL TLS1_AD_NO_APPLICATION_PROTOCOL +# define SSL_ERROR_NONE 0 +# define SSL_ERROR_SSL 1 +# define SSL_ERROR_WANT_READ 2 +# define SSL_ERROR_WANT_WRITE 3 +# define SSL_ERROR_WANT_X509_LOOKUP 4 +# define SSL_ERROR_SYSCALL 5/* look at error stack/return + * value/errno */ +# define SSL_ERROR_ZERO_RETURN 6 +# define SSL_ERROR_WANT_CONNECT 7 +# define SSL_ERROR_WANT_ACCEPT 8 +# define SSL_ERROR_WANT_ASYNC 9 +# define SSL_ERROR_WANT_ASYNC_JOB 10 +# define SSL_ERROR_WANT_CLIENT_HELLO_CB 11 +# define SSL_CTRL_SET_TMP_DH 3 +# define SSL_CTRL_SET_TMP_ECDH 4 +# define SSL_CTRL_SET_TMP_DH_CB 6 +# define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9 +# define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10 +# define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11 +# define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12 +# define SSL_CTRL_GET_FLAGS 13 +# define SSL_CTRL_EXTRA_CHAIN_CERT 14 +# define SSL_CTRL_SET_MSG_CALLBACK 15 +# define SSL_CTRL_SET_MSG_CALLBACK_ARG 16 +/* only applies to datagram connections */ +# define SSL_CTRL_SET_MTU 17 +/* Stats */ +# define SSL_CTRL_SESS_NUMBER 20 +# define SSL_CTRL_SESS_CONNECT 21 +# define SSL_CTRL_SESS_CONNECT_GOOD 22 +# define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 +# define SSL_CTRL_SESS_ACCEPT 24 +# define SSL_CTRL_SESS_ACCEPT_GOOD 25 +# define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26 +# define SSL_CTRL_SESS_HIT 27 +# define SSL_CTRL_SESS_CB_HIT 28 +# define SSL_CTRL_SESS_MISSES 29 +# define SSL_CTRL_SESS_TIMEOUTS 30 +# define SSL_CTRL_SESS_CACHE_FULL 31 +# define SSL_CTRL_MODE 33 +# define SSL_CTRL_GET_READ_AHEAD 40 +# define SSL_CTRL_SET_READ_AHEAD 41 +# define SSL_CTRL_SET_SESS_CACHE_SIZE 42 +# define SSL_CTRL_GET_SESS_CACHE_SIZE 43 +# define SSL_CTRL_SET_SESS_CACHE_MODE 44 +# define SSL_CTRL_GET_SESS_CACHE_MODE 45 +# define SSL_CTRL_GET_MAX_CERT_LIST 50 +# define SSL_CTRL_SET_MAX_CERT_LIST 51 +# define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52 +/* see tls1.h for macros based on these */ +# define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 +# define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54 +# define SSL_CTRL_SET_TLSEXT_HOSTNAME 55 +# define SSL_CTRL_SET_TLSEXT_DEBUG_CB 56 +# define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57 +# define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58 +# define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59 +/*# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT 60 */ +/*# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB 61 */ +/*# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG 62 */ +# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB 63 +# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64 +# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65 +# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66 +# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67 +# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68 +# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69 +# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70 +# define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71 +# define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 72 +# define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB 75 +# define SSL_CTRL_SET_SRP_VERIFY_PARAM_CB 76 +# define SSL_CTRL_SET_SRP_GIVE_CLIENT_PWD_CB 77 +# define SSL_CTRL_SET_SRP_ARG 78 +# define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79 +# define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80 +# define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81 +# ifndef OPENSSL_NO_HEARTBEATS +# define SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT 85 +# define SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING 86 +# define SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS 87 +# endif +# define DTLS_CTRL_GET_TIMEOUT 73 +# define DTLS_CTRL_HANDLE_TIMEOUT 74 +# define SSL_CTRL_GET_RI_SUPPORT 76 +# define SSL_CTRL_CLEAR_MODE 78 +# define SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB 79 +# define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82 +# define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83 +# define SSL_CTRL_CHAIN 88 +# define SSL_CTRL_CHAIN_CERT 89 +# define SSL_CTRL_GET_GROUPS 90 +# define SSL_CTRL_SET_GROUPS 91 +# define SSL_CTRL_SET_GROUPS_LIST 92 +# define SSL_CTRL_GET_SHARED_GROUP 93 +# define SSL_CTRL_SET_SIGALGS 97 +# define SSL_CTRL_SET_SIGALGS_LIST 98 +# define SSL_CTRL_CERT_FLAGS 99 +# define SSL_CTRL_CLEAR_CERT_FLAGS 100 +# define SSL_CTRL_SET_CLIENT_SIGALGS 101 +# define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102 +# define SSL_CTRL_GET_CLIENT_CERT_TYPES 103 +# define SSL_CTRL_SET_CLIENT_CERT_TYPES 104 +# define SSL_CTRL_BUILD_CERT_CHAIN 105 +# define SSL_CTRL_SET_VERIFY_CERT_STORE 106 +# define SSL_CTRL_SET_CHAIN_CERT_STORE 107 +# define SSL_CTRL_GET_PEER_SIGNATURE_NID 108 +# define SSL_CTRL_GET_PEER_TMP_KEY 109 +# define SSL_CTRL_GET_RAW_CIPHERLIST 110 +# define SSL_CTRL_GET_EC_POINT_FORMATS 111 +# define SSL_CTRL_GET_CHAIN_CERTS 115 +# define SSL_CTRL_SELECT_CURRENT_CERT 116 +# define SSL_CTRL_SET_CURRENT_CERT 117 +# define SSL_CTRL_SET_DH_AUTO 118 +# define DTLS_CTRL_SET_LINK_MTU 120 +# define DTLS_CTRL_GET_LINK_MIN_MTU 121 +# define SSL_CTRL_GET_EXTMS_SUPPORT 122 +# define SSL_CTRL_SET_MIN_PROTO_VERSION 123 +# define SSL_CTRL_SET_MAX_PROTO_VERSION 124 +# define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125 +# define SSL_CTRL_SET_MAX_PIPELINES 126 +# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127 +# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128 +# define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129 +# define SSL_CTRL_GET_MIN_PROTO_VERSION 130 +# define SSL_CTRL_GET_MAX_PROTO_VERSION 131 +# define SSL_CTRL_GET_SIGNATURE_NID 132 +# define SSL_CTRL_GET_TMP_KEY 133 +# define SSL_CERT_SET_FIRST 1 +# define SSL_CERT_SET_NEXT 2 +# define SSL_CERT_SET_SERVER 3 +# define DTLSv1_get_timeout(ssl, arg) \ + SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)(arg)) +# define DTLSv1_handle_timeout(ssl) \ + SSL_ctrl(ssl,DTLS_CTRL_HANDLE_TIMEOUT,0, NULL) +# define SSL_num_renegotiations(ssl) \ + SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL) +# define SSL_clear_num_renegotiations(ssl) \ + SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL) +# define SSL_total_renegotiations(ssl) \ + SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL) +# define SSL_CTX_set_tmp_dh(ctx,dh) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)(dh)) +# define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh)) +# define SSL_CTX_set_dh_auto(ctx, onoff) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_DH_AUTO,onoff,NULL) +# define SSL_set_dh_auto(s, onoff) \ + SSL_ctrl(s,SSL_CTRL_SET_DH_AUTO,onoff,NULL) +# define SSL_set_tmp_dh(ssl,dh) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)(dh)) +# define SSL_set_tmp_ecdh(ssl,ecdh) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh)) +# define SSL_CTX_add_extra_chain_cert(ctx,x509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)(x509)) +# define SSL_CTX_get_extra_chain_certs(ctx,px509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,0,px509) +# define SSL_CTX_get_extra_chain_certs_only(ctx,px509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,1,px509) +# define SSL_CTX_clear_extra_chain_certs(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS,0,NULL) +# define SSL_CTX_set0_chain(ctx,sk) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,0,(char *)(sk)) +# define SSL_CTX_set1_chain(ctx,sk) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,1,(char *)(sk)) +# define SSL_CTX_add0_chain_cert(ctx,x509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN_CERT,0,(char *)(x509)) +# define SSL_CTX_add1_chain_cert(ctx,x509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN_CERT,1,(char *)(x509)) +# define SSL_CTX_get0_chain_certs(ctx,px509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_CHAIN_CERTS,0,px509) +# define SSL_CTX_clear_chain_certs(ctx) \ + SSL_CTX_set0_chain(ctx,NULL) +# define SSL_CTX_build_cert_chain(ctx, flags) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_BUILD_CERT_CHAIN, flags, NULL) +# define SSL_CTX_select_current_cert(ctx,x509) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SELECT_CURRENT_CERT,0,(char *)(x509)) +# define SSL_CTX_set_current_cert(ctx, op) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURRENT_CERT, op, NULL) +# define SSL_CTX_set0_verify_cert_store(ctx,st) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_VERIFY_CERT_STORE,0,(char *)(st)) +# define SSL_CTX_set1_verify_cert_store(ctx,st) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_VERIFY_CERT_STORE,1,(char *)(st)) +# define SSL_CTX_set0_chain_cert_store(ctx,st) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CHAIN_CERT_STORE,0,(char *)(st)) +# define SSL_CTX_set1_chain_cert_store(ctx,st) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)(st)) +# define SSL_set0_chain(s,sk) \ + SSL_ctrl(s,SSL_CTRL_CHAIN,0,(char *)(sk)) +# define SSL_set1_chain(s,sk) \ + SSL_ctrl(s,SSL_CTRL_CHAIN,1,(char *)(sk)) +# define SSL_add0_chain_cert(s,x509) \ + SSL_ctrl(s,SSL_CTRL_CHAIN_CERT,0,(char *)(x509)) +# define SSL_add1_chain_cert(s,x509) \ + SSL_ctrl(s,SSL_CTRL_CHAIN_CERT,1,(char *)(x509)) +# define SSL_get0_chain_certs(s,px509) \ + SSL_ctrl(s,SSL_CTRL_GET_CHAIN_CERTS,0,px509) +# define SSL_clear_chain_certs(s) \ + SSL_set0_chain(s,NULL) +# define SSL_build_cert_chain(s, flags) \ + SSL_ctrl(s,SSL_CTRL_BUILD_CERT_CHAIN, flags, NULL) +# define SSL_select_current_cert(s,x509) \ + SSL_ctrl(s,SSL_CTRL_SELECT_CURRENT_CERT,0,(char *)(x509)) +# define SSL_set_current_cert(s,op) \ + SSL_ctrl(s,SSL_CTRL_SET_CURRENT_CERT, op, NULL) +# define SSL_set0_verify_cert_store(s,st) \ + SSL_ctrl(s,SSL_CTRL_SET_VERIFY_CERT_STORE,0,(char *)(st)) +# define SSL_set1_verify_cert_store(s,st) \ + SSL_ctrl(s,SSL_CTRL_SET_VERIFY_CERT_STORE,1,(char *)(st)) +# define SSL_set0_chain_cert_store(s,st) \ + SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,0,(char *)(st)) +# define SSL_set1_chain_cert_store(s,st) \ + SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)(st)) +# define SSL_get1_groups(s, glist) \ + SSL_ctrl(s,SSL_CTRL_GET_GROUPS,0,(int*)(glist)) +# define SSL_CTX_set1_groups(ctx, glist, glistlen) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS,glistlen,(char *)(glist)) +# define SSL_CTX_set1_groups_list(ctx, s) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS_LIST,0,(char *)(s)) +# define SSL_set1_groups(s, glist, glistlen) \ + SSL_ctrl(s,SSL_CTRL_SET_GROUPS,glistlen,(char *)(glist)) +# define SSL_set1_groups_list(s, str) \ + SSL_ctrl(s,SSL_CTRL_SET_GROUPS_LIST,0,(char *)(str)) +# define SSL_get_shared_group(s, n) \ + SSL_ctrl(s,SSL_CTRL_GET_SHARED_GROUP,n,NULL) +# define SSL_CTX_set1_sigalgs(ctx, slist, slistlen) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)(slist)) +# define SSL_CTX_set1_sigalgs_list(ctx, s) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)(s)) +# define SSL_set1_sigalgs(s, slist, slistlen) \ + SSL_ctrl(s,SSL_CTRL_SET_SIGALGS,slistlen,(int *)(slist)) +# define SSL_set1_sigalgs_list(s, str) \ + SSL_ctrl(s,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)(str)) +# define SSL_CTX_set1_client_sigalgs(ctx, slist, slistlen) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS,slistlen,(int *)(slist)) +# define SSL_CTX_set1_client_sigalgs_list(ctx, s) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)(s)) +# define SSL_set1_client_sigalgs(s, slist, slistlen) \ + SSL_ctrl(s,SSL_CTRL_SET_CLIENT_SIGALGS,slistlen,(int *)(slist)) +# define SSL_set1_client_sigalgs_list(s, str) \ + SSL_ctrl(s,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)(str)) +# define SSL_get0_certificate_types(s, clist) \ + SSL_ctrl(s, SSL_CTRL_GET_CLIENT_CERT_TYPES, 0, (char *)(clist)) +# define SSL_CTX_set1_client_certificate_types(ctx, clist, clistlen) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen, \ + (char *)(clist)) +# define SSL_set1_client_certificate_types(s, clist, clistlen) \ + SSL_ctrl(s,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen,(char *)(clist)) +# define SSL_get_signature_nid(s, pn) \ + SSL_ctrl(s,SSL_CTRL_GET_SIGNATURE_NID,0,pn) +# define SSL_get_peer_signature_nid(s, pn) \ + SSL_ctrl(s,SSL_CTRL_GET_PEER_SIGNATURE_NID,0,pn) +# define SSL_get_peer_tmp_key(s, pk) \ + SSL_ctrl(s,SSL_CTRL_GET_PEER_TMP_KEY,0,pk) +# define SSL_get_tmp_key(s, pk) \ + SSL_ctrl(s,SSL_CTRL_GET_TMP_KEY,0,pk) +# define SSL_get0_raw_cipherlist(s, plst) \ + SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,plst) +# define SSL_get0_ec_point_formats(s, plst) \ + SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,plst) +# define SSL_CTX_set_min_proto_version(ctx, version) \ + SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL) +# define SSL_CTX_set_max_proto_version(ctx, version) \ + SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) +# define SSL_CTX_get_min_proto_version(ctx) \ + SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) +# define SSL_CTX_get_max_proto_version(ctx) \ + SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) +# define SSL_set_min_proto_version(s, version) \ + SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL) +# define SSL_set_max_proto_version(s, version) \ + SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) +# define SSL_get_min_proto_version(s) \ + SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) +# define SSL_get_max_proto_version(s) \ + SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) + +/* Backwards compatibility, original 1.1.0 names */ +# define SSL_CTRL_GET_SERVER_TMP_KEY \ + SSL_CTRL_GET_PEER_TMP_KEY +# define SSL_get_server_tmp_key(s, pk) \ + SSL_get_peer_tmp_key(s, pk) + +/* + * The following symbol names are old and obsolete. They are kept + * for compatibility reasons only and should not be used anymore. + */ +# define SSL_CTRL_GET_CURVES SSL_CTRL_GET_GROUPS +# define SSL_CTRL_SET_CURVES SSL_CTRL_SET_GROUPS +# define SSL_CTRL_SET_CURVES_LIST SSL_CTRL_SET_GROUPS_LIST +# define SSL_CTRL_GET_SHARED_CURVE SSL_CTRL_GET_SHARED_GROUP + +# define SSL_get1_curves SSL_get1_groups +# define SSL_CTX_set1_curves SSL_CTX_set1_groups +# define SSL_CTX_set1_curves_list SSL_CTX_set1_groups_list +# define SSL_set1_curves SSL_set1_groups +# define SSL_set1_curves_list SSL_set1_groups_list +# define SSL_get_shared_curve SSL_get_shared_group + + +# if OPENSSL_API_COMPAT < 0x10100000L +/* Provide some compatibility macros for removed functionality. */ +# define SSL_CTX_need_tmp_RSA(ctx) 0 +# define SSL_CTX_set_tmp_rsa(ctx,rsa) 1 +# define SSL_need_tmp_RSA(ssl) 0 +# define SSL_set_tmp_rsa(ssl,rsa) 1 +# define SSL_CTX_set_ecdh_auto(dummy, onoff) ((onoff) != 0) +# define SSL_set_ecdh_auto(dummy, onoff) ((onoff) != 0) +/* + * We "pretend" to call the callback to avoid warnings about unused static + * functions. + */ +# define SSL_CTX_set_tmp_rsa_callback(ctx, cb) while(0) (cb)(NULL, 0, 0) +# define SSL_set_tmp_rsa_callback(ssl, cb) while(0) (cb)(NULL, 0, 0) +# endif +__owur const BIO_METHOD *BIO_f_ssl(void); +__owur BIO *BIO_new_ssl(SSL_CTX *ctx, int client); +__owur BIO *BIO_new_ssl_connect(SSL_CTX *ctx); +__owur BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx); +__owur int BIO_ssl_copy_session_id(BIO *to, BIO *from); +void BIO_ssl_shutdown(BIO *ssl_bio); + +__owur int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str); +__owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); +int SSL_CTX_up_ref(SSL_CTX *ctx); +void SSL_CTX_free(SSL_CTX *); +__owur long SSL_CTX_set_timeout(SSL_CTX *ctx, long t); +__owur long SSL_CTX_get_timeout(const SSL_CTX *ctx); +__owur X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *); +void SSL_CTX_set_cert_store(SSL_CTX *, X509_STORE *); +void SSL_CTX_set1_cert_store(SSL_CTX *, X509_STORE *); +__owur int SSL_want(const SSL *s); +__owur int SSL_clear(SSL *s); + +void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); + +__owur const SSL_CIPHER *SSL_get_current_cipher(const SSL *s); +__owur const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s); +__owur int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits); +__owur const char *SSL_CIPHER_get_version(const SSL_CIPHER *c); +__owur const char *SSL_CIPHER_get_name(const SSL_CIPHER *c); +__owur const char *SSL_CIPHER_standard_name(const SSL_CIPHER *c); +__owur const char *OPENSSL_cipher_name(const char *rfc_name); +__owur uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *c); +__owur uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *c); +__owur int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c); +__owur int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c); +__owur const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c); +__owur int SSL_CIPHER_is_aead(const SSL_CIPHER *c); + +__owur int SSL_get_fd(const SSL *s); +__owur int SSL_get_rfd(const SSL *s); +__owur int SSL_get_wfd(const SSL *s); +__owur const char *SSL_get_cipher_list(const SSL *s, int n); +__owur char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size); +__owur int SSL_get_read_ahead(const SSL *s); +__owur int SSL_pending(const SSL *s); +__owur int SSL_has_pending(const SSL *s); +# ifndef OPENSSL_NO_SOCK +__owur int SSL_set_fd(SSL *s, int fd); +__owur int SSL_set_rfd(SSL *s, int fd); +__owur int SSL_set_wfd(SSL *s, int fd); +# endif +void SSL_set0_rbio(SSL *s, BIO *rbio); +void SSL_set0_wbio(SSL *s, BIO *wbio); +void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); +__owur BIO *SSL_get_rbio(const SSL *s); +__owur BIO *SSL_get_wbio(const SSL *s); +__owur int SSL_set_cipher_list(SSL *s, const char *str); +__owur int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str); +__owur int SSL_set_ciphersuites(SSL *s, const char *str); +void SSL_set_read_ahead(SSL *s, int yes); +__owur int SSL_get_verify_mode(const SSL *s); +__owur int SSL_get_verify_depth(const SSL *s); +__owur SSL_verify_cb SSL_get_verify_callback(const SSL *s); +void SSL_set_verify(SSL *s, int mode, SSL_verify_cb callback); +void SSL_set_verify_depth(SSL *s, int depth); +void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg); +# ifndef OPENSSL_NO_RSA +__owur int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa); +__owur int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, + long len); +# endif +__owur int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); +__owur int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d, + long len); +__owur int SSL_use_certificate(SSL *ssl, X509 *x); +__owur int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len); +__owur int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey, + STACK_OF(X509) *chain, int override); + + +/* serverinfo file format versions */ +# define SSL_SERVERINFOV1 1 +# define SSL_SERVERINFOV2 2 + +/* Set serverinfo data for the current active cert. */ +__owur int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo, + size_t serverinfo_length); +__owur int SSL_CTX_use_serverinfo_ex(SSL_CTX *ctx, unsigned int version, + const unsigned char *serverinfo, + size_t serverinfo_length); +__owur int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file); + +#ifndef OPENSSL_NO_RSA +__owur int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type); +#endif + +__owur int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type); +__owur int SSL_use_certificate_file(SSL *ssl, const char *file, int type); + +#ifndef OPENSSL_NO_RSA +__owur int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, + int type); +#endif +__owur int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, + int type); +__owur int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, + int type); +/* PEM type */ +__owur int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); +__owur int SSL_use_certificate_chain_file(SSL *ssl, const char *file); +__owur STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); +__owur int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, + const char *file); +int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, + const char *dir); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_load_error_strings() \ + OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \ + | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) +# endif + +__owur const char *SSL_state_string(const SSL *s); +__owur const char *SSL_rstate_string(const SSL *s); +__owur const char *SSL_state_string_long(const SSL *s); +__owur const char *SSL_rstate_string_long(const SSL *s); +__owur long SSL_SESSION_get_time(const SSL_SESSION *s); +__owur long SSL_SESSION_set_time(SSL_SESSION *s, long t); +__owur long SSL_SESSION_get_timeout(const SSL_SESSION *s); +__owur long SSL_SESSION_set_timeout(SSL_SESSION *s, long t); +__owur int SSL_SESSION_get_protocol_version(const SSL_SESSION *s); +__owur int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version); + +__owur const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s); +__owur int SSL_SESSION_set1_hostname(SSL_SESSION *s, const char *hostname); +void SSL_SESSION_get0_alpn_selected(const SSL_SESSION *s, + const unsigned char **alpn, + size_t *len); +__owur int SSL_SESSION_set1_alpn_selected(SSL_SESSION *s, + const unsigned char *alpn, + size_t len); +__owur const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s); +__owur int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher); +__owur int SSL_SESSION_has_ticket(const SSL_SESSION *s); +__owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); +void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, + size_t *len); +__owur uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s); +__owur int SSL_SESSION_set_max_early_data(SSL_SESSION *s, + uint32_t max_early_data); +__owur int SSL_copy_session_id(SSL *to, const SSL *from); +__owur X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); +__owur int SSL_SESSION_set1_id_context(SSL_SESSION *s, + const unsigned char *sid_ctx, + unsigned int sid_ctx_len); +__owur int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, + unsigned int sid_len); +__owur int SSL_SESSION_is_resumable(const SSL_SESSION *s); + +__owur SSL_SESSION *SSL_SESSION_new(void); +__owur SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src); +const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, + unsigned int *len); +const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s, + unsigned int *len); +__owur unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s); +# ifndef OPENSSL_NO_STDIO +int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); +# endif +int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses); +int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x); +int SSL_SESSION_up_ref(SSL_SESSION *ses); +void SSL_SESSION_free(SSL_SESSION *ses); +__owur int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); +__owur int SSL_set_session(SSL *to, SSL_SESSION *session); +int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session); +int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *session); +__owur int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb); +__owur int SSL_set_generate_session_id(SSL *s, GEN_SESSION_CB cb); +__owur int SSL_has_matching_session_id(const SSL *s, + const unsigned char *id, + unsigned int id_len); +SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, + long length); + +# ifdef HEADER_X509_H +__owur X509 *SSL_get_peer_certificate(const SSL *s); +# endif + +__owur STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s); + +__owur int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); +__owur int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); +__owur SSL_verify_cb SSL_CTX_get_verify_callback(const SSL_CTX *ctx); +void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, SSL_verify_cb callback); +void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth); +void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, + int (*cb) (X509_STORE_CTX *, void *), + void *arg); +void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), + void *arg); +# ifndef OPENSSL_NO_RSA +__owur int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); +__owur int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, + long len); +# endif +__owur int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); +__owur int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx, + const unsigned char *d, long len); +__owur int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); +__owur int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, + const unsigned char *d); +__owur int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey, + STACK_OF(X509) *chain, int override); + +void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); +void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); +pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx); +void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx); +void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb); +void SSL_set_default_passwd_cb_userdata(SSL *s, void *u); +pem_password_cb *SSL_get_default_passwd_cb(SSL *s); +void *SSL_get_default_passwd_cb_userdata(SSL *s); + +__owur int SSL_CTX_check_private_key(const SSL_CTX *ctx); +__owur int SSL_check_private_key(const SSL *ctx); + +__owur int SSL_CTX_set_session_id_context(SSL_CTX *ctx, + const unsigned char *sid_ctx, + unsigned int sid_ctx_len); + +SSL *SSL_new(SSL_CTX *ctx); +int SSL_up_ref(SSL *s); +int SSL_is_dtls(const SSL *s); +__owur int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, + unsigned int sid_ctx_len); + +__owur int SSL_CTX_set_purpose(SSL_CTX *ctx, int purpose); +__owur int SSL_set_purpose(SSL *ssl, int purpose); +__owur int SSL_CTX_set_trust(SSL_CTX *ctx, int trust); +__owur int SSL_set_trust(SSL *ssl, int trust); + +__owur int SSL_set1_host(SSL *s, const char *hostname); +__owur int SSL_add1_host(SSL *s, const char *hostname); +__owur const char *SSL_get0_peername(SSL *s); +void SSL_set_hostflags(SSL *s, unsigned int flags); + +__owur int SSL_CTX_dane_enable(SSL_CTX *ctx); +__owur int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, + uint8_t mtype, uint8_t ord); +__owur int SSL_dane_enable(SSL *s, const char *basedomain); +__owur int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector, + uint8_t mtype, unsigned const char *data, size_t dlen); +__owur int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki); +__owur int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector, + uint8_t *mtype, unsigned const char **data, + size_t *dlen); +/* + * Bridge opacity barrier between libcrypt and libssl, also needed to support + * offline testing in test/danetest.c + */ +SSL_DANE *SSL_get0_dane(SSL *ssl); +/* + * DANE flags + */ +unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags); +unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags); +unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags); +unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags); + +__owur int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm); +__owur int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); + +__owur X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx); +__owur X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); + +# ifndef OPENSSL_NO_SRP +int SSL_CTX_set_srp_username(SSL_CTX *ctx, char *name); +int SSL_CTX_set_srp_password(SSL_CTX *ctx, char *password); +int SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength); +int SSL_CTX_set_srp_client_pwd_callback(SSL_CTX *ctx, + char *(*cb) (SSL *, void *)); +int SSL_CTX_set_srp_verify_param_callback(SSL_CTX *ctx, + int (*cb) (SSL *, void *)); +int SSL_CTX_set_srp_username_callback(SSL_CTX *ctx, + int (*cb) (SSL *, int *, void *)); +int SSL_CTX_set_srp_cb_arg(SSL_CTX *ctx, void *arg); + +int SSL_set_srp_server_param(SSL *s, const BIGNUM *N, const BIGNUM *g, + BIGNUM *sa, BIGNUM *v, char *info); +int SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass, + const char *grp); + +__owur BIGNUM *SSL_get_srp_g(SSL *s); +__owur BIGNUM *SSL_get_srp_N(SSL *s); + +__owur char *SSL_get_srp_username(SSL *s); +__owur char *SSL_get_srp_userinfo(SSL *s); +# endif + +/* + * ClientHello callback and helpers. + */ + +# define SSL_CLIENT_HELLO_SUCCESS 1 +# define SSL_CLIENT_HELLO_ERROR 0 +# define SSL_CLIENT_HELLO_RETRY (-1) + +typedef int (*SSL_client_hello_cb_fn) (SSL *s, int *al, void *arg); +void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb, + void *arg); +int SSL_client_hello_isv2(SSL *s); +unsigned int SSL_client_hello_get0_legacy_version(SSL *s); +size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out); +size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out); +size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out); +size_t SSL_client_hello_get0_compression_methods(SSL *s, + const unsigned char **out); +int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen); +int SSL_client_hello_get0_ext(SSL *s, unsigned int type, + const unsigned char **out, size_t *outlen); + +void SSL_certs_clear(SSL *s); +void SSL_free(SSL *ssl); +# ifdef OSSL_ASYNC_FD +/* + * Windows application developer has to include windows.h to use these. + */ +__owur int SSL_waiting_for_async(SSL *s); +__owur int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fds, size_t *numfds); +__owur int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, + size_t *numaddfds, OSSL_ASYNC_FD *delfd, + size_t *numdelfds); +# endif +__owur int SSL_accept(SSL *ssl); +__owur int SSL_stateless(SSL *s); +__owur int SSL_connect(SSL *ssl); +__owur int SSL_read(SSL *ssl, void *buf, int num); +__owur int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes); + +# define SSL_READ_EARLY_DATA_ERROR 0 +# define SSL_READ_EARLY_DATA_SUCCESS 1 +# define SSL_READ_EARLY_DATA_FINISH 2 + +__owur int SSL_read_early_data(SSL *s, void *buf, size_t num, + size_t *readbytes); +__owur int SSL_peek(SSL *ssl, void *buf, int num); +__owur int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes); +__owur int SSL_write(SSL *ssl, const void *buf, int num); +__owur int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written); +__owur int SSL_write_early_data(SSL *s, const void *buf, size_t num, + size_t *written); +long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); +long SSL_callback_ctrl(SSL *, int, void (*)(void)); +long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); +long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void)); + +# define SSL_EARLY_DATA_NOT_SENT 0 +# define SSL_EARLY_DATA_REJECTED 1 +# define SSL_EARLY_DATA_ACCEPTED 2 + +__owur int SSL_get_early_data_status(const SSL *s); + +__owur int SSL_get_error(const SSL *s, int ret_code); +__owur const char *SSL_get_version(const SSL *s); + +/* This sets the 'default' SSL version that SSL_new() will create */ +__owur int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth); + +# ifndef OPENSSL_NO_SSL3_METHOD +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_method(void)) /* SSLv3 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *SSLv3_client_method(void)) +# endif + +#define SSLv23_method TLS_method +#define SSLv23_server_method TLS_server_method +#define SSLv23_client_method TLS_client_method + +/* Negotiate highest available SSL/TLS version */ +__owur const SSL_METHOD *TLS_method(void); +__owur const SSL_METHOD *TLS_server_method(void); +__owur const SSL_METHOD *TLS_client_method(void); + +# ifndef OPENSSL_NO_TLS1_METHOD +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TLSv1.0 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) +# endif + +# ifndef OPENSSL_NO_TLS1_1_METHOD +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* TLSv1.1 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) +# endif + +# ifndef OPENSSL_NO_TLS1_2_METHOD +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* TLSv1.2 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) +# endif + +# ifndef OPENSSL_NO_DTLS1_METHOD +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_client_method(void)) +# endif + +# ifndef OPENSSL_NO_DTLS1_2_METHOD +/* DTLSv1.2 */ +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_server_method(void)) +DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_client_method(void)) +# endif + +__owur const SSL_METHOD *DTLS_method(void); /* DTLS 1.0 and 1.2 */ +__owur const SSL_METHOD *DTLS_server_method(void); /* DTLS 1.0 and 1.2 */ +__owur const SSL_METHOD *DTLS_client_method(void); /* DTLS 1.0 and 1.2 */ + +__owur size_t DTLS_get_data_mtu(const SSL *s); + +__owur STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); +__owur STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx); +__owur STACK_OF(SSL_CIPHER) *SSL_get_client_ciphers(const SSL *s); +__owur STACK_OF(SSL_CIPHER) *SSL_get1_supported_ciphers(SSL *s); + +__owur int SSL_do_handshake(SSL *s); +int SSL_key_update(SSL *s, int updatetype); +int SSL_get_key_update_type(const SSL *s); +int SSL_renegotiate(SSL *s); +int SSL_renegotiate_abbreviated(SSL *s); +__owur int SSL_renegotiate_pending(const SSL *s); +int SSL_shutdown(SSL *s); +__owur int SSL_verify_client_post_handshake(SSL *s); +void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val); +void SSL_set_post_handshake_auth(SSL *s, int val); + +__owur const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx); +__owur const SSL_METHOD *SSL_get_ssl_method(const SSL *s); +__owur int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); +__owur const char *SSL_alert_type_string_long(int value); +__owur const char *SSL_alert_type_string(int value); +__owur const char *SSL_alert_desc_string_long(int value); +__owur const char *SSL_alert_desc_string(int value); + +void SSL_set0_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); +void SSL_CTX_set0_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); +__owur const STACK_OF(X509_NAME) *SSL_get0_CA_list(const SSL *s); +__owur const STACK_OF(X509_NAME) *SSL_CTX_get0_CA_list(const SSL_CTX *ctx); +__owur int SSL_add1_to_CA_list(SSL *ssl, const X509 *x); +__owur int SSL_CTX_add1_to_CA_list(SSL_CTX *ctx, const X509 *x); +__owur const STACK_OF(X509_NAME) *SSL_get0_peer_CA_list(const SSL *s); + +void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); +void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); +__owur STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s); +__owur STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s); +__owur int SSL_add_client_CA(SSL *ssl, X509 *x); +__owur int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x); + +void SSL_set_connect_state(SSL *s); +void SSL_set_accept_state(SSL *s); + +__owur long SSL_get_default_timeout(const SSL *s); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_library_init() OPENSSL_init_ssl(0, NULL) +# endif + +__owur char *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size); +__owur STACK_OF(X509_NAME) *SSL_dup_CA_list(const STACK_OF(X509_NAME) *sk); + +__owur SSL *SSL_dup(SSL *ssl); + +__owur X509 *SSL_get_certificate(const SSL *ssl); +/* + * EVP_PKEY + */ +struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl); + +__owur X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx); +__owur EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx); + +void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode); +__owur int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); +void SSL_set_quiet_shutdown(SSL *ssl, int mode); +__owur int SSL_get_quiet_shutdown(const SSL *ssl); +void SSL_set_shutdown(SSL *ssl, int mode); +__owur int SSL_get_shutdown(const SSL *ssl); +__owur int SSL_version(const SSL *ssl); +__owur int SSL_client_version(const SSL *s); +__owur int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); +__owur int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx); +__owur int SSL_CTX_set_default_verify_file(SSL_CTX *ctx); +__owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, + const char *CApath); +# define SSL_get0_session SSL_get_session/* just peek at pointer */ +__owur SSL_SESSION *SSL_get_session(const SSL *ssl); +__owur SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ +__owur SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); +SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx); +void SSL_set_info_callback(SSL *ssl, + void (*cb) (const SSL *ssl, int type, int val)); +void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type, + int val); +__owur OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl); + +void SSL_set_verify_result(SSL *ssl, long v); +__owur long SSL_get_verify_result(const SSL *ssl); +__owur STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s); + +__owur size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, + size_t outlen); +__owur size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, + size_t outlen); +__owur size_t SSL_SESSION_get_master_key(const SSL_SESSION *sess, + unsigned char *out, size_t outlen); +__owur int SSL_SESSION_set1_master_key(SSL_SESSION *sess, + const unsigned char *in, size_t len); +uint8_t SSL_SESSION_get_max_fragment_length(const SSL_SESSION *sess); + +#define SSL_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, l, p, newf, dupf, freef) +__owur int SSL_set_ex_data(SSL *ssl, int idx, void *data); +void *SSL_get_ex_data(const SSL *ssl, int idx); +#define SSL_SESSION_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_SESSION, l, p, newf, dupf, freef) +__owur int SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data); +void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss, int idx); +#define SSL_CTX_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, l, p, newf, dupf, freef) +__owur int SSL_CTX_set_ex_data(SSL_CTX *ssl, int idx, void *data); +void *SSL_CTX_get_ex_data(const SSL_CTX *ssl, int idx); + +__owur int SSL_get_ex_data_X509_STORE_CTX_idx(void); + +# define SSL_CTX_sess_set_cache_size(ctx,t) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL) +# define SSL_CTX_sess_get_cache_size(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL) +# define SSL_CTX_set_session_cache_mode(ctx,m) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL) +# define SSL_CTX_get_session_cache_mode(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL) + +# define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx) +# define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m) +# define SSL_CTX_get_read_ahead(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL) +# define SSL_CTX_set_read_ahead(ctx,m) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL) +# define SSL_CTX_get_max_cert_list(ctx) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) +# define SSL_CTX_set_max_cert_list(ctx,m) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) +# define SSL_get_max_cert_list(ssl) \ + SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) +# define SSL_set_max_cert_list(ssl,m) \ + SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) + +# define SSL_CTX_set_max_send_fragment(ctx,m) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL) +# define SSL_set_max_send_fragment(ssl,m) \ + SSL_ctrl(ssl,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL) +# define SSL_CTX_set_split_send_fragment(ctx,m) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SPLIT_SEND_FRAGMENT,m,NULL) +# define SSL_set_split_send_fragment(ssl,m) \ + SSL_ctrl(ssl,SSL_CTRL_SET_SPLIT_SEND_FRAGMENT,m,NULL) +# define SSL_CTX_set_max_pipelines(ctx,m) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_PIPELINES,m,NULL) +# define SSL_set_max_pipelines(ssl,m) \ + SSL_ctrl(ssl,SSL_CTRL_SET_MAX_PIPELINES,m,NULL) + +void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len); +void SSL_set_default_read_buffer_len(SSL *s, size_t len); + +# ifndef OPENSSL_NO_DH +/* NB: the |keylength| is only applicable when is_export is true */ +void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, + DH *(*dh) (SSL *ssl, int is_export, + int keylength)); +void SSL_set_tmp_dh_callback(SSL *ssl, + DH *(*dh) (SSL *ssl, int is_export, + int keylength)); +# endif + +__owur const COMP_METHOD *SSL_get_current_compression(const SSL *s); +__owur const COMP_METHOD *SSL_get_current_expansion(const SSL *s); +__owur const char *SSL_COMP_get_name(const COMP_METHOD *comp); +__owur const char *SSL_COMP_get0_name(const SSL_COMP *comp); +__owur int SSL_COMP_get_id(const SSL_COMP *comp); +STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); +__owur STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) + *meths); +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_COMP_free_compression_methods() while(0) continue +# endif +__owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm); + +const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr); +int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c); +int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c); +int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len, + int isv2format, STACK_OF(SSL_CIPHER) **sk, + STACK_OF(SSL_CIPHER) **scsvs); + +/* TLS extensions functions */ +__owur int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len); + +__owur int SSL_set_session_ticket_ext_cb(SSL *s, + tls_session_ticket_ext_cb_fn cb, + void *arg); + +/* Pre-shared secret session resumption functions */ +__owur int SSL_set_session_secret_cb(SSL *s, + tls_session_secret_cb_fn session_secret_cb, + void *arg); + +void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx, + int (*cb) (SSL *ssl, + int + is_forward_secure)); + +void SSL_set_not_resumable_session_callback(SSL *ssl, + int (*cb) (SSL *ssl, + int is_forward_secure)); + +void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx, + size_t (*cb) (SSL *ssl, int type, + size_t len, void *arg)); +void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg); +void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx); +int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size); + +void SSL_set_record_padding_callback(SSL *ssl, + size_t (*cb) (SSL *ssl, int type, + size_t len, void *arg)); +void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg); +void *SSL_get_record_padding_callback_arg(const SSL *ssl); +int SSL_set_block_padding(SSL *ssl, size_t block_size); + +int SSL_set_num_tickets(SSL *s, size_t num_tickets); +size_t SSL_get_num_tickets(const SSL *s); +int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets); +size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_cache_hit(s) SSL_session_reused(s) +# endif + +__owur int SSL_session_reused(const SSL *s); +__owur int SSL_is_server(const SSL *s); + +__owur __owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); +int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); +void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); +unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags); +__owur unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, + unsigned int flags); +__owur int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre); + +void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl); +void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx); + +__owur int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value); +__owur int SSL_CONF_cmd_argv(SSL_CONF_CTX *cctx, int *pargc, char ***pargv); +__owur int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd); + +void SSL_add_ssl_module(void); +int SSL_config(SSL *s, const char *name); +int SSL_CTX_config(SSL_CTX *ctx, const char *name); + +# ifndef OPENSSL_NO_SSL_TRACE +void SSL_trace(int write_p, int version, int content_type, + const void *buf, size_t len, SSL *ssl, void *arg); +# endif + +# ifndef OPENSSL_NO_SOCK +int DTLSv1_listen(SSL *s, BIO_ADDR *client); +# endif + +# ifndef OPENSSL_NO_CT + +/* + * A callback for verifying that the received SCTs are sufficient. + * Expected to return 1 if they are sufficient, otherwise 0. + * May return a negative integer if an error occurs. + * A connection should be aborted if the SCTs are deemed insufficient. + */ +typedef int (*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx, + const STACK_OF(SCT) *scts, void *arg); + +/* + * Sets a |callback| that is invoked upon receipt of ServerHelloDone to validate + * the received SCTs. + * If the callback returns a non-positive result, the connection is terminated. + * Call this function before beginning a handshake. + * If a NULL |callback| is provided, SCT validation is disabled. + * |arg| is arbitrary userdata that will be passed to the callback whenever it + * is invoked. Ownership of |arg| remains with the caller. + * + * NOTE: A side-effect of setting a CT callback is that an OCSP stapled response + * will be requested. + */ +int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback, + void *arg); +int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx, + ssl_ct_validation_cb callback, + void *arg); +#define SSL_disable_ct(s) \ + ((void) SSL_set_validation_callback((s), NULL, NULL)) +#define SSL_CTX_disable_ct(ctx) \ + ((void) SSL_CTX_set_validation_callback((ctx), NULL, NULL)) + +/* + * The validation type enumerates the available behaviours of the built-in SSL + * CT validation callback selected via SSL_enable_ct() and SSL_CTX_enable_ct(). + * The underlying callback is a static function in libssl. + */ +enum { + SSL_CT_VALIDATION_PERMISSIVE = 0, + SSL_CT_VALIDATION_STRICT +}; + +/* + * Enable CT by setting up a callback that implements one of the built-in + * validation variants. The SSL_CT_VALIDATION_PERMISSIVE variant always + * continues the handshake, the application can make appropriate decisions at + * handshake completion. The SSL_CT_VALIDATION_STRICT variant requires at + * least one valid SCT, or else handshake termination will be requested. The + * handshake may continue anyway if SSL_VERIFY_NONE is in effect. + */ +int SSL_enable_ct(SSL *s, int validation_mode); +int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode); + +/* + * Report whether a non-NULL callback is enabled. + */ +int SSL_ct_is_enabled(const SSL *s); +int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx); + +/* Gets the SCTs received from a connection */ +const STACK_OF(SCT) *SSL_get0_peer_scts(SSL *s); + +/* + * Loads the CT log list from the default location. + * If a CTLOG_STORE has previously been set using SSL_CTX_set_ctlog_store, + * the log information loaded from this file will be appended to the + * CTLOG_STORE. + * Returns 1 on success, 0 otherwise. + */ +int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx); + +/* + * Loads the CT log list from the specified file path. + * If a CTLOG_STORE has previously been set using SSL_CTX_set_ctlog_store, + * the log information loaded from this file will be appended to the + * CTLOG_STORE. + * Returns 1 on success, 0 otherwise. + */ +int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path); + +/* + * Sets the CT log list used by all SSL connections created from this SSL_CTX. + * Ownership of the CTLOG_STORE is transferred to the SSL_CTX. + */ +void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs); + +/* + * Gets the CT log list used by all SSL connections created from this SSL_CTX. + * This will be NULL unless one of the following functions has been called: + * - SSL_CTX_set_default_ctlog_list_file + * - SSL_CTX_set_ctlog_list_file + * - SSL_CTX_set_ctlog_store + */ +const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx); + +# endif /* OPENSSL_NO_CT */ + +/* What the "other" parameter contains in security callback */ +/* Mask for type */ +# define SSL_SECOP_OTHER_TYPE 0xffff0000 +# define SSL_SECOP_OTHER_NONE 0 +# define SSL_SECOP_OTHER_CIPHER (1 << 16) +# define SSL_SECOP_OTHER_CURVE (2 << 16) +# define SSL_SECOP_OTHER_DH (3 << 16) +# define SSL_SECOP_OTHER_PKEY (4 << 16) +# define SSL_SECOP_OTHER_SIGALG (5 << 16) +# define SSL_SECOP_OTHER_CERT (6 << 16) + +/* Indicated operation refers to peer key or certificate */ +# define SSL_SECOP_PEER 0x1000 + +/* Values for "op" parameter in security callback */ + +/* Called to filter ciphers */ +/* Ciphers client supports */ +# define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER) +/* Cipher shared by client/server */ +# define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER) +/* Sanity check of cipher server selects */ +# define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER) +/* Curves supported by client */ +# define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE) +/* Curves shared by client/server */ +# define SSL_SECOP_CURVE_SHARED (5 | SSL_SECOP_OTHER_CURVE) +/* Sanity check of curve server selects */ +# define SSL_SECOP_CURVE_CHECK (6 | SSL_SECOP_OTHER_CURVE) +/* Temporary DH key */ +# define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY) +/* SSL/TLS version */ +# define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE) +/* Session tickets */ +# define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE) +/* Supported signature algorithms sent to peer */ +# define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG) +/* Shared signature algorithm */ +# define SSL_SECOP_SIGALG_SHARED (12 | SSL_SECOP_OTHER_SIGALG) +/* Sanity check signature algorithm allowed */ +# define SSL_SECOP_SIGALG_CHECK (13 | SSL_SECOP_OTHER_SIGALG) +/* Used to get mask of supported public key signature algorithms */ +# define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG) +/* Use to see if compression is allowed */ +# define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE) +/* EE key in certificate */ +# define SSL_SECOP_EE_KEY (16 | SSL_SECOP_OTHER_CERT) +/* CA key in certificate */ +# define SSL_SECOP_CA_KEY (17 | SSL_SECOP_OTHER_CERT) +/* CA digest algorithm in certificate */ +# define SSL_SECOP_CA_MD (18 | SSL_SECOP_OTHER_CERT) +/* Peer EE key in certificate */ +# define SSL_SECOP_PEER_EE_KEY (SSL_SECOP_EE_KEY | SSL_SECOP_PEER) +/* Peer CA key in certificate */ +# define SSL_SECOP_PEER_CA_KEY (SSL_SECOP_CA_KEY | SSL_SECOP_PEER) +/* Peer CA digest algorithm in certificate */ +# define SSL_SECOP_PEER_CA_MD (SSL_SECOP_CA_MD | SSL_SECOP_PEER) + +void SSL_set_security_level(SSL *s, int level); +__owur int SSL_get_security_level(const SSL *s); +void SSL_set_security_callback(SSL *s, + int (*cb) (const SSL *s, const SSL_CTX *ctx, + int op, int bits, int nid, + void *other, void *ex)); +int (*SSL_get_security_callback(const SSL *s)) (const SSL *s, + const SSL_CTX *ctx, int op, + int bits, int nid, void *other, + void *ex); +void SSL_set0_security_ex_data(SSL *s, void *ex); +__owur void *SSL_get0_security_ex_data(const SSL *s); + +void SSL_CTX_set_security_level(SSL_CTX *ctx, int level); +__owur int SSL_CTX_get_security_level(const SSL_CTX *ctx); +void SSL_CTX_set_security_callback(SSL_CTX *ctx, + int (*cb) (const SSL *s, const SSL_CTX *ctx, + int op, int bits, int nid, + void *other, void *ex)); +int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s, + const SSL_CTX *ctx, + int op, int bits, + int nid, + void *other, + void *ex); +void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex); +__owur void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx); + +/* OPENSSL_INIT flag 0x010000 reserved for internal use */ +# define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L +# define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L + +# define OPENSSL_INIT_SSL_DEFAULT \ + (OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS) + +int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); + +# ifndef OPENSSL_NO_UNIT_TEST +__owur const struct openssl_ssl_test_functions *SSL_test_functions(void); +# endif + +__owur int SSL_free_buffers(SSL *ssl); +__owur int SSL_alloc_buffers(SSL *ssl); + +/* Status codes passed to the decrypt session ticket callback. Some of these + * are for internal use only and are never passed to the callback. */ +typedef int SSL_TICKET_STATUS; + +/* Support for ticket appdata */ +/* fatal error, malloc failure */ +# define SSL_TICKET_FATAL_ERR_MALLOC 0 +/* fatal error, either from parsing or decrypting the ticket */ +# define SSL_TICKET_FATAL_ERR_OTHER 1 +/* No ticket present */ +# define SSL_TICKET_NONE 2 +/* Empty ticket present */ +# define SSL_TICKET_EMPTY 3 +/* the ticket couldn't be decrypted */ +# define SSL_TICKET_NO_DECRYPT 4 +/* a ticket was successfully decrypted */ +# define SSL_TICKET_SUCCESS 5 +/* same as above but the ticket needs to be renewed */ +# define SSL_TICKET_SUCCESS_RENEW 6 + +/* Return codes for the decrypt session ticket callback */ +typedef int SSL_TICKET_RETURN; + +/* An error occurred */ +#define SSL_TICKET_RETURN_ABORT 0 +/* Do not use the ticket, do not send a renewed ticket to the client */ +#define SSL_TICKET_RETURN_IGNORE 1 +/* Do not use the ticket, send a renewed ticket to the client */ +#define SSL_TICKET_RETURN_IGNORE_RENEW 2 +/* Use the ticket, do not send a renewed ticket to the client */ +#define SSL_TICKET_RETURN_USE 3 +/* Use the ticket, send a renewed ticket to the client */ +#define SSL_TICKET_RETURN_USE_RENEW 4 + +typedef int (*SSL_CTX_generate_session_ticket_fn)(SSL *s, void *arg); +typedef SSL_TICKET_RETURN (*SSL_CTX_decrypt_session_ticket_fn)(SSL *s, SSL_SESSION *ss, + const unsigned char *keyname, + size_t keyname_length, + SSL_TICKET_STATUS status, + void *arg); +int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx, + SSL_CTX_generate_session_ticket_fn gen_cb, + SSL_CTX_decrypt_session_ticket_fn dec_cb, + void *arg); +int SSL_SESSION_set1_ticket_appdata(SSL_SESSION *ss, const void *data, size_t len); +int SSL_SESSION_get0_ticket_appdata(SSL_SESSION *ss, void **data, size_t *len); + +extern const char SSL_version_str[]; + +typedef unsigned int (*DTLS_timer_cb)(SSL *s, unsigned int timer_us); + +void DTLS_set_timer_cb(SSL *s, DTLS_timer_cb cb); + + +typedef int (*SSL_allow_early_data_cb_fn)(SSL *s, void *arg); +void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx, + SSL_allow_early_data_cb_fn cb, + void *arg); +void SSL_set_allow_early_data_cb(SSL *s, + SSL_allow_early_data_cb_fn cb, + void *arg); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ssl2.h b/src/Mayaqua/win32_inc/openssl/ssl2.h index 8aeccef8..5321bd27 100644 --- a/src/Mayaqua/win32_inc/openssl/ssl2.h +++ b/src/Mayaqua/win32_inc/openssl/ssl2.h @@ -1,265 +1,24 @@ -/* ssl/ssl2.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_SSL2_H -# define HEADER_SSL2_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Protocol Version Codes */ -# define SSL2_VERSION 0x0002 -# define SSL2_VERSION_MAJOR 0x00 -# define SSL2_VERSION_MINOR 0x02 -/* #define SSL2_CLIENT_VERSION 0x0002 */ -/* #define SSL2_SERVER_VERSION 0x0002 */ - -/* Protocol Message Codes */ -# define SSL2_MT_ERROR 0 -# define SSL2_MT_CLIENT_HELLO 1 -# define SSL2_MT_CLIENT_MASTER_KEY 2 -# define SSL2_MT_CLIENT_FINISHED 3 -# define SSL2_MT_SERVER_HELLO 4 -# define SSL2_MT_SERVER_VERIFY 5 -# define SSL2_MT_SERVER_FINISHED 6 -# define SSL2_MT_REQUEST_CERTIFICATE 7 -# define SSL2_MT_CLIENT_CERTIFICATE 8 - -/* Error Message Codes */ -# define SSL2_PE_UNDEFINED_ERROR 0x0000 -# define SSL2_PE_NO_CIPHER 0x0001 -# define SSL2_PE_NO_CERTIFICATE 0x0002 -# define SSL2_PE_BAD_CERTIFICATE 0x0004 -# define SSL2_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006 - -/* Cipher Kind Values */ -# define SSL2_CK_NULL_WITH_MD5 0x02000000/* v3 */ -# define SSL2_CK_RC4_128_WITH_MD5 0x02010080 -# define SSL2_CK_RC4_128_EXPORT40_WITH_MD5 0x02020080 -# define SSL2_CK_RC2_128_CBC_WITH_MD5 0x02030080 -# define SSL2_CK_RC2_128_CBC_EXPORT40_WITH_MD5 0x02040080 -# define SSL2_CK_IDEA_128_CBC_WITH_MD5 0x02050080 -# define SSL2_CK_DES_64_CBC_WITH_MD5 0x02060040 -# define SSL2_CK_DES_64_CBC_WITH_SHA 0x02060140/* v3 */ -# define SSL2_CK_DES_192_EDE3_CBC_WITH_MD5 0x020700c0 -# define SSL2_CK_DES_192_EDE3_CBC_WITH_SHA 0x020701c0/* v3 */ -# define SSL2_CK_RC4_64_WITH_MD5 0x02080080/* MS hack */ - -# define SSL2_CK_DES_64_CFB64_WITH_MD5_1 0x02ff0800/* SSLeay */ -# define SSL2_CK_NULL 0x02ff0810/* SSLeay */ - -# define SSL2_TXT_DES_64_CFB64_WITH_MD5_1 "DES-CFB-M1" -# define SSL2_TXT_NULL_WITH_MD5 "NULL-MD5" -# define SSL2_TXT_RC4_128_WITH_MD5 "RC4-MD5" -# define SSL2_TXT_RC4_128_EXPORT40_WITH_MD5 "EXP-RC4-MD5" -# define SSL2_TXT_RC2_128_CBC_WITH_MD5 "RC2-CBC-MD5" -# define SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 "EXP-RC2-CBC-MD5" -# define SSL2_TXT_IDEA_128_CBC_WITH_MD5 "IDEA-CBC-MD5" -# define SSL2_TXT_DES_64_CBC_WITH_MD5 "DES-CBC-MD5" -# define SSL2_TXT_DES_64_CBC_WITH_SHA "DES-CBC-SHA" -# define SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5 "DES-CBC3-MD5" -# define SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA "DES-CBC3-SHA" -# define SSL2_TXT_RC4_64_WITH_MD5 "RC4-64-MD5" - -# define SSL2_TXT_NULL "NULL" - -/* Flags for the SSL_CIPHER.algorithm2 field */ -# define SSL2_CF_5_BYTE_ENC 0x01 -# define SSL2_CF_8_BYTE_ENC 0x02 - -/* Certificate Type Codes */ -# define SSL2_CT_X509_CERTIFICATE 0x01 - -/* Authentication Type Code */ -# define SSL2_AT_MD5_WITH_RSA_ENCRYPTION 0x01 - -# define SSL2_MAX_SSL_SESSION_ID_LENGTH 32 - -/* Upper/Lower Bounds */ -# define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 -# ifdef OPENSSL_SYS_MPE -# define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 29998u -# else -# define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 32767u - /* 2^15-1 */ -# endif -# define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383/* 2^14-1 */ - -# define SSL2_CHALLENGE_LENGTH 16 -/* - * #define SSL2_CHALLENGE_LENGTH 32 - */ -# define SSL2_MIN_CHALLENGE_LENGTH 16 -# define SSL2_MAX_CHALLENGE_LENGTH 32 -# define SSL2_CONNECTION_ID_LENGTH 16 -# define SSL2_MAX_CONNECTION_ID_LENGTH 16 -# define SSL2_SSL_SESSION_ID_LENGTH 16 -# define SSL2_MAX_CERT_CHALLENGE_LENGTH 32 -# define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 -# define SSL2_MAX_KEY_MATERIAL_LENGTH 24 - -# ifndef HEADER_SSL_LOCL_H -# define CERT char -# endif - -# ifndef OPENSSL_NO_SSL_INTERN - -typedef struct ssl2_state_st { - int three_byte_header; - int clear_text; /* clear text */ - int escape; /* not used in SSLv2 */ - int ssl2_rollback; /* used if SSLv23 rolled back to SSLv2 */ - /* - * non-blocking io info, used to make sure the same args were passwd - */ - unsigned int wnum; /* number of bytes sent so far */ - int wpend_tot; - const unsigned char *wpend_buf; - int wpend_off; /* offset to data to write */ - int wpend_len; /* number of bytes passwd to write */ - int wpend_ret; /* number of bytes to return to caller */ - /* buffer raw data */ - int rbuf_left; - int rbuf_offs; - unsigned char *rbuf; - unsigned char *wbuf; - unsigned char *write_ptr; /* used to point to the start due to 2/3 byte - * header. */ - unsigned int padding; - unsigned int rlength; /* passed to ssl2_enc */ - int ract_data_length; /* Set when things are encrypted. */ - unsigned int wlength; /* passed to ssl2_enc */ - int wact_data_length; /* Set when things are decrypted. */ - unsigned char *ract_data; - unsigned char *wact_data; - unsigned char *mac_data; - unsigned char *read_key; - unsigned char *write_key; - /* Stuff specifically to do with this SSL session */ - unsigned int challenge_length; - unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH]; - unsigned int conn_id_length; - unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH]; - unsigned int key_material_length; - unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH * 2]; - unsigned long read_sequence; - unsigned long write_sequence; - struct { - unsigned int conn_id_length; - unsigned int cert_type; - unsigned int cert_length; - unsigned int csl; - unsigned int clear; - unsigned int enc; - unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; - unsigned int cipher_spec_length; - unsigned int session_id_length; - unsigned int clen; - unsigned int rlen; - } tmp; -} SSL2_STATE; - -# endif - -/* SSLv2 */ -/* client */ -# define SSL2_ST_SEND_CLIENT_HELLO_A (0x10|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_HELLO_B (0x11|SSL_ST_CONNECT) -# define SSL2_ST_GET_SERVER_HELLO_A (0x20|SSL_ST_CONNECT) -# define SSL2_ST_GET_SERVER_HELLO_B (0x21|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_MASTER_KEY_A (0x30|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_MASTER_KEY_B (0x31|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_FINISHED_A (0x40|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_FINISHED_B (0x41|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_CERTIFICATE_A (0x50|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_CERTIFICATE_B (0x51|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_CERTIFICATE_C (0x52|SSL_ST_CONNECT) -# define SSL2_ST_SEND_CLIENT_CERTIFICATE_D (0x53|SSL_ST_CONNECT) -# define SSL2_ST_GET_SERVER_VERIFY_A (0x60|SSL_ST_CONNECT) -# define SSL2_ST_GET_SERVER_VERIFY_B (0x61|SSL_ST_CONNECT) -# define SSL2_ST_GET_SERVER_FINISHED_A (0x70|SSL_ST_CONNECT) -# define SSL2_ST_GET_SERVER_FINISHED_B (0x71|SSL_ST_CONNECT) -# define SSL2_ST_CLIENT_START_ENCRYPTION (0x80|SSL_ST_CONNECT) -# define SSL2_ST_X509_GET_CLIENT_CERTIFICATE (0x90|SSL_ST_CONNECT) -/* server */ -# define SSL2_ST_GET_CLIENT_HELLO_A (0x10|SSL_ST_ACCEPT) -# define SSL2_ST_GET_CLIENT_HELLO_B (0x11|SSL_ST_ACCEPT) -# define SSL2_ST_GET_CLIENT_HELLO_C (0x12|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_HELLO_A (0x20|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_HELLO_B (0x21|SSL_ST_ACCEPT) -# define SSL2_ST_GET_CLIENT_MASTER_KEY_A (0x30|SSL_ST_ACCEPT) -# define SSL2_ST_GET_CLIENT_MASTER_KEY_B (0x31|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_VERIFY_A (0x40|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_VERIFY_B (0x41|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_VERIFY_C (0x42|SSL_ST_ACCEPT) -# define SSL2_ST_GET_CLIENT_FINISHED_A (0x50|SSL_ST_ACCEPT) -# define SSL2_ST_GET_CLIENT_FINISHED_B (0x51|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_FINISHED_A (0x60|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_SERVER_FINISHED_B (0x61|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_REQUEST_CERTIFICATE_A (0x70|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_REQUEST_CERTIFICATE_B (0x71|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_REQUEST_CERTIFICATE_C (0x72|SSL_ST_ACCEPT) -# define SSL2_ST_SEND_REQUEST_CERTIFICATE_D (0x73|SSL_ST_ACCEPT) -# define SSL2_ST_SERVER_START_ENCRYPTION (0x80|SSL_ST_ACCEPT) -# define SSL2_ST_X509_GET_SERVER_CERTIFICATE (0x90|SSL_ST_ACCEPT) - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SSL2_H +# define HEADER_SSL2_H + +#ifdef __cplusplus +extern "C" { +#endif + +# define SSL2_VERSION 0x0002 + +# define SSL2_MT_CLIENT_HELLO 1 + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ssl23.h b/src/Mayaqua/win32_inc/openssl/ssl23.h deleted file mode 100644 index 94ba60a5..00000000 --- a/src/Mayaqua/win32_inc/openssl/ssl23.h +++ /dev/null @@ -1,84 +0,0 @@ -/* ssl/ssl23.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_SSL23_H -# define HEADER_SSL23_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * client - */ -/* write to server */ -# define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) -# define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) -/* read from server */ -# define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) -# define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) - -/* server */ -/* read from client */ -# define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) -# define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/Mayaqua/win32_inc/openssl/ssl3.h b/src/Mayaqua/win32_inc/openssl/ssl3.h index 6f4079c1..8d01fcc4 100644 --- a/src/Mayaqua/win32_inc/openssl/ssl3.h +++ b/src/Mayaqua/win32_inc/openssl/ssl3.h @@ -1,774 +1,339 @@ -/* ssl/ssl3.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECC cipher suite support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_SSL3_H -# define HEADER_SSL3_H - -# ifndef OPENSSL_NO_COMP -# include -# endif -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Signalling cipher suite value from RFC 5746 - * (TLS_EMPTY_RENEGOTIATION_INFO_SCSV) - */ -# define SSL3_CK_SCSV 0x030000FF - -/* - * Signalling cipher suite value from draft-ietf-tls-downgrade-scsv-00 - * (TLS_FALLBACK_SCSV) - */ -# define SSL3_CK_FALLBACK_SCSV 0x03005600 - -# define SSL3_CK_RSA_NULL_MD5 0x03000001 -# define SSL3_CK_RSA_NULL_SHA 0x03000002 -# define SSL3_CK_RSA_RC4_40_MD5 0x03000003 -# define SSL3_CK_RSA_RC4_128_MD5 0x03000004 -# define SSL3_CK_RSA_RC4_128_SHA 0x03000005 -# define SSL3_CK_RSA_RC2_40_MD5 0x03000006 -# define SSL3_CK_RSA_IDEA_128_SHA 0x03000007 -# define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008 -# define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009 -# define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A - -# define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B -# define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C -# define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D -# define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E -# define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F -# define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010 - -# define SSL3_CK_EDH_DSS_DES_40_CBC_SHA 0x03000011 -# define SSL3_CK_DHE_DSS_DES_40_CBC_SHA SSL3_CK_EDH_DSS_DES_40_CBC_SHA -# define SSL3_CK_EDH_DSS_DES_64_CBC_SHA 0x03000012 -# define SSL3_CK_DHE_DSS_DES_64_CBC_SHA SSL3_CK_EDH_DSS_DES_64_CBC_SHA -# define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA 0x03000013 -# define SSL3_CK_DHE_DSS_DES_192_CBC3_SHA SSL3_CK_EDH_DSS_DES_192_CBC3_SHA -# define SSL3_CK_EDH_RSA_DES_40_CBC_SHA 0x03000014 -# define SSL3_CK_DHE_RSA_DES_40_CBC_SHA SSL3_CK_EDH_RSA_DES_40_CBC_SHA -# define SSL3_CK_EDH_RSA_DES_64_CBC_SHA 0x03000015 -# define SSL3_CK_DHE_RSA_DES_64_CBC_SHA SSL3_CK_EDH_RSA_DES_64_CBC_SHA -# define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA 0x03000016 -# define SSL3_CK_DHE_RSA_DES_192_CBC3_SHA SSL3_CK_EDH_RSA_DES_192_CBC3_SHA - -# define SSL3_CK_ADH_RC4_40_MD5 0x03000017 -# define SSL3_CK_ADH_RC4_128_MD5 0x03000018 -# define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019 -# define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A -# define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B - -# if 0 -# define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C -# define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D -# if 0 /* Because it clashes with KRB5, is never - * used any more, and is safe to remove - * according to David Hopwood - * of the - * ietf-tls list */ -# define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E -# endif -# endif - -/* - * VRS Additional Kerberos5 entries - */ -# define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E -# define SSL3_CK_KRB5_DES_192_CBC3_SHA 0x0300001F -# define SSL3_CK_KRB5_RC4_128_SHA 0x03000020 -# define SSL3_CK_KRB5_IDEA_128_CBC_SHA 0x03000021 -# define SSL3_CK_KRB5_DES_64_CBC_MD5 0x03000022 -# define SSL3_CK_KRB5_DES_192_CBC3_MD5 0x03000023 -# define SSL3_CK_KRB5_RC4_128_MD5 0x03000024 -# define SSL3_CK_KRB5_IDEA_128_CBC_MD5 0x03000025 - -# define SSL3_CK_KRB5_DES_40_CBC_SHA 0x03000026 -# define SSL3_CK_KRB5_RC2_40_CBC_SHA 0x03000027 -# define SSL3_CK_KRB5_RC4_40_SHA 0x03000028 -# define SSL3_CK_KRB5_DES_40_CBC_MD5 0x03000029 -# define SSL3_CK_KRB5_RC2_40_CBC_MD5 0x0300002A -# define SSL3_CK_KRB5_RC4_40_MD5 0x0300002B - -# define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5" -# define SSL3_TXT_RSA_NULL_SHA "NULL-SHA" -# define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5" -# define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5" -# define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA" -# define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5" -# define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA" -# define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA" -# define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA" -# define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA" - -# define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA" -# define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA" -# define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA" -# define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA" -# define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA" -# define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA" - -# define SSL3_TXT_DHE_DSS_DES_40_CBC_SHA "EXP-DHE-DSS-DES-CBC-SHA" -# define SSL3_TXT_DHE_DSS_DES_64_CBC_SHA "DHE-DSS-DES-CBC-SHA" -# define SSL3_TXT_DHE_DSS_DES_192_CBC3_SHA "DHE-DSS-DES-CBC3-SHA" -# define SSL3_TXT_DHE_RSA_DES_40_CBC_SHA "EXP-DHE-RSA-DES-CBC-SHA" -# define SSL3_TXT_DHE_RSA_DES_64_CBC_SHA "DHE-RSA-DES-CBC-SHA" -# define SSL3_TXT_DHE_RSA_DES_192_CBC3_SHA "DHE-RSA-DES-CBC3-SHA" - -/* - * This next block of six "EDH" labels is for backward compatibility with - * older versions of OpenSSL. New code should use the six "DHE" labels above - * instead: - */ -# define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA" -# define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA" -# define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA" -# define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA" -# define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA" -# define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA" - -# define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5" -# define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5" -# define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA" -# define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" -# define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" - -# if 0 -# define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA" -# define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA" -# define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA" -# endif - -# define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA" -# define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA" -# define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA" -# define SSL3_TXT_KRB5_IDEA_128_CBC_SHA "KRB5-IDEA-CBC-SHA" -# define SSL3_TXT_KRB5_DES_64_CBC_MD5 "KRB5-DES-CBC-MD5" -# define SSL3_TXT_KRB5_DES_192_CBC3_MD5 "KRB5-DES-CBC3-MD5" -# define SSL3_TXT_KRB5_RC4_128_MD5 "KRB5-RC4-MD5" -# define SSL3_TXT_KRB5_IDEA_128_CBC_MD5 "KRB5-IDEA-CBC-MD5" - -# define SSL3_TXT_KRB5_DES_40_CBC_SHA "EXP-KRB5-DES-CBC-SHA" -# define SSL3_TXT_KRB5_RC2_40_CBC_SHA "EXP-KRB5-RC2-CBC-SHA" -# define SSL3_TXT_KRB5_RC4_40_SHA "EXP-KRB5-RC4-SHA" -# define SSL3_TXT_KRB5_DES_40_CBC_MD5 "EXP-KRB5-DES-CBC-MD5" -# define SSL3_TXT_KRB5_RC2_40_CBC_MD5 "EXP-KRB5-RC2-CBC-MD5" -# define SSL3_TXT_KRB5_RC4_40_MD5 "EXP-KRB5-RC4-MD5" - -# define SSL3_SSL_SESSION_ID_LENGTH 32 -# define SSL3_MAX_SSL_SESSION_ID_LENGTH 32 - -# define SSL3_MASTER_SECRET_SIZE 48 -# define SSL3_RANDOM_SIZE 32 -# define SSL3_SESSION_ID_SIZE 32 -# define SSL3_RT_HEADER_LENGTH 5 - -# define SSL3_HM_HEADER_LENGTH 4 - -# ifndef SSL3_ALIGN_PAYLOAD - /* - * Some will argue that this increases memory footprint, but it's not - * actually true. Point is that malloc has to return at least 64-bit aligned - * pointers, meaning that allocating 5 bytes wastes 3 bytes in either case. - * Suggested pre-gaping simply moves these wasted bytes from the end of - * allocated region to its front, but makes data payload aligned, which - * improves performance:-) - */ -# define SSL3_ALIGN_PAYLOAD 8 -# else -# if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0 -# error "insane SSL3_ALIGN_PAYLOAD" -# undef SSL3_ALIGN_PAYLOAD -# endif -# endif - -/* - * This is the maximum MAC (digest) size used by the SSL library. Currently - * maximum of 20 is used by SHA1, but we reserve for future extension for - * 512-bit hashes. - */ - -# define SSL3_RT_MAX_MD_SIZE 64 - -/* - * Maximum block size used in all ciphersuites. Currently 16 for AES. - */ - -# define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16 - -# define SSL3_RT_MAX_EXTRA (16384) - -/* Maximum plaintext length: defined by SSL/TLS standards */ -# define SSL3_RT_MAX_PLAIN_LENGTH 16384 -/* Maximum compression overhead: defined by SSL/TLS standards */ -# define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024 - -/* - * The standards give a maximum encryption overhead of 1024 bytes. In - * practice the value is lower than this. The overhead is the maximum number - * of padding bytes (256) plus the mac size. - */ -# define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE) - -/* - * OpenSSL currently only uses a padding length of at most one block so the - * send overhead is smaller. - */ - -# define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \ - (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE) - -/* If compression isn't used don't include the compression overhead */ - -# ifdef OPENSSL_NO_COMP -# define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH -# else -# define SSL3_RT_MAX_COMPRESSED_LENGTH \ - (SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD) -# endif -# define SSL3_RT_MAX_ENCRYPTED_LENGTH \ - (SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH) -# define SSL3_RT_MAX_PACKET_SIZE \ - (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH) - -# define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54" -# define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52" - -# define SSL3_VERSION 0x0300 -# define SSL3_VERSION_MAJOR 0x03 -# define SSL3_VERSION_MINOR 0x00 - -# define SSL3_RT_CHANGE_CIPHER_SPEC 20 -# define SSL3_RT_ALERT 21 -# define SSL3_RT_HANDSHAKE 22 -# define SSL3_RT_APPLICATION_DATA 23 -# define TLS1_RT_HEARTBEAT 24 - -/* Pseudo content types to indicate additional parameters */ -# define TLS1_RT_CRYPTO 0x1000 -# define TLS1_RT_CRYPTO_PREMASTER (TLS1_RT_CRYPTO | 0x1) -# define TLS1_RT_CRYPTO_CLIENT_RANDOM (TLS1_RT_CRYPTO | 0x2) -# define TLS1_RT_CRYPTO_SERVER_RANDOM (TLS1_RT_CRYPTO | 0x3) -# define TLS1_RT_CRYPTO_MASTER (TLS1_RT_CRYPTO | 0x4) - -# define TLS1_RT_CRYPTO_READ 0x0000 -# define TLS1_RT_CRYPTO_WRITE 0x0100 -# define TLS1_RT_CRYPTO_MAC (TLS1_RT_CRYPTO | 0x5) -# define TLS1_RT_CRYPTO_KEY (TLS1_RT_CRYPTO | 0x6) -# define TLS1_RT_CRYPTO_IV (TLS1_RT_CRYPTO | 0x7) -# define TLS1_RT_CRYPTO_FIXED_IV (TLS1_RT_CRYPTO | 0x8) - -/* Pseudo content type for SSL/TLS header info */ -# define SSL3_RT_HEADER 0x100 - -# define SSL3_AL_WARNING 1 -# define SSL3_AL_FATAL 2 - -# define SSL3_AD_CLOSE_NOTIFY 0 -# define SSL3_AD_UNEXPECTED_MESSAGE 10/* fatal */ -# define SSL3_AD_BAD_RECORD_MAC 20/* fatal */ -# define SSL3_AD_DECOMPRESSION_FAILURE 30/* fatal */ -# define SSL3_AD_HANDSHAKE_FAILURE 40/* fatal */ -# define SSL3_AD_NO_CERTIFICATE 41 -# define SSL3_AD_BAD_CERTIFICATE 42 -# define SSL3_AD_UNSUPPORTED_CERTIFICATE 43 -# define SSL3_AD_CERTIFICATE_REVOKED 44 -# define SSL3_AD_CERTIFICATE_EXPIRED 45 -# define SSL3_AD_CERTIFICATE_UNKNOWN 46 -# define SSL3_AD_ILLEGAL_PARAMETER 47/* fatal */ - -# define TLS1_HB_REQUEST 1 -# define TLS1_HB_RESPONSE 2 - -# ifndef OPENSSL_NO_SSL_INTERN - -typedef struct ssl3_record_st { - /* type of record */ - /* - * r - */ int type; - /* How many bytes available */ - /* - * rw - */ unsigned int length; - /* read/write offset into 'buf' */ - /* - * r - */ unsigned int off; - /* pointer to the record data */ - /* - * rw - */ unsigned char *data; - /* where the decode bytes are */ - /* - * rw - */ unsigned char *input; - /* only used with decompression - malloc()ed */ - /* - * r - */ unsigned char *comp; - /* epoch number, needed by DTLS1 */ - /* - * r - */ unsigned long epoch; - /* sequence number, needed by DTLS1 */ - /* - * r - */ unsigned char seq_num[8]; -} SSL3_RECORD; - -typedef struct ssl3_buffer_st { - /* at least SSL3_RT_MAX_PACKET_SIZE bytes, see ssl3_setup_buffers() */ - unsigned char *buf; - /* buffer size */ - size_t len; - /* where to 'copy from' */ - int offset; - /* how many bytes left */ - int left; -} SSL3_BUFFER; - -# endif - -# define SSL3_CT_RSA_SIGN 1 -# define SSL3_CT_DSS_SIGN 2 -# define SSL3_CT_RSA_FIXED_DH 3 -# define SSL3_CT_DSS_FIXED_DH 4 -# define SSL3_CT_RSA_EPHEMERAL_DH 5 -# define SSL3_CT_DSS_EPHEMERAL_DH 6 -# define SSL3_CT_FORTEZZA_DMS 20 -/* - * SSL3_CT_NUMBER is used to size arrays and it must be large enough to - * contain all of the cert types defined either for SSLv3 and TLSv1. - */ -# define SSL3_CT_NUMBER 9 - -# define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 -# define SSL3_FLAGS_DELAY_CLIENT_FINISHED 0x0002 -# define SSL3_FLAGS_POP_BUFFER 0x0004 -# define TLS1_FLAGS_TLS_PADDING_BUG 0x0008 -# define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 -# define TLS1_FLAGS_KEEP_HANDSHAKE 0x0020 -/* - * Set when the handshake is ready to process peer's ChangeCipherSpec message. - * Cleared after the message has been processed. - */ -# define SSL3_FLAGS_CCS_OK 0x0080 - -/* SSL3_FLAGS_SGC_RESTART_DONE is no longer used */ -# define SSL3_FLAGS_SGC_RESTART_DONE 0x0040 - -# ifndef OPENSSL_NO_SSL_INTERN - -typedef struct ssl3_state_st { - long flags; - int delay_buf_pop_ret; - unsigned char read_sequence[8]; - int read_mac_secret_size; - unsigned char read_mac_secret[EVP_MAX_MD_SIZE]; - unsigned char write_sequence[8]; - int write_mac_secret_size; - unsigned char write_mac_secret[EVP_MAX_MD_SIZE]; - unsigned char server_random[SSL3_RANDOM_SIZE]; - unsigned char client_random[SSL3_RANDOM_SIZE]; - /* flags for countermeasure against known-IV weakness */ - int need_empty_fragments; - int empty_fragment_done; - /* The value of 'extra' when the buffers were initialized */ - int init_extra; - SSL3_BUFFER rbuf; /* read IO goes into here */ - SSL3_BUFFER wbuf; /* write IO goes into here */ - SSL3_RECORD rrec; /* each decoded record goes in here */ - SSL3_RECORD wrec; /* goes out from here */ - /* - * storage for Alert/Handshake protocol data received but not yet - * processed by ssl3_read_bytes: - */ - unsigned char alert_fragment[2]; - unsigned int alert_fragment_len; - unsigned char handshake_fragment[4]; - unsigned int handshake_fragment_len; - /* partial write - check the numbers match */ - unsigned int wnum; /* number of bytes sent so far */ - int wpend_tot; /* number bytes written */ - int wpend_type; - int wpend_ret; /* number of bytes submitted */ - const unsigned char *wpend_buf; - /* used during startup, digest all incoming/outgoing packets */ - BIO *handshake_buffer; - /* - * When set of handshake digests is determined, buffer is hashed and - * freed and MD_CTX-es for all required digests are stored in this array - */ - EVP_MD_CTX **handshake_dgst; - /* - * Set whenever an expected ChangeCipherSpec message is processed. - * Unset when the peer's Finished message is received. - * Unexpected ChangeCipherSpec messages trigger a fatal alert. - */ - int change_cipher_spec; - int warn_alert; - int fatal_alert; - /* - * we allow one fatal and one warning alert to be outstanding, send close - * alert via the warning alert - */ - int alert_dispatch; - unsigned char send_alert[2]; - /* - * This flag is set when we should renegotiate ASAP, basically when there - * is no more data in the read or write buffers - */ - int renegotiate; - int total_renegotiations; - int num_renegotiations; - int in_read_app_data; - /* - * Opaque PRF input as used for the current handshake. These fields are - * used only if TLSEXT_TYPE_opaque_prf_input is defined (otherwise, they - * are merely present to improve binary compatibility) - */ - void *client_opaque_prf_input; - size_t client_opaque_prf_input_len; - void *server_opaque_prf_input; - size_t server_opaque_prf_input_len; - struct { - /* actually only needs to be 16+20 */ - unsigned char cert_verify_md[EVP_MAX_MD_SIZE * 2]; - /* actually only need to be 16+20 for SSLv3 and 12 for TLS */ - unsigned char finish_md[EVP_MAX_MD_SIZE * 2]; - int finish_md_len; - unsigned char peer_finish_md[EVP_MAX_MD_SIZE * 2]; - int peer_finish_md_len; - unsigned long message_size; - int message_type; - /* used to hold the new cipher we are going to use */ - const SSL_CIPHER *new_cipher; -# ifndef OPENSSL_NO_DH - DH *dh; -# endif -# ifndef OPENSSL_NO_ECDH - EC_KEY *ecdh; /* holds short lived ECDH key */ -# endif - /* used when SSL_ST_FLUSH_DATA is entered */ - int next_state; - int reuse_message; - /* used for certificate requests */ - int cert_req; - int ctype_num; - char ctype[SSL3_CT_NUMBER]; - STACK_OF(X509_NAME) *ca_names; - int use_rsa_tmp; - int key_block_length; - unsigned char *key_block; - const EVP_CIPHER *new_sym_enc; - const EVP_MD *new_hash; - int new_mac_pkey_type; - int new_mac_secret_size; -# ifndef OPENSSL_NO_COMP - const SSL_COMP *new_compression; -# else - char *new_compression; -# endif - int cert_request; - } tmp; - - /* Connection binding to prevent renegotiation attacks */ - unsigned char previous_client_finished[EVP_MAX_MD_SIZE]; - unsigned char previous_client_finished_len; - unsigned char previous_server_finished[EVP_MAX_MD_SIZE]; - unsigned char previous_server_finished_len; - int send_connection_binding; /* TODOEKR */ - -# ifndef OPENSSL_NO_NEXTPROTONEG - /* - * Set if we saw the Next Protocol Negotiation extension from our peer. - */ - int next_proto_neg_seen; -# endif - -# ifndef OPENSSL_NO_TLSEXT -# ifndef OPENSSL_NO_EC - /* - * This is set to true if we believe that this is a version of Safari - * running on OS X 10.6 or newer. We wish to know this because Safari on - * 10.8 .. 10.8.3 has broken ECDHE-ECDSA support. - */ - char is_probably_safari; -# endif /* !OPENSSL_NO_EC */ - - /* - * ALPN information (we are in the process of transitioning from NPN to - * ALPN.) - */ - - /* - * In a server these point to the selected ALPN protocol after the - * ClientHello has been processed. In a client these contain the protocol - * that the server selected once the ServerHello has been processed. - */ - unsigned char *alpn_selected; - unsigned alpn_selected_len; -# endif /* OPENSSL_NO_TLSEXT */ -} SSL3_STATE; - -# endif - -/* SSLv3 */ -/* - * client - */ -/* extra state */ -# define SSL3_ST_CW_FLUSH (0x100|SSL_ST_CONNECT) -# ifndef OPENSSL_NO_SCTP -# define DTLS1_SCTP_ST_CW_WRITE_SOCK (0x310|SSL_ST_CONNECT) -# define DTLS1_SCTP_ST_CR_READ_SOCK (0x320|SSL_ST_CONNECT) -# endif -/* write to server */ -# define SSL3_ST_CW_CLNT_HELLO_A (0x110|SSL_ST_CONNECT) -# define SSL3_ST_CW_CLNT_HELLO_B (0x111|SSL_ST_CONNECT) -/* read from server */ -# define SSL3_ST_CR_SRVR_HELLO_A (0x120|SSL_ST_CONNECT) -# define SSL3_ST_CR_SRVR_HELLO_B (0x121|SSL_ST_CONNECT) -# define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A (0x126|SSL_ST_CONNECT) -# define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B (0x127|SSL_ST_CONNECT) -# define SSL3_ST_CR_CERT_A (0x130|SSL_ST_CONNECT) -# define SSL3_ST_CR_CERT_B (0x131|SSL_ST_CONNECT) -# define SSL3_ST_CR_KEY_EXCH_A (0x140|SSL_ST_CONNECT) -# define SSL3_ST_CR_KEY_EXCH_B (0x141|SSL_ST_CONNECT) -# define SSL3_ST_CR_CERT_REQ_A (0x150|SSL_ST_CONNECT) -# define SSL3_ST_CR_CERT_REQ_B (0x151|SSL_ST_CONNECT) -# define SSL3_ST_CR_SRVR_DONE_A (0x160|SSL_ST_CONNECT) -# define SSL3_ST_CR_SRVR_DONE_B (0x161|SSL_ST_CONNECT) -/* write to server */ -# define SSL3_ST_CW_CERT_A (0x170|SSL_ST_CONNECT) -# define SSL3_ST_CW_CERT_B (0x171|SSL_ST_CONNECT) -# define SSL3_ST_CW_CERT_C (0x172|SSL_ST_CONNECT) -# define SSL3_ST_CW_CERT_D (0x173|SSL_ST_CONNECT) -# define SSL3_ST_CW_KEY_EXCH_A (0x180|SSL_ST_CONNECT) -# define SSL3_ST_CW_KEY_EXCH_B (0x181|SSL_ST_CONNECT) -# define SSL3_ST_CW_CERT_VRFY_A (0x190|SSL_ST_CONNECT) -# define SSL3_ST_CW_CERT_VRFY_B (0x191|SSL_ST_CONNECT) -# define SSL3_ST_CW_CHANGE_A (0x1A0|SSL_ST_CONNECT) -# define SSL3_ST_CW_CHANGE_B (0x1A1|SSL_ST_CONNECT) -# ifndef OPENSSL_NO_NEXTPROTONEG -# define SSL3_ST_CW_NEXT_PROTO_A (0x200|SSL_ST_CONNECT) -# define SSL3_ST_CW_NEXT_PROTO_B (0x201|SSL_ST_CONNECT) -# endif -# define SSL3_ST_CW_FINISHED_A (0x1B0|SSL_ST_CONNECT) -# define SSL3_ST_CW_FINISHED_B (0x1B1|SSL_ST_CONNECT) -/* read from server */ -# define SSL3_ST_CR_CHANGE_A (0x1C0|SSL_ST_CONNECT) -# define SSL3_ST_CR_CHANGE_B (0x1C1|SSL_ST_CONNECT) -# define SSL3_ST_CR_FINISHED_A (0x1D0|SSL_ST_CONNECT) -# define SSL3_ST_CR_FINISHED_B (0x1D1|SSL_ST_CONNECT) -# define SSL3_ST_CR_SESSION_TICKET_A (0x1E0|SSL_ST_CONNECT) -# define SSL3_ST_CR_SESSION_TICKET_B (0x1E1|SSL_ST_CONNECT) -# define SSL3_ST_CR_CERT_STATUS_A (0x1F0|SSL_ST_CONNECT) -# define SSL3_ST_CR_CERT_STATUS_B (0x1F1|SSL_ST_CONNECT) - -/* server */ -/* extra state */ -# define SSL3_ST_SW_FLUSH (0x100|SSL_ST_ACCEPT) -# ifndef OPENSSL_NO_SCTP -# define DTLS1_SCTP_ST_SW_WRITE_SOCK (0x310|SSL_ST_ACCEPT) -# define DTLS1_SCTP_ST_SR_READ_SOCK (0x320|SSL_ST_ACCEPT) -# endif -/* read from client */ -/* Do not change the number values, they do matter */ -# define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CLNT_HELLO_B (0x111|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CLNT_HELLO_C (0x112|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CLNT_HELLO_D (0x115|SSL_ST_ACCEPT) -/* write to client */ -# define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A (0x113|SSL_ST_ACCEPT) -# define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B (0x114|SSL_ST_ACCEPT) -# define SSL3_ST_SW_HELLO_REQ_A (0x120|SSL_ST_ACCEPT) -# define SSL3_ST_SW_HELLO_REQ_B (0x121|SSL_ST_ACCEPT) -# define SSL3_ST_SW_HELLO_REQ_C (0x122|SSL_ST_ACCEPT) -# define SSL3_ST_SW_SRVR_HELLO_A (0x130|SSL_ST_ACCEPT) -# define SSL3_ST_SW_SRVR_HELLO_B (0x131|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CERT_A (0x140|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CERT_B (0x141|SSL_ST_ACCEPT) -# define SSL3_ST_SW_KEY_EXCH_A (0x150|SSL_ST_ACCEPT) -# define SSL3_ST_SW_KEY_EXCH_B (0x151|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CERT_REQ_A (0x160|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CERT_REQ_B (0x161|SSL_ST_ACCEPT) -# define SSL3_ST_SW_SRVR_DONE_A (0x170|SSL_ST_ACCEPT) -# define SSL3_ST_SW_SRVR_DONE_B (0x171|SSL_ST_ACCEPT) -/* read from client */ -# define SSL3_ST_SR_CERT_A (0x180|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CERT_B (0x181|SSL_ST_ACCEPT) -# define SSL3_ST_SR_KEY_EXCH_A (0x190|SSL_ST_ACCEPT) -# define SSL3_ST_SR_KEY_EXCH_B (0x191|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CERT_VRFY_A (0x1A0|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CERT_VRFY_B (0x1A1|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CHANGE_A (0x1B0|SSL_ST_ACCEPT) -# define SSL3_ST_SR_CHANGE_B (0x1B1|SSL_ST_ACCEPT) -# ifndef OPENSSL_NO_NEXTPROTONEG -# define SSL3_ST_SR_NEXT_PROTO_A (0x210|SSL_ST_ACCEPT) -# define SSL3_ST_SR_NEXT_PROTO_B (0x211|SSL_ST_ACCEPT) -# endif -# define SSL3_ST_SR_FINISHED_A (0x1C0|SSL_ST_ACCEPT) -# define SSL3_ST_SR_FINISHED_B (0x1C1|SSL_ST_ACCEPT) -/* write to client */ -# define SSL3_ST_SW_CHANGE_A (0x1D0|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CHANGE_B (0x1D1|SSL_ST_ACCEPT) -# define SSL3_ST_SW_FINISHED_A (0x1E0|SSL_ST_ACCEPT) -# define SSL3_ST_SW_FINISHED_B (0x1E1|SSL_ST_ACCEPT) -# define SSL3_ST_SW_SESSION_TICKET_A (0x1F0|SSL_ST_ACCEPT) -# define SSL3_ST_SW_SESSION_TICKET_B (0x1F1|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CERT_STATUS_A (0x200|SSL_ST_ACCEPT) -# define SSL3_ST_SW_CERT_STATUS_B (0x201|SSL_ST_ACCEPT) - -# define SSL3_MT_HELLO_REQUEST 0 -# define SSL3_MT_CLIENT_HELLO 1 -# define SSL3_MT_SERVER_HELLO 2 -# define SSL3_MT_NEWSESSION_TICKET 4 -# define SSL3_MT_CERTIFICATE 11 -# define SSL3_MT_SERVER_KEY_EXCHANGE 12 -# define SSL3_MT_CERTIFICATE_REQUEST 13 -# define SSL3_MT_SERVER_DONE 14 -# define SSL3_MT_CERTIFICATE_VERIFY 15 -# define SSL3_MT_CLIENT_KEY_EXCHANGE 16 -# define SSL3_MT_FINISHED 20 -# define SSL3_MT_CERTIFICATE_STATUS 22 -# ifndef OPENSSL_NO_NEXTPROTONEG -# define SSL3_MT_NEXT_PROTO 67 -# endif -# define DTLS1_MT_HELLO_VERIFY_REQUEST 3 - -# define SSL3_MT_CCS 1 - -/* These are used when changing over to a new cipher */ -# define SSL3_CC_READ 0x01 -# define SSL3_CC_WRITE 0x02 -# define SSL3_CC_CLIENT 0x10 -# define SSL3_CC_SERVER 0x20 -# define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE) -# define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ) -# define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ) -# define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE) - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SSL3_H +# define HEADER_SSL3_H + +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Signalling cipher suite value from RFC 5746 + * (TLS_EMPTY_RENEGOTIATION_INFO_SCSV) + */ +# define SSL3_CK_SCSV 0x030000FF + +/* + * Signalling cipher suite value from draft-ietf-tls-downgrade-scsv-00 + * (TLS_FALLBACK_SCSV) + */ +# define SSL3_CK_FALLBACK_SCSV 0x03005600 + +# define SSL3_CK_RSA_NULL_MD5 0x03000001 +# define SSL3_CK_RSA_NULL_SHA 0x03000002 +# define SSL3_CK_RSA_RC4_40_MD5 0x03000003 +# define SSL3_CK_RSA_RC4_128_MD5 0x03000004 +# define SSL3_CK_RSA_RC4_128_SHA 0x03000005 +# define SSL3_CK_RSA_RC2_40_MD5 0x03000006 +# define SSL3_CK_RSA_IDEA_128_SHA 0x03000007 +# define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008 +# define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009 +# define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A + +# define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B +# define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C +# define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D +# define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E +# define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F +# define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010 + +# define SSL3_CK_DHE_DSS_DES_40_CBC_SHA 0x03000011 +# define SSL3_CK_EDH_DSS_DES_40_CBC_SHA SSL3_CK_DHE_DSS_DES_40_CBC_SHA +# define SSL3_CK_DHE_DSS_DES_64_CBC_SHA 0x03000012 +# define SSL3_CK_EDH_DSS_DES_64_CBC_SHA SSL3_CK_DHE_DSS_DES_64_CBC_SHA +# define SSL3_CK_DHE_DSS_DES_192_CBC3_SHA 0x03000013 +# define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA SSL3_CK_DHE_DSS_DES_192_CBC3_SHA +# define SSL3_CK_DHE_RSA_DES_40_CBC_SHA 0x03000014 +# define SSL3_CK_EDH_RSA_DES_40_CBC_SHA SSL3_CK_DHE_RSA_DES_40_CBC_SHA +# define SSL3_CK_DHE_RSA_DES_64_CBC_SHA 0x03000015 +# define SSL3_CK_EDH_RSA_DES_64_CBC_SHA SSL3_CK_DHE_RSA_DES_64_CBC_SHA +# define SSL3_CK_DHE_RSA_DES_192_CBC3_SHA 0x03000016 +# define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA SSL3_CK_DHE_RSA_DES_192_CBC3_SHA + +# define SSL3_CK_ADH_RC4_40_MD5 0x03000017 +# define SSL3_CK_ADH_RC4_128_MD5 0x03000018 +# define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019 +# define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A +# define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B + +/* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */ +# define SSL3_RFC_RSA_NULL_MD5 "TLS_RSA_WITH_NULL_MD5" +# define SSL3_RFC_RSA_NULL_SHA "TLS_RSA_WITH_NULL_SHA" +# define SSL3_RFC_RSA_DES_192_CBC3_SHA "TLS_RSA_WITH_3DES_EDE_CBC_SHA" +# define SSL3_RFC_DHE_DSS_DES_192_CBC3_SHA "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" +# define SSL3_RFC_DHE_RSA_DES_192_CBC3_SHA "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA" +# define SSL3_RFC_ADH_DES_192_CBC_SHA "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA" +# define SSL3_RFC_RSA_IDEA_128_SHA "TLS_RSA_WITH_IDEA_CBC_SHA" +# define SSL3_RFC_RSA_RC4_128_MD5 "TLS_RSA_WITH_RC4_128_MD5" +# define SSL3_RFC_RSA_RC4_128_SHA "TLS_RSA_WITH_RC4_128_SHA" +# define SSL3_RFC_ADH_RC4_128_MD5 "TLS_DH_anon_WITH_RC4_128_MD5" + +# define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5" +# define SSL3_TXT_RSA_NULL_SHA "NULL-SHA" +# define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5" +# define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5" +# define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA" +# define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5" +# define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA" +# define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA" +# define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA" +# define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA" + +# define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA" +# define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA" +# define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA" +# define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA" +# define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA" +# define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA" + +# define SSL3_TXT_DHE_DSS_DES_40_CBC_SHA "EXP-DHE-DSS-DES-CBC-SHA" +# define SSL3_TXT_DHE_DSS_DES_64_CBC_SHA "DHE-DSS-DES-CBC-SHA" +# define SSL3_TXT_DHE_DSS_DES_192_CBC3_SHA "DHE-DSS-DES-CBC3-SHA" +# define SSL3_TXT_DHE_RSA_DES_40_CBC_SHA "EXP-DHE-RSA-DES-CBC-SHA" +# define SSL3_TXT_DHE_RSA_DES_64_CBC_SHA "DHE-RSA-DES-CBC-SHA" +# define SSL3_TXT_DHE_RSA_DES_192_CBC3_SHA "DHE-RSA-DES-CBC3-SHA" + +/* + * This next block of six "EDH" labels is for backward compatibility with + * older versions of OpenSSL. New code should use the six "DHE" labels above + * instead: + */ +# define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA" +# define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA" +# define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA" +# define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA" +# define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA" +# define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA" + +# define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5" +# define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5" +# define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA" +# define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" +# define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" + +# define SSL3_SSL_SESSION_ID_LENGTH 32 +# define SSL3_MAX_SSL_SESSION_ID_LENGTH 32 + +# define SSL3_MASTER_SECRET_SIZE 48 +# define SSL3_RANDOM_SIZE 32 +# define SSL3_SESSION_ID_SIZE 32 +# define SSL3_RT_HEADER_LENGTH 5 + +# define SSL3_HM_HEADER_LENGTH 4 + +# ifndef SSL3_ALIGN_PAYLOAD + /* + * Some will argue that this increases memory footprint, but it's not + * actually true. Point is that malloc has to return at least 64-bit aligned + * pointers, meaning that allocating 5 bytes wastes 3 bytes in either case. + * Suggested pre-gaping simply moves these wasted bytes from the end of + * allocated region to its front, but makes data payload aligned, which + * improves performance:-) + */ +# define SSL3_ALIGN_PAYLOAD 8 +# else +# if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0 +# error "insane SSL3_ALIGN_PAYLOAD" +# undef SSL3_ALIGN_PAYLOAD +# endif +# endif + +/* + * This is the maximum MAC (digest) size used by the SSL library. Currently + * maximum of 20 is used by SHA1, but we reserve for future extension for + * 512-bit hashes. + */ + +# define SSL3_RT_MAX_MD_SIZE 64 + +/* + * Maximum block size used in all ciphersuites. Currently 16 for AES. + */ + +# define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16 + +# define SSL3_RT_MAX_EXTRA (16384) + +/* Maximum plaintext length: defined by SSL/TLS standards */ +# define SSL3_RT_MAX_PLAIN_LENGTH 16384 +/* Maximum compression overhead: defined by SSL/TLS standards */ +# define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024 + +/* + * The standards give a maximum encryption overhead of 1024 bytes. In + * practice the value is lower than this. The overhead is the maximum number + * of padding bytes (256) plus the mac size. + */ +# define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE) +# define SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD 256 + +/* + * OpenSSL currently only uses a padding length of at most one block so the + * send overhead is smaller. + */ + +# define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \ + (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE) + +/* If compression isn't used don't include the compression overhead */ + +# ifdef OPENSSL_NO_COMP +# define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH +# else +# define SSL3_RT_MAX_COMPRESSED_LENGTH \ + (SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD) +# endif +# define SSL3_RT_MAX_ENCRYPTED_LENGTH \ + (SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH) +# define SSL3_RT_MAX_TLS13_ENCRYPTED_LENGTH \ + (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD) +# define SSL3_RT_MAX_PACKET_SIZE \ + (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH) + +# define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54" +# define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52" + +# define SSL3_VERSION 0x0300 +# define SSL3_VERSION_MAJOR 0x03 +# define SSL3_VERSION_MINOR 0x00 + +# define SSL3_RT_CHANGE_CIPHER_SPEC 20 +# define SSL3_RT_ALERT 21 +# define SSL3_RT_HANDSHAKE 22 +# define SSL3_RT_APPLICATION_DATA 23 +# define DTLS1_RT_HEARTBEAT 24 + +/* Pseudo content types to indicate additional parameters */ +# define TLS1_RT_CRYPTO 0x1000 +# define TLS1_RT_CRYPTO_PREMASTER (TLS1_RT_CRYPTO | 0x1) +# define TLS1_RT_CRYPTO_CLIENT_RANDOM (TLS1_RT_CRYPTO | 0x2) +# define TLS1_RT_CRYPTO_SERVER_RANDOM (TLS1_RT_CRYPTO | 0x3) +# define TLS1_RT_CRYPTO_MASTER (TLS1_RT_CRYPTO | 0x4) + +# define TLS1_RT_CRYPTO_READ 0x0000 +# define TLS1_RT_CRYPTO_WRITE 0x0100 +# define TLS1_RT_CRYPTO_MAC (TLS1_RT_CRYPTO | 0x5) +# define TLS1_RT_CRYPTO_KEY (TLS1_RT_CRYPTO | 0x6) +# define TLS1_RT_CRYPTO_IV (TLS1_RT_CRYPTO | 0x7) +# define TLS1_RT_CRYPTO_FIXED_IV (TLS1_RT_CRYPTO | 0x8) + +/* Pseudo content types for SSL/TLS header info */ +# define SSL3_RT_HEADER 0x100 +# define SSL3_RT_INNER_CONTENT_TYPE 0x101 + +# define SSL3_AL_WARNING 1 +# define SSL3_AL_FATAL 2 + +# define SSL3_AD_CLOSE_NOTIFY 0 +# define SSL3_AD_UNEXPECTED_MESSAGE 10/* fatal */ +# define SSL3_AD_BAD_RECORD_MAC 20/* fatal */ +# define SSL3_AD_DECOMPRESSION_FAILURE 30/* fatal */ +# define SSL3_AD_HANDSHAKE_FAILURE 40/* fatal */ +# define SSL3_AD_NO_CERTIFICATE 41 +# define SSL3_AD_BAD_CERTIFICATE 42 +# define SSL3_AD_UNSUPPORTED_CERTIFICATE 43 +# define SSL3_AD_CERTIFICATE_REVOKED 44 +# define SSL3_AD_CERTIFICATE_EXPIRED 45 +# define SSL3_AD_CERTIFICATE_UNKNOWN 46 +# define SSL3_AD_ILLEGAL_PARAMETER 47/* fatal */ + +# define TLS1_HB_REQUEST 1 +# define TLS1_HB_RESPONSE 2 + + +# define SSL3_CT_RSA_SIGN 1 +# define SSL3_CT_DSS_SIGN 2 +# define SSL3_CT_RSA_FIXED_DH 3 +# define SSL3_CT_DSS_FIXED_DH 4 +# define SSL3_CT_RSA_EPHEMERAL_DH 5 +# define SSL3_CT_DSS_EPHEMERAL_DH 6 +# define SSL3_CT_FORTEZZA_DMS 20 +/* + * SSL3_CT_NUMBER is used to size arrays and it must be large enough to + * contain all of the cert types defined for *either* SSLv3 and TLSv1. + */ +# define SSL3_CT_NUMBER 10 + +# if defined(TLS_CT_NUMBER) +# if TLS_CT_NUMBER != SSL3_CT_NUMBER +# error "SSL/TLS CT_NUMBER values do not match" +# endif +# endif + +/* No longer used as of OpenSSL 1.1.1 */ +# define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 + +/* Removed from OpenSSL 1.1.0 */ +# define TLS1_FLAGS_TLS_PADDING_BUG 0x0 + +# define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 + +/* Set if we encrypt then mac instead of usual mac then encrypt */ +# define TLS1_FLAGS_ENCRYPT_THEN_MAC_READ 0x0100 +# define TLS1_FLAGS_ENCRYPT_THEN_MAC TLS1_FLAGS_ENCRYPT_THEN_MAC_READ + +/* Set if extended master secret extension received from peer */ +# define TLS1_FLAGS_RECEIVED_EXTMS 0x0200 + +# define TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE 0x0400 + +# define TLS1_FLAGS_STATELESS 0x0800 + +# define SSL3_MT_HELLO_REQUEST 0 +# define SSL3_MT_CLIENT_HELLO 1 +# define SSL3_MT_SERVER_HELLO 2 +# define SSL3_MT_NEWSESSION_TICKET 4 +# define SSL3_MT_END_OF_EARLY_DATA 5 +# define SSL3_MT_ENCRYPTED_EXTENSIONS 8 +# define SSL3_MT_CERTIFICATE 11 +# define SSL3_MT_SERVER_KEY_EXCHANGE 12 +# define SSL3_MT_CERTIFICATE_REQUEST 13 +# define SSL3_MT_SERVER_DONE 14 +# define SSL3_MT_CERTIFICATE_VERIFY 15 +# define SSL3_MT_CLIENT_KEY_EXCHANGE 16 +# define SSL3_MT_FINISHED 20 +# define SSL3_MT_CERTIFICATE_URL 21 +# define SSL3_MT_CERTIFICATE_STATUS 22 +# define SSL3_MT_SUPPLEMENTAL_DATA 23 +# define SSL3_MT_KEY_UPDATE 24 +# ifndef OPENSSL_NO_NEXTPROTONEG +# define SSL3_MT_NEXT_PROTO 67 +# endif +# define SSL3_MT_MESSAGE_HASH 254 +# define DTLS1_MT_HELLO_VERIFY_REQUEST 3 + +/* Dummy message type for handling CCS like a normal handshake message */ +# define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101 + +# define SSL3_MT_CCS 1 + +/* These are used when changing over to a new cipher */ +# define SSL3_CC_READ 0x001 +# define SSL3_CC_WRITE 0x002 +# define SSL3_CC_CLIENT 0x010 +# define SSL3_CC_SERVER 0x020 +# define SSL3_CC_EARLY 0x040 +# define SSL3_CC_HANDSHAKE 0x080 +# define SSL3_CC_APPLICATION 0x100 +# define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE) +# define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ) +# define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ) +# define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE) + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/sslerr.h b/src/Mayaqua/win32_inc/openssl/sslerr.h new file mode 100644 index 00000000..3d6850de --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/sslerr.h @@ -0,0 +1,772 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SSLERR_H +# define HEADER_SSLERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_SSL_strings(void); + +/* + * SSL function codes. + */ +# define SSL_F_ADD_CLIENT_KEY_SHARE_EXT 438 +# define SSL_F_ADD_KEY_SHARE 512 +# define SSL_F_BYTES_TO_CIPHER_LIST 519 +# define SSL_F_CHECK_SUITEB_CIPHER_LIST 331 +# define SSL_F_CIPHERSUITE_CB 622 +# define SSL_F_CONSTRUCT_CA_NAMES 552 +# define SSL_F_CONSTRUCT_KEY_EXCHANGE_TBS 553 +# define SSL_F_CONSTRUCT_STATEFUL_TICKET 636 +# define SSL_F_CONSTRUCT_STATELESS_TICKET 637 +# define SSL_F_CREATE_SYNTHETIC_MESSAGE_HASH 539 +# define SSL_F_CREATE_TICKET_PREQUEL 638 +# define SSL_F_CT_MOVE_SCTS 345 +# define SSL_F_CT_STRICT 349 +# define SSL_F_CUSTOM_EXT_ADD 554 +# define SSL_F_CUSTOM_EXT_PARSE 555 +# define SSL_F_D2I_SSL_SESSION 103 +# define SSL_F_DANE_CTX_ENABLE 347 +# define SSL_F_DANE_MTYPE_SET 393 +# define SSL_F_DANE_TLSA_ADD 394 +# define SSL_F_DERIVE_SECRET_KEY_AND_IV 514 +# define SSL_F_DO_DTLS1_WRITE 245 +# define SSL_F_DO_SSL3_WRITE 104 +# define SSL_F_DTLS1_BUFFER_RECORD 247 +# define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 318 +# define SSL_F_DTLS1_HEARTBEAT 305 +# define SSL_F_DTLS1_HM_FRAGMENT_NEW 623 +# define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 +# define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 +# define SSL_F_DTLS1_PROCESS_RECORD 257 +# define SSL_F_DTLS1_READ_BYTES 258 +# define SSL_F_DTLS1_READ_FAILED 339 +# define SSL_F_DTLS1_RETRANSMIT_MESSAGE 390 +# define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268 +# define SSL_F_DTLS1_WRITE_BYTES 545 +# define SSL_F_DTLSV1_LISTEN 350 +# define SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC 371 +# define SSL_F_DTLS_CONSTRUCT_HELLO_VERIFY_REQUEST 385 +# define SSL_F_DTLS_GET_REASSEMBLED_MESSAGE 370 +# define SSL_F_DTLS_PROCESS_HELLO_VERIFY 386 +# define SSL_F_DTLS_RECORD_LAYER_NEW 635 +# define SSL_F_DTLS_WAIT_FOR_DRY 592 +# define SSL_F_EARLY_DATA_COUNT_OK 532 +# define SSL_F_FINAL_EARLY_DATA 556 +# define SSL_F_FINAL_EC_PT_FORMATS 485 +# define SSL_F_FINAL_EMS 486 +# define SSL_F_FINAL_KEY_SHARE 503 +# define SSL_F_FINAL_MAXFRAGMENTLEN 557 +# define SSL_F_FINAL_RENEGOTIATE 483 +# define SSL_F_FINAL_SERVER_NAME 558 +# define SSL_F_FINAL_SIG_ALGS 497 +# define SSL_F_GET_CERT_VERIFY_TBS_DATA 588 +# define SSL_F_NSS_KEYLOG_INT 500 +# define SSL_F_OPENSSL_INIT_SSL 342 +# define SSL_F_OSSL_STATEM_CLIENT13_READ_TRANSITION 436 +# define SSL_F_OSSL_STATEM_CLIENT13_WRITE_TRANSITION 598 +# define SSL_F_OSSL_STATEM_CLIENT_CONSTRUCT_MESSAGE 430 +# define SSL_F_OSSL_STATEM_CLIENT_POST_PROCESS_MESSAGE 593 +# define SSL_F_OSSL_STATEM_CLIENT_PROCESS_MESSAGE 594 +# define SSL_F_OSSL_STATEM_CLIENT_READ_TRANSITION 417 +# define SSL_F_OSSL_STATEM_CLIENT_WRITE_TRANSITION 599 +# define SSL_F_OSSL_STATEM_SERVER13_READ_TRANSITION 437 +# define SSL_F_OSSL_STATEM_SERVER13_WRITE_TRANSITION 600 +# define SSL_F_OSSL_STATEM_SERVER_CONSTRUCT_MESSAGE 431 +# define SSL_F_OSSL_STATEM_SERVER_POST_PROCESS_MESSAGE 601 +# define SSL_F_OSSL_STATEM_SERVER_POST_WORK 602 +# define SSL_F_OSSL_STATEM_SERVER_PROCESS_MESSAGE 603 +# define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 418 +# define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 604 +# define SSL_F_PARSE_CA_NAMES 541 +# define SSL_F_PITEM_NEW 624 +# define SSL_F_PQUEUE_NEW 625 +# define SSL_F_PROCESS_KEY_SHARE_EXT 439 +# define SSL_F_READ_STATE_MACHINE 352 +# define SSL_F_SET_CLIENT_CIPHERSUITE 540 +# define SSL_F_SRP_GENERATE_CLIENT_MASTER_SECRET 595 +# define SSL_F_SRP_GENERATE_SERVER_MASTER_SECRET 589 +# define SSL_F_SRP_VERIFY_SERVER_PARAM 596 +# define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 +# define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 +# define SSL_F_SSL3_CTRL 213 +# define SSL_F_SSL3_CTX_CTRL 133 +# define SSL_F_SSL3_DIGEST_CACHED_RECORDS 293 +# define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC 292 +# define SSL_F_SSL3_ENC 608 +# define SSL_F_SSL3_FINAL_FINISH_MAC 285 +# define SSL_F_SSL3_FINISH_MAC 587 +# define SSL_F_SSL3_GENERATE_KEY_BLOCK 238 +# define SSL_F_SSL3_GENERATE_MASTER_SECRET 388 +# define SSL_F_SSL3_GET_RECORD 143 +# define SSL_F_SSL3_INIT_FINISHED_MAC 397 +# define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 +# define SSL_F_SSL3_READ_BYTES 148 +# define SSL_F_SSL3_READ_N 149 +# define SSL_F_SSL3_SETUP_KEY_BLOCK 157 +# define SSL_F_SSL3_SETUP_READ_BUFFER 156 +# define SSL_F_SSL3_SETUP_WRITE_BUFFER 291 +# define SSL_F_SSL3_WRITE_BYTES 158 +# define SSL_F_SSL3_WRITE_PENDING 159 +# define SSL_F_SSL_ADD_CERT_CHAIN 316 +# define SSL_F_SSL_ADD_CERT_TO_BUF 319 +# define SSL_F_SSL_ADD_CERT_TO_WPACKET 493 +# define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT 298 +# define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 277 +# define SSL_F_SSL_ADD_CLIENTHELLO_USE_SRTP_EXT 307 +# define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 +# define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 +# define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT 299 +# define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 278 +# define SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT 308 +# define SSL_F_SSL_BAD_METHOD 160 +# define SSL_F_SSL_BUILD_CERT_CHAIN 332 +# define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 +# define SSL_F_SSL_CACHE_CIPHERLIST 520 +# define SSL_F_SSL_CERT_ADD0_CHAIN_CERT 346 +# define SSL_F_SSL_CERT_DUP 221 +# define SSL_F_SSL_CERT_NEW 162 +# define SSL_F_SSL_CERT_SET0_CHAIN 340 +# define SSL_F_SSL_CHECK_PRIVATE_KEY 163 +# define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 280 +# define SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO 606 +# define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279 +# define SSL_F_SSL_CHOOSE_CLIENT_VERSION 607 +# define SSL_F_SSL_CIPHER_DESCRIPTION 626 +# define SSL_F_SSL_CIPHER_LIST_TO_BYTES 425 +# define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 +# define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 +# define SSL_F_SSL_CLEAR 164 +# define SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT 627 +# define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 +# define SSL_F_SSL_CONF_CMD 334 +# define SSL_F_SSL_CREATE_CIPHER_LIST 166 +# define SSL_F_SSL_CTRL 232 +# define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168 +# define SSL_F_SSL_CTX_ENABLE_CT 398 +# define SSL_F_SSL_CTX_MAKE_PROFILES 309 +# define SSL_F_SSL_CTX_NEW 169 +# define SSL_F_SSL_CTX_SET_ALPN_PROTOS 343 +# define SSL_F_SSL_CTX_SET_CIPHER_LIST 269 +# define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE 290 +# define SSL_F_SSL_CTX_SET_CT_VALIDATION_CALLBACK 396 +# define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219 +# define SSL_F_SSL_CTX_SET_SSL_VERSION 170 +# define SSL_F_SSL_CTX_SET_TLSEXT_MAX_FRAGMENT_LENGTH 551 +# define SSL_F_SSL_CTX_USE_CERTIFICATE 171 +# define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172 +# define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173 +# define SSL_F_SSL_CTX_USE_PRIVATEKEY 174 +# define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175 +# define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176 +# define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT 272 +# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177 +# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178 +# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179 +# define SSL_F_SSL_CTX_USE_SERVERINFO 336 +# define SSL_F_SSL_CTX_USE_SERVERINFO_EX 543 +# define SSL_F_SSL_CTX_USE_SERVERINFO_FILE 337 +# define SSL_F_SSL_DANE_DUP 403 +# define SSL_F_SSL_DANE_ENABLE 395 +# define SSL_F_SSL_DERIVE 590 +# define SSL_F_SSL_DO_CONFIG 391 +# define SSL_F_SSL_DO_HANDSHAKE 180 +# define SSL_F_SSL_DUP_CA_LIST 408 +# define SSL_F_SSL_ENABLE_CT 402 +# define SSL_F_SSL_GENERATE_PKEY_GROUP 559 +# define SSL_F_SSL_GENERATE_SESSION_ID 547 +# define SSL_F_SSL_GET_NEW_SESSION 181 +# define SSL_F_SSL_GET_PREV_SESSION 217 +# define SSL_F_SSL_GET_SERVER_CERT_INDEX 322 +# define SSL_F_SSL_GET_SIGN_PKEY 183 +# define SSL_F_SSL_HANDSHAKE_HASH 560 +# define SSL_F_SSL_INIT_WBIO_BUFFER 184 +# define SSL_F_SSL_KEY_UPDATE 515 +# define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 +# define SSL_F_SSL_LOG_MASTER_SECRET 498 +# define SSL_F_SSL_LOG_RSA_CLIENT_KEY_EXCHANGE 499 +# define SSL_F_SSL_MODULE_INIT 392 +# define SSL_F_SSL_NEW 186 +# define SSL_F_SSL_NEXT_PROTO_VALIDATE 565 +# define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT 300 +# define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT 302 +# define SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT 310 +# define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT 301 +# define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT 303 +# define SSL_F_SSL_PARSE_SERVERHELLO_USE_SRTP_EXT 311 +# define SSL_F_SSL_PEEK 270 +# define SSL_F_SSL_PEEK_EX 432 +# define SSL_F_SSL_PEEK_INTERNAL 522 +# define SSL_F_SSL_READ 223 +# define SSL_F_SSL_READ_EARLY_DATA 529 +# define SSL_F_SSL_READ_EX 434 +# define SSL_F_SSL_READ_INTERNAL 523 +# define SSL_F_SSL_RENEGOTIATE 516 +# define SSL_F_SSL_RENEGOTIATE_ABBREVIATED 546 +# define SSL_F_SSL_SCAN_CLIENTHELLO_TLSEXT 320 +# define SSL_F_SSL_SCAN_SERVERHELLO_TLSEXT 321 +# define SSL_F_SSL_SESSION_DUP 348 +# define SSL_F_SSL_SESSION_NEW 189 +# define SSL_F_SSL_SESSION_PRINT_FP 190 +# define SSL_F_SSL_SESSION_SET1_ID 423 +# define SSL_F_SSL_SESSION_SET1_ID_CONTEXT 312 +# define SSL_F_SSL_SET_ALPN_PROTOS 344 +# define SSL_F_SSL_SET_CERT 191 +# define SSL_F_SSL_SET_CERT_AND_KEY 621 +# define SSL_F_SSL_SET_CIPHER_LIST 271 +# define SSL_F_SSL_SET_CT_VALIDATION_CALLBACK 399 +# define SSL_F_SSL_SET_FD 192 +# define SSL_F_SSL_SET_PKEY 193 +# define SSL_F_SSL_SET_RFD 194 +# define SSL_F_SSL_SET_SESSION 195 +# define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218 +# define SSL_F_SSL_SET_SESSION_TICKET_EXT 294 +# define SSL_F_SSL_SET_TLSEXT_MAX_FRAGMENT_LENGTH 550 +# define SSL_F_SSL_SET_WFD 196 +# define SSL_F_SSL_SHUTDOWN 224 +# define SSL_F_SSL_SRP_CTX_INIT 313 +# define SSL_F_SSL_START_ASYNC_JOB 389 +# define SSL_F_SSL_UNDEFINED_FUNCTION 197 +# define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244 +# define SSL_F_SSL_USE_CERTIFICATE 198 +# define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 +# define SSL_F_SSL_USE_CERTIFICATE_FILE 200 +# define SSL_F_SSL_USE_PRIVATEKEY 201 +# define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202 +# define SSL_F_SSL_USE_PRIVATEKEY_FILE 203 +# define SSL_F_SSL_USE_PSK_IDENTITY_HINT 273 +# define SSL_F_SSL_USE_RSAPRIVATEKEY 204 +# define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205 +# define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206 +# define SSL_F_SSL_VALIDATE_CT 400 +# define SSL_F_SSL_VERIFY_CERT_CHAIN 207 +# define SSL_F_SSL_VERIFY_CLIENT_POST_HANDSHAKE 616 +# define SSL_F_SSL_WRITE 208 +# define SSL_F_SSL_WRITE_EARLY_DATA 526 +# define SSL_F_SSL_WRITE_EARLY_FINISH 527 +# define SSL_F_SSL_WRITE_EX 433 +# define SSL_F_SSL_WRITE_INTERNAL 524 +# define SSL_F_STATE_MACHINE 353 +# define SSL_F_TLS12_CHECK_PEER_SIGALG 333 +# define SSL_F_TLS12_COPY_SIGALGS 533 +# define SSL_F_TLS13_CHANGE_CIPHER_STATE 440 +# define SSL_F_TLS13_ENC 609 +# define SSL_F_TLS13_FINAL_FINISH_MAC 605 +# define SSL_F_TLS13_GENERATE_SECRET 591 +# define SSL_F_TLS13_HKDF_EXPAND 561 +# define SSL_F_TLS13_RESTORE_HANDSHAKE_DIGEST_FOR_PHA 617 +# define SSL_F_TLS13_SAVE_HANDSHAKE_DIGEST_FOR_PHA 618 +# define SSL_F_TLS13_SETUP_KEY_BLOCK 441 +# define SSL_F_TLS1_CHANGE_CIPHER_STATE 209 +# define SSL_F_TLS1_CHECK_DUPLICATE_EXTENSIONS 341 +# define SSL_F_TLS1_ENC 401 +# define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314 +# define SSL_F_TLS1_GET_CURVELIST 338 +# define SSL_F_TLS1_PRF 284 +# define SSL_F_TLS1_SAVE_U16 628 +# define SSL_F_TLS1_SETUP_KEY_BLOCK 211 +# define SSL_F_TLS1_SET_GROUPS 629 +# define SSL_F_TLS1_SET_RAW_SIGALGS 630 +# define SSL_F_TLS1_SET_SERVER_SIGALGS 335 +# define SSL_F_TLS1_SET_SHARED_SIGALGS 631 +# define SSL_F_TLS1_SET_SIGALGS 632 +# define SSL_F_TLS_CHOOSE_SIGALG 513 +# define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK 354 +# define SSL_F_TLS_COLLECT_EXTENSIONS 435 +# define SSL_F_TLS_CONSTRUCT_CERTIFICATE_AUTHORITIES 542 +# define SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST 372 +# define SSL_F_TLS_CONSTRUCT_CERT_STATUS 429 +# define SSL_F_TLS_CONSTRUCT_CERT_STATUS_BODY 494 +# define SSL_F_TLS_CONSTRUCT_CERT_VERIFY 496 +# define SSL_F_TLS_CONSTRUCT_CHANGE_CIPHER_SPEC 427 +# define SSL_F_TLS_CONSTRUCT_CKE_DHE 404 +# define SSL_F_TLS_CONSTRUCT_CKE_ECDHE 405 +# define SSL_F_TLS_CONSTRUCT_CKE_GOST 406 +# define SSL_F_TLS_CONSTRUCT_CKE_PSK_PREAMBLE 407 +# define SSL_F_TLS_CONSTRUCT_CKE_RSA 409 +# define SSL_F_TLS_CONSTRUCT_CKE_SRP 410 +# define SSL_F_TLS_CONSTRUCT_CLIENT_CERTIFICATE 484 +# define SSL_F_TLS_CONSTRUCT_CLIENT_HELLO 487 +# define SSL_F_TLS_CONSTRUCT_CLIENT_KEY_EXCHANGE 488 +# define SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY 489 +# define SSL_F_TLS_CONSTRUCT_CTOS_ALPN 466 +# define SSL_F_TLS_CONSTRUCT_CTOS_CERTIFICATE 355 +# define SSL_F_TLS_CONSTRUCT_CTOS_COOKIE 535 +# define SSL_F_TLS_CONSTRUCT_CTOS_EARLY_DATA 530 +# define SSL_F_TLS_CONSTRUCT_CTOS_EC_PT_FORMATS 467 +# define SSL_F_TLS_CONSTRUCT_CTOS_EMS 468 +# define SSL_F_TLS_CONSTRUCT_CTOS_ETM 469 +# define SSL_F_TLS_CONSTRUCT_CTOS_HELLO 356 +# define SSL_F_TLS_CONSTRUCT_CTOS_KEY_EXCHANGE 357 +# define SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE 470 +# define SSL_F_TLS_CONSTRUCT_CTOS_MAXFRAGMENTLEN 549 +# define SSL_F_TLS_CONSTRUCT_CTOS_NPN 471 +# define SSL_F_TLS_CONSTRUCT_CTOS_PADDING 472 +# define SSL_F_TLS_CONSTRUCT_CTOS_POST_HANDSHAKE_AUTH 619 +# define SSL_F_TLS_CONSTRUCT_CTOS_PSK 501 +# define SSL_F_TLS_CONSTRUCT_CTOS_PSK_KEX_MODES 509 +# define SSL_F_TLS_CONSTRUCT_CTOS_RENEGOTIATE 473 +# define SSL_F_TLS_CONSTRUCT_CTOS_SCT 474 +# define SSL_F_TLS_CONSTRUCT_CTOS_SERVER_NAME 475 +# define SSL_F_TLS_CONSTRUCT_CTOS_SESSION_TICKET 476 +# define SSL_F_TLS_CONSTRUCT_CTOS_SIG_ALGS 477 +# define SSL_F_TLS_CONSTRUCT_CTOS_SRP 478 +# define SSL_F_TLS_CONSTRUCT_CTOS_STATUS_REQUEST 479 +# define SSL_F_TLS_CONSTRUCT_CTOS_SUPPORTED_GROUPS 480 +# define SSL_F_TLS_CONSTRUCT_CTOS_SUPPORTED_VERSIONS 481 +# define SSL_F_TLS_CONSTRUCT_CTOS_USE_SRTP 482 +# define SSL_F_TLS_CONSTRUCT_CTOS_VERIFY 358 +# define SSL_F_TLS_CONSTRUCT_ENCRYPTED_EXTENSIONS 443 +# define SSL_F_TLS_CONSTRUCT_END_OF_EARLY_DATA 536 +# define SSL_F_TLS_CONSTRUCT_EXTENSIONS 447 +# define SSL_F_TLS_CONSTRUCT_FINISHED 359 +# define SSL_F_TLS_CONSTRUCT_HELLO_REQUEST 373 +# define SSL_F_TLS_CONSTRUCT_HELLO_RETRY_REQUEST 510 +# define SSL_F_TLS_CONSTRUCT_KEY_UPDATE 517 +# define SSL_F_TLS_CONSTRUCT_NEW_SESSION_TICKET 428 +# define SSL_F_TLS_CONSTRUCT_NEXT_PROTO 426 +# define SSL_F_TLS_CONSTRUCT_SERVER_CERTIFICATE 490 +# define SSL_F_TLS_CONSTRUCT_SERVER_HELLO 491 +# define SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE 492 +# define SSL_F_TLS_CONSTRUCT_STOC_ALPN 451 +# define SSL_F_TLS_CONSTRUCT_STOC_CERTIFICATE 374 +# define SSL_F_TLS_CONSTRUCT_STOC_COOKIE 613 +# define SSL_F_TLS_CONSTRUCT_STOC_CRYPTOPRO_BUG 452 +# define SSL_F_TLS_CONSTRUCT_STOC_DONE 375 +# define SSL_F_TLS_CONSTRUCT_STOC_EARLY_DATA 531 +# define SSL_F_TLS_CONSTRUCT_STOC_EARLY_DATA_INFO 525 +# define SSL_F_TLS_CONSTRUCT_STOC_EC_PT_FORMATS 453 +# define SSL_F_TLS_CONSTRUCT_STOC_EMS 454 +# define SSL_F_TLS_CONSTRUCT_STOC_ETM 455 +# define SSL_F_TLS_CONSTRUCT_STOC_HELLO 376 +# define SSL_F_TLS_CONSTRUCT_STOC_KEY_EXCHANGE 377 +# define SSL_F_TLS_CONSTRUCT_STOC_KEY_SHARE 456 +# define SSL_F_TLS_CONSTRUCT_STOC_MAXFRAGMENTLEN 548 +# define SSL_F_TLS_CONSTRUCT_STOC_NEXT_PROTO_NEG 457 +# define SSL_F_TLS_CONSTRUCT_STOC_PSK 504 +# define SSL_F_TLS_CONSTRUCT_STOC_RENEGOTIATE 458 +# define SSL_F_TLS_CONSTRUCT_STOC_SERVER_NAME 459 +# define SSL_F_TLS_CONSTRUCT_STOC_SESSION_TICKET 460 +# define SSL_F_TLS_CONSTRUCT_STOC_STATUS_REQUEST 461 +# define SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_GROUPS 544 +# define SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_VERSIONS 611 +# define SSL_F_TLS_CONSTRUCT_STOC_USE_SRTP 462 +# define SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO 521 +# define SSL_F_TLS_FINISH_HANDSHAKE 597 +# define SSL_F_TLS_GET_MESSAGE_BODY 351 +# define SSL_F_TLS_GET_MESSAGE_HEADER 387 +# define SSL_F_TLS_HANDLE_ALPN 562 +# define SSL_F_TLS_HANDLE_STATUS_REQUEST 563 +# define SSL_F_TLS_PARSE_CERTIFICATE_AUTHORITIES 566 +# define SSL_F_TLS_PARSE_CLIENTHELLO_TLSEXT 449 +# define SSL_F_TLS_PARSE_CTOS_ALPN 567 +# define SSL_F_TLS_PARSE_CTOS_COOKIE 614 +# define SSL_F_TLS_PARSE_CTOS_EARLY_DATA 568 +# define SSL_F_TLS_PARSE_CTOS_EC_PT_FORMATS 569 +# define SSL_F_TLS_PARSE_CTOS_EMS 570 +# define SSL_F_TLS_PARSE_CTOS_KEY_SHARE 463 +# define SSL_F_TLS_PARSE_CTOS_MAXFRAGMENTLEN 571 +# define SSL_F_TLS_PARSE_CTOS_POST_HANDSHAKE_AUTH 620 +# define SSL_F_TLS_PARSE_CTOS_PSK 505 +# define SSL_F_TLS_PARSE_CTOS_PSK_KEX_MODES 572 +# define SSL_F_TLS_PARSE_CTOS_RENEGOTIATE 464 +# define SSL_F_TLS_PARSE_CTOS_SERVER_NAME 573 +# define SSL_F_TLS_PARSE_CTOS_SESSION_TICKET 574 +# define SSL_F_TLS_PARSE_CTOS_SIG_ALGS 575 +# define SSL_F_TLS_PARSE_CTOS_SIG_ALGS_CERT 615 +# define SSL_F_TLS_PARSE_CTOS_SRP 576 +# define SSL_F_TLS_PARSE_CTOS_STATUS_REQUEST 577 +# define SSL_F_TLS_PARSE_CTOS_SUPPORTED_GROUPS 578 +# define SSL_F_TLS_PARSE_CTOS_USE_SRTP 465 +# define SSL_F_TLS_PARSE_STOC_ALPN 579 +# define SSL_F_TLS_PARSE_STOC_COOKIE 534 +# define SSL_F_TLS_PARSE_STOC_EARLY_DATA 538 +# define SSL_F_TLS_PARSE_STOC_EARLY_DATA_INFO 528 +# define SSL_F_TLS_PARSE_STOC_EC_PT_FORMATS 580 +# define SSL_F_TLS_PARSE_STOC_KEY_SHARE 445 +# define SSL_F_TLS_PARSE_STOC_MAXFRAGMENTLEN 581 +# define SSL_F_TLS_PARSE_STOC_NPN 582 +# define SSL_F_TLS_PARSE_STOC_PSK 502 +# define SSL_F_TLS_PARSE_STOC_RENEGOTIATE 448 +# define SSL_F_TLS_PARSE_STOC_SCT 564 +# define SSL_F_TLS_PARSE_STOC_SERVER_NAME 583 +# define SSL_F_TLS_PARSE_STOC_SESSION_TICKET 584 +# define SSL_F_TLS_PARSE_STOC_STATUS_REQUEST 585 +# define SSL_F_TLS_PARSE_STOC_SUPPORTED_VERSIONS 612 +# define SSL_F_TLS_PARSE_STOC_USE_SRTP 446 +# define SSL_F_TLS_POST_PROCESS_CLIENT_HELLO 378 +# define SSL_F_TLS_POST_PROCESS_CLIENT_KEY_EXCHANGE 384 +# define SSL_F_TLS_PREPARE_CLIENT_CERTIFICATE 360 +# define SSL_F_TLS_PROCESS_AS_HELLO_RETRY_REQUEST 610 +# define SSL_F_TLS_PROCESS_CERTIFICATE_REQUEST 361 +# define SSL_F_TLS_PROCESS_CERT_STATUS 362 +# define SSL_F_TLS_PROCESS_CERT_STATUS_BODY 495 +# define SSL_F_TLS_PROCESS_CERT_VERIFY 379 +# define SSL_F_TLS_PROCESS_CHANGE_CIPHER_SPEC 363 +# define SSL_F_TLS_PROCESS_CKE_DHE 411 +# define SSL_F_TLS_PROCESS_CKE_ECDHE 412 +# define SSL_F_TLS_PROCESS_CKE_GOST 413 +# define SSL_F_TLS_PROCESS_CKE_PSK_PREAMBLE 414 +# define SSL_F_TLS_PROCESS_CKE_RSA 415 +# define SSL_F_TLS_PROCESS_CKE_SRP 416 +# define SSL_F_TLS_PROCESS_CLIENT_CERTIFICATE 380 +# define SSL_F_TLS_PROCESS_CLIENT_HELLO 381 +# define SSL_F_TLS_PROCESS_CLIENT_KEY_EXCHANGE 382 +# define SSL_F_TLS_PROCESS_ENCRYPTED_EXTENSIONS 444 +# define SSL_F_TLS_PROCESS_END_OF_EARLY_DATA 537 +# define SSL_F_TLS_PROCESS_FINISHED 364 +# define SSL_F_TLS_PROCESS_HELLO_REQ 507 +# define SSL_F_TLS_PROCESS_HELLO_RETRY_REQUEST 511 +# define SSL_F_TLS_PROCESS_INITIAL_SERVER_FLIGHT 442 +# define SSL_F_TLS_PROCESS_KEY_EXCHANGE 365 +# define SSL_F_TLS_PROCESS_KEY_UPDATE 518 +# define SSL_F_TLS_PROCESS_NEW_SESSION_TICKET 366 +# define SSL_F_TLS_PROCESS_NEXT_PROTO 383 +# define SSL_F_TLS_PROCESS_SERVER_CERTIFICATE 367 +# define SSL_F_TLS_PROCESS_SERVER_DONE 368 +# define SSL_F_TLS_PROCESS_SERVER_HELLO 369 +# define SSL_F_TLS_PROCESS_SKE_DHE 419 +# define SSL_F_TLS_PROCESS_SKE_ECDHE 420 +# define SSL_F_TLS_PROCESS_SKE_PSK_PREAMBLE 421 +# define SSL_F_TLS_PROCESS_SKE_SRP 422 +# define SSL_F_TLS_PSK_DO_BINDER 506 +# define SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT 450 +# define SSL_F_TLS_SETUP_HANDSHAKE 508 +# define SSL_F_USE_CERTIFICATE_CHAIN_FILE 220 +# define SSL_F_WPACKET_INTERN_INIT_LEN 633 +# define SSL_F_WPACKET_START_SUB_PACKET_LEN__ 634 +# define SSL_F_WRITE_STATE_MACHINE 586 + +/* + * SSL reason codes. + */ +# define SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY 291 +# define SSL_R_APP_DATA_IN_HANDSHAKE 100 +# define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272 +# define SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE 143 +# define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE 158 +# define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 +# define SSL_R_BAD_CIPHER 186 +# define SSL_R_BAD_DATA 390 +# define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 +# define SSL_R_BAD_DECOMPRESSION 107 +# define SSL_R_BAD_DH_VALUE 102 +# define SSL_R_BAD_DIGEST_LENGTH 111 +# define SSL_R_BAD_EARLY_DATA 233 +# define SSL_R_BAD_ECC_CERT 304 +# define SSL_R_BAD_ECPOINT 306 +# define SSL_R_BAD_EXTENSION 110 +# define SSL_R_BAD_HANDSHAKE_LENGTH 332 +# define SSL_R_BAD_HANDSHAKE_STATE 236 +# define SSL_R_BAD_HELLO_REQUEST 105 +# define SSL_R_BAD_HRR_VERSION 263 +# define SSL_R_BAD_KEY_SHARE 108 +# define SSL_R_BAD_KEY_UPDATE 122 +# define SSL_R_BAD_LEGACY_VERSION 292 +# define SSL_R_BAD_LENGTH 271 +# define SSL_R_BAD_PACKET 240 +# define SSL_R_BAD_PACKET_LENGTH 115 +# define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116 +# define SSL_R_BAD_PSK 219 +# define SSL_R_BAD_PSK_IDENTITY 114 +# define SSL_R_BAD_RECORD_TYPE 443 +# define SSL_R_BAD_RSA_ENCRYPT 119 +# define SSL_R_BAD_SIGNATURE 123 +# define SSL_R_BAD_SRP_A_LENGTH 347 +# define SSL_R_BAD_SRP_PARAMETERS 371 +# define SSL_R_BAD_SRTP_MKI_VALUE 352 +# define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST 353 +# define SSL_R_BAD_SSL_FILETYPE 124 +# define SSL_R_BAD_VALUE 384 +# define SSL_R_BAD_WRITE_RETRY 127 +# define SSL_R_BINDER_DOES_NOT_VERIFY 253 +# define SSL_R_BIO_NOT_SET 128 +# define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129 +# define SSL_R_BN_LIB 130 +# define SSL_R_CALLBACK_FAILED 234 +# define SSL_R_CANNOT_CHANGE_CIPHER 109 +# define SSL_R_CA_DN_LENGTH_MISMATCH 131 +# define SSL_R_CA_KEY_TOO_SMALL 397 +# define SSL_R_CA_MD_TOO_WEAK 398 +# define SSL_R_CCS_RECEIVED_EARLY 133 +# define SSL_R_CERTIFICATE_VERIFY_FAILED 134 +# define SSL_R_CERT_CB_ERROR 377 +# define SSL_R_CERT_LENGTH_MISMATCH 135 +# define SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED 218 +# define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 +# define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 +# define SSL_R_CLIENTHELLO_TLSEXT 226 +# define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 +# define SSL_R_COMPRESSION_DISABLED 343 +# define SSL_R_COMPRESSION_FAILURE 141 +# define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307 +# define SSL_R_COMPRESSION_LIBRARY_ERROR 142 +# define SSL_R_CONNECTION_TYPE_NOT_SET 144 +# define SSL_R_CONTEXT_NOT_DANE_ENABLED 167 +# define SSL_R_COOKIE_GEN_CALLBACK_FAILURE 400 +# define SSL_R_COOKIE_MISMATCH 308 +# define SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED 206 +# define SSL_R_DANE_ALREADY_ENABLED 172 +# define SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL 173 +# define SSL_R_DANE_NOT_ENABLED 175 +# define SSL_R_DANE_TLSA_BAD_CERTIFICATE 180 +# define SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE 184 +# define SSL_R_DANE_TLSA_BAD_DATA_LENGTH 189 +# define SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH 192 +# define SSL_R_DANE_TLSA_BAD_MATCHING_TYPE 200 +# define SSL_R_DANE_TLSA_BAD_PUBLIC_KEY 201 +# define SSL_R_DANE_TLSA_BAD_SELECTOR 202 +# define SSL_R_DANE_TLSA_NULL_DATA 203 +# define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145 +# define SSL_R_DATA_LENGTH_TOO_LONG 146 +# define SSL_R_DECRYPTION_FAILED 147 +# define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281 +# define SSL_R_DH_KEY_TOO_SMALL 394 +# define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 +# define SSL_R_DIGEST_CHECK_FAILED 149 +# define SSL_R_DTLS_MESSAGE_TOO_BIG 334 +# define SSL_R_DUPLICATE_COMPRESSION_ID 309 +# define SSL_R_ECC_CERT_NOT_FOR_SIGNING 318 +# define SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE 374 +# define SSL_R_EE_KEY_TOO_SMALL 399 +# define SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST 354 +# define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 +# define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 +# define SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN 204 +# define SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE 194 +# define SSL_R_EXCESSIVE_MESSAGE_SIZE 152 +# define SSL_R_EXTENSION_NOT_RECEIVED 279 +# define SSL_R_EXTRA_DATA_IN_MESSAGE 153 +# define SSL_R_EXT_LENGTH_MISMATCH 163 +# define SSL_R_FAILED_TO_INIT_ASYNC 405 +# define SSL_R_FRAGMENTED_CLIENT_HELLO 401 +# define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154 +# define SSL_R_HTTPS_PROXY_REQUEST 155 +# define SSL_R_HTTP_REQUEST 156 +# define SSL_R_ILLEGAL_POINT_COMPRESSION 162 +# define SSL_R_ILLEGAL_SUITEB_DIGEST 380 +# define SSL_R_INAPPROPRIATE_FALLBACK 373 +# define SSL_R_INCONSISTENT_COMPRESSION 340 +# define SSL_R_INCONSISTENT_EARLY_DATA_ALPN 222 +# define SSL_R_INCONSISTENT_EARLY_DATA_SNI 231 +# define SSL_R_INCONSISTENT_EXTMS 104 +# define SSL_R_INSUFFICIENT_SECURITY 241 +# define SSL_R_INVALID_ALERT 205 +# define SSL_R_INVALID_CCS_MESSAGE 260 +# define SSL_R_INVALID_CERTIFICATE_OR_ALG 238 +# define SSL_R_INVALID_COMMAND 280 +# define SSL_R_INVALID_COMPRESSION_ALGORITHM 341 +# define SSL_R_INVALID_CONFIG 283 +# define SSL_R_INVALID_CONFIGURATION_NAME 113 +# define SSL_R_INVALID_CONTEXT 282 +# define SSL_R_INVALID_CT_VALIDATION_TYPE 212 +# define SSL_R_INVALID_KEY_UPDATE_TYPE 120 +# define SSL_R_INVALID_MAX_EARLY_DATA 174 +# define SSL_R_INVALID_NULL_CMD_NAME 385 +# define SSL_R_INVALID_SEQUENCE_NUMBER 402 +# define SSL_R_INVALID_SERVERINFO_DATA 388 +# define SSL_R_INVALID_SESSION_ID 999 +# define SSL_R_INVALID_SRP_USERNAME 357 +# define SSL_R_INVALID_STATUS_RESPONSE 328 +# define SSL_R_INVALID_TICKET_KEYS_LENGTH 325 +# define SSL_R_LENGTH_MISMATCH 159 +# define SSL_R_LENGTH_TOO_LONG 404 +# define SSL_R_LENGTH_TOO_SHORT 160 +# define SSL_R_LIBRARY_BUG 274 +# define SSL_R_LIBRARY_HAS_NO_CIPHERS 161 +# define SSL_R_MISSING_DSA_SIGNING_CERT 165 +# define SSL_R_MISSING_ECDSA_SIGNING_CERT 381 +# define SSL_R_MISSING_FATAL 256 +# define SSL_R_MISSING_PARAMETERS 290 +# define SSL_R_MISSING_RSA_CERTIFICATE 168 +# define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 +# define SSL_R_MISSING_RSA_SIGNING_CERT 170 +# define SSL_R_MISSING_SIGALGS_EXTENSION 112 +# define SSL_R_MISSING_SIGNING_CERT 221 +# define SSL_R_MISSING_SRP_PARAM 358 +# define SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION 209 +# define SSL_R_MISSING_TMP_DH_KEY 171 +# define SSL_R_MISSING_TMP_ECDH_KEY 311 +# define SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA 293 +# define SSL_R_NOT_ON_RECORD_BOUNDARY 182 +# define SSL_R_NOT_REPLACING_CERTIFICATE 289 +# define SSL_R_NOT_SERVER 284 +# define SSL_R_NO_APPLICATION_PROTOCOL 235 +# define SSL_R_NO_CERTIFICATES_RETURNED 176 +# define SSL_R_NO_CERTIFICATE_ASSIGNED 177 +# define SSL_R_NO_CERTIFICATE_SET 179 +# define SSL_R_NO_CHANGE_FOLLOWING_HRR 214 +# define SSL_R_NO_CIPHERS_AVAILABLE 181 +# define SSL_R_NO_CIPHERS_SPECIFIED 183 +# define SSL_R_NO_CIPHER_MATCH 185 +# define SSL_R_NO_CLIENT_CERT_METHOD 331 +# define SSL_R_NO_COMPRESSION_SPECIFIED 187 +# define SSL_R_NO_COOKIE_CALLBACK_SET 287 +# define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER 330 +# define SSL_R_NO_METHOD_SPECIFIED 188 +# define SSL_R_NO_PEM_EXTENSIONS 389 +# define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190 +# define SSL_R_NO_PROTOCOLS_AVAILABLE 191 +# define SSL_R_NO_RENEGOTIATION 339 +# define SSL_R_NO_REQUIRED_DIGEST 324 +# define SSL_R_NO_SHARED_CIPHER 193 +# define SSL_R_NO_SHARED_GROUPS 410 +# define SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS 376 +# define SSL_R_NO_SRTP_PROFILES 359 +# define SSL_R_NO_SUITABLE_KEY_SHARE 101 +# define SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM 118 +# define SSL_R_NO_VALID_SCTS 216 +# define SSL_R_NO_VERIFY_COOKIE_CALLBACK 403 +# define SSL_R_NULL_SSL_CTX 195 +# define SSL_R_NULL_SSL_METHOD_PASSED 196 +# define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 +# define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344 +# define SSL_R_OVERFLOW_ERROR 237 +# define SSL_R_PACKET_LENGTH_TOO_LONG 198 +# define SSL_R_PARSE_TLSEXT 227 +# define SSL_R_PATH_TOO_LONG 270 +# define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 +# define SSL_R_PEM_NAME_BAD_PREFIX 391 +# define SSL_R_PEM_NAME_TOO_SHORT 392 +# define SSL_R_PIPELINE_FAILURE 406 +# define SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR 278 +# define SSL_R_PRIVATE_KEY_MISMATCH 288 +# define SSL_R_PROTOCOL_IS_SHUTDOWN 207 +# define SSL_R_PSK_IDENTITY_NOT_FOUND 223 +# define SSL_R_PSK_NO_CLIENT_CB 224 +# define SSL_R_PSK_NO_SERVER_CB 225 +# define SSL_R_READ_BIO_NOT_SET 211 +# define SSL_R_READ_TIMEOUT_EXPIRED 312 +# define SSL_R_RECORD_LENGTH_MISMATCH 213 +# define SSL_R_RECORD_TOO_SMALL 298 +# define SSL_R_RENEGOTIATE_EXT_TOO_LONG 335 +# define SSL_R_RENEGOTIATION_ENCODING_ERR 336 +# define SSL_R_RENEGOTIATION_MISMATCH 337 +# define SSL_R_REQUEST_PENDING 285 +# define SSL_R_REQUEST_SENT 286 +# define SSL_R_REQUIRED_CIPHER_MISSING 215 +# define SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING 342 +# define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING 345 +# define SSL_R_SCT_VERIFICATION_FAILED 208 +# define SSL_R_SERVERHELLO_TLSEXT 275 +# define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 +# define SSL_R_SHUTDOWN_WHILE_IN_INIT 407 +# define SSL_R_SIGNATURE_ALGORITHMS_ERROR 360 +# define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 +# define SSL_R_SRP_A_CALC 361 +# define SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES 362 +# define SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG 363 +# define SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE 364 +# define SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH 232 +# define SSL_R_SSL3_EXT_INVALID_SERVERNAME 319 +# define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 320 +# define SSL_R_SSL3_SESSION_ID_TOO_LONG 300 +# define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 +# define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 +# define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 +# define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 +# define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 +# define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 +# define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 +# define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 +# define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 +# define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 +# define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 +# define SSL_R_SSL_COMMAND_SECTION_EMPTY 117 +# define SSL_R_SSL_COMMAND_SECTION_NOT_FOUND 125 +# define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228 +# define SSL_R_SSL_HANDSHAKE_FAILURE 229 +# define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230 +# define SSL_R_SSL_NEGATIVE_LENGTH 372 +# define SSL_R_SSL_SECTION_EMPTY 126 +# define SSL_R_SSL_SECTION_NOT_FOUND 136 +# define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 301 +# define SSL_R_SSL_SESSION_ID_CONFLICT 302 +# define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273 +# define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 303 +# define SSL_R_SSL_SESSION_ID_TOO_LONG 408 +# define SSL_R_SSL_SESSION_VERSION_MISMATCH 210 +# define SSL_R_STILL_IN_INIT 121 +# define SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED 1116 +# define SSL_R_TLSV13_ALERT_MISSING_EXTENSION 1109 +# define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 +# define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 +# define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 +# define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 +# define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060 +# define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086 +# define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 +# define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 +# define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 +# define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 +# define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 +# define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 +# define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 +# define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114 +# define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113 +# define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111 +# define SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 +# define SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 +# define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT 365 +# define SSL_R_TLS_HEARTBEAT_PENDING 366 +# define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL 367 +# define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 157 +# define SSL_R_TOO_MANY_KEY_UPDATES 132 +# define SSL_R_TOO_MANY_WARN_ALERTS 409 +# define SSL_R_TOO_MUCH_EARLY_DATA 164 +# define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314 +# define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 +# define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242 +# define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 +# define SSL_R_UNEXPECTED_CCS_MESSAGE 262 +# define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178 +# define SSL_R_UNEXPECTED_MESSAGE 244 +# define SSL_R_UNEXPECTED_RECORD 245 +# define SSL_R_UNINITIALIZED 276 +# define SSL_R_UNKNOWN_ALERT_TYPE 246 +# define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247 +# define SSL_R_UNKNOWN_CIPHER_RETURNED 248 +# define SSL_R_UNKNOWN_CIPHER_TYPE 249 +# define SSL_R_UNKNOWN_CMD_NAME 386 +# define SSL_R_UNKNOWN_COMMAND 139 +# define SSL_R_UNKNOWN_DIGEST 368 +# define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250 +# define SSL_R_UNKNOWN_PKEY_TYPE 251 +# define SSL_R_UNKNOWN_PROTOCOL 252 +# define SSL_R_UNKNOWN_SSL_VERSION 254 +# define SSL_R_UNKNOWN_STATE 255 +# define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED 338 +# define SSL_R_UNSOLICITED_EXTENSION 217 +# define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 +# define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315 +# define SSL_R_UNSUPPORTED_PROTOCOL 258 +# define SSL_R_UNSUPPORTED_SSL_VERSION 259 +# define SSL_R_UNSUPPORTED_STATUS_TYPE 329 +# define SSL_R_USE_SRTP_NOT_NEGOTIATED 369 +# define SSL_R_VERSION_TOO_HIGH 166 +# define SSL_R_VERSION_TOO_LOW 396 +# define SSL_R_WRONG_CERTIFICATE_TYPE 383 +# define SSL_R_WRONG_CIPHER_RETURNED 261 +# define SSL_R_WRONG_CURVE 378 +# define SSL_R_WRONG_SIGNATURE_LENGTH 264 +# define SSL_R_WRONG_SIGNATURE_SIZE 265 +# define SSL_R_WRONG_SIGNATURE_TYPE 370 +# define SSL_R_WRONG_SSL_VERSION 266 +# define SSL_R_WRONG_VERSION_NUMBER 267 +# define SSL_R_X509_LIB 268 +# define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/stack.h b/src/Mayaqua/win32_inc/openssl/stack.h index eb98b8af..cfc07505 100644 --- a/src/Mayaqua/win32_inc/openssl/stack.h +++ b/src/Mayaqua/win32_inc/openssl/stack.h @@ -1,107 +1,83 @@ -/* crypto/stack/stack.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_STACK_H -# define HEADER_STACK_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct stack_st { - int num; - char **data; - int sorted; - int num_alloc; - int (*comp) (const void *, const void *); -} _STACK; /* Use STACK_OF(...) instead */ - -# define M_sk_num(sk) ((sk) ? (sk)->num:-1) -# define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) - -int sk_num(const _STACK *); -void *sk_value(const _STACK *, int); - -void *sk_set(_STACK *, int, void *); - -_STACK *sk_new(int (*cmp) (const void *, const void *)); -_STACK *sk_new_null(void); -void sk_free(_STACK *); -void sk_pop_free(_STACK *st, void (*func) (void *)); -_STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *)); -int sk_insert(_STACK *sk, void *data, int where); -void *sk_delete(_STACK *st, int loc); -void *sk_delete_ptr(_STACK *st, void *p); -int sk_find(_STACK *st, void *data); -int sk_find_ex(_STACK *st, void *data); -int sk_push(_STACK *st, void *data); -int sk_unshift(_STACK *st, void *data); -void *sk_shift(_STACK *st); -void *sk_pop(_STACK *st); -void sk_zero(_STACK *st); -int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *))) - (const void *, const void *); -_STACK *sk_dup(_STACK *st); -void sk_sort(_STACK *st); -int sk_is_sorted(const _STACK *st); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_STACK_H +# define HEADER_STACK_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct stack_st OPENSSL_STACK; /* Use STACK_OF(...) instead */ + +typedef int (*OPENSSL_sk_compfunc)(const void *, const void *); +typedef void (*OPENSSL_sk_freefunc)(void *); +typedef void *(*OPENSSL_sk_copyfunc)(const void *); + +int OPENSSL_sk_num(const OPENSSL_STACK *); +void *OPENSSL_sk_value(const OPENSSL_STACK *, int); + +void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data); + +OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp); +OPENSSL_STACK *OPENSSL_sk_new_null(void); +OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n); +int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n); +void OPENSSL_sk_free(OPENSSL_STACK *); +void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *)); +OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *, + OPENSSL_sk_copyfunc c, + OPENSSL_sk_freefunc f); +int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where); +void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc); +void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p); +int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data); +int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data); +int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data); +int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data); +void *OPENSSL_sk_shift(OPENSSL_STACK *st); +void *OPENSSL_sk_pop(OPENSSL_STACK *st); +void OPENSSL_sk_zero(OPENSSL_STACK *st); +OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk, + OPENSSL_sk_compfunc cmp); +OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st); +void OPENSSL_sk_sort(OPENSSL_STACK *st); +int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define _STACK OPENSSL_STACK +# define sk_num OPENSSL_sk_num +# define sk_value OPENSSL_sk_value +# define sk_set OPENSSL_sk_set +# define sk_new OPENSSL_sk_new +# define sk_new_null OPENSSL_sk_new_null +# define sk_free OPENSSL_sk_free +# define sk_pop_free OPENSSL_sk_pop_free +# define sk_deep_copy OPENSSL_sk_deep_copy +# define sk_insert OPENSSL_sk_insert +# define sk_delete OPENSSL_sk_delete +# define sk_delete_ptr OPENSSL_sk_delete_ptr +# define sk_find OPENSSL_sk_find +# define sk_find_ex OPENSSL_sk_find_ex +# define sk_push OPENSSL_sk_push +# define sk_unshift OPENSSL_sk_unshift +# define sk_shift OPENSSL_sk_shift +# define sk_pop OPENSSL_sk_pop +# define sk_zero OPENSSL_sk_zero +# define sk_set_cmp_func OPENSSL_sk_set_cmp_func +# define sk_dup OPENSSL_sk_dup +# define sk_sort OPENSSL_sk_sort +# define sk_is_sorted OPENSSL_sk_is_sorted +# endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/store.h b/src/Mayaqua/win32_inc/openssl/store.h new file mode 100644 index 00000000..a40a7339 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/store.h @@ -0,0 +1,266 @@ +/* + * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OSSL_STORE_H +# define HEADER_OSSL_STORE_H + +# include +# include +# include +# include + +# ifdef __cplusplus +extern "C" { +# endif + +/*- + * The main OSSL_STORE functions. + * ------------------------------ + * + * These allow applications to open a channel to a resource with supported + * data (keys, certs, crls, ...), read the data a piece at a time and decide + * what to do with it, and finally close. + */ + +typedef struct ossl_store_ctx_st OSSL_STORE_CTX; + +/* + * Typedef for the OSSL_STORE_INFO post processing callback. This can be used + * to massage the given OSSL_STORE_INFO, or to drop it entirely (by returning + * NULL). + */ +typedef OSSL_STORE_INFO *(*OSSL_STORE_post_process_info_fn)(OSSL_STORE_INFO *, + void *); + +/* + * Open a channel given a URI. The given UI method will be used any time the + * loader needs extra input, for example when a password or pin is needed, and + * will be passed the same user data every time it's needed in this context. + * + * Returns a context reference which represents the channel to communicate + * through. + */ +OSSL_STORE_CTX *OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, + void *ui_data, + OSSL_STORE_post_process_info_fn post_process, + void *post_process_data); + +/* + * Control / fine tune the OSSL_STORE channel. |cmd| determines what is to be + * done, and depends on the underlying loader (use OSSL_STORE_get0_scheme to + * determine which loader is used), except for common commands (see below). + * Each command takes different arguments. + */ +int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, ... /* args */); +int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, va_list args); + +/* + * Common ctrl commands that different loaders may choose to support. + */ +/* int on = 0 or 1; STORE_ctrl(ctx, STORE_C_USE_SECMEM, &on); */ +# define OSSL_STORE_C_USE_SECMEM 1 +/* Where custom commands start */ +# define OSSL_STORE_C_CUSTOM_START 100 + +/* + * Read one data item (a key, a cert, a CRL) that is supported by the OSSL_STORE + * functionality, given a context. + * Returns a OSSL_STORE_INFO pointer, from which OpenSSL typed data can be + * extracted with OSSL_STORE_INFO_get0_PKEY(), OSSL_STORE_INFO_get0_CERT(), ... + * NULL is returned on error, which may include that the data found at the URI + * can't be figured out for certain or is ambiguous. + */ +OSSL_STORE_INFO *OSSL_STORE_load(OSSL_STORE_CTX *ctx); + +/* + * Check if end of data (end of file) is reached + * Returns 1 on end, 0 otherwise. + */ +int OSSL_STORE_eof(OSSL_STORE_CTX *ctx); + +/* + * Check if an error occurred + * Returns 1 if it did, 0 otherwise. + */ +int OSSL_STORE_error(OSSL_STORE_CTX *ctx); + +/* + * Close the channel + * Returns 1 on success, 0 on error. + */ +int OSSL_STORE_close(OSSL_STORE_CTX *ctx); + + +/*- + * Extracting OpenSSL types from and creating new OSSL_STORE_INFOs + * --------------------------------------------------------------- + */ + +/* + * Types of data that can be ossl_stored in a OSSL_STORE_INFO. + * OSSL_STORE_INFO_NAME is typically found when getting a listing of + * available "files" / "tokens" / what have you. + */ +# define OSSL_STORE_INFO_NAME 1 /* char * */ +# define OSSL_STORE_INFO_PARAMS 2 /* EVP_PKEY * */ +# define OSSL_STORE_INFO_PKEY 3 /* EVP_PKEY * */ +# define OSSL_STORE_INFO_CERT 4 /* X509 * */ +# define OSSL_STORE_INFO_CRL 5 /* X509_CRL * */ + +/* + * Functions to generate OSSL_STORE_INFOs, one function for each type we + * support having in them, as well as a generic constructor. + * + * In all cases, ownership of the object is transferred to the OSSL_STORE_INFO + * and will therefore be freed when the OSSL_STORE_INFO is freed. + */ +OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name); +int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc); +OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params); +OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey); +OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509); +OSSL_STORE_INFO *OSSL_STORE_INFO_new_CRL(X509_CRL *crl); + +/* + * Functions to try to extract data from a OSSL_STORE_INFO. + */ +int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info); +const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info); +char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info); +const char *OSSL_STORE_INFO_get0_NAME_description(const OSSL_STORE_INFO *info); +char *OSSL_STORE_INFO_get1_NAME_description(const OSSL_STORE_INFO *info); +EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info); +EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info); +EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info); +EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info); +X509 *OSSL_STORE_INFO_get0_CERT(const OSSL_STORE_INFO *info); +X509 *OSSL_STORE_INFO_get1_CERT(const OSSL_STORE_INFO *info); +X509_CRL *OSSL_STORE_INFO_get0_CRL(const OSSL_STORE_INFO *info); +X509_CRL *OSSL_STORE_INFO_get1_CRL(const OSSL_STORE_INFO *info); + +const char *OSSL_STORE_INFO_type_string(int type); + +/* + * Free the OSSL_STORE_INFO + */ +void OSSL_STORE_INFO_free(OSSL_STORE_INFO *info); + + +/*- + * Functions to construct a search URI from a base URI and search criteria + * ----------------------------------------------------------------------- + */ + +/* OSSL_STORE search types */ +# define OSSL_STORE_SEARCH_BY_NAME 1 /* subject in certs, issuer in CRLs */ +# define OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 2 +# define OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 3 +# define OSSL_STORE_SEARCH_BY_ALIAS 4 + +/* To check what search types the scheme handler supports */ +int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int search_type); + +/* Search term constructors */ +/* + * The input is considered to be owned by the caller, and must therefore + * remain present throughout the lifetime of the returned OSSL_STORE_SEARCH + */ +OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_name(X509_NAME *name); +OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_issuer_serial(X509_NAME *name, + const ASN1_INTEGER + *serial); +OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_key_fingerprint(const EVP_MD *digest, + const unsigned char + *bytes, size_t len); +OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_alias(const char *alias); + +/* Search term destructor */ +void OSSL_STORE_SEARCH_free(OSSL_STORE_SEARCH *search); + +/* Search term accessors */ +int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion); +X509_NAME *OSSL_STORE_SEARCH_get0_name(OSSL_STORE_SEARCH *criterion); +const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH + *criterion); +const unsigned char *OSSL_STORE_SEARCH_get0_bytes(const OSSL_STORE_SEARCH + *criterion, size_t *length); +const char *OSSL_STORE_SEARCH_get0_string(const OSSL_STORE_SEARCH *criterion); +const EVP_MD *OSSL_STORE_SEARCH_get0_digest(const OSSL_STORE_SEARCH *criterion); + +/* + * Add search criterion and expected return type (which can be unspecified) + * to the loading channel. This MUST happen before the first OSSL_STORE_load(). + */ +int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type); +int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search); + + +/*- + * Function to register a loader for the given URI scheme. + * ------------------------------------------------------- + * + * The loader receives all the main components of an URI except for the + * scheme. + */ + +typedef struct ossl_store_loader_st OSSL_STORE_LOADER; +OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme); +const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); +const char *OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); +/* struct ossl_store_loader_ctx_st is defined differently by each loader */ +typedef struct ossl_store_loader_ctx_st OSSL_STORE_LOADER_CTX; +typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn)(const OSSL_STORE_LOADER + *loader, + const char *uri, + const UI_METHOD *ui_method, + void *ui_data); +int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader, + OSSL_STORE_open_fn open_function); +typedef int (*OSSL_STORE_ctrl_fn)(OSSL_STORE_LOADER_CTX *ctx, int cmd, + va_list args); +int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader, + OSSL_STORE_ctrl_fn ctrl_function); +typedef int (*OSSL_STORE_expect_fn)(OSSL_STORE_LOADER_CTX *ctx, int expected); +int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader, + OSSL_STORE_expect_fn expect_function); +typedef int (*OSSL_STORE_find_fn)(OSSL_STORE_LOADER_CTX *ctx, + OSSL_STORE_SEARCH *criteria); +int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader, + OSSL_STORE_find_fn find_function); +typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)(OSSL_STORE_LOADER_CTX *ctx, + const UI_METHOD *ui_method, + void *ui_data); +int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader, + OSSL_STORE_load_fn load_function); +typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx); +int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader, + OSSL_STORE_eof_fn eof_function); +typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx); +int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader, + OSSL_STORE_error_fn error_function); +typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx); +int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader, + OSSL_STORE_close_fn close_function); +void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader); + +int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader); +OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme); + +/*- + * Functions to list STORE loaders + * ------------------------------- + */ +int OSSL_STORE_do_all_loaders(void (*do_function) (const OSSL_STORE_LOADER + *loader, void *do_arg), + void *do_arg); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/storeerr.h b/src/Mayaqua/win32_inc/openssl/storeerr.h new file mode 100644 index 00000000..190eab07 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/storeerr.h @@ -0,0 +1,91 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OSSL_STOREERR_H +# define HEADER_OSSL_STOREERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_OSSL_STORE_strings(void); + +/* + * OSSL_STORE function codes. + */ +# define OSSL_STORE_F_FILE_CTRL 129 +# define OSSL_STORE_F_FILE_FIND 138 +# define OSSL_STORE_F_FILE_GET_PASS 118 +# define OSSL_STORE_F_FILE_LOAD 119 +# define OSSL_STORE_F_FILE_LOAD_TRY_DECODE 124 +# define OSSL_STORE_F_FILE_NAME_TO_URI 126 +# define OSSL_STORE_F_FILE_OPEN 120 +# define OSSL_STORE_F_OSSL_STORE_ATTACH_PEM_BIO 127 +# define OSSL_STORE_F_OSSL_STORE_EXPECT 130 +# define OSSL_STORE_F_OSSL_STORE_FILE_ATTACH_PEM_BIO_INT 128 +# define OSSL_STORE_F_OSSL_STORE_FIND 131 +# define OSSL_STORE_F_OSSL_STORE_GET0_LOADER_INT 100 +# define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CERT 101 +# define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CRL 102 +# define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME 103 +# define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME_DESCRIPTION 135 +# define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PARAMS 104 +# define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PKEY 105 +# define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CERT 106 +# define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CRL 107 +# define OSSL_STORE_F_OSSL_STORE_INFO_NEW_EMBEDDED 123 +# define OSSL_STORE_F_OSSL_STORE_INFO_NEW_NAME 109 +# define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PARAMS 110 +# define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PKEY 111 +# define OSSL_STORE_F_OSSL_STORE_INFO_SET0_NAME_DESCRIPTION 134 +# define OSSL_STORE_F_OSSL_STORE_INIT_ONCE 112 +# define OSSL_STORE_F_OSSL_STORE_LOADER_NEW 113 +# define OSSL_STORE_F_OSSL_STORE_OPEN 114 +# define OSSL_STORE_F_OSSL_STORE_OPEN_INT 115 +# define OSSL_STORE_F_OSSL_STORE_REGISTER_LOADER_INT 117 +# define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ALIAS 132 +# define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 133 +# define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 136 +# define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_NAME 137 +# define OSSL_STORE_F_OSSL_STORE_UNREGISTER_LOADER_INT 116 +# define OSSL_STORE_F_TRY_DECODE_PARAMS 121 +# define OSSL_STORE_F_TRY_DECODE_PKCS12 122 +# define OSSL_STORE_F_TRY_DECODE_PKCS8ENCRYPTED 125 + +/* + * OSSL_STORE reason codes. + */ +# define OSSL_STORE_R_AMBIGUOUS_CONTENT_TYPE 107 +# define OSSL_STORE_R_BAD_PASSWORD_READ 115 +# define OSSL_STORE_R_ERROR_VERIFYING_PKCS12_MAC 113 +# define OSSL_STORE_R_FINGERPRINT_SIZE_DOES_NOT_MATCH_DIGEST 121 +# define OSSL_STORE_R_INVALID_SCHEME 106 +# define OSSL_STORE_R_IS_NOT_A 112 +# define OSSL_STORE_R_LOADER_INCOMPLETE 116 +# define OSSL_STORE_R_LOADING_STARTED 117 +# define OSSL_STORE_R_NOT_A_CERTIFICATE 100 +# define OSSL_STORE_R_NOT_A_CRL 101 +# define OSSL_STORE_R_NOT_A_KEY 102 +# define OSSL_STORE_R_NOT_A_NAME 103 +# define OSSL_STORE_R_NOT_PARAMETERS 104 +# define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR 114 +# define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE 108 +# define OSSL_STORE_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES 119 +# define OSSL_STORE_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED 109 +# define OSSL_STORE_R_UNREGISTERED_SCHEME 105 +# define OSSL_STORE_R_UNSUPPORTED_CONTENT_TYPE 110 +# define OSSL_STORE_R_UNSUPPORTED_OPERATION 118 +# define OSSL_STORE_R_UNSUPPORTED_SEARCH_TYPE 120 +# define OSSL_STORE_R_URI_AUTHORITY_UNSUPPORTED 111 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/symhacks.h b/src/Mayaqua/win32_inc/openssl/symhacks.h index b0de6880..156ea6e4 100644 --- a/src/Mayaqua/win32_inc/openssl/symhacks.h +++ b/src/Mayaqua/win32_inc/openssl/symhacks.h @@ -1,516 +1,37 @@ -/* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_SYMHACKS_H -# define HEADER_SYMHACKS_H - -# include - -/* - * Hacks to solve the problem with linkers incapable of handling very long - * symbol names. In the case of VMS, the limit is 31 characters on VMS for - * VAX. - */ -/* - * Note that this affects util/libeay.num and util/ssleay.num... you may - * change those manually, but that's not recommended, as those files are - * controlled centrally and updated on Unix, and the central definition may - * disagree with yours, which in turn may come with shareable library - * incompatibilities. - */ -# ifdef OPENSSL_SYS_VMS - -/* Hack a long name in crypto/ex_data.c */ -# undef CRYPTO_get_ex_data_implementation -# define CRYPTO_get_ex_data_implementation CRYPTO_get_ex_data_impl -# undef CRYPTO_set_ex_data_implementation -# define CRYPTO_set_ex_data_implementation CRYPTO_set_ex_data_impl - -/* Hack a long name in crypto/asn1/a_mbstr.c */ -# undef ASN1_STRING_set_default_mask_asc -# define ASN1_STRING_set_default_mask_asc ASN1_STRING_set_def_mask_asc - -# if 0 /* No longer needed, since safestack macro - * magic does the job */ -/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */ -# undef i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO -# define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO i2d_ASN1_SET_OF_PKCS7_SIGINF -# undef d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO -# define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO d2i_ASN1_SET_OF_PKCS7_SIGINF -# endif - -# if 0 /* No longer needed, since safestack macro - * magic does the job */ -/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */ -# undef i2d_ASN1_SET_OF_PKCS7_RECIP_INFO -# define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO i2d_ASN1_SET_OF_PKCS7_RECINF -# undef d2i_ASN1_SET_OF_PKCS7_RECIP_INFO -# define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO d2i_ASN1_SET_OF_PKCS7_RECINF -# endif - -# if 0 /* No longer needed, since safestack macro - * magic does the job */ -/* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */ -# undef i2d_ASN1_SET_OF_ACCESS_DESCRIPTION -# define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION i2d_ASN1_SET_OF_ACC_DESC -# undef d2i_ASN1_SET_OF_ACCESS_DESCRIPTION -# define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION d2i_ASN1_SET_OF_ACC_DESC -# endif - -/* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */ -# undef PEM_read_NETSCAPE_CERT_SEQUENCE -# define PEM_read_NETSCAPE_CERT_SEQUENCE PEM_read_NS_CERT_SEQ -# undef PEM_write_NETSCAPE_CERT_SEQUENCE -# define PEM_write_NETSCAPE_CERT_SEQUENCE PEM_write_NS_CERT_SEQ -# undef PEM_read_bio_NETSCAPE_CERT_SEQUENCE -# define PEM_read_bio_NETSCAPE_CERT_SEQUENCE PEM_read_bio_NS_CERT_SEQ -# undef PEM_write_bio_NETSCAPE_CERT_SEQUENCE -# define PEM_write_bio_NETSCAPE_CERT_SEQUENCE PEM_write_bio_NS_CERT_SEQ -# undef PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE -# define PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE PEM_write_cb_bio_NS_CERT_SEQ - -/* Hack the names created with DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO) */ -# undef PEM_read_PKCS8_PRIV_KEY_INFO -# define PEM_read_PKCS8_PRIV_KEY_INFO PEM_read_P8_PRIV_KEY_INFO -# undef PEM_write_PKCS8_PRIV_KEY_INFO -# define PEM_write_PKCS8_PRIV_KEY_INFO PEM_write_P8_PRIV_KEY_INFO -# undef PEM_read_bio_PKCS8_PRIV_KEY_INFO -# define PEM_read_bio_PKCS8_PRIV_KEY_INFO PEM_read_bio_P8_PRIV_KEY_INFO -# undef PEM_write_bio_PKCS8_PRIV_KEY_INFO -# define PEM_write_bio_PKCS8_PRIV_KEY_INFO PEM_write_bio_P8_PRIV_KEY_INFO -# undef PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO -# define PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO PEM_wrt_cb_bio_P8_PRIV_KEY_INFO - -/* Hack other PEM names */ -# undef PEM_write_bio_PKCS8PrivateKey_nid -# define PEM_write_bio_PKCS8PrivateKey_nid PEM_write_bio_PKCS8PrivKey_nid - -/* Hack some long X509 names */ -# undef X509_REVOKED_get_ext_by_critical -# define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic -# undef X509_policy_tree_get0_user_policies -# define X509_policy_tree_get0_user_policies X509_pcy_tree_get0_usr_policies -# undef X509_policy_node_get0_qualifiers -# define X509_policy_node_get0_qualifiers X509_pcy_node_get0_qualifiers -# undef X509_STORE_CTX_get_explicit_policy -# define X509_STORE_CTX_get_explicit_policy X509_STORE_CTX_get_expl_policy -# undef X509_STORE_CTX_get0_current_issuer -# define X509_STORE_CTX_get0_current_issuer X509_STORE_CTX_get0_cur_issuer - -/* Hack some long CRYPTO names */ -# undef CRYPTO_set_dynlock_destroy_callback -# define CRYPTO_set_dynlock_destroy_callback CRYPTO_set_dynlock_destroy_cb -# undef CRYPTO_set_dynlock_create_callback -# define CRYPTO_set_dynlock_create_callback CRYPTO_set_dynlock_create_cb -# undef CRYPTO_set_dynlock_lock_callback -# define CRYPTO_set_dynlock_lock_callback CRYPTO_set_dynlock_lock_cb -# undef CRYPTO_get_dynlock_lock_callback -# define CRYPTO_get_dynlock_lock_callback CRYPTO_get_dynlock_lock_cb -# undef CRYPTO_get_dynlock_destroy_callback -# define CRYPTO_get_dynlock_destroy_callback CRYPTO_get_dynlock_destroy_cb -# undef CRYPTO_get_dynlock_create_callback -# define CRYPTO_get_dynlock_create_callback CRYPTO_get_dynlock_create_cb -# undef CRYPTO_set_locked_mem_ex_functions -# define CRYPTO_set_locked_mem_ex_functions CRYPTO_set_locked_mem_ex_funcs -# undef CRYPTO_get_locked_mem_ex_functions -# define CRYPTO_get_locked_mem_ex_functions CRYPTO_get_locked_mem_ex_funcs - -/* Hack some long SSL/TLS names */ -# undef SSL_CTX_set_default_verify_paths -# define SSL_CTX_set_default_verify_paths SSL_CTX_set_def_verify_paths -# undef SSL_get_ex_data_X509_STORE_CTX_idx -# define SSL_get_ex_data_X509_STORE_CTX_idx SSL_get_ex_d_X509_STORE_CTX_idx -# undef SSL_add_file_cert_subjects_to_stack -# define SSL_add_file_cert_subjects_to_stack SSL_add_file_cert_subjs_to_stk -# undef SSL_add_dir_cert_subjects_to_stack -# define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_subjs_to_stk -# undef SSL_CTX_use_certificate_chain_file -# define SSL_CTX_use_certificate_chain_file SSL_CTX_use_cert_chain_file -# undef SSL_CTX_set_cert_verify_callback -# define SSL_CTX_set_cert_verify_callback SSL_CTX_set_cert_verify_cb -# undef SSL_CTX_set_default_passwd_cb_userdata -# define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud -# undef SSL_COMP_get_compression_methods -# define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods -# undef SSL_COMP_set0_compression_methods -# define SSL_COMP_set0_compression_methods SSL_COMP_set0_compress_methods -# undef SSL_COMP_free_compression_methods -# define SSL_COMP_free_compression_methods SSL_COMP_free_compress_methods -# undef ssl_add_clienthello_renegotiate_ext -# define ssl_add_clienthello_renegotiate_ext ssl_add_clienthello_reneg_ext -# undef ssl_add_serverhello_renegotiate_ext -# define ssl_add_serverhello_renegotiate_ext ssl_add_serverhello_reneg_ext -# undef ssl_parse_clienthello_renegotiate_ext -# define ssl_parse_clienthello_renegotiate_ext ssl_parse_clienthello_reneg_ext -# undef ssl_parse_serverhello_renegotiate_ext -# define ssl_parse_serverhello_renegotiate_ext ssl_parse_serverhello_reneg_ext -# undef SSL_srp_server_param_with_username -# define SSL_srp_server_param_with_username SSL_srp_server_param_with_un -# undef SSL_CTX_set_srp_client_pwd_callback -# define SSL_CTX_set_srp_client_pwd_callback SSL_CTX_set_srp_client_pwd_cb -# undef SSL_CTX_set_srp_verify_param_callback -# define SSL_CTX_set_srp_verify_param_callback SSL_CTX_set_srp_vfy_param_cb -# undef SSL_CTX_set_srp_username_callback -# define SSL_CTX_set_srp_username_callback SSL_CTX_set_srp_un_cb -# undef ssl_add_clienthello_use_srtp_ext -# define ssl_add_clienthello_use_srtp_ext ssl_add_clihello_use_srtp_ext -# undef ssl_add_serverhello_use_srtp_ext -# define ssl_add_serverhello_use_srtp_ext ssl_add_serhello_use_srtp_ext -# undef ssl_parse_clienthello_use_srtp_ext -# define ssl_parse_clienthello_use_srtp_ext ssl_parse_clihello_use_srtp_ext -# undef ssl_parse_serverhello_use_srtp_ext -# define ssl_parse_serverhello_use_srtp_ext ssl_parse_serhello_use_srtp_ext -# undef SSL_CTX_set_next_protos_advertised_cb -# define SSL_CTX_set_next_protos_advertised_cb SSL_CTX_set_next_protos_adv_cb -# undef SSL_CTX_set_next_proto_select_cb -# define SSL_CTX_set_next_proto_select_cb SSL_CTX_set_next_proto_sel_cb - -# undef tls1_send_server_supplemental_data -# define tls1_send_server_supplemental_data tls1_send_server_suppl_data -# undef tls1_send_client_supplemental_data -# define tls1_send_client_supplemental_data tls1_send_client_suppl_data -# undef tls1_get_server_supplemental_data -# define tls1_get_server_supplemental_data tls1_get_server_suppl_data -# undef tls1_get_client_supplemental_data -# define tls1_get_client_supplemental_data tls1_get_client_suppl_data - -# undef ssl3_cbc_record_digest_supported -# define ssl3_cbc_record_digest_supported ssl3_cbc_record_digest_support -# undef ssl_check_clienthello_tlsext_late -# define ssl_check_clienthello_tlsext_late ssl_check_clihello_tlsext_late -# undef ssl_check_clienthello_tlsext_early -# define ssl_check_clienthello_tlsext_early ssl_check_clihello_tlsext_early - -/* Hack some RSA long names */ -# undef RSA_padding_check_PKCS1_OAEP_mgf1 -# define RSA_padding_check_PKCS1_OAEP_mgf1 RSA_pad_check_PKCS1_OAEP_mgf1 - -/* Hack some ENGINE long names */ -# undef ENGINE_get_default_BN_mod_exp_crt -# define ENGINE_get_default_BN_mod_exp_crt ENGINE_get_def_BN_mod_exp_crt -# undef ENGINE_set_default_BN_mod_exp_crt -# define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_BN_mod_exp_crt -# undef ENGINE_set_load_privkey_function -# define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn -# undef ENGINE_get_load_privkey_function -# define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn -# undef ENGINE_unregister_pkey_asn1_meths -# define ENGINE_unregister_pkey_asn1_meths ENGINE_unreg_pkey_asn1_meths -# undef ENGINE_register_all_pkey_asn1_meths -# define ENGINE_register_all_pkey_asn1_meths ENGINE_reg_all_pkey_asn1_meths -# undef ENGINE_set_default_pkey_asn1_meths -# define ENGINE_set_default_pkey_asn1_meths ENGINE_set_def_pkey_asn1_meths -# undef ENGINE_get_pkey_asn1_meth_engine -# define ENGINE_get_pkey_asn1_meth_engine ENGINE_get_pkey_asn1_meth_eng -# undef ENGINE_set_load_ssl_client_cert_function -# define ENGINE_set_load_ssl_client_cert_function \ - ENGINE_set_ld_ssl_clnt_cert_fn -# undef ENGINE_get_ssl_client_cert_function -# define ENGINE_get_ssl_client_cert_function ENGINE_get_ssl_client_cert_fn - -/* Hack some long OCSP names */ -# undef OCSP_REQUEST_get_ext_by_critical -# define OCSP_REQUEST_get_ext_by_critical OCSP_REQUEST_get_ext_by_crit -# undef OCSP_BASICRESP_get_ext_by_critical -# define OCSP_BASICRESP_get_ext_by_critical OCSP_BASICRESP_get_ext_by_crit -# undef OCSP_SINGLERESP_get_ext_by_critical -# define OCSP_SINGLERESP_get_ext_by_critical OCSP_SINGLERESP_get_ext_by_crit - -/* Hack some long DES names */ -# undef _ossl_old_des_ede3_cfb64_encrypt -# define _ossl_old_des_ede3_cfb64_encrypt _ossl_odes_ede3_cfb64_encrypt -# undef _ossl_old_des_ede3_ofb64_encrypt -# define _ossl_old_des_ede3_ofb64_encrypt _ossl_odes_ede3_ofb64_encrypt - -/* Hack some long EVP names */ -# undef OPENSSL_add_all_algorithms_noconf -# define OPENSSL_add_all_algorithms_noconf OPENSSL_add_all_algo_noconf -# undef OPENSSL_add_all_algorithms_conf -# define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf -# undef EVP_PKEY_meth_set_verify_recover -# define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover - -/* Hack some long EC names */ -# undef EC_GROUP_set_point_conversion_form -# define EC_GROUP_set_point_conversion_form EC_GROUP_set_point_conv_form -# undef EC_GROUP_get_point_conversion_form -# define EC_GROUP_get_point_conversion_form EC_GROUP_get_point_conv_form -# undef EC_GROUP_clear_free_all_extra_data -# define EC_GROUP_clear_free_all_extra_data EC_GROUP_clr_free_all_xtra_data -# undef EC_KEY_set_public_key_affine_coordinates -# define EC_KEY_set_public_key_affine_coordinates \ - EC_KEY_set_pub_key_aff_coords -# undef EC_POINT_set_Jprojective_coordinates_GFp -# define EC_POINT_set_Jprojective_coordinates_GFp \ - EC_POINT_set_Jproj_coords_GFp -# undef EC_POINT_get_Jprojective_coordinates_GFp -# define EC_POINT_get_Jprojective_coordinates_GFp \ - EC_POINT_get_Jproj_coords_GFp -# undef EC_POINT_set_affine_coordinates_GFp -# define EC_POINT_set_affine_coordinates_GFp EC_POINT_set_affine_coords_GFp -# undef EC_POINT_get_affine_coordinates_GFp -# define EC_POINT_get_affine_coordinates_GFp EC_POINT_get_affine_coords_GFp -# undef EC_POINT_set_compressed_coordinates_GFp -# define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp -# undef EC_POINT_set_affine_coordinates_GF2m -# define EC_POINT_set_affine_coordinates_GF2m EC_POINT_set_affine_coords_GF2m -# undef EC_POINT_get_affine_coordinates_GF2m -# define EC_POINT_get_affine_coordinates_GF2m EC_POINT_get_affine_coords_GF2m -# undef EC_POINT_set_compressed_coordinates_GF2m -# define EC_POINT_set_compressed_coordinates_GF2m \ - EC_POINT_set_compr_coords_GF2m -# undef ec_GF2m_simple_group_clear_finish -# define ec_GF2m_simple_group_clear_finish ec_GF2m_simple_grp_clr_finish -# undef ec_GF2m_simple_group_check_discriminant -# define ec_GF2m_simple_group_check_discriminant ec_GF2m_simple_grp_chk_discrim -# undef ec_GF2m_simple_point_clear_finish -# define ec_GF2m_simple_point_clear_finish ec_GF2m_simple_pt_clr_finish -# undef ec_GF2m_simple_point_set_to_infinity -# define ec_GF2m_simple_point_set_to_infinity ec_GF2m_simple_pt_set_to_inf -# undef ec_GF2m_simple_points_make_affine -# define ec_GF2m_simple_points_make_affine ec_GF2m_simple_pts_make_affine -# undef ec_GF2m_simple_point_set_affine_coordinates -# define ec_GF2m_simple_point_set_affine_coordinates \ - ec_GF2m_smp_pt_set_af_coords -# undef ec_GF2m_simple_point_get_affine_coordinates -# define ec_GF2m_simple_point_get_affine_coordinates \ - ec_GF2m_smp_pt_get_af_coords -# undef ec_GF2m_simple_set_compressed_coordinates -# define ec_GF2m_simple_set_compressed_coordinates \ - ec_GF2m_smp_set_compr_coords -# undef ec_GFp_simple_group_set_curve_GFp -# define ec_GFp_simple_group_set_curve_GFp ec_GFp_simple_grp_set_curve_GFp -# undef ec_GFp_simple_group_get_curve_GFp -# define ec_GFp_simple_group_get_curve_GFp ec_GFp_simple_grp_get_curve_GFp -# undef ec_GFp_simple_group_clear_finish -# define ec_GFp_simple_group_clear_finish ec_GFp_simple_grp_clear_finish -# undef ec_GFp_simple_group_set_generator -# define ec_GFp_simple_group_set_generator ec_GFp_simple_grp_set_generator -# undef ec_GFp_simple_group_get0_generator -# define ec_GFp_simple_group_get0_generator ec_GFp_simple_grp_gt0_generator -# undef ec_GFp_simple_group_get_cofactor -# define ec_GFp_simple_group_get_cofactor ec_GFp_simple_grp_get_cofactor -# undef ec_GFp_simple_point_clear_finish -# define ec_GFp_simple_point_clear_finish ec_GFp_simple_pt_clear_finish -# undef ec_GFp_simple_point_set_to_infinity -# define ec_GFp_simple_point_set_to_infinity ec_GFp_simple_pt_set_to_inf -# undef ec_GFp_simple_points_make_affine -# define ec_GFp_simple_points_make_affine ec_GFp_simple_pts_make_affine -# undef ec_GFp_simple_set_Jprojective_coordinates_GFp -# define ec_GFp_simple_set_Jprojective_coordinates_GFp \ - ec_GFp_smp_set_Jproj_coords_GFp -# undef ec_GFp_simple_get_Jprojective_coordinates_GFp -# define ec_GFp_simple_get_Jprojective_coordinates_GFp \ - ec_GFp_smp_get_Jproj_coords_GFp -# undef ec_GFp_simple_point_set_affine_coordinates_GFp -# define ec_GFp_simple_point_set_affine_coordinates_GFp \ - ec_GFp_smp_pt_set_af_coords_GFp -# undef ec_GFp_simple_point_get_affine_coordinates_GFp -# define ec_GFp_simple_point_get_affine_coordinates_GFp \ - ec_GFp_smp_pt_get_af_coords_GFp -# undef ec_GFp_simple_set_compressed_coordinates_GFp -# define ec_GFp_simple_set_compressed_coordinates_GFp \ - ec_GFp_smp_set_compr_coords_GFp -# undef ec_GFp_simple_point_set_affine_coordinates -# define ec_GFp_simple_point_set_affine_coordinates \ - ec_GFp_smp_pt_set_af_coords -# undef ec_GFp_simple_point_get_affine_coordinates -# define ec_GFp_simple_point_get_affine_coordinates \ - ec_GFp_smp_pt_get_af_coords -# undef ec_GFp_simple_set_compressed_coordinates -# define ec_GFp_simple_set_compressed_coordinates \ - ec_GFp_smp_set_compr_coords -# undef ec_GFp_simple_group_check_discriminant -# define ec_GFp_simple_group_check_discriminant ec_GFp_simple_grp_chk_discrim - -/* Hack som long STORE names */ -# undef STORE_method_set_initialise_function -# define STORE_method_set_initialise_function STORE_meth_set_initialise_fn -# undef STORE_method_set_cleanup_function -# define STORE_method_set_cleanup_function STORE_meth_set_cleanup_fn -# undef STORE_method_set_generate_function -# define STORE_method_set_generate_function STORE_meth_set_generate_fn -# undef STORE_method_set_modify_function -# define STORE_method_set_modify_function STORE_meth_set_modify_fn -# undef STORE_method_set_revoke_function -# define STORE_method_set_revoke_function STORE_meth_set_revoke_fn -# undef STORE_method_set_delete_function -# define STORE_method_set_delete_function STORE_meth_set_delete_fn -# undef STORE_method_set_list_start_function -# define STORE_method_set_list_start_function STORE_meth_set_list_start_fn -# undef STORE_method_set_list_next_function -# define STORE_method_set_list_next_function STORE_meth_set_list_next_fn -# undef STORE_method_set_list_end_function -# define STORE_method_set_list_end_function STORE_meth_set_list_end_fn -# undef STORE_method_set_update_store_function -# define STORE_method_set_update_store_function STORE_meth_set_update_store_fn -# undef STORE_method_set_lock_store_function -# define STORE_method_set_lock_store_function STORE_meth_set_lock_store_fn -# undef STORE_method_set_unlock_store_function -# define STORE_method_set_unlock_store_function STORE_meth_set_unlock_store_fn -# undef STORE_method_get_initialise_function -# define STORE_method_get_initialise_function STORE_meth_get_initialise_fn -# undef STORE_method_get_cleanup_function -# define STORE_method_get_cleanup_function STORE_meth_get_cleanup_fn -# undef STORE_method_get_generate_function -# define STORE_method_get_generate_function STORE_meth_get_generate_fn -# undef STORE_method_get_modify_function -# define STORE_method_get_modify_function STORE_meth_get_modify_fn -# undef STORE_method_get_revoke_function -# define STORE_method_get_revoke_function STORE_meth_get_revoke_fn -# undef STORE_method_get_delete_function -# define STORE_method_get_delete_function STORE_meth_get_delete_fn -# undef STORE_method_get_list_start_function -# define STORE_method_get_list_start_function STORE_meth_get_list_start_fn -# undef STORE_method_get_list_next_function -# define STORE_method_get_list_next_function STORE_meth_get_list_next_fn -# undef STORE_method_get_list_end_function -# define STORE_method_get_list_end_function STORE_meth_get_list_end_fn -# undef STORE_method_get_update_store_function -# define STORE_method_get_update_store_function STORE_meth_get_update_store_fn -# undef STORE_method_get_lock_store_function -# define STORE_method_get_lock_store_function STORE_meth_get_lock_store_fn -# undef STORE_method_get_unlock_store_function -# define STORE_method_get_unlock_store_function STORE_meth_get_unlock_store_fn - -/* Hack some long TS names */ -# undef TS_RESP_CTX_set_status_info_cond -# define TS_RESP_CTX_set_status_info_cond TS_RESP_CTX_set_stat_info_cond -# undef TS_RESP_CTX_set_clock_precision_digits -# define TS_RESP_CTX_set_clock_precision_digits TS_RESP_CTX_set_clk_prec_digits -# undef TS_CONF_set_clock_precision_digits -# define TS_CONF_set_clock_precision_digits TS_CONF_set_clk_prec_digits - -/* Hack some long CMS names */ -# undef CMS_RecipientInfo_ktri_get0_algs -# define CMS_RecipientInfo_ktri_get0_algs CMS_RecipInfo_ktri_get0_algs -# undef CMS_RecipientInfo_ktri_get0_signer_id -# define CMS_RecipientInfo_ktri_get0_signer_id CMS_RecipInfo_ktri_get0_sigr_id -# undef CMS_OtherRevocationInfoFormat_it -# define CMS_OtherRevocationInfoFormat_it CMS_OtherRevocInfoFormat_it -# undef CMS_KeyAgreeRecipientIdentifier_it -# define CMS_KeyAgreeRecipientIdentifier_it CMS_KeyAgreeRecipIdentifier_it -# undef CMS_OriginatorIdentifierOrKey_it -# define CMS_OriginatorIdentifierOrKey_it CMS_OriginatorIdOrKey_it -# undef cms_SignerIdentifier_get0_signer_id -# define cms_SignerIdentifier_get0_signer_id cms_SignerId_get0_signer_id -# undef CMS_RecipientInfo_kari_get0_orig_id -# define CMS_RecipientInfo_kari_get0_orig_id CMS_RecipInfo_kari_get0_orig_id -# undef CMS_RecipientInfo_kari_get0_reks -# define CMS_RecipientInfo_kari_get0_reks CMS_RecipInfo_kari_get0_reks -# undef CMS_RecipientEncryptedKey_cert_cmp -# define CMS_RecipientEncryptedKey_cert_cmp CMS_RecipEncryptedKey_cert_cmp -# undef CMS_RecipientInfo_kari_set0_pkey -# define CMS_RecipientInfo_kari_set0_pkey CMS_RecipInfo_kari_set0_pkey -# undef CMS_RecipientEncryptedKey_get0_id -# define CMS_RecipientEncryptedKey_get0_id CMS_RecipEncryptedKey_get0_id -# undef CMS_RecipientInfo_kari_orig_id_cmp -# define CMS_RecipientInfo_kari_orig_id_cmp CMS_RecipInfo_kari_orig_id_cmp - -/* Hack some long DTLS1 names */ -# undef dtls1_retransmit_buffered_messages -# define dtls1_retransmit_buffered_messages dtls1_retransmit_buffered_msgs - -/* Hack some long SRP names */ -# undef SRP_generate_server_master_secret -# define SRP_generate_server_master_secret SRP_gen_server_master_secret -# undef SRP_generate_client_master_secret -# define SRP_generate_client_master_secret SRP_gen_client_master_secret - -/* Hack some long UI names */ -# undef UI_method_get_prompt_constructor -# define UI_method_get_prompt_constructor UI_method_get_prompt_constructr -# undef UI_method_set_prompt_constructor -# define UI_method_set_prompt_constructor UI_method_set_prompt_constructr - -# endif /* defined OPENSSL_SYS_VMS */ - -/* Case insensitive linking causes problems.... */ -# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2) -# undef ERR_load_CRYPTO_strings -# define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings -# undef OCSP_crlID_new -# define OCSP_crlID_new OCSP_crlID2_new - -# undef d2i_ECPARAMETERS -# define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS -# undef i2d_ECPARAMETERS -# define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS -# undef d2i_ECPKPARAMETERS -# define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS -# undef i2d_ECPKPARAMETERS -# define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS - -/* - * These functions do not seem to exist! However, I'm paranoid... Original - * command in x509v3.h: These functions are being redefined in another - * directory, and clash when the linker is case-insensitive, so let's hide - * them a little, by giving them an extra 'o' at the beginning of the name... - */ -# undef X509v3_cleanup_extensions -# define X509v3_cleanup_extensions oX509v3_cleanup_extensions -# undef X509v3_add_extension -# define X509v3_add_extension oX509v3_add_extension -# undef X509v3_add_netscape_extensions -# define X509v3_add_netscape_extensions oX509v3_add_netscape_extensions -# undef X509v3_add_standard_extensions -# define X509v3_add_standard_extensions oX509v3_add_standard_extensions - -/* This one clashes with CMS_data_create */ -# undef cms_Data_create -# define cms_Data_create priv_cms_Data_create - -# endif - -#endif /* ! defined HEADER_VMS_IDHACKS_H */ +/* + * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_SYMHACKS_H +# define HEADER_SYMHACKS_H + +# include + +/* Case insensitive linking causes problems.... */ +# if defined(OPENSSL_SYS_VMS) +# undef ERR_load_CRYPTO_strings +# define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings +# undef OCSP_crlID_new +# define OCSP_crlID_new OCSP_crlID2_new + +# undef d2i_ECPARAMETERS +# define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS +# undef i2d_ECPARAMETERS +# define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS +# undef d2i_ECPKPARAMETERS +# define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS +# undef i2d_ECPKPARAMETERS +# define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS + +/* This one clashes with CMS_data_create */ +# undef cms_Data_create +# define cms_Data_create priv_cms_Data_create + +# endif + +#endif /* ! defined HEADER_VMS_IDHACKS_H */ diff --git a/src/Mayaqua/win32_inc/openssl/tls1.h b/src/Mayaqua/win32_inc/openssl/tls1.h index a1121f57..76d9fda4 100644 --- a/src/Mayaqua/win32_inc/openssl/tls1.h +++ b/src/Mayaqua/win32_inc/openssl/tls1.h @@ -1,810 +1,1237 @@ -/* ssl/tls1.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * - * Portions of the attached software ("Contribution") are developed by - * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. - * - * The Contribution is licensed pursuant to the OpenSSL open source - * license provided above. - * - * ECC cipher suite support in OpenSSL originally written by - * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. - * - */ -/* ==================================================================== - * Copyright 2005 Nokia. All rights reserved. - * - * The portions of the attached software ("Contribution") is developed by - * Nokia Corporation and is licensed pursuant to the OpenSSL open source - * license. - * - * The Contribution, originally written by Mika Kousa and Pasi Eronen of - * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites - * support (see RFC 4279) to OpenSSL. - * - * No patent licenses or other rights except those expressly stated in - * the OpenSSL open source license shall be deemed granted or received - * expressly, by implication, estoppel, or otherwise. - * - * No assurances are provided by Nokia that the Contribution does not - * infringe the patent or other intellectual property rights of any third - * party or that the license provides you with all the necessary rights - * to make use of the Contribution. - * - * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN - * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA - * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY - * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR - * OTHERWISE. - */ - -#ifndef HEADER_TLS1_H -# define HEADER_TLS1_H - -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 0 - -# define TLS1_VERSION 0x0301 -# define TLS1_1_VERSION 0x0302 -# define TLS1_2_VERSION 0x0303 -# define TLS_MAX_VERSION TLS1_2_VERSION - -# define TLS1_VERSION_MAJOR 0x03 -# define TLS1_VERSION_MINOR 0x01 - -# define TLS1_1_VERSION_MAJOR 0x03 -# define TLS1_1_VERSION_MINOR 0x02 - -# define TLS1_2_VERSION_MAJOR 0x03 -# define TLS1_2_VERSION_MINOR 0x03 - -# define TLS1_get_version(s) \ - ((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0) - -# define TLS1_get_client_version(s) \ - ((s->client_version >> 8) == TLS1_VERSION_MAJOR ? s->client_version : 0) - -# define TLS1_AD_DECRYPTION_FAILED 21 -# define TLS1_AD_RECORD_OVERFLOW 22 -# define TLS1_AD_UNKNOWN_CA 48/* fatal */ -# define TLS1_AD_ACCESS_DENIED 49/* fatal */ -# define TLS1_AD_DECODE_ERROR 50/* fatal */ -# define TLS1_AD_DECRYPT_ERROR 51 -# define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */ -# define TLS1_AD_PROTOCOL_VERSION 70/* fatal */ -# define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */ -# define TLS1_AD_INTERNAL_ERROR 80/* fatal */ -# define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */ -# define TLS1_AD_USER_CANCELLED 90 -# define TLS1_AD_NO_RENEGOTIATION 100 -/* codes 110-114 are from RFC3546 */ -# define TLS1_AD_UNSUPPORTED_EXTENSION 110 -# define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111 -# define TLS1_AD_UNRECOGNIZED_NAME 112 -# define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113 -# define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 -# define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */ - -/* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */ -# define TLSEXT_TYPE_server_name 0 -# define TLSEXT_TYPE_max_fragment_length 1 -# define TLSEXT_TYPE_client_certificate_url 2 -# define TLSEXT_TYPE_trusted_ca_keys 3 -# define TLSEXT_TYPE_truncated_hmac 4 -# define TLSEXT_TYPE_status_request 5 -/* ExtensionType values from RFC4681 */ -# define TLSEXT_TYPE_user_mapping 6 -/* ExtensionType values from RFC5878 */ -# define TLSEXT_TYPE_client_authz 7 -# define TLSEXT_TYPE_server_authz 8 -/* ExtensionType values from RFC6091 */ -# define TLSEXT_TYPE_cert_type 9 - -/* ExtensionType values from RFC4492 */ -# define TLSEXT_TYPE_elliptic_curves 10 -# define TLSEXT_TYPE_ec_point_formats 11 - -/* ExtensionType value from RFC5054 */ -# define TLSEXT_TYPE_srp 12 - -/* ExtensionType values from RFC5246 */ -# define TLSEXT_TYPE_signature_algorithms 13 - -/* ExtensionType value from RFC5764 */ -# define TLSEXT_TYPE_use_srtp 14 - -/* ExtensionType value from RFC5620 */ -# define TLSEXT_TYPE_heartbeat 15 - -/* ExtensionType value from RFC7301 */ -# define TLSEXT_TYPE_application_layer_protocol_negotiation 16 - -/* - * ExtensionType value for TLS padding extension. - * http://tools.ietf.org/html/draft-agl-tls-padding - */ -# define TLSEXT_TYPE_padding 21 - -/* ExtensionType value from RFC4507 */ -# define TLSEXT_TYPE_session_ticket 35 - -/* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */ -# if 0 -/* - * will have to be provided externally for now , - * i.e. build with -DTLSEXT_TYPE_opaque_prf_input=38183 - * using whatever extension number you'd like to try - */ -# define TLSEXT_TYPE_opaque_prf_input ?? -# endif - -/* Temporary extension type */ -# define TLSEXT_TYPE_renegotiate 0xff01 - -# ifndef OPENSSL_NO_NEXTPROTONEG -/* This is not an IANA defined extension number */ -# define TLSEXT_TYPE_next_proto_neg 13172 -# endif - -/* NameType value from RFC3546 */ -# define TLSEXT_NAMETYPE_host_name 0 -/* status request value from RFC3546 */ -# define TLSEXT_STATUSTYPE_ocsp 1 - -/* ECPointFormat values from RFC4492 */ -# define TLSEXT_ECPOINTFORMAT_first 0 -# define TLSEXT_ECPOINTFORMAT_uncompressed 0 -# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1 -# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2 -# define TLSEXT_ECPOINTFORMAT_last 2 - -/* Signature and hash algorithms from RFC5246 */ -# define TLSEXT_signature_anonymous 0 -# define TLSEXT_signature_rsa 1 -# define TLSEXT_signature_dsa 2 -# define TLSEXT_signature_ecdsa 3 - -/* Total number of different signature algorithms */ -# define TLSEXT_signature_num 4 - -# define TLSEXT_hash_none 0 -# define TLSEXT_hash_md5 1 -# define TLSEXT_hash_sha1 2 -# define TLSEXT_hash_sha224 3 -# define TLSEXT_hash_sha256 4 -# define TLSEXT_hash_sha384 5 -# define TLSEXT_hash_sha512 6 - -/* Total number of different digest algorithms */ - -# define TLSEXT_hash_num 7 - -/* Flag set for unrecognised algorithms */ -# define TLSEXT_nid_unknown 0x1000000 - -/* ECC curves */ - -# define TLSEXT_curve_P_256 23 -# define TLSEXT_curve_P_384 24 - -# ifndef OPENSSL_NO_TLSEXT - -# define TLSEXT_MAXLEN_host_name 255 - -const char *SSL_get_servername(const SSL *s, const int type); -int SSL_get_servername_type(const SSL *s); -/* - * SSL_export_keying_material exports a value derived from the master secret, - * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and - * optional context. (Since a zero length context is allowed, the |use_context| - * flag controls whether a context is included.) It returns 1 on success and - * zero otherwise. - */ -int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, - const char *label, size_t llen, - const unsigned char *p, size_t plen, - int use_context); - -int SSL_get_sigalgs(SSL *s, int idx, - int *psign, int *phash, int *psignandhash, - unsigned char *rsig, unsigned char *rhash); - -int SSL_get_shared_sigalgs(SSL *s, int idx, - int *psign, int *phash, int *psignandhash, - unsigned char *rsig, unsigned char *rhash); - -int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain); - -# define SSL_set_tlsext_host_name(s,name) \ -SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name) - -# define SSL_set_tlsext_debug_callback(ssl, cb) \ -SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb) - -# define SSL_set_tlsext_debug_arg(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg) - -# define SSL_set_tlsext_status_type(ssl, type) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL) - -# define SSL_get_tlsext_status_exts(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg) - -# define SSL_set_tlsext_status_exts(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg) - -# define SSL_get_tlsext_status_ids(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg) - -# define SSL_set_tlsext_status_ids(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg) - -# define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg) - -# define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \ -SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg) - -# define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \ -SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb) - -# define SSL_TLSEXT_ERR_OK 0 -# define SSL_TLSEXT_ERR_ALERT_WARNING 1 -# define SSL_TLSEXT_ERR_ALERT_FATAL 2 -# define SSL_TLSEXT_ERR_NOACK 3 - -# define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \ -SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg) - -# define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys)) -# define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ - SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys)) - -# define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ -SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb) - -# define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ -SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) - -# define SSL_set_tlsext_opaque_prf_input(s, src, len) \ -SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src) -# define SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) \ -SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, (void (*)(void))cb) -# define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) \ -SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg) - -# define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ -SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) - -# ifndef OPENSSL_NO_HEARTBEATS -# define SSL_TLSEXT_HB_ENABLED 0x01 -# define SSL_TLSEXT_HB_DONT_SEND_REQUESTS 0x02 -# define SSL_TLSEXT_HB_DONT_RECV_REQUESTS 0x04 - -# define SSL_get_tlsext_heartbeat_pending(ssl) \ - SSL_ctrl((ssl),SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING,0,NULL) -# define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \ - SSL_ctrl((ssl),SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL) -# endif -# endif - -/* PSK ciphersuites from 4279 */ -# define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A -# define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B -# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C -# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D - -/* - * Additional TLS ciphersuites from expired Internet Draft - * draft-ietf-tls-56-bit-ciphersuites-01.txt (available if - * TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see s3_lib.c). We - * actually treat them like SSL 3.0 ciphers, which we probably shouldn't. - * Note that the first two are actually not in the IDs. - */ -# define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060/* not in - * ID */ -# define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061/* not in - * ID */ -# define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 -# define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 -# define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 -# define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 -# define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 - -/* AES ciphersuites from RFC3268 */ -# define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F -# define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030 -# define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031 -# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032 -# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033 -# define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034 - -# define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035 -# define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036 -# define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037 -# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038 -# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039 -# define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A - -/* TLS v1.2 ciphersuites */ -# define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B -# define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C -# define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D -# define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E -# define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F -# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040 - -/* Camellia ciphersuites from RFC4132 */ -# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041 -# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042 -# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043 -# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044 -# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045 -# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046 - -/* TLS v1.2 ciphersuites */ -# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067 -# define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068 -# define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069 -# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A -# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B -# define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C -# define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D - -/* Camellia ciphersuites from RFC4132 */ -# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084 -# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085 -# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086 -# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087 -# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088 -# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089 - -/* SEED ciphersuites from RFC4162 */ -# define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096 -# define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097 -# define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098 -# define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099 -# define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A -# define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B - -/* TLS v1.2 GCM ciphersuites from RFC5288 */ -# define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C -# define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D -# define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E -# define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F -# define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0 -# define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1 -# define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2 -# define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3 -# define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4 -# define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5 -# define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6 -# define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7 - -/* - * ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in - * draft 13 - */ -# define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001 -# define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002 -# define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003 -# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004 -# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005 - -# define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006 -# define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007 -# define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008 -# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009 -# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A - -# define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B -# define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C -# define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D -# define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E -# define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F - -# define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010 -# define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011 -# define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012 -# define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013 -# define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014 - -# define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015 -# define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016 -# define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017 -# define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018 -# define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019 - -/* SRP ciphersuites from RFC 5054 */ -# define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A -# define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B -# define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C -# define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D -# define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E -# define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F -# define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020 -# define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021 -# define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022 - -/* ECDH HMAC based ciphersuites from RFC5289 */ - -# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023 -# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024 -# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025 -# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026 -# define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027 -# define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028 -# define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029 -# define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A - -/* ECDH GCM based ciphersuites from RFC5289 */ -# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B -# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C -# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D -# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E -# define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F -# define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030 -# define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031 -# define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032 - -/* - * XXX * Backward compatibility alert: + * Older versions of OpenSSL gave - * some DHE ciphers names with "EDH" + * instead of "DHE". Going forward, we - * should be using DHE + * everywhere, though we may indefinitely maintain - * aliases for users + * or configurations that used "EDH" + - */ -# define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" -# define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" -# define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" -# define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DHE-DSS-DES-CBC-SHA" -# define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA" -# define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA" -# define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA" - -/* AES ciphersuites from RFC3268 */ -# define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA" -# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA" -# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA" -# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA" -# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA" -# define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA" - -# define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA" -# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA" -# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA" -# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA" -# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA" -# define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA" - -/* ECC ciphersuites from RFC4492 */ -# define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA" -# define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA" -# define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA" -# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA" -# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA" - -# define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA" -# define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA" -# define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA" -# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA" -# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA" - -# define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA" -# define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA" -# define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA" -# define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA" -# define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA" - -# define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA" -# define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA" -# define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA" -# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA" -# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA" - -# define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA" -# define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA" -# define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA" -# define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" -# define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" - -/* PSK ciphersuites from RFC 4279 */ -# define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA" -# define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA" -# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA" -# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA" - -/* SRP ciphersuite from RFC 5054 */ -# define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA" -# define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA" -# define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA" -# define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA" -# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA" -# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA" -# define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA" -# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA" -# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA" - -/* Camellia ciphersuites from RFC4132 */ -# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" -# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" -# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA" -# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA" -# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA" -# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA" - -# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA" -# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA" -# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA" -# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA" -# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA" -# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA" - -/* SEED ciphersuites from RFC4162 */ -# define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA" -# define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA" -# define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA" -# define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA" -# define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" -# define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" - -/* TLS v1.2 ciphersuites */ -# define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256" -# define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256" -# define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256" -# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256" -# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256" -# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256" -# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256" -# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256" -# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256" -# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256" -# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256" -# define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256" -# define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256" - -/* TLS v1.2 GCM ciphersuites from RFC5288 */ -# define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256" -# define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384" -# define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256" -# define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384" -# define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256" -# define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384" -# define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256" -# define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384" -# define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256" -# define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384" -# define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256" -# define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384" - -/* ECDH HMAC based ciphersuites from RFC5289 */ - -# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256" -# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384" -# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256" -# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384" -# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256" -# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384" -# define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256" -# define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384" - -/* ECDH GCM based ciphersuites from RFC5289 */ -# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256" -# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384" -# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256" -# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384" -# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256" -# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384" -# define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256" -# define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384" - -# define TLS_CT_RSA_SIGN 1 -# define TLS_CT_DSS_SIGN 2 -# define TLS_CT_RSA_FIXED_DH 3 -# define TLS_CT_DSS_FIXED_DH 4 -# define TLS_CT_ECDSA_SIGN 64 -# define TLS_CT_RSA_FIXED_ECDH 65 -# define TLS_CT_ECDSA_FIXED_ECDH 66 -# define TLS_CT_GOST94_SIGN 21 -# define TLS_CT_GOST01_SIGN 22 -/* - * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see - * comment there) - */ -# define TLS_CT_NUMBER 9 - -# define TLS1_FINISH_MAC_LENGTH 12 - -# define TLS_MD_MAX_CONST_SIZE 20 -# define TLS_MD_CLIENT_FINISH_CONST "client finished" -# define TLS_MD_CLIENT_FINISH_CONST_SIZE 15 -# define TLS_MD_SERVER_FINISH_CONST "server finished" -# define TLS_MD_SERVER_FINISH_CONST_SIZE 15 -# define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" -# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 -# define TLS_MD_KEY_EXPANSION_CONST "key expansion" -# define TLS_MD_KEY_EXPANSION_CONST_SIZE 13 -# define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key" -# define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16 -# define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" -# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 -# define TLS_MD_IV_BLOCK_CONST "IV block" -# define TLS_MD_IV_BLOCK_CONST_SIZE 8 -# define TLS_MD_MASTER_SECRET_CONST "master secret" -# define TLS_MD_MASTER_SECRET_CONST_SIZE 13 - -# ifdef CHARSET_EBCDIC -# undef TLS_MD_CLIENT_FINISH_CONST -/* - * client finished - */ -# define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" - -# undef TLS_MD_SERVER_FINISH_CONST -/* - * server finished - */ -# define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" - -# undef TLS_MD_SERVER_WRITE_KEY_CONST -/* - * server write key - */ -# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" - -# undef TLS_MD_KEY_EXPANSION_CONST -/* - * key expansion - */ -# define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" - -# undef TLS_MD_CLIENT_WRITE_KEY_CONST -/* - * client write key - */ -# define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" - -# undef TLS_MD_SERVER_WRITE_KEY_CONST -/* - * server write key - */ -# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" - -# undef TLS_MD_IV_BLOCK_CONST -/* - * IV block - */ -# define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" - -# undef TLS_MD_MASTER_SECRET_CONST -/* - * master secret - */ -# define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" -# endif - -/* TLS Session Ticket extension struct */ -struct tls_session_ticket_ext_st { - unsigned short length; - void *data; -}; - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * Copyright 2005 Nokia. All rights reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_TLS1_H +# define HEADER_TLS1_H + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Default security level if not overridden at config time */ +# ifndef OPENSSL_TLS_SECURITY_LEVEL +# define OPENSSL_TLS_SECURITY_LEVEL 1 +# endif + +# define TLS1_VERSION 0x0301 +# define TLS1_1_VERSION 0x0302 +# define TLS1_2_VERSION 0x0303 +# define TLS1_3_VERSION 0x0304 +# define TLS_MAX_VERSION TLS1_3_VERSION + +/* Special value for method supporting multiple versions */ +# define TLS_ANY_VERSION 0x10000 + +# define TLS1_VERSION_MAJOR 0x03 +# define TLS1_VERSION_MINOR 0x01 + +# define TLS1_1_VERSION_MAJOR 0x03 +# define TLS1_1_VERSION_MINOR 0x02 + +# define TLS1_2_VERSION_MAJOR 0x03 +# define TLS1_2_VERSION_MINOR 0x03 + +# define TLS1_get_version(s) \ + ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0) + +# define TLS1_get_client_version(s) \ + ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0) + +# define TLS1_AD_DECRYPTION_FAILED 21 +# define TLS1_AD_RECORD_OVERFLOW 22 +# define TLS1_AD_UNKNOWN_CA 48/* fatal */ +# define TLS1_AD_ACCESS_DENIED 49/* fatal */ +# define TLS1_AD_DECODE_ERROR 50/* fatal */ +# define TLS1_AD_DECRYPT_ERROR 51 +# define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */ +# define TLS1_AD_PROTOCOL_VERSION 70/* fatal */ +# define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */ +# define TLS1_AD_INTERNAL_ERROR 80/* fatal */ +# define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */ +# define TLS1_AD_USER_CANCELLED 90 +# define TLS1_AD_NO_RENEGOTIATION 100 +/* TLSv1.3 alerts */ +# define TLS13_AD_MISSING_EXTENSION 109 /* fatal */ +# define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */ +/* codes 110-114 are from RFC3546 */ +# define TLS1_AD_UNSUPPORTED_EXTENSION 110 +# define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111 +# define TLS1_AD_UNRECOGNIZED_NAME 112 +# define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113 +# define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 +# define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */ +# define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */ + +/* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */ +# define TLSEXT_TYPE_server_name 0 +# define TLSEXT_TYPE_max_fragment_length 1 +# define TLSEXT_TYPE_client_certificate_url 2 +# define TLSEXT_TYPE_trusted_ca_keys 3 +# define TLSEXT_TYPE_truncated_hmac 4 +# define TLSEXT_TYPE_status_request 5 +/* ExtensionType values from RFC4681 */ +# define TLSEXT_TYPE_user_mapping 6 +/* ExtensionType values from RFC5878 */ +# define TLSEXT_TYPE_client_authz 7 +# define TLSEXT_TYPE_server_authz 8 +/* ExtensionType values from RFC6091 */ +# define TLSEXT_TYPE_cert_type 9 + +/* ExtensionType values from RFC4492 */ +/* + * Prior to TLSv1.3 the supported_groups extension was known as + * elliptic_curves + */ +# define TLSEXT_TYPE_supported_groups 10 +# define TLSEXT_TYPE_elliptic_curves TLSEXT_TYPE_supported_groups +# define TLSEXT_TYPE_ec_point_formats 11 + + +/* ExtensionType value from RFC5054 */ +# define TLSEXT_TYPE_srp 12 + +/* ExtensionType values from RFC5246 */ +# define TLSEXT_TYPE_signature_algorithms 13 + +/* ExtensionType value from RFC5764 */ +# define TLSEXT_TYPE_use_srtp 14 + +/* ExtensionType value from RFC5620 */ +# define TLSEXT_TYPE_heartbeat 15 + +/* ExtensionType value from RFC7301 */ +# define TLSEXT_TYPE_application_layer_protocol_negotiation 16 + +/* + * Extension type for Certificate Transparency + * https://tools.ietf.org/html/rfc6962#section-3.3.1 + */ +# define TLSEXT_TYPE_signed_certificate_timestamp 18 + +/* + * ExtensionType value for TLS padding extension. + * http://tools.ietf.org/html/draft-agl-tls-padding + */ +# define TLSEXT_TYPE_padding 21 + +/* ExtensionType value from RFC7366 */ +# define TLSEXT_TYPE_encrypt_then_mac 22 + +/* ExtensionType value from RFC7627 */ +# define TLSEXT_TYPE_extended_master_secret 23 + +/* ExtensionType value from RFC4507 */ +# define TLSEXT_TYPE_session_ticket 35 + +/* As defined for TLS1.3 */ +# define TLSEXT_TYPE_psk 41 +# define TLSEXT_TYPE_early_data 42 +# define TLSEXT_TYPE_supported_versions 43 +# define TLSEXT_TYPE_cookie 44 +# define TLSEXT_TYPE_psk_kex_modes 45 +# define TLSEXT_TYPE_certificate_authorities 47 +# define TLSEXT_TYPE_post_handshake_auth 49 +# define TLSEXT_TYPE_signature_algorithms_cert 50 +# define TLSEXT_TYPE_key_share 51 + +/* Temporary extension type */ +# define TLSEXT_TYPE_renegotiate 0xff01 + +# ifndef OPENSSL_NO_NEXTPROTONEG +/* This is not an IANA defined extension number */ +# define TLSEXT_TYPE_next_proto_neg 13172 +# endif + +/* NameType value from RFC3546 */ +# define TLSEXT_NAMETYPE_host_name 0 +/* status request value from RFC3546 */ +# define TLSEXT_STATUSTYPE_ocsp 1 + +/* ECPointFormat values from RFC4492 */ +# define TLSEXT_ECPOINTFORMAT_first 0 +# define TLSEXT_ECPOINTFORMAT_uncompressed 0 +# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1 +# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2 +# define TLSEXT_ECPOINTFORMAT_last 2 + +/* Signature and hash algorithms from RFC5246 */ +# define TLSEXT_signature_anonymous 0 +# define TLSEXT_signature_rsa 1 +# define TLSEXT_signature_dsa 2 +# define TLSEXT_signature_ecdsa 3 +# define TLSEXT_signature_gostr34102001 237 +# define TLSEXT_signature_gostr34102012_256 238 +# define TLSEXT_signature_gostr34102012_512 239 + +/* Total number of different signature algorithms */ +# define TLSEXT_signature_num 7 + +# define TLSEXT_hash_none 0 +# define TLSEXT_hash_md5 1 +# define TLSEXT_hash_sha1 2 +# define TLSEXT_hash_sha224 3 +# define TLSEXT_hash_sha256 4 +# define TLSEXT_hash_sha384 5 +# define TLSEXT_hash_sha512 6 +# define TLSEXT_hash_gostr3411 237 +# define TLSEXT_hash_gostr34112012_256 238 +# define TLSEXT_hash_gostr34112012_512 239 + +/* Total number of different digest algorithms */ + +# define TLSEXT_hash_num 10 + +/* Flag set for unrecognised algorithms */ +# define TLSEXT_nid_unknown 0x1000000 + +/* ECC curves */ + +# define TLSEXT_curve_P_256 23 +# define TLSEXT_curve_P_384 24 + +/* OpenSSL value to disable maximum fragment length extension */ +# define TLSEXT_max_fragment_length_DISABLED 0 +/* Allowed values for max fragment length extension */ +# define TLSEXT_max_fragment_length_512 1 +# define TLSEXT_max_fragment_length_1024 2 +# define TLSEXT_max_fragment_length_2048 3 +# define TLSEXT_max_fragment_length_4096 4 + +int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode); +int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode); + +# define TLSEXT_MAXLEN_host_name 255 + +__owur const char *SSL_get_servername(const SSL *s, const int type); +__owur int SSL_get_servername_type(const SSL *s); +/* + * SSL_export_keying_material exports a value derived from the master secret, + * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and + * optional context. (Since a zero length context is allowed, the |use_context| + * flag controls whether a context is included.) It returns 1 on success and + * 0 or -1 otherwise. + */ +__owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, + const char *label, size_t llen, + const unsigned char *context, + size_t contextlen, int use_context); + +/* + * SSL_export_keying_material_early exports a value derived from the + * early exporter master secret, as specified in + * https://tools.ietf.org/html/draft-ietf-tls-tls13-23. It writes + * |olen| bytes to |out| given a label and optional context. It + * returns 1 on success and 0 otherwise. + */ +__owur int SSL_export_keying_material_early(SSL *s, unsigned char *out, + size_t olen, const char *label, + size_t llen, + const unsigned char *context, + size_t contextlen); + +int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid); +int SSL_get_signature_type_nid(const SSL *s, int *pnid); + +int SSL_get_sigalgs(SSL *s, int idx, + int *psign, int *phash, int *psignandhash, + unsigned char *rsig, unsigned char *rhash); + +int SSL_get_shared_sigalgs(SSL *s, int idx, + int *psign, int *phash, int *psignandhash, + unsigned char *rsig, unsigned char *rhash); + +__owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain); + +# define SSL_set_tlsext_host_name(s,name) \ + SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,\ + (void *)name) + +# define SSL_set_tlsext_debug_callback(ssl, cb) \ + SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,\ + (void (*)(void))cb) + +# define SSL_set_tlsext_debug_arg(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0,arg) + +# define SSL_get_tlsext_status_type(ssl) \ + SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL) + +# define SSL_set_tlsext_status_type(ssl, type) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL) + +# define SSL_get_tlsext_status_exts(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0,arg) + +# define SSL_set_tlsext_status_exts(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0,arg) + +# define SSL_get_tlsext_status_ids(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0,arg) + +# define SSL_set_tlsext_status_ids(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0,arg) + +# define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0,arg) + +# define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen,arg) + +# define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \ + SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,\ + (void (*)(void))cb) + +# define SSL_TLSEXT_ERR_OK 0 +# define SSL_TLSEXT_ERR_ALERT_WARNING 1 +# define SSL_TLSEXT_ERR_ALERT_FATAL 2 +# define SSL_TLSEXT_ERR_NOACK 3 + +# define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0,arg) + +# define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_TICKET_KEYS,keylen,keys) +# define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_TICKET_KEYS,keylen,keys) + +# define SSL_CTX_get_tlsext_status_cb(ssl, cb) \ + SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0,(void *)cb) +# define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ + SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,\ + (void (*)(void))cb) + +# define SSL_CTX_get_tlsext_status_arg(ssl, arg) \ + SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG,0,arg) +# define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ + SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0,arg) + +# define SSL_CTX_set_tlsext_status_type(ssl, type) \ + SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL) + +# define SSL_CTX_get_tlsext_status_type(ssl) \ + SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL) + +# define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ + SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\ + (void (*)(void))cb) + +# ifndef OPENSSL_NO_HEARTBEATS +# define SSL_DTLSEXT_HB_ENABLED 0x01 +# define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS 0x02 +# define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS 0x04 +# define SSL_get_dtlsext_heartbeat_pending(ssl) \ + SSL_ctrl(ssl,SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING,0,NULL) +# define SSL_set_dtlsext_heartbeat_no_requests(ssl, arg) \ + SSL_ctrl(ssl,SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL) + +# if OPENSSL_API_COMPAT < 0x10100000L +# define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \ + SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT +# define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \ + SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING +# define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \ + SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS +# define SSL_TLSEXT_HB_ENABLED \ + SSL_DTLSEXT_HB_ENABLED +# define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \ + SSL_DTLSEXT_HB_DONT_SEND_REQUESTS +# define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \ + SSL_DTLSEXT_HB_DONT_RECV_REQUESTS +# define SSL_get_tlsext_heartbeat_pending(ssl) \ + SSL_get_dtlsext_heartbeat_pending(ssl) +# define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \ + SSL_set_dtlsext_heartbeat_no_requests(ssl,arg) +# endif +# endif + +/* PSK ciphersuites from 4279 */ +# define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A +# define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B +# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C +# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D +# define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA 0x0300008E +# define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008F +# define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA 0x03000090 +# define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA 0x03000091 +# define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA 0x03000092 +# define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x03000093 +# define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA 0x03000094 +# define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA 0x03000095 + +/* PSK ciphersuites from 5487 */ +# define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256 0x030000A8 +# define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384 0x030000A9 +# define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256 0x030000AA +# define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384 0x030000AB +# define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256 0x030000AC +# define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384 0x030000AD +# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256 0x030000AE +# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384 0x030000AF +# define TLS1_CK_PSK_WITH_NULL_SHA256 0x030000B0 +# define TLS1_CK_PSK_WITH_NULL_SHA384 0x030000B1 +# define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256 0x030000B2 +# define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384 0x030000B3 +# define TLS1_CK_DHE_PSK_WITH_NULL_SHA256 0x030000B4 +# define TLS1_CK_DHE_PSK_WITH_NULL_SHA384 0x030000B5 +# define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256 0x030000B6 +# define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384 0x030000B7 +# define TLS1_CK_RSA_PSK_WITH_NULL_SHA256 0x030000B8 +# define TLS1_CK_RSA_PSK_WITH_NULL_SHA384 0x030000B9 + +/* NULL PSK ciphersuites from RFC4785 */ +# define TLS1_CK_PSK_WITH_NULL_SHA 0x0300002C +# define TLS1_CK_DHE_PSK_WITH_NULL_SHA 0x0300002D +# define TLS1_CK_RSA_PSK_WITH_NULL_SHA 0x0300002E + +/* AES ciphersuites from RFC3268 */ +# define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F +# define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030 +# define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031 +# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032 +# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033 +# define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034 +# define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035 +# define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036 +# define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037 +# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038 +# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039 +# define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A + +/* TLS v1.2 ciphersuites */ +# define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B +# define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C +# define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D +# define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E +# define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F +# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040 + +/* Camellia ciphersuites from RFC4132 */ +# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041 +# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042 +# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043 +# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044 +# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045 +# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046 + +/* TLS v1.2 ciphersuites */ +# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067 +# define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068 +# define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069 +# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A +# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B +# define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C +# define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D + +/* Camellia ciphersuites from RFC4132 */ +# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084 +# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085 +# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086 +# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087 +# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088 +# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089 + +/* SEED ciphersuites from RFC4162 */ +# define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096 +# define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097 +# define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098 +# define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099 +# define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A +# define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B + +/* TLS v1.2 GCM ciphersuites from RFC5288 */ +# define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C +# define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D +# define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E +# define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F +# define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0 +# define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1 +# define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2 +# define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3 +# define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4 +# define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5 +# define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6 +# define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7 + +/* CCM ciphersuites from RFC6655 */ +# define TLS1_CK_RSA_WITH_AES_128_CCM 0x0300C09C +# define TLS1_CK_RSA_WITH_AES_256_CCM 0x0300C09D +# define TLS1_CK_DHE_RSA_WITH_AES_128_CCM 0x0300C09E +# define TLS1_CK_DHE_RSA_WITH_AES_256_CCM 0x0300C09F +# define TLS1_CK_RSA_WITH_AES_128_CCM_8 0x0300C0A0 +# define TLS1_CK_RSA_WITH_AES_256_CCM_8 0x0300C0A1 +# define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8 0x0300C0A2 +# define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8 0x0300C0A3 +# define TLS1_CK_PSK_WITH_AES_128_CCM 0x0300C0A4 +# define TLS1_CK_PSK_WITH_AES_256_CCM 0x0300C0A5 +# define TLS1_CK_DHE_PSK_WITH_AES_128_CCM 0x0300C0A6 +# define TLS1_CK_DHE_PSK_WITH_AES_256_CCM 0x0300C0A7 +# define TLS1_CK_PSK_WITH_AES_128_CCM_8 0x0300C0A8 +# define TLS1_CK_PSK_WITH_AES_256_CCM_8 0x0300C0A9 +# define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8 0x0300C0AA +# define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8 0x0300C0AB + +/* CCM ciphersuites from RFC7251 */ +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM 0x0300C0AC +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM 0x0300C0AD +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8 0x0300C0AE +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8 0x0300C0AF + +/* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */ +# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BA +# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BB +# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BC +# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BD +# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BE +# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256 0x030000BF + +# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C0 +# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C1 +# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C2 +# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C3 +# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C4 +# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256 0x030000C5 + +/* ECC ciphersuites from RFC4492 */ +# define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001 +# define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002 +# define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003 +# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004 +# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005 + +# define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006 +# define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007 +# define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008 +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009 +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A + +# define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B +# define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C +# define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D +# define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E +# define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F + +# define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010 +# define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011 +# define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012 +# define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013 +# define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014 + +# define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015 +# define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016 +# define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017 +# define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018 +# define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019 + +/* SRP ciphersuites from RFC 5054 */ +# define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A +# define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B +# define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C +# define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D +# define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E +# define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F +# define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020 +# define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021 +# define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022 + +/* ECDH HMAC based ciphersuites from RFC5289 */ +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023 +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024 +# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025 +# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026 +# define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027 +# define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028 +# define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029 +# define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A + +/* ECDH GCM based ciphersuites from RFC5289 */ +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B +# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C +# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D +# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E +# define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F +# define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030 +# define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031 +# define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032 + +/* ECDHE PSK ciphersuites from RFC5489 */ +# define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA 0x0300C033 +# define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300C034 +# define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA 0x0300C035 +# define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA 0x0300C036 + +# define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0x0300C037 +# define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0x0300C038 + +/* NULL PSK ciphersuites from RFC4785 */ +# define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA 0x0300C039 +# define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256 0x0300C03A +# define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384 0x0300C03B + +/* Camellia-CBC ciphersuites from RFC6367 */ +# define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072 +# define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073 +# define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C074 +# define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C075 +# define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C076 +# define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C077 +# define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C078 +# define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C079 + +# define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C094 +# define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C095 +# define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C096 +# define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C097 +# define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C098 +# define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C099 +# define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C09A +# define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C09B + +/* draft-ietf-tls-chacha20-poly1305-03 */ +# define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCA8 +# define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 0x0300CCA9 +# define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCAA +# define TLS1_CK_PSK_WITH_CHACHA20_POLY1305 0x0300CCAB +# define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAC +# define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAD +# define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305 0x0300CCAE + +/* TLS v1.3 ciphersuites */ +# define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301 +# define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302 +# define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303 +# define TLS1_3_CK_AES_128_CCM_SHA256 0x03001304 +# define TLS1_3_CK_AES_128_CCM_8_SHA256 0x03001305 + +/* Aria ciphersuites from RFC6209 */ +# define TLS1_CK_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C050 +# define TLS1_CK_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C051 +# define TLS1_CK_DHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C052 +# define TLS1_CK_DHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C053 +# define TLS1_CK_DH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C054 +# define TLS1_CK_DH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C055 +# define TLS1_CK_DHE_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C056 +# define TLS1_CK_DHE_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C057 +# define TLS1_CK_DH_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C058 +# define TLS1_CK_DH_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C059 +# define TLS1_CK_DH_anon_WITH_ARIA_128_GCM_SHA256 0x0300C05A +# define TLS1_CK_DH_anon_WITH_ARIA_256_GCM_SHA384 0x0300C05B +# define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05C +# define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05D +# define TLS1_CK_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05E +# define TLS1_CK_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05F +# define TLS1_CK_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C060 +# define TLS1_CK_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C061 +# define TLS1_CK_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C062 +# define TLS1_CK_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C063 +# define TLS1_CK_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06A +# define TLS1_CK_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06B +# define TLS1_CK_DHE_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06C +# define TLS1_CK_DHE_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06D +# define TLS1_CK_RSA_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06E +# define TLS1_CK_RSA_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06F + +/* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */ +# define TLS1_RFC_RSA_WITH_AES_128_SHA "TLS_RSA_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_ADH_WITH_AES_128_SHA "TLS_DH_anon_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_RSA_WITH_AES_256_SHA "TLS_RSA_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_ADH_WITH_AES_256_SHA "TLS_DH_anon_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_RSA_WITH_NULL_SHA256 "TLS_RSA_WITH_NULL_SHA256" +# define TLS1_RFC_RSA_WITH_AES_128_SHA256 "TLS_RSA_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_RSA_WITH_AES_256_SHA256 "TLS_RSA_WITH_AES_256_CBC_SHA256" +# define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA256 "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA256 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA256 "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" +# define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA256 "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256" +# define TLS1_RFC_ADH_WITH_AES_128_SHA256 "TLS_DH_anon_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_ADH_WITH_AES_256_SHA256 "TLS_DH_anon_WITH_AES_256_CBC_SHA256" +# define TLS1_RFC_RSA_WITH_AES_128_GCM_SHA256 "TLS_RSA_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_RSA_WITH_AES_256_GCM_SHA384 "TLS_RSA_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_DHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_DHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_DHE_DSS_WITH_AES_128_GCM_SHA256 "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_DHE_DSS_WITH_AES_256_GCM_SHA384 "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_ADH_WITH_AES_128_GCM_SHA256 "TLS_DH_anon_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_ADH_WITH_AES_256_GCM_SHA384 "TLS_DH_anon_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_RSA_WITH_AES_128_CCM "TLS_RSA_WITH_AES_128_CCM" +# define TLS1_RFC_RSA_WITH_AES_256_CCM "TLS_RSA_WITH_AES_256_CCM" +# define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM "TLS_DHE_RSA_WITH_AES_128_CCM" +# define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM "TLS_DHE_RSA_WITH_AES_256_CCM" +# define TLS1_RFC_RSA_WITH_AES_128_CCM_8 "TLS_RSA_WITH_AES_128_CCM_8" +# define TLS1_RFC_RSA_WITH_AES_256_CCM_8 "TLS_RSA_WITH_AES_256_CCM_8" +# define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM_8 "TLS_DHE_RSA_WITH_AES_128_CCM_8" +# define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM_8 "TLS_DHE_RSA_WITH_AES_256_CCM_8" +# define TLS1_RFC_PSK_WITH_AES_128_CCM "TLS_PSK_WITH_AES_128_CCM" +# define TLS1_RFC_PSK_WITH_AES_256_CCM "TLS_PSK_WITH_AES_256_CCM" +# define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM "TLS_DHE_PSK_WITH_AES_128_CCM" +# define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM "TLS_DHE_PSK_WITH_AES_256_CCM" +# define TLS1_RFC_PSK_WITH_AES_128_CCM_8 "TLS_PSK_WITH_AES_128_CCM_8" +# define TLS1_RFC_PSK_WITH_AES_256_CCM_8 "TLS_PSK_WITH_AES_256_CCM_8" +# define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM_8 "TLS_PSK_DHE_WITH_AES_128_CCM_8" +# define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM_8 "TLS_PSK_DHE_WITH_AES_256_CCM_8" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM "TLS_ECDHE_ECDSA_WITH_AES_128_CCM" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM "TLS_ECDHE_ECDSA_WITH_AES_256_CCM" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8" +# define TLS1_3_RFC_AES_128_GCM_SHA256 "TLS_AES_128_GCM_SHA256" +# define TLS1_3_RFC_AES_256_GCM_SHA384 "TLS_AES_256_GCM_SHA384" +# define TLS1_3_RFC_CHACHA20_POLY1305_SHA256 "TLS_CHACHA20_POLY1305_SHA256" +# define TLS1_3_RFC_AES_128_CCM_SHA256 "TLS_AES_128_CCM_SHA256" +# define TLS1_3_RFC_AES_128_CCM_8_SHA256 "TLS_AES_128_CCM_8_SHA256" +# define TLS1_RFC_ECDHE_ECDSA_WITH_NULL_SHA "TLS_ECDHE_ECDSA_WITH_NULL_SHA" +# define TLS1_RFC_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_ECDHE_RSA_WITH_NULL_SHA "TLS_ECDHE_RSA_WITH_NULL_SHA" +# define TLS1_RFC_ECDHE_RSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_ECDHE_RSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_ECDHE_RSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_ECDH_anon_WITH_NULL_SHA "TLS_ECDH_anon_WITH_NULL_SHA" +# define TLS1_RFC_ECDH_anon_WITH_DES_192_CBC3_SHA "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_ECDH_anon_WITH_AES_128_CBC_SHA "TLS_ECDH_anon_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_ECDH_anon_WITH_AES_256_CBC_SHA "TLS_ECDH_anon_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" +# define TLS1_RFC_ECDHE_RSA_WITH_AES_128_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_ECDHE_RSA_WITH_AES_256_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_PSK_WITH_NULL_SHA "TLS_PSK_WITH_NULL_SHA" +# define TLS1_RFC_DHE_PSK_WITH_NULL_SHA "TLS_DHE_PSK_WITH_NULL_SHA" +# define TLS1_RFC_RSA_PSK_WITH_NULL_SHA "TLS_RSA_PSK_WITH_NULL_SHA" +# define TLS1_RFC_PSK_WITH_3DES_EDE_CBC_SHA "TLS_PSK_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA "TLS_PSK_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA "TLS_PSK_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_DHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA "TLS_DHE_PSK_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA "TLS_DHE_PSK_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_RSA_PSK_WITH_3DES_EDE_CBC_SHA "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA "TLS_RSA_PSK_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA "TLS_RSA_PSK_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_PSK_WITH_AES_128_GCM_SHA256 "TLS_PSK_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_PSK_WITH_AES_256_GCM_SHA384 "TLS_PSK_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_DHE_PSK_WITH_AES_128_GCM_SHA256 "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_DHE_PSK_WITH_AES_256_GCM_SHA384 "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_RSA_PSK_WITH_AES_128_GCM_SHA256 "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256" +# define TLS1_RFC_RSA_PSK_WITH_AES_256_GCM_SHA384 "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384" +# define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA256 "TLS_PSK_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA384 "TLS_PSK_WITH_AES_256_CBC_SHA384" +# define TLS1_RFC_PSK_WITH_NULL_SHA256 "TLS_PSK_WITH_NULL_SHA256" +# define TLS1_RFC_PSK_WITH_NULL_SHA384 "TLS_PSK_WITH_NULL_SHA384" +# define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384" +# define TLS1_RFC_DHE_PSK_WITH_NULL_SHA256 "TLS_DHE_PSK_WITH_NULL_SHA256" +# define TLS1_RFC_DHE_PSK_WITH_NULL_SHA384 "TLS_DHE_PSK_WITH_NULL_SHA384" +# define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA256 "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA384 "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384" +# define TLS1_RFC_RSA_PSK_WITH_NULL_SHA256 "TLS_RSA_PSK_WITH_NULL_SHA256" +# define TLS1_RFC_RSA_PSK_WITH_NULL_SHA384 "TLS_RSA_PSK_WITH_NULL_SHA384" +# define TLS1_RFC_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256" +# define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384" +# define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA "TLS_ECDHE_PSK_WITH_NULL_SHA" +# define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA256 "TLS_ECDHE_PSK_WITH_NULL_SHA256" +# define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA384 "TLS_ECDHE_PSK_WITH_NULL_SHA384" +# define TLS1_RFC_SRP_SHA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA" +# define TLS1_RFC_SRP_SHA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA" +# define TLS1_RFC_SRP_SHA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA" +# define TLS1_RFC_DHE_RSA_WITH_CHACHA20_POLY1305 "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_ECDHE_RSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_PSK_WITH_CHACHA20_POLY1305 "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_ECDHE_PSK_WITH_CHACHA20_POLY1305 "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_DHE_PSK_WITH_CHACHA20_POLY1305 "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_RSA_PSK_WITH_CHACHA20_POLY1305 "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256" +# define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256" +# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256" +# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256" +# define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256" +# define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA" +# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA" +# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA" +# define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA" +# define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA" +# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA" +# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA" +# define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA" +# define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384" +# define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384" +# define TLS1_RFC_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384" +# define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384" +# define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384" +# define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256" +# define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384" +# define TLS1_RFC_RSA_WITH_SEED_SHA "TLS_RSA_WITH_SEED_CBC_SHA" +# define TLS1_RFC_DHE_DSS_WITH_SEED_SHA "TLS_DHE_DSS_WITH_SEED_CBC_SHA" +# define TLS1_RFC_DHE_RSA_WITH_SEED_SHA "TLS_DHE_RSA_WITH_SEED_CBC_SHA" +# define TLS1_RFC_ADH_WITH_SEED_SHA "TLS_DH_anon_WITH_SEED_CBC_SHA" +# define TLS1_RFC_ECDHE_PSK_WITH_RC4_128_SHA "TLS_ECDHE_PSK_WITH_RC4_128_SHA" +# define TLS1_RFC_ECDH_anon_WITH_RC4_128_SHA "TLS_ECDH_anon_WITH_RC4_128_SHA" +# define TLS1_RFC_ECDHE_ECDSA_WITH_RC4_128_SHA "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA" +# define TLS1_RFC_ECDHE_RSA_WITH_RC4_128_SHA "TLS_ECDHE_RSA_WITH_RC4_128_SHA" +# define TLS1_RFC_PSK_WITH_RC4_128_SHA "TLS_PSK_WITH_RC4_128_SHA" +# define TLS1_RFC_RSA_PSK_WITH_RC4_128_SHA "TLS_RSA_PSK_WITH_RC4_128_SHA" +# define TLS1_RFC_DHE_PSK_WITH_RC4_128_SHA "TLS_DHE_PSK_WITH_RC4_128_SHA" +# define TLS1_RFC_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_DH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_DH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_DH_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_DH_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_DH_anon_WITH_ARIA_128_GCM_SHA256 "TLS_DH_anon_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_DH_anon_WITH_ARIA_256_GCM_SHA384 "TLS_DH_anon_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_PSK_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_PSK_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384" +# define TLS1_RFC_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256" +# define TLS1_RFC_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384" + + +/* + * XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE + * ciphers names with "EDH" instead of "DHE". Going forward, we should be + * using DHE everywhere, though we may indefinitely maintain aliases for + * users or configurations that used "EDH" + */ +# define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA" + +# define TLS1_TXT_PSK_WITH_NULL_SHA "PSK-NULL-SHA" +# define TLS1_TXT_DHE_PSK_WITH_NULL_SHA "DHE-PSK-NULL-SHA" +# define TLS1_TXT_RSA_PSK_WITH_NULL_SHA "RSA-PSK-NULL-SHA" + +/* AES ciphersuites from RFC3268 */ +# define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA" +# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA" +# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA" +# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA" +# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA" +# define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA" + +# define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA" +# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA" +# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA" +# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA" +# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA" +# define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA" + +/* ECC ciphersuites from RFC4492 */ +# define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA" +# define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA" +# define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA" +# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA" +# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA" + +# define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA" +# define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA" +# define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA" + +# define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA" +# define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA" +# define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA" +# define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA" +# define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA" + +# define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA" +# define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA" +# define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA" +# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA" +# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA" + +# define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA" +# define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA" +# define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA" +# define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" +# define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" + +/* PSK ciphersuites from RFC 4279 */ +# define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA" +# define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA" +# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA" +# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA" + +# define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA "DHE-PSK-RC4-SHA" +# define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA "DHE-PSK-3DES-EDE-CBC-SHA" +# define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA "DHE-PSK-AES128-CBC-SHA" +# define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA "DHE-PSK-AES256-CBC-SHA" +# define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA "RSA-PSK-RC4-SHA" +# define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA "RSA-PSK-3DES-EDE-CBC-SHA" +# define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA "RSA-PSK-AES128-CBC-SHA" +# define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA "RSA-PSK-AES256-CBC-SHA" + +/* PSK ciphersuites from RFC 5487 */ +# define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256" +# define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384" +# define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256 "DHE-PSK-AES128-GCM-SHA256" +# define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384 "DHE-PSK-AES256-GCM-SHA384" +# define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256 "RSA-PSK-AES128-GCM-SHA256" +# define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384 "RSA-PSK-AES256-GCM-SHA384" + +# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256 "PSK-AES128-CBC-SHA256" +# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384 "PSK-AES256-CBC-SHA384" +# define TLS1_TXT_PSK_WITH_NULL_SHA256 "PSK-NULL-SHA256" +# define TLS1_TXT_PSK_WITH_NULL_SHA384 "PSK-NULL-SHA384" + +# define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256 "DHE-PSK-AES128-CBC-SHA256" +# define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384 "DHE-PSK-AES256-CBC-SHA384" +# define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256 "DHE-PSK-NULL-SHA256" +# define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384 "DHE-PSK-NULL-SHA384" + +# define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256 "RSA-PSK-AES128-CBC-SHA256" +# define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384 "RSA-PSK-AES256-CBC-SHA384" +# define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256 "RSA-PSK-NULL-SHA256" +# define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384 "RSA-PSK-NULL-SHA384" + +/* SRP ciphersuite from RFC 5054 */ +# define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA" +# define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA" +# define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA" +# define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA" +# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA" +# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA" +# define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA" +# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA" +# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA" + +/* Camellia ciphersuites from RFC4132 */ +# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" +# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" +# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA" +# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA" +# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA" +# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA" + +# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA" +# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA" +# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA" +# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA" +# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA" +# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA" + +/* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */ +# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256 "CAMELLIA128-SHA256" +# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DH-DSS-CAMELLIA128-SHA256" +# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DH-RSA-CAMELLIA128-SHA256" +# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DHE-DSS-CAMELLIA128-SHA256" +# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DHE-RSA-CAMELLIA128-SHA256" +# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256 "ADH-CAMELLIA128-SHA256" + +# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256 "CAMELLIA256-SHA256" +# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DH-DSS-CAMELLIA256-SHA256" +# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DH-RSA-CAMELLIA256-SHA256" +# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DHE-DSS-CAMELLIA256-SHA256" +# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DHE-RSA-CAMELLIA256-SHA256" +# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256 "ADH-CAMELLIA256-SHA256" + +# define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256 "PSK-CAMELLIA128-SHA256" +# define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384 "PSK-CAMELLIA256-SHA384" +# define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "DHE-PSK-CAMELLIA128-SHA256" +# define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "DHE-PSK-CAMELLIA256-SHA384" +# define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "RSA-PSK-CAMELLIA128-SHA256" +# define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "RSA-PSK-CAMELLIA256-SHA384" +# define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-PSK-CAMELLIA128-SHA256" +# define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-PSK-CAMELLIA256-SHA384" + +/* SEED ciphersuites from RFC4162 */ +# define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA" +# define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA" +# define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA" +# define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA" +# define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" +# define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" + +/* TLS v1.2 ciphersuites */ +# define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256" +# define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256" +# define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256" +# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256" +# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256" +# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256" +# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256" +# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256" +# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256" +# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256" +# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256" +# define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256" +# define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256" + +/* TLS v1.2 GCM ciphersuites from RFC5288 */ +# define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256" +# define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384" +# define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256" +# define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384" +# define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256" +# define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384" +# define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256" +# define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384" +# define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256" +# define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384" +# define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256" +# define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384" + +/* CCM ciphersuites from RFC6655 */ +# define TLS1_TXT_RSA_WITH_AES_128_CCM "AES128-CCM" +# define TLS1_TXT_RSA_WITH_AES_256_CCM "AES256-CCM" +# define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM "DHE-RSA-AES128-CCM" +# define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM "DHE-RSA-AES256-CCM" + +# define TLS1_TXT_RSA_WITH_AES_128_CCM_8 "AES128-CCM8" +# define TLS1_TXT_RSA_WITH_AES_256_CCM_8 "AES256-CCM8" +# define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8 "DHE-RSA-AES128-CCM8" +# define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8 "DHE-RSA-AES256-CCM8" + +# define TLS1_TXT_PSK_WITH_AES_128_CCM "PSK-AES128-CCM" +# define TLS1_TXT_PSK_WITH_AES_256_CCM "PSK-AES256-CCM" +# define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM "DHE-PSK-AES128-CCM" +# define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM "DHE-PSK-AES256-CCM" + +# define TLS1_TXT_PSK_WITH_AES_128_CCM_8 "PSK-AES128-CCM8" +# define TLS1_TXT_PSK_WITH_AES_256_CCM_8 "PSK-AES256-CCM8" +# define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8 "DHE-PSK-AES128-CCM8" +# define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8 "DHE-PSK-AES256-CCM8" + +/* CCM ciphersuites from RFC7251 */ +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM "ECDHE-ECDSA-AES128-CCM" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM "ECDHE-ECDSA-AES256-CCM" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8 "ECDHE-ECDSA-AES128-CCM8" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8 "ECDHE-ECDSA-AES256-CCM8" + +/* ECDH HMAC based ciphersuites from RFC5289 */ +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384" +# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256" +# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384" +# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256" +# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384" +# define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256" +# define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384" + +/* ECDH GCM based ciphersuites from RFC5289 */ +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256" +# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384" +# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256" +# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384" +# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256" +# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384" +# define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256" +# define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384" + +/* TLS v1.2 PSK GCM ciphersuites from RFC5487 */ +# define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256" +# define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384" + +/* ECDHE PSK ciphersuites from RFC 5489 */ +# define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA "ECDHE-PSK-RC4-SHA" +# define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "ECDHE-PSK-3DES-EDE-CBC-SHA" +# define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA "ECDHE-PSK-AES128-CBC-SHA" +# define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA "ECDHE-PSK-AES256-CBC-SHA" + +# define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "ECDHE-PSK-AES128-CBC-SHA256" +# define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "ECDHE-PSK-AES256-CBC-SHA384" + +# define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA "ECDHE-PSK-NULL-SHA" +# define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256 "ECDHE-PSK-NULL-SHA256" +# define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384 "ECDHE-PSK-NULL-SHA384" + +/* Camellia-CBC ciphersuites from RFC6367 */ +# define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256" +# define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384" +# define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-ECDSA-CAMELLIA128-SHA256" +# define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-ECDSA-CAMELLIA256-SHA384" +# define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-RSA-CAMELLIA128-SHA256" +# define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-RSA-CAMELLIA256-SHA384" +# define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-RSA-CAMELLIA128-SHA256" +# define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-RSA-CAMELLIA256-SHA384" + +/* draft-ietf-tls-chacha20-poly1305-03 */ +# define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 "ECDHE-RSA-CHACHA20-POLY1305" +# define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "ECDHE-ECDSA-CHACHA20-POLY1305" +# define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305 "DHE-RSA-CHACHA20-POLY1305" +# define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305 "PSK-CHACHA20-POLY1305" +# define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305 "ECDHE-PSK-CHACHA20-POLY1305" +# define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305 "DHE-PSK-CHACHA20-POLY1305" +# define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305 "RSA-PSK-CHACHA20-POLY1305" + +/* Aria ciphersuites from RFC6209 */ +# define TLS1_TXT_RSA_WITH_ARIA_128_GCM_SHA256 "ARIA128-GCM-SHA256" +# define TLS1_TXT_RSA_WITH_ARIA_256_GCM_SHA384 "ARIA256-GCM-SHA384" +# define TLS1_TXT_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "DHE-RSA-ARIA128-GCM-SHA256" +# define TLS1_TXT_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "DHE-RSA-ARIA256-GCM-SHA384" +# define TLS1_TXT_DH_RSA_WITH_ARIA_128_GCM_SHA256 "DH-RSA-ARIA128-GCM-SHA256" +# define TLS1_TXT_DH_RSA_WITH_ARIA_256_GCM_SHA384 "DH-RSA-ARIA256-GCM-SHA384" +# define TLS1_TXT_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "DHE-DSS-ARIA128-GCM-SHA256" +# define TLS1_TXT_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "DHE-DSS-ARIA256-GCM-SHA384" +# define TLS1_TXT_DH_DSS_WITH_ARIA_128_GCM_SHA256 "DH-DSS-ARIA128-GCM-SHA256" +# define TLS1_TXT_DH_DSS_WITH_ARIA_256_GCM_SHA384 "DH-DSS-ARIA256-GCM-SHA384" +# define TLS1_TXT_DH_anon_WITH_ARIA_128_GCM_SHA256 "ADH-ARIA128-GCM-SHA256" +# define TLS1_TXT_DH_anon_WITH_ARIA_256_GCM_SHA384 "ADH-ARIA256-GCM-SHA384" +# define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ECDSA-ARIA128-GCM-SHA256" +# define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ECDSA-ARIA256-GCM-SHA384" +# define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ECDSA-ARIA128-GCM-SHA256" +# define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ECDSA-ARIA256-GCM-SHA384" +# define TLS1_TXT_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ARIA128-GCM-SHA256" +# define TLS1_TXT_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ARIA256-GCM-SHA384" +# define TLS1_TXT_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ARIA128-GCM-SHA256" +# define TLS1_TXT_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ARIA256-GCM-SHA384" +# define TLS1_TXT_PSK_WITH_ARIA_128_GCM_SHA256 "PSK-ARIA128-GCM-SHA256" +# define TLS1_TXT_PSK_WITH_ARIA_256_GCM_SHA384 "PSK-ARIA256-GCM-SHA384" +# define TLS1_TXT_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "DHE-PSK-ARIA128-GCM-SHA256" +# define TLS1_TXT_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "DHE-PSK-ARIA256-GCM-SHA384" +# define TLS1_TXT_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "RSA-PSK-ARIA128-GCM-SHA256" +# define TLS1_TXT_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "RSA-PSK-ARIA256-GCM-SHA384" + +# define TLS_CT_RSA_SIGN 1 +# define TLS_CT_DSS_SIGN 2 +# define TLS_CT_RSA_FIXED_DH 3 +# define TLS_CT_DSS_FIXED_DH 4 +# define TLS_CT_ECDSA_SIGN 64 +# define TLS_CT_RSA_FIXED_ECDH 65 +# define TLS_CT_ECDSA_FIXED_ECDH 66 +# define TLS_CT_GOST01_SIGN 22 +# define TLS_CT_GOST12_SIGN 238 +# define TLS_CT_GOST12_512_SIGN 239 + +/* + * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see + * comment there) + */ +# define TLS_CT_NUMBER 10 + +# if defined(SSL3_CT_NUMBER) +# if TLS_CT_NUMBER != SSL3_CT_NUMBER +# error "SSL/TLS CT_NUMBER values do not match" +# endif +# endif + +# define TLS1_FINISH_MAC_LENGTH 12 + +# define TLS_MD_MAX_CONST_SIZE 22 +# define TLS_MD_CLIENT_FINISH_CONST "client finished" +# define TLS_MD_CLIENT_FINISH_CONST_SIZE 15 +# define TLS_MD_SERVER_FINISH_CONST "server finished" +# define TLS_MD_SERVER_FINISH_CONST_SIZE 15 +# define TLS_MD_KEY_EXPANSION_CONST "key expansion" +# define TLS_MD_KEY_EXPANSION_CONST_SIZE 13 +# define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key" +# define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16 +# define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" +# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 +# define TLS_MD_IV_BLOCK_CONST "IV block" +# define TLS_MD_IV_BLOCK_CONST_SIZE 8 +# define TLS_MD_MASTER_SECRET_CONST "master secret" +# define TLS_MD_MASTER_SECRET_CONST_SIZE 13 +# define TLS_MD_EXTENDED_MASTER_SECRET_CONST "extended master secret" +# define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE 22 + +# ifdef CHARSET_EBCDIC +# undef TLS_MD_CLIENT_FINISH_CONST +/* + * client finished + */ +# define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" + +# undef TLS_MD_SERVER_FINISH_CONST +/* + * server finished + */ +# define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" + +# undef TLS_MD_SERVER_WRITE_KEY_CONST +/* + * server write key + */ +# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" + +# undef TLS_MD_KEY_EXPANSION_CONST +/* + * key expansion + */ +# define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" + +# undef TLS_MD_CLIENT_WRITE_KEY_CONST +/* + * client write key + */ +# define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" + +# undef TLS_MD_SERVER_WRITE_KEY_CONST +/* + * server write key + */ +# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" + +# undef TLS_MD_IV_BLOCK_CONST +/* + * IV block + */ +# define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" + +# undef TLS_MD_MASTER_SECRET_CONST +/* + * master secret + */ +# define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" +# undef TLS_MD_EXTENDED_MASTER_SECRET_CONST +/* + * extended master secret + */ +# define TLS_MD_EXTENDED_MASTER_SECRET_CONST "\x65\x78\x74\x65\x6e\x64\x65\x64\x20\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" +# endif + +/* TLS Session Ticket extension struct */ +struct tls_session_ticket_ext_st { + unsigned short length; + void *data; +}; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ts.h b/src/Mayaqua/win32_inc/openssl/ts.h index 85836cd1..3b58aa52 100644 --- a/src/Mayaqua/win32_inc/openssl/ts.h +++ b/src/Mayaqua/win32_inc/openssl/ts.h @@ -1,865 +1,559 @@ -/* crypto/ts/ts.h */ -/* - * Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL project - * 2002, 2003, 2004. - */ -/* ==================================================================== - * Copyright (c) 2006 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_TS_H -# define HEADER_TS_H - -# include -# include -# ifndef OPENSSL_NO_BUFFER -# include -# endif -# ifndef OPENSSL_NO_EVP -# include -# endif -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# include -# include - -# ifndef OPENSSL_NO_RSA -# include -# endif - -# ifndef OPENSSL_NO_DSA -# include -# endif - -# ifndef OPENSSL_NO_DH -# include -# endif - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef WIN32 -/* Under Win32 this is defined in wincrypt.h */ -# undef X509_NAME -# endif - -# include -# include - -/*- -MessageImprint ::= SEQUENCE { - hashAlgorithm AlgorithmIdentifier, - hashedMessage OCTET STRING } -*/ - -typedef struct TS_msg_imprint_st { - X509_ALGOR *hash_algo; - ASN1_OCTET_STRING *hashed_msg; -} TS_MSG_IMPRINT; - -/*- -TimeStampReq ::= SEQUENCE { - version INTEGER { v1(1) }, - messageImprint MessageImprint, - --a hash algorithm OID and the hash value of the data to be - --time-stamped - reqPolicy TSAPolicyId OPTIONAL, - nonce INTEGER OPTIONAL, - certReq BOOLEAN DEFAULT FALSE, - extensions [0] IMPLICIT Extensions OPTIONAL } -*/ - -typedef struct TS_req_st { - ASN1_INTEGER *version; - TS_MSG_IMPRINT *msg_imprint; - ASN1_OBJECT *policy_id; /* OPTIONAL */ - ASN1_INTEGER *nonce; /* OPTIONAL */ - ASN1_BOOLEAN cert_req; /* DEFAULT FALSE */ - STACK_OF(X509_EXTENSION) *extensions; /* [0] OPTIONAL */ -} TS_REQ; - -/*- -Accuracy ::= SEQUENCE { - seconds INTEGER OPTIONAL, - millis [0] INTEGER (1..999) OPTIONAL, - micros [1] INTEGER (1..999) OPTIONAL } -*/ - -typedef struct TS_accuracy_st { - ASN1_INTEGER *seconds; - ASN1_INTEGER *millis; - ASN1_INTEGER *micros; -} TS_ACCURACY; - -/*- -TSTInfo ::= SEQUENCE { - version INTEGER { v1(1) }, - policy TSAPolicyId, - messageImprint MessageImprint, - -- MUST have the same value as the similar field in - -- TimeStampReq - serialNumber INTEGER, - -- Time-Stamping users MUST be ready to accommodate integers - -- up to 160 bits. - genTime GeneralizedTime, - accuracy Accuracy OPTIONAL, - ordering BOOLEAN DEFAULT FALSE, - nonce INTEGER OPTIONAL, - -- MUST be present if the similar field was present - -- in TimeStampReq. In that case it MUST have the same value. - tsa [0] GeneralName OPTIONAL, - extensions [1] IMPLICIT Extensions OPTIONAL } -*/ - -typedef struct TS_tst_info_st { - ASN1_INTEGER *version; - ASN1_OBJECT *policy_id; - TS_MSG_IMPRINT *msg_imprint; - ASN1_INTEGER *serial; - ASN1_GENERALIZEDTIME *time; - TS_ACCURACY *accuracy; - ASN1_BOOLEAN ordering; - ASN1_INTEGER *nonce; - GENERAL_NAME *tsa; - STACK_OF(X509_EXTENSION) *extensions; -} TS_TST_INFO; - -/*- -PKIStatusInfo ::= SEQUENCE { - status PKIStatus, - statusString PKIFreeText OPTIONAL, - failInfo PKIFailureInfo OPTIONAL } - -From RFC 1510 - section 3.1.1: -PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String - -- text encoded as UTF-8 String (note: each UTF8String SHOULD - -- include an RFC 1766 language tag to indicate the language - -- of the contained text) -*/ - -/* Possible values for status. See ts_resp_print.c && ts_resp_verify.c. */ - -# define TS_STATUS_GRANTED 0 -# define TS_STATUS_GRANTED_WITH_MODS 1 -# define TS_STATUS_REJECTION 2 -# define TS_STATUS_WAITING 3 -# define TS_STATUS_REVOCATION_WARNING 4 -# define TS_STATUS_REVOCATION_NOTIFICATION 5 - -/* - * Possible values for failure_info. See ts_resp_print.c && ts_resp_verify.c - */ - -# define TS_INFO_BAD_ALG 0 -# define TS_INFO_BAD_REQUEST 2 -# define TS_INFO_BAD_DATA_FORMAT 5 -# define TS_INFO_TIME_NOT_AVAILABLE 14 -# define TS_INFO_UNACCEPTED_POLICY 15 -# define TS_INFO_UNACCEPTED_EXTENSION 16 -# define TS_INFO_ADD_INFO_NOT_AVAILABLE 17 -# define TS_INFO_SYSTEM_FAILURE 25 - -typedef struct TS_status_info_st { - ASN1_INTEGER *status; - STACK_OF(ASN1_UTF8STRING) *text; - ASN1_BIT_STRING *failure_info; -} TS_STATUS_INFO; - -DECLARE_STACK_OF(ASN1_UTF8STRING) -DECLARE_ASN1_SET_OF(ASN1_UTF8STRING) - -/*- -TimeStampResp ::= SEQUENCE { - status PKIStatusInfo, - timeStampToken TimeStampToken OPTIONAL } -*/ - -typedef struct TS_resp_st { - TS_STATUS_INFO *status_info; - PKCS7 *token; - TS_TST_INFO *tst_info; -} TS_RESP; - -/* The structure below would belong to the ESS component. */ - -/*- -IssuerSerial ::= SEQUENCE { - issuer GeneralNames, - serialNumber CertificateSerialNumber - } -*/ - -typedef struct ESS_issuer_serial { - STACK_OF(GENERAL_NAME) *issuer; - ASN1_INTEGER *serial; -} ESS_ISSUER_SERIAL; - -/*- -ESSCertID ::= SEQUENCE { - certHash Hash, - issuerSerial IssuerSerial OPTIONAL -} -*/ - -typedef struct ESS_cert_id { - ASN1_OCTET_STRING *hash; /* Always SHA-1 digest. */ - ESS_ISSUER_SERIAL *issuer_serial; -} ESS_CERT_ID; - -DECLARE_STACK_OF(ESS_CERT_ID) -DECLARE_ASN1_SET_OF(ESS_CERT_ID) - -/*- -SigningCertificate ::= SEQUENCE { - certs SEQUENCE OF ESSCertID, - policies SEQUENCE OF PolicyInformation OPTIONAL -} -*/ - -typedef struct ESS_signing_cert { - STACK_OF(ESS_CERT_ID) *cert_ids; - STACK_OF(POLICYINFO) *policy_info; -} ESS_SIGNING_CERT; - -TS_REQ *TS_REQ_new(void); -void TS_REQ_free(TS_REQ *a); -int i2d_TS_REQ(const TS_REQ *a, unsigned char **pp); -TS_REQ *d2i_TS_REQ(TS_REQ **a, const unsigned char **pp, long length); - -TS_REQ *TS_REQ_dup(TS_REQ *a); - -TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a); -int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a); -TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a); -int i2d_TS_REQ_bio(BIO *fp, TS_REQ *a); - -TS_MSG_IMPRINT *TS_MSG_IMPRINT_new(void); -void TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a); -int i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **pp); -TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a, - const unsigned char **pp, long length); - -TS_MSG_IMPRINT *TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *a); - -TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a); -int i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a); -TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *fp, TS_MSG_IMPRINT **a); -int i2d_TS_MSG_IMPRINT_bio(BIO *fp, TS_MSG_IMPRINT *a); - -TS_RESP *TS_RESP_new(void); -void TS_RESP_free(TS_RESP *a); -int i2d_TS_RESP(const TS_RESP *a, unsigned char **pp); -TS_RESP *d2i_TS_RESP(TS_RESP **a, const unsigned char **pp, long length); -TS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token); -TS_RESP *TS_RESP_dup(TS_RESP *a); - -TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a); -int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a); -TS_RESP *d2i_TS_RESP_bio(BIO *fp, TS_RESP **a); -int i2d_TS_RESP_bio(BIO *fp, TS_RESP *a); - -TS_STATUS_INFO *TS_STATUS_INFO_new(void); -void TS_STATUS_INFO_free(TS_STATUS_INFO *a); -int i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **pp); -TS_STATUS_INFO *d2i_TS_STATUS_INFO(TS_STATUS_INFO **a, - const unsigned char **pp, long length); -TS_STATUS_INFO *TS_STATUS_INFO_dup(TS_STATUS_INFO *a); - -TS_TST_INFO *TS_TST_INFO_new(void); -void TS_TST_INFO_free(TS_TST_INFO *a); -int i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **pp); -TS_TST_INFO *d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **pp, - long length); -TS_TST_INFO *TS_TST_INFO_dup(TS_TST_INFO *a); - -TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a); -int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a); -TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *fp, TS_TST_INFO **a); -int i2d_TS_TST_INFO_bio(BIO *fp, TS_TST_INFO *a); - -TS_ACCURACY *TS_ACCURACY_new(void); -void TS_ACCURACY_free(TS_ACCURACY *a); -int i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **pp); -TS_ACCURACY *d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **pp, - long length); -TS_ACCURACY *TS_ACCURACY_dup(TS_ACCURACY *a); - -ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_new(void); -void ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a); -int i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **pp); -ESS_ISSUER_SERIAL *d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a, - const unsigned char **pp, - long length); -ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_dup(ESS_ISSUER_SERIAL *a); - -ESS_CERT_ID *ESS_CERT_ID_new(void); -void ESS_CERT_ID_free(ESS_CERT_ID *a); -int i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **pp); -ESS_CERT_ID *d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **pp, - long length); -ESS_CERT_ID *ESS_CERT_ID_dup(ESS_CERT_ID *a); - -ESS_SIGNING_CERT *ESS_SIGNING_CERT_new(void); -void ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a); -int i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **pp); -ESS_SIGNING_CERT *d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a, - const unsigned char **pp, long length); -ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a); - -void ERR_load_TS_strings(void); - -int TS_REQ_set_version(TS_REQ *a, long version); -long TS_REQ_get_version(const TS_REQ *a); - -int TS_REQ_set_msg_imprint(TS_REQ *a, TS_MSG_IMPRINT *msg_imprint); -TS_MSG_IMPRINT *TS_REQ_get_msg_imprint(TS_REQ *a); - -int TS_MSG_IMPRINT_set_algo(TS_MSG_IMPRINT *a, X509_ALGOR *alg); -X509_ALGOR *TS_MSG_IMPRINT_get_algo(TS_MSG_IMPRINT *a); - -int TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len); -ASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a); - -int TS_REQ_set_policy_id(TS_REQ *a, ASN1_OBJECT *policy); -ASN1_OBJECT *TS_REQ_get_policy_id(TS_REQ *a); - -int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce); -const ASN1_INTEGER *TS_REQ_get_nonce(const TS_REQ *a); - -int TS_REQ_set_cert_req(TS_REQ *a, int cert_req); -int TS_REQ_get_cert_req(const TS_REQ *a); - -STACK_OF(X509_EXTENSION) *TS_REQ_get_exts(TS_REQ *a); -void TS_REQ_ext_free(TS_REQ *a); -int TS_REQ_get_ext_count(TS_REQ *a); -int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos); -int TS_REQ_get_ext_by_OBJ(TS_REQ *a, ASN1_OBJECT *obj, int lastpos); -int TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos); -X509_EXTENSION *TS_REQ_get_ext(TS_REQ *a, int loc); -X509_EXTENSION *TS_REQ_delete_ext(TS_REQ *a, int loc); -int TS_REQ_add_ext(TS_REQ *a, X509_EXTENSION *ex, int loc); -void *TS_REQ_get_ext_d2i(TS_REQ *a, int nid, int *crit, int *idx); - -/* Function declarations for TS_REQ defined in ts/ts_req_print.c */ - -int TS_REQ_print_bio(BIO *bio, TS_REQ *a); - -/* Function declarations for TS_RESP defined in ts/ts_resp_utils.c */ - -int TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *info); -TS_STATUS_INFO *TS_RESP_get_status_info(TS_RESP *a); - -/* Caller loses ownership of PKCS7 and TS_TST_INFO objects. */ -void TS_RESP_set_tst_info(TS_RESP *a, PKCS7 *p7, TS_TST_INFO *tst_info); -PKCS7 *TS_RESP_get_token(TS_RESP *a); -TS_TST_INFO *TS_RESP_get_tst_info(TS_RESP *a); - -int TS_TST_INFO_set_version(TS_TST_INFO *a, long version); -long TS_TST_INFO_get_version(const TS_TST_INFO *a); - -int TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy_id); -ASN1_OBJECT *TS_TST_INFO_get_policy_id(TS_TST_INFO *a); - -int TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint); -TS_MSG_IMPRINT *TS_TST_INFO_get_msg_imprint(TS_TST_INFO *a); - -int TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial); -const ASN1_INTEGER *TS_TST_INFO_get_serial(const TS_TST_INFO *a); - -int TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime); -const ASN1_GENERALIZEDTIME *TS_TST_INFO_get_time(const TS_TST_INFO *a); - -int TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy); -TS_ACCURACY *TS_TST_INFO_get_accuracy(TS_TST_INFO *a); - -int TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds); -const ASN1_INTEGER *TS_ACCURACY_get_seconds(const TS_ACCURACY *a); - -int TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis); -const ASN1_INTEGER *TS_ACCURACY_get_millis(const TS_ACCURACY *a); - -int TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros); -const ASN1_INTEGER *TS_ACCURACY_get_micros(const TS_ACCURACY *a); - -int TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering); -int TS_TST_INFO_get_ordering(const TS_TST_INFO *a); - -int TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce); -const ASN1_INTEGER *TS_TST_INFO_get_nonce(const TS_TST_INFO *a); - -int TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa); -GENERAL_NAME *TS_TST_INFO_get_tsa(TS_TST_INFO *a); - -STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a); -void TS_TST_INFO_ext_free(TS_TST_INFO *a); -int TS_TST_INFO_get_ext_count(TS_TST_INFO *a); -int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos); -int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, ASN1_OBJECT *obj, int lastpos); -int TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos); -X509_EXTENSION *TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc); -X509_EXTENSION *TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc); -int TS_TST_INFO_add_ext(TS_TST_INFO *a, X509_EXTENSION *ex, int loc); -void *TS_TST_INFO_get_ext_d2i(TS_TST_INFO *a, int nid, int *crit, int *idx); - -/* - * Declarations related to response generation, defined in ts/ts_resp_sign.c. - */ - -/* Optional flags for response generation. */ - -/* Don't include the TSA name in response. */ -# define TS_TSA_NAME 0x01 - -/* Set ordering to true in response. */ -# define TS_ORDERING 0x02 - -/* - * Include the signer certificate and the other specified certificates in - * the ESS signing certificate attribute beside the PKCS7 signed data. - * Only the signer certificates is included by default. - */ -# define TS_ESS_CERT_ID_CHAIN 0x04 - -/* Forward declaration. */ -struct TS_resp_ctx; - -/* This must return a unique number less than 160 bits long. */ -typedef ASN1_INTEGER *(*TS_serial_cb) (struct TS_resp_ctx *, void *); - -/* - * This must return the seconds and microseconds since Jan 1, 1970 in the sec - * and usec variables allocated by the caller. Return non-zero for success - * and zero for failure. - */ -typedef int (*TS_time_cb) (struct TS_resp_ctx *, void *, long *sec, - long *usec); - -/* - * This must process the given extension. It can modify the TS_TST_INFO - * object of the context. Return values: !0 (processed), 0 (error, it must - * set the status info/failure info of the response). - */ -typedef int (*TS_extension_cb) (struct TS_resp_ctx *, X509_EXTENSION *, - void *); - -typedef struct TS_resp_ctx { - X509 *signer_cert; - EVP_PKEY *signer_key; - STACK_OF(X509) *certs; /* Certs to include in signed data. */ - STACK_OF(ASN1_OBJECT) *policies; /* Acceptable policies. */ - ASN1_OBJECT *default_policy; /* It may appear in policies, too. */ - STACK_OF(EVP_MD) *mds; /* Acceptable message digests. */ - ASN1_INTEGER *seconds; /* accuracy, 0 means not specified. */ - ASN1_INTEGER *millis; /* accuracy, 0 means not specified. */ - ASN1_INTEGER *micros; /* accuracy, 0 means not specified. */ - unsigned clock_precision_digits; /* fraction of seconds in time stamp - * token. */ - unsigned flags; /* Optional info, see values above. */ - /* Callback functions. */ - TS_serial_cb serial_cb; - void *serial_cb_data; /* User data for serial_cb. */ - TS_time_cb time_cb; - void *time_cb_data; /* User data for time_cb. */ - TS_extension_cb extension_cb; - void *extension_cb_data; /* User data for extension_cb. */ - /* These members are used only while creating the response. */ - TS_REQ *request; - TS_RESP *response; - TS_TST_INFO *tst_info; -} TS_RESP_CTX; - -DECLARE_STACK_OF(EVP_MD) -DECLARE_ASN1_SET_OF(EVP_MD) - -/* Creates a response context that can be used for generating responses. */ -TS_RESP_CTX *TS_RESP_CTX_new(void); -void TS_RESP_CTX_free(TS_RESP_CTX *ctx); - -/* This parameter must be set. */ -int TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer); - -/* This parameter must be set. */ -int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key); - -/* This parameter must be set. */ -int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *def_policy); - -/* No additional certs are included in the response by default. */ -int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs); - -/* - * Adds a new acceptable policy, only the default policy is accepted by - * default. - */ -int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *policy); - -/* - * Adds a new acceptable message digest. Note that no message digests are - * accepted by default. The md argument is shared with the caller. - */ -int TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md); - -/* Accuracy is not included by default. */ -int TS_RESP_CTX_set_accuracy(TS_RESP_CTX *ctx, - int secs, int millis, int micros); - -/* - * Clock precision digits, i.e. the number of decimal digits: '0' means sec, - * '3' msec, '6' usec, and so on. Default is 0. - */ -int TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx, - unsigned clock_precision_digits); -/* At most we accept usec precision. */ -# define TS_MAX_CLOCK_PRECISION_DIGITS 6 - -/* Maximum status message length */ -# define TS_MAX_STATUS_LENGTH (1024 * 1024) - -/* No flags are set by default. */ -void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags); - -/* Default callback always returns a constant. */ -void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data); - -/* Default callback uses the gettimeofday() and gmtime() system calls. */ -void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data); - -/* - * Default callback rejects all extensions. The extension callback is called - * when the TS_TST_INFO object is already set up and not signed yet. - */ -/* FIXME: extension handling is not tested yet. */ -void TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx, - TS_extension_cb cb, void *data); - -/* The following methods can be used in the callbacks. */ -int TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx, - int status, const char *text); - -/* Sets the status info only if it is still TS_STATUS_GRANTED. */ -int TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, - int status, const char *text); - -int TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure); - -/* The get methods below can be used in the extension callback. */ -TS_REQ *TS_RESP_CTX_get_request(TS_RESP_CTX *ctx); - -TS_TST_INFO *TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx); - -/* - * Creates the signed TS_TST_INFO and puts it in TS_RESP. - * In case of errors it sets the status info properly. - * Returns NULL only in case of memory allocation/fatal error. - */ -TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio); - -/* - * Declarations related to response verification, - * they are defined in ts/ts_resp_verify.c. - */ - -int TS_RESP_verify_signature(PKCS7 *token, STACK_OF(X509) *certs, - X509_STORE *store, X509 **signer_out); - -/* Context structure for the generic verify method. */ - -/* Verify the signer's certificate and the signature of the response. */ -# define TS_VFY_SIGNATURE (1u << 0) -/* Verify the version number of the response. */ -# define TS_VFY_VERSION (1u << 1) -/* Verify if the policy supplied by the user matches the policy of the TSA. */ -# define TS_VFY_POLICY (1u << 2) -/* - * Verify the message imprint provided by the user. This flag should not be - * specified with TS_VFY_DATA. - */ -# define TS_VFY_IMPRINT (1u << 3) -/* - * Verify the message imprint computed by the verify method from the user - * provided data and the MD algorithm of the response. This flag should not - * be specified with TS_VFY_IMPRINT. - */ -# define TS_VFY_DATA (1u << 4) -/* Verify the nonce value. */ -# define TS_VFY_NONCE (1u << 5) -/* Verify if the TSA name field matches the signer certificate. */ -# define TS_VFY_SIGNER (1u << 6) -/* Verify if the TSA name field equals to the user provided name. */ -# define TS_VFY_TSA_NAME (1u << 7) - -/* You can use the following convenience constants. */ -# define TS_VFY_ALL_IMPRINT (TS_VFY_SIGNATURE \ - | TS_VFY_VERSION \ - | TS_VFY_POLICY \ - | TS_VFY_IMPRINT \ - | TS_VFY_NONCE \ - | TS_VFY_SIGNER \ - | TS_VFY_TSA_NAME) -# define TS_VFY_ALL_DATA (TS_VFY_SIGNATURE \ - | TS_VFY_VERSION \ - | TS_VFY_POLICY \ - | TS_VFY_DATA \ - | TS_VFY_NONCE \ - | TS_VFY_SIGNER \ - | TS_VFY_TSA_NAME) - -typedef struct TS_verify_ctx { - /* Set this to the union of TS_VFY_... flags you want to carry out. */ - unsigned flags; - /* Must be set only with TS_VFY_SIGNATURE. certs is optional. */ - X509_STORE *store; - STACK_OF(X509) *certs; - /* Must be set only with TS_VFY_POLICY. */ - ASN1_OBJECT *policy; - /* - * Must be set only with TS_VFY_IMPRINT. If md_alg is NULL, the - * algorithm from the response is used. - */ - X509_ALGOR *md_alg; - unsigned char *imprint; - unsigned imprint_len; - /* Must be set only with TS_VFY_DATA. */ - BIO *data; - /* Must be set only with TS_VFY_TSA_NAME. */ - ASN1_INTEGER *nonce; - /* Must be set only with TS_VFY_TSA_NAME. */ - GENERAL_NAME *tsa_name; -} TS_VERIFY_CTX; - -int TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response); -int TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token); - -/* - * Declarations related to response verification context, - * they are defined in ts/ts_verify_ctx.c. - */ - -/* Set all fields to zero. */ -TS_VERIFY_CTX *TS_VERIFY_CTX_new(void); -void TS_VERIFY_CTX_init(TS_VERIFY_CTX *ctx); -void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx); -void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx); - -/*- - * If ctx is NULL, it allocates and returns a new object, otherwise - * it returns ctx. It initialises all the members as follows: - * flags = TS_VFY_ALL_IMPRINT & ~(TS_VFY_TSA_NAME | TS_VFY_SIGNATURE) - * certs = NULL - * store = NULL - * policy = policy from the request or NULL if absent (in this case - * TS_VFY_POLICY is cleared from flags as well) - * md_alg = MD algorithm from request - * imprint, imprint_len = imprint from request - * data = NULL - * nonce, nonce_len = nonce from the request or NULL if absent (in this case - * TS_VFY_NONCE is cleared from flags as well) - * tsa_name = NULL - * Important: after calling this method TS_VFY_SIGNATURE should be added! - */ -TS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx); - -/* Function declarations for TS_RESP defined in ts/ts_resp_print.c */ - -int TS_RESP_print_bio(BIO *bio, TS_RESP *a); -int TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a); -int TS_TST_INFO_print_bio(BIO *bio, TS_TST_INFO *a); - -/* Common utility functions defined in ts/ts_lib.c */ - -int TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num); -int TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj); -int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions); -int TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg); -int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *msg); - -/* - * Function declarations for handling configuration options, defined in - * ts/ts_conf.c - */ - -X509 *TS_CONF_load_cert(const char *file); -STACK_OF(X509) *TS_CONF_load_certs(const char *file); -EVP_PKEY *TS_CONF_load_key(const char *file, const char *pass); -const char *TS_CONF_get_tsa_section(CONF *conf, const char *section); -int TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, - TS_RESP_CTX *ctx); -int TS_CONF_set_crypto_device(CONF *conf, const char *section, - const char *device); -int TS_CONF_set_default_engine(const char *name); -int TS_CONF_set_signer_cert(CONF *conf, const char *section, - const char *cert, TS_RESP_CTX *ctx); -int TS_CONF_set_certs(CONF *conf, const char *section, const char *certs, - TS_RESP_CTX *ctx); -int TS_CONF_set_signer_key(CONF *conf, const char *section, - const char *key, const char *pass, - TS_RESP_CTX *ctx); -int TS_CONF_set_def_policy(CONF *conf, const char *section, - const char *policy, TS_RESP_CTX *ctx); -int TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx); -int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx); -int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx); -int TS_CONF_set_clock_precision_digits(CONF *conf, const char *section, - TS_RESP_CTX *ctx); -int TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx); -int TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx); -int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, - TS_RESP_CTX *ctx); - -/* -------------------------------------------------- */ -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_TS_strings(void); - -/* Error codes for the TS functions. */ - -/* Function codes. */ -# define TS_F_D2I_TS_RESP 147 -# define TS_F_DEF_SERIAL_CB 110 -# define TS_F_DEF_TIME_CB 111 -# define TS_F_ESS_ADD_SIGNING_CERT 112 -# define TS_F_ESS_CERT_ID_NEW_INIT 113 -# define TS_F_ESS_SIGNING_CERT_NEW_INIT 114 -# define TS_F_INT_TS_RESP_VERIFY_TOKEN 149 -# define TS_F_PKCS7_TO_TS_TST_INFO 148 -# define TS_F_TS_ACCURACY_SET_MICROS 115 -# define TS_F_TS_ACCURACY_SET_MILLIS 116 -# define TS_F_TS_ACCURACY_SET_SECONDS 117 -# define TS_F_TS_CHECK_IMPRINTS 100 -# define TS_F_TS_CHECK_NONCES 101 -# define TS_F_TS_CHECK_POLICY 102 -# define TS_F_TS_CHECK_SIGNING_CERTS 103 -# define TS_F_TS_CHECK_STATUS_INFO 104 -# define TS_F_TS_COMPUTE_IMPRINT 145 -# define TS_F_TS_CONF_SET_DEFAULT_ENGINE 146 -# define TS_F_TS_GET_STATUS_TEXT 105 -# define TS_F_TS_MSG_IMPRINT_SET_ALGO 118 -# define TS_F_TS_REQ_SET_MSG_IMPRINT 119 -# define TS_F_TS_REQ_SET_NONCE 120 -# define TS_F_TS_REQ_SET_POLICY_ID 121 -# define TS_F_TS_RESP_CREATE_RESPONSE 122 -# define TS_F_TS_RESP_CREATE_TST_INFO 123 -# define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO 124 -# define TS_F_TS_RESP_CTX_ADD_MD 125 -# define TS_F_TS_RESP_CTX_ADD_POLICY 126 -# define TS_F_TS_RESP_CTX_NEW 127 -# define TS_F_TS_RESP_CTX_SET_ACCURACY 128 -# define TS_F_TS_RESP_CTX_SET_CERTS 129 -# define TS_F_TS_RESP_CTX_SET_DEF_POLICY 130 -# define TS_F_TS_RESP_CTX_SET_SIGNER_CERT 131 -# define TS_F_TS_RESP_CTX_SET_STATUS_INFO 132 -# define TS_F_TS_RESP_GET_POLICY 133 -# define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION 134 -# define TS_F_TS_RESP_SET_STATUS_INFO 135 -# define TS_F_TS_RESP_SET_TST_INFO 150 -# define TS_F_TS_RESP_SIGN 136 -# define TS_F_TS_RESP_VERIFY_SIGNATURE 106 -# define TS_F_TS_RESP_VERIFY_TOKEN 107 -# define TS_F_TS_TST_INFO_SET_ACCURACY 137 -# define TS_F_TS_TST_INFO_SET_MSG_IMPRINT 138 -# define TS_F_TS_TST_INFO_SET_NONCE 139 -# define TS_F_TS_TST_INFO_SET_POLICY_ID 140 -# define TS_F_TS_TST_INFO_SET_SERIAL 141 -# define TS_F_TS_TST_INFO_SET_TIME 142 -# define TS_F_TS_TST_INFO_SET_TSA 143 -# define TS_F_TS_VERIFY 108 -# define TS_F_TS_VERIFY_CERT 109 -# define TS_F_TS_VERIFY_CTX_NEW 144 - -/* Reason codes. */ -# define TS_R_BAD_PKCS7_TYPE 132 -# define TS_R_BAD_TYPE 133 -# define TS_R_CERTIFICATE_VERIFY_ERROR 100 -# define TS_R_COULD_NOT_SET_ENGINE 127 -# define TS_R_COULD_NOT_SET_TIME 115 -# define TS_R_D2I_TS_RESP_INT_FAILED 128 -# define TS_R_DETACHED_CONTENT 134 -# define TS_R_ESS_ADD_SIGNING_CERT_ERROR 116 -# define TS_R_ESS_SIGNING_CERTIFICATE_ERROR 101 -# define TS_R_INVALID_NULL_POINTER 102 -# define TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE 117 -# define TS_R_MESSAGE_IMPRINT_MISMATCH 103 -# define TS_R_NONCE_MISMATCH 104 -# define TS_R_NONCE_NOT_RETURNED 105 -# define TS_R_NO_CONTENT 106 -# define TS_R_NO_TIME_STAMP_TOKEN 107 -# define TS_R_PKCS7_ADD_SIGNATURE_ERROR 118 -# define TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR 119 -# define TS_R_PKCS7_TO_TS_TST_INFO_FAILED 129 -# define TS_R_POLICY_MISMATCH 108 -# define TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 120 -# define TS_R_RESPONSE_SETUP_ERROR 121 -# define TS_R_SIGNATURE_FAILURE 109 -# define TS_R_THERE_MUST_BE_ONE_SIGNER 110 -# define TS_R_TIME_SYSCALL_ERROR 122 -# define TS_R_TOKEN_NOT_PRESENT 130 -# define TS_R_TOKEN_PRESENT 131 -# define TS_R_TSA_NAME_MISMATCH 111 -# define TS_R_TSA_UNTRUSTED 112 -# define TS_R_TST_INFO_SETUP_ERROR 123 -# define TS_R_TS_DATASIGN 124 -# define TS_R_UNACCEPTABLE_POLICY 125 -# define TS_R_UNSUPPORTED_MD_ALGORITHM 126 -# define TS_R_UNSUPPORTED_VERSION 113 -# define TS_R_WRONG_CONTENT_TYPE 114 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_TS_H +# define HEADER_TS_H + +# include + +# ifndef OPENSSL_NO_TS +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +# include +# include + +typedef struct TS_msg_imprint_st TS_MSG_IMPRINT; +typedef struct TS_req_st TS_REQ; +typedef struct TS_accuracy_st TS_ACCURACY; +typedef struct TS_tst_info_st TS_TST_INFO; + +/* Possible values for status. */ +# define TS_STATUS_GRANTED 0 +# define TS_STATUS_GRANTED_WITH_MODS 1 +# define TS_STATUS_REJECTION 2 +# define TS_STATUS_WAITING 3 +# define TS_STATUS_REVOCATION_WARNING 4 +# define TS_STATUS_REVOCATION_NOTIFICATION 5 + +/* Possible values for failure_info. */ +# define TS_INFO_BAD_ALG 0 +# define TS_INFO_BAD_REQUEST 2 +# define TS_INFO_BAD_DATA_FORMAT 5 +# define TS_INFO_TIME_NOT_AVAILABLE 14 +# define TS_INFO_UNACCEPTED_POLICY 15 +# define TS_INFO_UNACCEPTED_EXTENSION 16 +# define TS_INFO_ADD_INFO_NOT_AVAILABLE 17 +# define TS_INFO_SYSTEM_FAILURE 25 + + +typedef struct TS_status_info_st TS_STATUS_INFO; +typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL; +typedef struct ESS_cert_id ESS_CERT_ID; +typedef struct ESS_signing_cert ESS_SIGNING_CERT; + +DEFINE_STACK_OF(ESS_CERT_ID) + +typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2; +typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2; + +DEFINE_STACK_OF(ESS_CERT_ID_V2) + +typedef struct TS_resp_st TS_RESP; + +TS_REQ *TS_REQ_new(void); +void TS_REQ_free(TS_REQ *a); +int i2d_TS_REQ(const TS_REQ *a, unsigned char **pp); +TS_REQ *d2i_TS_REQ(TS_REQ **a, const unsigned char **pp, long length); + +TS_REQ *TS_REQ_dup(TS_REQ *a); + +#ifndef OPENSSL_NO_STDIO +TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a); +int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a); +#endif +TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a); +int i2d_TS_REQ_bio(BIO *fp, TS_REQ *a); + +TS_MSG_IMPRINT *TS_MSG_IMPRINT_new(void); +void TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a); +int i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **pp); +TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a, + const unsigned char **pp, long length); + +TS_MSG_IMPRINT *TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *a); + +#ifndef OPENSSL_NO_STDIO +TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a); +int i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a); +#endif +TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *bio, TS_MSG_IMPRINT **a); +int i2d_TS_MSG_IMPRINT_bio(BIO *bio, TS_MSG_IMPRINT *a); + +TS_RESP *TS_RESP_new(void); +void TS_RESP_free(TS_RESP *a); +int i2d_TS_RESP(const TS_RESP *a, unsigned char **pp); +TS_RESP *d2i_TS_RESP(TS_RESP **a, const unsigned char **pp, long length); +TS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token); +TS_RESP *TS_RESP_dup(TS_RESP *a); + +#ifndef OPENSSL_NO_STDIO +TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a); +int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a); +#endif +TS_RESP *d2i_TS_RESP_bio(BIO *bio, TS_RESP **a); +int i2d_TS_RESP_bio(BIO *bio, TS_RESP *a); + +TS_STATUS_INFO *TS_STATUS_INFO_new(void); +void TS_STATUS_INFO_free(TS_STATUS_INFO *a); +int i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **pp); +TS_STATUS_INFO *d2i_TS_STATUS_INFO(TS_STATUS_INFO **a, + const unsigned char **pp, long length); +TS_STATUS_INFO *TS_STATUS_INFO_dup(TS_STATUS_INFO *a); + +TS_TST_INFO *TS_TST_INFO_new(void); +void TS_TST_INFO_free(TS_TST_INFO *a); +int i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **pp); +TS_TST_INFO *d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **pp, + long length); +TS_TST_INFO *TS_TST_INFO_dup(TS_TST_INFO *a); + +#ifndef OPENSSL_NO_STDIO +TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a); +int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a); +#endif +TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *bio, TS_TST_INFO **a); +int i2d_TS_TST_INFO_bio(BIO *bio, TS_TST_INFO *a); + +TS_ACCURACY *TS_ACCURACY_new(void); +void TS_ACCURACY_free(TS_ACCURACY *a); +int i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **pp); +TS_ACCURACY *d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **pp, + long length); +TS_ACCURACY *TS_ACCURACY_dup(TS_ACCURACY *a); + +ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_new(void); +void ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a); +int i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **pp); +ESS_ISSUER_SERIAL *d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a, + const unsigned char **pp, + long length); +ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_dup(ESS_ISSUER_SERIAL *a); + +ESS_CERT_ID *ESS_CERT_ID_new(void); +void ESS_CERT_ID_free(ESS_CERT_ID *a); +int i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **pp); +ESS_CERT_ID *d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **pp, + long length); +ESS_CERT_ID *ESS_CERT_ID_dup(ESS_CERT_ID *a); + +ESS_SIGNING_CERT *ESS_SIGNING_CERT_new(void); +void ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a); +int i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **pp); +ESS_SIGNING_CERT *d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a, + const unsigned char **pp, long length); +ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a); + +ESS_CERT_ID_V2 *ESS_CERT_ID_V2_new(void); +void ESS_CERT_ID_V2_free(ESS_CERT_ID_V2 *a); +int i2d_ESS_CERT_ID_V2(const ESS_CERT_ID_V2 *a, unsigned char **pp); +ESS_CERT_ID_V2 *d2i_ESS_CERT_ID_V2(ESS_CERT_ID_V2 **a, + const unsigned char **pp, long length); +ESS_CERT_ID_V2 *ESS_CERT_ID_V2_dup(ESS_CERT_ID_V2 *a); + +ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_new(void); +void ESS_SIGNING_CERT_V2_free(ESS_SIGNING_CERT_V2 *a); +int i2d_ESS_SIGNING_CERT_V2(const ESS_SIGNING_CERT_V2 *a, unsigned char **pp); +ESS_SIGNING_CERT_V2 *d2i_ESS_SIGNING_CERT_V2(ESS_SIGNING_CERT_V2 **a, + const unsigned char **pp, + long length); +ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_dup(ESS_SIGNING_CERT_V2 *a); + +int TS_REQ_set_version(TS_REQ *a, long version); +long TS_REQ_get_version(const TS_REQ *a); + +int TS_STATUS_INFO_set_status(TS_STATUS_INFO *a, int i); +const ASN1_INTEGER *TS_STATUS_INFO_get0_status(const TS_STATUS_INFO *a); + +const STACK_OF(ASN1_UTF8STRING) * +TS_STATUS_INFO_get0_text(const TS_STATUS_INFO *a); + +const ASN1_BIT_STRING * +TS_STATUS_INFO_get0_failure_info(const TS_STATUS_INFO *a); + +int TS_REQ_set_msg_imprint(TS_REQ *a, TS_MSG_IMPRINT *msg_imprint); +TS_MSG_IMPRINT *TS_REQ_get_msg_imprint(TS_REQ *a); + +int TS_MSG_IMPRINT_set_algo(TS_MSG_IMPRINT *a, X509_ALGOR *alg); +X509_ALGOR *TS_MSG_IMPRINT_get_algo(TS_MSG_IMPRINT *a); + +int TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len); +ASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a); + +int TS_REQ_set_policy_id(TS_REQ *a, const ASN1_OBJECT *policy); +ASN1_OBJECT *TS_REQ_get_policy_id(TS_REQ *a); + +int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce); +const ASN1_INTEGER *TS_REQ_get_nonce(const TS_REQ *a); + +int TS_REQ_set_cert_req(TS_REQ *a, int cert_req); +int TS_REQ_get_cert_req(const TS_REQ *a); + +STACK_OF(X509_EXTENSION) *TS_REQ_get_exts(TS_REQ *a); +void TS_REQ_ext_free(TS_REQ *a); +int TS_REQ_get_ext_count(TS_REQ *a); +int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos); +int TS_REQ_get_ext_by_OBJ(TS_REQ *a, const ASN1_OBJECT *obj, int lastpos); +int TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos); +X509_EXTENSION *TS_REQ_get_ext(TS_REQ *a, int loc); +X509_EXTENSION *TS_REQ_delete_ext(TS_REQ *a, int loc); +int TS_REQ_add_ext(TS_REQ *a, X509_EXTENSION *ex, int loc); +void *TS_REQ_get_ext_d2i(TS_REQ *a, int nid, int *crit, int *idx); + +/* Function declarations for TS_REQ defined in ts/ts_req_print.c */ + +int TS_REQ_print_bio(BIO *bio, TS_REQ *a); + +/* Function declarations for TS_RESP defined in ts/ts_resp_utils.c */ + +int TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *info); +TS_STATUS_INFO *TS_RESP_get_status_info(TS_RESP *a); + +/* Caller loses ownership of PKCS7 and TS_TST_INFO objects. */ +void TS_RESP_set_tst_info(TS_RESP *a, PKCS7 *p7, TS_TST_INFO *tst_info); +PKCS7 *TS_RESP_get_token(TS_RESP *a); +TS_TST_INFO *TS_RESP_get_tst_info(TS_RESP *a); + +int TS_TST_INFO_set_version(TS_TST_INFO *a, long version); +long TS_TST_INFO_get_version(const TS_TST_INFO *a); + +int TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy_id); +ASN1_OBJECT *TS_TST_INFO_get_policy_id(TS_TST_INFO *a); + +int TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint); +TS_MSG_IMPRINT *TS_TST_INFO_get_msg_imprint(TS_TST_INFO *a); + +int TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial); +const ASN1_INTEGER *TS_TST_INFO_get_serial(const TS_TST_INFO *a); + +int TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime); +const ASN1_GENERALIZEDTIME *TS_TST_INFO_get_time(const TS_TST_INFO *a); + +int TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy); +TS_ACCURACY *TS_TST_INFO_get_accuracy(TS_TST_INFO *a); + +int TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds); +const ASN1_INTEGER *TS_ACCURACY_get_seconds(const TS_ACCURACY *a); + +int TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis); +const ASN1_INTEGER *TS_ACCURACY_get_millis(const TS_ACCURACY *a); + +int TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros); +const ASN1_INTEGER *TS_ACCURACY_get_micros(const TS_ACCURACY *a); + +int TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering); +int TS_TST_INFO_get_ordering(const TS_TST_INFO *a); + +int TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce); +const ASN1_INTEGER *TS_TST_INFO_get_nonce(const TS_TST_INFO *a); + +int TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa); +GENERAL_NAME *TS_TST_INFO_get_tsa(TS_TST_INFO *a); + +STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a); +void TS_TST_INFO_ext_free(TS_TST_INFO *a); +int TS_TST_INFO_get_ext_count(TS_TST_INFO *a); +int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos); +int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, const ASN1_OBJECT *obj, + int lastpos); +int TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos); +X509_EXTENSION *TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc); +X509_EXTENSION *TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc); +int TS_TST_INFO_add_ext(TS_TST_INFO *a, X509_EXTENSION *ex, int loc); +void *TS_TST_INFO_get_ext_d2i(TS_TST_INFO *a, int nid, int *crit, int *idx); + +/* + * Declarations related to response generation, defined in ts/ts_resp_sign.c. + */ + +/* Optional flags for response generation. */ + +/* Don't include the TSA name in response. */ +# define TS_TSA_NAME 0x01 + +/* Set ordering to true in response. */ +# define TS_ORDERING 0x02 + +/* + * Include the signer certificate and the other specified certificates in + * the ESS signing certificate attribute beside the PKCS7 signed data. + * Only the signer certificates is included by default. + */ +# define TS_ESS_CERT_ID_CHAIN 0x04 + +/* Forward declaration. */ +struct TS_resp_ctx; + +/* This must return a unique number less than 160 bits long. */ +typedef ASN1_INTEGER *(*TS_serial_cb) (struct TS_resp_ctx *, void *); + +/* + * This must return the seconds and microseconds since Jan 1, 1970 in the sec + * and usec variables allocated by the caller. Return non-zero for success + * and zero for failure. + */ +typedef int (*TS_time_cb) (struct TS_resp_ctx *, void *, long *sec, + long *usec); + +/* + * This must process the given extension. It can modify the TS_TST_INFO + * object of the context. Return values: !0 (processed), 0 (error, it must + * set the status info/failure info of the response). + */ +typedef int (*TS_extension_cb) (struct TS_resp_ctx *, X509_EXTENSION *, + void *); + +typedef struct TS_resp_ctx TS_RESP_CTX; + +DEFINE_STACK_OF_CONST(EVP_MD) + +/* Creates a response context that can be used for generating responses. */ +TS_RESP_CTX *TS_RESP_CTX_new(void); +void TS_RESP_CTX_free(TS_RESP_CTX *ctx); + +/* This parameter must be set. */ +int TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer); + +/* This parameter must be set. */ +int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key); + +int TS_RESP_CTX_set_signer_digest(TS_RESP_CTX *ctx, + const EVP_MD *signer_digest); +int TS_RESP_CTX_set_ess_cert_id_digest(TS_RESP_CTX *ctx, const EVP_MD *md); + +/* This parameter must be set. */ +int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy); + +/* No additional certs are included in the response by default. */ +int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs); + +/* + * Adds a new acceptable policy, only the default policy is accepted by + * default. + */ +int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy); + +/* + * Adds a new acceptable message digest. Note that no message digests are + * accepted by default. The md argument is shared with the caller. + */ +int TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md); + +/* Accuracy is not included by default. */ +int TS_RESP_CTX_set_accuracy(TS_RESP_CTX *ctx, + int secs, int millis, int micros); + +/* + * Clock precision digits, i.e. the number of decimal digits: '0' means sec, + * '3' msec, '6' usec, and so on. Default is 0. + */ +int TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx, + unsigned clock_precision_digits); +/* At most we accept usec precision. */ +# define TS_MAX_CLOCK_PRECISION_DIGITS 6 + +/* Maximum status message length */ +# define TS_MAX_STATUS_LENGTH (1024 * 1024) + +/* No flags are set by default. */ +void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags); + +/* Default callback always returns a constant. */ +void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data); + +/* Default callback uses the gettimeofday() and gmtime() system calls. */ +void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data); + +/* + * Default callback rejects all extensions. The extension callback is called + * when the TS_TST_INFO object is already set up and not signed yet. + */ +/* FIXME: extension handling is not tested yet. */ +void TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx, + TS_extension_cb cb, void *data); + +/* The following methods can be used in the callbacks. */ +int TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx, + int status, const char *text); + +/* Sets the status info only if it is still TS_STATUS_GRANTED. */ +int TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, + int status, const char *text); + +int TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure); + +/* The get methods below can be used in the extension callback. */ +TS_REQ *TS_RESP_CTX_get_request(TS_RESP_CTX *ctx); + +TS_TST_INFO *TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx); + +/* + * Creates the signed TS_TST_INFO and puts it in TS_RESP. + * In case of errors it sets the status info properly. + * Returns NULL only in case of memory allocation/fatal error. + */ +TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio); + +/* + * Declarations related to response verification, + * they are defined in ts/ts_resp_verify.c. + */ + +int TS_RESP_verify_signature(PKCS7 *token, STACK_OF(X509) *certs, + X509_STORE *store, X509 **signer_out); + +/* Context structure for the generic verify method. */ + +/* Verify the signer's certificate and the signature of the response. */ +# define TS_VFY_SIGNATURE (1u << 0) +/* Verify the version number of the response. */ +# define TS_VFY_VERSION (1u << 1) +/* Verify if the policy supplied by the user matches the policy of the TSA. */ +# define TS_VFY_POLICY (1u << 2) +/* + * Verify the message imprint provided by the user. This flag should not be + * specified with TS_VFY_DATA. + */ +# define TS_VFY_IMPRINT (1u << 3) +/* + * Verify the message imprint computed by the verify method from the user + * provided data and the MD algorithm of the response. This flag should not + * be specified with TS_VFY_IMPRINT. + */ +# define TS_VFY_DATA (1u << 4) +/* Verify the nonce value. */ +# define TS_VFY_NONCE (1u << 5) +/* Verify if the TSA name field matches the signer certificate. */ +# define TS_VFY_SIGNER (1u << 6) +/* Verify if the TSA name field equals to the user provided name. */ +# define TS_VFY_TSA_NAME (1u << 7) + +/* You can use the following convenience constants. */ +# define TS_VFY_ALL_IMPRINT (TS_VFY_SIGNATURE \ + | TS_VFY_VERSION \ + | TS_VFY_POLICY \ + | TS_VFY_IMPRINT \ + | TS_VFY_NONCE \ + | TS_VFY_SIGNER \ + | TS_VFY_TSA_NAME) +# define TS_VFY_ALL_DATA (TS_VFY_SIGNATURE \ + | TS_VFY_VERSION \ + | TS_VFY_POLICY \ + | TS_VFY_DATA \ + | TS_VFY_NONCE \ + | TS_VFY_SIGNER \ + | TS_VFY_TSA_NAME) + +typedef struct TS_verify_ctx TS_VERIFY_CTX; + +int TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response); +int TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token); + +/* + * Declarations related to response verification context, + */ +TS_VERIFY_CTX *TS_VERIFY_CTX_new(void); +void TS_VERIFY_CTX_init(TS_VERIFY_CTX *ctx); +void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx); +void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx); +int TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int f); +int TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int f); +BIO *TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *b); +unsigned char *TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx, + unsigned char *hexstr, long len); +X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s); +STACK_OF(X509) *TS_VERIFY_CTS_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs); + +/*- + * If ctx is NULL, it allocates and returns a new object, otherwise + * it returns ctx. It initialises all the members as follows: + * flags = TS_VFY_ALL_IMPRINT & ~(TS_VFY_TSA_NAME | TS_VFY_SIGNATURE) + * certs = NULL + * store = NULL + * policy = policy from the request or NULL if absent (in this case + * TS_VFY_POLICY is cleared from flags as well) + * md_alg = MD algorithm from request + * imprint, imprint_len = imprint from request + * data = NULL + * nonce, nonce_len = nonce from the request or NULL if absent (in this case + * TS_VFY_NONCE is cleared from flags as well) + * tsa_name = NULL + * Important: after calling this method TS_VFY_SIGNATURE should be added! + */ +TS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx); + +/* Function declarations for TS_RESP defined in ts/ts_resp_print.c */ + +int TS_RESP_print_bio(BIO *bio, TS_RESP *a); +int TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a); +int TS_TST_INFO_print_bio(BIO *bio, TS_TST_INFO *a); + +/* Common utility functions defined in ts/ts_lib.c */ + +int TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num); +int TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj); +int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions); +int TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg); +int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *msg); + +/* + * Function declarations for handling configuration options, defined in + * ts/ts_conf.c + */ + +X509 *TS_CONF_load_cert(const char *file); +STACK_OF(X509) *TS_CONF_load_certs(const char *file); +EVP_PKEY *TS_CONF_load_key(const char *file, const char *pass); +const char *TS_CONF_get_tsa_section(CONF *conf, const char *section); +int TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, + TS_RESP_CTX *ctx); +#ifndef OPENSSL_NO_ENGINE +int TS_CONF_set_crypto_device(CONF *conf, const char *section, + const char *device); +int TS_CONF_set_default_engine(const char *name); +#endif +int TS_CONF_set_signer_cert(CONF *conf, const char *section, + const char *cert, TS_RESP_CTX *ctx); +int TS_CONF_set_certs(CONF *conf, const char *section, const char *certs, + TS_RESP_CTX *ctx); +int TS_CONF_set_signer_key(CONF *conf, const char *section, + const char *key, const char *pass, + TS_RESP_CTX *ctx); +int TS_CONF_set_signer_digest(CONF *conf, const char *section, + const char *md, TS_RESP_CTX *ctx); +int TS_CONF_set_def_policy(CONF *conf, const char *section, + const char *policy, TS_RESP_CTX *ctx); +int TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx); +int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx); +int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx); +int TS_CONF_set_clock_precision_digits(CONF *conf, const char *section, + TS_RESP_CTX *ctx); +int TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx); +int TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx); +int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, + TS_RESP_CTX *ctx); +int TS_CONF_set_ess_cert_id_digest(CONF *conf, const char *section, + TS_RESP_CTX *ctx); + +# ifdef __cplusplus +} +# endif +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/tserr.h b/src/Mayaqua/win32_inc/openssl/tserr.h new file mode 100644 index 00000000..07f23339 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/tserr.h @@ -0,0 +1,132 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_TSERR_H +# define HEADER_TSERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# include + +# ifndef OPENSSL_NO_TS + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_TS_strings(void); + +/* + * TS function codes. + */ +# define TS_F_DEF_SERIAL_CB 110 +# define TS_F_DEF_TIME_CB 111 +# define TS_F_ESS_ADD_SIGNING_CERT 112 +# define TS_F_ESS_ADD_SIGNING_CERT_V2 147 +# define TS_F_ESS_CERT_ID_NEW_INIT 113 +# define TS_F_ESS_CERT_ID_V2_NEW_INIT 156 +# define TS_F_ESS_SIGNING_CERT_NEW_INIT 114 +# define TS_F_ESS_SIGNING_CERT_V2_NEW_INIT 157 +# define TS_F_INT_TS_RESP_VERIFY_TOKEN 149 +# define TS_F_PKCS7_TO_TS_TST_INFO 148 +# define TS_F_TS_ACCURACY_SET_MICROS 115 +# define TS_F_TS_ACCURACY_SET_MILLIS 116 +# define TS_F_TS_ACCURACY_SET_SECONDS 117 +# define TS_F_TS_CHECK_IMPRINTS 100 +# define TS_F_TS_CHECK_NONCES 101 +# define TS_F_TS_CHECK_POLICY 102 +# define TS_F_TS_CHECK_SIGNING_CERTS 103 +# define TS_F_TS_CHECK_STATUS_INFO 104 +# define TS_F_TS_COMPUTE_IMPRINT 145 +# define TS_F_TS_CONF_INVALID 151 +# define TS_F_TS_CONF_LOAD_CERT 153 +# define TS_F_TS_CONF_LOAD_CERTS 154 +# define TS_F_TS_CONF_LOAD_KEY 155 +# define TS_F_TS_CONF_LOOKUP_FAIL 152 +# define TS_F_TS_CONF_SET_DEFAULT_ENGINE 146 +# define TS_F_TS_GET_STATUS_TEXT 105 +# define TS_F_TS_MSG_IMPRINT_SET_ALGO 118 +# define TS_F_TS_REQ_SET_MSG_IMPRINT 119 +# define TS_F_TS_REQ_SET_NONCE 120 +# define TS_F_TS_REQ_SET_POLICY_ID 121 +# define TS_F_TS_RESP_CREATE_RESPONSE 122 +# define TS_F_TS_RESP_CREATE_TST_INFO 123 +# define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO 124 +# define TS_F_TS_RESP_CTX_ADD_MD 125 +# define TS_F_TS_RESP_CTX_ADD_POLICY 126 +# define TS_F_TS_RESP_CTX_NEW 127 +# define TS_F_TS_RESP_CTX_SET_ACCURACY 128 +# define TS_F_TS_RESP_CTX_SET_CERTS 129 +# define TS_F_TS_RESP_CTX_SET_DEF_POLICY 130 +# define TS_F_TS_RESP_CTX_SET_SIGNER_CERT 131 +# define TS_F_TS_RESP_CTX_SET_STATUS_INFO 132 +# define TS_F_TS_RESP_GET_POLICY 133 +# define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION 134 +# define TS_F_TS_RESP_SET_STATUS_INFO 135 +# define TS_F_TS_RESP_SET_TST_INFO 150 +# define TS_F_TS_RESP_SIGN 136 +# define TS_F_TS_RESP_VERIFY_SIGNATURE 106 +# define TS_F_TS_TST_INFO_SET_ACCURACY 137 +# define TS_F_TS_TST_INFO_SET_MSG_IMPRINT 138 +# define TS_F_TS_TST_INFO_SET_NONCE 139 +# define TS_F_TS_TST_INFO_SET_POLICY_ID 140 +# define TS_F_TS_TST_INFO_SET_SERIAL 141 +# define TS_F_TS_TST_INFO_SET_TIME 142 +# define TS_F_TS_TST_INFO_SET_TSA 143 +# define TS_F_TS_VERIFY 108 +# define TS_F_TS_VERIFY_CERT 109 +# define TS_F_TS_VERIFY_CTX_NEW 144 + +/* + * TS reason codes. + */ +# define TS_R_BAD_PKCS7_TYPE 132 +# define TS_R_BAD_TYPE 133 +# define TS_R_CANNOT_LOAD_CERT 137 +# define TS_R_CANNOT_LOAD_KEY 138 +# define TS_R_CERTIFICATE_VERIFY_ERROR 100 +# define TS_R_COULD_NOT_SET_ENGINE 127 +# define TS_R_COULD_NOT_SET_TIME 115 +# define TS_R_DETACHED_CONTENT 134 +# define TS_R_ESS_ADD_SIGNING_CERT_ERROR 116 +# define TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR 139 +# define TS_R_ESS_SIGNING_CERTIFICATE_ERROR 101 +# define TS_R_INVALID_NULL_POINTER 102 +# define TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE 117 +# define TS_R_MESSAGE_IMPRINT_MISMATCH 103 +# define TS_R_NONCE_MISMATCH 104 +# define TS_R_NONCE_NOT_RETURNED 105 +# define TS_R_NO_CONTENT 106 +# define TS_R_NO_TIME_STAMP_TOKEN 107 +# define TS_R_PKCS7_ADD_SIGNATURE_ERROR 118 +# define TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR 119 +# define TS_R_PKCS7_TO_TS_TST_INFO_FAILED 129 +# define TS_R_POLICY_MISMATCH 108 +# define TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 120 +# define TS_R_RESPONSE_SETUP_ERROR 121 +# define TS_R_SIGNATURE_FAILURE 109 +# define TS_R_THERE_MUST_BE_ONE_SIGNER 110 +# define TS_R_TIME_SYSCALL_ERROR 122 +# define TS_R_TOKEN_NOT_PRESENT 130 +# define TS_R_TOKEN_PRESENT 131 +# define TS_R_TSA_NAME_MISMATCH 111 +# define TS_R_TSA_UNTRUSTED 112 +# define TS_R_TST_INFO_SETUP_ERROR 123 +# define TS_R_TS_DATASIGN 124 +# define TS_R_UNACCEPTABLE_POLICY 125 +# define TS_R_UNSUPPORTED_MD_ALGORITHM 126 +# define TS_R_UNSUPPORTED_VERSION 113 +# define TS_R_VAR_BAD_VALUE 135 +# define TS_R_VAR_LOOKUP_FAILURE 136 +# define TS_R_WRONG_CONTENT_TYPE 114 + +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/txt_db.h b/src/Mayaqua/win32_inc/openssl/txt_db.h index 7c18002e..ec981a43 100644 --- a/src/Mayaqua/win32_inc/openssl/txt_db.h +++ b/src/Mayaqua/win32_inc/openssl/txt_db.h @@ -1,112 +1,57 @@ -/* crypto/txt_db/txt_db.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_TXT_DB_H -# define HEADER_TXT_DB_H - -# include -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# include - -# define DB_ERROR_OK 0 -# define DB_ERROR_MALLOC 1 -# define DB_ERROR_INDEX_CLASH 2 -# define DB_ERROR_INDEX_OUT_OF_RANGE 3 -# define DB_ERROR_NO_INDEX 4 -# define DB_ERROR_INSERT_INDEX_CLASH 5 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef OPENSSL_STRING *OPENSSL_PSTRING; -DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) - -typedef struct txt_db_st { - int num_fields; - STACK_OF(OPENSSL_PSTRING) *data; - LHASH_OF(OPENSSL_STRING) **index; - int (**qual) (OPENSSL_STRING *); - long error; - long arg1; - long arg2; - OPENSSL_STRING *arg_row; -} TXT_DB; - -# ifndef OPENSSL_NO_BIO -TXT_DB *TXT_DB_read(BIO *in, int num); -long TXT_DB_write(BIO *out, TXT_DB *db); -# else -TXT_DB *TXT_DB_read(char *in, int num); -long TXT_DB_write(char *out, TXT_DB *db); -# endif -int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), - LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); -void TXT_DB_free(TXT_DB *db); -OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, - OPENSSL_STRING *value); -int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_TXT_DB_H +# define HEADER_TXT_DB_H + +# include +# include +# include +# include + +# define DB_ERROR_OK 0 +# define DB_ERROR_MALLOC 1 +# define DB_ERROR_INDEX_CLASH 2 +# define DB_ERROR_INDEX_OUT_OF_RANGE 3 +# define DB_ERROR_NO_INDEX 4 +# define DB_ERROR_INSERT_INDEX_CLASH 5 +# define DB_ERROR_WRONG_NUM_FIELDS 6 + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OPENSSL_STRING *OPENSSL_PSTRING; +DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) + +typedef struct txt_db_st { + int num_fields; + STACK_OF(OPENSSL_PSTRING) *data; + LHASH_OF(OPENSSL_STRING) **index; + int (**qual) (OPENSSL_STRING *); + long error; + long arg1; + long arg2; + OPENSSL_STRING *arg_row; +} TXT_DB; + +TXT_DB *TXT_DB_read(BIO *in, int num); +long TXT_DB_write(BIO *out, TXT_DB *db); +int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), + OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); +void TXT_DB_free(TXT_DB *db); +OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, + OPENSSL_STRING *value); +int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ui.h b/src/Mayaqua/win32_inc/openssl/ui.h index bd07f711..7c721ec8 100644 --- a/src/Mayaqua/win32_inc/openssl/ui.h +++ b/src/Mayaqua/win32_inc/openssl/ui.h @@ -1,415 +1,368 @@ -/* crypto/ui/ui.h */ -/* - * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project - * 2001. - */ -/* ==================================================================== - * Copyright (c) 2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_UI_H -# define HEADER_UI_H - -# ifndef OPENSSL_NO_DEPRECATED -# include -# endif -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Declared already in ossl_typ.h */ -/* typedef struct ui_st UI; */ -/* typedef struct ui_method_st UI_METHOD; */ - -/* - * All the following functions return -1 or NULL on error and in some cases - * (UI_process()) -2 if interrupted or in some other way cancelled. When - * everything is fine, they return 0, a positive value or a non-NULL pointer, - * all depending on their purpose. - */ - -/* Creators and destructor. */ -UI *UI_new(void); -UI *UI_new_method(const UI_METHOD *method); -void UI_free(UI *ui); - -/*- - The following functions are used to add strings to be printed and prompt - strings to prompt for data. The names are UI_{add,dup}__string - and UI_{add,dup}_input_boolean. - - UI_{add,dup}__string have the following meanings: - add add a text or prompt string. The pointers given to these - functions are used verbatim, no copying is done. - dup make a copy of the text or prompt string, then add the copy - to the collection of strings in the user interface. - - The function is a name for the functionality that the given - string shall be used for. It can be one of: - input use the string as data prompt. - verify use the string as verification prompt. This - is used to verify a previous input. - info use the string for informational output. - error use the string for error output. - Honestly, there's currently no difference between info and error for the - moment. - - UI_{add,dup}_input_boolean have the same semantics for "add" and "dup", - and are typically used when one wants to prompt for a yes/no response. - - All of the functions in this group take a UI and a prompt string. - The string input and verify addition functions also take a flag argument, - a buffer for the result to end up with, a minimum input size and a maximum - input size (the result buffer MUST be large enough to be able to contain - the maximum number of characters). Additionally, the verify addition - functions takes another buffer to compare the result against. - The boolean input functions take an action description string (which should - be safe to ignore if the expected user action is obvious, for example with - a dialog box with an OK button and a Cancel button), a string of acceptable - characters to mean OK and to mean Cancel. The two last strings are checked - to make sure they don't have common characters. Additionally, the same - flag argument as for the string input is taken, as well as a result buffer. - The result buffer is required to be at least one byte long. Depending on - the answer, the first character from the OK or the Cancel character strings - will be stored in the first byte of the result buffer. No NUL will be - added, so the result is *not* a string. - - On success, the all return an index of the added information. That index - is usefull when retrieving results with UI_get0_result(). */ -int UI_add_input_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize); -int UI_dup_input_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize); -int UI_add_verify_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize, - const char *test_buf); -int UI_dup_verify_string(UI *ui, const char *prompt, int flags, - char *result_buf, int minsize, int maxsize, - const char *test_buf); -int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc, - const char *ok_chars, const char *cancel_chars, - int flags, char *result_buf); -int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc, - const char *ok_chars, const char *cancel_chars, - int flags, char *result_buf); -int UI_add_info_string(UI *ui, const char *text); -int UI_dup_info_string(UI *ui, const char *text); -int UI_add_error_string(UI *ui, const char *text); -int UI_dup_error_string(UI *ui, const char *text); - -/* These are the possible flags. They can be or'ed together. */ -/* Use to have echoing of input */ -# define UI_INPUT_FLAG_ECHO 0x01 -/* - * Use a default password. Where that password is found is completely up to - * the application, it might for example be in the user data set with - * UI_add_user_data(). It is not recommended to have more than one input in - * each UI being marked with this flag, or the application might get - * confused. - */ -# define UI_INPUT_FLAG_DEFAULT_PWD 0x02 - -/*- - * The user of these routines may want to define flags of their own. The core - * UI won't look at those, but will pass them on to the method routines. They - * must use higher bits so they don't get confused with the UI bits above. - * UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use. A good - * example of use is this: - * - * #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE) - * -*/ -# define UI_INPUT_FLAG_USER_BASE 16 - -/*- - * The following function helps construct a prompt. object_desc is a - * textual short description of the object, for example "pass phrase", - * and object_name is the name of the object (might be a card name or - * a file name. - * The returned string shall always be allocated on the heap with - * OPENSSL_malloc(), and need to be free'd with OPENSSL_free(). - * - * If the ui_method doesn't contain a pointer to a user-defined prompt - * constructor, a default string is built, looking like this: - * - * "Enter {object_desc} for {object_name}:" - * - * So, if object_desc has the value "pass phrase" and object_name has - * the value "foo.key", the resulting string is: - * - * "Enter pass phrase for foo.key:" -*/ -char *UI_construct_prompt(UI *ui_method, - const char *object_desc, const char *object_name); - -/* - * The following function is used to store a pointer to user-specific data. - * Any previous such pointer will be returned and replaced. - * - * For callback purposes, this function makes a lot more sense than using - * ex_data, since the latter requires that different parts of OpenSSL or - * applications share the same ex_data index. - * - * Note that the UI_OpenSSL() method completely ignores the user data. Other - * methods may not, however. - */ -void *UI_add_user_data(UI *ui, void *user_data); -/* We need a user data retrieving function as well. */ -void *UI_get0_user_data(UI *ui); - -/* Return the result associated with a prompt given with the index i. */ -const char *UI_get0_result(UI *ui, int i); - -/* When all strings have been added, process the whole thing. */ -int UI_process(UI *ui); - -/* - * Give a user interface parametrised control commands. This can be used to - * send down an integer, a data pointer or a function pointer, as well as be - * used to get information from a UI. - */ -int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void)); - -/* The commands */ -/* - * Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the - * OpenSSL error stack before printing any info or added error messages and - * before any prompting. - */ -# define UI_CTRL_PRINT_ERRORS 1 -/* - * Check if a UI_process() is possible to do again with the same instance of - * a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0 - * if not. - */ -# define UI_CTRL_IS_REDOABLE 2 - -/* Some methods may use extra data */ -# define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg) -# define UI_get_app_data(s) UI_get_ex_data(s,0) -int UI_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int UI_set_ex_data(UI *r, int idx, void *arg); -void *UI_get_ex_data(UI *r, int idx); - -/* Use specific methods instead of the built-in one */ -void UI_set_default_method(const UI_METHOD *meth); -const UI_METHOD *UI_get_default_method(void); -const UI_METHOD *UI_get_method(UI *ui); -const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth); - -/* The method with all the built-in thingies */ -UI_METHOD *UI_OpenSSL(void); - -/* ---------- For method writers ---------- */ -/*- - A method contains a number of functions that implement the low level - of the User Interface. The functions are: - - an opener This function starts a session, maybe by opening - a channel to a tty, or by opening a window. - a writer This function is called to write a given string, - maybe to the tty, maybe as a field label in a - window. - a flusher This function is called to flush everything that - has been output so far. It can be used to actually - display a dialog box after it has been built. - a reader This function is called to read a given prompt, - maybe from the tty, maybe from a field in a - window. Note that it's called wth all string - structures, not only the prompt ones, so it must - check such things itself. - a closer This function closes the session, maybe by closing - the channel to the tty, or closing the window. - - All these functions are expected to return: - - 0 on error. - 1 on success. - -1 on out-of-band events, for example if some prompting has - been canceled (by pressing Ctrl-C, for example). This is - only checked when returned by the flusher or the reader. - - The way this is used, the opener is first called, then the writer for all - strings, then the flusher, then the reader for all strings and finally the - closer. Note that if you want to prompt from a terminal or other command - line interface, the best is to have the reader also write the prompts - instead of having the writer do it. If you want to prompt from a dialog - box, the writer can be used to build up the contents of the box, and the - flusher to actually display the box and run the event loop until all data - has been given, after which the reader only grabs the given data and puts - them back into the UI strings. - - All method functions take a UI as argument. Additionally, the writer and - the reader take a UI_STRING. -*/ - -/* - * The UI_STRING type is the data structure that contains all the needed info - * about a string or a prompt, including test data for a verification prompt. - */ -typedef struct ui_string_st UI_STRING; -DECLARE_STACK_OF(UI_STRING) - -/* - * The different types of strings that are currently supported. This is only - * needed by method authors. - */ -enum UI_string_types { - UIT_NONE = 0, - UIT_PROMPT, /* Prompt for a string */ - UIT_VERIFY, /* Prompt for a string and verify */ - UIT_BOOLEAN, /* Prompt for a yes/no response */ - UIT_INFO, /* Send info to the user */ - UIT_ERROR /* Send an error message to the user */ -}; - -/* Create and manipulate methods */ -UI_METHOD *UI_create_method(char *name); -void UI_destroy_method(UI_METHOD *ui_method); -int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui)); -int UI_method_set_writer(UI_METHOD *method, - int (*writer) (UI *ui, UI_STRING *uis)); -int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui)); -int UI_method_set_reader(UI_METHOD *method, - int (*reader) (UI *ui, UI_STRING *uis)); -int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui)); -int UI_method_set_prompt_constructor(UI_METHOD *method, - char *(*prompt_constructor) (UI *ui, - const char - *object_desc, - const char - *object_name)); -int (*UI_method_get_opener(UI_METHOD *method)) (UI *); -int (*UI_method_get_writer(UI_METHOD *method)) (UI *, UI_STRING *); -int (*UI_method_get_flusher(UI_METHOD *method)) (UI *); -int (*UI_method_get_reader(UI_METHOD *method)) (UI *, UI_STRING *); -int (*UI_method_get_closer(UI_METHOD *method)) (UI *); -char *(*UI_method_get_prompt_constructor(UI_METHOD *method)) (UI *, - const char *, - const char *); - -/* - * The following functions are helpers for method writers to access relevant - * data from a UI_STRING. - */ - -/* Return type of the UI_STRING */ -enum UI_string_types UI_get_string_type(UI_STRING *uis); -/* Return input flags of the UI_STRING */ -int UI_get_input_flags(UI_STRING *uis); -/* Return the actual string to output (the prompt, info or error) */ -const char *UI_get0_output_string(UI_STRING *uis); -/* - * Return the optional action string to output (the boolean promtp - * instruction) - */ -const char *UI_get0_action_string(UI_STRING *uis); -/* Return the result of a prompt */ -const char *UI_get0_result_string(UI_STRING *uis); -/* - * Return the string to test the result against. Only useful with verifies. - */ -const char *UI_get0_test_string(UI_STRING *uis); -/* Return the required minimum size of the result */ -int UI_get_result_minsize(UI_STRING *uis); -/* Return the required maximum size of the result */ -int UI_get_result_maxsize(UI_STRING *uis); -/* Set the result of a UI_STRING. */ -int UI_set_result(UI *ui, UI_STRING *uis, const char *result); - -/* A couple of popular utility functions */ -int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, - int verify); -int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, - int verify); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_UI_strings(void); - -/* Error codes for the UI functions. */ - -/* Function codes. */ -# define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 -# define UI_F_GENERAL_ALLOCATE_PROMPT 109 -# define UI_F_GENERAL_ALLOCATE_STRING 100 -# define UI_F_UI_CTRL 111 -# define UI_F_UI_DUP_ERROR_STRING 101 -# define UI_F_UI_DUP_INFO_STRING 102 -# define UI_F_UI_DUP_INPUT_BOOLEAN 110 -# define UI_F_UI_DUP_INPUT_STRING 103 -# define UI_F_UI_DUP_VERIFY_STRING 106 -# define UI_F_UI_GET0_RESULT 107 -# define UI_F_UI_NEW_METHOD 104 -# define UI_F_UI_SET_RESULT 105 - -/* Reason codes. */ -# define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 -# define UI_R_INDEX_TOO_LARGE 102 -# define UI_R_INDEX_TOO_SMALL 103 -# define UI_R_NO_RESULT_BUFFER 105 -# define UI_R_RESULT_TOO_LARGE 100 -# define UI_R_RESULT_TOO_SMALL 101 -# define UI_R_UNKNOWN_CONTROL_COMMAND 106 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_UI_H +# define HEADER_UI_H + +# include + +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# endif +# include +# include +# include +# include + +/* For compatibility reasons, the macro OPENSSL_NO_UI is currently retained */ +# if OPENSSL_API_COMPAT < 0x10200000L +# ifdef OPENSSL_NO_UI_CONSOLE +# define OPENSSL_NO_UI +# endif +# endif + +# ifdef __cplusplus +extern "C" { +# endif + +/* + * All the following functions return -1 or NULL on error and in some cases + * (UI_process()) -2 if interrupted or in some other way cancelled. When + * everything is fine, they return 0, a positive value or a non-NULL pointer, + * all depending on their purpose. + */ + +/* Creators and destructor. */ +UI *UI_new(void); +UI *UI_new_method(const UI_METHOD *method); +void UI_free(UI *ui); + +/*- + The following functions are used to add strings to be printed and prompt + strings to prompt for data. The names are UI_{add,dup}__string + and UI_{add,dup}_input_boolean. + + UI_{add,dup}__string have the following meanings: + add add a text or prompt string. The pointers given to these + functions are used verbatim, no copying is done. + dup make a copy of the text or prompt string, then add the copy + to the collection of strings in the user interface. + + The function is a name for the functionality that the given + string shall be used for. It can be one of: + input use the string as data prompt. + verify use the string as verification prompt. This + is used to verify a previous input. + info use the string for informational output. + error use the string for error output. + Honestly, there's currently no difference between info and error for the + moment. + + UI_{add,dup}_input_boolean have the same semantics for "add" and "dup", + and are typically used when one wants to prompt for a yes/no response. + + All of the functions in this group take a UI and a prompt string. + The string input and verify addition functions also take a flag argument, + a buffer for the result to end up with, a minimum input size and a maximum + input size (the result buffer MUST be large enough to be able to contain + the maximum number of characters). Additionally, the verify addition + functions takes another buffer to compare the result against. + The boolean input functions take an action description string (which should + be safe to ignore if the expected user action is obvious, for example with + a dialog box with an OK button and a Cancel button), a string of acceptable + characters to mean OK and to mean Cancel. The two last strings are checked + to make sure they don't have common characters. Additionally, the same + flag argument as for the string input is taken, as well as a result buffer. + The result buffer is required to be at least one byte long. Depending on + the answer, the first character from the OK or the Cancel character strings + will be stored in the first byte of the result buffer. No NUL will be + added, so the result is *not* a string. + + On success, the all return an index of the added information. That index + is useful when retrieving results with UI_get0_result(). */ +int UI_add_input_string(UI *ui, const char *prompt, int flags, + char *result_buf, int minsize, int maxsize); +int UI_dup_input_string(UI *ui, const char *prompt, int flags, + char *result_buf, int minsize, int maxsize); +int UI_add_verify_string(UI *ui, const char *prompt, int flags, + char *result_buf, int minsize, int maxsize, + const char *test_buf); +int UI_dup_verify_string(UI *ui, const char *prompt, int flags, + char *result_buf, int minsize, int maxsize, + const char *test_buf); +int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc, + const char *ok_chars, const char *cancel_chars, + int flags, char *result_buf); +int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc, + const char *ok_chars, const char *cancel_chars, + int flags, char *result_buf); +int UI_add_info_string(UI *ui, const char *text); +int UI_dup_info_string(UI *ui, const char *text); +int UI_add_error_string(UI *ui, const char *text); +int UI_dup_error_string(UI *ui, const char *text); + +/* These are the possible flags. They can be or'ed together. */ +/* Use to have echoing of input */ +# define UI_INPUT_FLAG_ECHO 0x01 +/* + * Use a default password. Where that password is found is completely up to + * the application, it might for example be in the user data set with + * UI_add_user_data(). It is not recommended to have more than one input in + * each UI being marked with this flag, or the application might get + * confused. + */ +# define UI_INPUT_FLAG_DEFAULT_PWD 0x02 + +/*- + * The user of these routines may want to define flags of their own. The core + * UI won't look at those, but will pass them on to the method routines. They + * must use higher bits so they don't get confused with the UI bits above. + * UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use. A good + * example of use is this: + * + * #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE) + * +*/ +# define UI_INPUT_FLAG_USER_BASE 16 + +/*- + * The following function helps construct a prompt. object_desc is a + * textual short description of the object, for example "pass phrase", + * and object_name is the name of the object (might be a card name or + * a file name. + * The returned string shall always be allocated on the heap with + * OPENSSL_malloc(), and need to be free'd with OPENSSL_free(). + * + * If the ui_method doesn't contain a pointer to a user-defined prompt + * constructor, a default string is built, looking like this: + * + * "Enter {object_desc} for {object_name}:" + * + * So, if object_desc has the value "pass phrase" and object_name has + * the value "foo.key", the resulting string is: + * + * "Enter pass phrase for foo.key:" +*/ +char *UI_construct_prompt(UI *ui_method, + const char *object_desc, const char *object_name); + +/* + * The following function is used to store a pointer to user-specific data. + * Any previous such pointer will be returned and replaced. + * + * For callback purposes, this function makes a lot more sense than using + * ex_data, since the latter requires that different parts of OpenSSL or + * applications share the same ex_data index. + * + * Note that the UI_OpenSSL() method completely ignores the user data. Other + * methods may not, however. + */ +void *UI_add_user_data(UI *ui, void *user_data); +/* + * Alternatively, this function is used to duplicate the user data. + * This uses the duplicator method function. The destroy function will + * be used to free the user data in this case. + */ +int UI_dup_user_data(UI *ui, void *user_data); +/* We need a user data retrieving function as well. */ +void *UI_get0_user_data(UI *ui); + +/* Return the result associated with a prompt given with the index i. */ +const char *UI_get0_result(UI *ui, int i); +int UI_get_result_length(UI *ui, int i); + +/* When all strings have been added, process the whole thing. */ +int UI_process(UI *ui); + +/* + * Give a user interface parameterised control commands. This can be used to + * send down an integer, a data pointer or a function pointer, as well as be + * used to get information from a UI. + */ +int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void)); + +/* The commands */ +/* + * Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the + * OpenSSL error stack before printing any info or added error messages and + * before any prompting. + */ +# define UI_CTRL_PRINT_ERRORS 1 +/* + * Check if a UI_process() is possible to do again with the same instance of + * a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0 + * if not. + */ +# define UI_CTRL_IS_REDOABLE 2 + +/* Some methods may use extra data */ +# define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg) +# define UI_get_app_data(s) UI_get_ex_data(s,0) + +# define UI_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef) +int UI_set_ex_data(UI *r, int idx, void *arg); +void *UI_get_ex_data(UI *r, int idx); + +/* Use specific methods instead of the built-in one */ +void UI_set_default_method(const UI_METHOD *meth); +const UI_METHOD *UI_get_default_method(void); +const UI_METHOD *UI_get_method(UI *ui); +const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth); + +# ifndef OPENSSL_NO_UI_CONSOLE + +/* The method with all the built-in thingies */ +UI_METHOD *UI_OpenSSL(void); + +# endif + +/* + * NULL method. Literally does nothing, but may serve as a placeholder + * to avoid internal default. + */ +const UI_METHOD *UI_null(void); + +/* ---------- For method writers ---------- */ +/*- + A method contains a number of functions that implement the low level + of the User Interface. The functions are: + + an opener This function starts a session, maybe by opening + a channel to a tty, or by opening a window. + a writer This function is called to write a given string, + maybe to the tty, maybe as a field label in a + window. + a flusher This function is called to flush everything that + has been output so far. It can be used to actually + display a dialog box after it has been built. + a reader This function is called to read a given prompt, + maybe from the tty, maybe from a field in a + window. Note that it's called with all string + structures, not only the prompt ones, so it must + check such things itself. + a closer This function closes the session, maybe by closing + the channel to the tty, or closing the window. + + All these functions are expected to return: + + 0 on error. + 1 on success. + -1 on out-of-band events, for example if some prompting has + been canceled (by pressing Ctrl-C, for example). This is + only checked when returned by the flusher or the reader. + + The way this is used, the opener is first called, then the writer for all + strings, then the flusher, then the reader for all strings and finally the + closer. Note that if you want to prompt from a terminal or other command + line interface, the best is to have the reader also write the prompts + instead of having the writer do it. If you want to prompt from a dialog + box, the writer can be used to build up the contents of the box, and the + flusher to actually display the box and run the event loop until all data + has been given, after which the reader only grabs the given data and puts + them back into the UI strings. + + All method functions take a UI as argument. Additionally, the writer and + the reader take a UI_STRING. +*/ + +/* + * The UI_STRING type is the data structure that contains all the needed info + * about a string or a prompt, including test data for a verification prompt. + */ +typedef struct ui_string_st UI_STRING; +DEFINE_STACK_OF(UI_STRING) + +/* + * The different types of strings that are currently supported. This is only + * needed by method authors. + */ +enum UI_string_types { + UIT_NONE = 0, + UIT_PROMPT, /* Prompt for a string */ + UIT_VERIFY, /* Prompt for a string and verify */ + UIT_BOOLEAN, /* Prompt for a yes/no response */ + UIT_INFO, /* Send info to the user */ + UIT_ERROR /* Send an error message to the user */ +}; + +/* Create and manipulate methods */ +UI_METHOD *UI_create_method(const char *name); +void UI_destroy_method(UI_METHOD *ui_method); +int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui)); +int UI_method_set_writer(UI_METHOD *method, + int (*writer) (UI *ui, UI_STRING *uis)); +int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui)); +int UI_method_set_reader(UI_METHOD *method, + int (*reader) (UI *ui, UI_STRING *uis)); +int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui)); +int UI_method_set_data_duplicator(UI_METHOD *method, + void *(*duplicator) (UI *ui, void *ui_data), + void (*destructor)(UI *ui, void *ui_data)); +int UI_method_set_prompt_constructor(UI_METHOD *method, + char *(*prompt_constructor) (UI *ui, + const char + *object_desc, + const char + *object_name)); +int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data); +int (*UI_method_get_opener(const UI_METHOD *method)) (UI *); +int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *); +int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *); +int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *); +int (*UI_method_get_closer(const UI_METHOD *method)) (UI *); +char *(*UI_method_get_prompt_constructor(const UI_METHOD *method)) + (UI *, const char *, const char *); +void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *); +void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *); +const void *UI_method_get_ex_data(const UI_METHOD *method, int idx); + +/* + * The following functions are helpers for method writers to access relevant + * data from a UI_STRING. + */ + +/* Return type of the UI_STRING */ +enum UI_string_types UI_get_string_type(UI_STRING *uis); +/* Return input flags of the UI_STRING */ +int UI_get_input_flags(UI_STRING *uis); +/* Return the actual string to output (the prompt, info or error) */ +const char *UI_get0_output_string(UI_STRING *uis); +/* + * Return the optional action string to output (the boolean prompt + * instruction) + */ +const char *UI_get0_action_string(UI_STRING *uis); +/* Return the result of a prompt */ +const char *UI_get0_result_string(UI_STRING *uis); +int UI_get_result_string_length(UI_STRING *uis); +/* + * Return the string to test the result against. Only useful with verifies. + */ +const char *UI_get0_test_string(UI_STRING *uis); +/* Return the required minimum size of the result */ +int UI_get_result_minsize(UI_STRING *uis); +/* Return the required maximum size of the result */ +int UI_get_result_maxsize(UI_STRING *uis); +/* Set the result of a UI_STRING. */ +int UI_set_result(UI *ui, UI_STRING *uis, const char *result); +int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len); + +/* A couple of popular utility functions */ +int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, + int verify); +int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, + int verify); +UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag); + + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/ui_compat.h b/src/Mayaqua/win32_inc/openssl/ui_compat.h deleted file mode 100644 index 6e3542d0..00000000 --- a/src/Mayaqua/win32_inc/openssl/ui_compat.h +++ /dev/null @@ -1,88 +0,0 @@ -/* crypto/ui/ui.h */ -/* - * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project - * 2001. - */ -/* ==================================================================== - * Copyright (c) 2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#ifndef HEADER_UI_COMPAT_H -# define HEADER_UI_COMPAT_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following functions were previously part of the DES section, and are - * provided here for backward compatibility reasons. - */ - -# define des_read_pw_string(b,l,p,v) \ - _ossl_old_des_read_pw_string((b),(l),(p),(v)) -# define des_read_pw(b,bf,s,p,v) \ - _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) - -int _ossl_old_des_read_pw_string(char *buf, int length, const char *prompt, - int verify); -int _ossl_old_des_read_pw(char *buf, char *buff, int size, const char *prompt, - int verify); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/Mayaqua/win32_inc/openssl/uierr.h b/src/Mayaqua/win32_inc/openssl/uierr.h new file mode 100644 index 00000000..bd68864d --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/uierr.h @@ -0,0 +1,65 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_UIERR_H +# define HEADER_UIERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_UI_strings(void); + +/* + * UI function codes. + */ +# define UI_F_CLOSE_CONSOLE 115 +# define UI_F_ECHO_CONSOLE 116 +# define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 +# define UI_F_GENERAL_ALLOCATE_PROMPT 109 +# define UI_F_NOECHO_CONSOLE 117 +# define UI_F_OPEN_CONSOLE 114 +# define UI_F_UI_CONSTRUCT_PROMPT 121 +# define UI_F_UI_CREATE_METHOD 112 +# define UI_F_UI_CTRL 111 +# define UI_F_UI_DUP_ERROR_STRING 101 +# define UI_F_UI_DUP_INFO_STRING 102 +# define UI_F_UI_DUP_INPUT_BOOLEAN 110 +# define UI_F_UI_DUP_INPUT_STRING 103 +# define UI_F_UI_DUP_USER_DATA 118 +# define UI_F_UI_DUP_VERIFY_STRING 106 +# define UI_F_UI_GET0_RESULT 107 +# define UI_F_UI_GET_RESULT_LENGTH 119 +# define UI_F_UI_NEW_METHOD 104 +# define UI_F_UI_PROCESS 113 +# define UI_F_UI_SET_RESULT 105 +# define UI_F_UI_SET_RESULT_EX 120 + +/* + * UI reason codes. + */ +# define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 +# define UI_R_INDEX_TOO_LARGE 102 +# define UI_R_INDEX_TOO_SMALL 103 +# define UI_R_NO_RESULT_BUFFER 105 +# define UI_R_PROCESSING_ERROR 107 +# define UI_R_RESULT_TOO_LARGE 100 +# define UI_R_RESULT_TOO_SMALL 101 +# define UI_R_SYSASSIGN_ERROR 109 +# define UI_R_SYSDASSGN_ERROR 110 +# define UI_R_SYSQIOW_ERROR 111 +# define UI_R_UNKNOWN_CONTROL_COMMAND 106 +# define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 +# define UI_R_USER_DATA_DUPLICATION_UNSUPPORTED 112 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/whrlpool.h b/src/Mayaqua/win32_inc/openssl/whrlpool.h index b986f17f..20ea3503 100644 --- a/src/Mayaqua/win32_inc/openssl/whrlpool.h +++ b/src/Mayaqua/win32_inc/openssl/whrlpool.h @@ -1,41 +1,48 @@ -#ifndef HEADER_WHRLPOOL_H -# define HEADER_WHRLPOOL_H - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# define WHIRLPOOL_DIGEST_LENGTH (512/8) -# define WHIRLPOOL_BBLOCK 512 -# define WHIRLPOOL_COUNTER (256/8) - -typedef struct { - union { - unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; - /* double q is here to ensure 64-bit alignment */ - double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; - } H; - unsigned char data[WHIRLPOOL_BBLOCK / 8]; - unsigned int bitoff; - size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; -} WHIRLPOOL_CTX; - -# ifndef OPENSSL_NO_WHIRLPOOL -# ifdef OPENSSL_FIPS -int private_WHIRLPOOL_Init(WHIRLPOOL_CTX *c); -# endif -int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); -int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); -void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); -int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); -unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); -# endif - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_WHRLPOOL_H +# define HEADER_WHRLPOOL_H + +#include + +# ifndef OPENSSL_NO_WHIRLPOOL +# include +# include +# ifdef __cplusplus +extern "C" { +# endif + +# define WHIRLPOOL_DIGEST_LENGTH (512/8) +# define WHIRLPOOL_BBLOCK 512 +# define WHIRLPOOL_COUNTER (256/8) + +typedef struct { + union { + unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; + /* double q is here to ensure 64-bit alignment */ + double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; + } H; + unsigned char data[WHIRLPOOL_BBLOCK / 8]; + unsigned int bitoff; + size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; +} WHIRLPOOL_CTX; + +int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); +int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); +void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); +int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); +unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); + +# ifdef __cplusplus +} +# endif +# endif + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/x509.h b/src/Mayaqua/win32_inc/openssl/x509.h index ca5d5703..39ca0ba5 100644 --- a/src/Mayaqua/win32_inc/openssl/x509.h +++ b/src/Mayaqua/win32_inc/openssl/x509.h @@ -1,1330 +1,1047 @@ -/* crypto/x509/x509.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -/* ==================================================================== - * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. - * ECDH support in OpenSSL originally developed by - * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. - */ - -#ifndef HEADER_X509_H -# define HEADER_X509_H - -# include -# include -# ifndef OPENSSL_NO_BUFFER -# include -# endif -# ifndef OPENSSL_NO_EVP -# include -# endif -# ifndef OPENSSL_NO_BIO -# include -# endif -# include -# include -# include - -# ifndef OPENSSL_NO_EC -# include -# endif - -# ifndef OPENSSL_NO_ECDSA -# include -# endif - -# ifndef OPENSSL_NO_ECDH -# include -# endif - -# ifndef OPENSSL_NO_DEPRECATED -# ifndef OPENSSL_NO_RSA -# include -# endif -# ifndef OPENSSL_NO_DSA -# include -# endif -# ifndef OPENSSL_NO_DH -# include -# endif -# endif - -# ifndef OPENSSL_NO_SHA -# include -# endif -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_SYS_WIN32 -/* Under Win32 these are defined in wincrypt.h */ -# undef X509_NAME -# undef X509_CERT_PAIR -# undef X509_EXTENSIONS -# endif - -# define X509_FILETYPE_PEM 1 -# define X509_FILETYPE_ASN1 2 -# define X509_FILETYPE_DEFAULT 3 - -# define X509v3_KU_DIGITAL_SIGNATURE 0x0080 -# define X509v3_KU_NON_REPUDIATION 0x0040 -# define X509v3_KU_KEY_ENCIPHERMENT 0x0020 -# define X509v3_KU_DATA_ENCIPHERMENT 0x0010 -# define X509v3_KU_KEY_AGREEMENT 0x0008 -# define X509v3_KU_KEY_CERT_SIGN 0x0004 -# define X509v3_KU_CRL_SIGN 0x0002 -# define X509v3_KU_ENCIPHER_ONLY 0x0001 -# define X509v3_KU_DECIPHER_ONLY 0x8000 -# define X509v3_KU_UNDEF 0xffff - -typedef struct X509_objects_st { - int nid; - int (*a2i) (void); - int (*i2a) (void); -} X509_OBJECTS; - -struct X509_algor_st { - ASN1_OBJECT *algorithm; - ASN1_TYPE *parameter; -} /* X509_ALGOR */ ; - -DECLARE_ASN1_SET_OF(X509_ALGOR) - -typedef STACK_OF(X509_ALGOR) X509_ALGORS; - -typedef struct X509_val_st { - ASN1_TIME *notBefore; - ASN1_TIME *notAfter; -} X509_VAL; - -struct X509_pubkey_st { - X509_ALGOR *algor; - ASN1_BIT_STRING *public_key; - EVP_PKEY *pkey; -}; - -typedef struct X509_sig_st { - X509_ALGOR *algor; - ASN1_OCTET_STRING *digest; -} X509_SIG; - -typedef struct X509_name_entry_st { - ASN1_OBJECT *object; - ASN1_STRING *value; - int set; - int size; /* temp variable */ -} X509_NAME_ENTRY; - -DECLARE_STACK_OF(X509_NAME_ENTRY) -DECLARE_ASN1_SET_OF(X509_NAME_ENTRY) - -/* we always keep X509_NAMEs in 2 forms. */ -struct X509_name_st { - STACK_OF(X509_NAME_ENTRY) *entries; - int modified; /* true if 'bytes' needs to be built */ -# ifndef OPENSSL_NO_BUFFER - BUF_MEM *bytes; -# else - char *bytes; -# endif -/* unsigned long hash; Keep the hash around for lookups */ - unsigned char *canon_enc; - int canon_enclen; -} /* X509_NAME */ ; - -DECLARE_STACK_OF(X509_NAME) - -# define X509_EX_V_NETSCAPE_HACK 0x8000 -# define X509_EX_V_INIT 0x0001 -typedef struct X509_extension_st { - ASN1_OBJECT *object; - ASN1_BOOLEAN critical; - ASN1_OCTET_STRING *value; -} X509_EXTENSION; - -typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS; - -DECLARE_STACK_OF(X509_EXTENSION) -DECLARE_ASN1_SET_OF(X509_EXTENSION) - -/* a sequence of these are used */ -typedef struct x509_attributes_st { - ASN1_OBJECT *object; - int single; /* 0 for a set, 1 for a single item (which is - * wrong) */ - union { - char *ptr; - /* - * 0 - */ STACK_OF(ASN1_TYPE) *set; - /* - * 1 - */ ASN1_TYPE *single; - } value; -} X509_ATTRIBUTE; - -DECLARE_STACK_OF(X509_ATTRIBUTE) -DECLARE_ASN1_SET_OF(X509_ATTRIBUTE) - -typedef struct X509_req_info_st { - ASN1_ENCODING enc; - ASN1_INTEGER *version; - X509_NAME *subject; - X509_PUBKEY *pubkey; - /* d=2 hl=2 l= 0 cons: cont: 00 */ - STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ -} X509_REQ_INFO; - -typedef struct X509_req_st { - X509_REQ_INFO *req_info; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *signature; - int references; -} X509_REQ; - -typedef struct x509_cinf_st { - ASN1_INTEGER *version; /* [ 0 ] default of v1 */ - ASN1_INTEGER *serialNumber; - X509_ALGOR *signature; - X509_NAME *issuer; - X509_VAL *validity; - X509_NAME *subject; - X509_PUBKEY *key; - ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */ - ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */ - STACK_OF(X509_EXTENSION) *extensions; /* [ 3 ] optional in v3 */ - ASN1_ENCODING enc; -} X509_CINF; - -/* - * This stuff is certificate "auxiliary info" it contains details which are - * useful in certificate stores and databases. When used this is tagged onto - * the end of the certificate itself - */ - -typedef struct x509_cert_aux_st { - STACK_OF(ASN1_OBJECT) *trust; /* trusted uses */ - STACK_OF(ASN1_OBJECT) *reject; /* rejected uses */ - ASN1_UTF8STRING *alias; /* "friendly name" */ - ASN1_OCTET_STRING *keyid; /* key id of private key */ - STACK_OF(X509_ALGOR) *other; /* other unspecified info */ -} X509_CERT_AUX; - -struct x509_st { - X509_CINF *cert_info; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *signature; - int valid; - int references; - char *name; - CRYPTO_EX_DATA ex_data; - /* These contain copies of various extension values */ - long ex_pathlen; - long ex_pcpathlen; - unsigned long ex_flags; - unsigned long ex_kusage; - unsigned long ex_xkusage; - unsigned long ex_nscert; - ASN1_OCTET_STRING *skid; - AUTHORITY_KEYID *akid; - X509_POLICY_CACHE *policy_cache; - STACK_OF(DIST_POINT) *crldp; - STACK_OF(GENERAL_NAME) *altname; - NAME_CONSTRAINTS *nc; -# ifndef OPENSSL_NO_RFC3779 - STACK_OF(IPAddressFamily) *rfc3779_addr; - struct ASIdentifiers_st *rfc3779_asid; -# endif -# ifndef OPENSSL_NO_SHA - unsigned char sha1_hash[SHA_DIGEST_LENGTH]; -# endif - X509_CERT_AUX *aux; -} /* X509 */ ; - -DECLARE_STACK_OF(X509) -DECLARE_ASN1_SET_OF(X509) - -/* This is used for a table of trust checking functions */ - -typedef struct x509_trust_st { - int trust; - int flags; - int (*check_trust) (struct x509_trust_st *, X509 *, int); - char *name; - int arg1; - void *arg2; -} X509_TRUST; - -DECLARE_STACK_OF(X509_TRUST) - -typedef struct x509_cert_pair_st { - X509 *forward; - X509 *reverse; -} X509_CERT_PAIR; - -/* standard trust ids */ - -# define X509_TRUST_DEFAULT -1/* Only valid in purpose settings */ - -# define X509_TRUST_COMPAT 1 -# define X509_TRUST_SSL_CLIENT 2 -# define X509_TRUST_SSL_SERVER 3 -# define X509_TRUST_EMAIL 4 -# define X509_TRUST_OBJECT_SIGN 5 -# define X509_TRUST_OCSP_SIGN 6 -# define X509_TRUST_OCSP_REQUEST 7 -# define X509_TRUST_TSA 8 - -/* Keep these up to date! */ -# define X509_TRUST_MIN 1 -# define X509_TRUST_MAX 8 - -/* trust_flags values */ -# define X509_TRUST_DYNAMIC 1 -# define X509_TRUST_DYNAMIC_NAME 2 - -/* check_trust return codes */ - -# define X509_TRUST_TRUSTED 1 -# define X509_TRUST_REJECTED 2 -# define X509_TRUST_UNTRUSTED 3 - -/* Flags for X509_print_ex() */ - -# define X509_FLAG_COMPAT 0 -# define X509_FLAG_NO_HEADER 1L -# define X509_FLAG_NO_VERSION (1L << 1) -# define X509_FLAG_NO_SERIAL (1L << 2) -# define X509_FLAG_NO_SIGNAME (1L << 3) -# define X509_FLAG_NO_ISSUER (1L << 4) -# define X509_FLAG_NO_VALIDITY (1L << 5) -# define X509_FLAG_NO_SUBJECT (1L << 6) -# define X509_FLAG_NO_PUBKEY (1L << 7) -# define X509_FLAG_NO_EXTENSIONS (1L << 8) -# define X509_FLAG_NO_SIGDUMP (1L << 9) -# define X509_FLAG_NO_AUX (1L << 10) -# define X509_FLAG_NO_ATTRIBUTES (1L << 11) -# define X509_FLAG_NO_IDS (1L << 12) - -/* Flags specific to X509_NAME_print_ex() */ - -/* The field separator information */ - -# define XN_FLAG_SEP_MASK (0xf << 16) - -# define XN_FLAG_COMPAT 0/* Traditional SSLeay: use old - * X509_NAME_print */ -# define XN_FLAG_SEP_COMMA_PLUS (1 << 16)/* RFC2253 ,+ */ -# define XN_FLAG_SEP_CPLUS_SPC (2 << 16)/* ,+ spaced: more readable */ -# define XN_FLAG_SEP_SPLUS_SPC (3 << 16)/* ;+ spaced */ -# define XN_FLAG_SEP_MULTILINE (4 << 16)/* One line per field */ - -# define XN_FLAG_DN_REV (1 << 20)/* Reverse DN order */ - -/* How the field name is shown */ - -# define XN_FLAG_FN_MASK (0x3 << 21) - -# define XN_FLAG_FN_SN 0/* Object short name */ -# define XN_FLAG_FN_LN (1 << 21)/* Object long name */ -# define XN_FLAG_FN_OID (2 << 21)/* Always use OIDs */ -# define XN_FLAG_FN_NONE (3 << 21)/* No field names */ - -# define XN_FLAG_SPC_EQ (1 << 23)/* Put spaces round '=' */ - -/* - * This determines if we dump fields we don't recognise: RFC2253 requires - * this. - */ - -# define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) - -# define XN_FLAG_FN_ALIGN (1 << 25)/* Align field names to 20 - * characters */ - -/* Complete set of RFC2253 flags */ - -# define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ - XN_FLAG_SEP_COMMA_PLUS | \ - XN_FLAG_DN_REV | \ - XN_FLAG_FN_SN | \ - XN_FLAG_DUMP_UNKNOWN_FIELDS) - -/* readable oneline form */ - -# define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \ - ASN1_STRFLGS_ESC_QUOTE | \ - XN_FLAG_SEP_CPLUS_SPC | \ - XN_FLAG_SPC_EQ | \ - XN_FLAG_FN_SN) - -/* readable multiline form */ - -# define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \ - ASN1_STRFLGS_ESC_MSB | \ - XN_FLAG_SEP_MULTILINE | \ - XN_FLAG_SPC_EQ | \ - XN_FLAG_FN_LN | \ - XN_FLAG_FN_ALIGN) - -struct x509_revoked_st { - ASN1_INTEGER *serialNumber; - ASN1_TIME *revocationDate; - STACK_OF(X509_EXTENSION) /* optional */ *extensions; - /* Set up if indirect CRL */ - STACK_OF(GENERAL_NAME) *issuer; - /* Revocation reason */ - int reason; - int sequence; /* load sequence */ -}; - -DECLARE_STACK_OF(X509_REVOKED) -DECLARE_ASN1_SET_OF(X509_REVOKED) - -typedef struct X509_crl_info_st { - ASN1_INTEGER *version; - X509_ALGOR *sig_alg; - X509_NAME *issuer; - ASN1_TIME *lastUpdate; - ASN1_TIME *nextUpdate; - STACK_OF(X509_REVOKED) *revoked; - STACK_OF(X509_EXTENSION) /* [0] */ *extensions; - ASN1_ENCODING enc; -} X509_CRL_INFO; - -struct X509_crl_st { - /* actual signature */ - X509_CRL_INFO *crl; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *signature; - int references; - int flags; - /* Copies of various extensions */ - AUTHORITY_KEYID *akid; - ISSUING_DIST_POINT *idp; - /* Convenient breakdown of IDP */ - int idp_flags; - int idp_reasons; - /* CRL and base CRL numbers for delta processing */ - ASN1_INTEGER *crl_number; - ASN1_INTEGER *base_crl_number; -# ifndef OPENSSL_NO_SHA - unsigned char sha1_hash[SHA_DIGEST_LENGTH]; -# endif - STACK_OF(GENERAL_NAMES) *issuers; - const X509_CRL_METHOD *meth; - void *meth_data; -} /* X509_CRL */ ; - -DECLARE_STACK_OF(X509_CRL) -DECLARE_ASN1_SET_OF(X509_CRL) - -typedef struct private_key_st { - int version; - /* The PKCS#8 data types */ - X509_ALGOR *enc_algor; - ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */ - /* When decrypted, the following will not be NULL */ - EVP_PKEY *dec_pkey; - /* used to encrypt and decrypt */ - int key_length; - char *key_data; - int key_free; /* true if we should auto free key_data */ - /* expanded version of 'enc_algor' */ - EVP_CIPHER_INFO cipher; - int references; -} X509_PKEY; - -# ifndef OPENSSL_NO_EVP -typedef struct X509_info_st { - X509 *x509; - X509_CRL *crl; - X509_PKEY *x_pkey; - EVP_CIPHER_INFO enc_cipher; - int enc_len; - char *enc_data; - int references; -} X509_INFO; - -DECLARE_STACK_OF(X509_INFO) -# endif - -/* - * The next 2 structures and their 8 routines were sent to me by Pat Richard - * and are used to manipulate Netscapes spki structures - - * useful if you are writing a CA web page - */ -typedef struct Netscape_spkac_st { - X509_PUBKEY *pubkey; - ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */ -} NETSCAPE_SPKAC; - -typedef struct Netscape_spki_st { - NETSCAPE_SPKAC *spkac; /* signed public key and challenge */ - X509_ALGOR *sig_algor; - ASN1_BIT_STRING *signature; -} NETSCAPE_SPKI; - -/* Netscape certificate sequence structure */ -typedef struct Netscape_certificate_sequence { - ASN1_OBJECT *type; - STACK_OF(X509) *certs; -} NETSCAPE_CERT_SEQUENCE; - -/*- Unused (and iv length is wrong) -typedef struct CBCParameter_st - { - unsigned char iv[8]; - } CBC_PARAM; -*/ - -/* Password based encryption structure */ - -typedef struct PBEPARAM_st { - ASN1_OCTET_STRING *salt; - ASN1_INTEGER *iter; -} PBEPARAM; - -/* Password based encryption V2 structures */ - -typedef struct PBE2PARAM_st { - X509_ALGOR *keyfunc; - X509_ALGOR *encryption; -} PBE2PARAM; - -typedef struct PBKDF2PARAM_st { -/* Usually OCTET STRING but could be anything */ - ASN1_TYPE *salt; - ASN1_INTEGER *iter; - ASN1_INTEGER *keylength; - X509_ALGOR *prf; -} PBKDF2PARAM; - -/* PKCS#8 private key info structure */ - -struct pkcs8_priv_key_info_st { - /* Flag for various broken formats */ - int broken; -# define PKCS8_OK 0 -# define PKCS8_NO_OCTET 1 -# define PKCS8_EMBEDDED_PARAM 2 -# define PKCS8_NS_DB 3 -# define PKCS8_NEG_PRIVKEY 4 - ASN1_INTEGER *version; - X509_ALGOR *pkeyalg; - /* Should be OCTET STRING but some are broken */ - ASN1_TYPE *pkey; - STACK_OF(X509_ATTRIBUTE) *attributes; -}; - -#ifdef __cplusplus -} -#endif - -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# define X509_EXT_PACK_UNKNOWN 1 -# define X509_EXT_PACK_STRING 2 - -# define X509_get_version(x) ASN1_INTEGER_get((x)->cert_info->version) -/* #define X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */ -# define X509_get_notBefore(x) ((x)->cert_info->validity->notBefore) -# define X509_get_notAfter(x) ((x)->cert_info->validity->notAfter) -# define X509_extract_key(x) X509_get_pubkey(x)/*****/ -# define X509_REQ_get_version(x) ASN1_INTEGER_get((x)->req_info->version) -# define X509_REQ_get_subject_name(x) ((x)->req_info->subject) -# define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a) -# define X509_name_cmp(a,b) X509_NAME_cmp((a),(b)) -# define X509_get_signature_type(x) EVP_PKEY_type(OBJ_obj2nid((x)->sig_alg->algorithm)) - -# define X509_CRL_get_version(x) ASN1_INTEGER_get((x)->crl->version) -# define X509_CRL_get_lastUpdate(x) ((x)->crl->lastUpdate) -# define X509_CRL_get_nextUpdate(x) ((x)->crl->nextUpdate) -# define X509_CRL_get_issuer(x) ((x)->crl->issuer) -# define X509_CRL_get_REVOKED(x) ((x)->crl->revoked) - -void X509_CRL_set_default_method(const X509_CRL_METHOD *meth); -X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl), - int (*crl_free) (X509_CRL *crl), - int (*crl_lookup) (X509_CRL *crl, - X509_REVOKED **ret, - ASN1_INTEGER *ser, - X509_NAME *issuer), - int (*crl_verify) (X509_CRL *crl, - EVP_PKEY *pk)); -void X509_CRL_METHOD_free(X509_CRL_METHOD *m); - -void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); -void *X509_CRL_get_meth_data(X509_CRL *crl); - -/* - * This one is only used so that a binary form can output, as in - * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf) - */ -# define X509_get_X509_PUBKEY(x) ((x)->cert_info->key) - -const char *X509_verify_cert_error_string(long n); - -# ifndef OPENSSL_NO_EVP -int X509_verify(X509 *a, EVP_PKEY *r); - -int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); -int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r); -int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r); - -NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len); -char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x); -EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x); -int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey); - -int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); - -int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent); -int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig); - -int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); -int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx); -int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert); -int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); -int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx); -int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); -int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx); -int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl); -int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); - -int X509_pubkey_digest(const X509 *data, const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_digest(const X509 *data, const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type, - unsigned char *md, unsigned int *len); -int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, - unsigned char *md, unsigned int *len); -# endif - -# ifndef OPENSSL_NO_FP_API -X509 *d2i_X509_fp(FILE *fp, X509 **x509); -int i2d_X509_fp(FILE *fp, X509 *x509); -X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl); -int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl); -X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req); -int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req); -# ifndef OPENSSL_NO_RSA -RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa); -int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa); -RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa); -int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa); -RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa); -int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa); -# endif -# ifndef OPENSSL_NO_DSA -DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa); -int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); -DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); -int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); -# endif -# ifndef OPENSSL_NO_EC -EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); -int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); -EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); -int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); -# endif -X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8); -int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8); -PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, - PKCS8_PRIV_KEY_INFO **p8inf); -int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf); -int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); -int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); -int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); -# endif - -# ifndef OPENSSL_NO_BIO -X509 *d2i_X509_bio(BIO *bp, X509 **x509); -int i2d_X509_bio(BIO *bp, X509 *x509); -X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl); -int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl); -X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req); -int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req); -# ifndef OPENSSL_NO_RSA -RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa); -int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa); -RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa); -int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa); -RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa); -int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa); -# endif -# ifndef OPENSSL_NO_DSA -DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa); -int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); -DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); -int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); -# endif -# ifndef OPENSSL_NO_EC -EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); -int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); -EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); -int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); -# endif -X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8); -int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8); -PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, - PKCS8_PRIV_KEY_INFO **p8inf); -int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf); -int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); -int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); -int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); -EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); -# endif - -X509 *X509_dup(X509 *x509); -X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa); -X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex); -X509_CRL *X509_CRL_dup(X509_CRL *crl); -X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev); -X509_REQ *X509_REQ_dup(X509_REQ *req); -X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); -int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, - void *pval); -void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, - X509_ALGOR *algor); -void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); -int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); - -X509_NAME *X509_NAME_dup(X509_NAME *xn); -X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); - -int X509_cmp_time(const ASN1_TIME *s, time_t *t); -int X509_cmp_current_time(const ASN1_TIME *s); -ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t); -ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, - int offset_day, long offset_sec, time_t *t); -ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj); - -const char *X509_get_default_cert_area(void); -const char *X509_get_default_cert_dir(void); -const char *X509_get_default_cert_file(void); -const char *X509_get_default_cert_dir_env(void); -const char *X509_get_default_cert_file_env(void); -const char *X509_get_default_private_dir(void); - -X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); -X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey); - -DECLARE_ASN1_FUNCTIONS(X509_ALGOR) -DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS) -DECLARE_ASN1_FUNCTIONS(X509_VAL) - -DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) - -int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); -EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key); -int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain); -int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp); -EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length); -# ifndef OPENSSL_NO_RSA -int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp); -RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length); -# endif -# ifndef OPENSSL_NO_DSA -int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp); -DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length); -# endif -# ifndef OPENSSL_NO_EC -int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); -EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length); -# endif - -DECLARE_ASN1_FUNCTIONS(X509_SIG) -DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) -DECLARE_ASN1_FUNCTIONS(X509_REQ) - -DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) -X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); - -DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) -DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS) - -DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) - -DECLARE_ASN1_FUNCTIONS(X509_NAME) - -int X509_NAME_set(X509_NAME **xn, X509_NAME *name); - -DECLARE_ASN1_FUNCTIONS(X509_CINF) - -DECLARE_ASN1_FUNCTIONS(X509) -DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) - -DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR) - -int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int X509_set_ex_data(X509 *r, int idx, void *arg); -void *X509_get_ex_data(X509 *r, int idx); -int i2d_X509_AUX(X509 *a, unsigned char **pp); -X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length); - -int i2d_re_X509_tbs(X509 *x, unsigned char **pp); - -void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, - const X509 *x); -int X509_get_signature_nid(const X509 *x); - -int X509_alias_set1(X509 *x, unsigned char *name, int len); -int X509_keyid_set1(X509 *x, unsigned char *id, int len); -unsigned char *X509_alias_get0(X509 *x, int *len); -unsigned char *X509_keyid_get0(X509 *x, int *len); -int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *, - int); -int X509_TRUST_set(int *t, int trust); -int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); -int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj); -void X509_trust_clear(X509 *x); -void X509_reject_clear(X509 *x); - -DECLARE_ASN1_FUNCTIONS(X509_REVOKED) -DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO) -DECLARE_ASN1_FUNCTIONS(X509_CRL) - -int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); -int X509_CRL_get0_by_serial(X509_CRL *crl, - X509_REVOKED **ret, ASN1_INTEGER *serial); -int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x); - -X509_PKEY *X509_PKEY_new(void); -void X509_PKEY_free(X509_PKEY *a); -int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp); -X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp, - long length); - -DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) -DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) -DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) - -# ifndef OPENSSL_NO_EVP -X509_INFO *X509_INFO_new(void); -void X509_INFO_free(X509_INFO *a); -char *X509_NAME_oneline(X509_NAME *a, char *buf, int size); - -int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey); - -int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, - unsigned char *md, unsigned int *len); - -int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, - char *data, EVP_PKEY *pkey, const EVP_MD *type); - -int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data, - unsigned char *md, unsigned int *len); - -int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey); - -int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data, - EVP_PKEY *pkey, const EVP_MD *type); -int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, - void *asn, EVP_MD_CTX *ctx); -# endif - -int X509_set_version(X509 *x, long version); -int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); -ASN1_INTEGER *X509_get_serialNumber(X509 *x); -int X509_set_issuer_name(X509 *x, X509_NAME *name); -X509_NAME *X509_get_issuer_name(X509 *a); -int X509_set_subject_name(X509 *x, X509_NAME *name); -X509_NAME *X509_get_subject_name(X509 *a); -int X509_set_notBefore(X509 *x, const ASN1_TIME *tm); -int X509_set_notAfter(X509 *x, const ASN1_TIME *tm); -int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); -EVP_PKEY *X509_get_pubkey(X509 *x); -ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x); -int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ ); - -int X509_REQ_set_version(X509_REQ *x, long version); -int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name); -int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); -EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req); -int X509_REQ_extension_nid(int nid); -int *X509_REQ_get_extension_nids(void); -void X509_REQ_set_extension_nids(int *nids); -STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req); -int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, - int nid); -int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts); -int X509_REQ_get_attr_count(const X509_REQ *req); -int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos); -int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc); -X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); -int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr); -int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, - const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len); -int X509_REQ_add1_attr_by_NID(X509_REQ *req, - int nid, int type, - const unsigned char *bytes, int len); -int X509_REQ_add1_attr_by_txt(X509_REQ *req, - const char *attrname, int type, - const unsigned char *bytes, int len); - -int X509_CRL_set_version(X509_CRL *x, long version); -int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); -int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); -int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); -int X509_CRL_sort(X509_CRL *crl); - -int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); -int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); - -X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer, - EVP_PKEY *skey, const EVP_MD *md, unsigned int flags); - -int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey); - -int X509_check_private_key(X509 *x509, EVP_PKEY *pkey); -int X509_chain_check_suiteb(int *perror_depth, - X509 *x, STACK_OF(X509) *chain, - unsigned long flags); -int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags); -STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); - -int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); -unsigned long X509_issuer_and_serial_hash(X509 *a); - -int X509_issuer_name_cmp(const X509 *a, const X509 *b); -unsigned long X509_issuer_name_hash(X509 *a); - -int X509_subject_name_cmp(const X509 *a, const X509 *b); -unsigned long X509_subject_name_hash(X509 *x); - -# ifndef OPENSSL_NO_MD5 -unsigned long X509_issuer_name_hash_old(X509 *a); -unsigned long X509_subject_name_hash_old(X509 *x); -# endif - -int X509_cmp(const X509 *a, const X509 *b); -int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b); -unsigned long X509_NAME_hash(X509_NAME *x); -unsigned long X509_NAME_hash_old(X509_NAME *x); - -int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); -int X509_CRL_match(const X509_CRL *a, const X509_CRL *b); -# ifndef OPENSSL_NO_FP_API -int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag, - unsigned long cflag); -int X509_print_fp(FILE *bp, X509 *x); -int X509_CRL_print_fp(FILE *bp, X509_CRL *x); -int X509_REQ_print_fp(FILE *bp, X509_REQ *req); -int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, - unsigned long flags); -# endif - -# ifndef OPENSSL_NO_BIO -int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); -int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, - unsigned long flags); -int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag, - unsigned long cflag); -int X509_print(BIO *bp, X509 *x); -int X509_ocspid_print(BIO *bp, X509 *x); -int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent); -int X509_CRL_print(BIO *bp, X509_CRL *x); -int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag, - unsigned long cflag); -int X509_REQ_print(BIO *bp, X509_REQ *req); -# endif - -int X509_NAME_entry_count(X509_NAME *name); -int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len); -int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, - char *buf, int len); - -/* - * NOTE: you should be passsing -1, not 0 as lastpos. The functions that use - * lastpos, search after that position on. - */ -int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos); -int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, - int lastpos); -X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); -X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); -int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne, - int loc, int set); -int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, - unsigned char *bytes, int len, int loc, - int set); -int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, - unsigned char *bytes, int len, int loc, - int set); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, - const char *field, int type, - const unsigned char *bytes, - int len); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, - int type, unsigned char *bytes, - int len); -int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, - const unsigned char *bytes, int len, int loc, - int set); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, - ASN1_OBJECT *obj, int type, - const unsigned char *bytes, - int len); -int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj); -int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, - const unsigned char *bytes, int len); -ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); -ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); - -int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x); -int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, - int nid, int lastpos); -int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x, - ASN1_OBJECT *obj, int lastpos); -int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x, - int crit, int lastpos); -X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc); -X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc); -STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, - X509_EXTENSION *ex, int loc); - -int X509_get_ext_count(X509 *x); -int X509_get_ext_by_NID(X509 *x, int nid, int lastpos); -int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos); -int X509_get_ext_by_critical(X509 *x, int crit, int lastpos); -X509_EXTENSION *X509_get_ext(X509 *x, int loc); -X509_EXTENSION *X509_delete_ext(X509 *x, int loc); -int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); -void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); -int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, - unsigned long flags); - -int X509_CRL_get_ext_count(X509_CRL *x); -int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos); -int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos); -int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos); -X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc); -X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); -int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc); -void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx); -int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, - unsigned long flags); - -int X509_REVOKED_get_ext_count(X509_REVOKED *x); -int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos); -int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj, - int lastpos); -int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos); -X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc); -X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); -int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); -void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); -int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, - unsigned long flags); - -X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, - int nid, int crit, - ASN1_OCTET_STRING *data); -X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, - ASN1_OBJECT *obj, int crit, - ASN1_OCTET_STRING *data); -int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj); -int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit); -int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data); -ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex); -ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne); -int X509_EXTENSION_get_critical(X509_EXTENSION *ex); - -int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x); -int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, - int lastpos); -int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, - ASN1_OBJECT *obj, int lastpos); -X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc); -X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, - X509_ATTRIBUTE *attr); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) - **x, const ASN1_OBJECT *obj, - int type, - const unsigned char *bytes, - int len); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) - **x, int nid, int type, - const unsigned char *bytes, - int len); -STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) - **x, const char *attrname, - int type, - const unsigned char *bytes, - int len); -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, ASN1_OBJECT *obj, - int lastpos, int type); -X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, - int atrtype, const void *data, - int len); -X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, - const ASN1_OBJECT *obj, - int atrtype, const void *data, - int len); -X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, - const char *atrname, int type, - const unsigned char *bytes, - int len); -int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj); -int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, - const void *data, int len); -void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype, - void *data); -int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr); -ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); -ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); - -int EVP_PKEY_get_attr_count(const EVP_PKEY *key); -int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos); -int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); -X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); -int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); -int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, - const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len); -int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, - int nid, int type, - const unsigned char *bytes, int len); -int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, - const char *attrname, int type, - const unsigned char *bytes, int len); - -int X509_verify_cert(X509_STORE_CTX *ctx); - -/* lookup a cert from a X509 STACK */ -X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name, - ASN1_INTEGER *serial); -X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name); - -DECLARE_ASN1_FUNCTIONS(PBEPARAM) -DECLARE_ASN1_FUNCTIONS(PBE2PARAM) -DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM) - -int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, - const unsigned char *salt, int saltlen); - -X509_ALGOR *PKCS5_pbe_set(int alg, int iter, - const unsigned char *salt, int saltlen); -X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, - unsigned char *salt, int saltlen); -X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, - unsigned char *salt, int saltlen, - unsigned char *aiv, int prf_nid); - -X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, - int prf_nid, int keylen); - -/* PKCS#8 utilities */ - -DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) - -EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8); -PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); -PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken); -PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken); - -int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, - int version, int ptype, void *pval, - unsigned char *penc, int penclen); -int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg, - const unsigned char **pk, int *ppklen, - X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8); - -int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, - int ptype, void *pval, - unsigned char *penc, int penclen); -int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, - const unsigned char **pk, int *ppklen, - X509_ALGOR **pa, X509_PUBKEY *pub); - -int X509_check_trust(X509 *x, int id, int flags); -int X509_TRUST_get_count(void); -X509_TRUST *X509_TRUST_get0(int idx); -int X509_TRUST_get_by_id(int id); -int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int), - char *name, int arg1, void *arg2); -void X509_TRUST_cleanup(void); -int X509_TRUST_get_flags(X509_TRUST *xp); -char *X509_TRUST_get0_name(X509_TRUST *xp); -int X509_TRUST_get_trust(X509_TRUST *xp); - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ - -void ERR_load_X509_strings(void); - -/* Error codes for the X509 functions. */ - -/* Function codes. */ -# define X509_F_ADD_CERT_DIR 100 -# define X509_F_BY_FILE_CTRL 101 -# define X509_F_CHECK_NAME_CONSTRAINTS 106 -# define X509_F_CHECK_POLICY 145 -# define X509_F_DIR_CTRL 102 -# define X509_F_GET_CERT_BY_SUBJECT 103 -# define X509_F_NETSCAPE_SPKI_B64_DECODE 129 -# define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 -# define X509_F_X509AT_ADD1_ATTR 135 -# define X509_F_X509V3_ADD_EXT 104 -# define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 -# define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 137 -# define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 140 -# define X509_F_X509_ATTRIBUTE_GET0_DATA 139 -# define X509_F_X509_ATTRIBUTE_SET1_DATA 138 -# define X509_F_X509_CHECK_PRIVATE_KEY 128 -# define X509_F_X509_CRL_DIFF 105 -# define X509_F_X509_CRL_PRINT_FP 147 -# define X509_F_X509_EXTENSION_CREATE_BY_NID 108 -# define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 -# define X509_F_X509_GET_PUBKEY_PARAMETERS 110 -# define X509_F_X509_LOAD_CERT_CRL_FILE 132 -# define X509_F_X509_LOAD_CERT_FILE 111 -# define X509_F_X509_LOAD_CRL_FILE 112 -# define X509_F_X509_NAME_ADD_ENTRY 113 -# define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 114 -# define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 131 -# define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 -# define X509_F_X509_NAME_ONELINE 116 -# define X509_F_X509_NAME_PRINT 117 -# define X509_F_X509_PRINT_EX_FP 118 -# define X509_F_X509_PUBKEY_GET 119 -# define X509_F_X509_PUBKEY_SET 120 -# define X509_F_X509_REQ_CHECK_PRIVATE_KEY 144 -# define X509_F_X509_REQ_PRINT_EX 121 -# define X509_F_X509_REQ_PRINT_FP 122 -# define X509_F_X509_REQ_TO_X509 123 -# define X509_F_X509_STORE_ADD_CERT 124 -# define X509_F_X509_STORE_ADD_CRL 125 -# define X509_F_X509_STORE_CTX_GET1_ISSUER 146 -# define X509_F_X509_STORE_CTX_INIT 143 -# define X509_F_X509_STORE_CTX_NEW 142 -# define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 -# define X509_F_X509_TO_X509_REQ 126 -# define X509_F_X509_TRUST_ADD 133 -# define X509_F_X509_TRUST_SET 141 -# define X509_F_X509_VERIFY_CERT 127 - -/* Reason codes. */ -# define X509_R_AKID_MISMATCH 110 -# define X509_R_BAD_X509_FILETYPE 100 -# define X509_R_BASE64_DECODE_ERROR 118 -# define X509_R_CANT_CHECK_DH_KEY 114 -# define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 -# define X509_R_CRL_ALREADY_DELTA 127 -# define X509_R_CRL_VERIFY_FAILURE 131 -# define X509_R_ERR_ASN1_LIB 102 -# define X509_R_IDP_MISMATCH 128 -# define X509_R_INVALID_DIRECTORY 113 -# define X509_R_INVALID_FIELD_NAME 119 -# define X509_R_INVALID_TRUST 123 -# define X509_R_ISSUER_MISMATCH 129 -# define X509_R_KEY_TYPE_MISMATCH 115 -# define X509_R_KEY_VALUES_MISMATCH 116 -# define X509_R_LOADING_CERT_DIR 103 -# define X509_R_LOADING_DEFAULTS 104 -# define X509_R_METHOD_NOT_SUPPORTED 124 -# define X509_R_NAME_TOO_LONG 134 -# define X509_R_NEWER_CRL_NOT_NEWER 132 -# define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 -# define X509_R_NO_CRL_NUMBER 130 -# define X509_R_PUBLIC_KEY_DECODE_ERROR 125 -# define X509_R_PUBLIC_KEY_ENCODE_ERROR 126 -# define X509_R_SHOULD_RETRY 106 -# define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 -# define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 -# define X509_R_UNKNOWN_KEY_TYPE 117 -# define X509_R_UNKNOWN_NID 109 -# define X509_R_UNKNOWN_PURPOSE_ID 121 -# define X509_R_UNKNOWN_TRUST_ID 120 -# define X509_R_UNSUPPORTED_ALGORITHM 111 -# define X509_R_WRONG_LOOKUP_TYPE 112 -# define X509_R_WRONG_TYPE 122 - -# ifdef __cplusplus -} -# endif -#endif +/* + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_X509_H +# define HEADER_X509_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# if OPENSSL_API_COMPAT < 0x10100000L +# include +# include +# include +# endif + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Flags for X509_get_signature_info() */ +/* Signature info is valid */ +# define X509_SIG_INFO_VALID 0x1 +/* Signature is suitable for TLS use */ +# define X509_SIG_INFO_TLS 0x2 + +# define X509_FILETYPE_PEM 1 +# define X509_FILETYPE_ASN1 2 +# define X509_FILETYPE_DEFAULT 3 + +# define X509v3_KU_DIGITAL_SIGNATURE 0x0080 +# define X509v3_KU_NON_REPUDIATION 0x0040 +# define X509v3_KU_KEY_ENCIPHERMENT 0x0020 +# define X509v3_KU_DATA_ENCIPHERMENT 0x0010 +# define X509v3_KU_KEY_AGREEMENT 0x0008 +# define X509v3_KU_KEY_CERT_SIGN 0x0004 +# define X509v3_KU_CRL_SIGN 0x0002 +# define X509v3_KU_ENCIPHER_ONLY 0x0001 +# define X509v3_KU_DECIPHER_ONLY 0x8000 +# define X509v3_KU_UNDEF 0xffff + +struct X509_algor_st { + ASN1_OBJECT *algorithm; + ASN1_TYPE *parameter; +} /* X509_ALGOR */ ; + +typedef STACK_OF(X509_ALGOR) X509_ALGORS; + +typedef struct X509_val_st { + ASN1_TIME *notBefore; + ASN1_TIME *notAfter; +} X509_VAL; + +typedef struct X509_sig_st X509_SIG; + +typedef struct X509_name_entry_st X509_NAME_ENTRY; + +DEFINE_STACK_OF(X509_NAME_ENTRY) + +DEFINE_STACK_OF(X509_NAME) + +# define X509_EX_V_NETSCAPE_HACK 0x8000 +# define X509_EX_V_INIT 0x0001 +typedef struct X509_extension_st X509_EXTENSION; + +typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS; + +DEFINE_STACK_OF(X509_EXTENSION) + +typedef struct x509_attributes_st X509_ATTRIBUTE; + +DEFINE_STACK_OF(X509_ATTRIBUTE) + +typedef struct X509_req_info_st X509_REQ_INFO; + +typedef struct X509_req_st X509_REQ; + +typedef struct x509_cert_aux_st X509_CERT_AUX; + +typedef struct x509_cinf_st X509_CINF; + +DEFINE_STACK_OF(X509) + +/* This is used for a table of trust checking functions */ + +typedef struct x509_trust_st { + int trust; + int flags; + int (*check_trust) (struct x509_trust_st *, X509 *, int); + char *name; + int arg1; + void *arg2; +} X509_TRUST; + +DEFINE_STACK_OF(X509_TRUST) + +/* standard trust ids */ + +# define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */ + +# define X509_TRUST_COMPAT 1 +# define X509_TRUST_SSL_CLIENT 2 +# define X509_TRUST_SSL_SERVER 3 +# define X509_TRUST_EMAIL 4 +# define X509_TRUST_OBJECT_SIGN 5 +# define X509_TRUST_OCSP_SIGN 6 +# define X509_TRUST_OCSP_REQUEST 7 +# define X509_TRUST_TSA 8 + +/* Keep these up to date! */ +# define X509_TRUST_MIN 1 +# define X509_TRUST_MAX 8 + +/* trust_flags values */ +# define X509_TRUST_DYNAMIC (1U << 0) +# define X509_TRUST_DYNAMIC_NAME (1U << 1) +/* No compat trust if self-signed, preempts "DO_SS" */ +# define X509_TRUST_NO_SS_COMPAT (1U << 2) +/* Compat trust if no explicit accepted trust EKUs */ +# define X509_TRUST_DO_SS_COMPAT (1U << 3) +/* Accept "anyEKU" as a wildcard trust OID */ +# define X509_TRUST_OK_ANY_EKU (1U << 4) + +/* check_trust return codes */ + +# define X509_TRUST_TRUSTED 1 +# define X509_TRUST_REJECTED 2 +# define X509_TRUST_UNTRUSTED 3 + +/* Flags for X509_print_ex() */ + +# define X509_FLAG_COMPAT 0 +# define X509_FLAG_NO_HEADER 1L +# define X509_FLAG_NO_VERSION (1L << 1) +# define X509_FLAG_NO_SERIAL (1L << 2) +# define X509_FLAG_NO_SIGNAME (1L << 3) +# define X509_FLAG_NO_ISSUER (1L << 4) +# define X509_FLAG_NO_VALIDITY (1L << 5) +# define X509_FLAG_NO_SUBJECT (1L << 6) +# define X509_FLAG_NO_PUBKEY (1L << 7) +# define X509_FLAG_NO_EXTENSIONS (1L << 8) +# define X509_FLAG_NO_SIGDUMP (1L << 9) +# define X509_FLAG_NO_AUX (1L << 10) +# define X509_FLAG_NO_ATTRIBUTES (1L << 11) +# define X509_FLAG_NO_IDS (1L << 12) + +/* Flags specific to X509_NAME_print_ex() */ + +/* The field separator information */ + +# define XN_FLAG_SEP_MASK (0xf << 16) + +# define XN_FLAG_COMPAT 0/* Traditional; use old X509_NAME_print */ +# define XN_FLAG_SEP_COMMA_PLUS (1 << 16)/* RFC2253 ,+ */ +# define XN_FLAG_SEP_CPLUS_SPC (2 << 16)/* ,+ spaced: more readable */ +# define XN_FLAG_SEP_SPLUS_SPC (3 << 16)/* ;+ spaced */ +# define XN_FLAG_SEP_MULTILINE (4 << 16)/* One line per field */ + +# define XN_FLAG_DN_REV (1 << 20)/* Reverse DN order */ + +/* How the field name is shown */ + +# define XN_FLAG_FN_MASK (0x3 << 21) + +# define XN_FLAG_FN_SN 0/* Object short name */ +# define XN_FLAG_FN_LN (1 << 21)/* Object long name */ +# define XN_FLAG_FN_OID (2 << 21)/* Always use OIDs */ +# define XN_FLAG_FN_NONE (3 << 21)/* No field names */ + +# define XN_FLAG_SPC_EQ (1 << 23)/* Put spaces round '=' */ + +/* + * This determines if we dump fields we don't recognise: RFC2253 requires + * this. + */ + +# define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) + +# define XN_FLAG_FN_ALIGN (1 << 25)/* Align field names to 20 + * characters */ + +/* Complete set of RFC2253 flags */ + +# define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ + XN_FLAG_SEP_COMMA_PLUS | \ + XN_FLAG_DN_REV | \ + XN_FLAG_FN_SN | \ + XN_FLAG_DUMP_UNKNOWN_FIELDS) + +/* readable oneline form */ + +# define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \ + ASN1_STRFLGS_ESC_QUOTE | \ + XN_FLAG_SEP_CPLUS_SPC | \ + XN_FLAG_SPC_EQ | \ + XN_FLAG_FN_SN) + +/* readable multiline form */ + +# define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \ + ASN1_STRFLGS_ESC_MSB | \ + XN_FLAG_SEP_MULTILINE | \ + XN_FLAG_SPC_EQ | \ + XN_FLAG_FN_LN | \ + XN_FLAG_FN_ALIGN) + +DEFINE_STACK_OF(X509_REVOKED) + +typedef struct X509_crl_info_st X509_CRL_INFO; + +DEFINE_STACK_OF(X509_CRL) + +typedef struct private_key_st { + int version; + /* The PKCS#8 data types */ + X509_ALGOR *enc_algor; + ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */ + /* When decrypted, the following will not be NULL */ + EVP_PKEY *dec_pkey; + /* used to encrypt and decrypt */ + int key_length; + char *key_data; + int key_free; /* true if we should auto free key_data */ + /* expanded version of 'enc_algor' */ + EVP_CIPHER_INFO cipher; +} X509_PKEY; + +typedef struct X509_info_st { + X509 *x509; + X509_CRL *crl; + X509_PKEY *x_pkey; + EVP_CIPHER_INFO enc_cipher; + int enc_len; + char *enc_data; +} X509_INFO; + +DEFINE_STACK_OF(X509_INFO) + +/* + * The next 2 structures and their 8 routines are used to manipulate Netscape's + * spki structures - useful if you are writing a CA web page + */ +typedef struct Netscape_spkac_st { + X509_PUBKEY *pubkey; + ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */ +} NETSCAPE_SPKAC; + +typedef struct Netscape_spki_st { + NETSCAPE_SPKAC *spkac; /* signed public key and challenge */ + X509_ALGOR sig_algor; + ASN1_BIT_STRING *signature; +} NETSCAPE_SPKI; + +/* Netscape certificate sequence structure */ +typedef struct Netscape_certificate_sequence { + ASN1_OBJECT *type; + STACK_OF(X509) *certs; +} NETSCAPE_CERT_SEQUENCE; + +/*- Unused (and iv length is wrong) +typedef struct CBCParameter_st + { + unsigned char iv[8]; + } CBC_PARAM; +*/ + +/* Password based encryption structure */ + +typedef struct PBEPARAM_st { + ASN1_OCTET_STRING *salt; + ASN1_INTEGER *iter; +} PBEPARAM; + +/* Password based encryption V2 structures */ + +typedef struct PBE2PARAM_st { + X509_ALGOR *keyfunc; + X509_ALGOR *encryption; +} PBE2PARAM; + +typedef struct PBKDF2PARAM_st { +/* Usually OCTET STRING but could be anything */ + ASN1_TYPE *salt; + ASN1_INTEGER *iter; + ASN1_INTEGER *keylength; + X509_ALGOR *prf; +} PBKDF2PARAM; + +#ifndef OPENSSL_NO_SCRYPT +typedef struct SCRYPT_PARAMS_st { + ASN1_OCTET_STRING *salt; + ASN1_INTEGER *costParameter; + ASN1_INTEGER *blockSize; + ASN1_INTEGER *parallelizationParameter; + ASN1_INTEGER *keyLength; +} SCRYPT_PARAMS; +#endif + +#ifdef __cplusplus +} +#endif + +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +# define X509_EXT_PACK_UNKNOWN 1 +# define X509_EXT_PACK_STRING 2 + +# define X509_extract_key(x) X509_get_pubkey(x)/*****/ +# define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a) +# define X509_name_cmp(a,b) X509_NAME_cmp((a),(b)) + +void X509_CRL_set_default_method(const X509_CRL_METHOD *meth); +X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl), + int (*crl_free) (X509_CRL *crl), + int (*crl_lookup) (X509_CRL *crl, + X509_REVOKED **ret, + ASN1_INTEGER *ser, + X509_NAME *issuer), + int (*crl_verify) (X509_CRL *crl, + EVP_PKEY *pk)); +void X509_CRL_METHOD_free(X509_CRL_METHOD *m); + +void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); +void *X509_CRL_get_meth_data(X509_CRL *crl); + +const char *X509_verify_cert_error_string(long n); + +int X509_verify(X509 *a, EVP_PKEY *r); + +int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); +int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r); +int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r); + +NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len); +char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x); +EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x); +int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey); + +int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); + +int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent); +int X509_signature_print(BIO *bp, const X509_ALGOR *alg, + const ASN1_STRING *sig); + +int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); +int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx); +# ifndef OPENSSL_NO_OCSP +int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert); +# endif +int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); +int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx); +int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); +int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx); +# ifndef OPENSSL_NO_OCSP +int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl); +# endif +int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); + +int X509_pubkey_digest(const X509 *data, const EVP_MD *type, + unsigned char *md, unsigned int *len); +int X509_digest(const X509 *data, const EVP_MD *type, + unsigned char *md, unsigned int *len); +int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, + unsigned char *md, unsigned int *len); +int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type, + unsigned char *md, unsigned int *len); +int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, + unsigned char *md, unsigned int *len); + +# ifndef OPENSSL_NO_STDIO +X509 *d2i_X509_fp(FILE *fp, X509 **x509); +int i2d_X509_fp(FILE *fp, X509 *x509); +X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl); +int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl); +X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req); +int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req); +# ifndef OPENSSL_NO_RSA +RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa); +int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa); +RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa); +int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa); +RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa); +int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa); +# endif +# ifndef OPENSSL_NO_DSA +DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa); +int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); +DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); +int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); +# endif +# ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); +int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); +EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); +int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); +# endif +X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8); +int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8); +PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, + PKCS8_PRIV_KEY_INFO **p8inf); +int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf); +int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); +int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); +EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); +int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); +EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); +# endif + +X509 *d2i_X509_bio(BIO *bp, X509 **x509); +int i2d_X509_bio(BIO *bp, X509 *x509); +X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl); +int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl); +X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req); +int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req); +# ifndef OPENSSL_NO_RSA +RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa); +int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa); +RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa); +int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa); +RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa); +int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa); +# endif +# ifndef OPENSSL_NO_DSA +DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa); +int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); +DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); +int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); +# endif +# ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); +int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); +EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); +int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); +# endif +X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8); +int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8); +PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, + PKCS8_PRIV_KEY_INFO **p8inf); +int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf); +int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); +int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); +EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); +int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); +EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); + +X509 *X509_dup(X509 *x509); +X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa); +X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex); +X509_CRL *X509_CRL_dup(X509_CRL *crl); +X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev); +X509_REQ *X509_REQ_dup(X509_REQ *req); +X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); +int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, + void *pval); +void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, + const void **ppval, const X509_ALGOR *algor); +void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); +int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); + +X509_NAME *X509_NAME_dup(X509_NAME *xn); +X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); + +int X509_cmp_time(const ASN1_TIME *s, time_t *t); +int X509_cmp_current_time(const ASN1_TIME *s); +ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t); +ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, + int offset_day, long offset_sec, time_t *t); +ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj); + +const char *X509_get_default_cert_area(void); +const char *X509_get_default_cert_dir(void); +const char *X509_get_default_cert_file(void); +const char *X509_get_default_cert_dir_env(void); +const char *X509_get_default_cert_file_env(void); +const char *X509_get_default_private_dir(void); + +X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); +X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey); + +DECLARE_ASN1_FUNCTIONS(X509_ALGOR) +DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS) +DECLARE_ASN1_FUNCTIONS(X509_VAL) + +DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) + +int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); +EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key); +EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key); +int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain); +long X509_get_pathlen(X509 *x); +int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp); +EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length); +# ifndef OPENSSL_NO_RSA +int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp); +RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length); +# endif +# ifndef OPENSSL_NO_DSA +int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp); +DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length); +# endif +# ifndef OPENSSL_NO_EC +int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); +EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length); +# endif + +DECLARE_ASN1_FUNCTIONS(X509_SIG) +void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, + const ASN1_OCTET_STRING **pdigest); +void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, + ASN1_OCTET_STRING **pdigest); + +DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) +DECLARE_ASN1_FUNCTIONS(X509_REQ) + +DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) +X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); + +DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) +DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS) + +DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) + +DECLARE_ASN1_FUNCTIONS(X509_NAME) + +int X509_NAME_set(X509_NAME **xn, X509_NAME *name); + +DECLARE_ASN1_FUNCTIONS(X509_CINF) + +DECLARE_ASN1_FUNCTIONS(X509) +DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) + +#define X509_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509, l, p, newf, dupf, freef) +int X509_set_ex_data(X509 *r, int idx, void *arg); +void *X509_get_ex_data(X509 *r, int idx); +int i2d_X509_AUX(X509 *a, unsigned char **pp); +X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length); + +int i2d_re_X509_tbs(X509 *x, unsigned char **pp); + +int X509_SIG_INFO_get(const X509_SIG_INFO *siginf, int *mdnid, int *pknid, + int *secbits, uint32_t *flags); +void X509_SIG_INFO_set(X509_SIG_INFO *siginf, int mdnid, int pknid, + int secbits, uint32_t flags); + +int X509_get_signature_info(X509 *x, int *mdnid, int *pknid, int *secbits, + uint32_t *flags); + +void X509_get0_signature(const ASN1_BIT_STRING **psig, + const X509_ALGOR **palg, const X509 *x); +int X509_get_signature_nid(const X509 *x); + +int X509_trusted(const X509 *x); +int X509_alias_set1(X509 *x, const unsigned char *name, int len); +int X509_keyid_set1(X509 *x, const unsigned char *id, int len); +unsigned char *X509_alias_get0(X509 *x, int *len); +unsigned char *X509_keyid_get0(X509 *x, int *len); +int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *, + int); +int X509_TRUST_set(int *t, int trust); +int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj); +int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj); +void X509_trust_clear(X509 *x); +void X509_reject_clear(X509 *x); + +STACK_OF(ASN1_OBJECT) *X509_get0_trust_objects(X509 *x); +STACK_OF(ASN1_OBJECT) *X509_get0_reject_objects(X509 *x); + +DECLARE_ASN1_FUNCTIONS(X509_REVOKED) +DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO) +DECLARE_ASN1_FUNCTIONS(X509_CRL) + +int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); +int X509_CRL_get0_by_serial(X509_CRL *crl, + X509_REVOKED **ret, ASN1_INTEGER *serial); +int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x); + +X509_PKEY *X509_PKEY_new(void); +void X509_PKEY_free(X509_PKEY *a); + +DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) +DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) +DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) + +X509_INFO *X509_INFO_new(void); +void X509_INFO_free(X509_INFO *a); +char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size); + +int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, + ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey); + +int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, + unsigned char *md, unsigned int *len); + +int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, + X509_ALGOR *algor2, ASN1_BIT_STRING *signature, + char *data, EVP_PKEY *pkey, const EVP_MD *type); + +int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data, + unsigned char *md, unsigned int *len); + +int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1, + ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey); + +int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, + X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data, + EVP_PKEY *pkey, const EVP_MD *type); +int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, + X509_ALGOR *algor2, ASN1_BIT_STRING *signature, + void *asn, EVP_MD_CTX *ctx); + +long X509_get_version(const X509 *x); +int X509_set_version(X509 *x, long version); +int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); +ASN1_INTEGER *X509_get_serialNumber(X509 *x); +const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x); +int X509_set_issuer_name(X509 *x, X509_NAME *name); +X509_NAME *X509_get_issuer_name(const X509 *a); +int X509_set_subject_name(X509 *x, X509_NAME *name); +X509_NAME *X509_get_subject_name(const X509 *a); +const ASN1_TIME * X509_get0_notBefore(const X509 *x); +ASN1_TIME *X509_getm_notBefore(const X509 *x); +int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm); +const ASN1_TIME *X509_get0_notAfter(const X509 *x); +ASN1_TIME *X509_getm_notAfter(const X509 *x); +int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm); +int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); +int X509_up_ref(X509 *x); +int X509_get_signature_type(const X509 *x); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define X509_get_notBefore X509_getm_notBefore +# define X509_get_notAfter X509_getm_notAfter +# define X509_set_notBefore X509_set1_notBefore +# define X509_set_notAfter X509_set1_notAfter +#endif + + +/* + * This one is only used so that a binary form can output, as in + * i2d_X509_PUBKEY(X509_get_X509_PUBKEY(x), &buf) + */ +X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x); +const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x); +void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid, + const ASN1_BIT_STRING **psuid); +const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x); + +EVP_PKEY *X509_get0_pubkey(const X509 *x); +EVP_PKEY *X509_get_pubkey(X509 *x); +ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x); +int X509_certificate_type(const X509 *x, const EVP_PKEY *pubkey); + +long X509_REQ_get_version(const X509_REQ *req); +int X509_REQ_set_version(X509_REQ *x, long version); +X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req); +int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name); +void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, + const X509_ALGOR **palg); +int X509_REQ_get_signature_nid(const X509_REQ *req); +int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp); +int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); +EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req); +EVP_PKEY *X509_REQ_get0_pubkey(X509_REQ *req); +X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req); +int X509_REQ_extension_nid(int nid); +int *X509_REQ_get_extension_nids(void); +void X509_REQ_set_extension_nids(int *nids); +STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req); +int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, + int nid); +int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts); +int X509_REQ_get_attr_count(const X509_REQ *req); +int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos); +int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj, + int lastpos); +X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc); +X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); +int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr); +int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, + const ASN1_OBJECT *obj, int type, + const unsigned char *bytes, int len); +int X509_REQ_add1_attr_by_NID(X509_REQ *req, + int nid, int type, + const unsigned char *bytes, int len); +int X509_REQ_add1_attr_by_txt(X509_REQ *req, + const char *attrname, int type, + const unsigned char *bytes, int len); + +int X509_CRL_set_version(X509_CRL *x, long version); +int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); +int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); +int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); +int X509_CRL_sort(X509_CRL *crl); +int X509_CRL_up_ref(X509_CRL *crl); + +# if OPENSSL_API_COMPAT < 0x10100000L +# define X509_CRL_set_lastUpdate X509_CRL_set1_lastUpdate +# define X509_CRL_set_nextUpdate X509_CRL_set1_nextUpdate +#endif + +long X509_CRL_get_version(const X509_CRL *crl); +const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl); +const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl); +DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl)) +DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl)) +X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl); +const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl); +STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl); +void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, + const X509_ALGOR **palg); +int X509_CRL_get_signature_nid(const X509_CRL *crl); +int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp); + +const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x); +int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); +const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x); +int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); +const STACK_OF(X509_EXTENSION) * +X509_REVOKED_get0_extensions(const X509_REVOKED *r); + +X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer, + EVP_PKEY *skey, const EVP_MD *md, unsigned int flags); + +int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey); + +int X509_check_private_key(const X509 *x509, const EVP_PKEY *pkey); +int X509_chain_check_suiteb(int *perror_depth, + X509 *x, STACK_OF(X509) *chain, + unsigned long flags); +int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags); +STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); + +int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); +unsigned long X509_issuer_and_serial_hash(X509 *a); + +int X509_issuer_name_cmp(const X509 *a, const X509 *b); +unsigned long X509_issuer_name_hash(X509 *a); + +int X509_subject_name_cmp(const X509 *a, const X509 *b); +unsigned long X509_subject_name_hash(X509 *x); + +# ifndef OPENSSL_NO_MD5 +unsigned long X509_issuer_name_hash_old(X509 *a); +unsigned long X509_subject_name_hash_old(X509 *x); +# endif + +int X509_cmp(const X509 *a, const X509 *b); +int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b); +unsigned long X509_NAME_hash(X509_NAME *x); +unsigned long X509_NAME_hash_old(X509_NAME *x); + +int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); +int X509_CRL_match(const X509_CRL *a, const X509_CRL *b); +int X509_aux_print(BIO *out, X509 *x, int indent); +# ifndef OPENSSL_NO_STDIO +int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag, + unsigned long cflag); +int X509_print_fp(FILE *bp, X509 *x); +int X509_CRL_print_fp(FILE *bp, X509_CRL *x); +int X509_REQ_print_fp(FILE *bp, X509_REQ *req); +int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, + unsigned long flags); +# endif + +int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase); +int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, + unsigned long flags); +int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag, + unsigned long cflag); +int X509_print(BIO *bp, X509 *x); +int X509_ocspid_print(BIO *bp, X509 *x); +int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag); +int X509_CRL_print(BIO *bp, X509_CRL *x); +int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag, + unsigned long cflag); +int X509_REQ_print(BIO *bp, X509_REQ *req); + +int X509_NAME_entry_count(const X509_NAME *name); +int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len); +int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, + char *buf, int len); + +/* + * NOTE: you should be passing -1, not 0 as lastpos. The functions that use + * lastpos, search after that position on. + */ +int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos); +int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, + int lastpos); +X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc); +X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); +int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, + int loc, int set); +int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type, + const unsigned char *bytes, int len, int loc, + int set); +int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, + const unsigned char *bytes, int len, int loc, + int set); +X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, + const char *field, int type, + const unsigned char *bytes, + int len); +X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, + int type, + const unsigned char *bytes, + int len); +int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, + const unsigned char *bytes, int len, int loc, + int set); +X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, + const ASN1_OBJECT *obj, int type, + const unsigned char *bytes, + int len); +int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj); +int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, + const unsigned char *bytes, int len); +ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne); +ASN1_STRING * X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne); +int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne); + +int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, + size_t *pderlen); + +int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x); +int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, + int nid, int lastpos); +int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x, + const ASN1_OBJECT *obj, int lastpos); +int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x, + int crit, int lastpos); +X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc); +X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc); +STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, + X509_EXTENSION *ex, int loc); + +int X509_get_ext_count(const X509 *x); +int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos); +int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos); +int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos); +X509_EXTENSION *X509_get_ext(const X509 *x, int loc); +X509_EXTENSION *X509_delete_ext(X509 *x, int loc); +int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); +void *X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx); +int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, + unsigned long flags); + +int X509_CRL_get_ext_count(const X509_CRL *x); +int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos); +int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj, + int lastpos); +int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos); +X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc); +X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); +int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc); +void *X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx); +int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, + unsigned long flags); + +int X509_REVOKED_get_ext_count(const X509_REVOKED *x); +int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos); +int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, + int lastpos); +int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, + int lastpos); +X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc); +X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); +int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); +void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, + int *idx); +int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, + unsigned long flags); + +X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, + int nid, int crit, + ASN1_OCTET_STRING *data); +X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, + const ASN1_OBJECT *obj, int crit, + ASN1_OCTET_STRING *data); +int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj); +int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit); +int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data); +ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex); +ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne); +int X509_EXTENSION_get_critical(const X509_EXTENSION *ex); + +int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x); +int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, + int lastpos); +int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, + const ASN1_OBJECT *obj, int lastpos); +X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc); +X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc); +STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, + X509_ATTRIBUTE *attr); +STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) + **x, const ASN1_OBJECT *obj, + int type, + const unsigned char *bytes, + int len); +STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) + **x, int nid, int type, + const unsigned char *bytes, + int len); +STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) + **x, const char *attrname, + int type, + const unsigned char *bytes, + int len); +void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, + const ASN1_OBJECT *obj, int lastpos, int type); +X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, + int atrtype, const void *data, + int len); +X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, + const ASN1_OBJECT *obj, + int atrtype, const void *data, + int len); +X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, + const char *atrname, int type, + const unsigned char *bytes, + int len); +int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj); +int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, + const void *data, int len); +void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype, + void *data); +int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr); +ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); +ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); + +int EVP_PKEY_get_attr_count(const EVP_PKEY *key); +int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos); +int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, + int lastpos); +X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); +X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); +int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); +int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, + const ASN1_OBJECT *obj, int type, + const unsigned char *bytes, int len); +int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, + int nid, int type, + const unsigned char *bytes, int len); +int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, + const char *attrname, int type, + const unsigned char *bytes, int len); + +int X509_verify_cert(X509_STORE_CTX *ctx); + +/* lookup a cert from a X509 STACK */ +X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name, + ASN1_INTEGER *serial); +X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name); + +DECLARE_ASN1_FUNCTIONS(PBEPARAM) +DECLARE_ASN1_FUNCTIONS(PBE2PARAM) +DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM) +#ifndef OPENSSL_NO_SCRYPT +DECLARE_ASN1_FUNCTIONS(SCRYPT_PARAMS) +#endif + +int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, + const unsigned char *salt, int saltlen); + +X509_ALGOR *PKCS5_pbe_set(int alg, int iter, + const unsigned char *salt, int saltlen); +X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, + unsigned char *salt, int saltlen); +X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, + unsigned char *salt, int saltlen, + unsigned char *aiv, int prf_nid); + +#ifndef OPENSSL_NO_SCRYPT +X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher, + const unsigned char *salt, int saltlen, + unsigned char *aiv, uint64_t N, uint64_t r, + uint64_t p); +#endif + +X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, + int prf_nid, int keylen); + +/* PKCS#8 utilities */ + +DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) + +EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8); +PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); + +int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, + int version, int ptype, void *pval, + unsigned char *penc, int penclen); +int PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg, + const unsigned char **pk, int *ppklen, + const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8); + +const STACK_OF(X509_ATTRIBUTE) * +PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8); +int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, + const unsigned char *bytes, int len); + +int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, + int ptype, void *pval, + unsigned char *penc, int penclen); +int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, + const unsigned char **pk, int *ppklen, + X509_ALGOR **pa, X509_PUBKEY *pub); + +int X509_check_trust(X509 *x, int id, int flags); +int X509_TRUST_get_count(void); +X509_TRUST *X509_TRUST_get0(int idx); +int X509_TRUST_get_by_id(int id); +int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int), + const char *name, int arg1, void *arg2); +void X509_TRUST_cleanup(void); +int X509_TRUST_get_flags(const X509_TRUST *xp); +char *X509_TRUST_get0_name(const X509_TRUST *xp); +int X509_TRUST_get_trust(const X509_TRUST *xp); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/x509_vfy.h b/src/Mayaqua/win32_inc/openssl/x509_vfy.h index dd721929..adb8bce7 100644 --- a/src/Mayaqua/win32_inc/openssl/x509_vfy.h +++ b/src/Mayaqua/win32_inc/openssl/x509_vfy.h @@ -1,652 +1,628 @@ -/* crypto/x509/x509_vfy.h */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#ifndef HEADER_X509_H -# include -/* - * openssl/x509.h ends up #include-ing this file at about the only - * appropriate moment. - */ -#endif - -#ifndef HEADER_X509_VFY_H -# define HEADER_X509_VFY_H - -# include -# ifndef OPENSSL_NO_LHASH -# include -# endif -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# if 0 -/* Outer object */ -typedef struct x509_hash_dir_st { - int num_dirs; - char **dirs; - int *dirs_type; - int num_dirs_alloced; -} X509_HASH_DIR_CTX; -# endif - -typedef struct x509_file_st { - int num_paths; /* number of paths to files or directories */ - int num_alloced; - char **paths; /* the list of paths or directories */ - int *path_type; -} X509_CERT_FILE_CTX; - -/*******************************/ -/*- -SSL_CTX -> X509_STORE - -> X509_LOOKUP - ->X509_LOOKUP_METHOD - -> X509_LOOKUP - ->X509_LOOKUP_METHOD - -SSL -> X509_STORE_CTX - ->X509_STORE - -The X509_STORE holds the tables etc for verification stuff. -A X509_STORE_CTX is used while validating a single certificate. -The X509_STORE has X509_LOOKUPs for looking up certs. -The X509_STORE then calls a function to actually verify the -certificate chain. -*/ - -# define X509_LU_RETRY -1 -# define X509_LU_FAIL 0 -# define X509_LU_X509 1 -# define X509_LU_CRL 2 -# define X509_LU_PKEY 3 - -typedef struct x509_object_st { - /* one of the above types */ - int type; - union { - char *ptr; - X509 *x509; - X509_CRL *crl; - EVP_PKEY *pkey; - } data; -} X509_OBJECT; - -typedef struct x509_lookup_st X509_LOOKUP; - -DECLARE_STACK_OF(X509_LOOKUP) -DECLARE_STACK_OF(X509_OBJECT) - -/* This is a static that defines the function interface */ -typedef struct x509_lookup_method_st { - const char *name; - int (*new_item) (X509_LOOKUP *ctx); - void (*free) (X509_LOOKUP *ctx); - int (*init) (X509_LOOKUP *ctx); - int (*shutdown) (X509_LOOKUP *ctx); - int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl, - char **ret); - int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name, - X509_OBJECT *ret); - int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name, - ASN1_INTEGER *serial, X509_OBJECT *ret); - int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type, - unsigned char *bytes, int len, - X509_OBJECT *ret); - int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len, - X509_OBJECT *ret); -} X509_LOOKUP_METHOD; - -typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID; - -/* - * This structure hold all parameters associated with a verify operation by - * including an X509_VERIFY_PARAM structure in related structures the - * parameters used can be customized - */ - -typedef struct X509_VERIFY_PARAM_st { - char *name; - time_t check_time; /* Time to use */ - unsigned long inh_flags; /* Inheritance flags */ - unsigned long flags; /* Various verify flags */ - int purpose; /* purpose to check untrusted certificates */ - int trust; /* trust setting to check */ - int depth; /* Verify depth */ - STACK_OF(ASN1_OBJECT) *policies; /* Permissible policies */ - X509_VERIFY_PARAM_ID *id; /* opaque ID data */ -} X509_VERIFY_PARAM; - -DECLARE_STACK_OF(X509_VERIFY_PARAM) - -/* - * This is used to hold everything. It is used for all certificate - * validation. Once we have a certificate chain, the 'verify' function is - * then called to actually check the cert chain. - */ -struct x509_store_st { - /* The following is a cache of trusted certs */ - int cache; /* if true, stash any hits */ - STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */ - /* These are external lookup methods */ - STACK_OF(X509_LOOKUP) *get_cert_methods; - X509_VERIFY_PARAM *param; - /* Callbacks for various operations */ - /* called to verify a certificate */ - int (*verify) (X509_STORE_CTX *ctx); - /* error callback */ - int (*verify_cb) (int ok, X509_STORE_CTX *ctx); - /* get issuers cert from ctx */ - int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x); - /* check issued */ - int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer); - /* Check revocation status of chain */ - int (*check_revocation) (X509_STORE_CTX *ctx); - /* retrieve CRL */ - int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); - /* Check CRL validity */ - int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl); - /* Check certificate against CRL */ - int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); - STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm); - STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm); - int (*cleanup) (X509_STORE_CTX *ctx); - CRYPTO_EX_DATA ex_data; - int references; -} /* X509_STORE */ ; - -int X509_STORE_set_depth(X509_STORE *store, int depth); - -# define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func)) -# define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func)) - -/* This is the functions plus an instance of the local variables. */ -struct x509_lookup_st { - int init; /* have we been started */ - int skip; /* don't use us. */ - X509_LOOKUP_METHOD *method; /* the functions */ - char *method_data; /* method data */ - X509_STORE *store_ctx; /* who owns us */ -} /* X509_LOOKUP */ ; - -/* - * This is a used when verifying cert chains. Since the gathering of the - * cert chain can take some time (and have to be 'retried', this needs to be - * kept and passed around. - */ -struct x509_store_ctx_st { /* X509_STORE_CTX */ - X509_STORE *ctx; - /* used when looking up certs */ - int current_method; - /* The following are set by the caller */ - /* The cert to check */ - X509 *cert; - /* chain of X509s - untrusted - passed in */ - STACK_OF(X509) *untrusted; - /* set of CRLs passed in */ - STACK_OF(X509_CRL) *crls; - X509_VERIFY_PARAM *param; - /* Other info for use with get_issuer() */ - void *other_ctx; - /* Callbacks for various operations */ - /* called to verify a certificate */ - int (*verify) (X509_STORE_CTX *ctx); - /* error callback */ - int (*verify_cb) (int ok, X509_STORE_CTX *ctx); - /* get issuers cert from ctx */ - int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x); - /* check issued */ - int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer); - /* Check revocation status of chain */ - int (*check_revocation) (X509_STORE_CTX *ctx); - /* retrieve CRL */ - int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); - /* Check CRL validity */ - int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl); - /* Check certificate against CRL */ - int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); - int (*check_policy) (X509_STORE_CTX *ctx); - STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm); - STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm); - int (*cleanup) (X509_STORE_CTX *ctx); - /* The following is built up */ - /* if 0, rebuild chain */ - int valid; - /* index of last untrusted cert */ - int last_untrusted; - /* chain of X509s - built up and trusted */ - STACK_OF(X509) *chain; - /* Valid policy tree */ - X509_POLICY_TREE *tree; - /* Require explicit policy value */ - int explicit_policy; - /* When something goes wrong, this is why */ - int error_depth; - int error; - X509 *current_cert; - /* cert currently being tested as valid issuer */ - X509 *current_issuer; - /* current CRL */ - X509_CRL *current_crl; - /* score of current CRL */ - int current_crl_score; - /* Reason mask */ - unsigned int current_reasons; - /* For CRL path validation: parent context */ - X509_STORE_CTX *parent; - CRYPTO_EX_DATA ex_data; -} /* X509_STORE_CTX */ ; - -void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); - -# define X509_STORE_CTX_set_app_data(ctx,data) \ - X509_STORE_CTX_set_ex_data(ctx,0,data) -# define X509_STORE_CTX_get_app_data(ctx) \ - X509_STORE_CTX_get_ex_data(ctx,0) - -# define X509_L_FILE_LOAD 1 -# define X509_L_ADD_DIR 2 - -# define X509_LOOKUP_load_file(x,name,type) \ - X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL) - -# define X509_LOOKUP_add_dir(x,name,type) \ - X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) - -# define X509_V_OK 0 -# define X509_V_ERR_UNSPECIFIED 1 - -# define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 -# define X509_V_ERR_UNABLE_TO_GET_CRL 3 -# define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 4 -# define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 5 -# define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6 -# define X509_V_ERR_CERT_SIGNATURE_FAILURE 7 -# define X509_V_ERR_CRL_SIGNATURE_FAILURE 8 -# define X509_V_ERR_CERT_NOT_YET_VALID 9 -# define X509_V_ERR_CERT_HAS_EXPIRED 10 -# define X509_V_ERR_CRL_NOT_YET_VALID 11 -# define X509_V_ERR_CRL_HAS_EXPIRED 12 -# define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13 -# define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14 -# define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 15 -# define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 16 -# define X509_V_ERR_OUT_OF_MEM 17 -# define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18 -# define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19 -# define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20 -# define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 -# define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 -# define X509_V_ERR_CERT_REVOKED 23 -# define X509_V_ERR_INVALID_CA 24 -# define X509_V_ERR_PATH_LENGTH_EXCEEDED 25 -# define X509_V_ERR_INVALID_PURPOSE 26 -# define X509_V_ERR_CERT_UNTRUSTED 27 -# define X509_V_ERR_CERT_REJECTED 28 -/* These are 'informational' when looking for issuer cert */ -# define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29 -# define X509_V_ERR_AKID_SKID_MISMATCH 30 -# define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 -# define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 - -# define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 -# define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 -# define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35 -# define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36 -# define X509_V_ERR_INVALID_NON_CA 37 -# define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38 -# define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39 -# define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40 - -# define X509_V_ERR_INVALID_EXTENSION 41 -# define X509_V_ERR_INVALID_POLICY_EXTENSION 42 -# define X509_V_ERR_NO_EXPLICIT_POLICY 43 -# define X509_V_ERR_DIFFERENT_CRL_SCOPE 44 -# define X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE 45 - -# define X509_V_ERR_UNNESTED_RESOURCE 46 - -# define X509_V_ERR_PERMITTED_VIOLATION 47 -# define X509_V_ERR_EXCLUDED_VIOLATION 48 -# define X509_V_ERR_SUBTREE_MINMAX 49 -# define X509_V_ERR_APPLICATION_VERIFICATION 50 -# define X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE 51 -# define X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX 52 -# define X509_V_ERR_UNSUPPORTED_NAME_SYNTAX 53 -# define X509_V_ERR_CRL_PATH_VALIDATION_ERROR 54 - -/* Suite B mode algorithm violation */ -# define X509_V_ERR_SUITE_B_INVALID_VERSION 56 -# define X509_V_ERR_SUITE_B_INVALID_ALGORITHM 57 -# define X509_V_ERR_SUITE_B_INVALID_CURVE 58 -# define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM 59 -# define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60 -# define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61 - -/* Host, email and IP check errors */ -# define X509_V_ERR_HOSTNAME_MISMATCH 62 -# define X509_V_ERR_EMAIL_MISMATCH 63 -# define X509_V_ERR_IP_ADDRESS_MISMATCH 64 - -/* Caller error */ -# define X509_V_ERR_INVALID_CALL 65 -/* Issuer lookup error */ -# define X509_V_ERR_STORE_LOOKUP 66 - -# define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 67 - -/* Certificate verify flags */ - -/* Send issuer+subject checks to verify_cb */ -# define X509_V_FLAG_CB_ISSUER_CHECK 0x1 -/* Use check time instead of current time */ -# define X509_V_FLAG_USE_CHECK_TIME 0x2 -/* Lookup CRLs */ -# define X509_V_FLAG_CRL_CHECK 0x4 -/* Lookup CRLs for whole chain */ -# define X509_V_FLAG_CRL_CHECK_ALL 0x8 -/* Ignore unhandled critical extensions */ -# define X509_V_FLAG_IGNORE_CRITICAL 0x10 -/* Disable workarounds for broken certificates */ -# define X509_V_FLAG_X509_STRICT 0x20 -/* Enable proxy certificate validation */ -# define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40 -/* Enable policy checking */ -# define X509_V_FLAG_POLICY_CHECK 0x80 -/* Policy variable require-explicit-policy */ -# define X509_V_FLAG_EXPLICIT_POLICY 0x100 -/* Policy variable inhibit-any-policy */ -# define X509_V_FLAG_INHIBIT_ANY 0x200 -/* Policy variable inhibit-policy-mapping */ -# define X509_V_FLAG_INHIBIT_MAP 0x400 -/* Notify callback that policy is OK */ -# define X509_V_FLAG_NOTIFY_POLICY 0x800 -/* Extended CRL features such as indirect CRLs, alternate CRL signing keys */ -# define X509_V_FLAG_EXTENDED_CRL_SUPPORT 0x1000 -/* Delta CRL support */ -# define X509_V_FLAG_USE_DELTAS 0x2000 -/* Check selfsigned CA signature */ -# define X509_V_FLAG_CHECK_SS_SIGNATURE 0x4000 -/* Use trusted store first */ -# define X509_V_FLAG_TRUSTED_FIRST 0x8000 -/* Suite B 128 bit only mode: not normally used */ -# define X509_V_FLAG_SUITEB_128_LOS_ONLY 0x10000 -/* Suite B 192 bit only mode */ -# define X509_V_FLAG_SUITEB_192_LOS 0x20000 -/* Suite B 128 bit mode allowing 192 bit algorithms */ -# define X509_V_FLAG_SUITEB_128_LOS 0x30000 - -/* Allow partial chains if at least one certificate is in trusted store */ -# define X509_V_FLAG_PARTIAL_CHAIN 0x80000 -/* - * If the initial chain is not trusted, do not attempt to build an alternative - * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag - * will force the behaviour to match that of previous versions. - */ -# define X509_V_FLAG_NO_ALT_CHAINS 0x100000 - -# define X509_VP_FLAG_DEFAULT 0x1 -# define X509_VP_FLAG_OVERWRITE 0x2 -# define X509_VP_FLAG_RESET_FLAGS 0x4 -# define X509_VP_FLAG_LOCKED 0x8 -# define X509_VP_FLAG_ONCE 0x10 - -/* Internal use: mask of policy related options */ -# define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \ - | X509_V_FLAG_EXPLICIT_POLICY \ - | X509_V_FLAG_INHIBIT_ANY \ - | X509_V_FLAG_INHIBIT_MAP) - -int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, - X509_NAME *name); -X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, - int type, X509_NAME *name); -X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, - X509_OBJECT *x); -void X509_OBJECT_up_ref_count(X509_OBJECT *a); -void X509_OBJECT_free_contents(X509_OBJECT *a); -X509_STORE *X509_STORE_new(void); -void X509_STORE_free(X509_STORE *v); - -STACK_OF(X509) *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm); -STACK_OF(X509_CRL) *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm); -int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags); -int X509_STORE_set_purpose(X509_STORE *ctx, int purpose); -int X509_STORE_set_trust(X509_STORE *ctx, int trust); -int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); - -void X509_STORE_set_verify_cb(X509_STORE *ctx, - int (*verify_cb) (int, X509_STORE_CTX *)); - -void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx, - STACK_OF(X509_CRL) *(*cb) (X509_STORE_CTX - *ctx, - X509_NAME *nm)); - -X509_STORE_CTX *X509_STORE_CTX_new(void); - -int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); - -void X509_STORE_CTX_free(X509_STORE_CTX *ctx); -int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, - X509 *x509, STACK_OF(X509) *chain); -void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); -void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); - -X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx); - -X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); - -X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void); -X509_LOOKUP_METHOD *X509_LOOKUP_file(void); - -int X509_STORE_add_cert(X509_STORE *ctx, X509 *x); -int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x); - -int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, - X509_OBJECT *ret); - -int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, - long argl, char **ret); - -# ifndef OPENSSL_NO_STDIO -int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); -int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); -int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); -# endif - -X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method); -void X509_LOOKUP_free(X509_LOOKUP *ctx); -int X509_LOOKUP_init(X509_LOOKUP *ctx); -int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, - X509_OBJECT *ret); -int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, - ASN1_INTEGER *serial, X509_OBJECT *ret); -int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, - unsigned char *bytes, int len, - X509_OBJECT *ret); -int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len, - X509_OBJECT *ret); -int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); - -# ifndef OPENSSL_NO_STDIO -int X509_STORE_load_locations(X509_STORE *ctx, - const char *file, const char *dir); -int X509_STORE_set_default_paths(X509_STORE *ctx); -# endif - -int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, - CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, - CRYPTO_EX_free *free_func); -int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data); -void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx); -int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); -void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s); -int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); -X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); -X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx); -X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx); -X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx); -STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); -STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx); -void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x); -void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, STACK_OF(X509) *sk); -void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, STACK_OF(X509_CRL) *sk); -int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); -int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); -int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, - int purpose, int trust); -void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags); -void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, - time_t t); -void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, - int (*verify_cb) (int, X509_STORE_CTX *)); - -X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); -int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); - -X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); -void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param); -int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name); - -/* X509_VERIFY_PARAM functions */ - -X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void); -void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param); -int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to, - const X509_VERIFY_PARAM *from); -int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, - const X509_VERIFY_PARAM *from); -int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name); -int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, - unsigned long flags); -int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, - unsigned long flags); -unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param); -int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose); -int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust); -void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth); -void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t); -int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, - ASN1_OBJECT *policy); -int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, - STACK_OF(ASN1_OBJECT) *policies); - -int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, - const char *name, size_t namelen); -int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, - const char *name, size_t namelen); -void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, - unsigned int flags); -char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *); -int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, - const char *email, size_t emaillen); -int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param, - const unsigned char *ip, size_t iplen); -int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, - const char *ipasc); - -int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param); -const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param); - -int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param); -int X509_VERIFY_PARAM_get_count(void); -const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id); -const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name); -void X509_VERIFY_PARAM_table_cleanup(void); - -int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy, - STACK_OF(X509) *certs, - STACK_OF(ASN1_OBJECT) *policy_oids, unsigned int flags); - -void X509_policy_tree_free(X509_POLICY_TREE *tree); - -int X509_policy_tree_level_count(const X509_POLICY_TREE *tree); -X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, - int i); - -STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_policies(const - X509_POLICY_TREE - *tree); - -STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_user_policies(const - X509_POLICY_TREE - *tree); - -int X509_policy_level_node_count(X509_POLICY_LEVEL *level); - -X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, - int i); - -const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node); - -STACK_OF(POLICYQUALINFO) *X509_policy_node_get0_qualifiers(const - X509_POLICY_NODE - *node); -const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE - *node); - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_X509_VFY_H +# define HEADER_X509_VFY_H + +/* + * Protect against recursion, x509.h and x509_vfy.h each include the other. + */ +# ifndef HEADER_X509_H +# include +# endif + +# include +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/*- +SSL_CTX -> X509_STORE + -> X509_LOOKUP + ->X509_LOOKUP_METHOD + -> X509_LOOKUP + ->X509_LOOKUP_METHOD + +SSL -> X509_STORE_CTX + ->X509_STORE + +The X509_STORE holds the tables etc for verification stuff. +A X509_STORE_CTX is used while validating a single certificate. +The X509_STORE has X509_LOOKUPs for looking up certs. +The X509_STORE then calls a function to actually verify the +certificate chain. +*/ + +typedef enum { + X509_LU_NONE = 0, + X509_LU_X509, X509_LU_CRL +} X509_LOOKUP_TYPE; + +#if OPENSSL_API_COMPAT < 0x10100000L +#define X509_LU_RETRY -1 +#define X509_LU_FAIL 0 +#endif + +DEFINE_STACK_OF(X509_LOOKUP) +DEFINE_STACK_OF(X509_OBJECT) +DEFINE_STACK_OF(X509_VERIFY_PARAM) + +int X509_STORE_set_depth(X509_STORE *store, int depth); + +typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *); +typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *); +typedef int (*X509_STORE_CTX_get_issuer_fn)(X509 **issuer, + X509_STORE_CTX *ctx, X509 *x); +typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx, + X509 *x, X509 *issuer); +typedef int (*X509_STORE_CTX_check_revocation_fn)(X509_STORE_CTX *ctx); +typedef int (*X509_STORE_CTX_get_crl_fn)(X509_STORE_CTX *ctx, + X509_CRL **crl, X509 *x); +typedef int (*X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl); +typedef int (*X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx, + X509_CRL *crl, X509 *x); +typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx); +typedef STACK_OF(X509) *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx, + X509_NAME *nm); +typedef STACK_OF(X509_CRL) *(*X509_STORE_CTX_lookup_crls_fn)(X509_STORE_CTX *ctx, + X509_NAME *nm); +typedef int (*X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx); + + +void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); + +# define X509_STORE_CTX_set_app_data(ctx,data) \ + X509_STORE_CTX_set_ex_data(ctx,0,data) +# define X509_STORE_CTX_get_app_data(ctx) \ + X509_STORE_CTX_get_ex_data(ctx,0) + +# define X509_L_FILE_LOAD 1 +# define X509_L_ADD_DIR 2 + +# define X509_LOOKUP_load_file(x,name,type) \ + X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL) + +# define X509_LOOKUP_add_dir(x,name,type) \ + X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) + +# define X509_V_OK 0 +# define X509_V_ERR_UNSPECIFIED 1 +# define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 +# define X509_V_ERR_UNABLE_TO_GET_CRL 3 +# define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 4 +# define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 5 +# define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6 +# define X509_V_ERR_CERT_SIGNATURE_FAILURE 7 +# define X509_V_ERR_CRL_SIGNATURE_FAILURE 8 +# define X509_V_ERR_CERT_NOT_YET_VALID 9 +# define X509_V_ERR_CERT_HAS_EXPIRED 10 +# define X509_V_ERR_CRL_NOT_YET_VALID 11 +# define X509_V_ERR_CRL_HAS_EXPIRED 12 +# define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13 +# define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14 +# define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 15 +# define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 16 +# define X509_V_ERR_OUT_OF_MEM 17 +# define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18 +# define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19 +# define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20 +# define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 +# define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 +# define X509_V_ERR_CERT_REVOKED 23 +# define X509_V_ERR_INVALID_CA 24 +# define X509_V_ERR_PATH_LENGTH_EXCEEDED 25 +# define X509_V_ERR_INVALID_PURPOSE 26 +# define X509_V_ERR_CERT_UNTRUSTED 27 +# define X509_V_ERR_CERT_REJECTED 28 +/* These are 'informational' when looking for issuer cert */ +# define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29 +# define X509_V_ERR_AKID_SKID_MISMATCH 30 +# define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 +# define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 +# define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 +# define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 +# define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35 +# define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36 +# define X509_V_ERR_INVALID_NON_CA 37 +# define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38 +# define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39 +# define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40 +# define X509_V_ERR_INVALID_EXTENSION 41 +# define X509_V_ERR_INVALID_POLICY_EXTENSION 42 +# define X509_V_ERR_NO_EXPLICIT_POLICY 43 +# define X509_V_ERR_DIFFERENT_CRL_SCOPE 44 +# define X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE 45 +# define X509_V_ERR_UNNESTED_RESOURCE 46 +# define X509_V_ERR_PERMITTED_VIOLATION 47 +# define X509_V_ERR_EXCLUDED_VIOLATION 48 +# define X509_V_ERR_SUBTREE_MINMAX 49 +/* The application is not happy */ +# define X509_V_ERR_APPLICATION_VERIFICATION 50 +# define X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE 51 +# define X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX 52 +# define X509_V_ERR_UNSUPPORTED_NAME_SYNTAX 53 +# define X509_V_ERR_CRL_PATH_VALIDATION_ERROR 54 +/* Another issuer check debug option */ +# define X509_V_ERR_PATH_LOOP 55 +/* Suite B mode algorithm violation */ +# define X509_V_ERR_SUITE_B_INVALID_VERSION 56 +# define X509_V_ERR_SUITE_B_INVALID_ALGORITHM 57 +# define X509_V_ERR_SUITE_B_INVALID_CURVE 58 +# define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM 59 +# define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60 +# define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61 +/* Host, email and IP check errors */ +# define X509_V_ERR_HOSTNAME_MISMATCH 62 +# define X509_V_ERR_EMAIL_MISMATCH 63 +# define X509_V_ERR_IP_ADDRESS_MISMATCH 64 +/* DANE TLSA errors */ +# define X509_V_ERR_DANE_NO_MATCH 65 +/* security level errors */ +# define X509_V_ERR_EE_KEY_TOO_SMALL 66 +# define X509_V_ERR_CA_KEY_TOO_SMALL 67 +# define X509_V_ERR_CA_MD_TOO_WEAK 68 +/* Caller error */ +# define X509_V_ERR_INVALID_CALL 69 +/* Issuer lookup error */ +# define X509_V_ERR_STORE_LOOKUP 70 +/* Certificate transparency */ +# define X509_V_ERR_NO_VALID_SCTS 71 + +# define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72 +/* OCSP status errors */ +# define X509_V_ERR_OCSP_VERIFY_NEEDED 73 /* Need OCSP verification */ +# define X509_V_ERR_OCSP_VERIFY_FAILED 74 /* Couldn't verify cert through OCSP */ +# define X509_V_ERR_OCSP_CERT_UNKNOWN 75 /* Certificate wasn't recognized by the OCSP responder */ + +/* Certificate verify flags */ + +# if OPENSSL_API_COMPAT < 0x10100000L +# define X509_V_FLAG_CB_ISSUER_CHECK 0x0 /* Deprecated */ +# endif +/* Use check time instead of current time */ +# define X509_V_FLAG_USE_CHECK_TIME 0x2 +/* Lookup CRLs */ +# define X509_V_FLAG_CRL_CHECK 0x4 +/* Lookup CRLs for whole chain */ +# define X509_V_FLAG_CRL_CHECK_ALL 0x8 +/* Ignore unhandled critical extensions */ +# define X509_V_FLAG_IGNORE_CRITICAL 0x10 +/* Disable workarounds for broken certificates */ +# define X509_V_FLAG_X509_STRICT 0x20 +/* Enable proxy certificate validation */ +# define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40 +/* Enable policy checking */ +# define X509_V_FLAG_POLICY_CHECK 0x80 +/* Policy variable require-explicit-policy */ +# define X509_V_FLAG_EXPLICIT_POLICY 0x100 +/* Policy variable inhibit-any-policy */ +# define X509_V_FLAG_INHIBIT_ANY 0x200 +/* Policy variable inhibit-policy-mapping */ +# define X509_V_FLAG_INHIBIT_MAP 0x400 +/* Notify callback that policy is OK */ +# define X509_V_FLAG_NOTIFY_POLICY 0x800 +/* Extended CRL features such as indirect CRLs, alternate CRL signing keys */ +# define X509_V_FLAG_EXTENDED_CRL_SUPPORT 0x1000 +/* Delta CRL support */ +# define X509_V_FLAG_USE_DELTAS 0x2000 +/* Check self-signed CA signature */ +# define X509_V_FLAG_CHECK_SS_SIGNATURE 0x4000 +/* Use trusted store first */ +# define X509_V_FLAG_TRUSTED_FIRST 0x8000 +/* Suite B 128 bit only mode: not normally used */ +# define X509_V_FLAG_SUITEB_128_LOS_ONLY 0x10000 +/* Suite B 192 bit only mode */ +# define X509_V_FLAG_SUITEB_192_LOS 0x20000 +/* Suite B 128 bit mode allowing 192 bit algorithms */ +# define X509_V_FLAG_SUITEB_128_LOS 0x30000 +/* Allow partial chains if at least one certificate is in trusted store */ +# define X509_V_FLAG_PARTIAL_CHAIN 0x80000 +/* + * If the initial chain is not trusted, do not attempt to build an alternative + * chain. Alternate chain checking was introduced in 1.1.0. Setting this flag + * will force the behaviour to match that of previous versions. + */ +# define X509_V_FLAG_NO_ALT_CHAINS 0x100000 +/* Do not check certificate/CRL validity against current time */ +# define X509_V_FLAG_NO_CHECK_TIME 0x200000 + +# define X509_VP_FLAG_DEFAULT 0x1 +# define X509_VP_FLAG_OVERWRITE 0x2 +# define X509_VP_FLAG_RESET_FLAGS 0x4 +# define X509_VP_FLAG_LOCKED 0x8 +# define X509_VP_FLAG_ONCE 0x10 + +/* Internal use: mask of policy related options */ +# define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \ + | X509_V_FLAG_EXPLICIT_POLICY \ + | X509_V_FLAG_INHIBIT_ANY \ + | X509_V_FLAG_INHIBIT_MAP) + +int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type, + X509_NAME *name); +X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, + X509_LOOKUP_TYPE type, + X509_NAME *name); +X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, + X509_OBJECT *x); +int X509_OBJECT_up_ref_count(X509_OBJECT *a); +X509_OBJECT *X509_OBJECT_new(void); +void X509_OBJECT_free(X509_OBJECT *a); +X509_LOOKUP_TYPE X509_OBJECT_get_type(const X509_OBJECT *a); +X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a); +int X509_OBJECT_set1_X509(X509_OBJECT *a, X509 *obj); +X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *a); +int X509_OBJECT_set1_X509_CRL(X509_OBJECT *a, X509_CRL *obj); +X509_STORE *X509_STORE_new(void); +void X509_STORE_free(X509_STORE *v); +int X509_STORE_lock(X509_STORE *ctx); +int X509_STORE_unlock(X509_STORE *ctx); +int X509_STORE_up_ref(X509_STORE *v); +STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *v); + +STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *st, X509_NAME *nm); +STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *st, X509_NAME *nm); +int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags); +int X509_STORE_set_purpose(X509_STORE *ctx, int purpose); +int X509_STORE_set_trust(X509_STORE *ctx, int trust); +int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); +X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); + +void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify); +#define X509_STORE_set_verify_func(ctx, func) \ + X509_STORE_set_verify((ctx),(func)) +void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, + X509_STORE_CTX_verify_fn verify); +X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx); +void X509_STORE_set_verify_cb(X509_STORE *ctx, + X509_STORE_CTX_verify_cb verify_cb); +# define X509_STORE_set_verify_cb_func(ctx,func) \ + X509_STORE_set_verify_cb((ctx),(func)) +X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *ctx); +void X509_STORE_set_get_issuer(X509_STORE *ctx, + X509_STORE_CTX_get_issuer_fn get_issuer); +X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(X509_STORE *ctx); +void X509_STORE_set_check_issued(X509_STORE *ctx, + X509_STORE_CTX_check_issued_fn check_issued); +X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(X509_STORE *ctx); +void X509_STORE_set_check_revocation(X509_STORE *ctx, + X509_STORE_CTX_check_revocation_fn check_revocation); +X509_STORE_CTX_check_revocation_fn X509_STORE_get_check_revocation(X509_STORE *ctx); +void X509_STORE_set_get_crl(X509_STORE *ctx, + X509_STORE_CTX_get_crl_fn get_crl); +X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(X509_STORE *ctx); +void X509_STORE_set_check_crl(X509_STORE *ctx, + X509_STORE_CTX_check_crl_fn check_crl); +X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(X509_STORE *ctx); +void X509_STORE_set_cert_crl(X509_STORE *ctx, + X509_STORE_CTX_cert_crl_fn cert_crl); +X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(X509_STORE *ctx); +void X509_STORE_set_check_policy(X509_STORE *ctx, + X509_STORE_CTX_check_policy_fn check_policy); +X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(X509_STORE *ctx); +void X509_STORE_set_lookup_certs(X509_STORE *ctx, + X509_STORE_CTX_lookup_certs_fn lookup_certs); +X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(X509_STORE *ctx); +void X509_STORE_set_lookup_crls(X509_STORE *ctx, + X509_STORE_CTX_lookup_crls_fn lookup_crls); +#define X509_STORE_set_lookup_crls_cb(ctx, func) \ + X509_STORE_set_lookup_crls((ctx), (func)) +X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(X509_STORE *ctx); +void X509_STORE_set_cleanup(X509_STORE *ctx, + X509_STORE_CTX_cleanup_fn cleanup); +X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(X509_STORE *ctx); + +#define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, l, p, newf, dupf, freef) +int X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data); +void *X509_STORE_get_ex_data(X509_STORE *ctx, int idx); + +X509_STORE_CTX *X509_STORE_CTX_new(void); + +int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); + +void X509_STORE_CTX_free(X509_STORE_CTX *ctx); +int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, + X509 *x509, STACK_OF(X509) *chain); +void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); +void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); + +X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx); +X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx); +STACK_OF(X509)* X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx); +void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); +void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, + X509_STORE_CTX_verify_cb verify); +X509_STORE_CTX_verify_cb X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx); +X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx); +X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(X509_STORE_CTX *ctx); +X509_STORE_CTX_check_issued_fn X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx); +X509_STORE_CTX_check_revocation_fn X509_STORE_CTX_get_check_revocation(X509_STORE_CTX *ctx); +X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(X509_STORE_CTX *ctx); +X509_STORE_CTX_check_crl_fn X509_STORE_CTX_get_check_crl(X509_STORE_CTX *ctx); +X509_STORE_CTX_cert_crl_fn X509_STORE_CTX_get_cert_crl(X509_STORE_CTX *ctx); +X509_STORE_CTX_check_policy_fn X509_STORE_CTX_get_check_policy(X509_STORE_CTX *ctx); +X509_STORE_CTX_lookup_certs_fn X509_STORE_CTX_get_lookup_certs(X509_STORE_CTX *ctx); +X509_STORE_CTX_lookup_crls_fn X509_STORE_CTX_get_lookup_crls(X509_STORE_CTX *ctx); +X509_STORE_CTX_cleanup_fn X509_STORE_CTX_get_cleanup(X509_STORE_CTX *ctx); + +#if OPENSSL_API_COMPAT < 0x10100000L +# define X509_STORE_CTX_get_chain X509_STORE_CTX_get0_chain +# define X509_STORE_CTX_set_chain X509_STORE_CTX_set0_untrusted +# define X509_STORE_CTX_trusted_stack X509_STORE_CTX_set0_trusted_stack +# define X509_STORE_get_by_subject X509_STORE_CTX_get_by_subject +# define X509_STORE_get1_certs X509_STORE_CTX_get1_certs +# define X509_STORE_get1_crls X509_STORE_CTX_get1_crls +/* the following macro is misspelled; use X509_STORE_get1_certs instead */ +# define X509_STORE_get1_cert X509_STORE_CTX_get1_certs +/* the following macro is misspelled; use X509_STORE_get1_crls instead */ +# define X509_STORE_get1_crl X509_STORE_CTX_get1_crls +#endif + +X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); +X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void); +X509_LOOKUP_METHOD *X509_LOOKUP_file(void); + +typedef int (*X509_LOOKUP_ctrl_fn)(X509_LOOKUP *ctx, int cmd, const char *argc, + long argl, char **ret); +typedef int (*X509_LOOKUP_get_by_subject_fn)(X509_LOOKUP *ctx, + X509_LOOKUP_TYPE type, + X509_NAME *name, + X509_OBJECT *ret); +typedef int (*X509_LOOKUP_get_by_issuer_serial_fn)(X509_LOOKUP *ctx, + X509_LOOKUP_TYPE type, + X509_NAME *name, + ASN1_INTEGER *serial, + X509_OBJECT *ret); +typedef int (*X509_LOOKUP_get_by_fingerprint_fn)(X509_LOOKUP *ctx, + X509_LOOKUP_TYPE type, + const unsigned char* bytes, + int len, + X509_OBJECT *ret); +typedef int (*X509_LOOKUP_get_by_alias_fn)(X509_LOOKUP *ctx, + X509_LOOKUP_TYPE type, + const char *str, + int len, + X509_OBJECT *ret); + +X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name); +void X509_LOOKUP_meth_free(X509_LOOKUP_METHOD *method); + +int X509_LOOKUP_meth_set_new_item(X509_LOOKUP_METHOD *method, + int (*new_item) (X509_LOOKUP *ctx)); +int (*X509_LOOKUP_meth_get_new_item(const X509_LOOKUP_METHOD* method)) + (X509_LOOKUP *ctx); + +int X509_LOOKUP_meth_set_free(X509_LOOKUP_METHOD *method, + void (*free_fn) (X509_LOOKUP *ctx)); +void (*X509_LOOKUP_meth_get_free(const X509_LOOKUP_METHOD* method)) + (X509_LOOKUP *ctx); + +int X509_LOOKUP_meth_set_init(X509_LOOKUP_METHOD *method, + int (*init) (X509_LOOKUP *ctx)); +int (*X509_LOOKUP_meth_get_init(const X509_LOOKUP_METHOD* method)) + (X509_LOOKUP *ctx); + +int X509_LOOKUP_meth_set_shutdown(X509_LOOKUP_METHOD *method, + int (*shutdown) (X509_LOOKUP *ctx)); +int (*X509_LOOKUP_meth_get_shutdown(const X509_LOOKUP_METHOD* method)) + (X509_LOOKUP *ctx); + +int X509_LOOKUP_meth_set_ctrl(X509_LOOKUP_METHOD *method, + X509_LOOKUP_ctrl_fn ctrl_fn); +X509_LOOKUP_ctrl_fn X509_LOOKUP_meth_get_ctrl(const X509_LOOKUP_METHOD *method); + +int X509_LOOKUP_meth_set_get_by_subject(X509_LOOKUP_METHOD *method, + X509_LOOKUP_get_by_subject_fn fn); +X509_LOOKUP_get_by_subject_fn X509_LOOKUP_meth_get_get_by_subject( + const X509_LOOKUP_METHOD *method); + +int X509_LOOKUP_meth_set_get_by_issuer_serial(X509_LOOKUP_METHOD *method, + X509_LOOKUP_get_by_issuer_serial_fn fn); +X509_LOOKUP_get_by_issuer_serial_fn X509_LOOKUP_meth_get_get_by_issuer_serial( + const X509_LOOKUP_METHOD *method); + +int X509_LOOKUP_meth_set_get_by_fingerprint(X509_LOOKUP_METHOD *method, + X509_LOOKUP_get_by_fingerprint_fn fn); +X509_LOOKUP_get_by_fingerprint_fn X509_LOOKUP_meth_get_get_by_fingerprint( + const X509_LOOKUP_METHOD *method); + +int X509_LOOKUP_meth_set_get_by_alias(X509_LOOKUP_METHOD *method, + X509_LOOKUP_get_by_alias_fn fn); +X509_LOOKUP_get_by_alias_fn X509_LOOKUP_meth_get_get_by_alias( + const X509_LOOKUP_METHOD *method); + + +int X509_STORE_add_cert(X509_STORE *ctx, X509 *x); +int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x); + +int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, + X509_NAME *name, X509_OBJECT *ret); +X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs, + X509_LOOKUP_TYPE type, + X509_NAME *name); + +int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, + long argl, char **ret); + +int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); +int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); +int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); + +X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method); +void X509_LOOKUP_free(X509_LOOKUP *ctx); +int X509_LOOKUP_init(X509_LOOKUP *ctx); +int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + X509_NAME *name, X509_OBJECT *ret); +int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + X509_NAME *name, ASN1_INTEGER *serial, + X509_OBJECT *ret); +int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + const unsigned char *bytes, int len, + X509_OBJECT *ret); +int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + const char *str, int len, X509_OBJECT *ret); +int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data); +void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx); +X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx); +int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); + +int X509_STORE_load_locations(X509_STORE *ctx, + const char *file, const char *dir); +int X509_STORE_set_default_paths(X509_STORE *ctx); + +#define X509_STORE_CTX_get_ex_new_index(l, p, newf, dupf, freef) \ + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef) +int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data); +void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx); +int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); +void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s); +int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); +void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth); +X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); +void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x); +X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx); +X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx); +X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx); +STACK_OF(X509) *X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx); +STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx); +void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x); +void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *c, STACK_OF(X509) *sk); +void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, STACK_OF(X509_CRL) *sk); +int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); +int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); +int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, + int purpose, int trust); +void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags); +void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, + time_t t); + +X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); +int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); +int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx); + +X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); +void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param); +int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name); + +/* + * Bridge opacity barrier between libcrypt and libssl, also needed to support + * offline testing in test/danetest.c + */ +void X509_STORE_CTX_set0_dane(X509_STORE_CTX *ctx, SSL_DANE *dane); +#define DANE_FLAG_NO_DANE_EE_NAMECHECKS (1L << 0) + +/* X509_VERIFY_PARAM functions */ + +X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void); +void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param); +int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to, + const X509_VERIFY_PARAM *from); +int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, + const X509_VERIFY_PARAM *from); +int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name); +int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, + unsigned long flags); +int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, + unsigned long flags); +unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param); +int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose); +int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust); +void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth); +void X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param, int auth_level); +time_t X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param); +void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t); +int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, + ASN1_OBJECT *policy); +int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, + STACK_OF(ASN1_OBJECT) *policies); + +int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param, + uint32_t flags); +uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param); + +int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, + const char *name, size_t namelen); +int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, + const char *name, size_t namelen); +void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, + unsigned int flags); +unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param); +char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *); +void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *); +int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, + const char *email, size_t emaillen); +int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param, + const unsigned char *ip, size_t iplen); +int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, + const char *ipasc); + +int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param); +int X509_VERIFY_PARAM_get_auth_level(const X509_VERIFY_PARAM *param); +const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param); + +int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param); +int X509_VERIFY_PARAM_get_count(void); +const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id); +const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name); +void X509_VERIFY_PARAM_table_cleanup(void); + +/* Non positive return values are errors */ +#define X509_PCY_TREE_FAILURE -2 /* Failure to satisfy explicit policy */ +#define X509_PCY_TREE_INVALID -1 /* Inconsistent or invalid extensions */ +#define X509_PCY_TREE_INTERNAL 0 /* Internal error, most likely malloc */ + +/* + * Positive return values form a bit mask, all but the first are internal to + * the library and don't appear in results from X509_policy_check(). + */ +#define X509_PCY_TREE_VALID 1 /* The policy tree is valid */ +#define X509_PCY_TREE_EMPTY 2 /* The policy tree is empty */ +#define X509_PCY_TREE_EXPLICIT 4 /* Explicit policy required */ + +int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy, + STACK_OF(X509) *certs, + STACK_OF(ASN1_OBJECT) *policy_oids, unsigned int flags); + +void X509_policy_tree_free(X509_POLICY_TREE *tree); + +int X509_policy_tree_level_count(const X509_POLICY_TREE *tree); +X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, + int i); + +STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_policies(const + X509_POLICY_TREE + *tree); + +STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_user_policies(const + X509_POLICY_TREE + *tree); + +int X509_policy_level_node_count(X509_POLICY_LEVEL *level); + +X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, + int i); + +const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node); + +STACK_OF(POLICYQUALINFO) *X509_policy_node_get0_qualifiers(const + X509_POLICY_NODE + *node); +const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE + *node); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/x509err.h b/src/Mayaqua/win32_inc/openssl/x509err.h new file mode 100644 index 00000000..02738531 --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/x509err.h @@ -0,0 +1,130 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_X509ERR_H +# define HEADER_X509ERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_X509_strings(void); + +/* + * X509 function codes. + */ +# define X509_F_ADD_CERT_DIR 100 +# define X509_F_BUILD_CHAIN 106 +# define X509_F_BY_FILE_CTRL 101 +# define X509_F_CHECK_NAME_CONSTRAINTS 149 +# define X509_F_CHECK_POLICY 145 +# define X509_F_DANE_I2D 107 +# define X509_F_DIR_CTRL 102 +# define X509_F_GET_CERT_BY_SUBJECT 103 +# define X509_F_I2D_X509_AUX 151 +# define X509_F_LOOKUP_CERTS_SK 152 +# define X509_F_NETSCAPE_SPKI_B64_DECODE 129 +# define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 +# define X509_F_NEW_DIR 153 +# define X509_F_X509AT_ADD1_ATTR 135 +# define X509_F_X509V3_ADD_EXT 104 +# define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 +# define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 137 +# define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 140 +# define X509_F_X509_ATTRIBUTE_GET0_DATA 139 +# define X509_F_X509_ATTRIBUTE_SET1_DATA 138 +# define X509_F_X509_CHECK_PRIVATE_KEY 128 +# define X509_F_X509_CRL_DIFF 105 +# define X509_F_X509_CRL_METHOD_NEW 154 +# define X509_F_X509_CRL_PRINT_FP 147 +# define X509_F_X509_EXTENSION_CREATE_BY_NID 108 +# define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 +# define X509_F_X509_GET_PUBKEY_PARAMETERS 110 +# define X509_F_X509_LOAD_CERT_CRL_FILE 132 +# define X509_F_X509_LOAD_CERT_FILE 111 +# define X509_F_X509_LOAD_CRL_FILE 112 +# define X509_F_X509_LOOKUP_METH_NEW 160 +# define X509_F_X509_LOOKUP_NEW 155 +# define X509_F_X509_NAME_ADD_ENTRY 113 +# define X509_F_X509_NAME_CANON 156 +# define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 114 +# define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 131 +# define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 +# define X509_F_X509_NAME_ONELINE 116 +# define X509_F_X509_NAME_PRINT 117 +# define X509_F_X509_OBJECT_NEW 150 +# define X509_F_X509_PRINT_EX_FP 118 +# define X509_F_X509_PUBKEY_DECODE 148 +# define X509_F_X509_PUBKEY_GET0 119 +# define X509_F_X509_PUBKEY_SET 120 +# define X509_F_X509_REQ_CHECK_PRIVATE_KEY 144 +# define X509_F_X509_REQ_PRINT_EX 121 +# define X509_F_X509_REQ_PRINT_FP 122 +# define X509_F_X509_REQ_TO_X509 123 +# define X509_F_X509_STORE_ADD_CERT 124 +# define X509_F_X509_STORE_ADD_CRL 125 +# define X509_F_X509_STORE_ADD_LOOKUP 157 +# define X509_F_X509_STORE_CTX_GET1_ISSUER 146 +# define X509_F_X509_STORE_CTX_INIT 143 +# define X509_F_X509_STORE_CTX_NEW 142 +# define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 +# define X509_F_X509_STORE_NEW 158 +# define X509_F_X509_TO_X509_REQ 126 +# define X509_F_X509_TRUST_ADD 133 +# define X509_F_X509_TRUST_SET 141 +# define X509_F_X509_VERIFY_CERT 127 +# define X509_F_X509_VERIFY_PARAM_NEW 159 + +/* + * X509 reason codes. + */ +# define X509_R_AKID_MISMATCH 110 +# define X509_R_BAD_SELECTOR 133 +# define X509_R_BAD_X509_FILETYPE 100 +# define X509_R_BASE64_DECODE_ERROR 118 +# define X509_R_CANT_CHECK_DH_KEY 114 +# define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 +# define X509_R_CRL_ALREADY_DELTA 127 +# define X509_R_CRL_VERIFY_FAILURE 131 +# define X509_R_IDP_MISMATCH 128 +# define X509_R_INVALID_ATTRIBUTES 138 +# define X509_R_INVALID_DIRECTORY 113 +# define X509_R_INVALID_FIELD_NAME 119 +# define X509_R_INVALID_TRUST 123 +# define X509_R_ISSUER_MISMATCH 129 +# define X509_R_KEY_TYPE_MISMATCH 115 +# define X509_R_KEY_VALUES_MISMATCH 116 +# define X509_R_LOADING_CERT_DIR 103 +# define X509_R_LOADING_DEFAULTS 104 +# define X509_R_METHOD_NOT_SUPPORTED 124 +# define X509_R_NAME_TOO_LONG 134 +# define X509_R_NEWER_CRL_NOT_NEWER 132 +# define X509_R_NO_CERTIFICATE_FOUND 135 +# define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 136 +# define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 +# define X509_R_NO_CRL_FOUND 137 +# define X509_R_NO_CRL_NUMBER 130 +# define X509_R_PUBLIC_KEY_DECODE_ERROR 125 +# define X509_R_PUBLIC_KEY_ENCODE_ERROR 126 +# define X509_R_SHOULD_RETRY 106 +# define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 +# define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 +# define X509_R_UNKNOWN_KEY_TYPE 117 +# define X509_R_UNKNOWN_NID 109 +# define X509_R_UNKNOWN_PURPOSE_ID 121 +# define X509_R_UNKNOWN_TRUST_ID 120 +# define X509_R_UNSUPPORTED_ALGORITHM 111 +# define X509_R_WRONG_LOOKUP_TYPE 112 +# define X509_R_WRONG_TYPE 122 + +#endif diff --git a/src/Mayaqua/win32_inc/openssl/x509v3.h b/src/Mayaqua/win32_inc/openssl/x509v3.h index 6d4cc54b..6c6eca38 100644 --- a/src/Mayaqua/win32_inc/openssl/x509v3.h +++ b/src/Mayaqua/win32_inc/openssl/x509v3.h @@ -1,1055 +1,937 @@ -/* x509v3.h */ -/* - * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project - * 1999. - */ -/* ==================================================================== - * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -#ifndef HEADER_X509V3_H -# define HEADER_X509V3_H - -# include -# include -# include - -#ifdef __cplusplus -extern "C" { -#endif - -# ifdef OPENSSL_SYS_WIN32 -/* Under Win32 these are defined in wincrypt.h */ -# undef X509_NAME -# undef X509_CERT_PAIR -# undef X509_EXTENSIONS -# endif - -/* Forward reference */ -struct v3_ext_method; -struct v3_ext_ctx; - -/* Useful typedefs */ - -typedef void *(*X509V3_EXT_NEW)(void); -typedef void (*X509V3_EXT_FREE) (void *); -typedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long); -typedef int (*X509V3_EXT_I2D) (void *, unsigned char **); -typedef STACK_OF(CONF_VALUE) * - (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext, - STACK_OF(CONF_VALUE) *extlist); -typedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method, - struct v3_ext_ctx *ctx, - STACK_OF(CONF_VALUE) *values); -typedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method, - void *ext); -typedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method, - struct v3_ext_ctx *ctx, const char *str); -typedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext, - BIO *out, int indent); -typedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method, - struct v3_ext_ctx *ctx, const char *str); - -/* V3 extension structure */ - -struct v3_ext_method { - int ext_nid; - int ext_flags; -/* If this is set the following four fields are ignored */ - ASN1_ITEM_EXP *it; -/* Old style ASN1 calls */ - X509V3_EXT_NEW ext_new; - X509V3_EXT_FREE ext_free; - X509V3_EXT_D2I d2i; - X509V3_EXT_I2D i2d; -/* The following pair is used for string extensions */ - X509V3_EXT_I2S i2s; - X509V3_EXT_S2I s2i; -/* The following pair is used for multi-valued extensions */ - X509V3_EXT_I2V i2v; - X509V3_EXT_V2I v2i; -/* The following are used for raw extensions */ - X509V3_EXT_I2R i2r; - X509V3_EXT_R2I r2i; - void *usr_data; /* Any extension specific data */ -}; - -typedef struct X509V3_CONF_METHOD_st { - char *(*get_string) (void *db, char *section, char *value); - STACK_OF(CONF_VALUE) *(*get_section) (void *db, char *section); - void (*free_string) (void *db, char *string); - void (*free_section) (void *db, STACK_OF(CONF_VALUE) *section); -} X509V3_CONF_METHOD; - -/* Context specific info */ -struct v3_ext_ctx { -# define CTX_TEST 0x1 - int flags; - X509 *issuer_cert; - X509 *subject_cert; - X509_REQ *subject_req; - X509_CRL *crl; - X509V3_CONF_METHOD *db_meth; - void *db; -/* Maybe more here */ -}; - -typedef struct v3_ext_method X509V3_EXT_METHOD; - -DECLARE_STACK_OF(X509V3_EXT_METHOD) - -/* ext_flags values */ -# define X509V3_EXT_DYNAMIC 0x1 -# define X509V3_EXT_CTX_DEP 0x2 -# define X509V3_EXT_MULTILINE 0x4 - -typedef BIT_STRING_BITNAME ENUMERATED_NAMES; - -typedef struct BASIC_CONSTRAINTS_st { - int ca; - ASN1_INTEGER *pathlen; -} BASIC_CONSTRAINTS; - -typedef struct PKEY_USAGE_PERIOD_st { - ASN1_GENERALIZEDTIME *notBefore; - ASN1_GENERALIZEDTIME *notAfter; -} PKEY_USAGE_PERIOD; - -typedef struct otherName_st { - ASN1_OBJECT *type_id; - ASN1_TYPE *value; -} OTHERNAME; - -typedef struct EDIPartyName_st { - ASN1_STRING *nameAssigner; - ASN1_STRING *partyName; -} EDIPARTYNAME; - -typedef struct GENERAL_NAME_st { -# define GEN_OTHERNAME 0 -# define GEN_EMAIL 1 -# define GEN_DNS 2 -# define GEN_X400 3 -# define GEN_DIRNAME 4 -# define GEN_EDIPARTY 5 -# define GEN_URI 6 -# define GEN_IPADD 7 -# define GEN_RID 8 - int type; - union { - char *ptr; - OTHERNAME *otherName; /* otherName */ - ASN1_IA5STRING *rfc822Name; - ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; - X509_NAME *directoryName; - EDIPARTYNAME *ediPartyName; - ASN1_IA5STRING *uniformResourceIdentifier; - ASN1_OCTET_STRING *iPAddress; - ASN1_OBJECT *registeredID; - /* Old names */ - ASN1_OCTET_STRING *ip; /* iPAddress */ - X509_NAME *dirn; /* dirn */ - ASN1_IA5STRING *ia5; /* rfc822Name, dNSName, - * uniformResourceIdentifier */ - ASN1_OBJECT *rid; /* registeredID */ - ASN1_TYPE *other; /* x400Address */ - } d; -} GENERAL_NAME; - -typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; - -typedef struct ACCESS_DESCRIPTION_st { - ASN1_OBJECT *method; - GENERAL_NAME *location; -} ACCESS_DESCRIPTION; - -typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; - -typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; - -DECLARE_STACK_OF(GENERAL_NAME) -DECLARE_ASN1_SET_OF(GENERAL_NAME) - -DECLARE_STACK_OF(ACCESS_DESCRIPTION) -DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) - -typedef struct DIST_POINT_NAME_st { - int type; - union { - GENERAL_NAMES *fullname; - STACK_OF(X509_NAME_ENTRY) *relativename; - } name; -/* If relativename then this contains the full distribution point name */ - X509_NAME *dpname; -} DIST_POINT_NAME; -/* All existing reasons */ -# define CRLDP_ALL_REASONS 0x807f - -# define CRL_REASON_NONE -1 -# define CRL_REASON_UNSPECIFIED 0 -# define CRL_REASON_KEY_COMPROMISE 1 -# define CRL_REASON_CA_COMPROMISE 2 -# define CRL_REASON_AFFILIATION_CHANGED 3 -# define CRL_REASON_SUPERSEDED 4 -# define CRL_REASON_CESSATION_OF_OPERATION 5 -# define CRL_REASON_CERTIFICATE_HOLD 6 -# define CRL_REASON_REMOVE_FROM_CRL 8 -# define CRL_REASON_PRIVILEGE_WITHDRAWN 9 -# define CRL_REASON_AA_COMPROMISE 10 - -struct DIST_POINT_st { - DIST_POINT_NAME *distpoint; - ASN1_BIT_STRING *reasons; - GENERAL_NAMES *CRLissuer; - int dp_reasons; -}; - -typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; - -DECLARE_STACK_OF(DIST_POINT) -DECLARE_ASN1_SET_OF(DIST_POINT) - -struct AUTHORITY_KEYID_st { - ASN1_OCTET_STRING *keyid; - GENERAL_NAMES *issuer; - ASN1_INTEGER *serial; -}; - -/* Strong extranet structures */ - -typedef struct SXNET_ID_st { - ASN1_INTEGER *zone; - ASN1_OCTET_STRING *user; -} SXNETID; - -DECLARE_STACK_OF(SXNETID) -DECLARE_ASN1_SET_OF(SXNETID) - -typedef struct SXNET_st { - ASN1_INTEGER *version; - STACK_OF(SXNETID) *ids; -} SXNET; - -typedef struct NOTICEREF_st { - ASN1_STRING *organization; - STACK_OF(ASN1_INTEGER) *noticenos; -} NOTICEREF; - -typedef struct USERNOTICE_st { - NOTICEREF *noticeref; - ASN1_STRING *exptext; -} USERNOTICE; - -typedef struct POLICYQUALINFO_st { - ASN1_OBJECT *pqualid; - union { - ASN1_IA5STRING *cpsuri; - USERNOTICE *usernotice; - ASN1_TYPE *other; - } d; -} POLICYQUALINFO; - -DECLARE_STACK_OF(POLICYQUALINFO) -DECLARE_ASN1_SET_OF(POLICYQUALINFO) - -typedef struct POLICYINFO_st { - ASN1_OBJECT *policyid; - STACK_OF(POLICYQUALINFO) *qualifiers; -} POLICYINFO; - -typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; - -DECLARE_STACK_OF(POLICYINFO) -DECLARE_ASN1_SET_OF(POLICYINFO) - -typedef struct POLICY_MAPPING_st { - ASN1_OBJECT *issuerDomainPolicy; - ASN1_OBJECT *subjectDomainPolicy; -} POLICY_MAPPING; - -DECLARE_STACK_OF(POLICY_MAPPING) - -typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS; - -typedef struct GENERAL_SUBTREE_st { - GENERAL_NAME *base; - ASN1_INTEGER *minimum; - ASN1_INTEGER *maximum; -} GENERAL_SUBTREE; - -DECLARE_STACK_OF(GENERAL_SUBTREE) - -struct NAME_CONSTRAINTS_st { - STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; - STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; -}; - -typedef struct POLICY_CONSTRAINTS_st { - ASN1_INTEGER *requireExplicitPolicy; - ASN1_INTEGER *inhibitPolicyMapping; -} POLICY_CONSTRAINTS; - -/* Proxy certificate structures, see RFC 3820 */ -typedef struct PROXY_POLICY_st { - ASN1_OBJECT *policyLanguage; - ASN1_OCTET_STRING *policy; -} PROXY_POLICY; - -typedef struct PROXY_CERT_INFO_EXTENSION_st { - ASN1_INTEGER *pcPathLengthConstraint; - PROXY_POLICY *proxyPolicy; -} PROXY_CERT_INFO_EXTENSION; - -DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) -DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) - -struct ISSUING_DIST_POINT_st { - DIST_POINT_NAME *distpoint; - int onlyuser; - int onlyCA; - ASN1_BIT_STRING *onlysomereasons; - int indirectCRL; - int onlyattr; -}; - -/* Values in idp_flags field */ -/* IDP present */ -# define IDP_PRESENT 0x1 -/* IDP values inconsistent */ -# define IDP_INVALID 0x2 -/* onlyuser true */ -# define IDP_ONLYUSER 0x4 -/* onlyCA true */ -# define IDP_ONLYCA 0x8 -/* onlyattr true */ -# define IDP_ONLYATTR 0x10 -/* indirectCRL true */ -# define IDP_INDIRECT 0x20 -/* onlysomereasons present */ -# define IDP_REASONS 0x40 - -# define X509V3_conf_err(val) ERR_add_error_data(6, "section:", val->section, \ -",name:", val->name, ",value:", val->value); - -# define X509V3_set_ctx_test(ctx) \ - X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) -# define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL; - -# define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \ - 0,0,0,0, \ - 0,0, \ - (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ - (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ - NULL, NULL, \ - table} - -# define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \ - 0,0,0,0, \ - (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ - (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ - 0,0,0,0, \ - NULL} - -# define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - -/* X509_PURPOSE stuff */ - -# define EXFLAG_BCONS 0x1 -# define EXFLAG_KUSAGE 0x2 -# define EXFLAG_XKUSAGE 0x4 -# define EXFLAG_NSCERT 0x8 - -# define EXFLAG_CA 0x10 -/* Really self issued not necessarily self signed */ -# define EXFLAG_SI 0x20 -# define EXFLAG_V1 0x40 -# define EXFLAG_INVALID 0x80 -# define EXFLAG_SET 0x100 -# define EXFLAG_CRITICAL 0x200 -# define EXFLAG_PROXY 0x400 - -# define EXFLAG_INVALID_POLICY 0x800 -# define EXFLAG_FRESHEST 0x1000 -/* Self signed */ -# define EXFLAG_SS 0x2000 - -# define KU_DIGITAL_SIGNATURE 0x0080 -# define KU_NON_REPUDIATION 0x0040 -# define KU_KEY_ENCIPHERMENT 0x0020 -# define KU_DATA_ENCIPHERMENT 0x0010 -# define KU_KEY_AGREEMENT 0x0008 -# define KU_KEY_CERT_SIGN 0x0004 -# define KU_CRL_SIGN 0x0002 -# define KU_ENCIPHER_ONLY 0x0001 -# define KU_DECIPHER_ONLY 0x8000 - -# define NS_SSL_CLIENT 0x80 -# define NS_SSL_SERVER 0x40 -# define NS_SMIME 0x20 -# define NS_OBJSIGN 0x10 -# define NS_SSL_CA 0x04 -# define NS_SMIME_CA 0x02 -# define NS_OBJSIGN_CA 0x01 -# define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) - -# define XKU_SSL_SERVER 0x1 -# define XKU_SSL_CLIENT 0x2 -# define XKU_SMIME 0x4 -# define XKU_CODE_SIGN 0x8 -# define XKU_SGC 0x10 -# define XKU_OCSP_SIGN 0x20 -# define XKU_TIMESTAMP 0x40 -# define XKU_DVCS 0x80 -# define XKU_ANYEKU 0x100 - -# define X509_PURPOSE_DYNAMIC 0x1 -# define X509_PURPOSE_DYNAMIC_NAME 0x2 - -typedef struct x509_purpose_st { - int purpose; - int trust; /* Default trust ID */ - int flags; - int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int); - char *name; - char *sname; - void *usr_data; -} X509_PURPOSE; - -# define X509_PURPOSE_SSL_CLIENT 1 -# define X509_PURPOSE_SSL_SERVER 2 -# define X509_PURPOSE_NS_SSL_SERVER 3 -# define X509_PURPOSE_SMIME_SIGN 4 -# define X509_PURPOSE_SMIME_ENCRYPT 5 -# define X509_PURPOSE_CRL_SIGN 6 -# define X509_PURPOSE_ANY 7 -# define X509_PURPOSE_OCSP_HELPER 8 -# define X509_PURPOSE_TIMESTAMP_SIGN 9 - -# define X509_PURPOSE_MIN 1 -# define X509_PURPOSE_MAX 9 - -/* Flags for X509V3_EXT_print() */ - -# define X509V3_EXT_UNKNOWN_MASK (0xfL << 16) -/* Return error for unknown extensions */ -# define X509V3_EXT_DEFAULT 0 -/* Print error for unknown extensions */ -# define X509V3_EXT_ERROR_UNKNOWN (1L << 16) -/* ASN1 parse unknown extensions */ -# define X509V3_EXT_PARSE_UNKNOWN (2L << 16) -/* BIO_dump unknown extensions */ -# define X509V3_EXT_DUMP_UNKNOWN (3L << 16) - -/* Flags for X509V3_add1_i2d */ - -# define X509V3_ADD_OP_MASK 0xfL -# define X509V3_ADD_DEFAULT 0L -# define X509V3_ADD_APPEND 1L -# define X509V3_ADD_REPLACE 2L -# define X509V3_ADD_REPLACE_EXISTING 3L -# define X509V3_ADD_KEEP_EXISTING 4L -# define X509V3_ADD_DELETE 5L -# define X509V3_ADD_SILENT 0x10 - -DECLARE_STACK_OF(X509_PURPOSE) - -DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) - -DECLARE_ASN1_FUNCTIONS(SXNET) -DECLARE_ASN1_FUNCTIONS(SXNETID) - -int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen); -int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, - int userlen); -int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, char *user, - int userlen); - -ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone); -ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); -ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); - -DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) - -DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) - -DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) -GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a); -int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b); - -ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, - STACK_OF(CONF_VALUE) *nval); -STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, - ASN1_BIT_STRING *bits, - STACK_OF(CONF_VALUE) *extlist); - -STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, - GENERAL_NAME *gen, - STACK_OF(CONF_VALUE) *ret); -int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen); - -DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) - -STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, - GENERAL_NAMES *gen, - STACK_OF(CONF_VALUE) *extlist); -GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); - -DECLARE_ASN1_FUNCTIONS(OTHERNAME) -DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) -int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b); -void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value); -void *GENERAL_NAME_get0_value(GENERAL_NAME *a, int *ptype); -int GENERAL_NAME_set0_othername(GENERAL_NAME *gen, - ASN1_OBJECT *oid, ASN1_TYPE *value); -int GENERAL_NAME_get0_otherName(GENERAL_NAME *gen, - ASN1_OBJECT **poid, ASN1_TYPE **pvalue); - -char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, - ASN1_OCTET_STRING *ia5); -ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, char *str); - -DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) -int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION *a); - -DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) -DECLARE_ASN1_FUNCTIONS(POLICYINFO) -DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO) -DECLARE_ASN1_FUNCTIONS(USERNOTICE) -DECLARE_ASN1_FUNCTIONS(NOTICEREF) - -DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) -DECLARE_ASN1_FUNCTIONS(DIST_POINT) -DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) -DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT) - -int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname); - -int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc); - -DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) -DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) - -DECLARE_ASN1_ITEM(POLICY_MAPPING) -DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) -DECLARE_ASN1_ITEM(POLICY_MAPPINGS) - -DECLARE_ASN1_ITEM(GENERAL_SUBTREE) -DECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE) - -DECLARE_ASN1_ITEM(NAME_CONSTRAINTS) -DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) - -DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) -DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) - -GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out, - const X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, int gen_type, char *value, - int is_nc); - -# ifdef HEADER_CONF_H -GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, CONF_VALUE *cnf); -GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, - const X509V3_EXT_METHOD *method, - X509V3_CTX *ctx, CONF_VALUE *cnf, - int is_nc); -void X509V3_conf_free(CONF_VALUE *val); - -X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, - char *value); -X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name, - char *value); -int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section, - STACK_OF(X509_EXTENSION) **sk); -int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, - X509 *cert); -int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, - X509_REQ *req); -int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, - X509_CRL *crl); - -X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, - X509V3_CTX *ctx, int ext_nid, - char *value); -X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, - char *name, char *value); -int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, - char *section, X509 *cert); -int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, - char *section, X509_REQ *req); -int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, - char *section, X509_CRL *crl); - -int X509V3_add_value_bool_nf(char *name, int asn1_bool, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); -int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); -void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); -void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash); -# endif - -char *X509V3_get_string(X509V3_CTX *ctx, char *name, char *section); -STACK_OF(CONF_VALUE) *X509V3_get_section(X509V3_CTX *ctx, char *section); -void X509V3_string_free(X509V3_CTX *ctx, char *str); -void X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section); -void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject, - X509_REQ *req, X509_CRL *crl, int flags); - -int X509V3_add_value(const char *name, const char *value, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_add_value_uchar(const char *name, const unsigned char *value, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_add_value_bool(const char *name, int asn1_bool, - STACK_OF(CONF_VALUE) **extlist); -int X509V3_add_value_int(const char *name, ASN1_INTEGER *aint, - STACK_OF(CONF_VALUE) **extlist); -char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint); -ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, char *value); -char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint); -char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth, - ASN1_ENUMERATED *aint); -int X509V3_EXT_add(X509V3_EXT_METHOD *ext); -int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist); -int X509V3_EXT_add_alias(int nid_to, int nid_from); -void X509V3_EXT_cleanup(void); - -const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); -const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); -int X509V3_add_standard_extensions(void); -STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); -void *X509V3_EXT_d2i(X509_EXTENSION *ext); -void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, - int *idx); -int X509V3_EXT_free(int nid, void *ext_data); - -X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); -int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, - int crit, unsigned long flags); - -char *hex_to_string(const unsigned char *buffer, long len); -unsigned char *string_to_hex(const char *str, long *len); -int name_cmp(const char *name, const char *cmp); - -void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, - int ml); -int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, - int indent); -int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); - -int X509V3_extensions_print(BIO *out, char *title, - STACK_OF(X509_EXTENSION) *exts, - unsigned long flag, int indent); - -int X509_check_ca(X509 *x); -int X509_check_purpose(X509 *x, int id, int ca); -int X509_supported_extension(X509_EXTENSION *ex); -int X509_PURPOSE_set(int *p, int purpose); -int X509_check_issued(X509 *issuer, X509 *subject); -int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); -int X509_PURPOSE_get_count(void); -X509_PURPOSE *X509_PURPOSE_get0(int idx); -int X509_PURPOSE_get_by_sname(char *sname); -int X509_PURPOSE_get_by_id(int id); -int X509_PURPOSE_add(int id, int trust, int flags, - int (*ck) (const X509_PURPOSE *, const X509 *, int), - char *name, char *sname, void *arg); -char *X509_PURPOSE_get0_name(X509_PURPOSE *xp); -char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp); -int X509_PURPOSE_get_trust(X509_PURPOSE *xp); -void X509_PURPOSE_cleanup(void); -int X509_PURPOSE_get_id(X509_PURPOSE *); - -STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); -STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); -void X509_email_free(STACK_OF(OPENSSL_STRING) *sk); -STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x); -/* Flags for X509_check_* functions */ - -/* - * Always check subject name for host match even if subject alt names present - */ -# define X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT 0x1 -/* Disable wildcard matching for dnsName fields and common name. */ -# define X509_CHECK_FLAG_NO_WILDCARDS 0x2 -/* Wildcards must not match a partial label. */ -# define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 0x4 -/* Allow (non-partial) wildcards to match multiple labels. */ -# define X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS 0x8 -/* Constraint verifier subdomain patterns to match a single labels. */ -# define X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10 -/* - * Match reference identifiers starting with "." to any sub-domain. - * This is a non-public flag, turned on implicitly when the subject - * reference identity is a DNS name. - */ -# define _X509_CHECK_FLAG_DOT_SUBDOMAINS 0x8000 - -int X509_check_host(X509 *x, const char *chk, size_t chklen, - unsigned int flags, char **peername); -int X509_check_email(X509 *x, const char *chk, size_t chklen, - unsigned int flags); -int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen, - unsigned int flags); -int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags); - -ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); -ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); -int a2i_ipadd(unsigned char *ipout, const char *ipasc); -int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk, - unsigned long chtype); - -void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); -DECLARE_STACK_OF(X509_POLICY_NODE) - -# ifndef OPENSSL_NO_RFC3779 - -typedef struct ASRange_st { - ASN1_INTEGER *min, *max; -} ASRange; - -# define ASIdOrRange_id 0 -# define ASIdOrRange_range 1 - -typedef struct ASIdOrRange_st { - int type; - union { - ASN1_INTEGER *id; - ASRange *range; - } u; -} ASIdOrRange; - -typedef STACK_OF(ASIdOrRange) ASIdOrRanges; -DECLARE_STACK_OF(ASIdOrRange) - -# define ASIdentifierChoice_inherit 0 -# define ASIdentifierChoice_asIdsOrRanges 1 - -typedef struct ASIdentifierChoice_st { - int type; - union { - ASN1_NULL *inherit; - ASIdOrRanges *asIdsOrRanges; - } u; -} ASIdentifierChoice; - -typedef struct ASIdentifiers_st { - ASIdentifierChoice *asnum, *rdi; -} ASIdentifiers; - -DECLARE_ASN1_FUNCTIONS(ASRange) -DECLARE_ASN1_FUNCTIONS(ASIdOrRange) -DECLARE_ASN1_FUNCTIONS(ASIdentifierChoice) -DECLARE_ASN1_FUNCTIONS(ASIdentifiers) - -typedef struct IPAddressRange_st { - ASN1_BIT_STRING *min, *max; -} IPAddressRange; - -# define IPAddressOrRange_addressPrefix 0 -# define IPAddressOrRange_addressRange 1 - -typedef struct IPAddressOrRange_st { - int type; - union { - ASN1_BIT_STRING *addressPrefix; - IPAddressRange *addressRange; - } u; -} IPAddressOrRange; - -typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges; -DECLARE_STACK_OF(IPAddressOrRange) - -# define IPAddressChoice_inherit 0 -# define IPAddressChoice_addressesOrRanges 1 - -typedef struct IPAddressChoice_st { - int type; - union { - ASN1_NULL *inherit; - IPAddressOrRanges *addressesOrRanges; - } u; -} IPAddressChoice; - -typedef struct IPAddressFamily_st { - ASN1_OCTET_STRING *addressFamily; - IPAddressChoice *ipAddressChoice; -} IPAddressFamily; - -typedef STACK_OF(IPAddressFamily) IPAddrBlocks; -DECLARE_STACK_OF(IPAddressFamily) - -DECLARE_ASN1_FUNCTIONS(IPAddressRange) -DECLARE_ASN1_FUNCTIONS(IPAddressOrRange) -DECLARE_ASN1_FUNCTIONS(IPAddressChoice) -DECLARE_ASN1_FUNCTIONS(IPAddressFamily) - -/* - * API tag for elements of the ASIdentifer SEQUENCE. - */ -# define V3_ASID_ASNUM 0 -# define V3_ASID_RDI 1 - -/* - * AFI values, assigned by IANA. It'd be nice to make the AFI - * handling code totally generic, but there are too many little things - * that would need to be defined for other address families for it to - * be worth the trouble. - */ -# define IANA_AFI_IPV4 1 -# define IANA_AFI_IPV6 2 - -/* - * Utilities to construct and extract values from RFC3779 extensions, - * since some of the encodings (particularly for IP address prefixes - * and ranges) are a bit tedious to work with directly. - */ -int v3_asid_add_inherit(ASIdentifiers *asid, int which); -int v3_asid_add_id_or_range(ASIdentifiers *asid, int which, - ASN1_INTEGER *min, ASN1_INTEGER *max); -int v3_addr_add_inherit(IPAddrBlocks *addr, - const unsigned afi, const unsigned *safi); -int v3_addr_add_prefix(IPAddrBlocks *addr, - const unsigned afi, const unsigned *safi, - unsigned char *a, const int prefixlen); -int v3_addr_add_range(IPAddrBlocks *addr, - const unsigned afi, const unsigned *safi, - unsigned char *min, unsigned char *max); -unsigned v3_addr_get_afi(const IPAddressFamily *f); -int v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi, - unsigned char *min, unsigned char *max, - const int length); - -/* - * Canonical forms. - */ -int v3_asid_is_canonical(ASIdentifiers *asid); -int v3_addr_is_canonical(IPAddrBlocks *addr); -int v3_asid_canonize(ASIdentifiers *asid); -int v3_addr_canonize(IPAddrBlocks *addr); - -/* - * Tests for inheritance and containment. - */ -int v3_asid_inherits(ASIdentifiers *asid); -int v3_addr_inherits(IPAddrBlocks *addr); -int v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b); -int v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b); - -/* - * Check whether RFC 3779 extensions nest properly in chains. - */ -int v3_asid_validate_path(X509_STORE_CTX *); -int v3_addr_validate_path(X509_STORE_CTX *); -int v3_asid_validate_resource_set(STACK_OF(X509) *chain, - ASIdentifiers *ext, int allow_inheritance); -int v3_addr_validate_resource_set(STACK_OF(X509) *chain, - IPAddrBlocks *ext, int allow_inheritance); - -# endif /* OPENSSL_NO_RFC3779 */ - -/* BEGIN ERROR CODES */ -/* - * The following lines are auto generated by the script mkerr.pl. Any changes - * made after this point may be overwritten when the script is next run. - */ -void ERR_load_X509V3_strings(void); - -/* Error codes for the X509V3 functions. */ - -/* Function codes. */ -# define X509V3_F_A2I_GENERAL_NAME 164 -# define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 161 -# define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 162 -# define X509V3_F_COPY_EMAIL 122 -# define X509V3_F_COPY_ISSUER 123 -# define X509V3_F_DO_DIRNAME 144 -# define X509V3_F_DO_EXT_CONF 124 -# define X509V3_F_DO_EXT_I2D 135 -# define X509V3_F_DO_EXT_NCONF 151 -# define X509V3_F_DO_I2V_NAME_CONSTRAINTS 148 -# define X509V3_F_GNAMES_FROM_SECTNAME 156 -# define X509V3_F_HEX_TO_STRING 111 -# define X509V3_F_I2S_ASN1_ENUMERATED 121 -# define X509V3_F_I2S_ASN1_IA5STRING 149 -# define X509V3_F_I2S_ASN1_INTEGER 120 -# define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 -# define X509V3_F_NOTICE_SECTION 132 -# define X509V3_F_NREF_NOS 133 -# define X509V3_F_POLICY_SECTION 131 -# define X509V3_F_PROCESS_PCI_VALUE 150 -# define X509V3_F_R2I_CERTPOL 130 -# define X509V3_F_R2I_PCI 155 -# define X509V3_F_S2I_ASN1_IA5STRING 100 -# define X509V3_F_S2I_ASN1_INTEGER 108 -# define X509V3_F_S2I_ASN1_OCTET_STRING 112 -# define X509V3_F_S2I_ASN1_SKEY_ID 114 -# define X509V3_F_S2I_SKEY_ID 115 -# define X509V3_F_SET_DIST_POINT_NAME 158 -# define X509V3_F_STRING_TO_HEX 113 -# define X509V3_F_SXNET_ADD_ID_ASC 125 -# define X509V3_F_SXNET_ADD_ID_INTEGER 126 -# define X509V3_F_SXNET_ADD_ID_ULONG 127 -# define X509V3_F_SXNET_GET_ID_ASC 128 -# define X509V3_F_SXNET_GET_ID_ULONG 129 -# define X509V3_F_V2I_ASIDENTIFIERS 163 -# define X509V3_F_V2I_ASN1_BIT_STRING 101 -# define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 -# define X509V3_F_V2I_AUTHORITY_KEYID 119 -# define X509V3_F_V2I_BASIC_CONSTRAINTS 102 -# define X509V3_F_V2I_CRLD 134 -# define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 -# define X509V3_F_V2I_GENERAL_NAMES 118 -# define X509V3_F_V2I_GENERAL_NAME_EX 117 -# define X509V3_F_V2I_IDP 157 -# define X509V3_F_V2I_IPADDRBLOCKS 159 -# define X509V3_F_V2I_ISSUER_ALT 153 -# define X509V3_F_V2I_NAME_CONSTRAINTS 147 -# define X509V3_F_V2I_POLICY_CONSTRAINTS 146 -# define X509V3_F_V2I_POLICY_MAPPINGS 145 -# define X509V3_F_V2I_SUBJECT_ALT 154 -# define X509V3_F_V3_ADDR_VALIDATE_PATH_INTERNAL 160 -# define X509V3_F_V3_GENERIC_EXTENSION 116 -# define X509V3_F_X509V3_ADD1_I2D 140 -# define X509V3_F_X509V3_ADD_VALUE 105 -# define X509V3_F_X509V3_EXT_ADD 104 -# define X509V3_F_X509V3_EXT_ADD_ALIAS 106 -# define X509V3_F_X509V3_EXT_CONF 107 -# define X509V3_F_X509V3_EXT_FREE 165 -# define X509V3_F_X509V3_EXT_I2D 136 -# define X509V3_F_X509V3_EXT_NCONF 152 -# define X509V3_F_X509V3_GET_SECTION 142 -# define X509V3_F_X509V3_GET_STRING 143 -# define X509V3_F_X509V3_GET_VALUE_BOOL 110 -# define X509V3_F_X509V3_PARSE_LIST 109 -# define X509V3_F_X509_PURPOSE_ADD 137 -# define X509V3_F_X509_PURPOSE_SET 141 - -/* Reason codes. */ -# define X509V3_R_BAD_IP_ADDRESS 118 -# define X509V3_R_BAD_OBJECT 119 -# define X509V3_R_BN_DEC2BN_ERROR 100 -# define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 -# define X509V3_R_CANNOT_FIND_FREE_FUNCTION 168 -# define X509V3_R_DIRNAME_ERROR 149 -# define X509V3_R_DISTPOINT_ALREADY_SET 160 -# define X509V3_R_DUPLICATE_ZONE_ID 133 -# define X509V3_R_ERROR_CONVERTING_ZONE 131 -# define X509V3_R_ERROR_CREATING_EXTENSION 144 -# define X509V3_R_ERROR_IN_EXTENSION 128 -# define X509V3_R_EXPECTED_A_SECTION_NAME 137 -# define X509V3_R_EXTENSION_EXISTS 145 -# define X509V3_R_EXTENSION_NAME_ERROR 115 -# define X509V3_R_EXTENSION_NOT_FOUND 102 -# define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 -# define X509V3_R_EXTENSION_VALUE_ERROR 116 -# define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 -# define X509V3_R_ILLEGAL_HEX_DIGIT 113 -# define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 -# define X509V3_R_INVALID_ASNUMBER 162 -# define X509V3_R_INVALID_ASRANGE 163 -# define X509V3_R_INVALID_BOOLEAN_STRING 104 -# define X509V3_R_INVALID_EXTENSION_STRING 105 -# define X509V3_R_INVALID_INHERITANCE 165 -# define X509V3_R_INVALID_IPADDRESS 166 -# define X509V3_R_INVALID_MULTIPLE_RDNS 161 -# define X509V3_R_INVALID_NAME 106 -# define X509V3_R_INVALID_NULL_ARGUMENT 107 -# define X509V3_R_INVALID_NULL_NAME 108 -# define X509V3_R_INVALID_NULL_VALUE 109 -# define X509V3_R_INVALID_NUMBER 140 -# define X509V3_R_INVALID_NUMBERS 141 -# define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 -# define X509V3_R_INVALID_OPTION 138 -# define X509V3_R_INVALID_POLICY_IDENTIFIER 134 -# define X509V3_R_INVALID_PROXY_POLICY_SETTING 153 -# define X509V3_R_INVALID_PURPOSE 146 -# define X509V3_R_INVALID_SAFI 164 -# define X509V3_R_INVALID_SECTION 135 -# define X509V3_R_INVALID_SYNTAX 143 -# define X509V3_R_ISSUER_DECODE_ERROR 126 -# define X509V3_R_MISSING_VALUE 124 -# define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 -# define X509V3_R_NO_CONFIG_DATABASE 136 -# define X509V3_R_NO_ISSUER_CERTIFICATE 121 -# define X509V3_R_NO_ISSUER_DETAILS 127 -# define X509V3_R_NO_POLICY_IDENTIFIER 139 -# define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 154 -# define X509V3_R_NO_PUBLIC_KEY 114 -# define X509V3_R_NO_SUBJECT_DETAILS 125 -# define X509V3_R_ODD_NUMBER_OF_DIGITS 112 -# define X509V3_R_OPERATION_NOT_DEFINED 148 -# define X509V3_R_OTHERNAME_ERROR 147 -# define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED 155 -# define X509V3_R_POLICY_PATH_LENGTH 156 -# define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED 157 -# define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 158 -# define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 -# define X509V3_R_SECTION_NOT_FOUND 150 -# define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 -# define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 -# define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 -# define X509V3_R_UNKNOWN_EXTENSION 129 -# define X509V3_R_UNKNOWN_EXTENSION_NAME 130 -# define X509V3_R_UNKNOWN_OPTION 120 -# define X509V3_R_UNSUPPORTED_OPTION 117 -# define X509V3_R_UNSUPPORTED_TYPE 167 -# define X509V3_R_USER_TOO_LONG 132 - -#ifdef __cplusplus -} -#endif -#endif +/* + * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_X509V3_H +# define HEADER_X509V3_H + +# include +# include +# include +# include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward reference */ +struct v3_ext_method; +struct v3_ext_ctx; + +/* Useful typedefs */ + +typedef void *(*X509V3_EXT_NEW)(void); +typedef void (*X509V3_EXT_FREE) (void *); +typedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long); +typedef int (*X509V3_EXT_I2D) (void *, unsigned char **); +typedef STACK_OF(CONF_VALUE) * + (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext, + STACK_OF(CONF_VALUE) *extlist); +typedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method, + struct v3_ext_ctx *ctx, + STACK_OF(CONF_VALUE) *values); +typedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method, + void *ext); +typedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method, + struct v3_ext_ctx *ctx, const char *str); +typedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext, + BIO *out, int indent); +typedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method, + struct v3_ext_ctx *ctx, const char *str); + +/* V3 extension structure */ + +struct v3_ext_method { + int ext_nid; + int ext_flags; +/* If this is set the following four fields are ignored */ + ASN1_ITEM_EXP *it; +/* Old style ASN1 calls */ + X509V3_EXT_NEW ext_new; + X509V3_EXT_FREE ext_free; + X509V3_EXT_D2I d2i; + X509V3_EXT_I2D i2d; +/* The following pair is used for string extensions */ + X509V3_EXT_I2S i2s; + X509V3_EXT_S2I s2i; +/* The following pair is used for multi-valued extensions */ + X509V3_EXT_I2V i2v; + X509V3_EXT_V2I v2i; +/* The following are used for raw extensions */ + X509V3_EXT_I2R i2r; + X509V3_EXT_R2I r2i; + void *usr_data; /* Any extension specific data */ +}; + +typedef struct X509V3_CONF_METHOD_st { + char *(*get_string) (void *db, const char *section, const char *value); + STACK_OF(CONF_VALUE) *(*get_section) (void *db, const char *section); + void (*free_string) (void *db, char *string); + void (*free_section) (void *db, STACK_OF(CONF_VALUE) *section); +} X509V3_CONF_METHOD; + +/* Context specific info */ +struct v3_ext_ctx { +# define CTX_TEST 0x1 +# define X509V3_CTX_REPLACE 0x2 + int flags; + X509 *issuer_cert; + X509 *subject_cert; + X509_REQ *subject_req; + X509_CRL *crl; + X509V3_CONF_METHOD *db_meth; + void *db; +/* Maybe more here */ +}; + +typedef struct v3_ext_method X509V3_EXT_METHOD; + +DEFINE_STACK_OF(X509V3_EXT_METHOD) + +/* ext_flags values */ +# define X509V3_EXT_DYNAMIC 0x1 +# define X509V3_EXT_CTX_DEP 0x2 +# define X509V3_EXT_MULTILINE 0x4 + +typedef BIT_STRING_BITNAME ENUMERATED_NAMES; + +typedef struct BASIC_CONSTRAINTS_st { + int ca; + ASN1_INTEGER *pathlen; +} BASIC_CONSTRAINTS; + +typedef struct PKEY_USAGE_PERIOD_st { + ASN1_GENERALIZEDTIME *notBefore; + ASN1_GENERALIZEDTIME *notAfter; +} PKEY_USAGE_PERIOD; + +typedef struct otherName_st { + ASN1_OBJECT *type_id; + ASN1_TYPE *value; +} OTHERNAME; + +typedef struct EDIPartyName_st { + ASN1_STRING *nameAssigner; + ASN1_STRING *partyName; +} EDIPARTYNAME; + +typedef struct GENERAL_NAME_st { +# define GEN_OTHERNAME 0 +# define GEN_EMAIL 1 +# define GEN_DNS 2 +# define GEN_X400 3 +# define GEN_DIRNAME 4 +# define GEN_EDIPARTY 5 +# define GEN_URI 6 +# define GEN_IPADD 7 +# define GEN_RID 8 + int type; + union { + char *ptr; + OTHERNAME *otherName; /* otherName */ + ASN1_IA5STRING *rfc822Name; + ASN1_IA5STRING *dNSName; + ASN1_TYPE *x400Address; + X509_NAME *directoryName; + EDIPARTYNAME *ediPartyName; + ASN1_IA5STRING *uniformResourceIdentifier; + ASN1_OCTET_STRING *iPAddress; + ASN1_OBJECT *registeredID; + /* Old names */ + ASN1_OCTET_STRING *ip; /* iPAddress */ + X509_NAME *dirn; /* dirn */ + ASN1_IA5STRING *ia5; /* rfc822Name, dNSName, + * uniformResourceIdentifier */ + ASN1_OBJECT *rid; /* registeredID */ + ASN1_TYPE *other; /* x400Address */ + } d; +} GENERAL_NAME; + +typedef struct ACCESS_DESCRIPTION_st { + ASN1_OBJECT *method; + GENERAL_NAME *location; +} ACCESS_DESCRIPTION; + +typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; + +typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; + +typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE; + +DEFINE_STACK_OF(GENERAL_NAME) +typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; +DEFINE_STACK_OF(GENERAL_NAMES) + +DEFINE_STACK_OF(ACCESS_DESCRIPTION) + +typedef struct DIST_POINT_NAME_st { + int type; + union { + GENERAL_NAMES *fullname; + STACK_OF(X509_NAME_ENTRY) *relativename; + } name; +/* If relativename then this contains the full distribution point name */ + X509_NAME *dpname; +} DIST_POINT_NAME; +/* All existing reasons */ +# define CRLDP_ALL_REASONS 0x807f + +# define CRL_REASON_NONE -1 +# define CRL_REASON_UNSPECIFIED 0 +# define CRL_REASON_KEY_COMPROMISE 1 +# define CRL_REASON_CA_COMPROMISE 2 +# define CRL_REASON_AFFILIATION_CHANGED 3 +# define CRL_REASON_SUPERSEDED 4 +# define CRL_REASON_CESSATION_OF_OPERATION 5 +# define CRL_REASON_CERTIFICATE_HOLD 6 +# define CRL_REASON_REMOVE_FROM_CRL 8 +# define CRL_REASON_PRIVILEGE_WITHDRAWN 9 +# define CRL_REASON_AA_COMPROMISE 10 + +struct DIST_POINT_st { + DIST_POINT_NAME *distpoint; + ASN1_BIT_STRING *reasons; + GENERAL_NAMES *CRLissuer; + int dp_reasons; +}; + +typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; + +DEFINE_STACK_OF(DIST_POINT) + +struct AUTHORITY_KEYID_st { + ASN1_OCTET_STRING *keyid; + GENERAL_NAMES *issuer; + ASN1_INTEGER *serial; +}; + +/* Strong extranet structures */ + +typedef struct SXNET_ID_st { + ASN1_INTEGER *zone; + ASN1_OCTET_STRING *user; +} SXNETID; + +DEFINE_STACK_OF(SXNETID) + +typedef struct SXNET_st { + ASN1_INTEGER *version; + STACK_OF(SXNETID) *ids; +} SXNET; + +typedef struct NOTICEREF_st { + ASN1_STRING *organization; + STACK_OF(ASN1_INTEGER) *noticenos; +} NOTICEREF; + +typedef struct USERNOTICE_st { + NOTICEREF *noticeref; + ASN1_STRING *exptext; +} USERNOTICE; + +typedef struct POLICYQUALINFO_st { + ASN1_OBJECT *pqualid; + union { + ASN1_IA5STRING *cpsuri; + USERNOTICE *usernotice; + ASN1_TYPE *other; + } d; +} POLICYQUALINFO; + +DEFINE_STACK_OF(POLICYQUALINFO) + +typedef struct POLICYINFO_st { + ASN1_OBJECT *policyid; + STACK_OF(POLICYQUALINFO) *qualifiers; +} POLICYINFO; + +typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; + +DEFINE_STACK_OF(POLICYINFO) + +typedef struct POLICY_MAPPING_st { + ASN1_OBJECT *issuerDomainPolicy; + ASN1_OBJECT *subjectDomainPolicy; +} POLICY_MAPPING; + +DEFINE_STACK_OF(POLICY_MAPPING) + +typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS; + +typedef struct GENERAL_SUBTREE_st { + GENERAL_NAME *base; + ASN1_INTEGER *minimum; + ASN1_INTEGER *maximum; +} GENERAL_SUBTREE; + +DEFINE_STACK_OF(GENERAL_SUBTREE) + +struct NAME_CONSTRAINTS_st { + STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; + STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; +}; + +typedef struct POLICY_CONSTRAINTS_st { + ASN1_INTEGER *requireExplicitPolicy; + ASN1_INTEGER *inhibitPolicyMapping; +} POLICY_CONSTRAINTS; + +/* Proxy certificate structures, see RFC 3820 */ +typedef struct PROXY_POLICY_st { + ASN1_OBJECT *policyLanguage; + ASN1_OCTET_STRING *policy; +} PROXY_POLICY; + +typedef struct PROXY_CERT_INFO_EXTENSION_st { + ASN1_INTEGER *pcPathLengthConstraint; + PROXY_POLICY *proxyPolicy; +} PROXY_CERT_INFO_EXTENSION; + +DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) +DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) + +struct ISSUING_DIST_POINT_st { + DIST_POINT_NAME *distpoint; + int onlyuser; + int onlyCA; + ASN1_BIT_STRING *onlysomereasons; + int indirectCRL; + int onlyattr; +}; + +/* Values in idp_flags field */ +/* IDP present */ +# define IDP_PRESENT 0x1 +/* IDP values inconsistent */ +# define IDP_INVALID 0x2 +/* onlyuser true */ +# define IDP_ONLYUSER 0x4 +/* onlyCA true */ +# define IDP_ONLYCA 0x8 +/* onlyattr true */ +# define IDP_ONLYATTR 0x10 +/* indirectCRL true */ +# define IDP_INDIRECT 0x20 +/* onlysomereasons present */ +# define IDP_REASONS 0x40 + +# define X509V3_conf_err(val) ERR_add_error_data(6, \ + "section:", (val)->section, \ + ",name:", (val)->name, ",value:", (val)->value) + +# define X509V3_set_ctx_test(ctx) \ + X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) +# define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL; + +# define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \ + 0,0,0,0, \ + 0,0, \ + (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ + (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ + NULL, NULL, \ + table} + +# define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \ + 0,0,0,0, \ + (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ + (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ + 0,0,0,0, \ + NULL} + +# define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} + +/* X509_PURPOSE stuff */ + +# define EXFLAG_BCONS 0x1 +# define EXFLAG_KUSAGE 0x2 +# define EXFLAG_XKUSAGE 0x4 +# define EXFLAG_NSCERT 0x8 + +# define EXFLAG_CA 0x10 +/* Really self issued not necessarily self signed */ +# define EXFLAG_SI 0x20 +# define EXFLAG_V1 0x40 +# define EXFLAG_INVALID 0x80 +/* EXFLAG_SET is set to indicate that some values have been precomputed */ +# define EXFLAG_SET 0x100 +# define EXFLAG_CRITICAL 0x200 +# define EXFLAG_PROXY 0x400 + +# define EXFLAG_INVALID_POLICY 0x800 +# define EXFLAG_FRESHEST 0x1000 +/* Self signed */ +# define EXFLAG_SS 0x2000 + +# define KU_DIGITAL_SIGNATURE 0x0080 +# define KU_NON_REPUDIATION 0x0040 +# define KU_KEY_ENCIPHERMENT 0x0020 +# define KU_DATA_ENCIPHERMENT 0x0010 +# define KU_KEY_AGREEMENT 0x0008 +# define KU_KEY_CERT_SIGN 0x0004 +# define KU_CRL_SIGN 0x0002 +# define KU_ENCIPHER_ONLY 0x0001 +# define KU_DECIPHER_ONLY 0x8000 + +# define NS_SSL_CLIENT 0x80 +# define NS_SSL_SERVER 0x40 +# define NS_SMIME 0x20 +# define NS_OBJSIGN 0x10 +# define NS_SSL_CA 0x04 +# define NS_SMIME_CA 0x02 +# define NS_OBJSIGN_CA 0x01 +# define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) + +# define XKU_SSL_SERVER 0x1 +# define XKU_SSL_CLIENT 0x2 +# define XKU_SMIME 0x4 +# define XKU_CODE_SIGN 0x8 +# define XKU_SGC 0x10 +# define XKU_OCSP_SIGN 0x20 +# define XKU_TIMESTAMP 0x40 +# define XKU_DVCS 0x80 +# define XKU_ANYEKU 0x100 + +# define X509_PURPOSE_DYNAMIC 0x1 +# define X509_PURPOSE_DYNAMIC_NAME 0x2 + +typedef struct x509_purpose_st { + int purpose; + int trust; /* Default trust ID */ + int flags; + int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int); + char *name; + char *sname; + void *usr_data; +} X509_PURPOSE; + +# define X509_PURPOSE_SSL_CLIENT 1 +# define X509_PURPOSE_SSL_SERVER 2 +# define X509_PURPOSE_NS_SSL_SERVER 3 +# define X509_PURPOSE_SMIME_SIGN 4 +# define X509_PURPOSE_SMIME_ENCRYPT 5 +# define X509_PURPOSE_CRL_SIGN 6 +# define X509_PURPOSE_ANY 7 +# define X509_PURPOSE_OCSP_HELPER 8 +# define X509_PURPOSE_TIMESTAMP_SIGN 9 + +# define X509_PURPOSE_MIN 1 +# define X509_PURPOSE_MAX 9 + +/* Flags for X509V3_EXT_print() */ + +# define X509V3_EXT_UNKNOWN_MASK (0xfL << 16) +/* Return error for unknown extensions */ +# define X509V3_EXT_DEFAULT 0 +/* Print error for unknown extensions */ +# define X509V3_EXT_ERROR_UNKNOWN (1L << 16) +/* ASN1 parse unknown extensions */ +# define X509V3_EXT_PARSE_UNKNOWN (2L << 16) +/* BIO_dump unknown extensions */ +# define X509V3_EXT_DUMP_UNKNOWN (3L << 16) + +/* Flags for X509V3_add1_i2d */ + +# define X509V3_ADD_OP_MASK 0xfL +# define X509V3_ADD_DEFAULT 0L +# define X509V3_ADD_APPEND 1L +# define X509V3_ADD_REPLACE 2L +# define X509V3_ADD_REPLACE_EXISTING 3L +# define X509V3_ADD_KEEP_EXISTING 4L +# define X509V3_ADD_DELETE 5L +# define X509V3_ADD_SILENT 0x10 + +DEFINE_STACK_OF(X509_PURPOSE) + +DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) + +DECLARE_ASN1_FUNCTIONS(SXNET) +DECLARE_ASN1_FUNCTIONS(SXNETID) + +int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen); +int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user, + int userlen); +int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, const char *user, + int userlen); + +ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone); +ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); +ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); + +DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) + +DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) + +DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) +GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a); +int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b); + +ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, + STACK_OF(CONF_VALUE) *nval); +STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, + ASN1_BIT_STRING *bits, + STACK_OF(CONF_VALUE) *extlist); +char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5); +ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, const char *str); + +STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, + GENERAL_NAME *gen, + STACK_OF(CONF_VALUE) *ret); +int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen); + +DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) + +STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, + GENERAL_NAMES *gen, + STACK_OF(CONF_VALUE) *extlist); +GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); + +DECLARE_ASN1_FUNCTIONS(OTHERNAME) +DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) +int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b); +void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value); +void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, int *ptype); +int GENERAL_NAME_set0_othername(GENERAL_NAME *gen, + ASN1_OBJECT *oid, ASN1_TYPE *value); +int GENERAL_NAME_get0_otherName(const GENERAL_NAME *gen, + ASN1_OBJECT **poid, ASN1_TYPE **pvalue); + +char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, + const ASN1_OCTET_STRING *ia5); +ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, const char *str); + +DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) +int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a); + +DECLARE_ASN1_ALLOC_FUNCTIONS(TLS_FEATURE) + +DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) +DECLARE_ASN1_FUNCTIONS(POLICYINFO) +DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO) +DECLARE_ASN1_FUNCTIONS(USERNOTICE) +DECLARE_ASN1_FUNCTIONS(NOTICEREF) + +DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) +DECLARE_ASN1_FUNCTIONS(DIST_POINT) +DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) +DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT) + +int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname); + +int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc); +int NAME_CONSTRAINTS_check_CN(X509 *x, NAME_CONSTRAINTS *nc); + +DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) +DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) + +DECLARE_ASN1_ITEM(POLICY_MAPPING) +DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) +DECLARE_ASN1_ITEM(POLICY_MAPPINGS) + +DECLARE_ASN1_ITEM(GENERAL_SUBTREE) +DECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE) + +DECLARE_ASN1_ITEM(NAME_CONSTRAINTS) +DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) + +DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) +DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) + +GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out, + const X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, int gen_type, + const char *value, int is_nc); + +# ifdef HEADER_CONF_H +GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, CONF_VALUE *cnf); +GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, + const X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, CONF_VALUE *cnf, + int is_nc); +void X509V3_conf_free(CONF_VALUE *val); + +X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, + const char *value); +X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name, + const char *value); +int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section, + STACK_OF(X509_EXTENSION) **sk); +int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, + X509 *cert); +int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, + X509_REQ *req); +int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, + X509_CRL *crl); + +X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, + X509V3_CTX *ctx, int ext_nid, + const char *value); +X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, + const char *name, const char *value); +int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, + const char *section, X509 *cert); +int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, + const char *section, X509_REQ *req); +int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, + const char *section, X509_CRL *crl); + +int X509V3_add_value_bool_nf(const char *name, int asn1_bool, + STACK_OF(CONF_VALUE) **extlist); +int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool); +int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint); +void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); +void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash); +# endif + +char *X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section); +STACK_OF(CONF_VALUE) *X509V3_get_section(X509V3_CTX *ctx, const char *section); +void X509V3_string_free(X509V3_CTX *ctx, char *str); +void X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section); +void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject, + X509_REQ *req, X509_CRL *crl, int flags); + +int X509V3_add_value(const char *name, const char *value, + STACK_OF(CONF_VALUE) **extlist); +int X509V3_add_value_uchar(const char *name, const unsigned char *value, + STACK_OF(CONF_VALUE) **extlist); +int X509V3_add_value_bool(const char *name, int asn1_bool, + STACK_OF(CONF_VALUE) **extlist); +int X509V3_add_value_int(const char *name, const ASN1_INTEGER *aint, + STACK_OF(CONF_VALUE) **extlist); +char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const ASN1_INTEGER *aint); +ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const char *value); +char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, const ASN1_ENUMERATED *aint); +char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth, + const ASN1_ENUMERATED *aint); +int X509V3_EXT_add(X509V3_EXT_METHOD *ext); +int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist); +int X509V3_EXT_add_alias(int nid_to, int nid_from); +void X509V3_EXT_cleanup(void); + +const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); +const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); +int X509V3_add_standard_extensions(void); +STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); +void *X509V3_EXT_d2i(X509_EXTENSION *ext); +void *X509V3_get_d2i(const STACK_OF(X509_EXTENSION) *x, int nid, int *crit, + int *idx); + +X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); +int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, + int crit, unsigned long flags); + +#if OPENSSL_API_COMPAT < 0x10100000L +/* The new declarations are in crypto.h, but the old ones were here. */ +# define hex_to_string OPENSSL_buf2hexstr +# define string_to_hex OPENSSL_hexstr2buf +#endif + +void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, + int ml); +int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, + int indent); +#ifndef OPENSSL_NO_STDIO +int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); +#endif +int X509V3_extensions_print(BIO *out, const char *title, + const STACK_OF(X509_EXTENSION) *exts, + unsigned long flag, int indent); + +int X509_check_ca(X509 *x); +int X509_check_purpose(X509 *x, int id, int ca); +int X509_supported_extension(X509_EXTENSION *ex); +int X509_PURPOSE_set(int *p, int purpose); +int X509_check_issued(X509 *issuer, X509 *subject); +int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); +void X509_set_proxy_flag(X509 *x); +void X509_set_proxy_pathlen(X509 *x, long l); +long X509_get_proxy_pathlen(X509 *x); + +uint32_t X509_get_extension_flags(X509 *x); +uint32_t X509_get_key_usage(X509 *x); +uint32_t X509_get_extended_key_usage(X509 *x); +const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x); +const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x); +const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x); +const ASN1_INTEGER *X509_get0_authority_serial(X509 *x); + +int X509_PURPOSE_get_count(void); +X509_PURPOSE *X509_PURPOSE_get0(int idx); +int X509_PURPOSE_get_by_sname(const char *sname); +int X509_PURPOSE_get_by_id(int id); +int X509_PURPOSE_add(int id, int trust, int flags, + int (*ck) (const X509_PURPOSE *, const X509 *, int), + const char *name, const char *sname, void *arg); +char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp); +char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp); +int X509_PURPOSE_get_trust(const X509_PURPOSE *xp); +void X509_PURPOSE_cleanup(void); +int X509_PURPOSE_get_id(const X509_PURPOSE *); + +STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); +STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); +void X509_email_free(STACK_OF(OPENSSL_STRING) *sk); +STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x); +/* Flags for X509_check_* functions */ + +/* + * Always check subject name for host match even if subject alt names present + */ +# define X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT 0x1 +/* Disable wildcard matching for dnsName fields and common name. */ +# define X509_CHECK_FLAG_NO_WILDCARDS 0x2 +/* Wildcards must not match a partial label. */ +# define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 0x4 +/* Allow (non-partial) wildcards to match multiple labels. */ +# define X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS 0x8 +/* Constraint verifier subdomain patterns to match a single labels. */ +# define X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10 +/* Never check the subject CN */ +# define X509_CHECK_FLAG_NEVER_CHECK_SUBJECT 0x20 +/* + * Match reference identifiers starting with "." to any sub-domain. + * This is a non-public flag, turned on implicitly when the subject + * reference identity is a DNS name. + */ +# define _X509_CHECK_FLAG_DOT_SUBDOMAINS 0x8000 + +int X509_check_host(X509 *x, const char *chk, size_t chklen, + unsigned int flags, char **peername); +int X509_check_email(X509 *x, const char *chk, size_t chklen, + unsigned int flags); +int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen, + unsigned int flags); +int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags); + +ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); +ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); +int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk, + unsigned long chtype); + +void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); +DEFINE_STACK_OF(X509_POLICY_NODE) + +#ifndef OPENSSL_NO_RFC3779 +typedef struct ASRange_st { + ASN1_INTEGER *min, *max; +} ASRange; + +# define ASIdOrRange_id 0 +# define ASIdOrRange_range 1 + +typedef struct ASIdOrRange_st { + int type; + union { + ASN1_INTEGER *id; + ASRange *range; + } u; +} ASIdOrRange; + +typedef STACK_OF(ASIdOrRange) ASIdOrRanges; +DEFINE_STACK_OF(ASIdOrRange) + +# define ASIdentifierChoice_inherit 0 +# define ASIdentifierChoice_asIdsOrRanges 1 + +typedef struct ASIdentifierChoice_st { + int type; + union { + ASN1_NULL *inherit; + ASIdOrRanges *asIdsOrRanges; + } u; +} ASIdentifierChoice; + +typedef struct ASIdentifiers_st { + ASIdentifierChoice *asnum, *rdi; +} ASIdentifiers; + +DECLARE_ASN1_FUNCTIONS(ASRange) +DECLARE_ASN1_FUNCTIONS(ASIdOrRange) +DECLARE_ASN1_FUNCTIONS(ASIdentifierChoice) +DECLARE_ASN1_FUNCTIONS(ASIdentifiers) + +typedef struct IPAddressRange_st { + ASN1_BIT_STRING *min, *max; +} IPAddressRange; + +# define IPAddressOrRange_addressPrefix 0 +# define IPAddressOrRange_addressRange 1 + +typedef struct IPAddressOrRange_st { + int type; + union { + ASN1_BIT_STRING *addressPrefix; + IPAddressRange *addressRange; + } u; +} IPAddressOrRange; + +typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges; +DEFINE_STACK_OF(IPAddressOrRange) + +# define IPAddressChoice_inherit 0 +# define IPAddressChoice_addressesOrRanges 1 + +typedef struct IPAddressChoice_st { + int type; + union { + ASN1_NULL *inherit; + IPAddressOrRanges *addressesOrRanges; + } u; +} IPAddressChoice; + +typedef struct IPAddressFamily_st { + ASN1_OCTET_STRING *addressFamily; + IPAddressChoice *ipAddressChoice; +} IPAddressFamily; + +typedef STACK_OF(IPAddressFamily) IPAddrBlocks; +DEFINE_STACK_OF(IPAddressFamily) + +DECLARE_ASN1_FUNCTIONS(IPAddressRange) +DECLARE_ASN1_FUNCTIONS(IPAddressOrRange) +DECLARE_ASN1_FUNCTIONS(IPAddressChoice) +DECLARE_ASN1_FUNCTIONS(IPAddressFamily) + +/* + * API tag for elements of the ASIdentifer SEQUENCE. + */ +# define V3_ASID_ASNUM 0 +# define V3_ASID_RDI 1 + +/* + * AFI values, assigned by IANA. It'd be nice to make the AFI + * handling code totally generic, but there are too many little things + * that would need to be defined for other address families for it to + * be worth the trouble. + */ +# define IANA_AFI_IPV4 1 +# define IANA_AFI_IPV6 2 + +/* + * Utilities to construct and extract values from RFC3779 extensions, + * since some of the encodings (particularly for IP address prefixes + * and ranges) are a bit tedious to work with directly. + */ +int X509v3_asid_add_inherit(ASIdentifiers *asid, int which); +int X509v3_asid_add_id_or_range(ASIdentifiers *asid, int which, + ASN1_INTEGER *min, ASN1_INTEGER *max); +int X509v3_addr_add_inherit(IPAddrBlocks *addr, + const unsigned afi, const unsigned *safi); +int X509v3_addr_add_prefix(IPAddrBlocks *addr, + const unsigned afi, const unsigned *safi, + unsigned char *a, const int prefixlen); +int X509v3_addr_add_range(IPAddrBlocks *addr, + const unsigned afi, const unsigned *safi, + unsigned char *min, unsigned char *max); +unsigned X509v3_addr_get_afi(const IPAddressFamily *f); +int X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi, + unsigned char *min, unsigned char *max, + const int length); + +/* + * Canonical forms. + */ +int X509v3_asid_is_canonical(ASIdentifiers *asid); +int X509v3_addr_is_canonical(IPAddrBlocks *addr); +int X509v3_asid_canonize(ASIdentifiers *asid); +int X509v3_addr_canonize(IPAddrBlocks *addr); + +/* + * Tests for inheritance and containment. + */ +int X509v3_asid_inherits(ASIdentifiers *asid); +int X509v3_addr_inherits(IPAddrBlocks *addr); +int X509v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b); +int X509v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b); + +/* + * Check whether RFC 3779 extensions nest properly in chains. + */ +int X509v3_asid_validate_path(X509_STORE_CTX *); +int X509v3_addr_validate_path(X509_STORE_CTX *); +int X509v3_asid_validate_resource_set(STACK_OF(X509) *chain, + ASIdentifiers *ext, + int allow_inheritance); +int X509v3_addr_validate_resource_set(STACK_OF(X509) *chain, + IPAddrBlocks *ext, int allow_inheritance); + +#endif /* OPENSSL_NO_RFC3779 */ + +DEFINE_STACK_OF(ASN1_STRING) + +/* + * Admission Syntax + */ +typedef struct NamingAuthority_st NAMING_AUTHORITY; +typedef struct ProfessionInfo_st PROFESSION_INFO; +typedef struct Admissions_st ADMISSIONS; +typedef struct AdmissionSyntax_st ADMISSION_SYNTAX; +DECLARE_ASN1_FUNCTIONS(NAMING_AUTHORITY) +DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO) +DECLARE_ASN1_FUNCTIONS(ADMISSIONS) +DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX) +DEFINE_STACK_OF(ADMISSIONS) +DEFINE_STACK_OF(PROFESSION_INFO) +typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS; + +const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId( + const NAMING_AUTHORITY *n); +const ASN1_IA5STRING *NAMING_AUTHORITY_get0_authorityURL( + const NAMING_AUTHORITY *n); +const ASN1_STRING *NAMING_AUTHORITY_get0_authorityText( + const NAMING_AUTHORITY *n); +void NAMING_AUTHORITY_set0_authorityId(NAMING_AUTHORITY *n, + ASN1_OBJECT* namingAuthorityId); +void NAMING_AUTHORITY_set0_authorityURL(NAMING_AUTHORITY *n, + ASN1_IA5STRING* namingAuthorityUrl); +void NAMING_AUTHORITY_set0_authorityText(NAMING_AUTHORITY *n, + ASN1_STRING* namingAuthorityText); + +const GENERAL_NAME *ADMISSION_SYNTAX_get0_admissionAuthority( + const ADMISSION_SYNTAX *as); +void ADMISSION_SYNTAX_set0_admissionAuthority( + ADMISSION_SYNTAX *as, GENERAL_NAME *aa); +const STACK_OF(ADMISSIONS) *ADMISSION_SYNTAX_get0_contentsOfAdmissions( + const ADMISSION_SYNTAX *as); +void ADMISSION_SYNTAX_set0_contentsOfAdmissions( + ADMISSION_SYNTAX *as, STACK_OF(ADMISSIONS) *a); +const GENERAL_NAME *ADMISSIONS_get0_admissionAuthority(const ADMISSIONS *a); +void ADMISSIONS_set0_admissionAuthority(ADMISSIONS *a, GENERAL_NAME *aa); +const NAMING_AUTHORITY *ADMISSIONS_get0_namingAuthority(const ADMISSIONS *a); +void ADMISSIONS_set0_namingAuthority(ADMISSIONS *a, NAMING_AUTHORITY *na); +const PROFESSION_INFOS *ADMISSIONS_get0_professionInfos(const ADMISSIONS *a); +void ADMISSIONS_set0_professionInfos(ADMISSIONS *a, PROFESSION_INFOS *pi); +const ASN1_OCTET_STRING *PROFESSION_INFO_get0_addProfessionInfo( + const PROFESSION_INFO *pi); +void PROFESSION_INFO_set0_addProfessionInfo( + PROFESSION_INFO *pi, ASN1_OCTET_STRING *aos); +const NAMING_AUTHORITY *PROFESSION_INFO_get0_namingAuthority( + const PROFESSION_INFO *pi); +void PROFESSION_INFO_set0_namingAuthority( + PROFESSION_INFO *pi, NAMING_AUTHORITY *na); +const STACK_OF(ASN1_STRING) *PROFESSION_INFO_get0_professionItems( + const PROFESSION_INFO *pi); +void PROFESSION_INFO_set0_professionItems( + PROFESSION_INFO *pi, STACK_OF(ASN1_STRING) *as); +const STACK_OF(ASN1_OBJECT) *PROFESSION_INFO_get0_professionOIDs( + const PROFESSION_INFO *pi); +void PROFESSION_INFO_set0_professionOIDs( + PROFESSION_INFO *pi, STACK_OF(ASN1_OBJECT) *po); +const ASN1_PRINTABLESTRING *PROFESSION_INFO_get0_registrationNumber( + const PROFESSION_INFO *pi); +void PROFESSION_INFO_set0_registrationNumber( + PROFESSION_INFO *pi, ASN1_PRINTABLESTRING *rn); + +# ifdef __cplusplus +} +# endif +#endif diff --git a/src/Mayaqua/win32_inc/openssl/x509v3err.h b/src/Mayaqua/win32_inc/openssl/x509v3err.h new file mode 100644 index 00000000..5f25442f --- /dev/null +++ b/src/Mayaqua/win32_inc/openssl/x509v3err.h @@ -0,0 +1,162 @@ +/* + * Generated by util/mkerr.pl DO NOT EDIT + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_X509V3ERR_H +# define HEADER_X509V3ERR_H + +# ifndef HEADER_SYMHACKS_H +# include +# endif + +# ifdef __cplusplus +extern "C" +# endif +int ERR_load_X509V3_strings(void); + +/* + * X509V3 function codes. + */ +# define X509V3_F_A2I_GENERAL_NAME 164 +# define X509V3_F_ADDR_VALIDATE_PATH_INTERNAL 166 +# define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 161 +# define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 162 +# define X509V3_F_BIGNUM_TO_STRING 167 +# define X509V3_F_COPY_EMAIL 122 +# define X509V3_F_COPY_ISSUER 123 +# define X509V3_F_DO_DIRNAME 144 +# define X509V3_F_DO_EXT_I2D 135 +# define X509V3_F_DO_EXT_NCONF 151 +# define X509V3_F_GNAMES_FROM_SECTNAME 156 +# define X509V3_F_I2S_ASN1_ENUMERATED 121 +# define X509V3_F_I2S_ASN1_IA5STRING 149 +# define X509V3_F_I2S_ASN1_INTEGER 120 +# define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 +# define X509V3_F_LEVEL_ADD_NODE 168 +# define X509V3_F_NOTICE_SECTION 132 +# define X509V3_F_NREF_NOS 133 +# define X509V3_F_POLICY_CACHE_CREATE 169 +# define X509V3_F_POLICY_CACHE_NEW 170 +# define X509V3_F_POLICY_DATA_NEW 171 +# define X509V3_F_POLICY_SECTION 131 +# define X509V3_F_PROCESS_PCI_VALUE 150 +# define X509V3_F_R2I_CERTPOL 130 +# define X509V3_F_R2I_PCI 155 +# define X509V3_F_S2I_ASN1_IA5STRING 100 +# define X509V3_F_S2I_ASN1_INTEGER 108 +# define X509V3_F_S2I_ASN1_OCTET_STRING 112 +# define X509V3_F_S2I_SKEY_ID 115 +# define X509V3_F_SET_DIST_POINT_NAME 158 +# define X509V3_F_SXNET_ADD_ID_ASC 125 +# define X509V3_F_SXNET_ADD_ID_INTEGER 126 +# define X509V3_F_SXNET_ADD_ID_ULONG 127 +# define X509V3_F_SXNET_GET_ID_ASC 128 +# define X509V3_F_SXNET_GET_ID_ULONG 129 +# define X509V3_F_TREE_INIT 172 +# define X509V3_F_V2I_ASIDENTIFIERS 163 +# define X509V3_F_V2I_ASN1_BIT_STRING 101 +# define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 +# define X509V3_F_V2I_AUTHORITY_KEYID 119 +# define X509V3_F_V2I_BASIC_CONSTRAINTS 102 +# define X509V3_F_V2I_CRLD 134 +# define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 +# define X509V3_F_V2I_GENERAL_NAMES 118 +# define X509V3_F_V2I_GENERAL_NAME_EX 117 +# define X509V3_F_V2I_IDP 157 +# define X509V3_F_V2I_IPADDRBLOCKS 159 +# define X509V3_F_V2I_ISSUER_ALT 153 +# define X509V3_F_V2I_NAME_CONSTRAINTS 147 +# define X509V3_F_V2I_POLICY_CONSTRAINTS 146 +# define X509V3_F_V2I_POLICY_MAPPINGS 145 +# define X509V3_F_V2I_SUBJECT_ALT 154 +# define X509V3_F_V2I_TLS_FEATURE 165 +# define X509V3_F_V3_GENERIC_EXTENSION 116 +# define X509V3_F_X509V3_ADD1_I2D 140 +# define X509V3_F_X509V3_ADD_VALUE 105 +# define X509V3_F_X509V3_EXT_ADD 104 +# define X509V3_F_X509V3_EXT_ADD_ALIAS 106 +# define X509V3_F_X509V3_EXT_I2D 136 +# define X509V3_F_X509V3_EXT_NCONF 152 +# define X509V3_F_X509V3_GET_SECTION 142 +# define X509V3_F_X509V3_GET_STRING 143 +# define X509V3_F_X509V3_GET_VALUE_BOOL 110 +# define X509V3_F_X509V3_PARSE_LIST 109 +# define X509V3_F_X509_PURPOSE_ADD 137 +# define X509V3_F_X509_PURPOSE_SET 141 + +/* + * X509V3 reason codes. + */ +# define X509V3_R_BAD_IP_ADDRESS 118 +# define X509V3_R_BAD_OBJECT 119 +# define X509V3_R_BN_DEC2BN_ERROR 100 +# define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 +# define X509V3_R_DIRNAME_ERROR 149 +# define X509V3_R_DISTPOINT_ALREADY_SET 160 +# define X509V3_R_DUPLICATE_ZONE_ID 133 +# define X509V3_R_ERROR_CONVERTING_ZONE 131 +# define X509V3_R_ERROR_CREATING_EXTENSION 144 +# define X509V3_R_ERROR_IN_EXTENSION 128 +# define X509V3_R_EXPECTED_A_SECTION_NAME 137 +# define X509V3_R_EXTENSION_EXISTS 145 +# define X509V3_R_EXTENSION_NAME_ERROR 115 +# define X509V3_R_EXTENSION_NOT_FOUND 102 +# define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 +# define X509V3_R_EXTENSION_VALUE_ERROR 116 +# define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 +# define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 +# define X509V3_R_INVALID_ASNUMBER 162 +# define X509V3_R_INVALID_ASRANGE 163 +# define X509V3_R_INVALID_BOOLEAN_STRING 104 +# define X509V3_R_INVALID_EXTENSION_STRING 105 +# define X509V3_R_INVALID_INHERITANCE 165 +# define X509V3_R_INVALID_IPADDRESS 166 +# define X509V3_R_INVALID_MULTIPLE_RDNS 161 +# define X509V3_R_INVALID_NAME 106 +# define X509V3_R_INVALID_NULL_ARGUMENT 107 +# define X509V3_R_INVALID_NULL_NAME 108 +# define X509V3_R_INVALID_NULL_VALUE 109 +# define X509V3_R_INVALID_NUMBER 140 +# define X509V3_R_INVALID_NUMBERS 141 +# define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 +# define X509V3_R_INVALID_OPTION 138 +# define X509V3_R_INVALID_POLICY_IDENTIFIER 134 +# define X509V3_R_INVALID_PROXY_POLICY_SETTING 153 +# define X509V3_R_INVALID_PURPOSE 146 +# define X509V3_R_INVALID_SAFI 164 +# define X509V3_R_INVALID_SECTION 135 +# define X509V3_R_INVALID_SYNTAX 143 +# define X509V3_R_ISSUER_DECODE_ERROR 126 +# define X509V3_R_MISSING_VALUE 124 +# define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 +# define X509V3_R_NO_CONFIG_DATABASE 136 +# define X509V3_R_NO_ISSUER_CERTIFICATE 121 +# define X509V3_R_NO_ISSUER_DETAILS 127 +# define X509V3_R_NO_POLICY_IDENTIFIER 139 +# define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 154 +# define X509V3_R_NO_PUBLIC_KEY 114 +# define X509V3_R_NO_SUBJECT_DETAILS 125 +# define X509V3_R_OPERATION_NOT_DEFINED 148 +# define X509V3_R_OTHERNAME_ERROR 147 +# define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED 155 +# define X509V3_R_POLICY_PATH_LENGTH 156 +# define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED 157 +# define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 +# define X509V3_R_SECTION_NOT_FOUND 150 +# define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 +# define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 +# define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 +# define X509V3_R_UNKNOWN_EXTENSION 129 +# define X509V3_R_UNKNOWN_EXTENSION_NAME 130 +# define X509V3_R_UNKNOWN_OPTION 120 +# define X509V3_R_UNSUPPORTED_OPTION 117 +# define X509V3_R_UNSUPPORTED_TYPE 167 +# define X509V3_R_USER_TOO_LONG 132 + +#endif diff --git a/src/Mayaqua/win32_inc/zconf.h b/src/Mayaqua/win32_inc/zconf.h index e3b0c962..44d5bef9 100644 --- a/src/Mayaqua/win32_inc/zconf.h +++ b/src/Mayaqua/win32_inc/zconf.h @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -11,52 +11,158 @@ /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_z z_crc32_z # define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams # define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending # define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 # define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep # define inflateSetDictionary z_inflateSetDictionary # define inflateSync z_inflateSync # define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif # define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion -# define alloc_func z_alloc_func -# define free_func z_free_func -# define in_func z_in_func -# define out_func z_out_func +/* all zlib typedefs in zlib.h and zconf.h */ # define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong # define Bytef z_Bytef +# define alloc_func z_alloc_func # define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func # define intf z_intf +# define out_func z_out_func +# define uInt z_uInt # define uIntf z_uIntf +# define uLong z_uLong # define uLongf z_uLongf -# define voidpf z_voidpf # define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + #endif #if defined(__MSDOS__) && !defined(MSDOS) @@ -125,9 +231,25 @@ # endif #endif -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ @@ -157,7 +279,7 @@ Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes for small objects. */ @@ -171,6 +293,14 @@ # endif #endif +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have @@ -284,49 +414,121 @@ typedef uLong FAR uLongf; typedef Byte *voidp; #endif -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# ifdef VMS -# include /* for off_t */ +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short # endif -# define z_off_t off_t #endif -#ifndef SEEK_SET + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) +# define Z_HAVE_UNISTD_H +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif -#if defined(__OS400__) -# define NO_vsnprintf -#endif - -#if defined(__MVS__) -# define NO_vsnprintf -# ifdef FAR -# undef FAR +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t # endif #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */ diff --git a/src/Mayaqua/win32_inc/zlib.h b/src/Mayaqua/win32_inc/zlib.h index 7d5ee9f4..5fa98b5d 100644 --- a/src/Mayaqua/win32_inc/zlib.h +++ b/src/Mayaqua/win32_inc/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 + version 1.2.11, January 15th, 2017 - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -24,8 +24,8 @@ The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ #ifndef ZLIB_H @@ -37,41 +37,45 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.3" -#define ZLIB_VERNUM 0x1230 +#define ZLIB_VERSION "1.2.11" +#define ZLIB_VERNUM 0x12b0 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 11 +#define ZLIB_VER_SUBREVISION 0 /* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output (providing more output space) before each call. - The compressed data format used by default by the in-memory functions is + The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951. - The library also supports reading and writing files in gzip (.gz) format + The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - This library can optionally read and write gzip streams in memory as well. + This library can optionally read and write gzip and raw deflate streams in + memory as well. - The zlib format was designed to be compact and fast for use in memory + The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib. - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in the case of corrupted input. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); @@ -80,23 +84,24 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address)); struct internal_state; typedef struct z_stream_s { - Bytef *next_in; /* next input byte */ + z_const Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total nb of input bytes read so far */ + uLong total_in; /* total number of input bytes read so far */ - Bytef *next_out; /* next output byte should be put there */ + Bytef *next_out; /* next output byte will go here */ uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total nb of bytes output so far */ + uLong total_out; /* total number of bytes output so far */ - char *msg; /* last error message, NULL if no error */ + z_const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ free_func zfree; /* used to free the internal state */ voidpf opaque; /* private data object passed to zalloc and zfree */ - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ uLong reserved; /* reserved for future use */ } z_stream; @@ -126,45 +131,47 @@ typedef struct gz_header_s { typedef gz_header FAR *gz_headerp; /* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the opaque value. - zalloc must return Z_NULL if there is not enough memory for the object. + zalloc must return Z_NULL if there is not enough memory for the object. If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use by the decompressor (particularly + if the decompressor wants to decompress everything in a single step). */ /* constants */ #define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_PARTIAL_FLUSH 1 #define Z_SYNC_FLUSH 2 #define Z_FULL_FLUSH 3 #define Z_FINISH 4 #define Z_BLOCK 5 +#define Z_TREES 6 /* Allowed flush values; see deflate() and inflate() below for details */ #define Z_OK 0 @@ -176,8 +183,8 @@ typedef gz_header FAR *gz_headerp; #define Z_MEM_ERROR (-4) #define Z_BUF_ERROR (-5) #define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative - * values are errors, positive values are used for special but normal events. +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. */ #define Z_NO_COMPRESSION 0 @@ -197,7 +204,7 @@ typedef gz_header FAR *gz_headerp; #define Z_TEXT 1 #define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ #define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ +/* Possible values of the data_type field for deflate() */ #define Z_DEFLATED 8 /* The deflate compression method (the only one supported in this version) */ @@ -207,67 +214,70 @@ typedef gz_header FAR *gz_headerp; #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ + /* basic functions */ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. */ /* ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). */ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); /* deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. deflate performs one or both of the + The detailed semantics are as follows. deflate performs one or both of the following actions: - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not + accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in and avail_in are updated and processing will resume at this point for the next call of deflate(). - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. + - Generate more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. + should be set only when necessary. Some output may be provided even if + flush is zero. - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more ouput + in that case. Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to decide how much data to accumulate before producing output, in order to @@ -275,66 +285,91 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); If the parameter flush is set to Z_SYNC_FLUSH, all pending output is flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed + codes block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. If flush is set to Z_FULL_FLUSH, all output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade compression. If deflate returns with avail_out == 0, this function must be called again with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that avail_out is greater than six to avoid repeated flush markers due to avail_out == 0 on return. If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - the value returned by deflateBound (see below). If deflate does not return - Z_STREAM_END, then it must be called again as described above. + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. deflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if all input has been consumed and all output has been produced (only when flush is set to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. */ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be deallocated). */ @@ -342,134 +377,157 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - Initializes the internal stream state for decompression. The fields + Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. */ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce + buffer becomes empty or the output buffer becomes full. It may introduce some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. inflate performs one or both of the + The detailed semantics are as follows. inflate performs one or both of the following actions: - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). + - Generate more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() stop - if and when it gets to the next deflate block boundary. When decoding the - zlib or gzip format, this will cause inflate() to return immediately after - the header and before the first block. When doing a raw inflate, inflate() - will go ahead and process the first block, and will return when it gets to - the end of that block, or when it runs out of data. + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 - if inflate() is currently decoding the last block in the deflate stream, - plus 128 if inflate() returned immediately after decoding an end-of-block - code or decoding the complete header up to just before the first byte of the - deflate stream. The end-of-block will not be indicated until all of the - uncompressed data from that block has been written to strm->next_out. The - number of unused bits may in general be greater than seven, except when - bit 7 of data_type is set, in which case the number of unused bits will be - less than eight. + To assist in this, on return inflate() always sets strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster approach - may be used for the single inflate() call. + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all of the uncompressed data for the + operation to complete. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The use of Z_FINISH is not + required to perform an inflation in one step. However it may be used to + inform inflate that a faster approach can be used for the single inflate() + call. Z_FINISH also informs inflate to not maintain a sliding window if the + stream completes, which reduces inflate's memory footprint. If the stream + does not complete, either because not all of the stream is provided or not + enough output space is provided, then a sliding window will be allocated and + inflate() can be called again to continue the operation as if Z_NO_FLUSH had + been used. In this implementation, inflate() always flushes as much output as possible to the output buffer, and always uses the faster approach on the - first call. So the only effect of the flush parameter in this implementation - is on the return value of inflate(), as noted below, or when it returns early - because Z_BLOCK is used. + first call. So the effects of the flush parameter in this implementation are + on the return value of inflate() as noted below, when inflate() returns early + when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of + memory for a sliding window when Z_FINISH is used. If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the adler32 checksum of the dictionary + below), inflate sets strm->adler to the Adler-32 checksum of the dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the adler32 checksum of all output produced so far (that is, + strm->adler to the Adler-32 checksum of all output produced so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 + below. At the end of the stream, inflate() checks that its computed Adler-32 checksum is equal to that saved by the compressor and returns Z_STREAM_END only if the checksum is correct. - inflate() will decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically. Any information - contained in the gzip header is not retained, so applications that need that - information should instead use raw inflate, see inflateInit2() below, or - inflateBack() and perform their own processing of the gzip header and - trailer. + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained unless inflateGetHeader() is used. When processing + gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_NEED_DICT if a preset dictionary is needed at this point, Z_DATA_ERROR if the input data was corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may then - call inflateSync() to look for a good compression block if a partial recovery - of the data is desired. + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is to be attempted. */ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. */ + /* Advanced functions */ /* @@ -484,55 +542,70 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int memLevel, int strategy)); - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by the + caller. - The method parameter is the compression method. It must be Z_DEFLATED in + The method parameter is the compression method. It must be Z_DEFLATED in this version of the library. The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if deflateInit is used instead. - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). - windowBits can also be greater than 15 for optional gzip encoding. Add + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute a check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. - The strategy parameter is used to tune the compression algorithm. Use the + The strategy parameter is used to tune the compression algorithm. Use the value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between - Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as - Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy - parameter only affects the compression ratio but not the correctness of the - compressed output even if it is not set appropriately. Z_FIXED prevents the - use of dynamic Huffman codes, allowing for a simpler decoder for special - applications. + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). */ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, @@ -540,38 +613,65 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, uInt dictLength)); /* Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same - dictionary (see inflateSetDictionary). + without producing any compressed output. When using the zlib format, this + function must be called immediately after deflateInit, deflateInit2 or + deflateReset, and before any call of deflate. When doing raw deflate, this + function must be called either before any call of deflate, or immediately + after the completion of a deflate block, i.e. after all input has been + consumed and all output has been delivered when using any of the flush + options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The + compressor and decompressor must use exactly the same dictionary (see + inflateSetDictionary). The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a + used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. Depending on the size of the compression data structures selected by deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. In addition, the - current implementation of deflate will use at most the window size minus - 262 bytes of the provided dictionary. + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. - Upon return of this function, strm->adler is set to the adler32 value + Upon return of this function, strm->adler is set to the Adler-32 value of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value + which dictionary has been used by the compressor. (The Adler-32 value applies to the whole dictionary even if only a subset of the dictionary is actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. + Adler-32 value is not computed and strm->adler is not set. deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not - perform any compression: this will be done by deflate(). + or if not at a block boundary for raw deflate). deflateSetDictionary does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. */ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, @@ -581,26 +681,26 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, This function can be useful when several compression strategies will be tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed + data with a filter. The streams that will be discarded should then be freed by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); /* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). */ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, @@ -608,20 +708,36 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, int strategy)); /* Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be + interpretation of level and strategy is as in deflateInit2(). This can be used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). + to switch to a different kind of input data requiring a different strategy. + If the compression approach (which is a function of the level) or the + strategy is changed, and if any input has been consumed in a previous + deflate() call, then the input available so far is compressed with the old + level and strategy using deflate(strm, Z_BLOCK). There are three approaches + for the compression levels 0, 1..3, and 4..9 respectively. The new level + and strategy will take effect at the next call of deflate(). - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. */ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, @@ -645,31 +761,53 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, uLong sourceLen)); /* deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() - or deflateInit2(). This would be used to allocate an output buffer - for deflation in a single pass, and so would be called before deflate(). + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). If that first deflate() call is provided the + sourceLen input bytes, an output buffer allocated to the size returned by + deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed + to return Z_STREAM_END. Note that it is possible for the compressed size to + be larger than the value returned by deflateBound() if flush options other + than Z_FINISH or Z_NO_FLUSH are used. */ +ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, + unsigned *pending, + int *bits)); +/* + deflatePending() returns the number of bytes and bits of output that have + been generated, but not yet provided in the available output. The bytes not + provided would be due to the available output space having being consumed. + The number of bits of output not provided are between 0 and 7, where they + await more bits to join them in order to fill out a full byte. If pending + or bits are Z_NULL, then those values are not set. + + deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. + */ + ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, int bits, int value)); /* deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the - bits leftover from a previous deflate stream when appending to it. As such, - this function can only be used for raw deflate, and must be used before the - first deflate() call after a deflateInit2() or deflateReset(). bits must be - less than or equal to 16, and that many of the least significant bits of - value will be inserted in the output. + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. - deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. + deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough + room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the + source stream state was inconsistent. */ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gz_headerp head)); /* - deflateSetHeader() provides gzip header information for when a gzip + deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called after deflateInit2() or deflateReset() and before the first call of deflate(). The text, time, os, extra field, name, and comment information @@ -682,11 +820,11 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, 1.3.x) do not support header crc's, and will report that it is a "multi-part gzip file" and give up. - If deflateSetHeader is not used, the default gzip header has text false, + If deflateSetHeader is not used, the default gzip header has text false, the time set to zero, and os set to 255, with no extra, name, or comment fields. The gzip header is returned to the default state by deflateReset(). - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ @@ -694,43 +832,53 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits)); - This is another version of inflateInit with an extra parameter. The + This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by the caller. The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window + deflateInit2() was not used. If a compressed stream with a larger window size is given as input, inflate() will return with the error code Z_DATA_ERROR instead of trying to allocate a larger window. - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This + looking for any check values for comparison at the end of the stream. This is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom + such as zip. Those formats provide their own check values. If a custom format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to + recommended that a check value such as an Adler-32 or a CRC-32 be applied to the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments + most applications, the zlib format should be used as is. Note that comments above on the use in deflateInit2() applies to the magnitude of windowBits. - windowBits can also be greater than 15 for optional gzip decoding. Add + windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will not automatically decode concatenated gzip streams. + inflate() will return Z_STREAM_END at the end of the gzip stream. The state + would need to be reset to continue decoding a subsequent gzip stream. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. */ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, @@ -738,36 +886,56 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, uInt dictLength)); /* Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler-32 value returned by that call of inflate. The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called - immediately after inflateInit2() or inflateReset() and before any call of - inflate() to set the dictionary. The application must insure that the - dictionary that was used for compression is provided. + deflateSetDictionary). For raw inflate, this function can be called at any + time to set the dictionary. If the provided dictionary is smaller than the + window and there is already data in the window, then the provided dictionary + will amend what's there. The application must insure that the dictionary + that was used for compression is provided. inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not + expected one (incorrect Adler-32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ +ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); /* - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. + Skips invalid compressed data until a possible full flush point (see above + for the description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. + inflateSync searches for a 00 00 FF FF pattern in the compressed data. + All full flush points have this pattern, but not all occurrences of this + pattern are full flush points. + + inflateSync returns Z_OK if a possible full flush point has been found, + Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point + has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. + In the success case, the application may save the current current value of + total_in which indicates where valid compressed data was found. In the + error case, the application may repeatedly call inflateSync, providing more + input each time, until success or end of the input data. */ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, @@ -782,18 +950,32 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. + but does not free and reallocate the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. */ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, @@ -801,54 +983,87 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, int value)); /* This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above, or -65536 if the provided + source stream state was inconsistent. +*/ + ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, gz_headerp head)); /* - inflateGetHeader() requests that gzip header information be stored in the + inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after inflateInit2() or inflateReset(), and before the first call of inflate(). As inflate() processes the gzip stream, head->done is zero until the header is completed, at which time head->done is set to one. If a zlib stream is being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK can be used to - force inflate() to return immediately after header processing is complete - and before any actual data is decompressed. + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. - The text, time, xflags, and os fields are filled in with the gzip header + The text, time, xflags, and os fields are filled in with the gzip header contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max + was valid if done is set to one.) If extra is not Z_NULL, then extra_max contains the maximum number of bytes to write to extra. Once done is true, extra_len contains the actual extra field length, and extra contains the extra field, or that field truncated if extra_max is less than extra_len. If name is not Z_NULL, then up to name_max characters are written there, terminated with a zero unless the length is greater than name_max. If comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When - any of extra, name, or comment are not Z_NULL and the respective field is - not present in the header, then that field is set to Z_NULL to signal its + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its absence. This allows the use of deflateSetHeader() with the returned structure to duplicate the header. However if those fields are set to allocated memory, then the application will need to save those pointers elsewhere so that they can be eventually freed. - If inflateGetHeader is not used, then the header information is simply + If inflateGetHeader is not used, then the header information is simply discarded. The header is always checked for validity, including the header CRC if present. inflateReset() will reset the process to discard the header information. The application would need to call inflateGetHeader() again to retrieve the header from the next gzip stream. - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ @@ -869,12 +1084,13 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, See inflateBack() for the usage of these routines. inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not - be allocated, or Z_VERSION_ERROR if the version of the library does not - match the version of the header file. + the parameters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +typedef unsigned (*in_func) OF((void FAR *, + z_const unsigned char FAR * FAR *)); typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, @@ -882,25 +1098,26 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, out_func out, void FAR *out_desc)); /* inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is more efficient than inflate() for - file i/o applications in that it avoids copying between the output and the - sliding window by simply making the window itself the output buffer. This - function trusts the application to not change the output buffer passed by - the output function, at least until inflateBack() returns. + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. inflateBackInit() must be called first to allocate the internal state and to initialize the state with the user-provided window buffer. inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free - the allocated state. + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. A raw deflate stream is one with no zlib or gzip header or trailer. This routine would normally be used in a utility that reads zip or gzip files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects - only the raw deflate stream to decompress. This is different from the - normal behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. inflateBack() uses two subroutines supplied by the caller that are then called by inflateBack() for input and output. inflateBack() calls those @@ -909,12 +1126,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, parameters and return types are defined above in the in_func and out_func typedefs. inflateBack() will call in(in_desc, &buf) which should return the number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to inflateBackInit(), which is also the buffer that out() uses to write from. The length written by out() will be at most the window size. Any non-zero amount of input may be provided by in(). @@ -925,7 +1142,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. The in_desc and out_desc parameters of inflateBack() is passed as the first parameter of in() and out() respectively when they are called. These @@ -935,15 +1152,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, On return, inflateBack() will set strm->next_in and strm->avail_in to pass back any unused input that was provided by the last in() call. The return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format - error in the deflate stream (in which case strm->msg is set to indicate the - nature of the error), or Z_STREAM_ERROR if the stream was not properly - initialized. In the case of Z_BUF_ERROR, an input or output error can be - distinguished using strm->next_in which will be Z_NULL only if in() returned - an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to - out() returning non-zero. (in() will always be called before out(), so - strm->next_in is assured to be defined if out() returns non-zero.) Note - that inflateBack() cannot return Z_OK. + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. */ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); @@ -964,7 +1181,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); 7.6: size of z_off_t Compiler, assembler, and debug options: - 8: DEBUG + 8: ZLIB_DEBUG 9: ASMV or ASMINF -- use ASM code 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention 11: 0 (reserved) @@ -995,27 +1212,28 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); 27-31: 0 (reserved) */ +#ifndef Z_SOLO /* utility functions */ /* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. */ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least the value returned - by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. + compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer. @@ -1025,12 +1243,12 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)); /* - Compresses the source buffer into the destination buffer. The level + Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the + length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, @@ -1040,159 +1258,306 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); /* compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before - a compress() or compress2() call to allocate the destination buffer. + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. */ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed data. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In + the case where there is not enough room, uncompress() will fill the output + buffer with the uncompressed data up to that point. */ - -typedef voidp gzFile; - -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen)); /* - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h", or 'R' for run-length encoding - as in "wb1R". (See the description of deflateInit2 for more information - about the strategy parameter.) + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Opens a gzip (.gz) file for reading or writing. The mode parameter is as + in fopen ("rb" or "wb") but can also include a compression level ("wb9") or + a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only + compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' + for fixed code compression as in "wb9F". (See the description of + deflateInit2 for more information about the strategy parameter.) 'T' will + request transparent writing or appending with no compression and not using + the gzip format. + + "a" can be used instead of "w" to request that the gzip stream that will + be written be appended to the file. "+" will result in an error, since + reading and writing to the same gzip file is not supported. The addition of + "x" when writing will create the file exclusively, which fails if the file + already exists. On systems that support it, the addition of "e" when + reading or writing will set the flag to close the file on an execve() call. + + These functions, as well as gzip, will read and decode a sequence of gzip + streams in a file. The append function of gzopen() can be used to create + such a file. (Also see gzflush() for another way to do this.) When + appending, gzopen does not test whether the file begins with a gzip stream, + nor does it look for the end of the gzip streams to begin appending. gzopen + will simply append a gzip stream to the existing file. gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. + case gzread will directly read from the file without decompression. When + reading, this will be detected automatically by looking for the magic two- + byte gzip header. - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). */ + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); /* - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. + gzdopen associates a gzFile with the file descriptor fd. File descriptors + are obtained from calls like open, dup, creat, pipe or fileno (if the file + has been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. If you are using fileno() to get the + file descriptor from a FILE *, then you will have to use dup() to avoid + double-close()ing the file descriptor. Both gzclose() and fclose() will + close the associated file descriptor, so they need to have different file + descriptors. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +/* + Set the internal buffer size used by this library's functions. The + default buffer size is 8192 bytes. This function must be called after + gzopen() or gzdopen(), and before any other calls that read or write the + file. The buffer memory allocation is always deferred to the first read or + write. Three times that size in buffer space is allocated. A larger buffer + size of, for example, 64K or 128K bytes will noticeably increase the speed + of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. */ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); /* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. Previously provided + data is flushed before the parameter change. + + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. */ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); /* - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). */ + Reads the given number of uncompressed bytes from the compressed file. If + the input file is not in gzip format, gzread copies the given number of + bytes into the buffer directly from the file. -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream. Any number of gzip streams may be + concatenated in the input file, and will all be decompressed by gzread(). + If something other than a gzip stream is encountered after a gzip stream, + that remaining trailing garbage is ignored (and no error is returned). + + gzread can be used to read a gzip file that is being concurrently written. + Upon reaching the end of the input, gzread will return with the available + data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then + gzclearerr can be used to clear the end of file indicator in order to permit + gzread to be tried again. Z_OK indicates that a gzip stream was completed + on the last gzread. Z_BUF_ERROR indicates that the input file ended in the + middle of a gzip stream. Note that gzread does not return -1 in the event + of an incomplete gzip stream. This error is deferred until gzclose(), which + will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip + stream. Alternatively, gzerror can be used before gzclose to detect this + case. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ + +ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, + gzFile file)); +/* + Read up to nitems items of size size from file to buf, otherwise operating + as gzread() does. This duplicates the interface of stdio's fread(), with + size_t request and return types. If the library defines size_t, then + z_size_t is identical to size_t. If not, then z_size_t is an unsigned + integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevetheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, reseting and retrying on end-of-file, when size is not 1. +*/ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); /* Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). + gzwrite returns the number of uncompressed bytes written or 0 in case of + error. */ -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, + z_size_t nitems, gzFile file)); /* - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). The number of - uncompressed bytes written is limited to 4095. The caller should assure that - this limit is not exceeded. If it is exceeded, then gzprintf() will return - return an error (0) with nothing written. In this case, there may also be a + gzfwrite() writes nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + +ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the arguments to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a buffer overflow with unpredictable consequences, which is possible only if zlib was compiled with the insecure functions sprintf() or vsprintf() because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). */ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); /* - Writes the given null-terminated string to the compressed file, excluding + Writes the given null-terminated string to the compressed file, excluding the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. + + gzputs returns the number of characters written, or -1 in case of error. */ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); /* - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - gzgets returns buf, or Z_NULL in case of error. + Reads bytes from the compressed file until len-1 characters are read, or a + newline character is read and transferred to buf, or an end-of-file + condition is encountered. If any characters are read or if len == 1, the + string is terminated with a null character. If no characters are read due + to an end-of-file or len < 1, then the buffer is left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. */ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); /* - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. + Writes c, converted to an unsigned char, into the compressed file. gzputc + returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); /* - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. + Reads one byte from the compressed file. gzgetc returns this byte or -1 + in case of end of file or error. This is implemented as a macro for speed. + As such, it does not do all of the checking the other functions do. I.e. + it does not check to see if file is NULL, nor whether the structure file + points to has been clobbered or not. */ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); /* - Push one character back onto the stream to be read again later. - Only one character of push-back is allowed. gzungetc() returns the - character pushed, or -1 on failure. gzungetc() will fail if a - character has been pushed but not read yet, or if c is -1. The pushed - character will be discarded if the stream is repositioned with gzseek() - or gzrewind(). + Push one character back onto the stream to be read as the first character + on the next read. At least one character of push-back is allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). */ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); /* - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. + Flushes all pending output into the compressed file. The parameter flush + is as in the deflate() function. The return value is the zlib error number + (see function gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatenated gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. */ -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); /* - Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are + extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position. - gzseek returns the resulting offset location as measured in bytes from + gzseek returns the resulting offset location as measured in bytes from the beginning of the uncompressed stream, or -1 in case of error, in particular if the file is opened for writing and the new starting position would be before the current position. @@ -1202,68 +1567,134 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); /* Rewinds the given file. This function is supported only for reading. - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) */ -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); /* - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) + Returns the starting position for the next gzread or gzwrite on the given + compressed file. This position represents a number of bytes in the + uncompressed data stream, and is zero when starting, even if appending or + reading a gzip stream from the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); + + Returns the current offset in the file being read or written. This offset + includes the count of bytes that precede the gzip stream, for example when + appending or when using gzdopen() for reading. When reading, the offset + does not include as yet unused buffered input. This information can be used + for a progress indicator. On error, gzoffset() returns -1. */ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); /* - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. + Returns true (1) if the end-of-file indicator has been set while reading, + false (0) otherwise. Note that the end-of-file indicator is set only if the + read tried to go past the end of the input, but came up short. Therefore, + just like feof(), gzeof() may return false even if there is no more data to + read, in the event that the last read request was for the exact number of + bytes remaining in the input file. This will happen if the input file size + is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. */ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); /* - Returns 1 if file is being read directly without decompression, otherwise - zero. + Returns true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). + + When writing, gzdirect() returns true (1) if transparent writing was + requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: + gzdirect() is not needed when writing. Transparent writing must be + explicitly requested, so the application already knows the answer. When + linking statically, using gzdirect() will include all of the zlib code for + gzip file reading and decompression, which may not be desired.) */ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); /* - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). + Flushes all pending output if necessary, closes the compressed file and + deallocates the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the + last read ended in the middle of a gzip stream, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. */ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); /* - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. + Returns the error message for the last error which occurred on the given + compressed file. errnum is set to zlib error number. If an error occurred + in the file system and not in the compression library, errnum is set to + Z_ERRNO and the application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. */ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); /* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip file that is being written concurrently. */ +#endif /* !Z_SOLO */ + /* checksum functions */ /* These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. + anyway because they might be useful in applications using the compression + library. */ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: + return the updated checksum. If buf is Z_NULL, this function returns the + required initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed + much faster. + + Usage example: uLong adler = adler32(0L, Z_NULL, 0); @@ -1273,21 +1704,31 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ +ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as adler32(), but with a size_t length. +*/ + +/* ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, z_off_t len2)); -/* + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note + that the z_off_t type (like off_t) is a signed integer. If len2 is + negative, the result has no meaning or utility. */ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is NULL, this function returns the required initial - value for the for the crc. Pre- and post-conditioning (one's complement) is + updated CRC-32. If buf is Z_NULL, this function returns the required + initial value for the crc. Pre- and post-conditioning (one's complement) is performed within this function so it shouldn't be done by the application. + Usage example: uLong crc = crc32(0L, Z_NULL, 0); @@ -1298,9 +1739,15 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as crc32(), but with a size_t length. +*/ /* +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 @@ -1328,27 +1775,135 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, unsigned char FAR *window, const char *version, int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, sizeof(z_stream)) - - -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) #endif +#ifndef Z_SOLO + +/* gzgetc() macro and its supporting function and exposed data structure. Note + * that the real internal state is much larger than the exposed structure. + * This abbreviated structure exposes just enough for the gzgetc() macro. The + * user should not mess with these exposed elements, since their names or + * behavior could change in the future, perhaps even capriciously. They can + * only be used by the gzgetc() macro. You have been warned. + */ +struct gzFile_s { + unsigned have; + unsigned char *next; + z_off64_t pos; +}; +ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +# define z_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#else +# define gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#endif + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#ifdef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); +#endif + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) +# ifdef Z_PREFIX_SET +# define z_gzopen z_gzopen64 +# define z_gzseek z_gzseek64 +# define z_gztell z_gztell64 +# define z_gzoffset z_gzoffset64 +# define z_adler32_combine z_adler32_combine64 +# define z_crc32_combine z_crc32_combine64 +# else +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# endif +# ifndef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +#endif + +#else /* Z_SOLO */ + + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + +#endif /* !Z_SOLO */ + +/* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); -ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); +ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); +ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); +ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) +ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, + const char *mode)); +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, + const char *format, + va_list va)); +# endif +#endif #ifdef __cplusplus } diff --git a/src/Neo/NDIS5.c b/src/Neo/NDIS5.c index 06477ef2..4e99a6dc 100644 --- a/src/Neo/NDIS5.c +++ b/src/Neo/NDIS5.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NDIS5.c diff --git a/src/Neo/NDIS5.h b/src/Neo/NDIS5.h index c83d15fa..2d2dfe6d 100644 --- a/src/Neo/NDIS5.h +++ b/src/Neo/NDIS5.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NDIS5.h diff --git a/src/Neo/Neo.c b/src/Neo/Neo.c index ffd49461..0621bb66 100644 --- a/src/Neo/Neo.c +++ b/src/Neo/Neo.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Neo.c diff --git a/src/Neo/Neo.h b/src/Neo/Neo.h index 8c4ad9e5..1195d9ac 100644 --- a/src/Neo/Neo.h +++ b/src/Neo/Neo.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Neo.h diff --git a/src/Neo/Neo.rc b/src/Neo/Neo.rc index 2e72f111..c0238161 100644 --- a/src/Neo/Neo.rc +++ b/src/Neo/Neo.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/Neo/resource.h b/src/Neo/resource.h index e42cd7d0..60389936 100644 --- a/src/Neo/resource.h +++ b/src/Neo/resource.h @@ -1,101 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Neo.rc -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Next default values for new objects diff --git a/src/Neo6/NDIS6.c b/src/Neo6/NDIS6.c index fc4f9cfd..9532f9fe 100644 --- a/src/Neo6/NDIS6.c +++ b/src/Neo6/NDIS6.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NDIS6.c diff --git a/src/Neo6/NDIS6.h b/src/Neo6/NDIS6.h index 1fb5b517..2c33bb5f 100644 --- a/src/Neo6/NDIS6.h +++ b/src/Neo6/NDIS6.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // NDIS6.h diff --git a/src/Neo6/Neo6.c b/src/Neo6/Neo6.c index 1f2f9840..57e188b2 100644 --- a/src/Neo6/Neo6.c +++ b/src/Neo6/Neo6.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Neo6.c diff --git a/src/Neo6/Neo6.h b/src/Neo6/Neo6.h index 860b59e7..eb9f075f 100644 --- a/src/Neo6/Neo6.h +++ b/src/Neo6/Neo6.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Kernel Device Driver -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Neo6.h diff --git a/src/Neo6/Neo6.rc b/src/Neo6/Neo6.rc index 2e72f111..c0238161 100644 --- a/src/Neo6/Neo6.rc +++ b/src/Neo6/Neo6.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/Neo6/resource.h b/src/Neo6/resource.h index e42cd7d0..f6fe60e7 100644 --- a/src/Neo6/resource.h +++ b/src/Neo6/resource.h @@ -1,101 +1,7 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Neo.rc -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. + // Next default values for new objects diff --git a/src/PenCore/CMakeLists.txt b/src/PenCore/CMakeLists.txt new file mode 100644 index 00000000..5cb3175c --- /dev/null +++ b/src/PenCore/CMakeLists.txt @@ -0,0 +1,15 @@ +if(NOT WIN32) + message(FATAL_ERROR "PenCore is needed only on Windows.") +endif() + +add_library(PenCore SHARED pencore.c pencore.rc) + +set_target_properties(PenCore + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore" + LIBRARY_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore" + RUNTIME_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/src/bin/hamcore" + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" +) + +target_link_libraries(PenCore cedar mayaqua) diff --git a/src/PenCore/PenCore.rc b/src/PenCore/PenCore.rc index 4d1912f7..392a1ed8 100644 --- a/src/PenCore/PenCore.rc +++ b/src/PenCore/PenCore.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END @@ -175,6 +175,14 @@ BEGIN BOTTOMMARGIN, 126 END + D_CM_PROXY_HTTP_HEADER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 248 + TOPMARGIN, 5 + BOTTOMMARGIN, 126 + END + D_CM_DETAIL, DIALOG BEGIN LEFTMARGIN, 7 @@ -1497,7 +1505,7 @@ BEGIN EDITTEXT S_DESCRIPTION,7,191,289,45,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL END -D_CM_ACCOUNT DIALOGEX 0, 0, 451, 323 +D_CM_ACCOUNT DIALOGEX 0, 0, 451, 333 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "@D_CM_ACCOUNT" FONT 9, "MS Shell Dlg", 400, 0, 0x80 @@ -1517,7 +1525,7 @@ BEGIN LTEXT "@STATIC6",S_STATIC66,172,136,46,10,NOT WS_VISIBLE RTEXT "@STATIC7",S_STATIC7,14,117,54,9 COMBOBOX C_HUBNAME,72,113,126,62,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "@STATIC8",IDC_STATIC,7,137,206,93 + GROUPBOX "@STATIC8",IDC_STATIC,7,137,206,103 ICON ICO_TOWER,IDC_STATIC,14,149,20,18 LTEXT "@STATIC9",IDC_STATIC,40,149,163,17 PUSHBUTTON "@B_IE",B_IE,74,158,114,15 @@ -1525,15 +1533,16 @@ BEGIN CONTROL "@R_DIRECT_TCP",R_DIRECT_TCP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,72,173,135,10 CONTROL "@R_HTTPS",R_HTTPS,"Button",BS_AUTORADIOBUTTON,72,184,135,10 CONTROL "@R_SOCKS",R_SOCKS,"Button",BS_AUTORADIOBUTTON,72,194,135,10 - PUSHBUTTON "@B_PROXY_CONFIG",B_PROXY_CONFIG,74,208,114,15 - GROUPBOX "@STATIC11",S_STATIC11,7,235,206,69 - ICON ICO_CERT,IDC_STATIC,14,245,20,18 - CONTROL "@R_CHECK_CERT",R_CHECK_CERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,41,249,133,9 - PUSHBUTTON "@B_TRUST",B_TRUST,41,263,157,15 - PUSHBUTTON "@B_SERVER_CERT",B_SERVER_CERT,41,281,77,15 - PUSHBUTTON "@B_VIEW_SERVER_CERT",B_VIEW_SERVER_CERT,123,281,75,15 - CONTROL "@R_HIDE",R_HIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,308,148,9 - CONTROL "@R_HIDE2",R_HIDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,308,132,9 + CONTROL "@R_SOCKS5",R_SOCKS5,"Button",BS_AUTORADIOBUTTON,72,204,135,10 + PUSHBUTTON "@B_PROXY_CONFIG",B_PROXY_CONFIG,74,218,114,15 + GROUPBOX "@STATIC11",S_STATIC11,7,245,206,69 + ICON ICO_CERT,IDC_STATIC,14,255,20,18 + CONTROL "@R_CHECK_CERT",R_CHECK_CERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,41,259,133,9 + PUSHBUTTON "@B_TRUST",B_TRUST,41,273,157,15 + PUSHBUTTON "@B_SERVER_CERT",B_SERVER_CERT,41,291,77,15 + PUSHBUTTON "@B_VIEW_SERVER_CERT",B_VIEW_SERVER_CERT,123,291,75,15 + CONTROL "@R_HIDE",R_HIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,318,148,9 + CONTROL "@R_HIDE2",R_HIDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,318,132,9 CONTROL "",L_VLAN,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,233,17,200,66 GROUPBOX "@S_VLAN_GROUP",S_VLAN_GROUP,224,5,220,88 LTEXT "@S_POLICY_1",S_POLICY_1,258,17,163,24,NOT WS_VISIBLE @@ -1565,8 +1574,8 @@ BEGIN LTEXT "@S_RETRY_SPAN_2",S_RETRY_SPAN_2,364,252,72,9 CONTROL "@R_INFINITE",R_INFINITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,266,265,171,9 PUSHBUTTON "@B_DETAIL",B_DETAIL,344,277,87,15 - DEFPUSHBUTTON "@IDOK",IDOK,308,300,64,17 - PUSHBUTTON "@IDCANCEL",IDCANCEL,380,300,64,17 + DEFPUSHBUTTON "@IDOK",IDOK,308,310,64,17 + PUSHBUTTON "@IDCANCEL",IDCANCEL,380,310,64,17 CONTROL 178,S_ROUTER_LOGO,"Static",SS_BITMAP | NOT WS_VISIBLE,358,5,86,89 END @@ -1585,12 +1594,26 @@ BEGIN EDITTEXT E_USERNAME,85,68,99,11,ES_AUTOHSCROLL RTEXT "@STATIC5",IDC_STATIC,7,86,74,9 EDITTEXT E_PASSWORD,85,84,99,11,ES_PASSWORD | ES_AUTOHSCROLL + PUSHBUTTON "@B_HTTP_HEADER", B_HTTP_HEADER, 7, 110, 100, 15, 0, WS_EX_LEFT DEFPUSHBUTTON "@IDOK",IDOK,115,110,64,15 PUSHBUTTON "@IDCANCEL",IDCANCEL,184,110,64,15 LTEXT "@STATIC6",IDC_STATIC,191,70,57,12 LTEXT "@STATIC7",IDC_STATIC,191,86,57,11 END +D_CM_PROXY_HTTP_HEADER DIALOGEX 0, 0, 255, 131 +STYLE DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU +CAPTION "@D_CM_PROXY_HTTP_HEADER" +FONT 9, "MS Shell Dlg", 400, 0, 0x80 +{ + DEFPUSHBUTTON "@IDOK", IDOK, 115, 110, 64, 15, 0, WS_EX_LEFT + PUSHBUTTON "@IDCANCEL", IDCANCEL, 184, 110, 64, 15, 0, WS_EX_LEFT + CONTROL "", L_VALUES_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 7, 5, 186, 100, WS_EX_LEFT + PUSHBUTTON "@B_NEW", B_NEW, 198, 5, 50, 15, 0, WS_EX_LEFT + PUSHBUTTON "@B_DELETE", B_DELETE, 198, 25, 50, 15, 0, WS_EX_LEFT + PUSHBUTTON "@B_CLEAR", B_CLEAR, 198, 60, 50, 15, 0, WS_EX_LEFT +} + D_CM_DETAIL DIALOGEX 0, 0, 435, 312 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "@D_CM_DETAIL" @@ -1824,7 +1847,7 @@ BEGIN PUSHBUTTON "@IDCANCEL",IDCANCEL,98,288,159,14 END -D_SM_EDIT_SETTING DIALOGEX 0, 0, 435, 263 +D_SM_EDIT_SETTING DIALOGEX 0, 0, 435, 273 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "@D_SM_EDIT_SETTING" FONT 9, "MS Shell Dlg", 400, 0, 0x80 @@ -1842,14 +1865,15 @@ BEGIN RTEXT "@STATIC6",IDC_STATIC,14,113,54,11 COMBOBOX C_PORT,72,110,81,42,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP LTEXT "@STATIC7",IDC_STATIC,159,113,46,10 - GROUPBOX "@STATIC8",IDC_STATIC,7,144,206,93 + GROUPBOX "@STATIC8",IDC_STATIC,7,144,206,103 ICON ICO_TOWER,IDC_STATIC,14,156,20,18 LTEXT "@STATIC9",IDC_STATIC,40,156,163,17 RTEXT "@STATIC10",IDC_STATIC,14,182,54,10 CONTROL "@R_DIRECT_TCP",R_DIRECT_TCP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,72,180,135,10 CONTROL "@R_HTTPS",R_HTTPS,"Button",BS_AUTORADIOBUTTON,72,191,135,10 CONTROL "@R_SOCKS",R_SOCKS,"Button",BS_AUTORADIOBUTTON,72,201,135,10 - PUSHBUTTON "@B_PROXY_CONFIG",B_PROXY_CONFIG,74,215,114,15 + CONTROL "@R_SOCKS5",R_SOCKS5,"Button",BS_AUTORADIOBUTTON,72,211,135,10 + PUSHBUTTON "@B_PROXY_CONFIG",B_PROXY_CONFIG,74,225,114,15 GROUPBOX "@STATIC11",IDC_STATIC,222,43,206,193 ICON ICO_USER_ADMIN,IDC_STATIC,229,55,20,18 LTEXT "@STATIC12",IDC_STATIC,255,55,165,81 @@ -1862,8 +1886,8 @@ BEGIN RTEXT "@S_PASSWORD",S_PASSWORD,227,208,60,9 EDITTEXT E_PASSWORD,289,206,126,11,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "@R_NO_SAVE",R_NO_SAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,290,223,127,9 - DEFPUSHBUTTON "@IDOK",IDOK,291,240,64,17 - PUSHBUTTON "@IDCANCEL",IDCANCEL,364,240,64,17 + DEFPUSHBUTTON "@IDOK",IDOK,291,250,64,17 + PUSHBUTTON "@IDCANCEL",IDCANCEL,364,250,64,17 CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,233,179,183,1 END @@ -4485,7 +4509,7 @@ BEGIN CONTROL 232,S_BMP_CN,"Static",SS_BITMAP,7,0,397,173 END -D_SM_PROXY DIALOGEX 0, 0, 227, 143 +D_SM_PROXY DIALOGEX 0, 0, 227, 153 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "@D_SM_PROXY" FONT 9, "MS Shell Dlg", 400, 0, 0x80 @@ -4494,11 +4518,12 @@ BEGIN LTEXT "@STATIC9",IDC_STATIC,33,5,187,17 RTEXT "@STATIC10",IDC_STATIC,7,39,54,10 CONTROL "@R_DIRECT_TCP",R_DIRECT_TCP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,65,37,135,10 - CONTROL "@R_HTTPS",R_HTTPS,"Button",BS_AUTORADIOBUTTON,65,47,135,10 + CONTROL "@R_HTTPS",R_HTTPS,"Button",BS_AUTORADIOBUTTON,65,48,135,10 CONTROL "@R_SOCKS",R_SOCKS,"Button",BS_AUTORADIOBUTTON,65,58,135,10 - PUSHBUTTON "@B_PROXY_CONFIG",B_PROXY_CONFIG,67,78,114,15 - DEFPUSHBUTTON "@IDOK",IDOK,87,122,64,15 - PUSHBUTTON "@IDCANCEL",IDCANCEL,156,122,64,15 + CONTROL "@R_SOCKS5",R_SOCKS5,"Button",BS_AUTORADIOBUTTON,65,68,135,10 + PUSHBUTTON "@B_PROXY_CONFIG",B_PROXY_CONFIG,67,88,114,15 + DEFPUSHBUTTON "@IDOK",IDOK,87,132,64,15 + PUSHBUTTON "@IDCANCEL",IDCANCEL,156,132,64,15 END D_VGC_LIST DIALOGEX 0, 0, 446, 303 diff --git a/src/PenCore/Tray0.ico b/src/PenCore/Tray0.ico index 9ccaa63c..cd155d63 100644 Binary files a/src/PenCore/Tray0.ico and b/src/PenCore/Tray0.ico differ diff --git a/src/PenCore/Tray1.ico b/src/PenCore/Tray1.ico index 21058beb..428b31cb 100644 Binary files a/src/PenCore/Tray1.ico and b/src/PenCore/Tray1.ico differ diff --git a/src/PenCore/Tray2.ico b/src/PenCore/Tray2.ico index d2e10b9c..0f97c50b 100644 Binary files a/src/PenCore/Tray2.ico and b/src/PenCore/Tray2.ico differ diff --git a/src/PenCore/Tray3.ico b/src/PenCore/Tray3.ico index 52c7d115..8f414aa7 100644 Binary files a/src/PenCore/Tray3.ico and b/src/PenCore/Tray3.ico differ diff --git a/src/PenCore/Tray4.ico b/src/PenCore/Tray4.ico index 6e8984b4..db16ea89 100644 Binary files a/src/PenCore/Tray4.ico and b/src/PenCore/Tray4.ico differ diff --git a/src/PenCore/VPN.ico b/src/PenCore/VPN.ico index b366131e..cd155d63 100644 Binary files a/src/PenCore/VPN.ico and b/src/PenCore/VPN.ico differ diff --git a/src/PenCore/VPNSvr.ico b/src/PenCore/VPNSvr.ico index 9585574a..40a1bf9f 100644 Binary files a/src/PenCore/VPNSvr.ico and b/src/PenCore/VPNSvr.ico differ diff --git a/src/PenCore/resource.h b/src/PenCore/resource.h index bdb0666b..bb4eca31 100644 --- a/src/PenCore/resource.h +++ b/src/PenCore/resource.h @@ -317,6 +317,7 @@ #define R_DIRECT_TCP 1057 #define R_HTTPS 1059 #define R_SOCKS 1060 +#define R_SOCKS5 1061 #define S_USERNAME 1062 #define E_RETRY_SPAN 1065 #define C_HUBNAME 1066 @@ -934,7 +935,7 @@ #define R_UNESTABLISHED 1435 #define R_USER 1435 #define R_CUSTOM 1435 -#define S_DISABLE 1435 +#define S_DISABLE 1435 #define R_PERMANENT 1435 #define R_FOR_SYSTEM 1436 #define IDC_NETADDRESS1 1437 @@ -1025,6 +1026,10 @@ #define S_TSUKUBA 1515 #define R_DISABLE_NATT 1516 #define S_SMARTCARD_ICON 1517 +#define L_VALUES_LIST 1519 +#define B_HTTP_HEADER 1520 +#define B_NEW 1521 +#define B_CLEAR 1522 #define B_ONLINE 1655 #define D_NM_CONNECT 1998 #define D_NM_MAIN 1999 @@ -1135,6 +1140,7 @@ #define D_VGS_WARNING 2096 #define D_DEFAULT3 2097 #define D_NM_PUSH 2097 +#define D_CM_PROXY_HTTP_HEADER 2098 #define ID_Menu40011 40011 #define CMD_CONNECT 40020 #define CMD_STATUS 40021 @@ -1207,7 +1213,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 244 #define _APS_NEXT_COMMAND_VALUE 40111 -#define _APS_NEXT_CONTROL_VALUE 1518 +#define _APS_NEXT_CONTROL_VALUE 1521 #define _APS_NEXT_SYMED_VALUE 102 #endif #endif diff --git a/src/SEVPN.sln b/src/SEVPN.sln index 78ffc9da..83a633a2 100644 --- a/src/SEVPN.sln +++ b/src/SEVPN.sln @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hamcore", "hamcore", "{2349 bin\hamcore\strtable_cn.stb = bin\hamcore\strtable_cn.stb bin\hamcore\strtable_en.stb = bin\hamcore\strtable_en.stb bin\hamcore\strtable_ja.stb = bin\hamcore\strtable_ja.stb + bin\hamcore\strtable_pt_br.stb = bin\hamcore\strtable_pt_br.stb bin\hamcore\time.htm = bin\hamcore\time.htm bin\hamcore\vpn16.exe = bin\hamcore\vpn16.exe EndProjectSection @@ -27,30 +28,30 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{90A5 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Win32_Debug", "Win32_Debug", "{979EF6E9-A263-4E9B-964C-DE72344DFB13}" ProjectSection(SolutionItems) = preProject - BuildFiles\Library\Win32_Debug\libeay32.lib = BuildFiles\Library\Win32_Debug\libeay32.lib - BuildFiles\Library\Win32_Debug\ssleay32.lib = BuildFiles\Library\Win32_Debug\ssleay32.lib - BuildFiles\Library\Win32_Debug\zlib.lib = BuildFiles\Library\Win32_Debug\zlib.lib + BuildFiles\Library\vs2008\Win32_Debug\libeay32.lib = BuildFiles\Library\vs2008\Win32_Debug\libeay32.lib + BuildFiles\Library\vs2008\Win32_Debug\ssleay32.lib = BuildFiles\Library\vs2008\Win32_Debug\ssleay32.lib + BuildFiles\Library\vs2008\Win32_Debug\zlib.lib = BuildFiles\Library\vs2008\Win32_Debug\zlib.lib EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Win32_Release", "Win32_Release", "{7DE9E590-6189-4570-A451-2584E655A539}" ProjectSection(SolutionItems) = preProject - BuildFiles\Library\Win32_Release\libeay32.lib = BuildFiles\Library\Win32_Release\libeay32.lib - BuildFiles\Library\Win32_Release\ssleay32.lib = BuildFiles\Library\Win32_Release\ssleay32.lib - BuildFiles\Library\Win32_Release\zlib.lib = BuildFiles\Library\Win32_Release\zlib.lib + BuildFiles\Library\vs2008\Win32_Release\libeay32.lib = BuildFiles\Library\vs2008\Win32_Release\libeay32.lib + BuildFiles\Library\vs2008\Win32_Release\ssleay32.lib = BuildFiles\Library\vs2008\Win32_Release\ssleay32.lib + BuildFiles\Library\vs2008\Win32_Release\zlib.lib = BuildFiles\Library\vs2008\Win32_Release\zlib.lib EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "x64_Debug", "x64_Debug", "{696A5B66-04A7-4CE8-A31C-E05026846B5C}" ProjectSection(SolutionItems) = preProject - BuildFiles\Library\x64_Debug\libeay32.lib = BuildFiles\Library\x64_Debug\libeay32.lib - BuildFiles\Library\x64_Debug\ssleay32.lib = BuildFiles\Library\x64_Debug\ssleay32.lib - BuildFiles\Library\x64_Debug\zlib.lib = BuildFiles\Library\x64_Debug\zlib.lib + BuildFiles\Library\vs2008\x64_Debug\libeay32.lib = BuildFiles\Library\vs2008\x64_Debug\libeay32.lib + BuildFiles\Library\vs2008\x64_Debug\ssleay32.lib = BuildFiles\Library\vs2008\x64_Debug\ssleay32.lib + BuildFiles\Library\vs2008\x64_Debug\zlib.lib = BuildFiles\Library\vs2008\x64_Debug\zlib.lib EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "x64_Release", "x64_Release", "{1AFACDF7-7ECE-42D3-A3BD-563025F247D7}" ProjectSection(SolutionItems) = preProject - BuildFiles\Library\x64_Release\libeay32.lib = BuildFiles\Library\x64_Release\libeay32.lib - BuildFiles\Library\x64_Release\ssleay32.lib = BuildFiles\Library\x64_Release\ssleay32.lib - BuildFiles\Library\x64_Release\zlib.lib = BuildFiles\Library\x64_Release\zlib.lib + BuildFiles\Library\vs2008\x64_Release\libeay32.lib = BuildFiles\Library\vs2008\x64_Release\libeay32.lib + BuildFiles\Library\vs2008\x64_Release\ssleay32.lib = BuildFiles\Library\vs2008\x64_Release\ssleay32.lib + BuildFiles\Library\vs2008\x64_Release\zlib.lib = BuildFiles\Library\vs2008\x64_Release\zlib.lib EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Neo", "Neo\Neo.vcproj", "{D302D5D9-A3B7-4D2E-98BF-3BB305BAE43F}" @@ -90,6 +91,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cedar", "Cedar\Cedar.vcproj {384815C3-333C-4CEC-9DCD-B6AB2602EBB9} = {384815C3-333C-4CEC-9DCD-B6AB2602EBB9} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vpntest", "vpntest\vpntest.vcproj", "{1ED5782B-1734-4FC6-AA9E-F7181CDBA8A7}" + ProjectSection(ProjectDependencies) = postProject + {2928D768-DEC3-40D3-8E51-26E364497C9B} = {2928D768-DEC3-40D3-8E51-26E364497C9B} + {384815C3-333C-4CEC-9DCD-B6AB2602EBB9} = {384815C3-333C-4CEC-9DCD-B6AB2602EBB9} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vpncmd", "vpncmd\vpncmd.vcproj", "{83438AC3-5329-4337-89BC-5B69EBAE4B6E}" ProjectSection(ProjectDependencies) = postProject {2928D768-DEC3-40D3-8E51-26E364497C9B} = {2928D768-DEC3-40D3-8E51-26E364497C9B} diff --git a/src/SeLow/SeLow.c b/src/SeLow/SeLow.c index c426a653..f90a1b07 100644 --- a/src/SeLow/SeLow.c +++ b/src/SeLow/SeLow.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // SeLow: SoftEther Lightweight Network Protocol -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SeLow.c diff --git a/src/SeLow/SeLow.h b/src/SeLow/SeLow.h index ed8c5dfa..db8c5587 100644 --- a/src/SeLow/SeLow.h +++ b/src/SeLow/SeLow.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // SeLow - SoftEther Lightweight Network Protocol -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SeLow.h diff --git a/src/SeLow/SeLowCommon.h b/src/SeLow/SeLowCommon.h index 285b4c6b..ac0a51cf 100644 --- a/src/SeLow/SeLowCommon.h +++ b/src/SeLow/SeLowCommon.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // SeLow - SoftEther Lightweight Network Protocol -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // SeLowCommon.h diff --git a/src/SeLow/resource.h b/src/SeLow/resource.h index e42cd7d0..60389936 100644 --- a/src/SeLow/resource.h +++ b/src/SeLow/resource.h @@ -1,101 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Neo.rc -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Next default values for new objects diff --git a/src/See/Packet.c b/src/See/Packet.c index 64686889..a82c51c9 100644 --- a/src/See/Packet.c +++ b/src/See/Packet.c @@ -668,6 +668,8 @@ NTSTATUS NPF_IoControl(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp) PUINT pStats; ULONG Information = 0; + BOOLEAN check_ok; + IF_LOUD(DbgPrint("NPF: IoControl\n");) IrpSp = IoGetCurrentIrpStackLocation(Irp); @@ -686,22 +688,39 @@ NTSTATUS NPF_IoControl(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp) EXIT_FAILURE(0); } - pStats = (PUINT)(Irp->UserBuffer); - - pStats[3] = 0; - pStats[0] = 0; - pStats[1] = 0; - pStats[2] = 0; // Not yet supported - - for(i = 0 ; i < NCpu ; i++) + check_ok = TRUE; + __try { - - pStats[3] += Open->CpuData[i].Accepted; - pStats[0] += Open->CpuData[i].Received; - pStats[1] += Open->CpuData[i].Dropped; - pStats[2] += 0; // Not yet supported + ProbeForWrite(Irp->UserBuffer, IrpSp->Parameters.DeviceIoControl.OutputBufferLength, 1); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + check_ok = FALSE; + } + + if (check_ok == FALSE) + { + EXIT_FAILURE(0); + } + else + { + pStats = (PUINT)(Irp->UserBuffer); + + pStats[3] = 0; + pStats[0] = 0; + pStats[1] = 0; + pStats[2] = 0; // Not yet supported + + for(i = 0 ; i < NCpu ; i++) + { + + pStats[3] += Open->CpuData[i].Accepted; + pStats[0] += Open->CpuData[i].Received; + pStats[1] += Open->CpuData[i].Dropped; + pStats[2] += 0; // Not yet supported + } + EXIT_SUCCESS(4*sizeof(UINT)); } - EXIT_SUCCESS(4*sizeof(UINT)); break; @@ -711,9 +730,26 @@ NTSTATUS NPF_IoControl(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp) EXIT_FAILURE(0); } - RtlCopyMemory(Irp->UserBuffer,(Open->ReadEventName.Buffer)+18,26); + check_ok = TRUE; + __try + { + ProbeForWrite(Irp->UserBuffer, IrpSp->Parameters.DeviceIoControl.OutputBufferLength, 1); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + check_ok = FALSE; + } - EXIT_SUCCESS(26); + if (check_ok == FALSE) + { + EXIT_FAILURE(0); + } + else + { + RtlCopyMemory(Irp->UserBuffer,(Open->ReadEventName.Buffer)+18,26); + + EXIT_SUCCESS(26); + } break; diff --git a/src/See/See.rc b/src/See/See.rc index 5c275264..8c739aa0 100644 --- a/src/See/See.rc +++ b/src/See/See.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/See/resource.h b/src/See/resource.h index d61f39b6..d363c018 100644 --- a/src/See/resource.h +++ b/src/See/resource.h @@ -1,101 +1,7 @@ //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by NPF.RC -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. + // Next default values for new objects diff --git a/src/See/resource1.h b/src/See/resource1.h index 53038446..de35a2f9 100644 --- a/src/See/resource1.h +++ b/src/See/resource1.h @@ -1,101 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by See.rc -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Next default values for new objects diff --git a/src/SeeDll/SeeDll.rc b/src/SeeDll/SeeDll.rc index 2e72f111..c0238161 100644 --- a/src/SeeDll/SeeDll.rc +++ b/src/SeeDll/SeeDll.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/SeeDll/resource.h b/src/SeeDll/resource.h index 1c3b7c3b..eadf53fe 100644 --- a/src/SeeDll/resource.h +++ b/src/SeeDll/resource.h @@ -1,101 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by SeeDll.rc -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Next default values for new objects diff --git a/src/Wfp/Wfp.c b/src/Wfp/Wfp.c index 0634fdf3..facf11e9 100644 --- a/src/Wfp/Wfp.c +++ b/src/Wfp/Wfp.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Windows Filtering Platform Callout Driver for Capturing IPsec Packets on Windows Vista / 7 / Server 2008 -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Wfp.c diff --git a/src/Wfp/Wfp.h b/src/Wfp/Wfp.h index 48230009..6456bb42 100644 --- a/src/Wfp/Wfp.h +++ b/src/Wfp/Wfp.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Windows Filtering Platform Callout Driver for Capturing IPsec Packets on Windows Vista / 7 / Server 2008 -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Wfp.h diff --git a/src/Wfp/Wfp.rc b/src/Wfp/Wfp.rc index 5c275264..8c739aa0 100644 --- a/src/Wfp/Wfp.rc +++ b/src/Wfp/Wfp.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/Wfp/WfpInner.h b/src/Wfp/WfpInner.h index efb9292c..f8861c9c 100644 --- a/src/Wfp/WfpInner.h +++ b/src/Wfp/WfpInner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Windows Filtering Platform Callout Driver for Capturing IPsec Packets on Windows Vista / 7 / Server 2008 -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // WfpInner.h diff --git a/src/Wfp/resource1.h b/src/Wfp/resource1.h index 5a5a9cc9..6e3a1548 100644 --- a/src/Wfp/resource1.h +++ b/src/Wfp/resource1.h @@ -1,101 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Wfp.rc -// -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // Next default values for new objects diff --git a/src/bin/SOURCES_OF_BINARY_FILES.TXT b/src/bin/SOURCES_OF_BINARY_FILES.TXT index 963dba74..898f9e31 100644 --- a/src/bin/SOURCES_OF_BINARY_FILES.TXT +++ b/src/bin/SOURCES_OF_BINARY_FILES.TXT @@ -1,5 +1,5 @@ All binary files on the 'hamcore' directory are free software under -the GPLv2 license. (Except WinPcap binaries.) +the Apache License, Version 2.0. (Except WinPcap binaries.) Some geeks should be interested in how to rebuild .sys (driver) files on this directory. This text file helps such crazy geeks. @@ -67,25 +67,12 @@ The WinPcap license is at http://www.winpcap.org/misc/copyright.htm page. License ------- +THE APACHE LICENSE, VERSION 2.0 APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH +ARE DEVELOPED BY SOFTETHER VPN PROJECT. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License version 2 as published by the Free -Software Foundation. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License version 2 -along with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -Neither the name of SoftEther nor the names of its contributors may be used -to endorse or promote products derived from this software without specific -prior written permission. +Disclaimer +---------- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -128,6 +115,4 @@ RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT JUST A STATEMENT FOR WARNING AND DISCLAIMER. -THE GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE DEVELOPED -BY SOFTETHER VPN PROJECT. diff --git a/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys b/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys index a68d5908..6377f595 100644 Binary files a/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys and b/src/bin/hamcore/DriverPackages/See/x64/See_x64.sys differ diff --git a/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys b/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys index 6c2d01b9..b98947b9 100644 Binary files a/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys and b/src/bin/hamcore/DriverPackages/See/x86/See_x86.sys differ diff --git a/src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT b/src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT index 93b4d459..58d71c05 100644 --- a/src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT +++ b/src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT @@ -1,5 +1,5 @@ All binary files on the 'hamcore' directory are free software under -the GPLv2 license. (Except WinPcap binaries.) +the Apache License, Version 2.0. (Except WinPcap binaries.) Some geeks should be interested in how to rebuild .sys (driver) files on this directory. This text file helps such crazy geeks. @@ -67,25 +67,12 @@ The WinPcap license is at http://www.winpcap.org/misc/copyright.htm page. License ------- +THE APACHE LICENSE, VERSION 2.0 APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH +ARE DEVELOPED BY SOFTETHER VPN PROJECT. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License version 2 as published by the Free -Software Foundation. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License version 2 -along with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -Neither the name of SoftEther nor the names of its contributors may be used -to endorse or promote products derived from this software without specific -prior written permission. +Disclaimer +---------- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -108,10 +95,23 @@ ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS SOFTWARE -INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES PROHIBIT ENCRYPTED -COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED. - -THE GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE DEVELOPED -BY SOFTETHER VPN PROJECT. +USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS +YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY +CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS +SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE +SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO +COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING +PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR +CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE +NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR +INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ +COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE +WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY +COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE +COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE +SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR +COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO +RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL +RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT +JUST A STATEMENT FOR WARNING AND DISCLAIMER. diff --git a/src/bin/hamcore/authors.txt b/src/bin/hamcore/authors.txt deleted file mode 100644 index b89c36a1..00000000 --- a/src/bin/hamcore/authors.txt +++ /dev/null @@ -1,159 +0,0 @@ -SoftEther VPN is developed by SoftEther VPN Project at University of Tsukuba. -http://www.softether.org/ - -AUTHORS OF SOFTETHER VPN ------------------------- - -CORE DEVELOPERS: - - - Daiyuu Nobori, Ph.D. - Computer Science, Graduate School of University of Tsukuba - SoftEther Corporation - E-mail: daiyuu-nobori [at] softether.org - - - Tetsuo Sugiyama, Ph.D. - SoftEther Corporation - - - Junpei Kuwana, Ph.D. - Risk Engineering, Graduate School of University of Tsukuba - SoftEther Corporation - - - Takao Ito, Ph.D. - Computer Science, Graduate School of University of Tsukuba - SoftEther Corporation - - - Mei Sharie Ann Yamaguchi, Ph.D. - Life and Environmental Sciences, Graduate School of University of Tsukuba - - - Christopher Smith - College of Information Science, University of Tsukuba - - -WEB-SITE DESIGNER: - - - Genya Hatakeyama - College of Information Science, University of Tsukuba - - -CONTRIBUTORS on GitHub: - - - Melvyn - https://github.com/yaurthek - - - nattoheaven - https://github.com/nattoheaven - - - ELIN - https://github.com/el1n - - - Dmitry Orlov - https://github.com/mosquito - - - Renaud Allard - https://github.com/renaudallard - - - Hideki Saito - https://github.com/hsaito - - - Dexter Ang - https://github.com/thepoch - - - YF - https://github.com/yfdyh000 - - - Sahal Ansari - https://github.com/sahal - - - ygrek - https://github.com/ygrek - - - ajee cai - https://github.com/ajeecai - - - NOKUBI Takatsugu - https://github.com/knok - - - Den Lesnov - https://github.com/Leden - - - Ilya Shipitsin - https://github.com/chipitsine - - - Matt Lewandowsky - https://github.com/lewellyn - - - Raymond Tau - https://github.com/rtau - - - Luiz Eduardo Gava - https://github.com/LegDog - - - Charles Surett - https://github.com/scj643 - - - Jeff Tang - https://github.com/mrjefftang - - - Victor Salgado - https://github.com/mcsalgado - - - micsell - https://github.com/micsell - - - yehorov - https://github.com/yehorov - - - dglushenok - https://github.com/dglushenok - - - NoNameA 774 - https://github.com/nna774 - - - Alexandre De Oliveira - https://github.com/yodresh - - - Bernhard Rosenkraenzer - https://github.com/berolinux - - - Sacha Bernstein - https://github.com/sacha - - - cm0x4D - https://github.com/cm0x4D - - - DDGo - https://github.com/DDGo - - - Noah O'Donoghue - https://github.com/NoahO - - - Moataz Elmasry - https://github.com/moatazelmasry2 - - - Zulyandri Zardi - https://github.com/zulzardi - - - rel22 - https://github.com/rel22 - - - Guanzhong Chen - https://github.com/quantum5 - - - Nguyen Hong Quan - https://github.com/hongquan - - - macvk - https://github.com/macvk - - - Guido Vranken - https://github.com/guidovranken - - -JOIN THE SOFTETHER VPN DEVELOPMENT ----------------------------------- - -Want to become a contributor? Please send us a patch. - -See also: SoftEther VPN Patch Acceptance Policy -http://www.softether.org/5-download/src/9.patch - diff --git a/src/bin/hamcore/eula.txt b/src/bin/hamcore/eula.txt index 79532bee..a7dec475 100644 --- a/src/bin/hamcore/eula.txt +++ b/src/bin/hamcore/eula.txt @@ -1,438 +1,25 @@ -SoftEther VPN Server, Client and Bridge are free software, and released as open-source. You can redistribute them and/or modify them under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. +Copyright (c) all contributors on SoftEther VPN project in GitHub. +Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. -Copyright (c) Daiyuu Nobori. -Copyright (c) SoftEther Project at University of Tsukuba, Japan. -Copyright (c) SoftEther Corporation. -All Rights Reserved. -http://www.softether.org/ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. + http://www.apache.org/licenses/LICENSE-2.0 -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and limitations under the License. -You should have received a copy of the GNU General Public License version 2 along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -Neither the name of SoftEther nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +DISCLAIMER +========== THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED. +USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL +RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT JUST A STATEMENT FOR WARNING AND DISCLAIMER. -THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE DEVELOPED BY SOFTETHER VPN PROJECT. - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. - - When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - - We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. - - Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. - - c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - - 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -Note that the above copyright notices and use conditions do not apply on the software components listed in below which are included in this Software. When you use or distribute Software with including these libraries, you have to follow the conditions of these libraries. - -These library's copyright notices and conditions are following; - -------------------- - -BitVisor(R) VPN Client Module (IPsec Driver): -Copyright (c) 2007, 2008 University of Tsukuba. -Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the University of Tsukuba nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------- - -Microsoft(R) C Runtime Library: -(c) 2007 Microsoft Corporation. All Rights Reserved. - -------------------- - -RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki): - -License to copy and use this software is granted provided that it is identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki)" in all material mentioning or referencing this software. - -License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki)" in all material mentioning or referencing the derived work. - -RSA Security Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. - -------------------- - -WinPcap: -Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the Politecnico di Torino nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------- - -libedit: -Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by Christos Zoulas of Cornell University. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------- - -libiconv: - - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. - - When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. - - Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. - - Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. - - Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. - - Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. - - You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. - - (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - - Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: - - a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above) ; and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. - - d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - - It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - - 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. - - b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - - 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -------------------- - -ncurses: -Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, distribute with modifications, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. - -------------------- - -OpenSSL: -OpenSSL License -Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - -4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org. - -5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project. - -6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)" - -THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). - -Original SSLeay License -Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. - -This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). The implementation was written so as to conform with Netscapes SSL. - -This library is free for commercial and non-commercial use as long as the following conditions are adhered to. The following conditions apply to all code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; not just the SSL code. The SSL documentation included with this distribution is covered by the same copyright terms except that the holder is Tim Hudson (tjh@cryptsoft.com). - -Copyright remains Eric Young's, and as such any Copyright notices in the code are not to be removed. If this package is used in a product, Eric Young should be given attribution as the author of the parts of the library used. This can be in the form of a textual message at program startup or in documentation (online or textual) provided with the package. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software must display the following acknowledgement: "This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)" The word 'cryptographic' can be left out if the rouines from the library being used are not cryptographic related :-). -4. If you include any Windows specific code (or a derivative thereof) from the apps directory (application code) you must include an acknowledgement: "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - -THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The licence and distribution terms for any publically available version or derivative of this code cannot be changed. i.e. this code cannot simply be copied and put under another distribution licence [including the GNU Public Licence.] - -------------------- - -zlib: -Acknowledgments: - The deflate format used by zlib was defined by Phil Katz. The deflate and zlib specifications were written by L. Peter Deutsch. Thanks to all the people who reported problems and suggested various improvements in zlib; they are too numerous to cite here. - -Copyright notice: - (C) 1995-2004 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving lengthy legal documents to sign. The sources are provided for free but without warranty of any kind. The library has been entirely written by Jean-loup Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in the file ChangeLog history information documenting your changes. Please read the FAQ for more information on the distribution of modified source versions. - -------------------- - -SHA0 implementation: - -Copyright (C) 2009 Gabriel A. Petursson -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see . - -------------------- - -NOTES - -SoftEther provides source codes of some GPL/LGPL/other libraries listed above on its web server. Anyone can download, use and re-distribute them under individual licenses which are contained on each archive file, available from the following URL: -http://uploader.softether.co.jp/src/ +READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE. SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE. diff --git a/src/bin/hamcore/legal.txt b/src/bin/hamcore/legal.txt index 359c6ad3..6646cfc5 100644 --- a/src/bin/hamcore/legal.txt +++ b/src/bin/hamcore/legal.txt @@ -292,41 +292,3 @@ Copyright notice: If you use the zlib library in a product, we would appreciate *not* receiving lengthy legal documents to sign. The sources are provided for free but without warranty of any kind. The library has been entirely written by Jean-loup Gailly and Mark Adler; it does not include third-party code. If you redistribute modified sources, we would appreciate that you include in the file ChangeLog history information documenting your changes. Please read the FAQ for more information on the distribution of modified source versions. - -------------------- - -NOTES WRITTEN BY SOFTETHER CORPORATION - -Note for users of non-Windows version of PacketiX VPN: The enumerated bundle of License Agreements above are copies of original License Agreements of each library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work from these libraries. PacketiX VPN is a separated work from the libraries, but it may call functions of the libraries (whether or not PacketiX VPN calls such functions are depended on the user's intention to link them or not on user's side computer). While some libraries indicate GPL or LGPL as a condition to re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we took special care not to make PacketiX VPN become delivered works of any GPL or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL libraries are distributed with isolated forms (means that any program files of PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of PacketiX VPN wants to link GPL/LGPL libraries by their own decisions, operations and responsibilities, he may do that on his computer. However, if a delivered work under copyright law is created as a result of such an operation, such a delivered work must not re-distributed to other people, because it may violate GPL/LGPL libraries' conditions. - -Note for users of Windows version of PacketiX VPN: For technical reason, the above texts are exactly same as a file which is also contained on the non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX VPN has no relations to any GPL/LGPL libraries enumerated above. - -SoftEther Corporation provides source codes of some GPL/LGPL/other libraries listed above on its web server. Anyone can download, use and re-distribute them under individual licenses which are contained on each archive file, available from the following URL: -http://uploader.softether.co.jp/src/ - -------------------- - -Copyright Notes and Acknowledgments for PacketiX VPN (Commercial Version): - -PacketiX VPN has some contributed codes from SoftEther VPN Project (http://www.softether.org/). -These contributed codes have been granted by contributors to be imported into the PacketiX VPN source-tree without GPLv2 conditions. - -The list of contributors for SoftEther VPN Project: - - - Melvyn - https://github.com/yaurthek - - - nattoheaven - https://github.com/nattoheaven - - - ELIN - https://github.com/el1n - - - YF - https://github.com/yfdyh000 - - -SoftEther Corporation, the distributor of PacketiX VPN, appreciates all contributors for SoftEther VPN Project very much. - -See also: http://www.softether.org/5-download/src/9.patch - diff --git a/src/bin/hamcore/openvpn_sample.ovpn b/src/bin/hamcore/openvpn_sample.ovpn index 3b7c3868..ec3e5e63 100644 --- a/src/bin/hamcore/openvpn_sample.ovpn +++ b/src/bin/hamcore/openvpn_sample.ovpn @@ -98,14 +98,9 @@ $TAG_BEFORE_REMOTE$remote $TAG_HOSTNAME$ $TAG_PORT$ ############################################################################### # The encryption and authentication algorithm. # -# Default setting is good. Modify it as you prefer. -# When you specify an unsupported algorithm, the error will occur. -# -# The supported algorithms are as follows: -# cipher: [NULL-CIPHER] NULL AES-128-CBC AES-192-CBC AES-256-CBC BF-CBC -# CAST-CBC CAST5-CBC DES-CBC DES-EDE-CBC DES-EDE3-CBC DESX-CBC -# RC2-40-CBC RC2-64-CBC RC2-CBC CAMELLIA-128-CBC CAMELLIA-192-CBC CAMELLIA-256-CBC -# auth: SHA SHA1 SHA256 SHA384 SHA512 MD5 MD4 RMD160 +# The default setting is compatible with most clients. Modify it as you prefer. +# It is recommended to use a better algorithm if your client supports it. +# When you specify an unsupported algorithm, an error will occur. cipher AES-128-CBC auth SHA1 diff --git a/src/bin/hamcore/strtable_cn.stb b/src/bin/hamcore/strtable_cn.stb index fe1ca898..4f75332c 100644 --- a/src/bin/hamcore/strtable_cn.stb +++ b/src/bin/hamcore/strtable_cn.stb @@ -1,7 +1,7 @@ -# SoftEther VPN String Table -# Copyright (c) SoftEther VPN Project. All Rights Reserved. -# -# http://www.softether.co.jp/ +# Copyright (c) all contributors on SoftEther VPN project in GitHub. +# Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +# +# https://www.softether.org/ # # Contributors: # - YF (https://github.com/yfdyh000) @@ -157,11 +157,11 @@ ERR_91 无法断开虚拟 3 层交换机会话。要删除会话,请停 ERR_92 具有指定名称的虚拟 3 层交换机已存在。指定一个不同的名称。 ERR_93 找不到指定的虚拟 3 层交换机。 ERR_94 指定的名称无效。检查名称是否有不能使用的字符 -ERR_95 无法添加虚拟 3 层接口。 -ERR_96 无法删除虚拟 3 层接口。 +ERR_95 无法添加虚拟 3 层接口。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. +ERR_96 无法删除虚拟 3 层接口。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. ERR_97 与指定虚拟 3 层交换接口的目标虚拟 HUB 连接的虚拟 3 层接口已在虚拟 3 层交换机中存在。不能在同一个虚拟 3 层交换机中定义超过一个连接到同一个虚拟 HUB 的虚拟 3 层接口。 -ERR_98 无法添加路由表项。 -ERR_99 无法删除路由表项。 +ERR_98 无法添加路由表项。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. +ERR_99 无法删除路由表项。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. ERR_100 指定的路由表项已存在。 ERR_101 客户端和服务器的时钟彼此不同步。检查时间设置。 ERR_102 无法启动此虚拟 3 层交换机。 要启动虚拟 3 层交换机,必须在虚拟 3 层交换机定义至少一个虚拟接口。 @@ -451,7 +451,7 @@ WINVER_ERROR_PC_REMOTE 远程服务器 # 开源版本的警告 -OSS_MSG 欢迎来到 SoftEther VPN 服务器学术版 !\r\n\r\n此 VPN 服务器作为日本筑波大学的一个学术研究由免费软件开发的,且由,开源 (GPL) SoftEther 项目 (http://www.softether.org/) 为公众利益免费发布的。\r\n\r\nSoftEther VPN 软件是作为筑波大学和 SoftEther 公司之间的联合研究合同的一部分而发布给公众的。SoftEther VPN 软件的开发和发布仅为学术研究目的。因此,对 SoftEther VPN 软件不提供支持服务,即使它包含错误或漏洞。用户将对使用 SoftEther VPN 的结果承担责任。 SoftEther VPN 的开发者和发行者都将永远不会为任何后果或损失承担责任。\r\n\r\n在您同意上述启示后,使用 SoftEther VPN 服务器享受 VPN 通信。\r\n\r\n对于 SoftEther VPN 的更多细节,请参阅 http://www.softether.org/。\r\n\r\n +OSS_MSG 欢迎来到 SoftEther VPN 服务器学术版 !\r\n\r\n此 VPN 服务器作为日本筑波大学的一个学术研究由免费软件开发的,且由,开源 SoftEther 项目 (http://www.softether.org/) 为公众利益免费发布的。\r\n\r\nSoftEther VPN 软件是作为筑波大学和 SoftEther 公司之间的联合研究合同的一部分而发布给公众的。SoftEther VPN 软件的开发和发布仅为学术研究目的。因此,对 SoftEther VPN 软件不提供支持服务,即使它包含错误或漏洞。用户将对使用 SoftEther VPN 的结果承担责任。 SoftEther VPN 的开发者和发行者都将永远不会为任何后果或损失承担责任。\r\n\r\n在您同意上述启示后,使用 SoftEther VPN 服务器享受 VPN 通信。\r\n\r\n对于 SoftEther VPN 的更多细节,请参阅 http://www.softether.org/。\r\n\r\n # NAT Traversal warning @@ -581,7 +581,8 @@ ERRDLG_DEVICE_ERROR 与 VPN Server 的连接被中断,因为虚拟网络适 # 关于协议 PROTO_DIRECT_TCP 直接的 TCP/IP 连接 PROTO_HTTP_PROXY 通过 HTTP 代理服务器连接 -PROTO_SOCKS_PROXY 通过 SOCKS 代理服务器连接 +PROTO_SOCKS_PROXY 通过 SOCKS4 代理服务器连接 +PROTO_SOCKS5_PROXY 通过 SOCKS5 代理服务器连接 PROTO_SSH 通过 SSH 服务器连接 PROTO_UNKNOWN 未知协议 @@ -945,6 +946,8 @@ CM_STOP_INST_VLAN_1 要想在此计算机上安装虚拟网络适配器,您 CM_STOP_INST_VLAN_2 要想在此计算机上安装虚拟网络适配器,您必须在“控制台会话”下启动 VPN Client 管理器。\r\n\r\n目前,此计算机上已安装 %s,且用户已登入远程会话 (会话ID: %u) 而不是控制台进程。\r\n若要安装虚拟网络适配器,必须在“控制台会话”下启动 VPN Client 管理器。\r\n(目前用户并未登入到控制台会话 (会话ID: 0)。) \r\n\r\n首先使用切换用户功能从本地登入到计算机,或在远程桌面使用 “/console” 论据功能,或切换计算机的本地控制台设备,之后启动 VPN Client 管理器,并安装虚拟网络适配器。 CM_SHORTCUT_DESKTOP_MSG 若要使用 VPN 连接设置快捷方式启动连接,您必须在“控制台会话”下运行快捷方式文件。\r\n\r\n目前用户作为远程会话 (会话ID: %u) 登入而不是控制台会话。 CM_HTTP_PROXY_WARNING 已选择“通过 HTTP 代理服务器连接”。\r\n\r\n一般情况下,HTTP 服务器只允许两种 TCP 端口作为连接到目标服务器的端口号: HTTP 协议 (TCP 端口号 80) 和 HTTPS 协议 (TCP 端口号 443)。\r\n(同样,也有的代理服务器提供更宽泛的 TCP 端口供连接使用。) \r\n\r\n当通过一台禁用除 HTTP 端口或 HTTPS 端口的 HTTP 代理服务器建立 VPN 连接时,您必须指定 443 (HTTPS 协议) 作为目标 VPN Server 的端口号。\r\n\r\n要检查您当前使用的 HTTP 代理服务器是否允许 80 或 443 意外的端口,请与 HTTP 代理服务器的管理员联系。\r\n\r\n目前 %d 指定为目标 VPN Server 的端口号。您是否要更改端口号为 443 (HTTPS 协议) ?\r\n(您所连接的 VPN Server 的 443 端口必须被设为监听状态并且空闲。) \r\n如果您无法确定,请与系统管理员或网络管理员联系。 +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED 密码已更改。 CM_ACCOUNT_SETTING_FILE VPN 连接设置文件 (*.VPN)|*.vpn|所有文件 (*.*)|*.* CM_ACCOUNT_SAVE_TITLE 输入要导出的 VPN 连接设置文件的文件名 @@ -1083,7 +1086,7 @@ SVC_HIDE_TRAY_MSG 启动 %S 用户模式时将隐藏任务栏图标。\r\n从 #关于服务 (UNIX) -UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n +UNIX_SVC_HELP %S service program\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n UNIX_SVC_STARTED The %S service has been started.\n UNIX_SVC_STOPPING Stopping the %S service ...\n UNIX_SVC_STOPPED %S service has been stopped.\n @@ -1660,7 +1663,7 @@ SM_ADVANCED_REDIRECT_URL_HINT_TITLE 如何使用高级 HTTP 重定向功能 SM_ADVANCED_REDIRECT_URL_HINT 高级 HTTP 重定向(为专家)\r\n\r\n此字符串“”是一个占位符。它可以嵌入重定向的 URL 中。\r\n\r\n嵌入 URL 示例:\r\nhttp://www.google.com/search?q=|secret\r\n\r\n当客户端将被重定向,重定向的实际 URL 目的地将被取代如下。\r\n\r\n用户名|会话ID|IP 地址|日期和时间|哈希值\r\n\r\n替换后示例:zurukko|SID-ZURUKKO-123|219.117.219.154|20131117100354|99707160AFE7A454042B2C47B064112D652452D7\r\n\r\n各字段的详情描述如下。\r\n\r\n用户名:当前 VPN 会话的用户名将被放置。\r\n\r\n会话ID:VPN 会话的会话 ID 将被放置\r\n\r\n日期和时间:14 位数字将以'YYYYMMDDHHMMSS’格式放置(时区是 UTC)\r\n\r\n哈希值:代表 20 个字节二进制数据的一个 40 字符的十六进制字符串。二进制数据是 SHA-1 哈希函数至临时字符串的结果。在重定向 URL 中“|”符号后,临时字符串是上述字段的位阵列加上秘密字符串的结合。(在上面的例子中,“秘密”是秘密字符串)。如果在 URL 中没有“|”符号,没有哈希值将被添加。\r\n\r\n哈希值的目的:秘密字符串如密钥般有效。感谢密钥。在重定向 URL 中接收重定向查询字符串的 CGI 程序,可以验证包含在 URL 中参数的完整性。\r\n SM_ADVANCED_REDIRECT_URL_MSG URL 必须以“http://”或“https://”开始 SM_DISABLE_DDNS_HINT_CAPTION 禁用动态 DNS 功能 -SM_DISABLE_DDNS_HINT 禁用动态 DNS 功能,修改 VPN Server 的配置文件。\r\n\r\n此“declare root”指令具有“declare DDnsClient”的指令。在该指令中,你可以切换“bool Disable”从假到 true,并重新启动 VPN Server ,然后动态 DNS 功能将被禁用。\r\n +SM_DISABLE_DDNS_HINT 需要修改 VPN Server 的配置文件以禁用动态 DNS 功能。\r\n\r\n“declare root”指令下具有“declare DDnsClient”指令。在该指令中,你可以将“bool Disable”从false切换到 true,并重新启动 VPN Server ,然后动态 DNS 功能将被禁用。\r\n SM_REGENERATE_CERT_MSG VPN Server 的证书被替换为新的。\r\n\r\n这会影响到被配置验证 VPN Server 证书的所有 VPN Client。\r\n您要继续吗? SM_DDNS_SERVER_CERT_MSG DDNS 主机名更改为“%S”。\r\n\r\n如果您计划使用 Microsoft SSTP VPN 连接到 VPN Server ,从 Windows Vista 或 Windows 更高版本指定 DDNS 主机名为 VPN Server 的目标,由于安全原因, VPN Server 的目标主机名必须与 VPN Server 证书的 CN(Common Name)字段完全匹配。\r\n\r\n您要重新生成的服务器证书,以匹配 CN 值到“%S”吗?\r\n(单击“否”继续使用当前的服务器证书)。 SM_DDNS_SERVER_CERT_OK VPN Server 的 SSL 证书现在已再次生成。\r\n\r\n当你让Microsoft SSTP VPN Client 连接到 VPN Server 时,你应该指定当前的 DDNS 主机名“%S”作为目标服务器的主机名。\r\n你也必须事先在 Windows 的“受信任的根证书”列表中添加这个 VPN Server 的证书。\r\n(要安装根证书到 Windows 中,在“证书“的小程序里打开 MMC,并导航到“本地计算机”。之后,你可以导入证书到的受信任的根证书列表。\r\详细说明请参考 Microsoft 的文档。)\r\n\ṛ\n您要以 X.509 格式保存新的 SSL 证书作为一个文件吗? @@ -1802,6 +1805,9 @@ LS_LICENSE_NOT_VPNSERVER 连接 "%S": 许可证错误。VPN Client 尝试连接 LS_LICENSE_NOT_VPNCLUSTER 连接 "%S": 许可证错误。此 VPN Server 上注册的许可证是禁止使用当前群集功能的类型,且一个 VPN Client 已尝试在群集模式下连接。您必须重启 VPN Server。 LS_LICENSE_VIOLATION 连接 "%S": VPN Server 发生违反许可证错误,不接受连接。 LS_LICENSE_VIOLATION_DETECTED 发现许可证违反错误,一个不同的 VPN Server 与此服务端具有相同的服务端ID "%I64u"。可能是在群集中有两个或以上 VPN Server 正在使用相同的许可证。请检查每一个 VPN Server 的许可证信息。 +LS_API_AUTH_OK HTTPS API client "%r:%u" (%S): Administration mode: "%S": The embedded HTTPS web server accepted the successful login. Username: "%S", Method: "%S", Path: "%S" +LS_API_AUTH_ERROR HTTPS API client "%r:%u" (%S): The embedded HTTPS web server refused a login attempt. Username: "%S", Method: "%S", Path: "%S" +LS_API_RPC_CALL HTTPS API client "%r:%u" (%S): The client called a JSON-API. Method: "%S", Returned error code: %u (0 = success), Returned error message: "%s" # (OpenVPN Logs) @@ -2102,6 +2108,7 @@ L3_SWITCH_STOP 虚拟 3 层交换机 "%S" 终止。 #关于Microsoft.c +MS_VIRTUAL 专有的虚拟/内部接口 MS_ETHERNET 以太网接口 MS_TOKENRING 令牌环接口 MS_FDDI FDDI 接口 @@ -2310,7 +2317,8 @@ STATIC9 您可以通过代理服务器连接到 VPN Server。 STATIC10 代理类型(&T): R_DIRECT_TCP 直接 TCP/IP 连接(无代理)(&D) R_HTTPS 通过 HTTP 代理服务器连接(&T) -R_SOCKS 通过 SOCKS 代理服务器连接(&S) +R_SOCKS 通过 SOCKS4 代理服务器连接(&S) +R_SOCKS5 通过 SOCKS5 代理服务器连接(&S) B_PROXY_CONFIG 代理服务器设置(&R) STATIC11 服务端证书验证选项(&F): R_CHECK_CERT 总是验证服务端证书(&C) @@ -2352,12 +2360,22 @@ STATIC2 主机名(&H): STATIC3 端口(&A): STATIC4 用户名(&U): STATIC5 密码(&P): +B_HTTP_HEADER Custom HTTP header values IDOK 确定(&O) IDCANCEL 取消 STATIC6 (可选) STATIC7 (可选) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 高级设置 STATIC1 为系统管理员,和在网络,通信协议,安全方面有一定了解的用户提供了可选择的设置。可以由此来自定义 VPN 通信协议设置。为系统管理员和专家在网络、通信协议和安全方面提供可选设置。自定义 VPN 协议的通信设置。 @@ -2452,7 +2470,7 @@ STATIC7 保持互联网连接功能(&K) PREFIX D_ABOUT S_INFO1 SoftEther VPN %u.0 Developer Edition (Ver %u.%02u, Build %u) -S_INFO2 Open-Source VPN Software for Academic Purpose, under the GPLv2 License.\r\nCopyright (c) 2012-%u SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S +S_INFO2 Licensed under the Apache License, Version 2.0.\r\nCopyright (c) 2012-%u all contributors on SoftEther VPN project in GitHub. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S S_INFO3 This product includes the following software components:\r\nBitVisor: Copyright (c) 2007, 2008 University of Tsukuba. Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. All rights reserved. / Microsoft(R) C Runtime Library: (c) 2007 Microsoft Corporation. All Rights Reserved. / PKCS #11 Cryptographic Token Interface (Cryptoki): Copyright (c) RSA Security Inc. / WinPcap: Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy). All rights reserved. / libedit: Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. / libiconv: Copyright (C) 2007 Free Software Foundation, Inc. / ncurses: Copyright (c) 1998-2005, 2006 Free Software Foundation, Inc. / OpenSSL: Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). / zlib: (C) 1995-2004 Jean-loup Gailly and Mark Adler. / Special Thanks to: Software Laboratory, Academic Computing Communication Center, Industrial Liaison and Cooperative Research Center and Professor Yasushi Shinjo in University of Tsukuba, Japan. S_INFO4 此 VPN 服务器作为的一个学术研究且由 (http://www.softether.org/) 为公众利益免费发布的。本软件是日本筑波大学 SoftEther 项目下开发的免费软件,无任何担保。开发人员、版权所有者或分销商在任何情况下对于使用本软件的任何索赔、损害赔偿或其他情况不承担责任。\r\n\r\nSoftEther VPN 是日本政府的研究和开发项目的一项工作,由日本的经济、贸易和工业部资助,由信息化推进机构管理。 IDCANCEL 确定(&O) @@ -2525,7 +2543,8 @@ STATIC9 您可以通过代理服务器连接到 VPN Server。 STATIC10 代理类型(&T): R_DIRECT_TCP 直接 TCP/IP 连接 (无代理) (&D) R_HTTPS 通过 HTTP 代理服务器连接(&T) -R_SOCKS 通过 SOCKS 代理服务器连接(&O) +R_SOCKS 通过 SOCKS4 代理服务器连接(&O) +R_SOCKS5 通过 SOCKS4 代理服务器连接(&O) B_PROXY_CONFIG 代理服务器设置(&R) STATIC11 选择管理模式并输入密码(&M) STATIC12 您可以使用服务端管理模式或虚拟 HUB 管理模式连接到 VPN Server。\r\n\r\n服务器管理模式允许您管理整个 VPN Server 和所有虚拟 HUB 。\r\n\r\n虚拟 HUB 管理模式允许您只能管理您拥有权限的一个虚拟 HUB 。 @@ -3877,7 +3896,7 @@ S_4 指定用户名连接到虚拟 HUB 的方式,和通过使用克隆服 B_IPSEC IPsec 服务器配置(&P) S_13 OpenVPN 克隆服务器功能 IDOK 确定(&O) -IDCANCEL 取消l +IDCANCEL 取消 PREFIX D_SM_DDNS @@ -4110,7 +4129,8 @@ STATIC9 您可以通过代理服务器连接 STATIC10 代表类型: R_DIRECT_TCP 直接 TCP/IP 连接(无代理)(&D) R_HTTPS 通过 HTTP 代理服务器连接(&T) -R_SOCKS 通过 SOCKS 代理服务器连接(&K) +R_SOCKS 通过 SOCKS4 代理服务器连接(&K) +R_SOCKS5 通过 SOCKS5 代理服务器连接(&K) B_PROXY_CONFIG 代理服务器设置(&R) IDOK 确定(&O) IDCANCEL 取消 @@ -4462,7 +4482,7 @@ CMD_VPNCMD_HOST_2 指定的主机名或正在运行的目标 VPN Client 计算 CMD_VPNCMD_HOST_3 目标 IP 地址的主机名: CMD_VPNCMD_HUB_1 如果通过虚拟 HUB 管理模式连接到服务器,请输入虚拟 HUB 的名称。\n如果通过服务器管理模式连接,无须输入任何内容请按回车键。\n CMD_VPNCMD_HUB_2 指定虚拟 HUB 名称: -CMD_VPNCMD_ABOUT SoftEther VPN 命令行管理工具 (vpncmd 命令)\nDeveloper Edition\n%S\n%S\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n +CMD_VPNCMD_ABOUT SoftEther VPN 命令行管理工具 (vpncmd 命令)\nDeveloper Edition\n%S\n%S\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll rights reserved.\n CMD_VPNCMD_PASSWORD_1 访问被拒绝。可能是密码不正确,或者是您以不正确的管理模式连接。您可以尝试再次输入密码。要取消,请按 Ctrl + D。 CMD_VPNCMD_PASSWORD_2 密码: CMD_VPNCMD_ERROR 发生错误。(错误代码: %u)\n%s @@ -5324,6 +5344,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 指定级联名称来改变设置。 +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone 命令 CMD_CascadeProxyNone 将级联的连接方法设置为直接与 TCP/IP 连接 CMD_CascadeProxyNone_Help 指定已经在当前虚拟 HUB 注册的级联连接,当此连接和 VPN Server 之间通信时,设置连接方法为 [直接与 TCP/IP 连接],而不通过代理服务器。\n此命令在集群虚拟 HUB 中不能运行。 @@ -5342,15 +5391,24 @@ CMD_CascadeProxyHttp_PASSWORD 如果连接到 HTTP 代理服务器时需要用 CMD_CascadeProxyHttp_Prompt_Server 代理服务器主机名和端口号: - # CascadeProxySocks 命令 -CMD_CascadeProxySocks 将级联连接方法设定为通过 SOCKS 代理服务器 -CMD_CascadeProxySocks_Help 指定已经在当前虚拟 HUB 注册的级联连接,当此连接和 VPN Server 之间通信时,设置连接方法为 [通过 SOCKS 代理服务器],设置 SOCKS8 代理服务器的主机名和端口号,用户名和密码 (如果需要)。\nSOCKS 服务器,需与 SOCKS 第 4 版想匹配。\n此命令在集群虚拟 HUB 中不能运行。 +CMD_CascadeProxySocks 将级联连接方法设定为通过 SOCKS4 代理服务器 +CMD_CascadeProxySocks_Help 指定已经在当前虚拟 HUB 注册的级联连接,当此连接和 VPN Server 之间通信时,设置连接方法为 [通过 SOCKS4 代理服务器],设置 SOCKS4 代理服务器的主机名和端口号,用户名和密码 (如果需要)。\n此命令在集群虚拟 HUB 中不能运行。 CMD_CascadeProxySocks_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_CascadeProxySocks_[name] 指定级联名称来改变设置。 CMD_CascadeProxySocks_SERVER 按照 [主机名:端口号] 的格式,设定代理服务器主机名或 IP 地址和端口号。 -CMD_CascadeProxySocks_USERNAME 如果连接到 SOCKS 代理服务器时需要用户验证,则指定用户名。同时设定密码和参数。如果没有设定用户名和密码参数,则不需要设置用户身份验证。 -CMD_CascadeProxySocks_PASSWORD 如果连接到 SOCKS 代理服务器时需要用户验证,则指定密码。/USERNAME,参数等同时设定。 +CMD_CascadeProxySocks_USERNAME 如果连接到 SOCKS4 代理服务器时需要用户验证,则指定用户名。同时设定密码和参数。如果没有设定用户名和密码参数,则不需要设置用户身份验证。 +CMD_CascadeProxySocks_PASSWORD 如果连接到 SOCKS4 代理服务器时需要用户验证,则指定密码。/USERNAME,参数等同时设定。 + + +# CascadeProxySocks5 命令 +CMD_CascadeProxySocks5 将级联连接方法设定为通过 SOCKS5 代理服务器 +CMD_CascadeProxySocks5_Help 指定已经在当前虚拟 HUB 注册的级联连接,当此连接和 VPN Server 之间通信时,设置连接方法为 [通过 SOCKS5 代理服务器],设置 SOCKS5 代理服务器的主机名和端口号,用户名和密码 (如果需要)。\n此命令在集群虚拟 HUB 中不能运行。 +CMD_CascadeProxySocks5_Args CascadeProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks5_[name] 指定级联名称来改变设置。 +CMD_CascadeProxySocks5_SERVER 按照 [主机名:端口号] 的格式,设定代理服务器主机名或 IP 地址和端口号。 +CMD_CascadeProxySocks5_USERNAME 如果连接到 SOCKS5 代理服务器时需要用户验证,则指定用户名。同时设定密码和参数。如果没有设定用户名和密码参数,则不需要设置用户身份验证。 +CMD_CascadeProxySocks5_PASSWORD 如果连接到 SOCKS5 代理服务器时需要用户验证,则指定密码。/USERNAME,参数等同时设定。 # CascadeServerCertEnable 命令 @@ -6266,6 +6324,24 @@ CMD_OpenVpnMakeConfig_OK 样本设置文件被保存为 "%s"。您可以解 CMD_OpenVpnMakeConfig_ERROR 本样本设置文件不能保存为 "%s"。该文件名无效。\n +# OpenVpnObfuscationEnable +CMD_OpenVpnObfuscationEnable Enable / Disable the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationEnable_Help This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.\nThe same XOR mask have to be applied to the client, otherwise it will not be able to connect with certain obfuscation methods!\nBeware that you need a special OpenVPN client with the "XOR patch" applied in order to use this function, because it has never been merged in the official OpenVPN repository.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnObfuscationEnable_Args OpenVpnObfuscationEnable [yes|no] [/MASK:mask] +CMD_OpenVpnObfuscationEnable_[yes|no] Specify "yes" to enable the OpenVPN obfuscation function. Specify "no" to disable it. +CMD_OpenVpnObfuscationEnable_MASK Mask used to XOR the bytes in the packet (used for certain obfuscation modes). +CMD_OpenVpnObfuscationEnable_Prompt_[yes|no] Enable OpenVPN packet obfuscation (yes / no): +CMD_OpenVpnObfuscationEnable_Prompt_MASK XOR mask: + + +# OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet Get the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Help Get and show the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Args OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet_PRINT_Enabled OpenVPN obfuscation enabled +CMD_OpenVpnObfuscationGet_PRINT_Mask XOR mask + + # SstpEnable 命令 CMD_SstpEnable 启用/禁用 Microsoft SSTP VPN 克隆服务器功能 CMD_SstpEnable_Help 本 VPN Server 拥有植入在微软 Windows Server 2008 / 2012 中的 MS-SSTP VPN Server 的克隆功能。Windows Vista / 7 / 8 / RT / 10 中的标准 MS-SSTP 用户端可以连接本 VPN Server。\n\n[注意]\n在 VPN Server 上的 SSL 证书 CN 值必须要和指定给客户端的主机名吻合。并且,该证书必须在 SSTP VPN Client 的信任列表中。详情请参见微软相关文件。\n您可以用用 ServerCertRegenerate 命令来取代当前 VPN Server 的证书,形成一个新的,有 CN 值字段的自我认证证书。这样的话,您需要在 SSTP VPN Client 注册这样一个新的自我认证证书作为一个可信任根证书。如果您的确想做这件复杂的事,请考虑购买一个商业权威机构的 SSL 证书,如 VeriSign 或者 GlobalSign。\n\n指定用户名连接到虚拟 HUB 的的方式,使用本克隆服务器功能来为默认虚拟 HUB 的选择规则都与 IPsec 服务器功能相同。详情,请参见 IPsecEnable 命令的帮助。\n\n要执行此命令,您必须具有 VPN Server 管理员权限。\n该命令在 VPN Bridge 上不能运行。\n以集群成员运行的 VPN Server 的虚拟 HUB 不能执行此命令。 @@ -6608,6 +6684,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 指定要更改设置的连接设置名。 +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone 命令 CMD_AccountProxyNone 将连接设置的连接方法直接设置为 TCP/IP 连接 CMD_AccountProxyNone_Help 当指定注册到 VPN Client 的连接设置,将其连接设置与 VPN Server 间进行 VPN 连接时使用的连接方法设置为 [直接 TCP/IP连接],不通过代理服务器。 @@ -6626,15 +6731,24 @@ CMD_AccountProxyHttp_PASSWORD 如果因为连接通过 HTTP 代理服务器而 CMD_AccountProxyHttp_Prompt_Server 代理服务器主机名和端口号: - # AccountProxySocks 命令 -CMD_AccountProxySocks 将连接设置的连接方法设置为通过 SOCKS 代理服务器连接 -CMD_AccountProxySocks_Help 当指定注册到 VPN Client 的连接设置,将其连接设置与 VPN Server 间进行 VPN 连接时使用的连接方法设置为 [通过 SOCKS 服务器连接],并指定要通过的 SOCKS 代理服务器的主机名和端口号,用户名和密码 (如果需要)。\n通过 SOCKS 服务器,必须对应 SOCKS 版本 4。 +CMD_AccountProxySocks 将连接设置的连接方法设置为通过 SOCKS4 代理服务器连接 +CMD_AccountProxySocks_Help 当指定注册到 VPN Client 的连接设置,将其连接设置与 VPN Server 间进行 VPN 连接时使用的连接方法设置为 [通过 SOCKS4 服务器连接],并指定要通过的 SOCKS4 代理服务器的主机名和端口号,用户名和密码 (如果需要)。 CMD_AccountProxySocks_Args AccountProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_AccountProxySocks_[name] 指定要更改设置的连接设置名。 -CMD_AccountProxySocks_SERVER 以 [主机名:端口号] 形式,指定要通过的 SOCKS 代理服务器主机名或 IP 地址和端口号。 -CMD_AccountProxySocks_USERNAME 如果因为连接通过 SOCKS 代理服务器而需要用户认证时,指定用户名。与此同时也指定 /PASSWORD 参数。/USERNAME 和 /PASSWORD 参数没有被指定时,不设置用户身份验证数据。 -CMD_AccountProxySocks_PASSWORD 如果因为连接通过 SOCKS 代理服务器而需要用户认证时,指定密码。与 /USERNAME 参数一起指定。 +CMD_AccountProxySocks_SERVER 以 [主机名:端口号] 形式,指定要通过的 SOCKS4 代理服务器主机名或 IP 地址和端口号。 +CMD_AccountProxySocks_USERNAME 如果因为连接通过 SOCKS4 代理服务器而需要用户认证时,指定用户名。与此同时也指定 /PASSWORD 参数。/USERNAME 和 /PASSWORD 参数没有被指定时,不设置用户身份验证数据。 +CMD_AccountProxySocks_PASSWORD 如果因为连接通过 SOCKS4 代理服务器而需要用户认证时,指定密码。与 /USERNAME 参数一起指定。 + + +# AccountProxySocks5 命令 +CMD_AccountProxySocks5 将连接设置的连接方法设置为通过 SOCKS5 代理服务器连接 +CMD_AccountProxySocks5_Help 当指定注册到 VPN Client 的连接设置,将其连接设置与 VPN Server 间进行 VPN 连接时使用的连接方法设置为 [通过 SOCKS5 服务器连接],并指定要通过的 SOCKS5 代理服务器的主机名和端口号,用户名和密码 (如果需要)。 +CMD_AccountProxySocks5_Args AccountProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks5_[name] 指定要更改设置的连接设置名。 +CMD_AccountProxySocks5_SERVER 以 [主机名:端口号] 形式,指定要通过的 SOCKS5 代理服务器主机名或 IP 地址和端口号。 +CMD_AccountProxySocks5_USERNAME 如果因为连接通过 SOCKS5 代理服务器而需要用户认证时,指定用户名。与此同时也指定 /PASSWORD 参数。/USERNAME 和 /PASSWORD 参数没有被指定时,不设置用户身份验证数据。 +CMD_AccountProxySocks5_PASSWORD 如果因为连接通过 SOCKS5 代理服务器而需要用户认证时,指定密码。与 /USERNAME 参数一起指定。 # AccountServerCertEnable 命令 @@ -6984,7 +7098,7 @@ CMD_Check_Args Check # 关于系统 checker # (包含着一部分奇怪的字符串,不过,是检测字符编码变换用的) -CHECK_TITLE ---------------------------------------------------\nSoftEther VPN 运行环境检查工具\nDeveloper Edition\n\nCopyright (c) SoftEther VPN Project.\nAll Rights Reserved.\n\n +CHECK_TITLE ---------------------------------------------------\nSoftEther VPN 运行环境检查工具\nDeveloper Edition\n\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n CHECK_NOTE 如果运行了此运行环境检测工具的系统通过了测试,SoftEther VPN 软件有较高的运行可能性。检测可能需要一定的时间。请稍候...\n\n CHECK_EXEC_TAG '%s' 的检测中...\n CHECK_PASS [合格] ○ @@ -7049,6 +7163,8 @@ SW_WEB2_TITLE 指定文件夹 SW_UNINSTALLINFO_URL http://selinks.org/ SW_UNINSTALLINFO_PUBLISHER SoftEther VPN Project +SW_KB3033929_REQUIRED 在 Windows 7 以及 Windows Server 2008 R2系统上, SoftEther VPN 的一些功能需要安全更新程序KB3033929。\r\n\r\n如果 KB3033929 未在你的系统中安装, 在安装SoftEther VPN 前请从 Windows Update 或 Microsoft 网站上下载安装该更新程序。 + SW_COMPONENTS_ABOUT_TAG 关于 %s SW_COMPONENTS_REQUIRE_ADMIN 安装需要管理员权限 diff --git a/src/bin/hamcore/strtable_en.stb b/src/bin/hamcore/strtable_en.stb index 4a38acc6..f69fbb94 100644 --- a/src/bin/hamcore/strtable_en.stb +++ b/src/bin/hamcore/strtable_en.stb @@ -1,7 +1,8 @@ # SoftEther VPN String Table -# Copyright (c) SoftEther VPN Project. All Rights Reserved. -# -# http://www.softether.co.jp/ +# Copyright (c) all contributors on SoftEther VPN project in GitHub. +# Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +# +# https://www.softether.org/ ########################################################################### @@ -157,11 +158,11 @@ ERR_91 Unable to disconnect the Virtual Layer 3 Switch session. To delete th ERR_92 A Virtual Layer 3 Switch with the specified name already exists. Specify a different name. ERR_93 Specified Virtual Layer 3 Switch not found. ERR_94 The specified name is invalid. Check if the name contains characters that cannot be used. -ERR_95 Failed to add the Virtual Layer 3 interface. -ERR_96 Failed to delete the Virtual Layer 3 interface. +ERR_95 Failed to add the Virtual Layer 3 interface. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. +ERR_96 Failed to delete the Virtual Layer 3 interface. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. ERR_97 The Virtual Layer 3 interface that is connecting to the destination Virtual Hub of the specified Virtual Layer 3 interface already exists in the Virtual Layer 3 Switch. No more than one Virtual Layer 3 interface that connects to the same Virtual Hub can be defined in a Virtual Layer 3 Switch. -ERR_98 Failed to add routing table entry. -ERR_99 Failed to delete routing table entry. +ERR_98 Failed to add routing table entry. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. +ERR_99 Failed to delete routing table entry. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. ERR_100 The specified routing table entry already exists. ERR_101 The client clock and the server clock are not synchronized with each other. Check the time settings. ERR_102 Unable to start this Virtual Layer 3 Switch. \r\n\r\nTo start the Virtual Layer 3 Switch, at least 1 virtual interface must be defined in the Virtual Layer 3 Switch. @@ -574,7 +575,8 @@ ERRDLG_DEVICE_ERROR The connection with the VPN Server has been disconnected be # Concerning protocols PROTO_DIRECT_TCP Direct TCP/IP Connection PROTO_HTTP_PROXY Connection via HTTP Proxy -PROTO_SOCKS_PROXY Connection via SOCKS Proxy +PROTO_SOCKS_PROXY Connection via SOCKS4 Proxy +PROTO_SOCKS5_PROXY Connection via SOCKS5 Proxy PROTO_SSH Connection via SSH Server PROTO_UNKNOWN Unknown Protocol @@ -936,6 +938,8 @@ CM_STOP_INST_VLAN_1 To install a Virtual Network Adapter on this computer you m CM_STOP_INST_VLAN_2 To install a Virtual Network Adapter on this computer you must start the VPN Client Manager within a "Console Session". \r\n\r\nCurrently, %s is installed on this computer and the current user is not logged into the Console Session but rather is logged in as the remote session (session ID: %u).\r\nTo install a Virtual Network Adapter you must start the VPN Client Manager within a "Console Session". \r\n(Currently the user is not logged on to the Console Session (Session ID: 0).) \r\n\r\nFirst log on to the computer locally by using the user switching function, or the /console switch function that is on the remote desktop, or alternatively the computer's local console device and then start the VPN Client Manager and install the Virtual Network Adapter. CM_SHORTCUT_DESKTOP_MSG To start a connection using the shortcut to the VPN Connection Setting, you must launch the shortcut file within the "Console Session". \r\n\r\nCurrently the user is logged on as the remote session (session ID: %u) and not as the Console Session. CM_HTTP_PROXY_WARNING Connect via HTTP Proxy Server is selected. \r\n\r\nIn many cases, the HTTP proxy server will only allow 2 kinds of TCP port to be used for the connection to the destination server port number, HTTP protocol (TCP port number 80) and HTTPS protocol (TCP port number 443). \r\n(There are also cases when the proxy server does allow a wider choice of TCP port for connection.) \r\n\r\nWhen making a VPN connection via an HTTP proxy server that denies connections to server ports other than HTTP ports or HTTPS ports, you must specify 443 (HTTPS protocol) as the destination VPN Server port number. \r\n\r\nTo check whether the HTTP proxy server you are connecting via allows connection to ports other than port numbers 80 or 443, contact the administrator of the HTTP proxy server. \r\n\r\nCurrently, %d is specified as the destination VPN Server port number. Do you want to change the port number to 443 (HTTPS protocol)?\r\n(The port 443 of the VPN Servers you connect to must be set to listening status and ready for connection.) \r\nIf you are unsure, then contact the system administrator or the network administrator. +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED The password has been changed. CM_ACCOUNT_SETTING_FILE VPN Connection Setting Files (*.VPN)|*.vpn|All Files (*.*)|*.* CM_ACCOUNT_SAVE_TITLE Enter a VPN Connection Setting File's File Name for the Export Destination @@ -1072,7 +1076,7 @@ SVC_HIDE_TRAY_MSG This will hide the tasktray icons when starting %S in user mo # Concerning services (UNIX) -UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start [--foreground] - Start the %S service. '--foreground' parameter prevents switching to daemon mode.\n %S stop - Stop the %S service if the service has been already started.\n\n +UNIX_SVC_HELP %S service program\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n UNIX_SVC_STARTED The %S service has been started.\n UNIX_SVC_STOPPING Stopping the %S service ...\n UNIX_SVC_STOPPED %S service has been stopped.\n @@ -1784,7 +1788,9 @@ LS_LICENSE_NOT_VPNSERVER Connection "%S": License error occurred. The VPN Client LS_LICENSE_NOT_VPNCLUSTER Connection "%S": License error occurred. The license registered on this VPN Server is of a type that prevents the use of the current clustering function and a VPN Client has attempted connection while operating in Cluster mode. You must restart the VPN Server. LS_LICENSE_VIOLATION Connection "%S": A license violation has occurred on the VPN Server and connections are not being received. LS_LICENSE_VIOLATION_DETECTED A license violation has been detected. A different VPN Server is operating with the same server ID "%I64u" as this VPN Server. It is possible that there are two or more VPN Servers in the cluster that are using the same license. Check the license information of each VPN Server. - +LS_API_AUTH_OK HTTPS API client "%r:%u" (%S): Administration mode: "%S": The embedded HTTPS web server accepted the successful login. Username: "%S", Method: "%S", Path: "%S" +LS_API_AUTH_ERROR HTTPS API client "%r:%u" (%S): The embedded HTTPS web server refused a login attempt. Username: "%S", Method: "%S", Path: "%S" +LS_API_RPC_CALL HTTPS API client "%r:%u" (%S): The client called a JSON-API. Method: "%S", Returned error code: %u (0 = success), Returned error message: "%s" # (OpenVPN Logs) LO_PREFIX_RAW OpenVPN Module: @@ -2082,6 +2088,7 @@ L3_SWITCH_STOP The Virtual Layer 3 Switch "%S" terminated. # Concerning Microsoft.c +MS_VIRTUAL Proprietary Virtual/Internal Interface MS_ETHERNET Ethernet Interface MS_TOKENRING Token Ring Interface MS_FDDI FDDI Interface @@ -2290,7 +2297,8 @@ STATIC9 You can connect to a VPN Server via a proxy server. STATIC10 Proxy &Type: R_DIRECT_TCP &Direct TCP/IP Connection (No Proxy) R_HTTPS Connect via H&TTP Proxy Server -R_SOCKS Connect via &SOCKS Proxy Server +R_SOCKS Connect via &SOCKS4 Proxy Server +R_SOCKS5 Connect via &SOCKS5 Proxy Server B_PROXY_CONFIG P&roxy Server Setting STATIC11 Server Certificate Veri&fication Option: R_CHECK_CERT Always Verify Server &Certificate @@ -2332,12 +2340,22 @@ STATIC2 &Host Name: STATIC3 Port: STATIC4 &User Name: STATIC5 &Password: +B_HTTP_HEADER Custom HTTP header values IDOK &OK IDCANCEL Cancel STATIC6 (optional) STATIC7 (optional) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION Advanced Settings STATIC1 Optional settings for system administrators and experts for networking, communication protocol, and security. Customize the VPN protocol communication settings. @@ -2432,7 +2450,7 @@ STATIC7 &Keep Alive Internet Connection Function: PREFIX D_ABOUT S_INFO1 SoftEther VPN %u.0 Developer Edition (Ver %u.%02u, Build %u) -S_INFO2 Open-Source VPN Software for Academic Purpose, under the GPLv2 License.\r\nCopyright (c) 2012-%u SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S +S_INFO2 Licensed under the Apache License, Version 2.0.\r\nCopyright (c) 2012-%u all contributors on SoftEther VPN project in GitHub. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S S_INFO3 This product includes the following software components:\r\nBitVisor: Copyright (c) 2007, 2008 University of Tsukuba. Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. All rights reserved. / Microsoft(R) C Runtime Library: (c) 2007 Microsoft Corporation. All Rights Reserved. / PKCS #11 Cryptographic Token Interface (Cryptoki): Copyright (c) RSA Security Inc. / WinPcap: Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy). All rights reserved. / libedit: Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. / libiconv: Copyright (C) 2007 Free Software Foundation, Inc. / ncurses: Copyright (c) 1998-2005, 2006 Free Software Foundation, Inc. / OpenSSL: Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). / zlib: (C) 1995-2004 Jean-loup Gailly and Mark Adler. / Special Thanks to: Software Laboratory, Academic Computing Communication Center, Industrial Liaison and Cooperative Research Center and Professor Yasushi Shinjo in University of Tsukuba, Japan. S_INFO4 THIS SOFTWARE IS FREEWARE DEVELOPED UNDER THE SOFTETHER VPN PROJECT AT UNIVERSITY OF TSUKUBA, WITHOUT WARRANTY OF AND KIND. IN NO EVENT SHALL THE DEVELOPERS, COPYRIGHT OWNERS OR DISTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY IN ANY WAY OUT OF THE USE OF THIS SOFTWARE.\r\n\r\nSoftEther VPN is a work of the research and development project of Japanese Government, subsidized by Ministry of Economy, Trade and Industry of Japan, administrated by Information Promotion Agency. IDCANCEL &OK @@ -2504,7 +2522,8 @@ STATIC9 You can connect to a VPN Server via a proxy server. STATIC10 Proxy &Type: R_DIRECT_TCP &Direct TCP/IP Connection (No Proxy) R_HTTPS Connect via H&TTP Proxy Server -R_SOCKS Connect via S&OCKS Proxy Server +R_SOCKS Connect via S&OCKS4 Proxy Server +R_SOCKS5 Connect via S&OCKS5 Proxy Server B_PROXY_CONFIG P&roxy Server Setting STATIC11 Select Administration &Mode and Enter Password STATIC12 You can connect to VPN Server using either Server Admin Mode or Virtual Hub Admin Mode.\r\n\r\nServer Admin Mode allows you manage entire VPN Server and all Virtual Hubs. \r\n\r\nVirtual Hub Admin Mode allows you manage only one Virtual Hub for which you hold privileges. @@ -4094,7 +4113,8 @@ STATIC9 You can connect via a proxy server. STATIC10 Proxy &Type: R_DIRECT_TCP &Direct TCP/IP Connection (No Proxy) R_HTTPS Connect via H&TTP Proxy Server -R_SOCKS Connect via S&OCKS Proxy Server +R_SOCKS Connect via S&OCKS4 Proxy Server +R_SOCKS5 Connect via S&OCKS5 Proxy Server B_PROXY_CONFIG P&roxy Server Setting IDOK &OK IDCANCEL Cancel @@ -4441,12 +4461,12 @@ CMD_VPNCMD_CMD If the optional command 'commands...' is included after /CMD, t CMD_VPNCMD_CSV You can specify this option to enable CSV outputs. Results of each command will be printed in the CSV format. It is useful for processing the results by other programs. CMD_VPNCMD_CS_1 By using vpncmd program, the following can be achieved. \n\n1. Management of VPN Server or VPN Bridge \n2. Management of VPN Client\n3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)\n\n CMD_VPNCMD_CS_2 Select 1, 2 or 3: -CMD_VPNCMD_HOST_1 Specify the host name or IP address of the computer that the destination VPN Server or VPN Bridge is operating on. \nBy specifying according to the format 'host name:port number', you can also specify the port number. \n(When the port number is unspecified, 443 is used.)\nIf nothing is input and the Enter key is pressed, the connection will be made to the port number 8888 of localhost (this computer). +CMD_VPNCMD_HOST_1 Specify the host name or IP address of the computer that the destination VPN Server or VPN Bridge is operating on. \nBy specifying according to the format 'host name:port number', you can also specify the port number. \n(When the port number is unspecified, 443 is used.)\nIf nothing is input and the Enter key is pressed, the connection will be made to the port number 443 of localhost (this computer). CMD_VPNCMD_HOST_2 Specify the host name or IP address of the computer that the destination VPN Client is operating on. \nIf nothing is input and Enter is pressed, connection will be made to localhost (this computer). CMD_VPNCMD_HOST_3 Hostname of IP Address of Destination: CMD_VPNCMD_HUB_1 If connecting to the server by Virtual Hub Admin Mode, please input the Virtual Hub name. \nIf connecting by server admin mode, please press Enter without inputting anything. CMD_VPNCMD_HUB_2 Specify Virtual Hub Name: -CMD_VPNCMD_ABOUT SoftEther VPN Command Line Management Utility (vpncmd command)\nDeveloper Edition\n%S\n%S\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n +CMD_VPNCMD_ABOUT SoftEther VPN Command Line Management Utility (vpncmd command)\nDeveloper Edition\n%S\n%S\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll rights reserved.\n CMD_VPNCMD_PASSWORD_1 Access has been denied. Possibly the password is incorrect, or perhaps you are connecting by an incorrect admin mode. You can try inputting the password again. To cancel, press Ctrl+D. CMD_VPNCMD_PASSWORD_2 Password: CMD_VPNCMD_ERROR Error occurred. (Error code: %u)\n%s @@ -5307,6 +5327,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] Specify the name of the Cascade Connection whose setting you want to change. +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone command CMD_CascadeProxyNone Specify Direct TCP/IP Connection as the Connection Method of Cascade Connection CMD_CascadeProxyNone_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. @@ -5325,15 +5374,24 @@ CMD_CascadeProxyHttp_PASSWORD When user authentication is required to connect to CMD_CascadeProxyHttp_Prompt_Server Proxy Server Host Name and Port Number: - # CascadeProxySocks command -CMD_CascadeProxySocks Set Connection Method of Cascade Connection to be via an SOCKS Proxy Server -CMD_CascadeProxySocks_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Connect via SOCKS Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS Proxy server to communicate via as well as a user name and password (when required). \nThe on-route SOCKS server must be compatible with SOCKS Version 4. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeProxySocks Set Connection Method of Cascade Connection to be via a SOCKS4 Proxy Server +CMD_CascadeProxySocks_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Connect via SOCKS4 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS4 Proxy server to communicate via as well as a user name and password (when required). \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. CMD_CascadeProxySocks_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_CascadeProxySocks_[name] Specify the name of the Cascade Connection whose setting you want to change. -CMD_CascadeProxySocks_SERVER Specify the host name or IP address, and port number of the on-route SOCKS proxy server using the format "host name:port number". -CMD_CascadeProxySocks_USERNAME When user authentication is required to connect to the on-route SOCKS proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. -CMD_CascadeProxySocks_PASSWORD When user authentication is required to connect to the on-route SOCKS proxy server, specify the password. Specify this together with the /USERNAME parameter. +CMD_CascadeProxySocks_SERVER Specify the host name or IP address, and port number of the on-route SOCKS4 proxy server using the format "host name:port number". +CMD_CascadeProxySocks_USERNAME When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_CascadeProxySocks_PASSWORD When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the password. Specify this together with the /USERNAME parameter. + + +# CascadeProxySocks5 command +CMD_CascadeProxySocks5 Set Connection Method of Cascade Connection to be via a SOCKS5 Proxy Server +CMD_CascadeProxySocks5_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Connect via SOCKS5 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS Proxy server to communicate via as well as a user name and password (when required). \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeProxySocks5_Args CascadeProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks5_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeProxySocks5_SERVER Specify the host name or IP address, and port number of the on-route SOCKS5 proxy server using the format "host name:port number". +CMD_CascadeProxySocks5_USERNAME When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_CascadeProxySocks5_PASSWORD When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the password. Specify this together with the /USERNAME parameter. # CascadeServerCertEnable command @@ -6250,6 +6308,24 @@ CMD_OpenVpnMakeConfig_OK The sample setting file was saved as "%s". You can un CMD_OpenVpnMakeConfig_ERROR The sample setting files were unable to be saved as "%s". The filename might be invalid.\n +# OpenVpnObfuscationEnable +CMD_OpenVpnObfuscationEnable Enable / Disable the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationEnable_Help This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.\nThe same XOR mask have to be applied to the client, otherwise it will not be able to connect with certain obfuscation methods!\nBeware that you need a special OpenVPN client with the "XOR patch" applied in order to use this function, because it has never been merged in the official OpenVPN repository.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnObfuscationEnable_Args OpenVpnObfuscationEnable [yes|no] [/MASK:mask] +CMD_OpenVpnObfuscationEnable_[yes|no] Specify "yes" to enable the OpenVPN obfuscation function. Specify "no" to disable it. +CMD_OpenVpnObfuscationEnable_MASK Mask used to XOR the bytes in the packet (used for certain obfuscation modes). +CMD_OpenVpnObfuscationEnable_Prompt_[yes|no] Enable OpenVPN packet obfuscation (yes / no): +CMD_OpenVpnObfuscationEnable_Prompt_MASK XOR mask: + + +# OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet Get the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Help Get and show the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Args OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet_PRINT_Enabled OpenVPN obfuscation enabled +CMD_OpenVpnObfuscationGet_PRINT_Mask XOR mask + + # SstpEnable command CMD_SstpEnable Enable / Disable Microsoft SSTP VPN Clone Server Function CMD_SstpEnable_Help This VPN Server has the clone functions of MS-SSTP VPN Server which is on Windows Server 2008 / 2012 by Microsoft Corporation. Standard MS-SSTP Clients in Windows Vista / 7 / 8 / RT / 10 can connect to this VPN Server.\n\n[Caution]\nThe value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the client, and that certificate must be in the trusted list on the SSTP VPN client. For details refer the Microsoft's documents.\nYou can use the ServerCertRegenerate command to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. In that case, you have to register such a new self-signed certificate on the SSTP VPN Client as a trusted root certificate. If you do not want to do such a bother tasks, please consider to purchase a SSL certificate provided by commercial authority such as VeriSign or GlobalSign.\n\nThe manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. For details, please see the help of the IPsecEnable command.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. @@ -6594,6 +6670,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone command CMD_AccountProxyNone Specify Direct TCP/IP Connection as the Connection Method of VPN Connection Setting CMD_AccountProxyNone_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. @@ -6612,15 +6717,24 @@ CMD_AccountProxyHttp_PASSWORD When user authentication is required to connect to CMD_AccountProxyHttp_Prompt_Server Proxy Server Host Name and Port Number: - # AccountProxySocks command -CMD_AccountProxySocks Set Connection Method of VPN Connection Setting to be via an SOCKS Proxy Server -CMD_AccountProxySocks_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Connect via SOCKS Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS Proxy server to communicate via as well as a user name and password (when required). \nThe on-route SOCKS server must be compatible with SOCKS Version 4. +CMD_AccountProxySocks Set Connection Method of VPN Connection Setting to be via a SOCKS4 Proxy Server +CMD_AccountProxySocks_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Connect via SOCKS4 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS4 Proxy server to communicate via as well as a user name and password (when required). CMD_AccountProxySocks_Args AccountProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_AccountProxySocks_[name] Specify the name of the VPN Connection Setting whose setting you want to change. -CMD_AccountProxySocks_SERVER Specify the host name or IP address, and port number of the on-route SOCKS proxy server using the format [host name:port number]. -CMD_AccountProxySocks_USERNAME When user authentication is required to connect to the on-route SOCKS proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. -CMD_AccountProxySocks_PASSWORD When user authentication is required to connect to the on-route SOCKS proxy server, specify the password. Specify this together with the /USERNAME parameter. +CMD_AccountProxySocks_SERVER Specify the host name or IP address, and port number of the on-route SOCKS4 proxy server using the format [host name:port number]. +CMD_AccountProxySocks_USERNAME When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_AccountProxySocks_PASSWORD When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the password. Specify this together with the /USERNAME parameter. + + +# AccountProxySocks5 command +CMD_AccountProxySocks5 Set Connection Method of VPN Connection Setting to be via a SOCKS5 Proxy Server +CMD_AccountProxySocks5_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Connect via SOCKS5 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS5 Proxy server to communicate via as well as a user name and password (when required). +CMD_AccountProxySocks5_Args AccountProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks5_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountProxySocks5_SERVER Specify the host name or IP address, and port number of the on-route SOCKS5 proxy server using the format [host name:port number]. +CMD_AccountProxySocks5_USERNAME When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_AccountProxySocks5_PASSWORD When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the password. Specify this together with the /USERNAME parameter. # AccountServerCertEnable command @@ -7042,6 +7156,8 @@ SW_WEB2_TITLE Specify Files SW_UNINSTALLINFO_URL http://selinks.org/ SW_UNINSTALLINFO_PUBLISHER SoftEther VPN Project +SW_KB3033929_REQUIRED In Windows 7 and Windows Server 2008 R2, some SoftEther VPN functions require the Microsoft's Windows Update module KB3033929 installed.\r\n\r\nIf KB3033929 is not installed in your Windows, please install it from Windows Update or Microsoft website before installing SoftEther VPN. + SW_COMPONENTS_ABOUT_TAG About %s SW_COMPONENTS_REQUIRE_ADMIN Installation Requires Administrators Privileges diff --git a/src/bin/hamcore/strtable_ja.stb b/src/bin/hamcore/strtable_ja.stb index 25fecdce..e998deba 100644 --- a/src/bin/hamcore/strtable_ja.stb +++ b/src/bin/hamcore/strtable_ja.stb @@ -1,7 +1,8 @@ # SoftEther VPN String Table -# Copyright (c) SoftEther VPN Project. All Rights Reserved. -# -# http://www.softether.co.jp/ +# Copyright (c) all contributors on SoftEther VPN project in GitHub. +# Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +# +# https://www.softether.org/ ########################################################################### @@ -159,11 +160,11 @@ ERR_91 仮想レイヤ 3 スイッチセッションは切断できません ERR_92 指定された名前の仮想レイヤ 3 スイッチは既に存在します。別の名前を指定してください。 ERR_93 指定された名前の仮想レイヤ 3 スイッチが見つかりません。 ERR_94 指定された名前が不正です。使用できない文字が含まれていないかどうかチェックしてください。 -ERR_95 仮想レイヤ 3 インターフェイスの追加に失敗しました。 -ERR_96 仮想レイヤ 3 インターフェイスの削除に失敗しました。 +ERR_95 仮想レイヤ 3 インターフェイスの追加に失敗しました。パラメータが正しいかどうか確認してください。また、仮想レイヤ 3 スイッチが動作中の場合は、仮想レイヤ 3 インターフェイスの追加または削除はできません。仮想レイヤ 3 スイッチを停止してください。 +ERR_96 仮想レイヤ 3 インターフェイスの削除に失敗しました。パラメータが正しいかどうか確認してください。また、仮想レイヤ 3 スイッチが動作中の場合は、仮想レイヤ 3 インターフェイスの追加または削除はできません。仮想レイヤ 3 スイッチを停止してください。 ERR_97 指定された仮想レイヤ 3 インターフェイスの接続先仮想 HUB に接続している仮想レイヤ 3 インターフェイスが仮想レイヤ 3 スイッチの中に既に存在します。1 つの仮想レイヤ 3 スイッチの中では、同一の仮想 HUB に接続する仮想レイヤ 3 インターフェイスは 1 つしか定義できません。 -ERR_98 ルーティングテーブルの追加に失敗しました。 -ERR_99 ルーティングテーブルの削除に失敗しました。 +ERR_98 ルーティングテーブルの追加に失敗しました。パラメータが正しいかどうか確認してください。また、仮想レイヤ 3 スイッチが動作中の場合は、ルーティングテーブルの追加または削除はできません。仮想レイヤ 3 スイッチを停止してください。 +ERR_99 ルーティングテーブルの削除に失敗しました。パラメータが正しいかどうか確認してください。また、仮想レイヤ 3 スイッチが動作中の場合は、ルーティングテーブルの追加または削除はできません。仮想レイヤ 3 スイッチを停止してください。 ERR_100 指定されたルーティングテーブルはすでに存在します。 ERR_101 クライアントとサーバーの間の時計がずれています。時刻設定を確認してください。 ERR_102 この仮想レイヤ 3 スイッチを開始できません。\r\n\r\n仮想レイヤ 3 スイッチを開始するには、最低でも 1 つの仮想インターフェイスが仮想レイヤ 3 スイッチ内に定義されている必要があります。 @@ -452,7 +453,8 @@ ERRDLG_DEVICE_ERROR 仮想 LAN カード (デバイス名: %S) が停止され # プロトコル関係 PROTO_DIRECT_TCP 直接 TCP/IP 接続 PROTO_HTTP_PROXY HTTP プロキシ経由接続 -PROTO_SOCKS_PROXY SOCKS プロキシ経由接続 +PROTO_SOCKS_PROXY SOCKS4 プロキシ経由接続 +PROTO_SOCKS5_PROXY SOCKS5 プロキシ経由接続 PROTO_SSH SSH サーバー経由接続 PROTO_UNKNOWN 不明なプロトコル @@ -939,6 +941,8 @@ CM_STOP_INST_VLAN_1 このコンピュータで仮想 LAN カードのインス CM_STOP_INST_VLAN_2 このコンピュータで仮想 LAN カードのインストール作業を行うには、「コンソールセッション」 上で VPN クライアント接続マネージャを起動する必要があります。\r\n\r\n現在、このコンピュータには%sがインストールされており、現在のユーザーはコンソールセッションではなくリモートセッション (セッション ID: %u) としてログオンしています。\r\n仮想 LAN カードのインストール作業を行うには、コンソールセッション上で VPN クライアント接続マネージャを起動する必要があります。\r\n(現在、コンソールセッション (セッション ID: 0) にはユーザーがログオンしていません。)\r\n\r\nユーザーの切り替え機能を使用するか、リモートデスクトップの /console スイッチ機能を使用するか、またはコンピュータのローカルコンソールデバイスを使用してコンピュータにローカルログオンしてから VPN クライアント接続マネージャを起動し、仮想 LAN カードのインストール作業を行ってください。 CM_SHORTCUT_DESKTOP_MSG 接続設定へのショートカットを使用して接続を開始するには、「コンソールセッション」上でショートカットファイルを起動する必要があります。\r\n\r\n現在のユーザーはコンソールセッションではなくリモートセッション (セッション ID: %u) としてログオンしています。 CM_HTTP_PROXY_WARNING [HTTP プロキシサーバー経由接続] が選択されています。\r\n\r\n多くの場合、HTTP プロキシサーバーは接続先サーバーのポート番号として、HTTP プロトコル (TCP ポート 80 番) および HTTPS プロトコル (TCP ポート 443 番) の 2 種類の TCP ポートに対する接続のみを許可しています。\r\n(プロキシサーバーが任意の TCP ポートに対する接続を許可している場合もあります。)\r\n\r\nHTTP ポートまたは HTTPS ポート以外へのサーバー ポートへの接続を禁止している HTTP プロキシサーバーを経由して VPN 接続を行う場合は、接続先 VPN Server のポート番号は 443 (HTTPS プロトコル) に指定する必要があります。\r\n\r\n経由する HTTP プロキシサーバーが 80 番または 443 番ポート以外への接続を許可しているかどうかを確認するには、HTTP プロキシサーバーの管理者にお問い合わせください。\r\n\r\n現在、接続先 VPN Server のポート番号は %d が指定されていますが、ポート番号を 443 番 (HTTPS プロトコル) に変更しますか?\r\n(接続する VPN Server のポート 443 において接続を待ち受ける設定になっている必要があります。)\r\n不明な場合は、システム管理者またはネットワーク管理者にお問い合わせください。 +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED パスワードが変更されました。 CM_ACCOUNT_SETTING_FILE 接続設定ファイル (*.VPN)|*.vpn|すべてのファイル (*.*)|*.* CM_ACCOUNT_SAVE_TITLE エクスポート先の接続設定ファイル名を入力してください。 @@ -1076,7 +1080,7 @@ SVC_HIDE_TRAY_MSG %S のユーザーモード起動時のタスクトレイア # サービス関係 (UNIX) -UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n +UNIX_SVC_HELP %S service program\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n UNIX_SVC_STARTED The %S service has been started.\n UNIX_SVC_STOPPING Stopping the %S service ...\n UNIX_SVC_STOPPED %S service has been stopped.\n @@ -1788,7 +1792,9 @@ LS_LICENSE_NOT_VPNSERVER コネクション "%S": ライセンスエラーが発 LS_LICENSE_NOT_VPNCLUSTER コネクション "%S": ライセンスエラーが発生しました。この VPN Server には現在クラスタリング機能を使用できない種類のライセンスが登録されていますが、クラスタモードで動作中に VPN Client が接続しようとしました。VPN Server を再起動する必要があります。 LS_LICENSE_VIOLATION コネクション "%S": VPN Server でライセンス違反が発生しているため、接続を受け付けられません。 LS_LICENSE_VIOLATION_DETECTED ライセンス違反を検出しました。別の VPN Server が、この VPN Server と同じサーバー ID "%I64u" で動作しています。クラスタ内に同一のライセンスを使用した 2 台以上の VPN Server が存在する可能性があります。各 VPN Server のライセンス情報を確認してください。 - +LS_API_AUTH_OK HTTPS API クライアント "%r:%u" (%S): 管理モード: "%S" で組み込み HTTPS Web サーバーを用いてログインに成功しました。使用されたユーザー名: "%S", メソッド: "%S", パス: "%S" +LS_API_AUTH_ERROR HTTPS API クライアント "%r:%u" (%S): 組み込み HTTPS Web サーバーを用いてログインに失敗しました。使用されたユーザー名: "%S", メソッド: "%S", パス: "%S" +LS_API_RPC_CALL HTTPS API クライアント "%r:%u" (%S): JSON-API を呼び出しました。メソッド名: "%S", 結果エラーコード: %u (0 = 成功), 結果エラーメッセージ: "%s" # (OpenVPN ログ) LO_PREFIX_RAW OpenVPN モジュール: @@ -2086,6 +2092,7 @@ L3_SWITCH_STOP 仮想レイヤ 3 スイッチ "%S" が終了しました。 # Microsoft.c 関係 +MS_VIRTUAL 独自の仮想/内部インタフェース MS_ETHERNET Ethernet インターフェイス MS_TOKENRING トークンリングインターフェイス MS_FDDI FDDI インターフェイス @@ -2295,7 +2302,8 @@ STATIC9 プロキシサーバーを経由して VPN Server に接続する STATIC10 プロキシの種類(&M): R_DIRECT_TCP 直接 TCP/IP 接続 (プロキシを使わない) (&D) R_HTTPS HTTP プロキシサーバー経由接続(&Q) -R_SOCKS SOCKS プロキシサーバー経由接続(&S) +R_SOCKS SOCKS4 プロキシサーバー経由接続(&S) +R_SOCKS5 SOCKS5 プロキシサーバー経由接続(&S) B_PROXY_CONFIG プロキシサーバーの接続設定(&2) STATIC11 サーバー証明書の検証オプション(&F): R_CHECK_CERT サーバー証明書を必ず検証する(&3) @@ -2337,12 +2345,22 @@ STATIC2 ホスト名(&H): STATIC3 ポート番号(&A): STATIC4 ユーザー名(&U): STATIC5 パスワード(&P): +B_HTTP_HEADER Custom HTTP header values IDOK &OK IDCANCEL キャンセル STATIC6 (オプション) STATIC7 (オプション) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 高度な通信設定 STATIC1 ネットワーク、通信プロトコル、およびセキュリティに関する詳しい知識をお持ちの方とシステム管理者向けのオプションです。VPN プロトコルの通信設定をカスタマイズできます。 @@ -2437,7 +2455,7 @@ STATIC7 インターネット接続の維持機能(&N) PREFIX D_ABOUT S_INFO1 SoftEther VPN %u.0 Developer Edition (Ver %u.%02u, Build %u) -S_INFO2 Open-Source VPN Software for Academic Purpose, under the GPLv2 License.\r\nCopyright (c) 2012-%u SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S +S_INFO2 Licensed under the Apache License, Version 2.0.\r\nCopyright (c) 2012-%u all contributors on SoftEther VPN project in GitHub. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S S_INFO3 This product includes the following software components:\r\nBitVisor: Copyright (c) 2007, 2008 University of Tsukuba. Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. All rights reserved. / Microsoft(R) C Runtime Library: (c) 2007 Microsoft Corporation. All Rights Reserved. / PKCS #11 Cryptographic Token Interface (Cryptoki): Copyright (c) RSA Security Inc. / WinPcap: Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy). All rights reserved. / libedit: Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. / libiconv: Copyright (C) 2007 Free Software Foundation, Inc. / ncurses: Copyright (c) 1998-2005, 2006 Free Software Foundation, Inc. / OpenSSL: Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). / zlib: (C) 1995-2004 Jean-loup Gailly and Mark Adler. / Special Thanks to: Software Laboratory, Academic Computing Communication Center, Industrial Liaison and Cooperative Research Center and Professor Yasushi Shinjo in University of Tsukuba, Japan. S_INFO4 本ソフトウェアは筑波大学 SoftEther VPN プロジェクトで開発されたフリーウェアです。本ソフトウェアは一切の保証がない状態で提供されるものであり、開発および配布元は使用の結果の損害について一切責任を負いません。\r\n\r\nSoftEther VPN ソフトウェアは日本国経済産業省のソフトウェア研究開発プロジェクトの成果物です。IPA (独立行政法人 情報処理推進機構) の未踏ソフトウェア創造事業に採択され開発されました。詳しくは http://www.ipa.go.jp/ をご覧ください。 IDCANCEL &OK @@ -2509,7 +2527,8 @@ STATIC9 プロキシサーバーを経由して VPN Server に接続する STATIC10 プロキシの種類(&Y): R_DIRECT_TCP 直接 TCP/IP 接続 (プロキシを使わない) (&D) R_HTTPS HTTP プロキシサーバー経由接続(&T) -R_SOCKS SOCKS プロキシサーバー経由接続(&K) +R_SOCKS SOCKS4 プロキシサーバー経由接続(&K) +R_SOCKS5 SOCKS5 プロキシサーバー経由接続(&K) B_PROXY_CONFIG プロキシサーバーの接続設定(&R) STATIC11 管理モードの選択とパスワードの入力(&M) STATIC12 VPN Server には、サーバー管理モードと仮想 HUB 管理モードのどちらかのモードで接続できます。\r\n\r\nサーバー管理モードで接続すると、VPN Server の設定とすべての仮想 HUB が管理できます。\r\n\r\n仮想 HUB 管理モードで接続すると、権限を持っている仮想 HUB の管理ができます。 @@ -4101,7 +4120,8 @@ STATIC9 プロキシサーバーを経由してサーバーに接続する STATIC10 プロキシの種類(&Y): R_DIRECT_TCP 直接 TCP/IP 接続 (プロキシを使わない) (&D) R_HTTPS HTTP プロキシサーバー経由接続(&T) -R_SOCKS SOCKS プロキシサーバー経由接続(&K) +R_SOCKS SOCKS4 プロキシサーバー経由接続(&K) +R_SOCKS5 SOCKS5 プロキシサーバー経由接続(&K) B_PROXY_CONFIG プロキシサーバーの接続設定(&R) IDOK &OK IDCANCEL キャンセル @@ -4449,7 +4469,7 @@ CMD_VPNCMD_HOST_2 接続先の VPN Client が動作しているコンピュー CMD_VPNCMD_HOST_3 接続先のホスト名または IP アドレス: CMD_VPNCMD_HUB_1 サーバーに仮想 HUB 管理モードで接続する場合は、仮想 HUB 名を入力してください。\nサーバー管理モードで接続する場合は、何も入力せずに Enter を押してください。 CMD_VPNCMD_HUB_2 接続先の仮想 HUB 名を入力: -CMD_VPNCMD_ABOUT SoftEther VPN コマンドライン管理ユーティリティ (vpncmd コマンド)\nDeveloper Edition\n%S\n%S\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n +CMD_VPNCMD_ABOUT SoftEther VPN コマンドライン管理ユーティリティ (vpncmd コマンド)\nDeveloper Edition\n%S\n%S\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll rights reserved.\n CMD_VPNCMD_PASSWORD_1 アクセスが拒否されました。パスワードが間違っているか、接続する管理モードが正しくない可能性があります。パスワードをもう一度入力することができます。キャンセルする場合は、Ctrl + D を押してください。 CMD_VPNCMD_PASSWORD_2 パスワード: CMD_VPNCMD_ERROR エラーが発生しました。(エラーコード: %u)\n%s @@ -5308,6 +5328,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 設定を変更するカスケード接続の名前を指定します。 +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone コマンド CMD_CascadeProxyNone カスケード接続の接続方法を直接 TCP/IP 接続に設定 CMD_CascadeProxyNone_Help 現在管理している仮想 HUB に登録されているカスケード接続を指定し、そのカスケード接続が VPN Server に対して接続する際に、使用する接続方法を [直接 TCP/IP 接続] に設定し、プロキシサーバーを経由しないようにします。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。 @@ -5326,15 +5375,24 @@ CMD_CascadeProxyHttp_PASSWORD 経由する HTTP プロキシサーバーに接 CMD_CascadeProxyHttp_Prompt_Server プロキシサーバーのホスト名とポート番号: - # CascadeProxySocks コマンド -CMD_CascadeProxySocks カスケード接続の接続方法を SOCKS プロキシサーバー経由接続に設定 -CMD_CascadeProxySocks_Help 現在管理している仮想 HUB に登録されているカスケード接続を指定し、そのカスケード接続が VPN Server に対して接続する際に、使用する接続方法を [SOCKS プロキシサーバー経由接続] に設定し、経由する SOCKS プロキシサーバーのホスト名とポート番号、ユーザー名とパスワード (必要な場合) を指定します。\n経由する SOCKS サーバーは、SOCKS バージョン 4 に対応している必要があります。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。 +CMD_CascadeProxySocks カスケード接続の接続方法を SOCKS4 プロキシサーバー経由接続に設定 +CMD_CascadeProxySocks_Help 現在管理している仮想 HUB に登録されているカスケード接続を指定し、そのカスケード接続が VPN Server に対して接続する際に、使用する接続方法を [SOCKS4 プロキシサーバー経由接続] に設定し、経由する SOCKS4 プロキシサーバーのホスト名とポート番号、ユーザー名とパスワード (必要な場合) を指定します。\n経由する SOCKS4 サーバーは、SOCKS4 バージョン 4 に対応している必要があります。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。 CMD_CascadeProxySocks_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_CascadeProxySocks_[name] 設定を変更するカスケード接続の名前を指定します。 -CMD_CascadeProxySocks_SERVER [ホスト名:ポート番号] の形式で、経由する SOCKS プロキシサーバーのホスト名、または IP アドレスとポート番号を指定します。 -CMD_CascadeProxySocks_USERNAME 経由する SOCKS プロキシサーバーに接続するためにユーザー認証が必要な場合、ユーザー名を指定します。また、同時に /PASSWORD パラメータも指定します。/USERNAME と /PASSWORD パラメータが指定されない場合は、ユーザー認証データを設定しません。 -CMD_CascadeProxySocks_PASSWORD 経由する SOCKS プロキシサーバーに接続するためにユーザー認証が必要な場合、パスワードを指定します。/USERNAME パラメータと共に指定します。 +CMD_CascadeProxySocks_SERVER [ホスト名:ポート番号] の形式で、経由する SOCKS4 プロキシサーバーのホスト名、または IP アドレスとポート番号を指定します。 +CMD_CascadeProxySocks_USERNAME 経由する SOCKS4 プロキシサーバーに接続するためにユーザー認証が必要な場合、ユーザー名を指定します。また、同時に /PASSWORD パラメータも指定します。/USERNAME と /PASSWORD パラメータが指定されない場合は、ユーザー認証データを設定しません。 +CMD_CascadeProxySocks_PASSWORD 経由する SOCKS4 プロキシサーバーに接続するためにユーザー認証が必要な場合、パスワードを指定します。/USERNAME パラメータと共に指定します。 + + +# CascadeProxySocks5 コマンド +CMD_CascadeProxySocks5 カスケード接続の接続方法を SOCKS4 プロキシサーバー経由接続に設定 +CMD_CascadeProxySocks5_Help 現在管理している仮想 HUB に登録されているカスケード接続を指定し、そのカスケード接続が VPN Server に対して接続する際に、使用する接続方法を [SOCKS5 プロキシサーバー経由接続] に設定し、経由する SOCKS5 プロキシサーバーのホスト名とポート番号、ユーザー名とパスワード (必要な場合) を指定します。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。 +CMD_CascadeProxySocks5_Args CascadeProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks5_[name] 設定を変更するカスケード接続の名前を指定します。 +CMD_CascadeProxySocks5_SERVER [ホスト名:ポート番号] の形式で、経由する SOCKS5 プロキシサーバーのホスト名、または IP アドレスとポート番号を指定します。 +CMD_CascadeProxySocks5_USERNAME 経由する SOCKS5 プロキシサーバーに接続するためにユーザー認証が必要な場合、ユーザー名を指定します。また、同時に /PASSWORD パラメータも指定します。/USERNAME と /PASSWORD パラメータが指定されない場合は、ユーザー認証データを設定しません。 +CMD_CascadeProxySocks5_PASSWORD 経由する SOCKS5 プロキシサーバーに接続するためにユーザー認証が必要な場合、パスワードを指定します。/USERNAME パラメータと共に指定します。 # CascadeServerCertEnable コマンド @@ -6257,6 +6315,24 @@ CMD_OpenVpnMakeConfig_OK サンプル設定ファイルを "%s" ファイル CMD_OpenVpnMakeConfig_ERROR サンプル設定ファイルを "%s" ファイルに保存できませんでした。ファイル名が正しくない可能性があります。\n +# OpenVpnObfuscationEnable +CMD_OpenVpnObfuscationEnable Enable / Disable the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationEnable_Help This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.\nThe same XOR mask have to be applied to the client, otherwise it will not be able to connect with certain obfuscation methods!\nBeware that you need a special OpenVPN client with the "XOR patch" applied in order to use this function, because it has never been merged in the official OpenVPN repository.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnObfuscationEnable_Args OpenVpnObfuscationEnable [yes|no] [/MASK:mask] +CMD_OpenVpnObfuscationEnable_[yes|no] Specify "yes" to enable the OpenVPN obfuscation function. Specify "no" to disable it. +CMD_OpenVpnObfuscationEnable_MASK Mask used to XOR the bytes in the packet (used for certain obfuscation modes). +CMD_OpenVpnObfuscationEnable_Prompt_[yes|no] Enable OpenVPN packet obfuscation (yes / no): +CMD_OpenVpnObfuscationEnable_Prompt_MASK XOR mask: + + +# OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet Get the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Help Get and show the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Args OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet_PRINT_Enabled OpenVPN obfuscation enabled +CMD_OpenVpnObfuscationGet_PRINT_Mask XOR mask + + # SstpEnable コマンド CMD_SstpEnable Microsoft SSTP VPN 互換サーバー機能を有効化 / 無効化 CMD_SstpEnable_Help SoftEther VPN Server には Microsoft 社の Windows Server 2008 / 2012 製品に搭載されている MS-SSTP VPN サーバー機能と互換性がある機能が搭載されています。Microsoft SSTP VPN 互換サーバー機能を有効にすると、Windows Vista / 7 / 8 / RT / 10 に標準搭載の MS-SSTP クライアントからこの VPN Server に接続できるようになります。\n\n[ご注意]\nVPN Server の SSL 証明書の CN の値がクライアント側で指定するホスト名と一致し、かつその証明書が信頼されている必要があります。詳しくは Microsoft 社のドキュメントを参照してください。\n指定された CN の値を持つ新しい SSL 証明書 (自己署名証明書) を生成して VPN Server の現在の証明書と置換するためには、ServerCertRegenerate コマンドを使用してください。この場合は、当該証明書を SSTP VPN クライアントのコンピュータの信頼されるルート証明書として登録する必要があります。このような手間をかけたくない場合は、代わりに VeriSign や GlobalSign 社などの市販の証明書業者の SSL 証明書の取得を検討してください。\n\nMicrosoft SSTP VPN 互換サーバー機能で仮想 HUB に接続する場合のユーザー名の指定方法、およびデフォルト仮想 HUB の選択規則は、IPsec サーバー機能と同様です。詳しくは IPsecEnable コマンドのヘルプを参照してください。\n\nこのコマンドを実行するには、VPN Server の管理者権限が必要です。\nこのコマンドは、VPN Bridge では実行できません。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。 @@ -6600,6 +6676,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 設定を変更する接続設定の名前を指定します。 +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone コマンド CMD_AccountProxyNone 接続設定の接続方法を直接 TCP/IP 接続に設定 CMD_AccountProxyNone_Help VPN Client に登録されている接続設定を指定し、その接続設定が VPN Server に対して接続する際に使用する接続方法を [直接 TCP/IP 接続] に設定し、プロキシサーバーを経由しないようにします。 @@ -6618,15 +6723,24 @@ CMD_AccountProxyHttp_PASSWORD 経由する HTTP プロキシサーバーに接 CMD_AccountProxyHttp_Prompt_Server プロキシサーバーのホスト名とポート番号: - # AccountProxySocks コマンド -CMD_AccountProxySocks 接続設定の接続方法を SOCKS プロキシサーバー経由接続に設定 -CMD_AccountProxySocks_Help VPN Client に登録されている接続設定を指定し、その接続設定が VPN Server に対して接続する際に使用する接続方法を [SOCKS プロキシサーバー経由接続] に設定し、経由する SOCKS プロキシサーバーのホスト名とポート番号、ユーザー名とパスワード (必要な場合) を指定します。\n経由する SOCKS サーバーは、SOCKS バージョン 4 に対応している必要があります。 +CMD_AccountProxySocks 接続設定の接続方法を SOCKS4 プロキシサーバー経由接続に設定 +CMD_AccountProxySocks_Help VPN Client に登録されている接続設定を指定し、その接続設定が VPN Server に対して接続する際に使用する接続方法を [SOCKS4 プロキシサーバー経由接続] に設定し、経由する SOCKS4 プロキシサーバーのホスト名とポート番号、ユーザー名とパスワード (必要な場合) を指定します。 CMD_AccountProxySocks_Args AccountProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_AccountProxySocks_[name] 設定を変更する接続設定の名前を指定します。 -CMD_AccountProxySocks_SERVER [ホスト名:ポート番号] の形式で、経由する SOCKS プロキシサーバーのホスト名、または IP アドレスとポート番号を指定します。 -CMD_AccountProxySocks_USERNAME 経由する SOCKS プロキシサーバーに接続するためにユーザー認証が必要な場合、ユーザー名を指定します。また、同時に /PASSWORD パラメータも指定します。/USERNAME と /PASSWORD パラメータが指定されない場合は、ユーザー認証データを設定しません。 -CMD_AccountProxySocks_PASSWORD 経由する SOCKS プロキシサーバーに接続するためにユーザー認証が必要な場合、パスワードを指定します。/USERNAME パラメータと共に指定します。 +CMD_AccountProxySocks_SERVER [ホスト名:ポート番号] の形式で、経由する SOCKS4 プロキシサーバーのホスト名、または IP アドレスとポート番号を指定します。 +CMD_AccountProxySocks_USERNAME 経由する SOCKS4 プロキシサーバーに接続するためにユーザー認証が必要な場合、ユーザー名を指定します。また、同時に /PASSWORD パラメータも指定します。/USERNAME と /PASSWORD パラメータが指定されない場合は、ユーザー認証データを設定しません。 +CMD_AccountProxySocks_PASSWORD 経由する SOCKS4 プロキシサーバーに接続するためにユーザー認証が必要な場合、パスワードを指定します。/USERNAME パラメータと共に指定します。 + + +# AccountProxySocks5 コマンド +CMD_AccountProxySocks5 接続設定の接続方法を SOCKS5 プロキシサーバー経由接続に設定 +CMD_AccountProxySocks5_Help VPN Client に登録されている接続設定を指定し、その接続設定が VPN Server に対して接続する際に使用する接続方法を [SOCKS5 プロキシサーバー経由接続] に設定し、経由する SOCKS5 プロキシサーバーのホスト名とポート番号、ユーザー名とパスワード (必要な場合) を指定します。 +CMD_AccountProxySocks5_Args AccountProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks5_[name] 設定を変更する接続設定の名前を指定します。 +CMD_AccountProxySocks5_SERVER [ホスト名:ポート番号] の形式で、経由する SOCKS5 プロキシサーバーのホスト名、または IP アドレスとポート番号を指定します。 +CMD_AccountProxySocks5_USERNAME 経由する SOCKS5 プロキシサーバーに接続するためにユーザー認証が必要な場合、ユーザー名を指定します。また、同時に /PASSWORD パラメータも指定します。/USERNAME と /PASSWORD パラメータが指定されない場合は、ユーザー認証データを設定しません。 +CMD_AccountProxySocks5_PASSWORD 経由する SOCKS5 プロキシサーバーに接続するためにユーザー認証が必要な場合、パスワードを指定します。/USERNAME パラメータと共に指定します。 # AccountServerCertEnable コマンド @@ -6974,7 +7088,7 @@ CMD_Check_Args Check # システムチェッカ関係 # (一部奇妙な文字列が含まれていますが、文字コード変換のチェック用です) -CHECK_TITLE ---------------------------------------------------\nSoftEther VPN 動作環境チェックツール\nDeveloper Edition\n\nCopyright (c) SoftEther VPN Project.\nAll Rights Reserved.\n\n +CHECK_TITLE ---------------------------------------------------\nSoftEther VPN 動作環境チェックツール\nDeveloper Edition\n\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n CHECK_NOTE この動作環境チェックツールを実行したシステムがテストに合格した場合は、SoftEther VPN ソフトウェアが動作する可能性が高いです。チェックにはしばらく時間がかかる場合があります。そのままお待ちください...\n\n CHECK_EXEC_TAG '%s' のチェック中...\n CHECK_PASS [合格] ○ @@ -7044,6 +7158,8 @@ SW_WEB2_TITLE ファイルの指定 SW_UNINSTALLINFO_URL http://selinks.org/ SW_UNINSTALLINFO_PUBLISHER SoftEther VPN Project +SW_KB3033929_REQUIRED Windows 7 および Windows Server 2008 R2 では、SoftEther VPN の一部の機能を利用するためには、Microsoft 社の Windows Update プログラム KB3033929 がインストールされている必要があります。\r\n\r\nKB3033929 がインストールされていない場合は、SoftEther VPN をインストールする前に、Windows Update または Microsoft 社の Web サイトから KB3033929 をインストールをしてください。 + SW_COMPONENTS_ABOUT_TAG 「%s」とは SW_COMPONENTS_REQUIRE_ADMIN インストールには管理者権限が必要です diff --git a/src/bin/hamcore/strtable_ko.stb b/src/bin/hamcore/strtable_ko.stb index 7cfdd444..b462924b 100644 --- a/src/bin/hamcore/strtable_ko.stb +++ b/src/bin/hamcore/strtable_ko.stb @@ -1,7 +1,8 @@ # SoftEther VPN String Table -# Copyright (c) SoftEther VPN Project. All Rights Reserved. -# -# http://www.softether.co.jp/ +# Copyright (c) all contributors on SoftEther VPN project in GitHub. +# Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +# +# https://www.softether.org/ # # KOREAN TRANSLATION by Jioh L. Jung (ziozzang@gmail.com) # - Powered by Google Translator (From Japanese to Korean) @@ -163,11 +164,11 @@ ERR_91 가상 레이어 3 스위치 연결이 끊어 수 없습니다. 세션을 ERR_92 지정된 이름의 가상 레이어 3 스위치는 이미 존재합니다. 다른 이름을 지정하십시오. ERR_93 지정된 이름의 가상 레이어 3 스위치가 없습니다. ERR_94 지정된 이름이 잘못되었습니다. 사용할 수없는 문자가 포함되어 있는지 확인하십시오. -ERR_95 가상 레이어 3 인터페이스의 추가에 실패했습니다. -ERR_96 가상 레이어 3 인터페이스의 삭제에 실패했습니다. +ERR_95 가상 레이어 3 인터페이스의 추가에 실패했습니다. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. +ERR_96 가상 레이어 3 인터페이스의 삭제에 실패했습니다. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. ERR_97 지정된 가상 레이어 3 인터페이스가 연결된 가상 HUB에 연결하는 가상 레이어 3 인터페이스가 가상 레이어 3 스위치에 이미 존재합니다. 하나의 가상 레이어 3 스위치에서 동일한 가상 HUB에 연결하는 가상 레이어 3 인터페이스는 하나 밖에 정의 할 수 없습니다. -ERR_98 라우팅 테이블 추가에 실패했습니다. -ERR_99 라우팅 테이블의 삭제에 실패했습니다. +ERR_98 라우팅 테이블 추가에 실패했습니다. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. +ERR_99 라우팅 테이블의 삭제에 실패했습니다. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. ERR_100 지정된 라우팅 테이블이 이미 존재합니다. ERR_101 클라이언트와 서버 사이의 시계가 어긋나 있습니다. 시간 설정을 확인하십시오. ERR_102 이 가상 레이어 3 스위치를 시작할 수 없습니다. \r\n\r\n 가상 레이어 3 스위치를 시작하려면 최소한 1 개의 가상 인터페이스가 가상 레이어 3 스위치에 정의되어 있어야합니다. @@ -456,7 +457,8 @@ ERRDLG_DEVICE_ERROR 가상 LAN 카드 (장치 이름:%S)가 중지 된 때문에 # 프로토콜 관계 PROTO_DIRECT_TCP 직접 TCP/IP 연결 PROTO_HTTP_PROXY HTTP 프록시를 통해 연결 -PROTO_SOCKS_PROXY SOCKS 프록시를 통해 연결 +PROTO_SOCKS_PROXY SOCKS4 프록시를 통해 연결 +PROTO_SOCKS5_PROXY SOCKS5 프록시를 통해 연결 PROTO_SSH SSH 서버를 통해 연결 PROTO_UNKNOWN 알 수없는 프로토콜 @@ -940,6 +942,8 @@ CM_STOP_INST_VLAN_1 이 컴퓨터에서 가상 LAN 카드의 설치 작업을 CM_STOP_INST_VLAN_2 이 컴퓨터에서 가상 LAN 카드의 설치 작업을 수행하려면 "콘솔 세션"에 VPN 클라이언트 연결 관리자를 시작해야합니다. \r\n\r\n 현재이 컴퓨터는 %s가 설치되어 있으며, 현재 사용자가 콘솔 세션이 아닌 원격 세션 (세션 ID:%u)로 로그온합니다. \r\n 가상 LAN 카드의 설치 작업은 콘솔 세션에서 VPN 클라이언트 연결 관리자를 시작해야합니다. \r\n (현재 콘솔 세션 (세션 ID:0)은 사용자가 로그온하지 않습니다.) \r\n\r\n 사용자 전환 기능을 사용하거나 원격 데스크톱의/console 스위치 기능 를 사용하거나 컴퓨터의 로컬 콘솔 장치를 사용하여 컴퓨터에 로컬로 로그온 한 후 VPN 클라이언트 연결 관리자를 시작하고 가상 LAN 카드의 설치 작업을 수행합니다. CM_SHORTCUT_DESKTOP_MSG 연결 설정의 단축키를 사용하여 연결을 시작하려면 "콘솔 세션"에 바로 가기 파일을 시작해야합니다. \r\n\r\n 현재 사용자가 콘솔 세션이 아닌 원격 세션 (세션 ID:%u)로 로그온합니다. CM_HTTP_PROXY_WARNING HTTP 프록시 서버를 통해 연결이 선택되어 있습니다. \r\n\r\n 종종 HTTP 프록시 서버는 연결할 서버의 포트 번호로 HTTP 프로토콜 (TCP 80 번 포트) 및 HTTPS 프로토콜 (TCP 포트 443)의 2 종류의 TCP 포트에 연결 만 를 허용하고 있습니다. \r\n (프록시 서버가 임의의 TCP 포트에 대한 연결을 허용하는 경우도 있습니다.) \r\n\r\nHTTP 또는 HTTPS 포트 이외의 서버 포트에 연결을 금지하고있는 HTTP 프록시 서버를 통해 VPN 연결을 할 경우 연결된 VPN Server의 포트 번호는 443 (HTTPS 프로토콜)에 지정해야합니다. \r\n\r\n 통해 HTTP 프록시 서버가 80 번 또는 443 번 포트 이외의 연결을 허용하는지 여부를 확인하려면 HTTP 프록시 서버의 관리자에게 문의하십시오. \r\n\r\n 현재 연결된 VPN Server의 포트 번호는 %d가 지정되어 있지만 포트 번호를 443 (HTTPS 프로토콜)로 변경 하시겠습니까? \r\n (연결하는 VPN Server의 포트 443에서 연결을 기다리는 설정되어 있어야합니다.) \r\n 알 수없는 경우 시스템 관리자 또는 네트워크 관리자에게 문의하십시오. +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED 비밀번호가 변경되었습니다. CM_ACCOUNT_SETTING_FILE 연결 설정 파일 (* .VPN)|* .vpn|모든 파일 (*.*)|*.* CM_ACCOUNT_SAVE_TITLE 대상의 연결 설정 파일 이름을 입력하십시오. @@ -1076,7 +1080,7 @@ SVC_HIDE_TRAY_MSG %S 사용자 모드 시작시 시스템 트레이 아이콘을 # 서비스 관계 (UNIX) -UNIX_SVC_HELP %S service program \nCopyright (c) SoftEther VPN Project. All Rights Reserved. \n \n %S command usage:\n %S start - Start the %S service \n %S stop - Stop the %S service if the service has been already started. \n \n +UNIX_SVC_HELP %S service program\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n UNIX_SVC_STARTED The %S service has been started. \n UNIX_SVC_STOPPING Stopping the %S service... \n UNIX_SVC_STOPPED %S service has been stopped. \n @@ -1769,6 +1773,9 @@ LS_LICENSE_NOT_VPNSERVER 연결 "%S": 라이센스 오류가 발생했습니다. LS_LICENSE_NOT_VPNCLUSTER 연결 "%S": 라이센스 오류가 발생했습니다. 이 VPN Server는 현재 클러스터링 기능을 사용할 수없는 종류의 라이센스가 등록되어 있지만 클러스터 모드로 실행 중에 VPN Client가 연결을 시도했습니다. VPN Server를 다시 시작해야합니다. LS_LICENSE_VIOLATION 연결 "%S": VPN Server에서 라이센스 위반이 발생하고 있기 때문에 연결을 받아 들일 수 없습니다. LS_LICENSE_VIOLATION_DETECTED 라이센스 위반을 감지했습니다. 다른 VPN Server가 이 VPN Server와 동일한 서버 ID "%I64u"으로 동작합니다. 클러스터에 동일한 라이센스를 사용하여 두 개 이상의 VPN Server가 있을 수 있습니다. 각 VPN Server의 라이센스 정보를 확인하십시오. +LS_API_AUTH_OK HTTPS API client "%r:%u" (%S): Administration mode: "%S": The embedded HTTPS web server accepted the successful login. Username: "%S", Method: "%S", Path: "%S" +LS_API_AUTH_ERROR HTTPS API client "%r:%u" (%S): The embedded HTTPS web server refused a login attempt. Username: "%S", Method: "%S", Path: "%S" +LS_API_RPC_CALL HTTPS API client "%r:%u" (%S): The client called a JSON-API. Method: "%S", Returned error code: %u (0 = success), Returned error message: "%s" # (OpenVPN 로그) @@ -2063,6 +2070,7 @@ L3_SWITCH_STOP 가상 레이어 3 스위치 "%S"가 종료되었습니다. # Microsoft.c 관계 +MS_VIRTUAL 독점적 인 가상 / 내부 인터페이스 MS_ETHERNET Ethernet 인터페이스 MS_TOKENRING 토큰 링 인터페이스 MS_FDDI FDDI 인터페이스 @@ -2272,7 +2280,8 @@ STATIC9 프록시 서버를 통해 VPN Server에 연결할 수 있습니다. STATIC10 프록시 유형 (&M): R_DIRECT_TCP 직접 TCP/IP 연결 (프록시를 사용하지 않는다) (&D) R_HTTPS HTTP 프록시 서버를 통해 연결 (&Q) -R_SOCKS SOCKS 프록시 서버를 통해 연결 (&S) +R_SOCKS SOCKS4 프록시 서버를 통해 연결 (&S) +R_SOCKS5 SOCKS5 프록시 서버를 통해 연결 (&S) B_PROXY_CONFIG 프록시 서버 연결 설정 (&2) STATIC11 서버 인증서 검증 옵션 (&F): R_CHECK_CERT 서버 인증서를 반드시 확인한다 (&3) @@ -2314,12 +2323,22 @@ STATIC2 호스트 이름 (&H): STATIC3 포트 번호 (&A): STATIC4 사용자 이름 (&U): STATIC5 비밀번호 (&P): +B_HTTP_HEADER Custom HTTP header values IDOK & OK IDCANCEL 취소 STATIC6 (옵션) STATIC7 (옵션) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 고급 통신 설정 STATIC1 네트워크 통신 프로토콜 및 보안 관련 지식을 가지고 계신 분 및 시스템 관리자를위한 옵션입니다. VPN 프로토콜의 통신 설정을 조정할 수 있습니다. @@ -2414,7 +2433,7 @@ STATIC7 인터넷 연결 유지 기능 (&N) PREFIX D_ABOUT S_INFO1 SoftEther VPN %u.0 (Ver %u %02u, Build %u) -S_INFO2 An Open-Source VPN Software for Academic Purpose, under the GPLv2 License \r\nCopyright (c) 2012- %u SoftEther Project at University of Tsukuba, Japan. All Rights Reserved. \r\nWeb Site:http://www.softether.org/\r\n%S +S_INFO2 Licensed under the Apache License, Version 2.0.\r\nCopyright (c) 2012-%u all contributors on SoftEther VPN project in GitHub. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S S_INFO3 This product includes the following software components:\r\nBitVisor:Copyright (c) 2007, 2008 University of Tsukuba. Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. All rights reserved./Microsoft (R) C Runtime Library:(c) 2007 Microsoft Corporation. All Rights Reserved./PKCS # 11 Cryptographic Token Interface (Cryptoki):Copyright (c) RSA Security Inc./WinPcap:Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy ). All rights reserved./libedit:Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved./libiconv:Copyright (C) 2007 Free Software Foundation, Inc./ncurses:Copyright (c) 1998 -2005, 2006 Free Software Foundation, Inc./OpenSSL:Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www. openssl.org/) This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)/zlib:(C) 1995-2004 Jean-loup Gailly and Mark Adler/Special Thanks to:Software Laboratory, Academic Computing Communication Center, Industrial Liaison and Cooperative Research Center and Professor Yasushi Shinjo in University of Tsukuba, Japan. S_INFO4 이 소프트웨어는 츠쿠바 대학 SoftEther VPN 프로젝트에서 개발 된 프리웨어입니다. 본 소프트웨어는 어떠한 보증이없는 상태로 제공되는 것이며, 개발 및 배포자는 사용의 결과 손해에 대해 책임을지지 않습니다. \r\n\r\nSoftEther VPN 소프트웨어는 일본 경제 산업 성 소프트웨어 연구 개발 프로젝트의 결과물입니다. IPA (독립 행정법 인 정보 처리 추진기구)의 미답 소프트웨어 창조 사업에 채택되어 개발되었습니다. 자세한 내용은 http://www.ipa.go.jp/를 참조하십시오. IDCANCEL & OK @@ -2486,7 +2505,8 @@ STATIC9 프록시 서버를 통해 VPN Server에 연결할 수 있습니다. STATIC10 프록시 유형 (&Y): R_DIRECT_TCP 직접 TCP/IP 연결 (프록시를 사용하지 않는다) (&D) R_HTTPS HTTP 프록시 서버를 통해 연결 (&T) -R_SOCKS SOCKS 프록시 서버를 통해 연결 (&K) +R_SOCKS SOCKS4 프록시 서버를 통해 연결 (&K) +R_SOCKS5 SOCKS5 프록시 서버를 통해 연결 (&K) B_PROXY_CONFIG 프록시 서버 연결 설정 (&R) STATIC11 관리 모드의 선택과 암호 (&M) STATIC12 VPN Server는 서버 관리 모드와 가상 HUB 관리 모드 중 하나의 모드로 연결할 수 있습니다. \r\n\r\n 서버 관리 모드로 연결하면 VPN Server 설정 및 모든 가상 HUB가 관리 할 수 있습니다. \r\n\r\n 가상 HUB 관리 모드로 연결하면 권한이있는 가상 HUB 관리 할 수 있습니다. @@ -4078,7 +4098,8 @@ STATIC9 프록시 서버를 통해 서버에 연결할 수 있습니다. STATIC10 프록시 유형 (&Y): R_DIRECT_TCP 직접 TCP/IP 연결 (프록시를 사용하지 않는다) (&D) R_HTTPS HTTP 프록시 서버를 통해 연결 (&T) -R_SOCKS SOCKS 프록시 서버를 통해 연결 (&K) +R_SOCKS SOCKS4 프록시 서버를 통해 연결 (&K) +R_SOCKS5 SOCKS5 프록시 서버를 통해 연결 (&K) B_PROXY_CONFIG 프록시 서버 연결 설정 (&R) IDOK & OK IDCANCEL 취소 @@ -4426,7 +4447,7 @@ CMD_VPNCMD_HOST_2 연결된 VPN Client를 실행하는 컴퓨터의 IP 주소 CMD_VPNCMD_HOST_3 연결된 호스트 이름 또는 IP 주소: CMD_VPNCMD_HUB_1 서버에 가상 HUB 관리 모드로 접속하는 경우에는 가상 HUB 이름을 입력하십시오. \n 서버 관리 모드로 접속하는 경우는 아무것도 입력하지 않고 Enter를 누르십시오. CMD_VPNCMD_HUB_2 연결된 가상 HUB 이름을 입력: -CMD_VPNCMD_ABOUT SoftEther VPN 명령 줄 관리 유틸리티 (vpncmd 명령) \n %S \n %S \nCopyright (c) SoftEther VPN Project. All Rights Reserved. \n +CMD_VPNCMD_ABOUT SoftEther VPN 명령 줄 관리 유틸리티 (vpncmd 명령)\nDeveloper Edition\n%S\n%S\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll rights reserved.\n CMD_VPNCMD_PASSWORD_1 액세스가 거부되었습니다. 암호가 잘못되었거나 연결 관리 모드가 정확하지 않을 수 있습니다. 암호를 다시 입력 할 수 있습니다. 취소하려면 Ctrl + D를 누르십시오. CMD_VPNCMD_PASSWORD_2 비밀번호: CMD_VPNCMD_ERROR 오류가 발생했습니다. (오류 코드:%u) \n %s @@ -5285,6 +5306,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 설정을 변경 계단식의 이름을 지정합니다. +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone 명령 CMD_CascadeProxyNone 계단식 연결 방법을 직접 TCP/IP 연결 설정 CMD_CascadeProxyNone_Help 현재 관리하고있는 가상 HUB에 등록되어있는 계단식 지정하고 계단식가 VPN Server에 연결할 때 사용할 연결 방법을 [직접 TCP/IP 연결을 설정하고 프록시 서버를 경유하지 않도록합니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다. @@ -5303,15 +5353,24 @@ CMD_CascadeProxyHttp_PASSWORD 통해 HTTP 프록시 서버에 연결하기 위 CMD_CascadeProxyHttp_Prompt_Server 프록시 서버의 호스트 이름과 포트 번호: - # CascadeProxySocks 명령 CMD_CascadeProxySocks 계단식 연결 방법을 SOCKS 프록시 서버를 통해 연결 설정 -CMD_CascadeProxySocks_Help 현재 관리하고있는 가상 HUB에 등록되어있는 계단식 지정하고 계단식가 VPN Server에 연결할 때 사용할 연결 방법을 [SOCKS 프록시 서버를 통해 연결을 설정하고 경유 하는 SOCKS 프록시 서버의 호스트 이름과 포트 번호, 사용자 이름과 암호 (필요한 경우)을 지정합니다. \n 통해 SOCKS 서버는 SOCKS 버전 4를 지원해야합니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다. +CMD_CascadeProxySocks_Help 현재 관리하고있는 가상 HUB에 등록되어있는 계단식 지정하고 계단식가 VPN Server에 연결할 때 사용할 연결 방법을 [SOCKS4 프록시 서버를 통해 연결을 설정하고 경유 하는 SOCKS4 프록시 서버의 호스트 이름과 포트 번호, 사용자 이름과 암호 (필요한 경우)을 지정합니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다. CMD_CascadeProxySocks_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_CascadeProxySocks_[name] 설정을 변경 계단식의 이름을 지정합니다. CMD_CascadeProxySocks_SERVER 호스트 이름:포트 번호 형식으로 통해 SOCKS 프록시 서버의 호스트 이름 또는 IP 주소와 포트 번호를 지정합니다. -CMD_CascadeProxySocks_USERNAME 통해 SOCKS 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 사용자 이름을 지정합니다. 또한 동시에/PASSWORD 매개 변수도 지정합니다./USERNAME 및/PASSWORD 매개 변수가 지정되지 않은 경우 사용자 인증 데이터를 설정하지 않습니다. -CMD_CascadeProxySocks_PASSWORD 통해 SOCKS 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 암호를 지정합니다./USERNAME 매개 변수와 함께 지정합니다. +CMD_CascadeProxySocks_USERNAME 통해 SOCKS4 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 사용자 이름을 지정합니다. 또한 동시에/PASSWORD 매개 변수도 지정합니다./USERNAME 및/PASSWORD 매개 변수가 지정되지 않은 경우 사용자 인증 데이터를 설정하지 않습니다. +CMD_CascadeProxySocks_PASSWORD 통해 SOCKS4 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 암호를 지정합니다./USERNAME 매개 변수와 함께 지정합니다. + + +# CascadeProxySocks5 명령 +CMD_CascadeProxySocks5 계단식 연결 방법을 SOCKS 프록시 서버를 통해 연결 설정 +CMD_CascadeProxySocks5_Help 현재 관리하고있는 가상 HUB에 등록되어있는 계단식 지정하고 계단식가 VPN Server에 연결할 때 사용할 연결 방법을 [SOCKS5 프록시 서버를 통해 연결을 설정하고 경유 하는 SOCKS5 프록시 서버의 호스트 이름과 포트 번호, 사용자 이름과 암호 (필요한 경우)을 지정합니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다. +CMD_CascadeProxySocks5_Args CascadeProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks5_[name] 설정을 변경 계단식의 이름을 지정합니다. +CMD_CascadeProxySocks5_SERVER 호스트 이름:포트 번호 형식으로 통해 SOCKS 프록시 서버의 호스트 이름 또는 IP 주소와 포트 번호를 지정합니다. +CMD_CascadeProxySocks5_USERNAME 통해 SOCKS5 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 사용자 이름을 지정합니다. 또한 동시에/PASSWORD 매개 변수도 지정합니다./USERNAME 및/PASSWORD 매개 변수가 지정되지 않은 경우 사용자 인증 데이터를 설정하지 않습니다. +CMD_CascadeProxySocks5_PASSWORD 통해 SOCKS5 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 암호를 지정합니다./USERNAME 매개 변수와 함께 지정합니다. # CascadeServerCertEnable 명령 @@ -6232,6 +6291,23 @@ CMD_OpenVpnMakeConfig_OK 예제 구성 파일 "%s"파일에 저장했습니다. CMD_OpenVpnMakeConfig_ERROR 예제 구성 파일 "%s"파일에 저장할 수 없습니다. 파일 이름이 잘못되었을 수 있습니다. \n +# OpenVpnObfuscationEnable +CMD_OpenVpnObfuscationEnable Enable / Disable the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationEnable_Help This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.\nThe same XOR mask have to be applied to the client, otherwise it will not be able to connect with certain obfuscation methods!\nBeware that you need a special OpenVPN client with the "XOR patch" applied in order to use this function, because it has never been merged in the official OpenVPN repository.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnObfuscationEnable_Args OpenVpnObfuscationEnable [yes|no] [/MASK:mask] +CMD_OpenVpnObfuscationEnable_[yes|no] Specify "yes" to enable the OpenVPN obfuscation function. Specify "no" to disable it. +CMD_OpenVpnObfuscationEnable_MASK Mask used to XOR the bytes in the packet (used for certain obfuscation modes). +CMD_OpenVpnObfuscationEnable_Prompt_[yes|no] Enable OpenVPN packet obfuscation (yes / no): +CMD_OpenVpnObfuscationEnable_Prompt_MASK XOR mask: + + +# OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet Get the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Help Get and show the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Args OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet_PRINT_Enabled OpenVPN obfuscation enabled +CMD_OpenVpnObfuscationGet_PRINT_Mask XOR mask + # SstpEnable 명령 CMD_SstpEnable Microsoft SSTP VPN 호환 서버 기능을 활성화/비활성화 CMD_SstpEnable_Help SoftEther VPN Server는 Microsoft 사의 Windows Server 2008/2012 제품에 탑재 된 MS-SSTP VPN 서버 기능과 호환 기능이 탑재되어 있습니다. Microsoft SSTP VPN 호환 서버 기능을 활성화하면 Windows Vista/7/8/RT에 내장 된 MS-SSTP 클라이언트에서이 VPN Server에 연결할 수 있도록합니다. \n \n [주의] \nVPN Server의 SSL 인증서의 CN 값이 클라이언트 측에서 지정하는 호스트 이름과 일치하며 그 인증서를 신뢰할 수 있어야합니다. 자세한 내용은 Microsoft 문서를 참조하십시오. \n 지정된 CN 값을 가지는 새로운 SSL 인증서 (자체 서명 인증서)를 생성하여 VPN Server의 현재 인증서로 대체하기 위해서는 ServerCertRegenerate 명령을 사용하십시오. 이 경우 해당 인증서를 SSTP VPN 클라이언트 컴퓨터의 신뢰할 수있는 루트 인증서로 등록해야합니다. 이러한 번거 로움 않으려면 대신 VeriSign이나 GlobalSign 사 등의 상용 인증서 공급자의 SSL 인증서 취득을 검토하십시오. \n \nMicrosoft SSTP VPN 호환 서버 기능으로 가상 HUB에 연결하는 경우 사용자 이름 지정 방법 및 기본 가상 HUB 선택 규칙은 IPsec 서버 기능과 유사합니다. 자세한 내용은 IPsecEnable 명령의 도움말을 참조하십시오. \n \n이 명령을 실행하려면 VPN Server 관리자 권한이 있어야합니다. \n이 명령은 VPN Bridge에서는 실행되지 않습니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다. @@ -6575,6 +6651,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 설정을 변경하려면 연결 설정의 이름을 지정합니다. +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone 명령 CMD_AccountProxyNone 연결 설정의 연결 방법을 직접 TCP/IP 연결 설정 CMD_AccountProxyNone_Help VPN Client에 등록되어있는 연결 설정을 지정하고 연결 설정 VPN Server에 연결할 때 사용하는 연결 방법을 [직접 TCP/IP 연결을 설정하고 프록시 서버를 경유하지 않도록 합니다. @@ -6593,15 +6698,24 @@ CMD_AccountProxyHttp_PASSWORD 통해 HTTP 프록시 서버에 연결하기 위 CMD_AccountProxyHttp_Prompt_Server 프록시 서버의 호스트 이름과 포트 번호: - # AccountProxySocks 명령 -CMD_AccountProxySocks 연결 설정의 연결 방법을 SOCKS 프록시 서버를 통해 연결 설정 -CMD_AccountProxySocks_Help VPN Client에 등록되어있는 연결 설정을 지정하고 연결 설정 VPN Server에 연결할 때 사용하는 연결 방법을 [SOCKS 프록시 서버를 통해 연결을 설정하고 통해 SOCKS 프록시 서버 호스트 이름과 포트 번호, 사용자 이름과 암호 (필요한 경우)을 지정합니다. \n 통해 SOCKS 서버는 SOCKS 버전 4를 지원해야합니다. +CMD_AccountProxySocks 연결 설정의 연결 방법을 SOCKS4 프록시 서버를 통해 연결 설정 +CMD_AccountProxySocks_Help VPN Client에 등록되어있는 연결 설정을 지정하고 연결 설정 VPN Server에 연결할 때 사용하는 연결 방법을 [SOCKS 프록시 서버를 통해 연결을 설정하고 통해 SOCKS4 프록시 서버 호스트 이름과 포트 번호, 사용자 이름과 암호 (필요한 경우)을 지정합니다. CMD_AccountProxySocks_Args AccountProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_AccountProxySocks_[name] 설정을 변경하려면 연결 설정의 이름을 지정합니다. -CMD_AccountProxySocks_SERVER 호스트 이름:포트 번호 형식으로 통해 SOCKS 프록시 서버의 호스트 이름 또는 IP 주소와 포트 번호를 지정합니다. -CMD_AccountProxySocks_USERNAME 통해 SOCKS 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 사용자 이름을 지정합니다. 또한 동시에/PASSWORD 매개 변수도 지정합니다./USERNAME 및/PASSWORD 매개 변수가 지정되지 않은 경우 사용자 인증 데이터를 설정하지 않습니다. -CMD_AccountProxySocks_PASSWORD 통해 SOCKS 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 암호를 지정합니다./USERNAME 매개 변수와 함께 지정합니다. +CMD_AccountProxySocks_SERVER 호스트 이름:포트 번호 형식으로 통해 SOCKS4 프록시 서버의 호스트 이름 또는 IP 주소와 포트 번호를 지정합니다. +CMD_AccountProxySocks_USERNAME 통해 SOCKS4 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 사용자 이름을 지정합니다. 또한 동시에/PASSWORD 매개 변수도 지정합니다./USERNAME 및/PASSWORD 매개 변수가 지정되지 않은 경우 사용자 인증 데이터를 설정하지 않습니다. +CMD_AccountProxySocks_PASSWORD 통해 SOCKS4 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 암호를 지정합니다./USERNAME 매개 변수와 함께 지정합니다. + + +# AccountProxySocks5 명령 +CMD_AccountProxySocks5 연결 설정의 연결 방법을 SOCKS5 프록시 서버를 통해 연결 설정 +CMD_AccountProxySocks5_Help VPN Client에 등록되어있는 연결 설정을 지정하고 연결 설정 VPN Server에 연결할 때 사용하는 연결 방법을 [SOCKS 프록시 서버를 통해 연결을 설정하고 통해 SOCKS5 프록시 서버 호스트 이름과 포트 번호, 사용자 이름과 암호 (필요한 경우)을 지정합니다. +CMD_AccountProxySocks5_Args AccountProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks5_[name] 설정을 변경하려면 연결 설정의 이름을 지정합니다. +CMD_AccountProxySocks5_SERVER 호스트 이름:포트 번호 형식으로 통해 SOCKS5 프록시 서버의 호스트 이름 또는 IP 주소와 포트 번호를 지정합니다. +CMD_AccountProxySocks5_USERNAME 통해 SOCKS5 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 사용자 이름을 지정합니다. 또한 동시에/PASSWORD 매개 변수도 지정합니다./USERNAME 및/PASSWORD 매개 변수가 지정되지 않은 경우 사용자 인증 데이터를 설정하지 않습니다. +CMD_AccountProxySocks5_PASSWORD 통해 SOCKS5 프록시 서버에 연결하기 위해 사용자 인증이 필요한 경우 암호를 지정합니다./USERNAME 매개 변수와 함께 지정합니다. # AccountServerCertEnable 명령 @@ -6950,7 +7064,7 @@ CMD_Check_Args Check # 시스템 검사기 관계 # (일부 이상한 문자열이 포함되어 있지만 문자 코드 변환 확인 용입니다) -CHECK_TITLE -------------------------------------------------- \nSoftEther VPN 동작 환경 검사 도구 \n \nCopyright (c) SoftEther VPN Project \nAll Rights Reserved. \n \n +CHECK_TITLE -------------------------------------------------- \nSoftEther VPN 동작 환경 검사 도구 \n\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n CHECK_NOTE 이 작동 환경 검사 도구를 실행 한 시스템이 테스트를 통과 한 경우 SoftEther VPN 소프트웨어가 작동 할 가능성이 높습니다. 체크에 시간이 걸릴 수 있습니다. 기다리십시오... \n \n CHECK_EXEC_TAG '%s'의 체크 중... \n CHECK_PASS [합격] ○ @@ -7020,6 +7134,8 @@ SW_WEB2_TITLE 파일 지정 SW_UNINSTALLINFO_URL http://selinks.org/ SW_UNINSTALLINFO_PUBLISHER SoftEther VPN Project +SW_KB3033929_REQUIRED In Windows 7 and Windows Server 2008 R2, some SoftEther VPN functions require the Microsoft's Windows Update module KB3033929 installed.\r\n\r\nIf KB3033929 is not installed in your Windows, please install it from Windows Update or Microsoft website before installing SoftEther VPN. + SW_COMPONENTS_ABOUT_TAG '%s'는 SW_COMPONENTS_REQUIRE_ADMIN 설치하려면 관리자 권한이 있어야합니다 diff --git a/src/bin/hamcore/strtable_pt_br.stb b/src/bin/hamcore/strtable_pt_br.stb new file mode 100644 index 00000000..a8401ab5 --- /dev/null +++ b/src/bin/hamcore/strtable_pt_br.stb @@ -0,0 +1,7319 @@ +# SoftEther VPN String Table +# Copyright (c) all contributors on SoftEther VPN project in GitHub. +# Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +# +# https://www.softether.org/ + + +########################################################################### +# # +# String data such as messages in software # +# (Excludes dialog box resource strings) # +# # +########################################################################### + + + +# Environment parameters +DEFAULT_FONT Tahoma +DEFAULT_FONT_WIN7 Segoe UI +DEFAULT_FONT_2 Tahoma +DEFAULT_FONT_SIZE 8 +DEFAULT_LOCALE - - $ : : $ Dom Seg Ter Qua Qui Sex Sáb : : : $ (None) + + +# 言語 +# (0: 日本語, 1: 英語) +LANG 4 +LANGSTR Portuguese - Brazil + +STRTABLE_ID SE_VPN_20121007 + + +# Strings for Japanese version only (not required for other language versions.) +CM_JAPANESE_ONLY_OLD_STARTUP %s\\SoftEther VPN Client 2.0 タスクトレイ.lnk + + +# Software information +PRODUCT_NAME_VPN_CLI SoftEther VPN Client Developer Edition +PRODUCT_NAME_VPN_CMGR SoftEther VPN Client Manager Developer Edition +PRODUCT_NAME_VPN_SVR SoftEther VPN Server Developer Edition +PRODUCT_NAME_VPN_BRIDGE SoftEther VPN Bridge Developer Edition +PRODUCT_NAME_VPN_SMGR SoftEther VPN Server Manager Developer Edition +PRODUCT_NAME_ELOGSVC SoftEther EtherLogger Developer Edition +PRODUCT_NAME_ELOGMGR SoftEther EtherLogger Developer Edition + +# Branding String for Limited Connection +# BRANDED_C_TO_S Branded_VPN +# BRANDED_C_FROM_S Branded_VPN + +# Client ID (sample) +# CLIENT_ID 123 + +# Family Name for Software Update Check +PRODUCT_FAMILY_NAME SoftEtherDev + +# Product information +SE_COMPANY_URL https://selinks.org/?se +SE_VPNAZURE_URL https://selinks.org/?vpnazure + +# Common strings +COMMON_UNKNOWN (Unknown) + + +# Protocol error strings +ERR_UNKNOWN Ocorreu um erro desconhecido. +ERR_0 Sem erro. +ERR_1 Connection to the server failed. Check network connection and make sure that address and port number of destination server are correct. +ERR_2 Protocol error occurred. Error was returned from the destination server. +ERR_3 Connection has been disconnected. +ERR_4 Protocol error occurred. +ERR_5 A client which is non-SoftEther VPN software has connected to the port. +ERR_6 The command has been canceled by user. +ERR_7 The server denied the specified auth type. +ERR_8 The specified Virtual Hub does not exist on the server. +ERR_9 User authentication failed. +ERR_10 The specified Virtual Hub is currently stopped. Wait for a while and then reconnect. +ERR_11 The VPN session has been deleted. It is possible that either the administrator disconnected the session or the connection from the client to the VPN Server has been disconnected. +ERR_12 Access has been denied. +ERR_13 Time-out occurred during VPN session communication. It is possible the connection from the client to the VPN Server has been disconnected. +ERR_14 Protocol number is invalid. +ERR_15 There are too many TCP/IP connections. +ERR_16 There are too many sessions connected to either the destination server or Virtual Hub. +ERR_17 Connection to proxy server failed. +ERR_18 An error occurred on the proxy server. +ERR_19 User authentication failed on the proxy server. +ERR_20 There are too many sessions by the same user. Other person might be connected to the Virtual Hub as the same user. +ERR_21 A license error occurred on the VPN Server. Contact the VPN Server's administrator. +ERR_22 Cannot access the Virtual Network Adapter device driver. Check the Virtual Network Adapter is installed and make sure that it has not been disabled. +ERR_23 An internal error occurred. +ERR_24 Access to either the smart card or USB hardware token device failed. +ERR_25 The PIN code is incorrect. +ERR_26 The specified certificate is not stored on either the smart card or the USB hardware token device. +ERR_27 The specified private key is not stored on either the smart card or the USB hardware token device. +ERR_28 Write operation to the smart card or USB hardware token device failed. +ERR_29 Object not found. +ERR_30 A Virtual Network Adapter with the specified name already exists. Specify a different name. +ERR_31 Installation of the Virtual Network Adapter device driver failed. +ERR_32 You cannot use the specified name for a Virtual Network Adapter device. +ERR_33 Unsupported. +ERR_34 VPN Connection Setting with the specified name already exists. +ERR_35 The specified VPN Connection Setting is currently connected. +ERR_36 The specified VPN Connection Setting does not exist. +ERR_37 The specified VPN Connection Setting is not connected. +ERR_38 Invalid parameter. +ERR_39 Error occurred on smart card or USB hardware token. +ERR_40 Although authentication of smart card or USB hardware token was selected, but the device to be used has not been selected. Select from the Smart Card menu of Connection Manager. +ERR_41 The specified Virtual Network Adapter is being used by at least one VPN Connection Setting. \r\nEither delete the VPN Connection Setting that is using this Virtual Network Adapter or change Virtual Network Adapter that this VPN Connection Setting is using. +ERR_42 Cannot find the Virtual Network Adapter that the specified VPN Connection Setting is using. \r\nMake sure this Virtual Network Adapter exists. Also make sure the Virtual Network Adapter device has not been disabled. \r\n\r\nIf you cannot resolve the problem, either change the Virtual Network Adapter being used by this VPN Connection Setting or create a new Virtual Network Adapter with the same name. +ERR_43 The Virtual Network Adapter used by the specified VPN Connection Setting is already being used by another VPN Connection Setting. \r\nIf there is another VPN Connection Setting that is using the same Virtual Network Adapter, disconnect that VPN Connection Setting. +ERR_44 The Virtual Network Adapter being used by the specified VPN Connection Setting has been disabled. \r\nBefore using this VPN Connection Setting, enable the Virtual Network Adapter. +ERR_45 The specified value is invalid. +ERR_46 The connection destination is not a cluster controller. +ERR_47 Trying to connect. +ERR_48 Connection to the cluster controller failed. +ERR_49 The cluster controller was unable to assign a new session on a cluster. +ERR_50 Unable to manage the Virtual Hub of the cluster member server. +ERR_51 The user's password used to connect was blank so the connection from remote is prohibited. Blank password can be allowed only to connections from the VPN Server's localhost (127.0.0.1). +ERR_52 Not enough privileges. +ERR_53 Specified listener not found. +ERR_54 The listener of the specified port number already exists. +ERR_55 This is not a cluster member server. +ERR_56 The specified encryption algorithm name is not supported. +ERR_57 The Virtual Hub with the specified name already exists on the server. +ERR_58 There are too many registered Virtual Hubs. No more can be created. Delete the old Virtual Hubs. +ERR_59 The Cascade Connection with the specified name already exists. +ERR_60 A Cascade Connection cannot be created on a server on a cluster. +ERR_61 The specified Cascade Connection is offline. +ERR_62 There are too many access lists. +ERR_63 There are too many users. +ERR_64 There are too many groups. +ERR_65 The specified group does not exist. +ERR_66 The user with the specified name already exists on the Virtual Hub. +ERR_67 The group with the specified name already exists on the Virtual Hub. +ERR_68 A user with the specified name exists on the server but the type of authentication is not password authentication. Unable to change the password. +ERR_69 The user name or old password you entered is incorrect. Note that the password is case-sensitive. +ERR_70 Saitama. +ERR_71 SoftEther has temporarily stopped the current distribution by order of the Japan Ministry of Economy Trade and Industry. +ERR_72 SoftEther has temporarily stopped the current distribution by order of the IPA. +ERR_73 Unable to disconnect the Cascade Connection's session. To delete the session, stop the Cascade Connection. +ERR_74 The VPN Connection Setting for connection with the VPN Server is incomplete. At first you have to complete the VPN Connection Setting for connection with the VPN Server. +ERR_75 VPN Connection to the VPN Server has already started. +ERR_76 Not connected to the VPN Server. +ERR_77 The specified X509 certificate file does not contain a RSA 1024 bit or 2048 bit public key. SoftEther VPN software supports only RSA 1024 bit or 2048 bit certificates. +ERR_78 Unable to disconnect the SecureNAT session. To delete the session, stop the SecureNAT function. +ERR_79 Cannot enable the SecureNAT in a clustering environment. +ERR_80 The SecureNAT is not operating. +ERR_81 This VPN Connection session to the VPN Server has been disconnected by the firewall device installed by the network administrator. Contact the network administrator. +ERR_82 Unable to disconnect the Local Bridge session. To delete the session, stop the Local Bridge. +ERR_83 The Local Bridge is not operating. +ERR_84 Local Bridge cannot be used by the destination VPN Server. Refer to online help or other documentation for the setting method when using Local Bridge on the VPN Server you are using. +ERR_85 Unable to trust the certificate provided by the destination server. The setting to always verify the server certificate is enabled in the VPN Connection Settings. Either register a root certificate that can be trusted or register a individual certificate. +ERR_86 The product code of the destination server is incorrect. It is not possible to connect from this client. +ERR_87 The client and server version is different. Update the software. +ERR_88 Failed to add a capture device. A same capture device might be already registered. +ERR_89 Unable to connect to the destination server from this client. A special client software is required. +ERR_90 The specified capture device is not registered. +ERR_91 Unable to disconnect the Virtual Layer 3 Switch session. To delete the session, stop the Virtual Layer 3 Switch. +ERR_92 A Virtual Layer 3 Switch with the specified name already exists. Specify a different name. +ERR_93 Specified Virtual Layer 3 Switch not found. +ERR_94 The specified name is invalid. Check if the name contains characters that cannot be used. +ERR_95 Failed to add the Virtual Layer 3 interface. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. +ERR_96 Failed to delete the Virtual Layer 3 interface. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. +ERR_97 The Virtual Layer 3 interface that is connecting to the destination Virtual Hub of the specified Virtual Layer 3 interface already exists in the Virtual Layer 3 Switch. No more than one Virtual Layer 3 interface that connects to the same Virtual Hub can be defined in a Virtual Layer 3 Switch. +ERR_98 Failed to add routing table entry. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. +ERR_99 Failed to delete routing table entry. Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. +ERR_100 The specified routing table entry already exists. +ERR_101 The client clock and the server clock are not synchronized with each other. Check the time settings. +ERR_102 Unable to start this Virtual Layer 3 Switch. \r\n\r\nTo start the Virtual Layer 3 Switch, at least 1 virtual interface must be defined in the Virtual Layer 3 Switch. +ERR_103 Not enough Client Connection Licenses on the destination VPN Server. Contact the server administrator. +ERR_104 Not enough Bridge Connection Licenses on the destination VPN Server. Contact the server administrator. +ERR_105 Due to current technical difficulties, the destination VPN Server is not receiving the connection. Either wait a while, or contact the VPN Server administrator requesting that the server log file be checked. +ERR_106 The destination VPN Server's certificate has expired. Contact the VPN Server's administrator. +ERR_107 A connection has beens requested in Monitoring Mode. But the security policy for the connecting user does not permit Monitoring Mode. +ERR_108 A connection has been requested in Bridge / Router Mode. But the security policy for the connecting user forbids both bridge mode and router mode. +ERR_109 A connection from a client IP address has been denied by the Source IP Restriction List of the Virtual Hub. +ERR_110 There are too many items. +ERR_111 Out of memory. +ERR_112 The specified object already exists. +ERR_113 A fatal error occurred. It is possible that the program operation is unable to continue. +ERR_114 The destination VPN Server has detected a software license violation. Connection is refused. Contact the VPN Server's administrator. +ERR_115 The destination VPN Server has connected via the Internet to an important server provided by SoftEther VPN Project and cannot validate a license. Either wait a while, or contact the VPN Server administrator requesting that the server log file and the Internet connection status of the server itself be checked. +ERR_116 A software license violation has been detected on the client side. Connection is refused. +ERR_117 The command or file name is incorrect. +ERR_118 The license key is incorrect. +ERR_119 No valid product license is registered on the VPN Server. Contact the VPN Server's administrator. +ERR_120 The product license required for the VPN Server to operate as a cluster is not registered. Contact the VPN Server's administrator. +ERR_121 This VPN Connection Setting has been installed using the "Web Installer Creation Kit" or "Simple Installer Creation Kit". The destination server is not an edition that supports the SoftEther VPN 2.0 Administration Pack. Contact the system administrator or person who created the installer. +ERR_122 With the VPN Server SDK for .NET, it is only possible to connect to the SoftEther VPN Server edition that supports the SoftEther VPN 2.0 Administration Pack. The destination VPN Server is not an edition that supports the SoftEther VPN 2.0 Administration Pack. Contact the system administrator. +ERR_123 Beta Version Software on the destination server is expired. Contact to system administrator of the server to download a new beta version or full version from http://selinks.org/. +ERR_124 The VPN connection to VPN Server is refused at server side. +ERR_125 The VPN connection to VPN Server is refused at client side. +ERR_126 The security policy enforced the VPN session to disconnect automatically because the specific time has been elapsed. If you wish to continue please re-connect. +ERR_127 The VPN Server requires the special-version VPN Client software. Consult with the administrator. +ERR_128 The number of registered user objects exceeds the maximum number which is allowed the product license applied on the VPN Server. You cannot add user objects anymore unless you delete old one, or upgrade the edition of the product. +ERR_129 The subscription contract has already expired before the release-date of this version of VPN Server. The customer has been authorized to use VPN Server's builds only in the period of the subscription contract. The customer has to extend the period of the subscription. The customer also be able to 'downgrade' the version of VPN Server to older version which has released before the end of the subscription. If you want to downgrade the version, older versions might be available on http://selinks.org/. +ERR_130 We are afraid that the trial license keys cannot be obtained frequently by the same customer. Please consider to purchase the product version. +ERR_131 Several VPN Servers on the same IP address. You can specify the destination server's private IP or hostname concretely such as "Global IP address or host name/192.168.x.x". Or if a NAT is used on the server's side, configure the NAT to open, relay or transfer appropriate ports. +ERR_132 The key for Dynamic DNS Service duplicates to others. The key will be reset automatically. +ERR_133 The specified Dynamic DNS hostname is already used. Please change the hostname. +ERR_134 The specified Dynamic DNS hostname has an invalid characters. Please change the hostname. +ERR_135 The length of the specified Dynamic DNS hostname is too long. A hostname must be equal or shorter than 31 letters. +ERR_136 The Dynamic DNS hostname is not specified. +ERR_137 The length of the specified Dynamic DNS hostname is too long. A hostname must be equal of longer than 3 letters. +ERR_138 The password of the specified user in the Virtual Hub must be reset before using MS-CHAP v2 authentication. Please ask the administrator of the VPN Server to reset the password by the VPN Server Manager or vpncmd which internal version is 4.0 or greater. Or you can change the password with VPN Client by yourself. +ERR_139 The connection to the Dynamic DNS server has been disconnected. +ERR_140 Failed to initialize the ICMP (Ping) protocol. The process of the VPN Server might be running in a normal-user privileges. In such case, run the VPN Server as a system service. (in Linux / UNIX, run it in root privileges.) +ERR_141 Failed to open the DNS port 53. Make sure that there are no other DNS server program (for example, BIND or Microsoft DNS Server) on the same computer. If there are conflicting services stop them. Or run the VPN Server's process in root privileges on Linux / UNIX/ +ERR_142 The OpenVPN Server function is not enabled. +ERR_143 The Certificate Authentication function and the External Server Authentication function have not been implemented on the open-source version of SoftEther VPN yet. Choose either Anonymous Authentication or Password Authentication instead. +ERR_144 Unacceptable operation. Use the VPN Gate Control Panel to change the VPN Gate Relay Server settings. +ERR_145 Unacceptable operation. Use the VPN Gate Utility to modify the connection setting for VPN Gate Public VPN Relay Servers. +ERR_146 The VPN Gate Service is running inside the VPN Client program. You cannot stop the VPN Gate Service on this screen. Use the VPN Client Manager to enable or disable the VPN Gate Service. +ERR_147 This feature is not supported. It hasn't been implemented yet on the open-source version of SoftEther VPN. +ERR_148 The VPN connection was disconnected because the system is being suspended. + +# Concerning licenses +LICENSE_INFO_URL https://selinks.org/?new_license +LICENSE_SUPPORT_URL https://selinks.org/?q=license_info&id=%s +LICENSE_STATUS_OK Valid +LICENSE_STATUS_EXPIRED Expired +LICENSE_STATUS_ID_DIFF Server ID Mismatch +LICENSE_STATUS_DUP Duplication +LICENSE_STATUS_INSUFFICIENT Other Licenses are Required +LICENSE_STATUS_COMPETITION Competition with Other Licenses +LICENSE_STATUS_NONSENSE Meaningless for Current Edition +LICENSE_STATUS_CPU CPU Type is Incompatible +LICENSE_STATUS_OTHERERROR Unknown Error + + +# Concerning TCP optimization +TCPOPT_NOT_SUPPORTED The TCP Optimization Utility cannot be used on this operating system. +TCPOPT_NOT_ADMIN Users without administrator privileges cannot use the TCP Optimization Utility. + + +# Windows Vista / Windows 7 / Windows 8 Optimization +VISTA_MMCSS_MSG Do you wish to optimize Windows Vista / Windows 7 / Windows 8 / Windows 10 for playing multimedia files with VPN? (e.g. videos, audios and streaming) +VISTA_MMCSS_MSG_2 Optimization for Windows Vista / Windows 7 / Windows 8 / Windows 10 with VPN has already done.\r\nDo you wish to remove optimized configuration? +VISTA_MMCSS_MSG_3 You cannot use optimization in currently environment. +VISTA_MMCSS_MSG_4 You must have administrator privileges for this function.\r\nPlease note that in Windows Vista / Windows 7 / Windows 8 / Windows 10 you should use "Run as Administrators" to execute program. +VISTA_MMCSS_MSG_5 Optimization is finished. +VISTA_MMCSS_MSG_6 Optimization configuration is removed. + + +# Concerning PKCS utility +PKCS_UTIL_TITLE PKCS#12 Writing Utility +PKCS_UTIL_SAVEDLG_TITLE Select the PKCS#12 file that you want to write to the USB token. +PKCS_UTIL_READ_ERROR Unable to read the file: %s. +PKCS_UTIL_WRITE_OK_MSG The file %s has been written to the USB hardware token. +PKCS_UTIL_DELETE_OK_MSG The PKCS#12 certificate data has been deleted from the USB hardware token. +PKCS_UTIL_SECA_FILENAME seca_p12 +PKCS_MAKE_SURE The PKCS#12 certificate data written to USB token will be deleted. \r\n Once data is deleted it cannot be restored. \r\r\n\r\r\nDo you wish to continue? +PKCS_UTIL_BAD_FILE The specified file could not be identified as a PKCS#12 file. + + +# Concerning common dialogs +DLG_ALL_FILES All Files (*.*)|*.* +DLG_CERT_FILES X509 Certificate Files (*.CER;*.CRT)|*.cer;*.crt|All Files (*.*)|*.* +DLG_KEY_FILTER Private Key Files (*.KEY;*.PEM)|*.key;*.pem|All Files (*.*)|*.* +DLG_PKCS12_FILTER PKCS#12 Files (*.P12;*.PFX)|*.p12;*.pfx|All Files (*.*)|*.* +DLG_CERT_OR_P12_FILTER X509 Certificate Files or PKCS#12 Files (*.CER;*.CRT;*.P12;*.PFX)|*.cer;*.crt;*.p12;*.pfx|X509 Certificate Files (*.CER;*.CRT)|*.cer;*.crt|PKCS#12 Files (*.P12;*.PFX)|*.p12;*.pfx|All Files (*.*)|*.* +DLG_CONFIG_FILES Setting Files (*.CONFIG)|*.config|All Files (*.*)|*.* +DLG_KEY_OR_P12_FILTER Private Key Files or PKCS#12 Files (*.KEY;*.PEM;*.P12;*.PFX)|*.key;*.pem;*.p12;*.pfx|Private Key Files (*.KEY;*.PEM)|*.key;*.pem|PKCS#12 Files (*.P12;*.PFX)|*.p12;*.pfx|All Files (*.*)|*.* +DLG_ZIP_FILER ZIP Files (*.ZIP)|*.zip|All Files (*.*)|*.* +DLG_OPEN_CERT Select the Certificate File +DLG_OPEN_KEY Select the Private Key File +DLG_OPEN_KEY_WITH_CERT Select the Corresponding Private Key file +DLG_OPEN_FILE_ERROR Unable to read the specified file: %S. +DLG_OPEN_FILE_ERROR_W Unable to read the specified file: %s. +DLG_BAD_P12 The file "%S" is not a valid PKCS#12 certificate file. +DLG_BAD_P12_W The file "%s" is not a valid PKCS#12 certificate file. +DLG_BAD_X509 The file "%S" is not a valid X509 certificate file. +DLG_BAD_X509_W The file "%s" is not a valid X509 certificate file. +DLG_BAD_KEY The file "%S" is not a valid RSA private key file. +DLG_BAD_KEY_W The file "%s" is not a valid RSA private key file. +DLG_BAD_SIGNATURE The private key does not correctly correspond with the public key contained in the specified certificate. \r\nA private key that corresponds to the certificate public key is required. +DLG_SAVE_CERT Specify a file name where you want to save the certificate +DLG_SAVE_KEY Specify a file name where you want to save the private key +DLG_SAVE_P12 Specify a file name where you want to save the certificate and private key +DLG_SAVE_FILE Specify a file name to save a file +DLG_SAVE_OPENVPN_CONFIG Specify a file name to save the ZIP file contains OpenVPN settings +DLG_CERT_SAVE_OK The certificate has been saved successfully. +DLG_CERT_SAVE_ERROR Unable to save certificate. +DLG_KEY_SAVE_OK The private key has been saved successfully. +DLG_KEY_SAVE_ERROR Unable to save private key. +DLG_KEY_PAIR_SAVE_OK The certificate and private key were saved successfully. +DLG_KEY_PAIR_SAVE_ERROR Unable to save the certificate and private key. +DLG_REBOOT_INFO The computer will restart after %u seconds. +DLG_REBOOT_INFO_2 Restarting the computer. +DLG_REBOOT_ERROR Failed to restart the computer. \r\n\r\nPlease manually restart the computer now. +DLG_SAVE_CONFIG Specify a File Name for Saving the Configuration +DLG_OPEN_CONFIG Specify the Configuration File to Import +DLG_STRING_DEFTITLE String Input +DLG_STRING_DEFINFO Enter strings. +DLG_ABOUT_LEGAL Legal Notices +DLG_ABOUT_AUTHORS List of Authors +DLG_UPDATE_DATE \ (Released on %S) +DLG_UPDATE_HINT Press OK to view the information of the latest update on the web browser.\r\n\r\nYou have to download and install updates manually. If you want to update software on the other computer you have to log in to the computer by Remote Desktop or SSH to perform the download and update. + + + +# Concerning competing processes +BAD_PROCESS_TITLE Warning concerning %S +BAD_PROCESS_MESSAGE It is possible that the software "%S" is running on this computer, which could cause problems. \r\n\r\nThere is a possibility that problems in "%S" will cause instability in VPN communication and errors. \r\n\r\nIf, by using VPN together with the software "%S" VPN becomes unstable, either stop or uninstall "%S". (Note that in some cases, because of the nature of the software, there are cases that the problems will still remain on the computer where even if you stop the software.) \r\n + + +# Concerning hardware tokens +SEC_SMART_CARD Smart Card +SEC_USB_TOKEN USB Token +SEC_INIT_MSG_1 Insert the following smart card into the smart card reader and enter the PIN code. +SEC_INIT_MSG_2 Connect the following USB token hardware to the computer's USB port and enter the PIN code. +SEC_OPENING Opening Device... +SEC_CLOSING Closing Device... +SEC_OPEN_SESSION Opening Secure Session... +SEC_CLOSE_SESSION Closing Secure Session... +SEC_LOGIN Logging in to Token... +SEC_LOGOUT Logging out from Token... +SEC_INIT_BATCH Starting Batch Process... +SEC_READ_DATA Reading Data... +SEC_WRITE_DATA Writing Data... +SEC_READ_CERT Reading Certificate... +SEC_WRITE_CERT Writing Certificate... +SEC_DELETE Deleting Object... +SEC_SIGN Processing Digital Signature by Private Key... +SEC_WRITE_KEY Writing Private Key... +SEC_ENUM Enumerating Object... +SEC_FINISHED The operation is complete. +SEC_ERROR_INVALID_ID The specified security device (device %u) is invalid. +SEC_ERROR_OPEN_DEVICE Unable to open the device %S. Make sure the device is connected to the computer. +SEC_ERROR_OPEN_DEVICEEX Unable to open the device %S. Make sure the device is connected to the computer. \r\n\r\nIf using public key infrastructure (PKI) with special client software, it is necessary to select the smart card device in PKI Utility from the Start menu beforehand. +SEC_ERROR_OPEN_SESSION Unable to start security session in device: %S. Make sure the correct device is selected. +SEC_ERROR_LOGIN The entered PIN code is incorrect. +SEC_ERROR_NOT_FOUND_1 The specified object does not exist in smart card. Make sure the correct smart card is inserted. +SEC_ERROR_NOT_FOUND_2 The specified object does not exist in USB token hardware. Make sure the correct USB token hardware is connected. +SEC_ERROR_SIGN_1 Either private key does not exist in smart card or digital signature operation failed. Make sure the correct smart card is inserted. +SEC_ERROR_SIGN_2 Either private key does not exist in USB token hardware or digital signature operation failed. Make sure the correct USB token hardware is connected. +SEC_ERROR_WRITE_1 Unable to write object to smart card. There is a possibility that there is insufficient free memory available on smart card. +SEC_ERROR_WRITE_2 Unable to write object to USB token hardware. There is a possibility that is insufficient free memory available on the USB token. +SEC_ERROR_ENUM Enumeration of object stored in token failed. +SEC_ERROR_DELETE Deletion of specified object failed. It is possible the specified object does not exist in the memory. +SEC_COLUMN1 Device Name +SEC_COLUMN2 Type +SEC_COLUMN3 Manufacturer +SEC_COLUMN4 DLL Name +SEC_INVALID_ID The specified smart card device does not exist. Select the smart card type again. +SEC_MGR_COLUMN1 Name +SEC_MGR_COLUMN2 Type +SEC_MGR_COLUMN3 Private +SEC_TYPE_DATA Data +SEC_TYPE_CERT Certificate +SEC_TYPE_KEY Private Key +SEC_TYPE_PUB Public Key +SEC_YES Yes +SEC_NO No +SEC_NONE None +SEC_IMPORT_DATA Select the data you want to import. +SEC_IMPORT_CERT Select the certificate you want to import. +SEC_IMPORT_KEY Select the private key you want to import. +SEC_READ_FAILED Reading from specified file failed. +SEC_DATA_TOO_BIG The specified data size is too big. Data larger than %u bytes cannot be written to the smart card. +SEC_OBJECT_NAME_TITLE Name of object to insert +SEC_OBJECT_NAME_INFO Specify the name of the object to be written to the new smart card. You can specify alphanumeric characters excluding double-byte and special characters for the object name. \r\n\r\nCaution: If there is an object with the same name of the same type already written on the card, that object will be overwritten. +SEC_DELETE_MSG The selected object will be deleted from the smart card. \r\nDo you really want to do this? +SEC_OBJECT_IMPORT_OK Object has been written to smart card. +SEC_OBJECT_EXPORT_OK The data read from the smart card has been saved. +SEC_NEW_CERT_IMPORT_OK The newly created certificate has been written to the smart card. +SEC_CURRENT_DEVICE Currently the device %S is selected. +SEC_CURRENT_NO_DEVICE Select which smart card device to use. +SEC_NO_SECURE_DEVICE A SoftEther VPN-compatible smart card or hardware security token device is not installed on the system. \r\n\r\nTo use a smart card or hardware token using SoftEther VPN it is necessary to install a PKCS#11-compatible device driver on Windows. In addition, it is necessary that SoftEther VPN supports the device type. \r\n\r\nMake sure a system-compatible device driver has been installed. \r\nRefer to the SoftEther VPN Project website for the list of SoftEther VPN-compatible devices. Also, it may be possible to increase the compatible devices by updating to the most recent software version. +SEC_PIN_DEVICE_OPEN_ERR Unable to connect the device "%S". Make sure the hardware is correctly connected. +SEC_PIN_CURRENT_BAD Current PIN code is incorrect. +SEC_PIN_CHANGE_FAILED Changing of PIN code failed. +SEC_PIN_OK The PIN code has been changed. + + +# TCP Connection Dialog +CONNECTDLG_CAPTION Connecting +CONNECTDLG_MESSAGE Connecting to the server "%S" (TCP port: %u)... +CONNECTDLG_CANCELING Aborting the connection. Please wait... + + +# NIC Info Dialog +NICINFO_1 Connected to the VPN Server. +NICINFO_1_1 Requesting an IP address to the DHCP server in the VPN... +NICINFO_1_2 Determining the IP address to use in the VPN... + +NICINFO_2 The VPN Connection is Established. +NICINFO_2_1 Your assigned IP address is %S. + +NICINFO_3 The VPN Connection is Established. +NICINFO_3_1 Your IP address %S is ready to use. + + +# Concerning password input dialogs during login +PW_RETRYCOUNT Automatic reconnection will be made after %u seconds with no input. +PW_LOGIN_DLG_TITLE Login +PW_TYPE_0 Anonymous Authentication +PW_TYPE_1 Standard Password Authentication +PW_TYPE_2 RADIUS or NT Domain Authentication +PW_TYPE_3 Client Certificate Authentication +PW_TYPE_4 Smart Card Authentication + +PW_MSG_PROXY User authentication failed on the proxy server %S. Re-enter the correct user name and password. +PW_TYPE_PROXY Proxy Server Authentication + + +# Concerning VPN connection status +STATUS_1 Initializing... +STATUS_2 Connecting to VPN Server "%S" via Proxy Server %S... +STATUS_3 Authenticating User on Proxy Server %S... +STATUS_4 Connecting to VPN Server "%S"... +STATUS_5 Verifying Server Certificate... +STATUS_6 Authenticating User... +STATUS_7 Establishing VPN Session... +STATUS_8 Connecting to VPN Server on Cluster... +STATUS_9 VPN Session has been established. + + +# Concerning certificate dialogs +CERT_NOT_FOUND Unable to find the certificate of the certificate authority who issued this certificate on the list of trusted certificates. +CERT_ROOT This certificate is a root certificate (self-signed certificate). +CERT_LV_C1 Field +CERT_LV_C2 Value +CERT_SERIAL Serial Number +CERT_ISSUER Issuer +CERT_SUBJECT Subject +CERT_NOT_BEFORE Issued at +CERT_NOT_AFTER Expires at +CERT_BITS Bits +CERT_PUBLIC_KEY Public Key +CERT_DIGEST_MD5 Digest (MD5) +CERT_DIGEST_SHA1 Digest (SHA-1) +CERT_NO_SERIAL There is no serial number +CERT_BITS_FORMAT %u bits + + +# Concerning certificate confirmation dialogs +CC_DANGEROUS_MSG The server certificate that was saved on the previous VPN connection to this server (%S) does not match the current server certificate provided by the server. \r\n\r\nDigest Value (MD5) of Previous: %S\r\nDigest Value (SHA1) of Previous: %S\r\n\r\nDigest Value (MD5) of Current: %S\r\nDigest Value (SHA1) of Current: %S\r\n\r\nIt is possible the server administrator changed the certificate on the VPN Server side. However, it is also possible a man-in-the-middle attack such as spoofing is occurring. \r\nIt is strongly recommended that you ask for clarification from the administrator of VPN Server you want to connect to. +CC_WARNING_MSG Do you want the certificate of the VPN Server you are currently connecting to be automatically trusted next time you connect to %s?\r\n\r\nDigest Value (SHA1): %S\r\nDigest Value (MD5): %S\r\n\r\nIf there is doubt regarding the authenticity of this server's certificate, contact the server's owner, by a sure and safe method, and quote the above digest value to confirm the facts. \r\n\r\nClick Yes to automatically trust this certificate if this server provides the same certificate next time you connect to it. \r\nClick No to trust the certificate for this time only and to display this warning again next time you connect to this server. \r\nClick Cancel to return to the Security Warnings window. \r\n\r\nNote: This setting can be changed on an account-by-account basis. You can make this setting in Account Properties of VPN Client Manager. + + +# Errors about Windows Versions +WINVER_TITLE Warning about Windows versions +WINVER_ERROR_FORMAT The version and Service Pack of Windows on %s is "%S".\r\n\r\nThe latest supported version and Service Pack of Windows by %s is as follows:\r\n%S\r\nBecause of the version of Windows on %s is newer than the version of Windows which %s supports, unexpected troubles or compatible issues might occur.\r\nIn order to avoid problems, we will recommend you to obtain and install the latest update of %s.\r\n(It is possible to continue using the current version without updates although that is not what we recommend.)\r\n\r\nIf you are the administrator, you can download the latest update-patch of %s from the web site http://selinks.org/?se for free.\r\n\r\nIf you are not the administrator you should notify the VPN Server's administrator of this message.\r\n\r\n----- MSG%04u%02u -----\r\n\r\n +WINVER_ERROR_VPNSERVER the VPN Server on the destination computer +WINVER_ERROR_VPNBRIDGE the VPN Bridge on the destination computer +WINVER_ERROR_VPNCLIENT the VPN Client on this local computer +WINVER_ERROR_PC_LOCAL this local computer +WINVER_ERROR_PC_REMOTE the remote server + + +# Warning for Open-source Version +OSS_MSG Welcome to the SoftEther VPN Server Academic Version!\r\n\r\n\r\nThis VPN Server is open-source free software developed as academic research at University of Tsukuba, Japan, and distributed from the SoftEther VPN Project (http://www.softether.org/), for free of charge for the public interests.\r\n\r\nSoftEther VPN software is distributed to public as a part of the joint-research contract between University of Tsukuba and SoftEther VPN Project. SoftEther VPN software is developed and published for JUST AN ACADEMIC RESEARCH PURPOSE. Therefore no support service are provided about SoftEther VPN software even if it contains bugs or vulnerabilities. A user will be liable for the result of use SoftEther VPN. The developers and publishers of SoftEther VPN will never be liable for either any consequences or damages.\r\n\r\nEnjoy using VPN with SoftEther VPN Server.\r\n\r\nFor more details of SoftEther VPN, visit http://www.softether.org/.\r\n\r\n +NATT_MSG ** Connected with NAT traversal - might be unstable **\r\n\r\nThis VPN Client is connected to the VPN Server '%S' by using the NAT Traversal (UDP Hole Punching) technology.\r\n\r\nNAT Traversal allows the VPN Server behind the NAT-box to accept VPN connections from VPN Client without any port-forwarding setting on the NAT-box.\r\n\r\nHowever, NAT Traversal-based VPN sessions sometimes become unstable, because NAT Traversal uses UDP-based protocol. For example, the VPN tunnel disconnects every 5 minutes if there is a poor NAT-box between the VPN Server and the VPN Client. Some large-scale NAT gateways in cheap ISPs sometimes cause the same problem on NAT Traversal. This is a problem of routers or ISPs. This is not a problem of SoftEther VPN software.\r\n\r\nTo solve the unstable tunnel problem, you should connect to the VPN Server's TCP listener port directly, instead of using NAT Traversal. To connect to the VPN Server directly by using TCP, a listener port of the VPN Server must be exposed to the Internet by a port-forward setting on the NAT-box. Ask the administrator of the NAT-box, or refer to the manual of the NAT-box to add a port-forwarding setting on the NAT-box.\r\n\r\nIf this message still remains despite the VPN Server is exposing a TCP port to the Internet, check the "Disable NAT-T" checkbox on the VPN Client connection setting screen.\r\n\r\n +NATT_MSG2 ** Connected with NAT traversal - might be unstable **\r\n\r\nThis VPN Client is connected to the VPN Server '%S' by using the NAT Traversal (UDP Hole Punching) technology.\r\n\r\nNAT Traversal allows the VPN Server behind the NAT-box to accept VPN connections from VPN Client without any port-forwarding setting on the NAT-box.\r\n\r\nHowever, NAT Traversal-based VPN sessions sometimes become unstable, because NAT Traversal uses UDP-based protocol. For example, the VPN tunnel disconnects every 5 minutes if there is a poor NAT-box between the VPN Server and the VPN Client. Some large-scale NAT gateways in cheap ISPs sometimes cause the same problem on NAT Traversal. This is a problem of routers or ISPs. This is not a problem of SoftEther VPN software.\r\n\r\nTo solve the unstable tunnel problem, you should connect to the VPN Server's TCP listener port directly, instead of using NAT Traversal. To connect to the VPN Server directly by using TCP, a listener port of the VPN Server must be exposed to the Internet by a port-forward setting on the NAT-box. Ask the administrator of the NAT-box, or refer to the manual of the NAT-box to add a port-forwarding setting on the NAT-box.\r\n\r\nIf this message still remains despite the VPN Server is exposing a TCP port to the Internet, check the "Disable NAT-T" checkbox on the VPN Client connection setting screen after upgrading the VPN Client to Build 9428 or later.\r\n\r\n + + + +# Virtual HUB Admin Options +HUB_AO_CLICK Select an item to view the description here. +HUB_AO_UNKNOWN The description of the item was not found. Refer to the documents, or speculate the meaning and purpose of the item from the name of the item. +HUB_AO_allow_hub_admin_change_option This is a special item. If you are enable (set to 1) this option, then not only the VPN Server's global administrator but also the Virtual Hub's administrator will be granted to modify the Virtual Hub Admin Options by himself. +HUB_AO_deny_hub_admin_change_ext_option If you are enable (set to 1) this option, the Virtual Hub's administrator will be forbidden to modify any values on the Virtual Hub Extended Options, then only the VPN Server's global administrator can modify them. +HUB_AO_no_delay_jitter_packet_loss If you set this option to non-zero value, then all parameters of delay, jitter and packet-loss on the access-list entry will be ignored even if these parameters are set when the administrator adds a new access list entry. Therefore, delay, jitter and packet-loss generating function will be virtually disabled. Because of the delay generating function sometimes make a high volume of load on the CPU and RAM, a Virtual Hub which is shared by several users should have this option enabled. +HUB_AO_max_users If you set this option to non-zero value, the maximum number of user objects registered on the Virtual Hub will be limited to this value, then greater number of user objects than this value cannot be added. +HUB_AO_max_multilogins_per_user If you set this option to non-zero value, the maximum number of VPN Sessions per an individual user object will be limited to this value, then greater number of VPN Sessions of individual user object than this value cannot be established. +HUB_AO_max_groups If you set this option to non-zero value, then the maximum number of group objects on the Virtual Hub will be limited to this value and any more groups will not be allowed to be registered. +HUB_AO_max_accesslists If you set this option to non-zero value, then the maximum number of access list entries on the Virtual Hub will be limited to this value and any more entries will not be allowed to be registered. +HUB_AO_max_sessions_client_bridge_apply Only when this value is set to non-zero value, the values max_sessions_client and max_sessions_bridge will be applied. +HUB_AO_max_sessions If you set this option to non-zero value, then the maximum number of VPN Sessions will be limited to this value. +HUB_AO_max_sessions_client If you set this option to non-zero value, then the maximum number of VPN Client sessions will be limited to this value. No more VPN Client sessions will be allowed to establish. This option is valid only when the max_sessions_client_bridge_apply option is set to non-zero value. +HUB_AO_max_sessions_bridge If you set this option to non-zero value, then the maximum number of VPN Bridge sessions will be limited to this value. No more VPN Bridge sessions will be allowed to establish. This option is valid only when the max_sessions_client_bridge_apply option is set to non-zero value. +HUB_AO_max_bitrates_download If you set this option to non-zero value, then all VPN Sessions on the Virtual Hub will be mandated to have a security policy setting which the "Download Bandwidth" value is set to this value. It will limit the downloading traffic speed of each VPN Session. For example, if this value is set to 1000000, then a downloading bandwidth of each VPN Session on the Virtual Hub will be limited to 1Mbps. +HUB_AO_max_bitrates_upload If you set this option to non-zero value, then all VPN Sessions on the Virtual Hub will be mandated to have a security policy setting which the "Download Bandwidth" value is set to this value. It will limit the uploading traffic speed of each VPN Session. For example, if this value is set to 1000000, then a uploading bandwidth of each VPN Session on the Virtual Hub will be limited to 1Mbps. +HUB_AO_deny_empty_password If you set this option to non-zero value, no user objects will be able to have an empty password. A user who has an empty password will be forbidden to connect a VPN Session. (Exception: a VPN connection from localhost will be permitted even if the password is empty.) +HUB_AO_deny_bridge If you set this option to non-zero value, then any VPN Sessions in Bridge Mode will not be granted to establish, regardless of the setting of existing security policy of the user. No one will be able to connect to the Virtual Hub for bridging purpose. +HUB_AO_deny_routing If you set this option to non-zero value, then any VPN Sessions in Routing Mode will not be granted to establish, regardless of the setting of existing security policy of the user. No one will be able to connect to the Virtual Hub for routing purpose. +HUB_AO_deny_qos If you set this option to non-zero value, then every VPN Sessions will be enforced to disable the QoS function regardless of the setting of existing security policy of the user. +HUB_AO_deny_change_user_password If you set this option to non-zero value, then any users on the Virtual Hub will be forbidden to change its password by VPN Client's password-changing function. +HUB_AO_no_change_users If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to add, edit or remove a user. +HUB_AO_no_change_groups If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to add, edit or remove a group. +HUB_AO_no_securenat If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to enable or disable the SecureNAT function. +HUB_AO_no_securenat_enablenat If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to enable or disable the Virtual NAT function in the SecureNAT function. +HUB_AO_no_securenat_enabledhcp If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to enable or disable the Virtual DHCP Server function in the SecureNAT function. +HUB_AO_no_cascade If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to add, edit, remove or change the online status of a cascade connection. +HUB_AO_no_online If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to change the offline Virtual Hub to the online state. +HUB_AO_no_offline If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to change the online Virtual Hub to the offline state. +HUB_AO_no_change_log_config If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to change the settings of logging function. +HUB_AO_no_disconnect_session If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to disconnect a specific VPN Session. +HUB_AO_no_delete_iptable If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to delete a specific IP address entry from the IP address table database. +HUB_AO_no_delete_mactable If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to delete a specific MAC address entry from the MAC address table database. +HUB_AO_no_enum_session If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to enumerate the sessions on the Virtual Hub. +HUB_AO_no_query_session If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to specify a session and get the information of the session. +HUB_AO_no_change_admin_password If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to change the administrator's password of the Virtual Hub. +HUB_AO_no_change_log_switch_type If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to change the Log Switching settings on the logging function settings of the Virtual Hub. +HUB_AO_no_change_access_list If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to modify the access list of the Virtual Hub. +HUB_AO_no_change_access_control_list If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to modify the source IP address limit list of the Virtual Hub. +HUB_AO_no_change_cert_list If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to modify the trusted certificate authority list of the Virtual Hub. +HUB_AO_no_change_crl_list If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to modify the certificate revoked list of the Virtual Hub. +HUB_AO_no_read_log_file If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to enumerate or download the log files of the Virtual Hub remotely. +HUB_AO_no_change_msg If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to change the message which should be displayed when a VPN Client connects to the Virtual Hub. +HUB_AO_no_access_list_include_file If you set this option to non-zero value, then the administrator of the Virtual HUB will be forbidden to specify "include:" or "exclude:" instruction as a source or a destination user field on a access list entry of the Virtual Hub. + + + +# Virtual Hub Extended Options +HUB_AO_NoAddressPollingIPv4 If you set this option to non-zero value, then the Virtual Hub will not perform the maintenance of the IPv4 address table and the MAC address table on the hub with using sending ARP packets per 5 seconds in order to check keep-alive IPv4 devices. As a result, IPv4 devices might be deleted on the IPv4 address table and MAC address table after a particular period (from 1 to 10 minutes) will be elapsed in the case of no-communication activities via the Virtual Hub, even if it is still alive. This option can eliminate the amount of broadcast packets, however some IPv4-related security policies will not work effectively. +HUB_AO_NoAddressPollingIPv6 If you set this option to non-zero value, then the Virtual Hub will not perform the maintenance of the IPv6 address table and the MAC address table on the hub with using sending ICMPv6 packets per 5 seconds in order to check keep-alive IPv6 devices. As a result, IPv6 devices might be deleted on the IPv6 address table and MAC address table after a particular period (from 1 to 10 minutes) will be elapsed in the case of no-communication activities via the Virtual Hub, even if it is still alive. This option can eliminate the amount of broadcast packets, however some IPv6-related security policies will not work effectively. +HUB_AO_NoIpTable If you set this option to non-zero value, then the Virtual Hub will not construct and maintain the internal IP address table. This option can eliminate the amount of CPU and RAM usages, however some IP-related security policies will not work effectively. +HUB_AO_NoMacAddressLog If you set this option to non-zero value, then any logs which indicate the registration of a new MAC address to the MAC address table on the Virtual Hub will not be logged to the security log. +HUB_AO_ManageOnlyPrivateIP If you set this option to non-zero value, then the IPv4 address table of the Virtual Hub will contain only private IPv4 addresses. In this context, the private IPv4 addresses are: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and 169.254.0.0/16. Any other IPv4 addresses will not added on the table. +HUB_AO_ManageOnlyLocalUnicastIPv6 If you set this option to non-zero value, then the IPv6 address table of the Virtual Hub will contain only local unicast IPv6 addresses. In this context, the private IPv6 addresses are: fe80::/10. Any other IPv6 addresses will not added on the table. +HUB_AO_DisableIPParsing If you set this option to non-zero value, then the Virtual Hub will disable the internal parsing function of IP headers in all Ethernet packets. This option can eliminate the amount of CPU and RAM usages, however the Vitual Hub will not perform building and maintenance of the IP address table internally, and some IP-related security policies will not work effectively. +HUB_AO_YieldAfterStorePacket If you set this option to non-zero value, then the Virtual Hub sets the CPU to idle state after store-forward processing of a packet. This might results good effects to make the delay of packets shorter, however the counts of thread context switch will be increased and the performance might decline. +HUB_AO_FilterPPPoE If you set this option to non-zero value, then the Virtual Hub discards all PPPoE (PPP over Ethernet) packets. It is convenient to split each site's PPPoE segment when making a bridge between two or more local area networks. +HUB_AO_FilterOSPF If you set this option to non-zero value, then the Virtual Hub discards all OSPF (Open Shortest Path First) packets. +HUB_AO_FilterIPv4 If you set this option to non-zero value, then the Virtual Hub discards all IPv4 and ARP packets. +HUB_AO_FilterIPv6 If you set this option to non-zero value, then the Virtual Hub discards all IPv6 packets. +HUB_AO_FilterNonIP If you set this option to non-zero value, then the Virtual Hub discards all non-IP packets (non-IPv4, ARP or IPv6 packets). Incidentally, any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +HUB_AO_FilterBPDU If you set this option to non-zero value, then the Virtual Hub discards all BPDU (Bridge Protocol Data Unit) packets. +HUB_AO_NoIPv6DefaultRouterInRAWhenIPv6 If you set this option to non-zero value, then all VPN Sessions on the Virtual Hub will have the enabled "No Default-Router on IPv6 RA (physical IPv6)" security policy. When the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +HUB_AO_NoLookBPDUBridgeId If you set this option to non-zero value, then the Virtual Hub will ignore the source MAC field in a BPDU (Bridge Protocol Data Unit) packet. This value will be much more advanced. Do not modify it unless you are very ultra special expert of computer networking. +HUB_AO_NoManageVlanId If you set this option to non-zero value, then the Virtual Hub will not use VLAN ID on the MAC address table. Any VLAN ID in tagged-VLAN packets will be ignored. +HUB_AO_VlanTypeId Specify the Ethernet Type ID (TPID) of VLAN tags in decimal. The default value is 33024 (0x8100 in hex). This value will be much more advanced. Do not modify it unless you are very ultra special expert of computer networking. +HUB_AO_FixForDLinkBPDU If you set this option to non-zero value, then the FixForDLinkBPDU option will be enabled. This value will be much more advanced. Do not modify it unless you are very ultra special expert of computer networking. +HUB_AO_NoIPv4PacketLog If you set this option to non-zero value, then IPv4 packets via the Virtual Hub will not be logged. +HUB_AO_NoIPv6PacketLog If you set this option to non-zero value, then IPv6 packets via the Virtual Hub will not be logged. +HUB_AO_NoSpinLockForPacketDelay If you set this option to non-zero value, then the VPN Server will not use spin-lock mechanisms to simulate the delay of packets when the packet-delay generating function is applied to the packet. Instead, the timer interrupt by the operating system will be adopted. It will reduce the CPU time, however the resolution of generating delays will deteriorate. +HUB_AO_BroadcastStormDetectionThreshold Specify the threshold to detect the broadcast storm per a second. When the number of broadcast packets from a particular VPN Session exceeded this threshold, packets will be regarded as broadcast storm and become subjects to be filtered. The default value (zero-value) is 32. +HUB_AO_ClientMinimumRequiredBuild If you set this option to non-zero value, then the Virtual Hub will deny any access from VPN Client which has less build number than this value. +HUB_AO_RequiredClientId If you set this option to non-zero value, then the Virtual Hub will deny any access from VPN Client which doesn't have the embedded "Client ID" value in the software. +HUB_AO_AdjustTcpMssValue If you set this option to non-zero value, then the Virtual Hub will adjust MSS (Max Segment Size) values of headers of all TCP/IP packets not to exceed this value. +HUB_AO_DisableAdjustTcpMss If you set this option to non-zero value, then any MSS (Max Segment Size) options on the Virtual Hub will be disabled. Even if the AdjustTcpMssValue option is specified, or a VPN Session is made by IPsec / L2TP / EtherIP / L2TPv3 Server Function, the adjustment of MSS will be disabled. +HUB_AO_NoDhcpPacketLogOutsideHub If you set this option to non-zero value, then the Virtual Hub will not record non-related DHCP packets to the packet log. "Non-related DHCP packets" are DHCP packets which are not bound to any VPN Session on the Virtual Hub. +HUB_AO_DisableHttpParsing If you set this option to non-zero value, then the Virtual Hub will not perform parsing HTTP headers in all HTTP packets. It will reduce the usage of CPU and RAM, however the HTTP access logs will not be recorded. +HUB_AO_DisableUdpAcceleration If you set this option to non-zero value, then all UDP Acceleration Function will be disabled on the all VPN Sessions of the Virtual Hub. +HUB_AO_DisableUdpFilterForLocalBridgeNic If you set this option to non-zero value, then the Virtual Hub disables the trouble-preventing filtering function to filter DHCP packets which might causes of network unstable. By default, a local bridge interface sometimes try to acquire an IP address from remote-side DHCP server, however such a behavior should infinite loop in the routing table. The filtering function can avoid such problems. This option can disable the filtering function. +HUB_AO_ApplyIPv4AccessListOnArpPacket If you set this option to non-zero value, then the IPv4 access list entries will be applied on not only IPv4 packets but also ARP packets. It is convenient to filter unnecessary ARP packets which might cause troubles. +HUB_AO_RemoveDefGwOnDhcpForLocalhost If you set this option to non-zero value, when a VPN Client on the localhost connects to the Virtual Hub and try to acquire an IP address from the DHCP Server in the segment of the Virtual Hub, corresponding DHCP reply packets will be discarded. It can prevent unexpected infinite loop of packets routing. +HUB_AO_SecureNAT_MaxTcpSessionsPerIp If you set this option to non-zero value, then the number of TCP connections (which is not SYN_SENT) per IP state will be limited to this value. +HUB_AO_SecureNAT_MaxTcpSynSentPerIp If you set this option to non-zero value, then the number of TCP connections (which is SYN_SENT) per IP state will be limited to this value. +HUB_AO_SecureNAT_MaxUdpSessionsPerIp If you set this option to non-zero value, then the number of UDP sessions per IP state will be limited to this value. +HUB_AO_SecureNAT_MaxDnsSessionsPerIp If you set this option to non-zero value, then the number of DNS sessions per IP which is not SYN_SENT state will be limited to this value. +HUB_AO_SecureNAT_MaxIcmpSessionsPerIp If you set this option to non-zero value, then the number of ICMP sessions per IP which is not SYN_SENT state will be limited to this value. +HUB_AO_AccessListIncludeFileCacheLifetime Specify a period in seconds to hold the cache of external user-list files which is for an access list entry which has "include:" or "exclude:" formats as its username. +HUB_AO_DisableKernelModeSecureNAT If you set this option to non-zero value, then the Kernel-mode NAT function on the SecureNAT function will be disabled. Kernel-mode NAT is a function to accelerate the performance of the Virtual NAT function on SecureNAT. Kernel-mode NAT can work only when the VPN Server process is running with system privileges (i.e. root, SYSTEM or Administrators contexts.). If the Kernel-mode NAT causes something wrong operations, use this option to disable it. +HUB_AO_DisableUserModeSecureNAT If you set this option to non-zero value, then the User-mode NAT function on the SecureNAT function will be disabled. User-mode NAT is a function to make the NAT possible to run as normal-user privileges. +HUB_AO_DisableCheckMacOnLocalBridge If you set this option to non-zero value, the MAC address duplication check will be disabled on the Local Bridge function. There might be a case when some network adapters has a problem that reflects outgoing packets towards the Virtual Hub. A Virtual HUB detects such duplications automatically, and discards them. Enable this flag to disable the detection and discarding. +HUB_AO_DisableCorrectIpOffloadChecksum If you set this option to non-zero value, then the checking and correction of IP check-sum value on the Local Bridge function. Some network adapters, which have IP, TCP or UDP header check-sum offloading engines, transmit packets with incomplete check-sum values. Such packets cannot be treated correctly by receiver-side. So the Local Bridge detects such packets and corrects its check-sum fields. Enable this flag to disable such correction. +HUB_AO_BroadcastLimiterStrictMode If you set this option to non-zero value, then the broadcast-storm detection algorithm will compare either source or destination IP address of each packet. If any of the two fields matches, the packet will be recorded on the short-term history of broadcast-storm detection state machine. +HUB_AO_MaxLoggedPacketsPerMinute Maximum number of logging target packets per minute. +HUB_AO_DoNotSaveHeavySecurityLogs Do not take heavy security log. +HUB_AO_DropBroadcastsInPrivacyFilterMode Drop broadcasting packets if the both source and destination session is PrivacyFilter mode. +HUB_AO_DropArpInPrivacyFilterMode Drop ARP packets if the both source and destination session is PrivacyFilter mode. +HUB_AO_SuppressClientUpdateNotification Suppress the update notification screen on the VPN Client. +HUB_AO_FloodingSendQueueBufferQuota Specify the quota limitation value (in bytes) of the sending queue buffer size which the flooding operation on the Virtual Hub can consume. The quota value is applied on the total length of sending queues of all active VPN sessions. Specify '0' to disable the quota. This option is effective to solve the out-of-memory problem on the network where there are many flooding packets. +HUB_AO_AssignVLanIdByRadiusAttribute Enable the VLAN ID dynamic assignment function. Each VPN session will be assigned its own VLAN ID by the RADIUS attribute value when the user is authenticated by the external RADIUS server unless the user object has a VLAN ID security policy. The RADIUS attribute with the name "Tunnel-Pvt-Group-ID" (ID = 81) will be used as the VLAN ID. The data type must be STRING. +HUB_AO_DenyAllRadiusLoginWithNoVlanAssign If you set this option to non-zero value, then all users, which RADIUS server returns no "Tunnel-Pvt-Group-ID" (ID = 81) value, will be denied to connect to the Virtual Hub. (Only if the values of AssignVLanIdByRadiusAttribute is non-zero value.) +HUB_AO_SecureNAT_RandomizeAssignIp If you set this option to non-zero value, then the Virtual DHCP Server of the SecureNAT function will choose an unused IP address randomly from the DHCP pool while the default behavior is to choose the first unused IP address. +HUB_AO_DetectDormantSessionInterval If you set this option to non-zero value, then the Virtual Hub will treat the VPN sessions, which have transmitted no packets for the last specified intervals (in seconds), as Dormant Sessions. The Virtual Hub will not flood packets, which should be flood, to any Dormant Sessions. +HUB_AO_NoPhysicalIPOnPacketLog If you set this option to non-zero value, then the physical IP addresses of VPN clients of either the source VPN session or the destination VPN session will not be recorded on the packet log file. +HUB_AO_UseHubNameAsDhcpUserClassOption If you set this option to non-zero value, then the Virtual Hub Name will be added to a DHCP request to an external DHCP server as the "User-Class" option. This allows to use separate pools of IP addresses for each Virtual Hub. (For only L2TP/IPsec and OpenVPN sessions.) +HUB_AO_UseHubNameAsRadiusNasId If you set this option to non-zero value, then the NAS-Identifier RADIUS attribute will be set to a name of the Virtual Hub. This allows to determine on RADIUS server whether access to the Virtual Hub should be granted or denied. + + +# Concerning failed connection dialogs +ERRDLG_ERRMSG Error (Error Code %u):\r\n%s\r\n +ERRDLG_RETRYCOUNT An automatic reconnection will be made after %u seconds... +ERRDLG_INFORMATION Click Retry to start connecting again. +ERRDLG_RETRY_INFO_1 Do you wish to retry? (%u retries / %u total retries) +ERRDLG_RETRY_INFO_2 Do you wish to retry? (%u retries / total infinite retries) +ERRDLG_DISCONNECTED_MSG Connection to VPN Server "%S" has been disconnected. +ERRDLG_DEVICE_ERROR The connection with the VPN Server has been disconnected because the Virtual Network Adapter (device name: %S) has been stopped. \r\n\r\nError code %u: %s + + +# Concerning protocols +PROTO_DIRECT_TCP Direct TCP/IP Connection +PROTO_HTTP_PROXY Connection via HTTP Proxy +PROTO_SOCKS_PROXY Connection via SOCKS4 Proxy +PROTO_SOCKS5_PROXY Connection via SOCKS5 Proxy +PROTO_SSH Connection via SSH Server +PROTO_UNKNOWN Unknown Protocol + + +# Concerning caps +# (Control characters) +CAPS_YES Yes +CAPS_NO No +# (Title) +CT_i_max_packet_size Maximum Ethernet Packet Size +CT_i_max_hubs Maximum Virtual Hubs +CT_i_max_user_creation Maximum Users on Entire VPN Server +CT_i_max_sessions Maximum Total Sessions +CT_i_max_clients Maximum Client Sessions +CT_i_max_bridges Maximum Bridge Sessions +CT_i_max_users_per_hub Maximum Users per Virtual Hub +CT_i_max_groups_per_hub Maximum Groups per Virtual Hub +CT_i_max_access_lists Maximum Access Lists per Virtual Hub +CT_i_max_mac_tables Maximum MAC Address Entries per Virtual Hub +CT_i_max_ip_tables Maximum IP Address Entries per Virtual Hub +CT_i_max_secnat_tables Maximum SecureNAT Entries per Virtual Hub +CT_i_max_l3_sw Maximum Virtual Layer 3 Switches +CT_i_max_l3_if Maximum Virtual Interfaces per Layer 3 Switch +CT_i_max_l3_table Maximum Routing Tables per Layer 3 Switch +CT_b_bridge Works as VPN Bridge Software +CT_b_standalone Standalone Mode +CT_b_cluster_controller Cluster Controller Mode +CT_b_cluster_member Cluster Member Mode +CT_b_vpn_client_connect Accepting Connection from VPN Client / Bridge +CT_b_local_bridge Local Bridge is Supported +CT_b_must_install_pcap Packet Capture Driver is Not Installed +CT_b_tap_supported Tun/Tap Device is Supported (only in Linux) +CT_b_support_config_hub Changing Virtual Hub Settings is Supported +CT_b_support_securenat SecureNAT is Supported +CT_b_virtual_nat_disabled Virtual NAT is Disabled (only DHCP Enabled) +CT_b_support_cascade Cascade Connection is Supported +CT_b_support_cascade_cert Server Authentication for Cascade Connection is Supported +CT_b_support_config_log Changing Settings for Saving Log is Supported +CT_b_support_autodelete Automatic Deletion of Log Files is Supported +CT_b_support_radius External Authentication Server is Supported +CT_b_support_config_rw Remote Reading and Writing of Config File is Supported +CT_b_support_hub_admin_option Virtual Hub Administration Options is Supported +CT_b_support_cascade_client_cert Client Certificates for Cascade Connection is Supported +CT_b_support_hide_hub Virtual Hub Enumeration Setting is Supported +CT_b_support_cluster_admin Integrated Administration for All Cluster Nodes is Supported +CT_b_support_cluster Operation as Part of a Cluster is Supported +CT_b_support_cluster_controller Operating as a Cluster Controller +CT_b_support_layer3 The Virtual Layer 3 Switch is Supported +CT_b_support_crl Virtual Hub-Specific Certificate Revocation Lists is Supported +CT_b_support_ac Virtual Hub-Specific Source IP Address Limit Lists is Supported +CT_b_support_read_log Downloading of Log Files is Supported +CT_b_support_rename_cascade Renaming of Cascade Connection is Supported +CT_b_support_license Management of Licenses is Supported +CT_b_support_limit_multilogin Limits for Multiple Login by Same User is Supported +CT_b_support_qos VoIP / QoS Functions is Supported +CT_b_support_syslog Syslog Sending Functions is Supported +CT_b_cluster_hub_type_fixed The Virtual Hub Types in a Cluster are Fixed +CT_b_beta_version Beta Version (Pre-release build) +CT_b_support_check_mac Specifing MAC Address in Access Lists is Supported +CT_b_support_check_tcp_state Checking TCP Connection State Filtering is Supported +CT_b_support_network_connection_name Getting Network Friendly Name is Supported + +CT_b_support_radius_retry_interval_and_several_servers Retry Interval and Multi server is Supported in RADIUS Auth +CT_b_support_vlan Tagged VLAN ID is Supported in MAC Address Table +CT_b_support_hub_ext_options Virtual Hub Extended Option is Supported +CT_b_support_policy_ver_3 Security Policy version 3 is Supported +CT_b_support_ipv6_acl IPv6 Access List is Supported +CT_b_support_ex_acl Delay, Jitter and Packet Loss is Supported in Access List +CT_b_support_acl_group Conditioning by Group name is Supported in Access List +CT_b_support_ipv6_ac IPv6 IP Access Control Lists is Supported +CT_b_support_eth_vlan Tagged VLAN Packet Transparency Support tool is Supported +CT_b_support_msg Message of Today function is Supported +CT_b_vpn3 Internal Version 3.0 functions are Supported +CT_b_vpn4 Internal Version 4.0 functions are Supported +CT_b_support_ipsec IPsec / L2TP / EtherIP / L2TPv3 Server Functions are Supported +CT_b_support_sstp MS-SSTP VPN Server Function is Supported +CT_b_support_udp_acceleration UDP Acceleration Function is Supported +CT_b_support_openvpn OpenVPN Server Function is Supported +CT_b_support_ddns Dynamic DNS Client Function is Supported +CT_b_support_ddns_proxy DDNS via Proxy Server is Supported +CT_b_support_special_listener VPN over ICMP and VPN over DNS is Supported +CT_b_support_redirect_url_acl HTTP URL Redirection in Access List is Supported +CT_b_is_in_vm Running on VM (Virtual Machine) +CT_b_support_azure VPN Azure is Supported +CT_b_support_aes_ni CPU AES Acceleration (AES-NI) is Active +CT_b_using_selow_driver SoftEther Lightweight Kernel-mode Ethernet Driver is Active +CT_b_support_vgs VPN Gate Service Server Functions are Supported +CT_b_support_vgs_in_client VPN Gate Service Server Functions (VPN Client integrated) +CT_b_is_softether Either Free or Open-Source Version of SoftEther VPN +CT_b_suppport_push_route Static Routing Table Pushing Function +CT_b_suppport_push_route_config Static Routing Table Pushing Function (Configurable) + +# Concerning policies +POL_TITLE_STR Policy Name +POL_VALUE_STR Current Value +POL_TYPE_BOOL ON / OFF +POL_TYPE_INT Integer +POL_BOOL_ENABLE Enabled +POL_BOOL_DISABLE - +POL_BOOL_DISABLE_EX - +POL_INT_ZERO - +POL_INT_COUNT %u +POL_INT_SEC %u seconds +POL_INT_BPS %u bps +POL_INT_VLAN %u + +# Ver 2.0 +POL_0 Allow Access +POL_EX_0 The users defined this policy have permission to make VPN connection to VPN Server. +POL_1 Filter DHCP Packets (IPv4) +POL_EX_1 All IPv4 DHCP packets in sessions defined this policy will be filtered. +POL_2 Disallow DHCP Server Operation (IPv4) +POL_EX_2 Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients. +POL_3 Enforce DHCP Allocated IP Addresses (IPv4) +POL_EX_3 Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side. +POL_4 Deny Bridge Operation +POL_EX_4 Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible. +POL_5 Deny Routing Operation (IPv4) +POL_EX_5 IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +POL_6 Deny MAC Addresses Duplication +POL_EX_6 The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +POL_7 Deny IP Address Duplication (IPv4) +POL_EX_7 The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +POL_8 Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts +POL_EX_8 The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting. +POL_9 Privacy Filter Mode +POL_EX_9 All direct communication between sessions with the privacy filter mode policy setting will be filtered. +POL_10 Deny Operation as TCP/IP Server (IPv4) +POL_EX_10 Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4. +POL_11 Unlimited Number of Broadcasts +POL_EX_11 If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting. +POL_12 Allow Monitoring Mode +POL_EX_12 Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub. +POL_13 Maximum Number of TCP Connections +POL_EX_13 For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session. +POL_14 Time-out Period +POL_EX_14 For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server. +POL_15 Maximum Number of MAC Addresses +POL_EX_15 For sessions with this policy setting, this limits the number of MAC addresses per session. +POL_16 Maximum Number of IP Addresses (IPv4) +POL_EX_16 For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session. +POL_17 Upload Bandwidth +POL_EX_17 For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub. +POL_18 Download Bandwidth +POL_EX_18 For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub. +POL_19 Deny Changing Password +POL_EX_19 The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar. +POL_20 Maximum Number of Multiple Logins +POL_EX_20 Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy. This security policy is only available on VPN Server 3.0 or greater, or VPN Server 2.0 with the multi-login restriction function. +POL_21 Deny VoIP / QoS Function +POL_EX_21 Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions. This security policy is only available on VPN Server 3.0 or greater, or VPN Server 2.0 with the VoIP / QoS functions. + +# Ver 3.0 +POL_22 Filter RS / RA Packets (IPv6) +POL_EX_22 All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection. +POL_23 Filter RA Packets (IPv6) +POL_EX_23 All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network. +POL_24 Filter DHCP Packets (IPv6) +POL_EX_24 All IPv6 DHCP packets in sessions defined this policy will be filtered. +POL_25 Disallow DHCP Server Operation (IPv6) +POL_EX_25 Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients. +POL_26 Deny Routing Operation (IPv6) +POL_EX_26 IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible. +POL_27 Deny IP Address Duplication (IPv6) +POL_EX_27 The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting. +POL_28 Deny Operation as TCP/IP Server (IPv6) +POL_EX_28 Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6. +POL_29 Maximum Number of IP Addresses (IPv6) +POL_EX_29 For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session. +POL_30 Disallow Password Save in VPN Client +POL_EX_30 For users with this policy setting, when the user is using *standard* password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +POL_31 VPN Client Automatic Disconnect +POL_EX_31 For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access. +POL_32 Filter All IPv4 Packets +POL_EX_32 All IPv4 and ARP packets in sessions defined this policy will be filtered. +POL_33 Filter All IPv6 Packets +POL_EX_33 All IPv6 packets in sessions defined this policy will be filtered. +POL_34 Filter All Non-IP Packets +POL_EX_34 All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. +POL_35 No Default-Router on IPv6 RA +POL_EX_35 In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +POL_36 No Default-Router on IPv6 RA (physical IPv6) +POL_EX_36 In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router. +POL_37 VLAN ID (IEEE802.1Q) +POL_EX_37 You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing. + + +# Concerning remote connection dialog +REMOTE_DEF_CAPTION Remote Connection +REMOTE_DEF_TITLE Specify the computer you want to remotely connect to. + + +# Concerning client notification service +CN_TITLE SoftEther VPN Client Developer Edition + + +# Concerning Connection Manager +CM_TITLE SoftEther VPN Client Developer Edition Manager +CM_PW_LOCALMACHINE Local Computer +CM_NO_REMOTE The VPN Client service running on %s disallows remote connections. +CM_CONNECT_FAILED Unable to connect to the VPN Client service operating on %s. \r\nMake sure the VPN Client service has started and is running normally. +CM_BAD_PASSWORD The password is incorrect. Re-enter password. The password is case-sensitive so be sure to discern between upper and lower case letters. +CM_NUM_CONN_COUNT %u VPN Sessions +CM_CONN_NO Not Connected +CM_PRODUCT_NAME SoftEther VPN Client Build %u +CM_ACCOUNT_COLUMN_1 VPN Connection Setting Name +CM_ACCOUNT_COLUMN_2 Status +CM_ACCOUNT_COLUMN_3 VPN Server Hostname +CM_ACCOUNT_COLUMN_3_2 Virtual Hub +CM_ACCOUNT_COLUMN_4 Virtual Network Adapter Name +CM_VLAN_COLUMN_1 Virtual Network Adapter Name +CM_VLAN_COLUMN_2 Status +CM_VLAN_COLUMN_3 MAC Address +CM_VLAN_COLUMN_4 Version +CM_ACCOUNT_OFFLINE Offline +CM_ACCOUNT_ONLINE Connected +CM_ACCOUNT_CONNECTING Connecting +CM_VLAN_ENABLED Enabled +CM_VLAN_DISABLED Disabled +CM_DELETE_ACCOUNT_MSG This will delete the VPN Connection Setting "%s". Do you really want to do this? +CM_ST_ACCOUNT_NAME VPN Connection Setting Name +CM_ST_CONNECTED Session Status +CM_ST_CONNECTED_TRUE Connection Completed (Session Established) +CM_ST_CONNECTED_FALSE Trying to Connect +CM_ST_CONNECTING Connection to VPN Server Started +CM_ST_NEGOTIATION Negotiating +CM_ST_AUTH Authenticating User +CM_ST_ESTABLISHED Connection is Established +CM_ST_RETRY Retrying +CM_ST_IDLE Idle +CM_ST_SERVER_NAME Server Name +CM_ST_SERVER_PORT Port Number +CM_ST_PORT_TCP TCP Port %u +CM_ST_SERVER_P_NAME Server Product Name +CM_ST_SERVER_P_VER Server Version +CM_ST_SERVER_P_BUILD Server Build +CM_ST_START_TIME Connection Started at +CM_ST_FIRST_ESTAB_TIME First Session has been Established since +CM_ST_NONE - +CM_ST_CURR_ESTAB_TIME Current Session has been Established since +CM_ST_NUM_ESTABLISHED Number of Established Sessions +CM_ST_NUM_STR %u Times +CM_ST_HALF_CONNECTION Half Duplex TCP Connection Mode +CM_ST_HALF_TRUE Yes (Half Duplex Mode) +CM_ST_HALF_FALSE No (Full Duplex Mode) +CM_ST_QOS VoIP / QoS Function +CM_ST_QOS_TRUE Enabled +CM_ST_QOS_FALSE Disabled +CM_ST_NUM_TCP Number of TCP Connections +CM_ST_NUM_TCP_UPLOAD Number of Uplink TCP Connections +CM_ST_NUM_TCP_DOWNLOAD Number of Downlink TCP Connections +CM_ST_MAX_TCP Maximum Number of TCP Connections +CM_ST_VLAN_ID VLAN ID +CM_ST_NO_VLAN - +CM_ST_USE_ENCRYPT Encryption +CM_ST_USE_ENCRYPT_TRUE Enabled (Algorithm: %S) +CM_ST_USE_ENCRYPT_TRUE2 Enabled +CM_ST_USE_ENCRYPT_FALSE Disabled (No Encryption) +CM_ST_USE_COMPRESS Use of Compression +CM_ST_UDP_ACCEL_ENABLED UDP Acceleration is Supported +CM_ST_UDP_ACCEL_USING UDP Acceleration is Active +CM_ST_RUDP TCP over UDP (NAT Traversal) +CM_ST_UNDERLAY_PROTOCOL Physical Underlay Protocol +CM_ST_COMPRESS_TRUE Yes (%u %%) +CM_ST_COMPRESS_FALSE No (No Compression) +CM_ST_SESSION_NAME Session Name +CM_ST_CONNECTION_NAME Connection Name +CM_ST_SESSION_KEY Session Key (160 bit) +CM_ST_BRIDGE_MODE Bridge / Router Mode +CM_ST_MONITOR_MODE Monitoring Mode +CM_ST_YES Yes +CM_ST_NO No +CM_ST_SEND_SIZE Outgoing Data Size +CM_ST_RECV_SIZE Incoming Data Size + +CM_ST_SEND_UCAST_NUM Outgoing Unicast Packets +CM_ST_SEND_UCAST_SIZE Outgoing Unicast Total Size +CM_ST_SEND_BCAST_NUM Outgoing Broadcast Packets +CM_ST_SEND_BCAST_SIZE Outgoing Broadcast Total Size + +CM_ST_RECV_UCAST_NUM Incoming Unicast Packets +CM_ST_RECV_UCAST_SIZE Incoming Unicast Total Size +CM_ST_RECV_BCAST_NUM Incoming Broadcast Packets +CM_ST_RECV_BCAST_SIZE Incoming Broadcast Total Size + +CM_ST_NUM_PACKET_STR %S packets +CM_ST_SIZE_BYTE_STR %S bytes + +CM_NEW_ICON Add VPN Connection +CM_VGC_ICON VPN Gate Public VPN Relay Servers +CM_VGC_LINK VPN Gate Academic Web Site +CM_ST_TITLE Connection Status of %s +CM_ST_COLUMN_1 Item +CM_ST_COLUMN_2 Status +CM_NEW_ACCOUNT_NAME_1 New VPN Connection +CM_NEW_ACCOUNT_NAME_2 New VPN Connection (%u) +CM_ACCOUNT_TITLE_1 New VPN Connection Setting Properties +CM_ACCOUNT_TITLE_2 Properties of %s +CM_SERVER_CERT_1 &Specify Individual Cert +CM_SERVER_CERT_2 &Delete Certificate +CM_CLIENT_CERT_1 Specify Client &Certificate +CM_CLIENT_CERT_2 Delete &Client Certificate +CM_CERT_INFO Issued to: %s\r\nIssuer: %s\r\nExpiration: %s +CM_NO_CERT You must specify a client certificate to be used for user authentication. +CM_NO_SECURE Specify the client certificate and private key inside the smart card to be used for user authentication. +CM_CERT_SECURE_INFO Certificate: "%S"\r\nPrivate Key: "%S" +CM_SELECT_SECURE_DEVICE Select Smart Card +CM_SELECT_CERT_INCARD Specify Cert and Pri&vate Key +CM_VIEW_CLIENT_CERT &View Client Certificate +CM_NO_VLAN Before you can create a new VPN Connection Setting you need to create a Virtual Network Adapter. \r\n\r\nDo you want to create a Virtual Network Adapter? +CM_NO_VLAN_2 Before connecting to VPN Server you need to create a Virtual Network Adapter. \r\n\r\nDo you want to create a Virtual Network Adapter? +CM_VLAN_REMOTE_ERROR Unable to create a Virtual Network Adapter from a remote location. \r\n\rStart the VPN Client Manager on the local computer on which the VPN Client service is running and install a Virtual Network Adapter. +CM_9X_VLAN_INSTALL A new Virtual Network Adapter will now be created. \r\n\r\nAfter a Virtual Network Adapter is created, it is necessary to restart Windows directly afterwards. \r\nWhile the Virtual Network Adapter is being installed, you may be asked to insert the Windows installation CD-ROM. \r\n\r\nClose all currently running applications except the VPN Client Manager, have your Windows installation CD-ROM ready at hand, and click OK. \r\nClicking OK will start the installation of the Virtual Network Adapter. When this is finished, Windows will automatically restart. +CM_9X_VLAN_ME_MESSAGE A Virtual Network Adapter has been created. After you click OK, the computer will automatically restart. \r\n\r\nAfter the computer restarts, the Install New Device wizard might appear. \r\nIf the wizard does appear, click Next for each screen until the installation is completed. +CM_9X_VLAN_UNINSTALL To delete a Virtual Network Adapter, delete it from Network Properties. \r\n\r\nDo you want to display the Network Properties window? +CM_PORT_1 8888 (PX-VPN Port) +CM_PORT_2 443 (HTTPS Port) +CM_PORT_3 992 (TELNETS Port) +CM_PORT_4 5555 (SE-VPN Port) +CM_RETRY_INTERVAL_ERROR Set a re-connection interval (at least 5 seconds) when VPN connection has been disconnected. +CM_DELETE_CLIENT_CERT This will delete the client certificate that has been set. Do you really want to do this? +CM_DELETE_SERVER_CERT This will delete the server individual certificate that has been set. Do you really want to do this? +CM_SET_STARTUP The VPN Connection Setting "%s" is now set as a startup connection.\r\n\r\nThis account will be connected automatically next time the computer restarts.\r\n(If you are using Windows, the automatic connection will be started in the background mode before a user logs on to Windows.) +CM_REMOVE_STARTUP Do you wish to delete the startup connection property of VPN Connection Setting "%s"? +CM_NO_DISCONNECT_SPAN Please set the life of the TCP connection. +CM_HALF_MSG When using half-duplex mode, set at least 2 for the number of TCP connections. +CM_TOO_SMALL_INTERVAL Set at least 1 second for the interval to establish a TCP connection. +CM_DELETE_VLAN This will delete the Virtual Network Adapter "%s". Do you really want to do this? +CM_COPY_NAME_1 Copy of %s +CM_COPY_NAME_2 Copy (%u) of %s +CM_IMPORT_NAME_1 %s +CM_IMPORT_NAME_2 %s (%u) +CM_CERT_COLUMN_1 Issued to +CM_CERT_COLUMN_2 Issuer +CM_CERT_COLUMN_3 Expiration +CM_CERT_DELETE_MSG Delete this certificate from the list? +CM_PASSWORD_SET The password has been set. +CM_PASSWORD_REMOVE The password setting has been deleted. +CM_UNDER_CONSTRUCTION Incomplete. +CM_CURRENT_ACTIVE The settings of VPN Connection Setting "%s" were saved. But this VPN Connection Setting is currently online and the new settings will apply in the next connection. +CM_DISCONNECT_ALL This will disconnect all %u VPN Connection Settings that are currently connected. \r\nDo you really want to do this? +CM_HTTPS_MSG You have chosen to connect via an HTTP proxy server. \r\n\r\nUsual HTTP proxy servers do not allow access to a TCP port of your choice. \r\nWhen a VPN Client connects to a VPN Server via a HTTP proxy server, it is possible to connect by using HTTPS (HTTP over SSL) communication. \r\nIn this case it is recommended that you specify 443 (HTTPS Port) as the destination VPN Server port number. \r\n(If you specify a different port number, there are cases where it will not be possible to connect via an HTTP proxy server. \r\n Make sure that port 443 is enabled on the destination VPN Server.)\r\n\r\nFor detailed information contact either the system administrator or network administrator of the HTTP proxy server you plan to connect via. \r\n\r\nDo you want to change the port number specification of the destination VPN Server to 443 (HTTPS Port)? +CM_REMOTE_WARNING You are making changes to the remote management setting that will disallow remote management. \r\n\r\nCurrently the VPN Client Manager is connected to remote computer "%S" and is controlling the VPN Client service on that computer. \r\nIf remote connection is disabled, it will no longer be possible to remotely connect to and control the VPN Client service on computer "%S" using the VPN Client Manager. \r\n\r\nDo you want to disable remote management? +CM_KEEP_INTERVAL_MSG Set a period between %u and %u seconds in the Packet Send Interval. +CM_REMOTE_TITLE Using the VPN Client Manager, it is possible to connect to, and remotely manage a VPN Client service operating on another computer. \r\n(Note that the VPN Client service on the remote computer must allow remote management.) +CM_DESKTOP_LOCAL_PC Local Computer +CM_DESKTOP_REMOTE_PC Computer %S +CM_DESKTOP_MSG_LOCAL_TS Terminal Service (Remote Desktop) Function +CM_DESKTOP_MSG_LOCAL_SW Switch User Function +CM_DESKTOP_MSG_LOCAL_1 Currently %s is installed on this computer, providing an environment that permits multiple users to log on concurrently. In this case, the messages regarding progress status, error messages and other messages displayed by VPN Client will be displayed on a session called the "Console Session". +CM_DESKTOP_MSG_LOCAL_21 Currently "Session ID: 0, User %s" is assigned as the Console Session of this computer, however because you have started VPN Client Manager on session %u, it is not possible to display the message windows such as the progress status or errors that VPN Client displays. +CM_DESKTOP_MSG_LOCAL_22 Currently no one is logged into the Console Session "Session ID: 0" of this computer and because you have started VPN Client Manager on session %u, it is not possible to display the message windows such as the progress status or errors that VPN Client displays. +CM_DESKTOP_MSG_LOCAL_31 It is recommended that when this computer's Console Session (Session ID: 0, User %s) is displayed, start the VPN Client Manager in that session and start the connection to the VPN Connection Setting "%s". You will be able to start a connection process by doing what you are doing now. But it will be at the risk of being unable to check the progress status and error messages that may be displayed during the process. +CM_DESKTOP_MSG_LOCAL_32 It is recommended that you first log off and then after logging in locally, start the VPN Client Manager in that session and start the connection to VPN Connection Setting "%s". Although you will be able to start a connection process by doing what you are doing now, this will be at the risk of being unable to check the progress status and error messages that may be displayed during the process. +CM_DESKTOP_MSG_REMOTE_1 Because you are currently performing operation while remotely connected to VPN Client on computer %S, if the VPN Client displays any progress status or error messages during the VPN connection process to the VPN Connection Setting, you will not be able to check these messages from your current screen display. +CM_DESKTOP_MSG_REMOTE_2 To check all the progress status, error and other message windows that VPN Client displays, you must log in locally to computer %S and display the Control Session (desktop). +CM_DESKTOP_MSG_REMOTE_3 It is recommended that you first log in directly and locally to computer %S, and then start the VPN Client Manager in that session and start the connection to VPN Connection Setting "%s". Although you will be able to start a connection process by doing what you are doing now, this will be at the risk of being unable to check the progress status and error messages that may be displayed during the process. +CM_STOP_INST_VLAN_1 To install a Virtual Network Adapter on this computer you must start the VPN Client Manager within a "Console Session". \r\n\r\nCurrently, %s is installed on this computer and the current user is not logged into the Console Session but rather is logged in as the remote session (session ID: %u).\r\nTo install a Virtual Network Adapter, VPN Client Manager must be started in the Console Session (session ID: %u, user %s is logged on). \r\n\r\nFirst log on to the computer locally by using the user switching function, or the /console switch function that is on the remote desktop, or alternatively the computer's local console device and then start the VPN Client Manager and install the Virtual Network Adapter. +CM_STOP_INST_VLAN_2 To install a Virtual Network Adapter on this computer you must start the VPN Client Manager within a "Console Session". \r\n\r\nCurrently, %s is installed on this computer and the current user is not logged into the Console Session but rather is logged in as the remote session (session ID: %u).\r\nTo install a Virtual Network Adapter you must start the VPN Client Manager within a "Console Session". \r\n(Currently the user is not logged on to the Console Session (Session ID: 0).) \r\n\r\nFirst log on to the computer locally by using the user switching function, or the /console switch function that is on the remote desktop, or alternatively the computer's local console device and then start the VPN Client Manager and install the Virtual Network Adapter. +CM_SHORTCUT_DESKTOP_MSG To start a connection using the shortcut to the VPN Connection Setting, you must launch the shortcut file within the "Console Session". \r\n\r\nCurrently the user is logged on as the remote session (session ID: %u) and not as the Console Session. +CM_HTTP_PROXY_WARNING Connect via HTTP Proxy Server is selected. \r\n\r\nIn many cases, the HTTP proxy server will only allow 2 kinds of TCP port to be used for the connection to the destination server port number, HTTP protocol (TCP port number 80) and HTTPS protocol (TCP port number 443). \r\n(There are also cases when the proxy server does allow a wider choice of TCP port for connection.) \r\n\r\nWhen making a VPN connection via an HTTP proxy server that denies connections to server ports other than HTTP ports or HTTPS ports, you must specify 443 (HTTPS protocol) as the destination VPN Server port number. \r\n\r\nTo check whether the HTTP proxy server you are connecting via allows connection to ports other than port numbers 80 or 443, contact the administrator of the HTTP proxy server. \r\n\r\nCurrently, %d is specified as the destination VPN Server port number. Do you want to change the port number to 443 (HTTPS protocol)?\r\n(The port 443 of the VPN Servers you connect to must be set to listening status and ready for connection.) \r\nIf you are unsure, then contact the system administrator or the network administrator. +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value +CM_PASSWORD_CHANGED The password has been changed. +CM_ACCOUNT_SETTING_FILE VPN Connection Setting Files (*.VPN)|*.vpn|All Files (*.*)|*.* +CM_ACCOUNT_SAVE_TITLE Enter a VPN Connection Setting File's File Name for the Export Destination +CM_ACCOUNT_OPEN_TITLE Select the VPN Connection Setting File to Import +CM_ACCOUNT_FILE_BANNER # VPN Client VPN Connection Setting File\r\n# \r\n# This file is exported using the VPN Client Manager.\r\n# The contents of this file can be edited using a text editor.\r\n# \r\n# When this file is imported to the Client Connection Manager\r\n# it can be used immediately.\r\n\r\n +CM_FAILED_TO_OPEN_FILE Unable to open file. +CM_FAILED_TO_SAVE_FILE Unable to save file. +CM_ACCOUNT_PARSE_FAILED Unable to load the VPN Connection Setting from the specified file. \r\nCheck the contents of the file. +CM_ACCOUNT_MSG_SENSITIVE This VPN Connection Setting has the username and the password.\r\nDo you want to remove these sensitive information from the exported setting file?\r\n\r\nClick Yes to remove sensitive information.\r\nIn that case a user will be required to input the username and the password when he is trying to connect to the VPN Server.\r\n\r\nClick No to stay the sensitive information remaining on the file. +CM_SHORTCUT_FILE Shortcut Files|*.lnk +CM_SHORTCUT_SAVE_TITLE Enter the Shortcut File Name. +CM_SHORTCUT_UNSUPPORTED The connection shortcut function is not supported by this version of VPN Client. \r\nUpdate to a new version. +CM_SHORTCUT_COMMENT Using the VPN Connection Setting "%s" to connect to the VPN Server. +CM_SHORTCUT_ERROR Failed to create a shortcut. +CM_VPN_FILE_CLICKED Do you want to import the VPN Connection File? +CM_VPN_FILE_IMPORT_NG Unable to import the VPN Connection Setting File. Because the VPN Client setting has been locked. +CM_VLAN_INSTALLING Please Wait a While +CM_SECURE_MUST_LOCAL It is currently not possible to configure smart card settings because you are connected to and managing a VPN Client on a remote computer. +CM_DETAIL_MODE_LINK_STR With a Cascade Connection, Connect by Bridge / Router mode is always enabled. +CM_TRAY_INITING SoftEther VPN Client Manager (Developer Edition) ... +CM_TRAY_NOT_CONNECTED SoftEther VPN Client Manager (Developer Edition)\r\nNot connected. +CM_TRAY_CONNECTED_0 SoftEther VPN Client Manager (Developer Edition)\r\nActive connections to %u servers and is attempting to connect to %u servers +CM_TRAY_CONNECTED_1 SoftEther VPN Client Manager (Developer Edition)\r\nAttempting to connect to %u servers +CM_TRAY_CONNECTED_2 SoftEther VPN Client Manager (Developer Edition)\r\nActive connections to %u servers +CM_TRAY_MENU_1_SHOW &Show VPN Client Manager +CM_TRAY_MENU_1_HIDE Cl&ose VPN Client Manager +CM_TRAY_MENU_2_QUIT E&xit VPN Client Manager Program +CM_TRAY_MENU_CONNECT Start VPN &Connection +CM_TRAY_MENU_DISCONNECT &Disconnect VPN Connection +CM_TRAY_MENU_STATUS Show VPN Connec&tion Status +CM_TRAY_MENU_DISCONNECT_ALL Disconnect &All VPN Connections +CM_TRAY_MENU_NEW &New VPN Connection Setting... +CM_TRAY_MENU_RECENT Recent VPN Servers... +CM_TRAY_MENU_TRAFFIC Network &Traffic Speed Test Tool... +CM_TRAY_MENU_NETIF Show Network &Device Status... +CM_TRAY_MENU_ABOUT &About VPN Client Manager... +CM_TRAY_MENU_SETTING Change Operation &Mode... +CM_TRAY_MENU_CANCEL Close this menu +CM_EXIT_MESSAGE This will exit the VPN Client Manager program. \r\nDo you really want to do this? +CM_IMPORT_MESSAGE From file "%S", VPN Connection Setting "%s" has been installed. +CM_VLAN_CREATING Creating a new Virtual Network Adapter for Windows. \r\n\r\nThis process can take several seconds or over a minute. \r\nPlease wait...\r\n\r\n(Please do not perform other operations while the Virtual Network Adapter is being installed.) +CM_SETTING_PASSWORD The setting is locked. To remove the setting-locker, you must enter a password. +CM_EASY_MODE_NOT_ON_REMOTE Unable to connect because of the VPN Client on the remote computer is running in Easy Mode. +CM_EASY_CONNECT_BUTTON_1 Start VPN &Connection +CM_EASY_CONNECT_BUTTON_2 &Disconnect +CM_EASY_ACCOUNT_WARNING You can only modify Proxy Server Setting, User Authentication and Virtual Network Adapter Used because the setting has been locked. +CM_EASY_INFO_1 Select a VPN connection. +CM_EASY_INFO_2 Click Start VPN Connection to start a VPN connection. +CM_EASY_INFO_3 VPN connection is active. You can disconnect by clicking Disconnect. +CM_EXT_VOICE_MSG It is possible that some of the voice message contents of the Extension Voice Guide has not been played normally. \r\nIs the Extension Voice Guide enabled? +CM_EASY_TITLE VPN Client Easy Connection Manager +CM_EASY_CONNECTED VPN connection is active. +CM_EASY_CONNECTING Establishing VPN connection... +CM_PROXY_FROM_IE Currently proxy setting from Internet Explorer has been loaded. +CM_TRAY_ICON_RESTORE The icon in the task tray has been deleted.\r\n\r\nTo restore the icon, run the VPN Client Manager and click Show Task-tray Icon in the View menu. +CM_WOULDYOULOAD_IE_PROXY Currently the Internet Explorer on this computer is configured to use the proxy server "%S".\r\nDo you want to apply the current proxy settings on the new VPN connection setting?\r\n\r\nClick Yes to use the proxy settings of Internet Explorer.\r\nClick No to use direct connection to the VPN Server (does not a proxy server.)\r\nThis setting can be modified in the property screen of the connection settings any time later. +CM_MSG_TITLE VPN Server "%S" (Virtual Hub: "%S") +CM_JUMPLIST_RCCONNECT Recent VPN Servers +CM_VPNGATE_MESSAGE There is the list of Public VPN Relay Servers on the VPN Gate Academic Project Web Site.\r\nAnyone on the Internet can connect a VPN connection to any VPN servers on the list.\r\n\r\nVPN Gate Academic Project is not a part of SoftEther VPN.\r\nThis icon provides just a link to http://www.vpngate.net/.\r\nYou need to install VPN Gate Plugin to connect VPN Gate.\r\n\r\nDo you want to visit http://www.vpngate.net/ (provided by University of Tsukuba) ? +CM_VLAN_REINSTALL_MSG After reinstalling the Virtual Network Adapter driver, the current Virtual Network Adapter's MAC address will change. Also, all TCP/IP settings within the Virtual Network Adapter will reset.\r\n\r\nIn case the reinstalled Virtual Network Adapter fails to work, delete it and create a new one. If it still doesn't work properly, please create a new Virtual Network Adapter with a different name. + + +VGC_COLUMN_0 DDNS Hostname +VGC_COLUMN_1 IP Address (Hostname) +VGC_COLUMN_2 Region +VGC_COLUMN_3 Uptime +VGC_COLUMN_4 VPN Sessions +VGC_COLUMN_5 Line Speed +VGC_COLUMN_6 Ping (Google, SE) +VGC_COLUMN_7 SSL-VPN (TCP) +VGC_COLUMN_8 UDP Support +VGC_COLUMN_9 Logging Policy +VGC_COLUMN_10 Cumulative Transfers +VGC_COLUMN_11 Cumulative Users +VGC_COLUMN_12 Operator's Name +VGC_COLUMN_13 Operator's Message +VGC_COLUMN_14 Total Score + +VGC_LOG_PERMANENT Permanent +VGC_LOG_2WEEKS 2 Weeks +VGC_LOG_NONE No Logs + +VGC_UPTIME_MIN %u mins +VGC_UPTIME_HOUR %u hours +VGC_UPTIME_DAY %u days +VGC_NUM_VPN %u sessions +VGC_NUM_LOGIN %S logins + +VGC_UDP_AVAILABLE UDP OK + +VGC_TITLE VPN Gate Plug-in Message + +VGC_VER_DIFF The version of VPN Gate Client Plug-in is different from SoftEther VPN Client.\r\n\r\n- Current VPN Gate Plug-in: Build %u\r\n- Current SoftEther VPN Client: Build %u\r\n\r\nIt is recommended to download and install VPN Gate Plug-in Build %u. Otherwise, communication errors or list-update errors might be occur. If the VPN Server List updating fails many times, update the VPN Gate Plug-in version.\r\n\r\nThe latest VPN Gate Plug-in is available at http://www.vpngate.net/.\r\n(Use a mirror-site if you cannot visit the above web-site directly.)\r\n\r\n + +VGC_LIST_STR_OK %S Public VPN Relay Servers on the Earth! (Updated at %S) +VGC_LIST_STR_OK_2 %S Servers (at %S) - List update failed. Try again. If fails again, download the latest VPN Gate Client. +VGC_LIST_STR_NG List update failed. Try again. If fails again, download the latest VPN Gate Client. +VGC_PROXY_MSG If you are using a proxy server, you might not be able to use VPN Relay Servers which don't support the TCP port 443 as "SSL-VPN Connection" from such a proxy-mandated network. +VGC_PROXY_TITLE Notice for Proxy Server Users + +VGS_NO_HUB_YET In order to set the message, first you have to commit enabling the VPN Gate service. After the service will be enabled, re-open this window and set the message. + +VGS_STOP VPN Gate Service will stop after you click the OK button.\r\n\r\nAfter VPN Gate Service will be stopped, this computer will never accept new VPN connection requests, however, still-alive VPN Sessions might remain.\r\n (Such VPN sessions sometimes hidden from the enumeration.) \r\n\r\nTo terminate all of still-alive VPN Sessions completely, restart SoftEther VPN Server or SoftEther VPN Client service, or reboot the computer. + +VGS_START This will activate the VPN Gate Relay Service function.\r\n\r\nVPN Gate Relay Service function must be activated by your own risk.\r\nSome countries prohibit using of encrypted VPN by laws.\r\nFor more details about VPN Gate Relay Service please visit http://www.vpngate.net/en/join.aspx.\r\n\r\nThe VPN Gate Academic Experiment Service is operated as a research project at the graduate school on University of Tsukuba, Japan. The service is governed under the Japanese laws. Other countries' laws are none of our concerns nor responsibilities.\r\n\r\nBy nature, there are almost 200 countries in the World, with different laws. It is impossible to verify every countries' laws and regulations and make the software comply with all countries' laws in advance to release the software. If a user uses VPN Gate service in a specific country, and damaged by public servants of the authority, the developer of either the service or software will never be liable to recover or compensate such damages or criminal responsibilities.\r\nBy using this software and service, the user must observe all concerned laws and rules with user's own responsibility. The user will be completely liable to any damages and responsibilities which are results of using this software and service, regardless of either inside or outside of Japan's territory.\r\nIf you don't agree nor understand the above warnings, do not use any of VPN Gate Academic Experiment Service functions. + + +# Concerning services (Win32) +SVC_HELP *** Command Line Arguments of %s (%S) ***\r\n\r\nThis program (%s) is a process runs as a background task. Start the program by specifying the following arguments on the command line. \r\n\r\n\r\n/install : Installs %s service (service name: %S) in Windows. After this, the service will automatically start. \r\n\r\n/uninstall... Uninstalls %s service (service name: %S) from Windows. \r\n\r\n/start : Starts %s service (service name: %S). \r\n\r\n/stop : Stops %s service (service name: %S). \r\n\r\n/test : Starts %s program in test mode. (For debug)\r\n\r\n/usermode : Starts %s program in the user mode. (When possible)\r\n\r\n/usermode_showtray : When starting in the user mode, this is used to display task tray icons when they were set to be hidden on a previous occasion. \r\n\r\n/usermode_hidetray : When starting in the user mode, this sets the task tray icons to be hidden. \r\n\r\n\r\nNote: Commands related to service operation other than /test and /usermode can only be operated on Windows NT / XP / Server 2003 / Vista / Server 2008. +SVC_NT_ONLY The service related operation commands can only operate on Windows NT / 2000 / XP / Server 2003 / Vista / Server 2008. \r\nThey do not operate on Windows 98 / Me. +SVC_ALREADY_INSTALLED The "%s" service (service name: %S) is already installed on this computer. Do you want to uninstall it and then re-install? +SVC_INSTALL_OK The "%s" service (Service name: %S) has been installed successfully. \r\n\r\n(Execution path: %s)\r\n\r\nThe service has started. +SVC_INSTALL_FAILED The installation of the "%s" service (service name: %S) failed. +SVC_INSTALL_FAILED_2 The "%s" service (Service name: %S) has been successfully installed. \r\n\r\n(Execution path: %s)\r\n\r\nAn attempt to start the service, however, failed. +SVC_NOT_INSTALLED The "%s" service (service name: %S) is not yet installed on this computer. Use the /install command line argument to install it. +SVC_START_OK The "%s" service (service name: %S) started successfully. +SVC_START_FAILED The "%s" service (service name: %S) failed to start. +SVR_ALREADY_START The "%s" service (service name: %S) has already started. +SVC_STOP_OK The "%s" service (Service name: %S) has been stopped. +SVC_STOP_FAILED The "%s" service (service name: %S) failed to stop. +SVC_ALREADY_STOP The "%s" service (service name: %S) is already stopped. +SVC_UNINSTALL_OK The "%s" service (Service name: %S) has been uninstalled successfully. +SVC_UNINSTALL_FAILED The uninstallation of the "%s" service (service name: %S) failed. +SVC_NOT_FOUND Unable to find information related to service %S from the string table. +SVC_NOT_ADMIN To install, uninstall, start or stop the service you must have administrator privileges for this computer. \r\n\r\nIf you have an administrators account for this computer, log out and log on as an administrator. \r\nIf you are unclear about administrators accounts, contact your system administrator. +SVC_TEST_MSG The "%s" service is started in test mode. \r\n\r\nClick OK to exit the service. +SVC_TRAY_TOOLTIP %S (User mode) +SVC_TEST_MUTEX The executable file %s is already started. +SVC_USERMODE_MUTEX Another process of %s is already started. +SVC_SERVICE_MUTEX Because service %S has process %s that is already started, the service cannot start. +SVC_USERMODE_MENU_1 &Hide Tasktray Icon +SVC_USERMODE_MENU_2 E&xit %s +SVC_HIDE_TRAY_MSG This will hide the tasktray icons when starting %S in user mode. \r\nBeginning from next time %S is started in user mode, icons will not be displayed in the tasktray. \r\nThe menu to exit the process will also be hidden. \r\n\r\nTo exit the process in the case of Windows 98 / Me, use the Ctrl + Alt + Del key combination and select to end the process. \r\nWhen using other operating systems, use Task Manager. \r\n\r\nTo redisplay the tasktray icons, use the /usermode_showtray option when starting in user mode next time. + + +# Concerning services (UNIX) +UNIX_SVC_HELP %S service program\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n +UNIX_SVC_STARTED The %S service has been started.\n +UNIX_SVC_STOPPING Stopping the %S service ...\n +UNIX_SVC_STOPPED %S service has been stopped.\n +UNIX_SVC_STOP_FAILED Stopping %S service was failed.\n +UNIX_SVC_ALREADY_START %S service has been already started.\nRun the "%S stop" command to stop this service.\n +UNIX_SVC_NOT_STARTED %S service has not yet been started.\nRun the "%S start" to start this service.\n +UNIX_SVC_ERROR_FORK Failed to create child process for the %S service.\n +UNIX_SVC_NONROOT \nWarning: The current user context is non-root. It is recommended to run the VPN service by the root user. Although the VPN service may run under non-root users, some privilege-required functions (e.g. the local bridge function) need the root privilege.\n + + +# Service definition (SoftEther VPN Client) +SVC_VPNCLIENT_NAME vpnclient +SVC_VPNCLIENT_TITLE SoftEther VPN Client +SVC_VPNCLIENT_DESCRIPT This manages the Virtual Network Adapter device driver and connection service for the SoftEther VPN Client. When this service is stopped, it will not be possible to use SoftEther VPN Client on this computer to connect to a SoftEther VPN Server. + + +# Service Definition (SoftEther VPN Server) +SVC_VPNSERVER_NAME vpnserver +SVC_VPNSERVER_TITLE SoftEther VPN Server +SVC_VPNSERVER_DESCRIPT This manages the server processes of SoftEther VPN Server. SoftEther VPN Server provides high-performance SoftEther VPN Server functions via TCP/IP protocol. When this service is stopped, SoftEther VPN Server on this computer will stop and SoftEther VPN Client will be unable to establish a VPN connection with this computer. + + +# Service Definition (SoftEther VPN Bridge) +SVC_VPNBRIDGE_NAME vpnbridge +SVC_VPNBRIDGE_TITLE SoftEther VPN Bridge +SVC_VPNBRIDGE_DESCRIPT This manages the processes of SoftEther VPN Bridge. SoftEther VPN Bridge provides a bridging connection between the network this computer is connected to and a SoftEther VPN Server that is remotely located. When this service is stopped, SoftEther VPN Bridge on this computer will stop and it will no longer be possible to communicate via the bridge connection. + + +# Service definition (SoftEther VPN Client) +SVC_SEVPNCLIENTDEV_NAME sevpnclientdev +SVC_SEVPNCLIENTDEV_TITLE SoftEther VPN Client Developer Edition +SVC_SEVPNCLIENTDEV_DESCRIPT This manages the Virtual Network Adapter device driver and connection service for the SoftEther VPN Client. When this service is stopped, it will not be possible to use SoftEther VPN Client on this computer to connect to a SoftEther VPN Server. + + +# Service Definition (SoftEther VPN Server) +SVC_SEVPNSERVERDEV_NAME sevpnserverdev +SVC_SEVPNSERVERDEV_TITLE SoftEther VPN Server Developer Edition +SVC_SEVPNSERVERDEV_DESCRIPT This manages the server processes of SoftEther VPN Server. SoftEther VPN Server provides high-performance SoftEther VPN Server functions via TCP/IP protocol. When this service is stopped, SoftEther VPN Server on this computer will stop and SoftEther VPN Client will be unable to establish a VPN connection with this computer. + + +# Service Definition (SoftEther VPN Bridge) +SVC_SEVPNBRIDGEDEV_NAME sevpnbridgedev +SVC_SEVPNBRIDGEDEV_TITLE SoftEther VPN Bridge Developer Edition +SVC_SEVPNBRIDGEDEV_DESCRIPT This manages the processes of SoftEther VPN Bridge. SoftEther VPN Bridge provides a bridging connection between the network this computer is connected to and a SoftEther VPN Server that is remotely located. When this service is stopped, SoftEther VPN Bridge on this computer will stop and it will no longer be possible to communicate via the bridge connection. + + +# Service definition (SoftEther VPN User-mode Router) +SVC_VPNROUTER_NAME vpnrouter +SVC_VPNROUTER_TITLE SoftEther VPN Router Developer Edition +SVC_VPNROUTER_DESCRIPT This manages the server processes of SoftEther VPN Router (service mode). SoftEther VPN Router is a program that provides a virtual NAT and DHCP server that operates in user mode and by using simple operations it is possible to establish a safe connection between a virtual IP network and a physical IP network. When this service is stopped, SoftEther VPN Router on this computer will stop and SoftEther VPN Client will be unable to use the routing service on this computer. + + +# Service Definition (EtherLogger) +SVC_ELOGSVC_NAME elogsvc +SVC_ELOGSVC_TITLE SoftEther EtherLogger Developer Edition +SVC_ELOGSVC_DESCRIPT SoftEther EtherLogger is a service that captures data flowing through LAN cards connected to the computer and keeps a log of the headers of the packet types specified by the administrator and all data in text file format. + + +# Concerning SoftEther VPN Server Manager +SM_TITLE SoftEther VPN Server Manager Developer Edition +SM_LOCALHOST localhost (This server) +SM_SERVER_BRIDGE_TITLE Manage VPN Bridge "%S" +SM_S_VHUB_BRIDGE When using VPN Bridge, you manage Virtual Hub "BRIDGE" to operate management of VPN Bridge. +SM_DISCONNECTED The management connection has been disconnected. +SM_MIKAN Under Construction. +SM_MAIN_COLUMN_1 Setting Name +SM_MAIN_COLUMN_2 VPN Server Hostname +SM_MAIN_COLUMN_3 Operation Mode +SM_MODE_SERVER Entire VPN Server +SM_MODE_HUB Hub '%S' Only +SM_EDIT_CAPTION_1 New Connection Setting +SM_EDIT_CAPTION_2 Edit %s +SM_SETTING_EXISTS A Connection Setting with the same name as Connection Setting "%s" is already registered. Specify a different name. +SM_SETTING_DELETE_MSG This will delete the Connection Setting "%s". Do you really want to do this? +SM_PASSWORD_TYPE_STR Password for Administration Connection +SM_HUB_COLUMN_1 Virtual Hub Name +SM_HUB_COLUMN_2 Status +SM_HUB_COLUMN_3 Type +SM_HUB_COLUMN_4 Users +SM_HUB_COLUMN_5 Groups +SM_HUB_COLUMN_6 Sessions +SM_HUB_COLUMN_7 MAC Tables +SM_HUB_COLUMN_8 IP Tables +SM_HUB_COLUMN_9 Num Logins +SM_HUB_COLUMN_10 Last Login +SM_HUB_COLUMN_11 Last Communication +SM_HUB_ONLINE Online +SM_HUB_OFFLINE Offline +SM_HUB_STANDALONE Standalone +SM_HUB_STATIC Static Hub +SM_HUB_DYNAMIC Dynamic Hub +SM_SERVER_STANDALONE Standalone Server +SM_FARM_CONTROLLER Cluster Controller +SM_FARM_MEMBER Cluster Member Server +SM_INFORMATION Latest Information +SM_HUB_STATUS_CAPTION Status of Virtual Hub "%s" +SM_HUB_STATUS_HUBNAME Virtual Hub Name +SM_HUB_STATUS_ONLINE Status +SM_HUB_TYPE Type +SM_HUB_NUM_SESSIONS Sessions +SM_HUB_NUM_SESSIONS_CLIENT Sessions (Client) +SM_HUB_NUM_SESSIONS_BRIDGE Sessions (Bridge) +SM_HUB_NUM_ACCESSES Access Lists +SM_HUB_NUM_USERS Users +SM_HUB_NUM_GROUPS Groups +SM_HUB_NUM_MAC_TABLES MAC Tables +SM_HUB_NUM_IP_TABLES IP Tables +SM_HUB_SECURE_NAT SecureNAT +SM_HUB_SECURE_NAT_YES Enabled +SM_HUB_SECURE_NAT_NO Disabled +SM_HUB_NUM_LOGIN Num Logins +SM_HUB_LAST_LOGIN_TIME Last Login +SM_HUB_LAST_COMM_TIME Last Communication +SM_HUB_CREATED_TIME Created at +SM_STATUS_COLUMN_1 Item +SM_STATUS_COLUMN_2 Value + +SM_ST_SEND_UCAST_NUM Outgoing Unicast Packets +SM_ST_SEND_UCAST_SIZE Outgoing Unicast Total Size +SM_ST_SEND_BCAST_NUM Outgoing Broadcast Packets +SM_ST_SEND_BCAST_SIZE Outgoing Broadcast Total Size + +SM_ST_RECV_UCAST_NUM Incoming Unicast Packets +SM_ST_RECV_UCAST_SIZE Incoming Unicast Total Size +SM_ST_RECV_BCAST_NUM Incoming Broadcast Packets +SM_ST_RECV_BCAST_SIZE Incoming Broadcast Total Size + +SM_ST_NUM_PACKET_STR %S packets +SM_ST_SIZE_BYTE_STR %S bytes + +CM_EDIT_HUB_1 New Virtual Hub +CM_EDIT_HUB_2 Properties of %S + +CM_EDIT_HUB_STANDALONE Currently the server is operating in Standalone Mode. This Virtual Hub is operating as a Standalone Hub. +CM_EDIT_HUB_TYPE_FIXED Currently the server is operating in Cluster Mode. This Virtual Hub is of the following type, which means it is not possible to make dynamic changes. +CM_EDIT_HUB_CREATED A new Virtual Hub '%S' has been created. +CM_OFFLINE_MSG Do you want to switch %s to offline?\r\n\r\nIf you switch the Virtual Hub to offline all sessions currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect. +CM_DELETE_HUB_MSG Do you want to delete %S?\r\n\r\nIf you delete the Virtual Hub, all sessions currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect. \r\nThis will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. \r\n\r\nOnce you delete the Virtual Hub, it cannot be recovered. \r\nAre you sure you want to delete it? +CM_HUB_DELETED_MSG Virtual Hub %S has been deleted. +CM_LISTENER_COLUMN_1 Port Number +CM_LISTENER_COLUMN_2 Status +CM_LISTENER_TCP_PORT TCP %u +CM_LISTENER_ONLINE Listening +CM_LISTENER_OFFLINE Stopped +CM_LISTENER_ERROR Error +CM_DELETE_LISTENER_MSG This will delete the Listener (TCP port %u). From now on, it will not be possible to connect to this port. \r\nDo you really want to do this? +CM_STOP_LISTENER_MSG This will stop the Listener (TCP port %u). Until Listener is restarted it will not be possible to connect to this port. \r\n\r\nDo you really want to do this? +CM_CLOSE_BUTTON Close +CM_CERT_SET_MSG A new server certificate has been set.\r\n\r\nIf you are using OpenVPN protocols, please mind that you may have to update the inline certificate data in the OpenVPN configuration file. + +CM_SHORTCUT_DISCONNECT There is already an active connection to the specified connection destination. \r\n\r\nDo you want to disconnect? + + +SM_SERVER_STATUS Server Status +SM_ST_SERVER_TYPE Server Type +SM_ST_NUM_TCP Number of Active Sockets +SM_ST_NUM_TCP_LOCAL Number of Active Sockets (This Server) +SM_ST_NUM_TCP_REMOTE Number of Active Sockets (Other Member Servers) +SM_ST_NUM_HUB_TOTAL Number of Virtual Hubs +SM_ST_NUM_HUB_STATIC Number of Static Virtual Hubs +SM_ST_NUM_HUB_DYNAMIC Number of Dynamic Virtual Hubs +SM_ST_NUM_SESSION_TOTAL Number of Sessions +SM_ST_NUM_SESSION_LOCAL Number of Sessions (This Server) +SM_ST_NUM_SESSION_REMOTE Number of Sessions (Other Member Servers) +SM_ST_NUM_MAC_TABLE Number of MAC Address Tables +SM_ST_NUM_IP_TABLE Number of IP Address Tables +SM_ST_NUM_USERS Number of Users +SM_ST_NUM_GROUPS Number of Groups +SM_ST_CLIENT_LICENSE Using Client Connection Licenses (This Server) +SM_ST_BRIDGE_LICENSE Using Bridge Connection Licenses (This Server) +SM_ST_CLIENT_LICENSE_EX Using Client Connection Licenses (Entire Cluster) +SM_ST_BRIDGE_LICENSE_EX Using Bridge Connection Licenses (Entire Cluster) +SM_ST_START_TIME Server Started at +SM_ST_CURRENT_TIME Current Time +SM_ST_CURRENT_TICK 64 bit High-Precision Logical System Clock +SM_ST_TOTAL_MEMORY Total Logical Memory Size +SM_ST_USED_MEMORY Used Logical Memory Size +SM_ST_FREE_MEMORY Free Logical Memory Size +SM_ST_TOTAL_PHYS Total Physical Memory Size +SM_ST_USED_PHYS Used Physical Memory Size +SM_ST_FREE_PHYS Free Physical Memory Size +SM_ST_RAM_SIZE_KB %S bytes +SM_INFO_TITLE VPN Server Version Information +SM_INFO_PRODUCT_NAME Product Name +SM_INFO_VERSION Version +SM_INFO_BUILD Build +SM_INFO_HOSTNAME Host Name +SM_OS_SYSTEM_NAME Type of Operating System +SM_OS_PRODUCT_NAME Product Name of Operating System +SM_OS_SERVICE_PACK Service Pack +SM_OS_SP_TAG Service Pack %u +SM_OS_VENDER_NAME Operating System Vendor +SM_OS_VERSION Operating System Version +SM_OS_KERNEL_NAME Type of OS Kernel +SM_OS_KERNEL_VERSION Version of OS Kernel +SM_CONNECTION_TYPE_0 Client +SM_CONNECTION_TYPE_1 Initializing... +SM_CONNECTION_TYPE_2 Login +SM_CONNECTION_TYPE_3 Additional Connection +SM_CONNECTION_TYPE_4 Clustering RPC +SM_CONNECTION_TYPE_5 Management RPC +SM_CONNECTION_TYPE_6 Hub Enumeration RPC +SM_CONNECTION_TYPE_7 Changing Password +SM_CONNECTION_TYPE_8 MS-SSTP Connection +SM_CONNECTION_TYPE_9 OpenVPN Connection +SM_CONN_COLUMN_1 Connection Name +SM_CONN_COLUMN_2 Connection Source +SM_CONN_COLUMN_3 Connection Start +SM_CONN_COLUMN_4 Type +SM_HOSTNAME_AND_PORT %S: %u +SM_CONN_DISCONNECT_MSG This will disconnect connection %s. \r\nDo you really want to do this? +SM_CONNINFO_CAPTION Connection %s Information +SM_CONNINFO_NAME Connection Name +SM_CONNINFO_TYPE Connection Type +SM_CONNINFO_HOSTNAME Source Host Name +SM_CONNINFO_IP Client IP Address +SM_CONNINFO_PORT Client Port Number (TCP) +SM_CONNINFO_TIME Connection Start +SM_CONNINFO_SERVER_STR Server Product Name +SM_CONNINFO_SERVER_VER Sever Version +SM_CONNINFO_SERVER_BUILD Server Build Number +SM_CONNINFO_CLIENT_STR Client Product Name +SM_CONNINFO_CLIENT_VER Client Version +SM_CONNINFO_CLIENT_BUILD Client Build +SM_FARM_REBOOT_MSG You are about to change the clustering configuration. \r\n\r\nWhen you change the clustering configuration, all currently connected sessions and connections for management purposes (including this management connection) will be disconnected and the server program will restart. \r\nWhen there are many server users, it could take over a minute to restart. \r\n\r\nClick OK to automatically disconnect the connection with the server. To continue management, you will need to reconnect to the server. +SM_FM_COLUMN_1 Type +SM_FM_COLUMN_2 Connection Started at +SM_FM_COLUMN_3 Host Name +SM_FM_COLUMN_4 Point +SM_FM_COLUMN_5 Number of Sessions +SM_FM_COLUMN_6 Number of TCP Connections +SM_FM_COLUMN_7 Number of Operating Hubs +SM_FM_COLUMN_8 Using Client Connection Licenses +SM_FM_COLUMN_9 Using Bridge Connection Licenses +SM_FM_CONTROLLER Controller +SM_FM_MEMBER Member +SM_FMINFO_TYPE Server Type +SM_FMINFO_CONNECT_TIME Connection Established at +SM_FMINFO_IP IP Address +SM_FMINFO_HOSTNAME Host Name +SM_FMINFO_POINT Point +SM_FMINFO_WEIGHT Performance Standard Ratio +SM_FMINFO_NUM_PORT Number of Public Ports +SM_FMINFO_PORT Public Port #%u (TCP/IP) +SM_FMINFO_NUM_HUB Number of Running Virtual Hubs +SM_FMINFO_HUB Virtual Hub #%u +SM_FMINFO_HUB_TAG_1 %S (Dynamic) +SM_FMINFO_HUB_TAG_2 %S (Static) +SM_FMINFO_NUM_SESSION Number of Sessions +SM_FMINFO_NUN_CONNECTION Number of TCP Connections +SM_FMINFO_CAPTION Cluster Member Server Status +SM_FC_STATUS_CAPTION Connection to Cluster Controller Status +SM_FC_IP Controller IP Address +SM_FC_PORT Controller TCP/IP Port +SM_FC_STATUS Connection Status +SM_FC_ONLINE Online +SM_FC_OFFLINE Offline +SM_FC_LAST_ERROR Last Error +SM_FC_ERROR_TAG %s (Error Code: %u) +SM_FC_START_TIME Connection Started at +SM_FC_FIRST_TIME First Connection Established at +SM_FC_CURRENT_TIME Current Connection Established at +SM_FC_NUM_TRY Number of Connection Attempts +SM_FC_NUM_CONNECTED Number of Successful Connections +SM_FC_NUM_FAILED Number of Failed Connections +SM_FC_NOT_CONNECTED (Not Connected) +SM_CHANGE_PASSWORD_1 The passwords you entered did not match. Enter the same password in Confirm as you enter in Password. +SM_CHANGE_PASSWORD_2 You have entered an empty password. Continue anyway? +SM_CHANGE_PASSWORD_3 The password has been changed. +SM_USER_COLUMN_1 User Name +SM_USER_COLUMN_2 Full Name +SM_USER_COLUMN_3 Group Name +SM_USER_COLUMN_4 Description +SM_USER_COLUMN_5 Auth Method +SM_USER_COLUMN_6 Num Logins +SM_USER_COLUMN_7 Last Login +SM_AUTHTYPE_0 Anonymous Authentication +SM_AUTHTYPE_1 Password Authentication +SM_AUTHTYPE_2 Individual Certificate Authentication +SM_AUTHTYPE_3 Signed Certificate Authentication +SM_AUTHTYPE_4 RADIUS Authentication +SM_AUTHTYPE_5 NT Domain Authentication +SM_NO_GROUP - +SM_USER_DELETE_MSG This will delete the user "%s". Do you really want to do this? +SM_EDIT_USER_CAPTION_1 Create New User +SM_EDIT_USER_CAPTION_2 Properties of User %S +SM_EDIT_USER_CERT_INFO The users using 'Individual Certificate Authentication' will be allowed or denied connection depending on whether the SSL client certificate completely matches the certificate that has been set for the user beforehand. +SM_EDIT_USER_POL_DLG Security Policy of User %S +SM_POLICY_DEF_CAPTION Security Policy +SM_LIMIT_STR Specify an integer that is within the range %u to %u. +SM_POLICY_INIT_TITLE Select a policy item from the list on the left. +SM_USER_CREATE_OK User %S has been created. +SM_USERINFO_CAPTION User "%S" Information +SM_USERINFO_NAME User Name +SM_USERINFO_GROUP Group Name +SM_USERINFO_CREATE Created on +SM_USERINFO_UPDATE Updated on +SM_USERINFO_EXPIRE Expiration Date +SM_USERINFO_NUMLOGIN Number of Logins +SM_GROUPLIST_NAME Group Name +SM_GROUPLIST_REALNAME Full Name +SM_GROUPLIST_NOTE Description +SM_GROUPLIST_NUMUSERS Num Users +SM_EDIT_GROUP_CAPTION_1 Creation of New Group +SM_EDIT_GROUP_CAPTION_2 Properties of Group %S +SM_GROUP_CREATED Group %S has been created. +SM_GROUP_DELETE_MSG Group %S has been deleted. Do you really want to do this? +SM_GROUP_POLICY_CAPTION Security Policy of Group %S +SM_GROUP_MEMBER_STR \ (Display only users belonging to group %S) +SM_SELECT_GROUP &Select +SM_SELECT_NO_GROUP &None +SM_SELECT_ALT_GROUP Select a &Group... +SM_ACCESS_COLUMN_0 ID +SM_ACCESS_COLUMN_1 Action +SM_ACCESS_COLUMN_2 Status +SM_ACCESS_COLUMN_3 Priority +SM_ACCESS_COLUMN_4 Memo +SM_ACCESS_COLUMN_5 Contents +SM_ACCESS_COLUMN_6 Unique ID +SM_ACCESS_PASS Pass +SM_ACCESS_DISCARD Discard +SM_ACCESS_ENABLE Enable +SM_ACCESS_DISABLE Disable +SM_ACCESS_PROTO_1 All IPv4 / IPv6 Protocols +SM_ACCESS_PROTO_2 6 (TCP/IP Protocol) +SM_ACCESS_PROTO_3 17 (UDP/IP Protocol) +SM_ACCESS_PROTO_4 1 (ICMPv4 Protocol) +SM_ACCESS_PROTO_5 58 (ICMPv6 Protocol) +SM_ACCESS_PROTO_6 Specify the IP Protocol Number +SM_SELECT_USER &Select +SM_SELECT_NO Do&n't Select +SM_PLEASE_SELECT Select User. +SM_LINK_COLUMN_1 Setting Name +SM_LINK_COLUMN_2 Status +SM_LINK_COLUMN_3 Established at +SM_LINK_COLUMN_4 Destination VPN Server +SM_LINK_COLUMN_5 Virtual Hub +SM_LINK_STATUS_OFFLINE Offline (Stopped) +SM_LINK_STATUS_ERROR Error %u: %s +SM_LINK_STATUS_ONLINE Online (Established) +SM_LINK_POLICY_GROUP Cascade Connection Setting +SM_LINK_POLICY_CAPTION Security policy settings applicable to Cascade sessions +SM_LINK_CONNECTING Connecting +SM_LINK_SAVE_ONLINE Although the Cascade Connection Setting "%s" has been changed, this Cascade Connection is currently online. The setting will not be applied until next time the connection is established. +SM_LINK_DELETE_MSG This will delete the settings for Cascade Connection "%s". Do you really want to do this? +SM_LINK_OFFLINE_MSG Currently Cascade Connection "%s" is active. Do you want to disconnect this connection? +SM_LINK_STATUS_CAPTION Connection status of Cascade Connection "%s" +SM_LOG_SWITCH_0 No Switching +SM_LOG_SWITCH_1 Switch in Every Second +SM_LOG_SWITCH_2 Switch in Every Minute +SM_LOG_SWITCH_3 Switch in Every Hour +SM_LOG_SWITCH_4 Switch in Every Day +SM_LOG_SWITCH_5 Switch in Every Month +SM_SESS_DISCONNECT_MSG This will disconnect session "%S". Do you really want to do this? +SM_SESS_COLUMN_1 Session Name +SM_SESS_COLUMN_2 Location +SM_SESS_COLUMN_3 User Name +SM_SESS_COLUMN_4 Source Host Name +SM_SESS_COLUMN_5 TCP Connections +SM_SESS_COLUMN_6 Transfer Bytes +SM_SESS_COLUMN_7 Transfer Packets +SM_SESS_COLUMN_8 VLAN ID +SM_SESS_NORMAL Local Session +SM_SESS_LOCAL Local Session +SM_SESS_LOCAL_2 On '%S' +SM_SESS_REMOTE On '%S' +SM_SESS_LINK Cascade Connection +SM_SESS_LINK_HOSTNAME Virtual Host +SM_SESS_LINK_TCP None +SM_SESS_SNAT SecureNAT Session +SM_SESS_SNAT_HOSTNAME Virtual Host +SM_SESS_SNAT_TCP None +SM_SESS_BRIDGE Local Bridge Session +SM_SESS_BRIDGE_HOSTNAME Ethernet Bridge +SM_SESS_LAYER3_HOSTNAME Virtual Layer 3 Switch +SM_SESS_BRIDGE_TCP None +SM_SESS_STATUS_CAPTION VPN Session "%S" Status +SM_SESS_STATUS_USERNAME User Name (Authentication) +SM_SESS_STATUS_REALUSER User Name (Database) +SM_SESS_STATUS_GROUPNAME Group Name +SM_CLIENT_IP Client IP Address +SM_CLIENT_HOSTNAME Client Host Name +SM_NODE_CLIENT_NAME Client Product Name (Reported) +SM_NODE_CLIENT_VER Client Version (Reported) +SM_NODE_CLIENT_BUILD Client Build (Reported) +SM_NODE_SERVER_NAME Server Product Name (Reported) +SM_NODE_SERVER_VER Server Version (Reported) +SM_NODE_SERVER_BUILD Server Build (Reported) +SM_NODE_CLIENT_OS_NAME Client OS Name (Reported) +SM_NODE_CLIENT_OS_VER Client OS Version (Reported) +SM_NODE_CLIENT_OS_PID Client OS Product ID (Reported) +SM_NODE_CLIENT_HOST Client Host Name (Reported) +SM_NODE_CLIENT_IP Client IP Address (Reported) +SM_NODE_CLIENT_PORT Client Port (Reported) +SM_NODE_SERVER_HOST Server Host Name (Reported) +SM_NODE_SERVER_IP Server IP Address (Reported) +SM_NODE_SERVER_PORT Server Port (Reported) +SM_NODE_PROXY_HOSTNAME Proxy Host Name (Reported) +SM_NODE_PROXY_IP Proxy IP Address (Reported) +SM_NODE_PROXY_PORT Proxy Port (Reported) +SM_MAC_COLUMN_1 Session Name +SM_MAC_COLUMN_2 MAC Address +SM_MAC_COLUMN_3 Created at +SM_MAC_COLUMN_4 Updated at +SM_MAC_COLUMN_5 Location +SM_MAC_COLUMN_1A VLAN ID +SM_SESSION_FILTER \ (Displays only entries of session %S) +SM_IP_COLUMN_1 Session Name +SM_IP_COLUMN_2 IP Address +SM_IP_COLUMN_3 Created at +SM_IP_COLUMN_4 Updated at +SM_IP_COLUMN_5 Location +SM_MAC_IP_DHCP %S (DHCP) +SM_MACIP_LOCAL On This Server +SM_MACIP_SERVER On '%S' +SM_SNAT_STATUS SecureNAT Operating Status +SM_SNAT_NUM_SESSION %u Session +SM_SNAT_NUM_CLIENT %u Client +SM_SNAT_IS_KERNEL Kernel-mode NAT is Active +SM_SNAT_IS_RAW Raw IP mode NAT is Active +SM_BRIDGE_TOO_OLD_VER The Local Bridge function is not supported by the version of the VPN Server that is currently connected. \r\nTry update to a new version. +SM_BRIDGE_UNSUPPORTED Unable to use the Local Bridge function with the operating system that this VPN Server is operating on. For the list of operating system that the Local Bridge function can be used on, refer to the online documentation of the VPN Server. +SM_BRIDGE_WPCAP_REMOTE In order to use the Local Bridge function on this VPN Server, you must install the WinPcap software. The software WinPcap is currently not installed on the server computer. \r\n\r\nTo continue the installation of the WinPcap software, you must start SoftEther VPN Server Manager on the server computer that is running VPN Server and then while connected to localhost (location of your own computer), have the Local Bridge Function Setting window displayed. \r\nTo continue, first exit this management session, and then, after starting SoftEther VPN Server Manager on the server computer, connect to localhost and continue the setting process. +SM_BRIDGE_WPCAP_ROOT In order to use the Local Bridge function on this VPN Server, you must install the WinPcap software. \r\n\r\nTo continue the installation you must log in to this computer as a user with administrator privileges. \r\nLog on as an administrator and start the SoftEther VPN Server Manager again. +SM_BRIDGE_WPCAP_INSTALL In order to use the Local Bridge function on this VPN Server, you must install the WinPcap software. The software WinPcap is currently not installed on the server computer. \r\n\r\nWinPcap is an easy-to-install free software that is bundled together with the VPN Server. \r\n\r\nDo you want to begin the installation of WinPcap? +SM_BRIDGE_WPCAP_REBOOT1 After WinPcap installation has completed, you must restart the computer before you use the Local Bridge function again. \r\n\r\nAfter you restart the computer manually and start VPN Server, configure the settings for the Local Bridge function. +SM_BRIDGE_WPCAP_REBOOT2 After WinPcap installation has completed, you must restart the SoftEther VPN Server service before you use the Local Bridge function again. \r\n\r\nIt only takes a short time to restart the SoftEther VPN Server service, however all sessions that are currently connected to the VPN Server will be disconnected. \r\nThis management session will also be disconnected, so you will need to reconnect to continue. \r\n\r\nDo you want to restart the SoftEther VPN Server service? +SM_BRIDGE_RESOURCE Unable to load the WinPcap driver. +SM_BRIDGE_COLUMN_1 Number +SM_BRIDGE_COLUMN_2 Virtual Hub Name +SM_BRIDGE_COLUMN_3 Network Adapter or Tap Device Name +SM_BRIDGE_COLUMN_4 Status +SM_BRIDGE_OFFLINE Offline +SM_BRIDGE_ONLINE Operating +SM_BRIDGE_ERROR Error +SM_BRIDGE_OK The Local Bridge connection definition has been added. +SM_BRIDGE_DELETE Do you want to delete the Local Bridge from Virtual Hub "%s" to device "%s"? +SM_BRIDGE_DELETE_OK The Local Bridge has been deleted. +SM_BRIDGE_INTEL While in the condition that occurs immediately after a new bridge connection is made when bridging to a physical network adapter, depending on the type of network adapter, there are cases where it will not be possible to communicate using TCP/IP to the network adapter using a bridge connection from a computer on the virtual network. \r\n(This phenomenon is known to occur for Intel and Broadcom network adapters.) \r\n\r\n\r\nIf this issue arises, remedy the situation by restarting the computer on which VPN Server / Bridge is running. Normal communication will be possible after the computer has restarted. \r\n\r\n\r\nAlso many wireless network adapters will not respond to the sending of packets in promiscuous mode and when this occurs you will be unable to use the Local Bridge. If this issue arises, try using a regular wired network adapter instead of the wireless network adapter. +SM_BRIDGE_VPN You are attempting to make a Local Bridge to "%S".\r\n\r\nA Local Bridge is made between a Virtual Hub and a physical network adapter in usual usage. It is unusual to make a Local Bridge to a Virtual Network Adapter.\r\nPlease make sure that it is your intention.\r\n\r\nDo you really want to continue? +SM_BRIDGE_INFO_1 Select the Ethernet device (network adapter) for the bridge destination. +SM_BRIDGE_INFO_2 Enter a name of the new tap device to create. +SM_CONFIG_SAVED The configuration file has been saved. +SM_CONFIG_SAVE_FAILED Failed to save the configuration file. +SM_CONFIG_OPEN_FAILED Unable to open the specified file. +SM_CONFIG_CONFIRM This will apply the specified configuration file to the VPN Server. The VPN Server will automatically restart and it will start loading the new configuration file. The users who are currently connected to the VPN Server will be disconnected. This management session will also be disconnected, you will be needing to reconnect to the server. \r\n\r\nDo you want to proceed? +SM_CONFIG_WRITE_OK The configuration file on the server side has been overwritten. +SM_AO_COLUMN_1 Item +SM_AO_COLUMN_2 Value +SM_TRUE_OR_FALSE Set either 0 (false) or 1 (true) for this item. +SM_AO_SET_OK The Virtual Hub Administration Option has been set. +SM_EXT_OPTION_SET_OK The Virtual Hub Extended Option has been set. +SM_PASSWORD_MSG Currently an administrator password has not been set for this VPN Server. It is recommended that a password is set. \r\n\r\nDo you want to set a server administrator password? +SM_L3_SW_COLUMN1 Layer 3 Switch Name +SM_L3_SW_COLUMN2 Running Status +SM_L3_SW_COLUMN3 Interfaces +SM_L3_SW_COLUMN4 Routing Tables +SM_L3_SW_ST_F_F Stop +SM_L3_SW_ST_T_F Start (Error) +SM_L3_SW_ST_T_T Start (Running) +SM_L3_SW_DEL_MSG This will delete the Virtual Layer 3 Switch "%S". \r\nDo you really want to do this? +SM_L3_SW_IF_COLUMN1 IP Address +SM_L3_SW_IF_COLUMN2 Subnet Mask +SM_L3_SW_IF_COLUMN3 Virtual Hub Name +SM_L3_SW_TABLE_COLUMN1 Network Address +SM_L3_SW_TABLE_COLUMN2 Subnet Mask +SM_L3_SW_TABLE_COLUMN3 Gateway Address +SM_L3_SW_TABLE_COLUMN4 Metric +SM_SECURE_NAT_MSG Are you sure you want to enable the SecureNAT?\r\n\r\nIf you enable the SecureNAT, a virtual router with virtual NAT function will be created that has one IP address in the Virtual Hub. This Virtual Router will interact as one computer or router with other computers that are connected to the virtual network. \r\n\r\nThe SecureNAT in the Virtual NAT enables any computers connected to the Virtual Hub to establish communication with an external network via the SecureNAT. \r\nTherefore, when SecureNAT is running on this VPN Server, there is no need to use local VPN Client to connect the self-computer's Virtual Hub.\r\n\r\n\r\nAlso, please take care about that if there is already a DHCP server in a location that can be reached from a Virtual Hub Layer 2 segment, disable the DHCP server function by clicking the SecureNAT Configuration, otherwise there will be a DHCP conflict. \r\n\r\nMoreover, you can disable the NAT function and only use the DHCP server if you wish. +SM_CRL_COLUMN_1 Certificate Summary +SM_CRL_DELETE_MSG This will delete the selected item. Do you really want to do this? +SM_CRL_EMPTY_MSG No items have been selected. \r\nIf you add this certificate revocation entry, all certificates will be judged as invalid and all client connections that are made in certificate authentication mode will be refused. \r\n\r\nDo you really want to do this? +SM_AC_COLUMN_1 ID +SM_AC_COLUMN_2 Priority +SM_AC_COLUMN_3 Action +SM_AC_COLUMN_4 Contents +SM_AC_PASS Pass +SM_AC_DENY Deny +SM_LOG_FILE_COLUMN_1 Log File Name +SM_LOG_FILE_COLUMN_2 File Size +SM_LOG_FILE_COLUMN_3 Updated on +SM_LOG_FILE_COLUMN_4 Location +SM_READ_LOG_FILE_INFO_1 Please wait until processing is finished... +SM_READ_LOG_FILE_INFO_2 %S in process, %S has finished... +SM_READ_LOG_FILE_ERROR Failed to download file +SM_READ_SAVE_DLG_TITLE Specify a File Name for the Log File's Save Destination +SM_READ_SAVE_DLG_FILTER Log Files (*.LOG)|*.log|All Files (*.*)|*.* +SM_READ_SAVE_FAILED Failed to save the log file. +SM_READ_SAVE_TMP_FAILED Unable to write to temporary file "%S". +SM_READ_SAVE_OPEN_ERROR Unable to open temporary file "%S". \r\n\r\nIt is possible that the .LOG file extension is not an assigned file type in Windows. +SM_LICENSE_COLUMN_1 Number +SM_LICENSE_COLUMN_2 License Key +SM_LICENSE_COLUMN_3 License Type Name +SM_LICENSE_COLUMN_4 Status +SM_LICENSE_COLUMN_5 Expiration Date +SM_LICENSE_COLUMN_6 License ID +SM_LICENSE_COLUMN_7 License Type ID +SM_LICENSE_COLUMN_8 Server ID +SM_LICENSE_COLUMN_9 Serial ID +SM_LICENSE_INFINITE Infinite +SM_LICENSE_NO_EXPIRES No Expiration +SM_LICENSE_STATUS_EDITION Product Edition +SM_LICENSE_STATUS_RELEASE Release Date of VPN Server +SM_LICENSE_STATUS_SYSTEM_ID Current Server ID +SM_LICENSE_STATUS_EXPIRES Expiration of Current Product License +SM_LICENSE_STATUS_SUBSCRIPTION Status of Subscription Contract +SM_LICENSE_STATUS_SUBSCRIPTION_NONEED No Need (This Edition requires no subscription keys) +SM_LICENSE_STATUS_SUBSCRIPTION_NONE No Keys (Adding a subscription key is required) +SM_LICENSE_STATUS_SUBSCRIPTION_VALID Subscription is Active [Until %s] +SM_LICENSE_STATUS_SUBSCRIPTION_EXPIRED Subscription is Expired [at %s] +SM_LICENSE_STATUS_SUBSCRIPTION_BUILD Version Allowed by Current Contract +SM_LICENSE_STATUS_SUBSCRIPTION_BUILD_STR Free Upgrade to Any Future Versions Released Until %s is Allowed +SM_LICENSE_STATUS_ENTERPRISE Enterprise Functions Availability +SM_LICENSE_STATUS_ENTERPRISE_YES Yes (Available) +SM_LICENSE_STATUS_ENTERPRISE_NO No (Unavailable) +SM_LICENSE_NUM_USER Allowed User Objects to Create +SM_LICENSE_NUM_CLIENT Allowed Concurrent Clients +SM_LICENSE_NUM_BRIDGE Allowed Concurrent Bridges +SM_NO_LICENSE_COLUMN Caution: +SM_NO_LICENSE Because there are no product licenses registered, this VPN Server's communication function doesn't operate. +SM_LICENSE_DELETE_MSG Are you sure you want to delete the selected license from the VPN Server? +SM_SYSLOG_0 Disable Syslog Send Function +SM_SYSLOG_1 Send Server Logs by Syslog +SM_SYSLOG_2 Send Server and Virtual Hub Security Logs by Syslog +SM_SYSLOG_3 Send Server, Virtual Hub Security, and Packet Logs by Syslog +SM_SETUP_INFO_1 Click Next to start Setup. Click Close if you want to exit the setup and manually configure all settings. +SM_SETUP_INFO_2 Click Close to configuring the settings of a VPN server manually by yourself. +SM_SETUP_BRIDGE_ONLY You are currently connected to VPN Bridge. You can only create VPN Bridge at Each Site for Multi-site VPN. +SM_SETUP_BRIDGE_EDGE VPN Bridge at &Each Site +SM_SETUP_WARNING The current settings of this VPN Server or VPN Bridge will be initialized. \r\nDo you really want to do this? +SM_SETUP_SELECT Select the Ethernet device to establish the bridge connection. +SM_SETUP_NO_LICENSE_KEY Currently there is no licenses registered for this SoftEther VPN Server. \r\n\r\nFor SoftEther VPN Server to operate as a VPN server, you must enter a license key. \r\nDo you want to display the License Manager?\r\n\r\n(To use the VPN Server as a Trial Version, you have to obtain a trial key from the SoftEther VPN Project web site.\r\nClick Yes and click Obtain or Extend of License button to obtain a trial key. +SM_HUBEXT_OPTION_TITLE Virtual Hub Extended Options +SM_HUBEXT_OPTION_STATIC1 Virtual Hub Extended Options allows you to configure more detailed parameters of this Virtual Hub. +SM_HUBEXT_OPTION_STATIC2 By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options.\nHowever, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. (View only.) +SM_VLAN_COLUMN_0 Network Adapter Name +SM_VLAN_COLUMN_1 Driver Type +SM_VLAN_COLUMN_2 Driver File Name +SM_VLAN_COLUMN_3 VLAN Transparency Setting +SM_VLAN_COLUMN_4 GUID +SM_VLAN_COLUMN_5 Device Instance ID +SM_VLAN_YES Enabled +SM_VLAN_NO Not Enabled +SM_VLAN_MSG_1 The Windows Registry has been configured to allow the network adapter "%S" to transmit / receive tagged-VLAN packets.\r\n\r\nHowever, there are some network adapters which requires additional settings on the property of the Device Manager on the local computer's Windows to set the parameters to enable Jumbo Frames. (Ethernet frames which are larger than 1,512 bytes.) Unless you enable Jumbo Frames, some large VLAN packets will be dropped. In the case if large VLAN packets always disappeared, please enable Jumbo Frames. (For example, set the maximum size to 4,088 bytes.) The Device Manager in Windows will help you to configure.\r\n\r\nThis VLAN Transparency Setting has been written to the Windows Registry, however it is not guaranteed that VLAN packets can be transmitted effectively.\r\nIf transmitting VLAN tagged packets will fail after this configuration, refer the manual of the network adapter "%S" to configure manually and adequately. Moreover, "%S" might not support the VLAN transparency setting. In that case, such a network adapter cannot be used to transmit VLAN frames. Use other products.\r\n\r\nTo apply this setting, Windows which runs VPN Server must be rebooted. Do not forget to reboot it. +SM_VLAN_MSG_2 The Windows Registry parameters which was enabling the VLAN transparency features on the network adapter "%S" are deleted from the Registry.\r\n\r\nIf you did a Jumbo Frame enable settings last time, undo such changes manually.\r\n\r\nTo apply this setting, Windows which runs VPN Server must be rebooted. Do not forget to reboot it. +SM_VLAN_NOTHING There are no network adapters which VLAN Transparency Setting Tool supports on the computer "%S".\r\n\r\nHowever, some network adapters are capable to transmit VLAN tagged packets by default, or can be configured to perform VLAN tagged packets by specific configuration utility provided by the vendor.\r\nBy using such network adapters, you have to configure such settings by yourself manually. +SM_SERVER_ADMIN_MSG VPN Server / Bridge "%S" +SM_ETHERIP_COLUMN_0 ISAKMP Phase 1 ID +SM_ETHERIP_COLUMN_1 Virtual Hub Name +SM_ETHERIP_COLUMN_2 User Name +SM_ETHERIP_ADD_OK A new EtherIP / L2TPv3 client setting has been registered. +SM_IPSEC_SETUP_QUESTION This VPN Server has a function to accept IPsec / L2TP / EtherIP / L2TPv3 compatible VPN clients or VPN router products.\r\n\r\nYou can allow the VPN Server to accept connections from smartphones such as iPhone, iPad, Android, or standard VPN client functions on Mac OS X or Windows.\r\n\r\nDo you want to set up the IPsec?\r\n(IPsec settings can be configured by clicking "IPsec / L2TP Settings" button any time later.) +SM_OPENVPN_CONFIG_SAVE_OK The ZIP file '%s' which contains the setting files for OpenVPN.\r\n\r\nOpen this ZIP file to extract sample configuration files for OpenVPN which can be used immediately and easily.\r\nYou might be required to revise the configuration file a little.\r\n\r\nFor details please read the 'readme.txt' file in the ZIP file.\r\n\r\nDo you want to open this ZIP file now? +SM_OPENVPN_CONFIG_SAVE_NG Failed to save the ZIP file '%s'. +SM_OPENVPN_CONFIG_OPEN_NG Failed to open the ZIP file '%s'. Please open this file manually. +SM_DDNS_IPV4_ERROR Unable to reach the IPv4 DDNS Server. +SM_DDNS_IPV6_ERROR Unable to reach the IPv6 DDNS Server. +SM_DDNS_FQDN_EMPTY (None) +SM_DDNS_OK_MSG The Dynamic DNS hostname: %S%S\r\n\r\nYou can access to the below IP address by specifying the above DNS hostname.\r\n\r\nIPv4 Address: %s\r\nIPv6 Address: %s\r\n\r\nYou can also specify the following special forms of hostnames to specify IPv4 or IPv6 as the address-type explicitly.\r\n\r\nHostname for IPv4: %S.v4%S\r\nHostname for IPv6: %S.v6%S\r\n +SM_DDNS_OK_TITLE Dynamic DNS Function +SM_DDNS_OK_MSG2 The Dynamic DNS hostname has been changed to '%S'.\r\n\r\nClick Hint to read additional information. +SM_DDNS_KEY_TITLE Dynamic DNS Key +SM_DDNS_KEY_MSG Your Dynamic DNS Private Key: %s\r\n\r\nThis is the private key which is associated with your current DDNS name. If your VPN Server PC damaged and lost the key, the current DDNS name will be occupied forever and other VPN Server will not be able to use the same name.\r\nIf you want to continue to use the same name, keep the key on a safe place, such as an Internet storage, an another PC or a notepad.\r\nWhen applying the key to the new VPN Server, edit the configuration file of the VPN Server to replace the key by the string in the value following to "byte Key" in the "declare DDnsClient" directive.\r\nDo not use the duplicated key to two or more VPN Servers at the same time. +SM_DDNS_KEY_ERR Failed to read the DNS key. +SM_IPSEC_PSK_TOO_LONG The pre-shared key (PSK) has 10 or more letters.\r\n\r\nIt is reported that several versions of Google Android has a serious bug with 10 or more letters pre-shared key.\r\nTherefore 9 or less letters are recommended for pre-shared key.\r\n\r\nDo you want to try another pre-shared key? +SM_ADVANCED_REDIRECT_URL_HINT_TITLE How to Use Advanced HTTP Redirection Function +SM_ADVANCED_REDIRECT_URL_HINT Advanced HTTP Redirection (For Experts)\r\n\r\nThe string "" is a place holder. It can embedded on the URL of redirection.\r\n\r\nEmbedded URL Example:\r\nhttp://www.google.com/search?q=|secret\r\n\r\nWhen the client is being redirected, the actual destination URL of redirection will be replaced as follows.\r\n\r\nUsername|Session ID|IP Address|Date and Time|Hash Value\r\n\r\\nAfter Replacement Example: zurukko|SID-ZURUKKO-123|219.117.219.154|20131117100354|99707160AFE7A454042B2C47B064112D652452D7\r\n\r\nThe details of each fields are described as following.\r\n\r\nUsername: The username using for the current VPN Session will be placed.\r\n\r\nSession ID: The Session ID of the VPN Session will be placed.\r\n\r\nDate and Time: 14-digits will be placed as 'YYYYMMDDHHMMSS' format (Time zone is UTC).\r\n\r\nHash Value: A 40-characters hexadecimal strings which represent 20 bytes binary data. The binary data is the result of SHA-1 hash function to the temporary string. The temporary string is the combination of the bit-array of the above fields plus the secret string after the '|' symbol in the redirection URL. (In the above example, "secret" is the secret string.) If there are no '|' symbols in the URL, no hash value will be appended.\r\n\r\nThe Purpose of Hash Value: The secret string is effective as the secret key. Thanks to the secret key, the CGI program which receives the query strings on the redirected URL can verify the integrity of the parameters included in the URL.\r\n +SM_ADVANCED_REDIRECT_URL_MSG An URL must start with "http://" or "https://" +SM_DISABLE_DDNS_HINT_CAPTION Disable Dynamic DNS Function +SM_DISABLE_DDNS_HINT To disable the Dynamic DNS Function, modify the configuration file of VPN Server.\r\n\r\nThe "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled.\r\n +SM_REGENERATE_CERT_MSG The certificate of VPN Server is being replaced to the new one.\r\n\r\nThis will affect all VPN Clients which are configured to verify the certificate of VPN Server.\r\nDo you want to continue? +SM_DDNS_SERVER_CERT_MSG The DDNS hostname has been changed to "%S".\r\n\r\nIf you are planning to use Microsoft SSTP VPN to connect to the VPN Server from Windows Vista or greater versions of Windows with specifying the DDNS hostname as the destination of VPN Server, the destination hostname of the VPN Server must exactly match to the CN (Common Name) field on the certificate of VPN Server due to the security.\r\n\r\nDo you want to regenerate the server certificate in order to match the CN value to "%S"?\r\n(Click No to keep using the current server certificate.) +SM_DDNS_SERVER_CERT_OK The SSL certificate of VPN Server is now regenerated.\r\n\r\nWhen you make Microsoft SSTP VPN client connects to the VPN Server, you should specify the current DDNS hostname "%S" as the destination server hostname.\r\nYou have to also prepare the "Trusted Root Certificates" list on the Windows to add the certificate of this VPN Server beforehand.\r\n(To install a root certificate to Windows, open MMC and navigate to "Local Computer" in the "Certificates" applet. After that, you can import a certificate into the trusted root certification list.\r\n For details refer Microsoft's documents.)\r\n\r\nDo you want to save the new SSL certificate as a file in the X.509 format? +SM_SETUP_STEP_SECURENAT This VPN Server / Bridge might be running as user-more, or by other limitations, the Virtual Hub and a physical network adapter cannot be bridged together. Instead, the SecureNAT function allows VPN Clients to communicate with other computers in the physical network. The SecureNAT function was enabled by default. You can configure or disable it. +SM_SETUP_STEP_SECURENAT_TITLE Step 3. Bridge Virtual Hub and Physical Network +SM_UPDATE_CHECK_TITLE_VPNSERVER %S VPN Server (on the host '%S') +SM_UPDATE_CHECK_TITLE_VPNBRIDGE %S VPN Bridge (on the host '%S') +SM_FACTORY_DEFAULT_WARNING This will perform a factory-reset on the VPN Server / Bridge.\r\nThe current configuration of VPN Server / Bridge will be erased, and the initial settings will be applied immediately.\r\nYou are recommended to make a backup copy of the current configuration before do a factory-reset.\r\n\r\nPress OK to perform a factory-reset. The VPN Server / Bridge will be rebooted. The current management connection will be disconnected, so please re-connect to the VPN Server / Bridge.\r\n\r\nPress Cancel to cancel the operation. +SM_FACTORY_DEFAULT_PERFORMED The factory-reset operation is performing on the server.\r\n\r\nPress OK to exit the current session of VPN Server Manager.\r\nAfter exiting, please re-start the VPN Server Manager and connect to the VPN Server again.\r\nThen you will see the VPN Server is reset. +SM_AZURE_STATUS_CONNECTED Status: Connected +SM_AZURE_STATUS_NOT_CONNECTED Status: Not Connected +SM_NO_BRIDGE_NICS No physical network adapters suitable for Local Bridge were found on the VPN server computer.\r\nIn order to create a Local Bridge, you have to install at least one physical network adapters on the computer.\r\nYou cannot use Wi-Fi adapters or 3G adapters for Local Bridge.\r\nPlease install a physical network adapter which is compatible to wired Ethernet.\r\n\r\nIf a recently-installed network adapter doesn't appear, once reboot the computer.\r\n\r\nIf the Local Bridge cannot be used anyway, you can use "SecureNAT Function" instead.\r\n\r\nIf you have a certain reason to use unusual network adapters (i.e. Wi-Fi adapters, 3G adapters or virtual adapters), set the "ShowAllInterfaces" variable on the "LocalBridgeList" directive to "true" and restart the VPN Server. Then such devices will appear on the list. (For advanced Windows users only.)\r\n\r\nIf this error occurs after you upgraded Windows, please re-install SoftEther VPN Server or SoftEther VPN Bridge> +SM_CERT_MESSAGE The current SSL self-signed root certificate on this VPN Server is in the old format.\r\n\r\nSome versions of OpenVPN Connect for Android have a bug to misinterpret SSL certificates in the old format. It might cause the connection problem from OpenVPN Connect for Android to this VPN Server.\r\n\r\nIf you are planning to use OpenVPN Connect for Android as a VPN client, it is recommended to regenerate the SSL server certificate.\r\n\r\nDo you want to regenerate the server certificate now? +SM_CERT_MESSAGE_CLI --- Caution ---\r\n\r\nThe current SSL self-signed root certificate on this VPN Server is in the old format.\r\n\r\nSome versions of OpenVPN Connect for Android have a bug to misinterpret SSL certificates in the old format. It might cause the connection problem from OpenVPN Connect for Android to this VPN Server.\r\n\r\nIf you are planning to use OpenVPN Connect for Android as a VPN client, it is recommended to regenerate the SSL server certificate.\r\n\r\nTo regenerate and update the server certificate, execute the "ServerCertRegenerate" command after updating the VPN Server to the latest version. +SM_CERT_NEED_ROOT The specified SSL certificate is a sub-certificate which was issued by a CA (Certificate Authority).\r\n\r\nIf you are planning to support either Microsoft SSTP or OpenVPN protocol on this VPN server, you have to install the root certificate and all intermediate certificates (if exists) on this VPN Server.\r\n\r\nTo install these certificates, copy the root certificate and all intermediate certificate files (in the X.509 format) into the "chain_certs" subdirectory on the directory which is VPN Server has been installed on.\r\n\r\nIf you don't know how to obtain root and intermediate certificate files for your certificate authority (CA), please refer to the CA's web site or contact technical support staffs of the CA. + + +# Concerning User-mode Router Administration Tools +NM_TITLE deleted +NM_CONNECT_TITLE deleted +NM_STATUS_TAG Connection status: %s +NM_OFFLINE You are not connected to any VPN Servers. +NM_CONNECTING Connecting to VPN Server +NM_CONNECTED Connected to VPN Server "%S" +NM_CONNECT_ERROR Error number %u (%s) +NM_ACCOUNT_TITLE deleted +NM_STATUS User-mode Router Status +NM_STATUS_CONNECT Connection Status +NM_STATUS_TCP NAT TCP/IP Sessions +NM_STATUS_UDP NAT UDP/IP Sessions +NM_STATUS_ICMP NAT ICMP Sessions +NM_STATUS_DNS NAT DNS Sessions +NM_STATUS_DHCP Allocated DHCP Clients +NM_INFO User-mode Router information +NM_INFO_PRODUCT_NAME Product Name +NM_INFO_VERSION_STR Version information +NM_INFO_BUILD_INFO Build information +NM_INFO_HOSTNAME Host name +NM_NAT_ID ID +NM_NAT_PROTOCOL Protocol +NM_NAT_SRC_HOST Source Host +NM_NAT_SRC_PORT Source Port +NM_NAT_DST_HOST Destination Host +NM_NAT_DST_PORT Destination Port +NM_NAT_CREATED Session Created On +NM_NAT_LAST_COMM Last Communication Time +NM_NAT_SIZE Receive / Send Size +NM_NAT_TCP_STATUS TCP Connection Status +NM_NAT_PROTO_TCP TCP/IP +NM_NAT_PROTO_UDP UDP/IP +NM_NAT_PROTO_DNS DNS +NM_NAT_PROTO_ICMP ICMP +NAT_TCP_CONNECTING Connecting +NAT_TCP_SEND_RESET Disconnecting +NAT_TCP_CONNECTED Connected +NAT_TCP_ESTABLISHED Running +NAT_TCP_WAIT_DISCONNECT Disconnecting +DHCP_DHCP_ID ID +DHCP_LEASED_TIME Leased at +DHCP_EXPIRE_TIME Expires at +DHCP_MAC_ADDRESS MAC Address +DHCP_IP_ADDRESS Allocated IP +DHCP_HOSTNAME Client Host Name +NM_PASSWORD_MSG The administration password has been set. +NM_PUSH_ROUTE_WARNING The specified text of the static routing table may have a syntax error. + + +# Concerning version information +ABOUT_CAPTION About %s +BETA_EXPIRES Because the currently installed SoftEther VPN software is a beta version, you cannot use it after the provision of a newer beta version of full version. \r\nAccess http://selinks.org/ and get the latest version of SoftEther VPN software. + + +# Concerning the saving of logs +# (Common log) +L_YES Yes +L_NO No +L_LINE ------------------------------------------------------ + +# (Server log) +LS_START_UTF8 Log Messages are written with UTF-8 Encoding Format. +LS_START_1 The SoftEther VPN Server has been started. +LS_START_2 %S %S +LS_START_3 %S +LS_END_1 The SoftEther VPN Server Engine has been successfully shutdown. +LS_END_2 The Server Engine shutdown processing has started. +LS_STOP_ALL_LISTENER All TCP listeners will be stopped. +LS_STOP_ALL_LISTENER_2 All TCP listeners have been stopped. +LS_STOP_ALL_HUB Stopping all Virtual Hubs. +LS_STOP_ALL_HUB_2 All Virtual Hubs have been stopped. +LS_STOP_CEDAR Shutting down the Cedar communication module. +LS_STOP_CEDAR_2 The Cedar communication module has been shut down. +LS_STOP_FARM_MEMBER Disconnecting connection to the cluster controller. +LS_STOP_FARM_MEMBER_2 Connection with the cluster controller has been disconnected. +LS_STOP_FARM_CONTROL Cluster controller is stopping. +LS_STOP_FARM_CONTROL_2 Cluster controller has stopped. +LS_ENUM_ETHERNET_1 Ethernet device has been enumerated. +LS_ENUM_ETHERNET_2 Device %u: "%S" +LS_LOAD_CONFIG_1 Loading the configuration file. +LS_LOAD_CONFIG_2 The configuration file has been loaded. +LS_LOAD_CONFIG_3 Configuration file does not exist. Attempting to start using initial settings. +LS_INIT_SAVE_THREAD Starting the automatically saving background task. The interval between auto-saves is %u seconds. You can change the interval by changing the parameter AutoSaveConfigSpan in the configuration file. +LS_BAD_CONFIG The contents of the configuration file is invalid. The loading process has been terminated. +LS_LISTENER_START_1 TCP Listener (port %u) is starting. +LS_LISTENER_START_2 TCP Listener (port %u) has started. Now listening for connection from client. +LS_LISTENER_START_3 Unable to set port to Listen status for TCP Listener (port %u). Attempting at fixed intervals until successful. +LS_LISTENER_ACCEPT On the TCP Listener (Port %u), a Client (IP address %S, Host name "%S", Port number %u) has connected. +LS_LISTENER_DISCONNECT The connection with the client (IP address %S, Port number %u) has been disconnected. +LS_LISTENER_DOS A DoS attack on the TCP Listener (port %u) has been detected. The connecting source IP address is %S, port number is %u. This connection will be forcefully disconnected now. +LS_LISTENER_MAXUEC The TCP listener is temporary suspending to accept new inward connections because of the number of pending TCP connections exceeded %u. (Current value = %u) +LS_LISTENER_STOP_1 TCP Listener (port %u) is stopping. +LS_LISTENER_STOP_2 TCP Listener (port %u) has stopped. +LS_HUB_START Virtual Hub "%S" has been started. +LS_HUB_STOP Virtual Hub "%S" has been stopped. +LS_HUB_MAC The MAC address of Virtual Hub "%S" is "%S". +LS_NODE_INFO_TAG Client product name: "%S", Client version: %u, Client build number: %u, Server product name: "%S", Server version: %u, Server build number: %u, Client OS name: "%S", Client OS version: "%S", Client product ID: "%S", Client host name: "%S", Client IP address: "%S", Client port number: %u, Server host name: "%S", Server IP address: "%S", Server port number: %u, Proxy host name: "%S", Proxy IP address: "%S", Proxy port number: %u, Virtual Hub name: "%S", Client unique ID: "%S" +LS_CONNECTION_START_1 For the client (IP address: %S, host name: "%S", port number: %u), connection "%S" has been created. +LS_CONNECTION_END_1 Connection "%S" has been terminated. +LS_SSL_START SSL communication for connection "%S" has been started. The encryption algorithm name is "%S". +LS_CONNECTION_ERROR Connection "%S" terminated by the cause "%s" (code %u). +LS_FARMMEMBER_NOT_ADMIN Connection "%S": Although the server is a cluster member, the client attempted that to directly connect to the Virtual Hub "%S" while not being administrator user "%S". The user name provided by the client is "%S". Access is refused. +LS_HUB_NOT_FOUND Connection "%S": Virtual Hub "%S" that the client is trying to connect to does not exist on the server. +LS_IP_DENIED Connection "%S": The source IP address "%S" of the client has refused based on the Source IP Address Limit List defined for the Virtual Hub. +LS_LICENSE_ERROR Connection "%S": Because a license-related error has been occurred, the client is unable to connect to the server. +LS_BETA_EXPIRES This beta version of SoftEther VPN Server is expired. The beta version period of use has expired. Download a new beta version or full version from http://selinks.org/. +LS_TICKET_1 A new client authentication ticket has been issued for cluster member "%S". Virtual Hub "%S", User name "%S" ("%S"), Session name "%S", Ticket "%S" +LS_TICKET_2 A new client authentication ticket has been received from the cluster controller. Virtual Hub "%S", User name "%S" ("%S"), Session name "%S", Ticket "%S", Expiration %u seconds +LS_ENUM_HUB Connection "%S": %u Virtual Hub servers have been enumerated on this server. +LS_FARM_ACCEPT_1 Connection "%S": Although this server received a cluster control connection request, this server is not a cluster controller. +LS_FARM_ACCEPT_2 Connection "%S":Although this server received a cluster control connection request, the authentication password is incorrect and connection has been refused. +LS_FARM_ACCEPT_3 Connection "%S": This server received a cluster control connection request. Authentication has been successful. +LS_FARM_SERV_START Connection with a cluster member has been established. IP address: %S, Host name: "%S" +LS_FARM_SERV_END Connection with cluster member "%S" has been deleted. +LS_FARM_CONNECT_1 Connection to cluster controller "%S" has started. +LS_FARM_CONNECT_2 Connection to cluster controller "%S" has been refused. Error: %s (code %u) +LS_FARM_CONNECT_3 TCP connection to cluster controller "%S" failed. Continuing to attempt connection in intervals of %u seconds until connection is successful. +LS_FARM_DISCONNECT Connection to the cluster controller has stopped. +LS_FARM_START Connected to cluster controller. Operation as cluster member is starting. +LS_LICENSE_NOT_VPNSERVER Connection "%S": License error occurred. The VPN Client attempted to connect while the VPN Server product license is not yet registered. +LS_LICENSE_NOT_VPNCLUSTER Connection "%S": License error occurred. The license registered on this VPN Server is of a type that prevents the use of the current clustering function and a VPN Client has attempted connection while operating in Cluster mode. You must restart the VPN Server. +LS_LICENSE_VIOLATION Connection "%S": A license violation has occurred on the VPN Server and connections are not being received. +LS_LICENSE_VIOLATION_DETECTED A license violation has been detected. A different VPN Server is operating with the same server ID "%I64u" as this VPN Server. It is possible that there are two or more VPN Servers in the cluster that are using the same license. Check the license information of each VPN Server. +LS_API_AUTH_OK HTTPS API client "%r:%u" (%S): Administration mode: "%S": The embedded HTTPS web server accepted the successful login. Username: "%S", Method: "%S", Path: "%S" +LS_API_AUTH_ERROR HTTPS API client "%r:%u" (%S): The embedded HTTPS web server refused a login attempt. Username: "%S", Method: "%S", Path: "%S" +LS_API_RPC_CALL HTTPS API client "%r:%u" (%S): The client called a JSON-API. Method: "%S", Returned error code: %u (0 = success), Returned error message: "%s" + +# (OpenVPN Logs) +LO_PREFIX_RAW OpenVPN Module: +LO_PREFIX_SESSION OpenVPN Session %u (%r:%u -> %r:%u): +LO_PREFIX_CHANNEL OpenVPN Session %u (%r:%u -> %r:%u) Channel %u: +LO_NEW_CHANNEL A new channel is created. +LO_CHANNEL_ESTABLISHED_NEWKEY The channel is established. (Trigger: Re-key completion.) +LO_OPTION_STR_RECV Option Strings Received: "%S" +LO_CLIENT_CERT Client certificate received (subject: CN="%s"), will use certificate authentication. +LO_CLIENT_UNVERIFIED_CERT Client certificate was provided but did not pass verification (error="%S"), will use password authentication. +LO_CLIENT_NO_CERT Client certificate is not provided, will use password authentication. +LO_OPTION_STR_SEND Option Strings to Send: "%S" +LO_NEW_SESSION A new session is created. Protocol: %S +LO_INITIATE_REKEY The re-keying process is started. +LO_CHANNEL_ESTABLISHED The channel becomes the established state. +LO_PUSH_REPLY The full strings replied: "%S" +LO_CHANNEL_FAILED Failed to connect a channel. +LO_CHANNEL_DISCONNECTED_BY_HUB This OpenVPN channel is being terminated because the administrator of the Virtual Hub has disconnected this the VPN Session. +LO_DELETE_SESSION Deleting the session. +LO_START The OpenVPN Server Module is starting. +LO_STOP The OpenVPN Server Module is stopped. + + +# (IPsec Logs) +LI_PREFIX_RAW IPsec Module: +LI_PREFIX_CLIENT IPsec Client %u (%S:%u -> %S:%u): +LI_PREFIX_IKE IPsec IKE Session (IKE SA) %u (Client: %u) (%S:%u -> %S:%u): +LI_PREFIX_IPSEC IPsec ESP Session (IPsec SA) %u (Client: %u) (%S:%u -> %S:%u): +LI_START The IPsec ver 2.0 (ISAKMP/IKEv1) processing module is started. +LI_STOPPING The IPsec ver 2.0 (ISAKMP/IKEv1) processing module is now terminating... +LI_STOP The IPsec ver 2.0 (ISAKMP/IKEv1) processing module is terminated. +LI_NUM_IPSEC_SA The number of still-alive IPsec SAs was %u. +LI_NUM_IKE_SA The number of still-alive IKE SAs was %u. +LI_NUM_IKE_CLIENTS The number of still-alive IPsec Clients was %u. +LI_L2TP_SERVER_STARTED The L2TP Server Module is started. +LI_ETHERIP_SERVER_STARTED The EtherIP Server Module is started. The Session ID of the EtherIP Session: %u +LI_DELETE_IKE_CLIENT This IPsec Client is deleted. +LI_DELETE_IKE_SA This IKE SA is deleted. +LI_DELETE_IPSEC_SA This IPsec SA is deleted. +LI_START_QM_FROM_SERVER The server initiates a QuickMode negotiation. +LI_START_QM_FROM_CLIENT The client initiates a QuickMode negotiation. +LI_QM_DH_ERROR Failed to calculate a Diffie-Hellman algorithm. +LI_NEW_IKE_CLIENT A new IPsec client is created. +LI_NEW_IKE_SA A new IKE SA (%s) is created. Initiator Cookie: 0x%I64X, Responder Cookie: 0x%I64X, DH Group: %S, Hash Algorithm: %S, Cipher Algorithm: %S, Cipher Key Size: %u bits, Lifetime: %u Kbytes or %u seconds +LI_TAG_MAINMODE Main Mode +LI_TAG_AGGRESSIVE Aggressive Mode +LI_NEW_IPSEC_SA A new IPsec SA (Direction: %s) is created. SPI: 0x%X, DH Group: %S, Hash Algorithm: %S, Cipher Algorithm: %S, Cipher Key Size: %u bits, Lifetime: %u Kbytes or %u seconds +LI_TAG_SERVER_TO_CLIENT Server -> Client +LI_TAG_CLIENT_TO_SERVER Client -> Server +LI_IPSEC_SA_SPI_SET The SPI which has been pending is now set. New SPI: 0x%X +LI_IPSEC_SA_ESTABLISHED This IPsec SA is established between the server and the client. +LI_IKE_SA_ESTABLISHED This IKE SA is established between the server and the client. +LI_IPSEC_NO_TRANSFORM There are no acceptable transform proposals from the client for establishing an IPsec SA. +LI_IKE_NO_TRANSFORM There are no acceptable transform proposals from the client for establishing an IKE SA. +LI_IKE_NO_NAT_T The connection cannot be accepted because this VPN client is not compatible with IPsec NAT Traversal (RFC 3947 Negotiation of NAT-Traversal in the IKE or draft-ietf-ipsec-nat-t-ike). +LI_SET_CLIENT_ID The client ID which this client presented in the establishing phase is "%S". +LI_CLIENT_MERGE This client (Client %u) and the other client (Client %u) is the same client. So they are merged to the client %u. +LI_CLIENT_UPDATE The port number information of this client is updated. + + +# (EtherIP Log) +LE_PREFIX EtherIP / L2TPv3 Session %u (%S:%u -> %S:%u): +LE_START_MODULE The EtherIP / L2TPv3 Module is started. +LE_STOP The EtherIP / L2TPv3 Module is stopped. +LE_NO_SETTING Error: No EtherIP / L2TPv3 setting entries for the Client ID "%S" is registered on the VPN Server. Please register an entry of a EtherIP / L2TPv3 setting on the VPN Server beforehand. +LE_START_IPC The internal pipe was created between the EtherIP / L2TPv3 module to the Virtual Hub "%S". The using username is "%S". The IPv4 TCP MSS (Max Segment Size) to be set is %u bytes. +LE_IPC_CONNECT_ERROR The connection from the EtherIP / L2TPv3 module to the Virtual Hub "%S" failed. Error: %u : %s +LE_IPC_CONNECT_OK The connection from the EtherIP / L2TPv3 module to the Virtual Hub "%S" succeeded. +LE_RECONNECT Settings of EtherIP / L2TPv3 has been changed. Internal pipes is now being deleted and auto-reconnecting. + + +# (PPP Log) +LP_PREFIX %S%SPPP Session [%S:%u]: +LP_CONNECTED A new PPP session (Upper protocol: %S) is started. IP Address of PPP Client: %S (Hostname: "%S"), Port Number of PPP Client: %u, IP Address of PPP Server: %S, Port Number of PPP Server: %u, Client Software Name: "%S", IPv4 TCP MSS (Max Segment Size): %u bytes +LP_DISCONNECTED The PPP session is disconnected. +LP_PAP_REJECTED The client denied to accept the authentication protocol "PAP" (Password Authentication Protocol, a clear-text password authentication protocol). Enable PAP on the client-side and retry. +LP_PAP_MSCHAPV2_REJECTED The client denied to accept both the "PAP" (Password Authentication Protocol, a clear-text password authentication protocol) and MS-CHAP v2 Protocol. Enable either PAP or MS-CHAP v2 on the client-side and retry. +LP_DISCONNECTED_ABNORMAL A PPP protocol error occurred, or the PPP session has been disconnected. +LP_NEXT_PROTOCOL_IS_NOT_PAP An invalid protocol (Protocol Number: 0x%x) with non-PAP (Password Authentication Protocol) control packet. +LP_PAP_FAILED "PAP" (Password Authentication Protocol, a clear-text password authentication protocol) user authentication failed. +LP_MSCHAPV2_FAILED "MS-CHAP v2" (Microsoft Challenge and Response Protocol Version 2.0) user authentication failed. +LP_NEXT_PROTOCOL_IS_NOT_IPCP An invalid protocol (Protocol Number: 0x%x) with non-IPCP (IP Configuration Protocol) control packet. +LP_DATA_TIMEOUT A timeout on the PPP data transmitting occurred. The PPP client might be disconnected from the network. +LP_CONTROL_TIMEOUT A timeout on the PPP control transmitting occurred. No responses from the PPP client. +LP_VPN_SESSION_TERMINATED The PPP session is disconnected because the VPN Session has been disconnected by the administrator. +LP_UPPER_PROTOCOL_DISCONNECTED The PPP session is disconnected because the upper-layer protocol "%S" has been disconnected. +LP_NORMAL_TERMINATE The PPP session is disconnected by the VPN Client's disconnecting request. +LP_IP_ADDRESS_NOT_DETERMIND The VPN Client sent a packet though an IP address of the VPN Client hasn't been determined. +LP_DHCP_REQUEST_TRYING Trying to request an IP address from the DHCP server. +LP_DHCP_REQUEST_OK An IP address is assigned. IP Address of Client: %S, Subnet Mask: %S, Default Gateway: %S, Domain Name: "%S", DNS Server 1: %S, DNS Server 2: %S, WINS Server 1: %S, WINS Server 2: %S, IP Address of DHCP Server: %S, Lease Lifetime: %u seconds +LP_DHCP_REQUEST_NG Acquiring an IP address from the DHCP server failed. To accept a PPP session, you need to have a DHCP server. Make sure that a DHCP server is working normally in the Ethernet segment which the Virtual Hub belongs to. If you do not have a DHCP server, you can use the Virtual DHCP function of the SecureNAT on the Virtual Hub instead. +LP_DHCP_INFORM_TRYING Acquiring the IP networking information such as subnet mask and the default gateway information from the DHCP server. +LP_DHCP_INFORM_OK The networking information has been acquired. Subnet Mask: %S, Default Gateway: %S, Domain Name: "%S", DNS Server 1: %S, DNS Server 2: %S, WINS Server 1: %S, WINS Server 2: %S, IP Address of DHCP Server: %S +LP_DHCP_INFORM_NG Acquiring the networking information from the DHCP server failed. To accept a PPP session, you need to have a DHCP server. Make sure that a DHCP server is working normally in the Ethernet segment which the Virtual Hub belongs to. If you do not have a DHCP server, you can use the Virtual DHCP function of the SecureNAT on the Virtual Hub instead. +LP_SET_IPV4_PARAM The IP address and other network information parameters are set successfully. IP Address of Client: %S, Subnet Mask: %S, Default Gateway: %S, DNS Server 1: %S, DNS Server 2: %S, WINS Server 1: %S, WINS Server 2: %S + + +# (Virtual Hub log) +LH_ONLINE The Virtual Hub is now online. +LH_OFFLINE The Virtual Hub is now offline. +LH_CONNECT_CLIENT The connection "%S" (IP address: %S, Host name: %S, Port number: %u, Client name: "%S", Version: %S, Build: %u) is attempting to connect to the Virtual Hub. The auth type provided is "%s" and the user name is "%S". +LH_AUTH_UNKNOWN Unknown auth type. +LH_AUTH_ANONYMOUS Anonymous authentication +LH_AUTH_PASSWORD Password authentication +LH_AUTH_PLAIN_PASSWORD External server authentication +LH_AUTH_CERT Certificate authentication +LH_AUTH_TICKET Ticket authentication +LH_AUTH_OPENVPN_CERT OpenVPN certificate authentication +LH_AUTH_RADIUS_NOT_SUPPORT Connection "%S": The authentication method of the user "%S" has been specified as RADIUS Authentication or Active Directory Authentication (NT Domain Authentication). However, the edition of the VPN Server is "%S". This edition does not support RADIUS Authentication nor Active Directory Authentication (NT Domain Authentication). The connection will be denied. +LH_AUTH_RADIUS_NOT_SUPPORT_ON_OPEN_SOURCE Connection "%S": The authentication method of the user "%S" has been specified as RADIUS Authentication or Active Directory Authentication (NT Domain Authentication). However, such an external user-authentication function hasn't been implemented on the Open-Source version of SoftEther VPN yet. The connection will be denied. +LH_AUTH_CERT_NOT_SUPPORT_ON_OPEN_SOURCE Connection "%S": The authentication method of the user "%S" has been specified as Certificate Authentication. However, the Certificate Authentication function hasn't been implemented on the Open-Source version of SoftEther VPN yet. The connection will be denied. +LH_AUTH_OK Connection "%S": Successfully authenticated as user "%S". +LH_AUTH_OK_CERT The Virtual Hub's Security Account Manager has received the following certificate from the VPN Client and accepted its contents as the certificate for when user "%S" logs in: %s +LH_AUTH_NG_CERT Although the Virtual Hub's Security Account Manager has received the following certificate, has refused its contents as the certificate for when user "%S" logs in because this certificate's contents matches the contents that are registered in the Virtual Hub's certificates revocation list: %s +LH_AUTH_NG Connection "%S": User authentication failed. The user name that has been provided was "%S". +LH_LOCAL_ONLY Connection "%S": The remote login has been refused because of the password for user "%S" is blank. +LH_POLICY_ACCESS_NG Connection "%S": Access has beens refused to user "%S" based on the security policy. +LH_USER_EXPIRES Connection "%S": Access has been refused to user "%S" because of the expiration date has been expired. +LH_CLIENT_VERSION_OLD Connection "%S": The build number of the VPN Client is %u. Only the build %u or latest version of VPN Client is granted to access the VPN Server. +LH_CLIENT_ID_REQUIRED Connection "%S": The Client ID which has been specified by the VPN Client is %u. However, this Virtual Hub has the RequiredClientId value set to %u. +LH_FARM_SELECT_1 Connection "%S": The cluster controller is deciding the destination cluster member of this client. +LH_FARM_SELECT_2 Connection "%S": Failed to decide the destination cluster member server. +LH_FARM_SELECT_3 Connection "%S": This current VPN Server has been decided as the destination cluster member server. Proceeding to receive connection. +LH_FARM_SELECT_4 Connection "%S": The server "%S" has been decided as a destination cluster member server. Instructing clients to redirect connection to this server. +LH_MAX_SESSION Connection "%S": The maximum number of sessions (%u) that can be set by the Virtual Hub has been reached. Unable to create a new session. +LH_MAX_SESSION_CLIENT Connection "%S": The maximum number of client sessions (%u) that can be set by the Virtual Hub has been reached. Unable to create a new session. +LH_MAX_SESSION_BRIDGE Connection "%S": The maximum number of bridge sessions (%u) that can be set by the Virtual Hub has been reached. Unable to create a new session. +LH_MAX_SESSION_2 Connection "%S": The maximum number of sessions (%u) that can be managed by a VPN Server has been reached. Unable to create a new session. +LH_NEW_SESSION Connection "%S": The new session "%S" has been created. (IP address: %S, Port number: %u, Physical underlying protocol: "%S") +LH_SET_SESSION Session "%S": The parameter has been set. Max number of TCP connections: %u, Use of encryption: %s, Use of compression: %s, Use of Half duplex communication: %s, Timeout: %u seconds. +LH_NODE_INFO Session "%S": VPN Client details: (%s) +LH_VLAN_ID Session "%S": Assigned VLAN ID: %u +LH_INVALID_SIGNATURE Session "%S": The connected client sent invalid protocol data. Unable to establish normal communication with client. First check for problems with the connections and cabling of the network connecting the client and the server and then check there is not a special transparent packet re-writing device installed. +LH_END_SESSION Session "%S": The session has been terminated. The statistical information is as follows: Total outgoing data size: %I64u bytes, Total incoming data size: %I64u bytes. +LH_BCAST_STORM Session "%S": A large volume of broadcast packets has been detected. There are cases where packets are discarded based on the policy. The source MAC address is %S, the source IP address is %S, the destination IP address is %S. The number of broadcast packets is equal to or larger than %u items per 1 second (note this information is the result of mechanical analysis of part of the packets and could be incorrect). +LH_DHCP_FORCE Session "%S": The packet was discarded because it has been attempting to use the IP address %S, which is not a DHCP server allocated IP address. +LH_MAC_LIMIT Session "%S": Although the virtual hub has attempt to assign a new MAC address "%S" was made, %u MAC addresses have already been assigned for this service. According to the security policy, this session is allowed to have a maximum of %u MAC addresses. The packet has been discarded. +LH_BRIDGE_LIMIT Session "%S": Although the virtual hub has attempt to assign a new MAC address "%S" was made, %u MAC addresses have already been assigned for this service. According to the security policy, this session is denied bridges and is therefore allowed to hold no more than %u MAC addresses. The packet has been discarded. +LH_MAC_REGIST Session "%S": A new MAC address "%S" has been assigned. +LH_MAC_REGIST_VLAN Session "%S": A new MAC address "%S" (VLAN ID: %u) has been assigned. +LH_IP_LIMIT Session "%S": Although the virtual hub has attempt to assign a new IP address %S was made, %u IP addresses have already been assigned for this service. According to the security policy, this session is allowed to have a maximum of %u IP addresses. The packet has been discarded. +LH_ROUTING_LIMIT Session "%S": Although the virtual hub has attempt to assign a new IP address %S was made, %u IP addresses have already been assigned for this service. According to the security policy, this session is denied routing and is therefore allowed to hold no more than %u IP addresses. The packet has been discarded. +LH_IP_CONFLICT Session "%S": Although the virtual hub has attempt to use the IP address %S was made, this IP address is already being used by another session "%S" (MAC Address: "%S"). The security policy for this session denies duplication of IP addresses that are used by other sessions. The packet has been discarded. Detailed Information: CreatedTime=%I64u, UpdatedTime=%I64u, DhcpAllocated=%u, Now=%I64u +LH_NO_SERVER Session "%S": Although TCP/IP connection request (from %S:%u to %S:%u) was made to this session, because of the security policy denies operation as a server, the packet has been discarded. +LH_NO_DHCP Session "%S": Although host %S on this session sent a packet that allocates an IP address as a DHCP server for host %S on another session, this session's security policy denies operation as a DHCP server. The packet has been discarded. +LH_REGIST_DHCP Session "%S": The DHCP server of host "%S" (%S) on this session allocated, for host "%S" on another session "%S", the new IP address %S. +LH_BRIDGE_1 Session "%S": A Local Bridge connection to physical Ethernet interface "%S" was started. +LH_BRIDGE_2 Session "%S": Because communication has failed to be established with physical Ethernet interface "%S", the Local Bridge has stopped. +LH_SET_MTU Session "%S": The physical Ethernet interface "%S" has an MTU value set to %u. It is necessary to send and receive an Ethernet packet which has %u bytes. The MTU is now changed to %u. +LH_SET_MTU_ERROR Session "%S": The physical Ethernet interface "%S" has an MTU value set to %u. It is necessary to send and receive an Ethernet packet which has %u bytes. However, changing the MTU to %u failed. This physical Ethernet interface or device driver might be unable to process an Ethernet packet which has more 1,514 bytes (payload size: 1,500 bytes). In such case, the larger tagged-VLAN packets than 1,514 bytes cannot be transmitted. You should replace the current physical Ethernet adapter to another which supports Jumbo Frames. You can also try to update the device driver. Another possible method is to enable Jumbo Frames on the operating system or device driver settings. +LH_START_BRIDGE The Local Bridge connection "%S" has started. The bridge session "%S" was created. +LH_STOP_BRIDGE The Local Bridge connection "%S" has stopped. +LH_LINK_START The Cascade Connection "%s" has been established. The Cascade session "%S" was created. +LH_LINK_STOP The Cascade Connection "%s" has stopped. +LH_NAT_START SecureNAT has started. The SecureNAT session "%S" was created. +LH_NAT_STOP SecureNAT stopped. +LH_NAT_TCP_SUCCEED The connection to TCP session %u: Host "%S (%S)", Port %u was successful. +LH_NAT_TCP_FAILED The connection to TCP session %u: Host "%S", Port %u failed. +LH_NAT_TCP_DELETED The TCP session %u has been deleted. +LH_NAT_TCP_CREATED The TCP session %u has been created. Connection source %S:%u, Connection destination %S:%u +LH_NAT_UDP_DELETED The UDP session %u has been deleted. +LH_NAT_UDP_CREATED The UDP session %u has been created. Connection source %S:%u, Connection destination %S:%u +LH_NAT_DHCP_CREATED The DHCP entry %u has been created. MAC address: %S, IP address: %S, host name: %S, expiration span: %u seconds +LH_CHANGE_PASSWORD_1 The connection "%S" (IP address %S) connected to Virtual Hub in change password mode. +LH_CHANGE_PASSWORD_2 Connection "%S": Changing of password failed. The specified user "%S" does not exist. +LH_CHANGE_PASSWORD_3 Connection "%S": Changing of password failed. The auth type of user "%S" is not password authentication. +LH_CHANGE_PASSWORD_4 Connection "%S": Changing of password failed. The old password of user "%S" is incorrect. +LH_CHANGE_PASSWORD_5 Connection "%S": The password of user "%S" has been changed. +LH_CONNECT_1 Starting Cascade Connection "%s": connection number %u. +LH_CONNECT_2 The Cascade Connection "%s" is connected. Session name: "%S" +LH_CONNECT_ERROR The connection for Cascade Connection "%s" has been either disconnected or it failed. Cause: %s (code %u) +LH_POLICY_MONITOR_MODE Connection "%S": Because of a user whose security policy denies permission for Monitoring Mode requested that Monitoring Mode be enabled and attempted to connect to a Virtual Hub, the connection has been denied. +LH_POLICY_BRIDGE_MODE Connection "%S": Because of a user whose security policy denies both bridge connections and routing operations requested that bridge connections or routing operations be enabled and attempted to connect to the Virtual Hub, the connection has been denied. +LH_NOT_ENOUGH_CLIENT_LICENSE Connection "%S": Although this connection attempted to connect to the VPN Server using "client connection mode", because this would have made the number of client connections on the entire server exceed the number of registered Client Connection Licenses, it is not possible to receive the connection for this connection. When the number of licenses for concurrent connections is insufficient, you must either disconnect another existing client connection or increase the number of licenses. There are currently %u registered Client Connection Licenses and the number of connections to servers was %u. +LH_NOT_ENOUGH_BRIDGE_LICENSE Connection "%S": Although this connection attempted to connect to the VPN Server using "bridge connection mode", because this would have made the number of bridge connections on the entire server exceed the number of registered Bridge Connection Licenses, it is not possible to receive the connection for this connection. When the number of licenses for concurrent connections is insufficient, you must either disconnect another existing client connection or increase the number of licenses. There are currently %u registered Bridge Connection Licenses and the number of connections to servers was %u. +LH_TOO_MANY_MULTILOGINS Connection "%S": Although the user "%S" made a login attempt, the security policy that applies to this user limits the maximum number of multiple logins to %u sessions. Currently the number of logins by this user is %u sessions and therefore the user has denied permission for a new VPN connection. +LH_TOO_MANY_MULTILOGINS2 Connection "%S": Although the user "%S" made a login attempt, this edition of the VPN Server permits the maximum number of multiple concurrent VPN sessions to %u sessions per user. Current number of the multiple concurrent VPN sessions of this users is %u, so no more concurrent VPN sessions cannot be permitted. If you want to support more number of multiple concurrent VPN sessions per user, please consider upgrading to Professional Edition or greater of the VPN Server. +LH_PACKET_LOG_NO_LOG The edition of this VPN Server doesn't supports the packet logging function. No IP address nor TCP/UDP header data will be recorded. After you upgrade the edition of the VPN Server to Professional Edition or greater, all kinds of packet logs will be recorded in this file. +LH_PACKET_LOG_NO_LOG_OSS The VPN Server is either Open-Source or Free version. It hasn't implemented the IP Address or TCP/UDP header data logging function. No IP address nor TCP/UDP header data are not be recorded here. +LH_NO_RADIUS_SETTING The user "%S" is configured to use RADIUS authentication. However, there is no RADIUS authentication settings. The user cannot be authenticated. +LH_KERNEL_MODE_START It has been detected that the Kernel-mode NAT for SecureNAT can be run on the interface "%S". The Kernel-mode NAT is starting. The TCP, UDP and ICMP NAT processings will be performed with high-performance via Kernel-Mode hereafter. The parameters of Kernel-mode NAT: IP Address = "%r", Subnet Mask = "%r", Default Gateway = "%r", Broadcast Address = "%r", Virtual MAC Address: "%S", DHCP Server Address: "%r", DNS Server Address: "%r" +LH_KERNEL_MODE_STOP The Kernel-mode NAT on the interface "%S" for SecureNAT has been stopped. + + +# (Administration log) +LA_CONNECTED_1 Connection "%S" connected using server admin mode. +LA_CONNECTED_2 Connection "%S" connected using Virtual Hub Admin Mode. The name of the Virtual Hub is "%S". +LA_IP_DENIED Connection "%S" attempted to connect using administration mode from an IP address whose permission is denied by adminip.txt. Disconnecting. +LA_ERROR Connection "%S" was unable to log in using administration mode. %s (Error code %u) +LA_OK Connection "%S" successfully logged in using administration mode. +LA_RPC_START Connection "%S" created a new remote procedure call session "%S" for the purpose of administration mode. +LA_TAG_1 Administration mode [%S]: +LA_TAG_2 Administration mode [%S] (Virtual Hub "%S"): +LA_CREATE_LISTENER A new TCP listener (port number %u) has been created. +LA_DELETE_LISTENER TCP listener (port number %u) has been deleted. +LA_ENABLE_LISTENER TCP listener (port number %u) has been enabled. +LA_DISABLE_LISTENER TCP listener (port number %u) has been disabled. +LA_SET_SERVER_PASSWORD The server administrator password has been set. +LA_SET_FARM_SETTING The clustering setting has been changed. +LA_SET_SERVER_CERT The server certificates have been set. +LA_REGENERATE_SERVER_CERT The server certificate has been re-generated. The new CN: "%S" +LA_SET_SERVER_CIPHER A new encryption algorithm name for the server has been set. The new encryption algorithm name is "%S". +LA_CREATE_HUB A new Virtual Hub "%S" has been created. +LA_SET_HUB The Virtual Hub setting has been changed. +LA_DELETE_HUB The Virtual Hub "%S" has been deleted. +LA_SET_HUB_RADIUS The Virtual Hub's external RADIUS authentication server setting has been changed. +LA_DISCONNECT_CONN The client connection "%S" connected to the server has been forcefully disconnected. +LA_SET_HUB_ONLINE The Virtual Hub is now online. +LA_SET_HUB_OFFLINE The Virtual Hub is now offline. +LA_SET_SNAT_OPTION The SecureNAT option has been set. +LA_ENABLE_SNAT The SecureNAT function has been enabled. +LA_DISABLE_SNAT The SecureNAT function has been disabled. +LA_SET_HUB_LOG The log save setting has been changed. +LA_ADD_CA A registration of trusted root certificate has been added. +LA_DELETE_CA A registration of trusted root certificate has been deleted. +LA_CREATE_LINK The Cascade Connection "%s" has been added. +LA_SET_LINK The setting for Cascade Connection "%s" has been changed. +LA_SET_LINK_ONLINE The Cascade Connection "%s" is now online. +LA_SET_LINK_OFFLINE The Cascade Connection "%s" is now offline. +LA_DELETE_LINK The Cascade Connection "%s" has been deleted. +LA_RENAME_LINK The name of Cascade Connection "%s" has been changed to "%s". +LA_ADD_ACCESS An access list has been added. +LA_DELETE_ACCESS The access list has been deleted. +LA_SET_ACCESS_LIST The access list has been updated. An access list of %u items are set. +LA_SET_AC_LIST The Source IP Address Limit List has been updated. Rule items for %u items are set. +LA_CREATE_USER User "%S" has been created. +LA_SET_USER The setting of user "%S" has been updated. +LA_DELETE_USER User "%S" has been deleted. +LA_CREATE_GROUP Group "%S" has been created. +LA_SET_GROUP The setting of group "%S" has been updated. +LA_DELETE_GROUP Group "%S" has been deleted. +LA_DELETE_SESSION This session "%S" has been forcefully disconnected. +LA_SET_KEEP The server's Internet keep-alive setting has been updated. +LA_SET_SYSLOG The server's syslog send function setting has been updated. +LA_DELETE_BRIDGE The Local Bridge connection definition "%S" --> "%S" has been deleted. +LA_ADD_BRIDGE The Local Bridge connection definition "%S" --> "%S" has been added. +LA_REBOOT_SERVER There has been a request to restart VPN Server. +LA_GET_CONFIG The config file has been read. +LA_SET_CONFIG The config file has been written. Restarting VPN Server. +LA_SET_HUB_ADMIN_OPTION The administration option has been set for Virtual Hub "%S". +LA_SET_HUB_EXT_OPTION The Virtual Hub Extended Option has been set for Virtual Hub "%S". +LA_ADD_L3_SW The Virtual Layer 3 Switch "%S" has been created on the server. +LA_DEL_L3_SW The Virtual Layer 3 Switch "%S" has been deleted from the server. +LA_START_L3_SW The Virtual Layer 3 Switch "%S" has been started. +LA_STOP_L3_SW The Virtual Layer 3 Switch "%S" has been stopped. +LA_ADD_L3_IF The virtual interface for Virtual Hub "%S" has been added to Virtual Layer 3 Switch "%S". +LA_DEL_L3_IF The virtual interface for Virtual Hub "%S" has been deleted from Virtual Layer 3 Switch "%S". +LA_ADD_L3_TABLE The routing table for network "%S" has been added to Virtual Layer 3 Switch "%S". +LA_DEL_L3_TABLE The routing table for network "%S" has been deleted from Virtual Layer 3 Switch "%S". +LA_ADD_CRL A certificate has been added to Certificate Revocation List. +LA_DEL_CRL A certificate has been edited in Certificate Revocation List. +LA_SET_CRL A registered item in a registration of a list of invalid certificates has been edited. +LA_READ_LOG_FILE The log file on the server "%S" (log file "%S") has been downloaded. +LA_ADD_LICENSE_KEY A new license key "%S" has been registered. +LA_DEL_LICENSE_KEY An existing license (No. %u) has been deleted. +LA_SET_IPSEC_CONFIG The IPsec server setting has been updated. +LA_ADD_ETHERIP_ID A new EtherIP / L2TPv3 server setting (ID="%S") has been added. +LA_DEL_ETHERIP_ID The new EtherIP / L2TPv3 server setting (ID="%S") has been deleted. +LA_SET_OVPN_SSTP_CONFIG The OpenVPN and MS-SSTP VPN Server setting has been updated. +LA_DDNS_HOSTNAME_CHANGED The hostname of Dynamic DNS Function has been changed to "%S". +LA_SET_SPECIAL_LISTENER Special Listener enable / disable status has been changed. + +# (Client log) +LC_START_1 The SoftEther VPN Client Engine has been started. +LC_START_2 %S %S +LC_START_3 %S +LC_END The SoftEther VPN Client Engine has been shut down. +LC_LOAD_CONFIG_1 Loading configuration file... +LC_LOAD_CONFIG_2 The configuration file has been loaded. +LC_LOAD_CONFIG_3 Configuration file does not exist. Applying the initial settings. +LC_NEW_ACCOUNT A new VPN Connection Setting "%s" has been created. +LC_DELETE_ACCOUNT The VPN Connection Setting "%s" has been deleted. +LC_RENAME_ACCOUNT The name of VPN Connection Setting "%s" has been changed to "%s". +LC_CONNECT Connection processing for VPN Connection Setting "%s" has started. +LC_CONNECT_1 VPN Connection Setting "%s": Connection operation starting (this is now %u times). +LC_CONNECT_2 VPN Connection Setting "%s": Now connected. Session name: "%S" +LC_CONNECT_ERROR VPN Connection Setting "%s": The connection has been either disconnected or it failed. Cause: %s (code %u) +LC_DISCONNECT Disconnecting the VPN Connection Setting "%s". +LC_CREATE_VLAN A Virtual Network Adapter "%S" has been created. +LC_UPDATE_VLAN The Virtual Network Adapter "%S" driver has been reinstalled. +LC_DELETE_VLAN The Virtual Network Adapter "%S" has been deleted. +LC_SET_PASSWORD The password setting for connection to a client service has been changed. +LC_TAP_NOT_FOUND Cannot find the tun/tap driver for Mac OS X. Please install the tun/tap driver. + +# (Eraser log) +LE_START Monitoring the directory "%S". If the amount of available free disk space becomes less than %S, the backup files for log files and configurations that are saved on the sub-directories of this directory will be automatically deleted in the order of oldest first. The amount of free disk space that determines when to start deletion can be modified by changing the "AutoDeleteCheckDiskFreeSpaceMin" item in the configuration file. +LE_DELETE The free disk space is now less then %S so the old file "%S" has been automatically deleted. The amount of free disk space that determines when to start deletion can be modified by changing the "AutoDeleteCheckDiskFreeSpaceMin" item in the configuration file. +LE_NOT_ENOUGH_FREE <> If the free disk space becomes lower than %S, it will no longer be possible to automatically delete the old backup files of log files and configurations. We recommend that you immediately manually delete the unnecessary files on this computer and recover the necessary free disk space. When there is a very small amount of free disk space, computer operation can become unstable. + +# (Layer 3 Switch log) +L3_SWITCH_START The Virtual Layer 3 Switch "%S" started. It will wait until the Virtual Hubs of all interfaces registered on this switch become online and then it will start operation. +L3_SWITCH_ONLINE The Virtual Hubs of all interfaces of the Virtual Layer 3 Switch "%S" are online and the Virtual Layer 3 Switch has commenced Virtual Layer 3 Switch operation. +L3_SWITCH_OFFLINE At least one Virtual Hub of an interface registered on Virtual Layer 3 Switch "%S" stopped, and Virtual Layer 3 Switch operation has been stopped. +L3_SWITCH_STOP The Virtual Layer 3 Switch "%S" terminated. + + +# Concerning Microsoft.c +MS_VIRTUAL Proprietary Virtual/Internal Interface +MS_ETHERNET Ethernet Interface +MS_TOKENRING Token Ring Interface +MS_FDDI FDDI Interface +MS_PPP PPP (Dialup or VPN) +MS_LOOPBACK Loopback Interface +MS_SLIP SLIP Interface +MS_WLAN Wireless Network Interface +MS_OTHER Unknown Other Interface +MS_NON_OPERATIONAL Disabled +MS_UNREACHABLE Not Connected +MS_DISCONNECTED Not Connected +MS_CONNECTING Connecting +MS_CONNECTED Connected +MS_OPERATIONAL Connected + + +# Concerning Network Utility +UT_SM_COLUMN_1 Item Name +UT_SM_COLUMN_2 Value +UT_SM_ST_TITLE Network Adapter Name +UT_SM_ST_GUID GUID +UT_SM_ST_TYPE Type +UT_SM_ST_TYPE2 Physical Wired Ethernet +UT_SM_ST_STATUS Status +UT_SM_ST_MTU MTU +UT_SM_ST_SPEED Link Speed +UT_SM_ST_ADDRESS Physical Address +UT_SM_ST_RECV_BYTES Incoming Bytes +UT_SM_ST_RECV_BCASTS Incoming Broadcast Packets +UT_SM_ST_RECV_UNICASTS Incoming Unicast Packets +UT_SM_ST_SEND_BYTES Outgoing Bytes +UT_SM_ST_SEND_BCASTS Outgoing Broadcast Packets +UT_SM_ST_SEND_UNICASTS Outgoing Unicast Packets +UT_SM_ST_IP IP Address %u +UT_SM_ST_SUBNET Subnet Mask %u +UT_SM_ST_GATEWAY Gateway %u +UT_SM_ST_DHCP DHCP Server +UT_SM_ST_DHCP_1 Lease Start +UT_SM_ST_DHCP_2 Lease Limit date and time +UT_SM_ST_WINS_1 WINS Server 1 +UT_SM_ST_WINS_2 WINS Server 2 + + +# Concerning EtherLogger Manager +EM_TITLE SoftEther EtherLogger Manager +EM_REMOTE_TITLE You can connect to and manage the SoftEther EtherLogger service. \r\nEnter the host name and IP address of the computer on which the EtherLogger service to be managed is operating. You can also concatenate the port number by using the ":" (colon). +EM_MAIN_COLUMN_1 Network adapter name +EM_MAIN_COLUMN_2 Status +EM_MAIN_OK Operating +EM_MAIN_ERROR Error +EM_ADD_NEW Add new capture device +EM_ADD_EDIT Edit capture settings +EM_DELETE_CONFIRM Are you sure you want to delete capture setting "%S"? +EM_NO_LICENSE_COLUMN Note: +EM_NO_LICENSE Because not even one product license is registered, this SoftEther EtherLogger will not operate. + +EM_UNSUPPORTED Unable to use SoftEther EtherLogger on the operating system that this SoftEther EtherLogger is operating on. For the list of operating system that the SoftEther EtherLogger can be used on, please refer to the online documentation of the SoftEther EtherLogger. +EM_WPCAP_REMOTE In order to use this SoftEther EtherLogger, you need to install WinPcap software. The software WinPcap is currently not installed on the server computer. \r\n\r\nTo continue the installation of the WinPcap software, you must start SoftEther EtherLogger Manager on the server computer that is running VPN Server and then while connected to localhost (location of your own computer), have the Local Bridge Function Setting window displayed. \r\nTo continue, first exit this management session, and then, after starting SoftEther EtherLogger Manager on the server computer, connect to localhost and continue the setting process. +EM_WPCAP_ROOT In order to use this SoftEther EtherLogger, you need to install WinPcap software. \r\n\r\nTo continue the installation you must log in to this computer as a user with administrator privileges. \r\nLog on as an administrator and start the SoftEther VPN Server Manager again. +EM_WPCAP_INSTALL In order to use this SoftEther EtherLogger, you need to install WinPcap software. The software WinPcap is currently not installed on the server computer. \r\n\r\nWinPcap is an easy-to-install free software that is bundled together with the VPN Server. \r\n\r\nDo you want to begin the installation of WinPcap? +EM_WPCAP_REBOOT1 After WinPcap installation has completed, you must restart the computer before you use the SoftEther EtherLogger. \r\n\r\nAfter you restart the computer manually and start SoftEther EtherLogger, configure the settings again. +EM_WPCAP_REBOOT2 After WinPcap is installed, you must restart the SoftEther EtherLogger service. \r\n\r\nIt only takes a short time to restart the SoftEther EtherLogger service, however all management sessions that are currently connected to the SoftEther EtherLogger will be disconnected. \r\nThis management session will also be disconnected, so you will need to reconnect to continue. \r\n\r\nDo you want to restart the SoftEther Ether Logger service? +EM_RESOURCE Unable to read the WinPcap driver. + + +########################################################################### +# # +# String data of dialog boxes in software # +# # +########################################################################### + + +PREFIX D_SECURE +CAPTION Access to %s - %S +S_TITLE Access to %S +S_DEVICE_INFO Device Name: %S\r\nManufacturer: %S +IDS_STATIC1 Device Information +S_WARNING Take care entering the PIN code because if you have entered it incorrectly for a few times the device will be locked. +IDOK &OK +IDCANCEL Cancel +S_PIN_CODE &PIN Code: + + +PREFIX D_PKCSUTIL +CAPTION PKCS#12 Write Utility +S_TITLE ePass 1000 USB token PKCS#12 Write Utility +STATIC1 By using this utility, you can write a PKCS#12 file (certificate file) of your choice to an ePass 1000 USB hardware security token. \r\n\r\nThe USB token that the certificate file is written in can be used for SoftEther VPN authentication. +STATIC2 Write to PKCS#12 file +STATIC3 To write an existing PKC#12 file to a USB token, click Write. \r\nNOTE: If a PKCS#12 certificate for SoftEther VPN is already stored in the USB token, it will be overwritten. +B_WRITE &Write +STATIC4 Erase PKCS#12 certificate from USB token. +STATIC5 You can erase the certificate data from a USB token on which a PKCS#12 certificate for SoftEther VPN is already stored. +B_ERASE &Erase +IDCANCEL E&xit Utilities +S_COPYRIGHT Copyright (c) SoftEther VPN Project.\r\nAll Rights Reserved. + + +PREFIX D_PASSPHRASE +CAPTION Private Key Passphrase +STATIC1 The private key is protected by passphrase. \r\n\r\nEnter the passphrase to read the private key. +STATIC2 &Passphrase: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_NM_CONNECT +CAPTION Connect to SoftEther VPN User-mode Router +S_TITLE Connecting to "%S"... + + +PREFIX D_PASSWORD +CAPTION Login to %S +S_TITLE Enter your user name and password to log in to server %S. Make sure you select the correct auth type. +STATIC1 Enter Use&r Info: +STATIC2 Auth &Type: +STATIC3 User &Name: +STATIC4 &Password: +R_NO_SAVE_PASSWORD &Do not Save Password +S_COUNTDOWN An automatic reconnection will be made after %u seconds... +IDOK &OK +IDCANCEL Cancel Connection + + +PREFIX D_STATUS +CAPTION Connecting to "%s"... +S_STATUS Initializing... +IDCANCEL Cancel + + +PREFIX D_CERT +CAPTION Certificate +S_TITLE The following information is available for this certificate. +STATIC1 Basic Information of this Certificate: +STATIC2 Issued to: +STATIC3 Issuer: +STATIC4 Expires at: +STATIC5 Advanced Information of this Certificate: +STATIC6 Certificate of Authority Who Signed This Certificate: +S_PARENT The certificate of the certificate authority who signed this certificate is registered on the list of trusted certificates. +S_PARENT_BUTTON_STR &View Certificate +IDCANCEL &OK +B_SAVE &Save to File + + +PREFIX D_CHECKCERT +CAPTION Security Alert - %s +S_TITLE Although the connection to the destination VPN Server "%S" that you are currently connecting to is encrypted, the trustworthiness of the server certificate provided by the server is unknown. +STATIC1 About the Server Certificate +STATIC2 Establishing encrypted tunnel (SSL session) between VPN Server and VPN Client. Checking the server certificate enables to verify the authenticity of the server. +S_MSG1 The server certificate provided by destination VPN Server "%S" is as follows. +STATIC3 Issued to: +STATIC4 Issuer: +STATIC5 Expires at: +B_SHOW &Show Certificate +STATIC6 Digest (MD5): +STATIC7 Digest (SHA-1): +IDOK &Resume the Connection +IDCANCEL &Cancel Connection +STATIC8 There may be a problem with this certificate, such as it has not been issued by a trusted certificate authority (CA), or cert is expired. +STATIC9 Confirm the content of this certificate and decide whether or not to connect to this VPN Server. Click Cancel Connection to abort the connection. + + +PREFIX D_CONNECTERROR +CAPTION Connect Error - %s +S_TITLE An error occurred while connection to VPN Server "%S". +S_COUNTDOWN Automatically reconnects after %u seconds... +IDOK &Retry +IDCANCEL Cancel Connection +R_HIDE &Hide this window when connecting next time + + +PREFIX D_CM_LOGIN +CAPTION Enter Password - VPN Client Manager +S_TITLE You must enter a client administration password to operate the VPN Client that is operating on %s. Enter the client administration password. +STATIC1 &Password: +STATIC2 Enter the Client Administration Password: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CONNECTION_STATUS +S_TITLE Status of VPN Session of %s (Real Time) +B_POLICY Security &Policy... +B_SERVER_CERT &Server Certificate +B_CLIENT_CERT &Client Certificate +IDCANCEL &Close + + +PREFIX D_CM_POLICY +CAPTION Security Policy List +S_TITLE Security policies defined for the current session %s +IDCANCEL &Close + + +PREFIX D_CM_ACCOUNT +STATIC1 Please configure the VPN Connection Setting for VPN Server. +S_ACCOUNT_NAME Setting &Name: +STATIC2 Destination VPN Server: +STATIC3 Specify the host name or IP address, and the port number and the Virtual Hub on the destination VPN Server. +STATIC4 &Host Name: +STATIC5 &Port Number: +STATIC6 (TCP Port) +STATIC7 &Virtual Hub Name: +STATIC8 Pro&xy Server as Relay: +STATIC9 You can connect to a VPN Server via a proxy server. +STATIC10 Proxy &Type: +R_DIRECT_TCP &Direct TCP/IP Connection (No Proxy) +R_HTTPS Connect via H&TTP Proxy Server +R_SOCKS Connect via &SOCKS4 Proxy Server +R_SOCKS5 Connect via &SOCKS5 Proxy Server +B_PROXY_CONFIG P&roxy Server Setting +STATIC11 Server Certificate Veri&fication Option: +R_CHECK_CERT Always Verify Server &Certificate +B_TRUST Manage Trusted CA &Certificate List +B_SERVER_CERT &Specify Individual Cert +B_VIEW_SERVER_CERT Show Indi&vidual Cert +S_VLAN_GROUP Virtua&l Network Adapter to Use: +S_POLICY_1 You can configure the security policy which will be applied to the Cascade Connection on this Virtual Hub's side. +B_POLICY Security Po&licy +STATIC12 User &Authentication Setting: +STATIC13 Auth &Type: +S_USERNAME &User Name: +S_PASSWORD Password: +S_CERT_INFO You must specify a client certificate to be used for user authentication. +STATIC14 Advanc&ed Setting of Communication: +R_RETRY Reconnects Automatically After Disconnected +S_RETRY_NUM_1 Reconnect &Count: +S_RETRY_NUM_2 times +S_RETRY_SPAN_1 Reconnect Interval: +S_RETRY_SPAN_2 seconds +R_INFINITE &Infinite Reconnects (Keep VPN Always Online) +B_DETAIL A&dvanced Settings... +IDOK &OK +IDCANCEL Cancel +B_CHANGE_PASSWORD Change &Password +S_CHANGE_PASSWORD You can change the user's password on the VPN Server. +R_HIDE Hide Status and Errors Screens +R_HIDE2 Hide IP Address Screens +STATIC15 Set the user authentication information that is required when connecting to the VPN Server. +B_REGIST_CLIENT_CERT Specify Client &Certificate +B_IE Import I&E Proxy Server Settings +R_DISABLE_NATT Disable NAT-T + + +PREFIX D_CM_PROXY +CAPTION Proxy Server Connection Setting +STATIC1 Enter the host name of the proxy server for relaying (HTTP proxy or SOCKS proxy), and the IP address, port, and when necessary, the user name and password. +STATIC2 &Host Name: +STATIC3 Port: +STATIC4 &User Name: +STATIC5 &Password: +B_HTTP_HEADER Custom HTTP header values +IDOK &OK +IDCANCEL Cancel +STATIC6 (optional) +STATIC7 (optional) + + +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CM_DETAIL +CAPTION Advanced Settings +STATIC1 Optional settings for system administrators and experts for networking, communication protocol, and security. Customize the VPN protocol communication settings. +STATIC2 Op&timization of VPN Communication: +STATIC3 Uses multiple physical TCP connection aggregation for a logical VPN connection to increase the communication throughput. +STATIC4 &Number of TCP Connections: +STATIC5 connections +STATIC6 Note: It is recommend that about 8 connections for broadband and 1 connection for slow line (e.g. dialup). +STATIC7 Advanced Settings: +STATIC8 Establi&shing Interval: +STATIC9 seconds +R_USE_DISCONNECT Set Connection Lifetime of E&ach TCP Connection +STATIC10 Lifetime: +STATIC11 seconds +STATIC12 When using two or more TCP connections, Half Duplex Mode is available. The half-duplex mode fixes the data direction as half and half for each TCP connection. For example when a VPN using 8 TCP connections is established, physical consists of the VPN tunnel will be fixed so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. +R_USE_HALF_CONNECTION Use &Half-Duplex Mode +STATIC13 Encryption and &Compression: +STATIC14 Normally the VPN session is encrypted for secure. You can disable encryption to improve the throughput. Please note that the data flows in plain over the network when disabled. +R_USE_ENCRYPT &Encrypt VPN Session with SSL +STATIC15 You can use data compression to save VPN communication bandwidth. Enable this option when using a slow connectivity such as dial-up or mobile connection. +R_DISABLE_UDP Disable UD&P Acceleration +R_USE_COMPRESS &Use Data Compression +STATIC16 VPN Connection &Mode: +S_MODE You can specify the following connection modes. (Options for network administrators.) +R_BRIDGE &Bridge / Router Mode +R_MONITOR Monitoring Mo&de +STATIC17 Other Confi&gurations: +R_NO_ROUTING No Adjustments of &Routing Table +STATIC18 Keep the settings default in this dialog unless you are told to do so by a system administrator, or you have expertise for networking and security. +STATIC19 The VoIP / QoS functions handle high priority packets such as IP telephone packets (VoIP) to be transmitted faster. +R_DISABLE_QOS Disable VoIP / &QoS Functions +IDOK &OK +IDCANCEL Cancel +S_UDPACCEL You can use data compression to save VPN communication bandwidth. Enable this option when using a slow connectivity such as dial-up or mobile connection. + + +PREFIX D_CM_NEW_VLAN +CAPTION Create New Virtual Network Adapter +S_INFO A new Virtual Network Adapter will be created on the system.\r\nYou can specify a name for the Virtual Network Adapter, which can be a maximum of %u alphanumeric characters. +STATIC1 Virtual Network Adapter &Name: +IDOK &OK +IDCANCEL Cancel +S_WIN8 The name of a Virtual Network Adapter must be 'VPN' or 'VPN2' to 'VPN127'. (Maximum 127 adapters can be created.) + + +PREFIX D_CM_TRUST +CAPTION Manage Trusted CA Certificate List +STATIC1 Here you can manage the list of certificate authority (CA) certificates that are trusted.\r\n\r\nYou can use the CA certificate list registered here to verify server certificates when connecting to VPN Servers. +B_IMPORT &Add +B_EXPORT &Export +IDOK &View Certificate +IDCANCEL &Close +B_DELETE &Delete + + +PREFIX D_CM_PASSWORD +CAPTION Set Password - VPN Client Manager +S_TITLE You can set the password to limit the SoftEther VPN Client Service.\r\nAfter setting a password, you will be asked to enter a password the next time you use the VPN Client Connect Manager to connect to the SoftEther VPN Client service. +STATIC1 Set Client Administration Password: +R_USE_PASSWORD &Use Password +R_REMOTE_ONLY Only &Request Password for Remote Operation +IDC_STATIC1 &Password: +IDC_STATIC2 &Confirm: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CM_CONFIG +CAPTION Optional Settings +STATIC1 You can modify the settings for VPN Client. +STATIC2 R&emote Management: +STATIC3 You can remotely manage the VPN Client Service Program from another computer by using VPN Client Manager Remote Mode. +R_ALLOW_REMOTE_CONFIG Allow &Remote Management of VPN Client Service +S_WARNING It is recommended to set a password if you allow remote management. From the menu bar, choose Tools -> Set Password to set the password. +STATIC4 For environments where Internet connections will automatically be disconnected when idle, you can keep alive the Internet connection by sending dummy packets to any host on the Internet. +R_USE_KEEP_CONNECT Use &Keep Alive Internet Connection Function +S_HOSTNAME &Host Name: +S_PORT &Port Number: +S_INTERVAL Packet Send &Interval: +S_INTERVAL2 seconds +S_PROTOCOL Pr&otocol: +R_TCP &TCP/IP Protocol +R_UDP &UDP/IP Protocol +S_INFO Packets sent to keep alive the Internet connection have random bits. No personal information is sent. +IDOK &OK +IDCANCEL Cancel +STATIC5 &Other Configurations: +R_ALPHA Transparency of UI: +STATIC6 Note: The transparency setting will be applied after the connection manager is restarted. +STATIC7 &Keep Alive Internet Connection Function: + + +PREFIX D_ABOUT +S_INFO1 SoftEther VPN %u.0 Developer Edition (Ver %u.%02u, Build %u) +S_INFO2 Licensed under the Apache License, Version 2.0.\r\nCopyright (c) 2012-%u all contributors on SoftEther VPN project in GitHub. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S +S_INFO3 This product includes the following software components:\r\nBitVisor: Copyright (c) 2007, 2008 University of Tsukuba. Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. All rights reserved. / Microsoft(R) C Runtime Library: (c) 2007 Microsoft Corporation. All Rights Reserved. / PKCS #11 Cryptographic Token Interface (Cryptoki): Copyright (c) RSA Security Inc. / WinPcap: Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy). All rights reserved. / libedit: Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. / libiconv: Copyright (C) 2007 Free Software Foundation, Inc. / ncurses: Copyright (c) 1998-2005, 2006 Free Software Foundation, Inc. / OpenSSL: Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). / zlib: (C) 1995-2004 Jean-loup Gailly and Mark Adler. / Special Thanks to: Software Laboratory, Academic Computing Communication Center, Industrial Liaison and Cooperative Research Center and Professor Yasushi Shinjo in University of Tsukuba, Japan. +S_INFO4 THIS SOFTWARE IS FREEWARE DEVELOPED UNDER THE SOFTETHER VPN PROJECT AT UNIVERSITY OF TSUKUBA, WITHOUT WARRANTY OF AND KIND. IN NO EVENT SHALL THE DEVELOPERS, COPYRIGHT OWNERS OR DISTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY IN ANY WAY OUT OF THE USE OF THIS SOFTWARE.\r\n\r\nSoftEther VPN is a work of the research and development project of Japanese Government, subsidized by Ministry of Economy, Trade and Industry of Japan, administrated by Information Promotion Agency. +IDCANCEL &OK +B_WEB Visit SoftEther VPN &Website... +B_EULA &End User License +B_IMPORTANT &Important Notices +B_LEGAL &Legal Notices +B_UPDATE_CONFIG &Configure Updates +B_AUTHORS List of &Authors + + +PREFIX D_REMOTE +STATIC1 &Specify the Host Name of the Destination Computer, or IP Address: +R_LOCAL Connect to &Local Computer (Computer Displaying this Window) +S_HOSTNAME &Computer Name: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CM_DESKTOP +CAPTION Connection - %s +S_TITLE Starting connect process for VPN Connection Setting "%s". +S_WARNING VPN Client will output to the "Console Session" window of %s, the progress status and error messages related to the process of connecting to VPN Server +S_INFO Do you want to proceed with the connection? +IDOK &Continue +IDCANCEL Cancel + + +PREFIX D_CM_CHANGE_PASSWORD +CAPTION Change Password +S_TITLE You can change the password of the user registered on server %S. +STATIC1 Change &Password +STATIC2 Virtual &Hub Name: +STATIC3 &User Name: +STATIC4 &Old Password: +STATIC5 &New Password: +STATIC6 &Confirm of New Password: +IDOK &OK +IDCANCEL Cancel +S_STATIC Note: If authentication type is RADIUS or NT Domain Authentication, you cannot change the user's password here. + + +PREFIX D_SM_MAIN +CAPTION SoftEther VPN Server Manager Developer Edition +STATIC1 Connection &Settings for VPN Server: +STATIC2 Connection Settings for VPN Server or VPN Bridge are defined as follows. Double-click the item to connect to the server.\r\nTo add a new connection, click New Setting. +B_NEW_SETTING &New Setting +B_EDIT_SETTING &Edit Setting +B_DELETE &Delete Setting +IDOK &Connect +B_SECURE_MANAGER &Smart Card Manager... +B_SELECT_SECURE Select S&mart card... +B_ABOUT &About SoftEther VPN... +IDCANCEL E&xit SoftEther VPN Server Manager +B_CERT_TOOL Make a Certificate + + +PREFIX D_SM_EDIT_SETTING +STATIC1 Please configure the connection setting for the VPN Server or the VPN Bridge to manage. +STATIC2 Setting &Name: +STATIC3 Destination VPN Server: +STATIC4 Specify the host name or IP address, and the port number and the Virtual Hub on the destination VPN Server. +STATIC5 &Host Name: +R_LOCALHOST Connect to &Localhost +STATIC6 &Port Number: +STATIC7 (TCP Port) +STATIC8 Pro&xy Server as Relay: +STATIC9 You can connect to a VPN Server via a proxy server. +STATIC10 Proxy &Type: +R_DIRECT_TCP &Direct TCP/IP Connection (No Proxy) +R_HTTPS Connect via H&TTP Proxy Server +R_SOCKS Connect via S&OCKS4 Proxy Server +R_SOCKS5 Connect via S&OCKS5 Proxy Server +B_PROXY_CONFIG P&roxy Server Setting +STATIC11 Select Administration &Mode and Enter Password +STATIC12 You can connect to VPN Server using either Server Admin Mode or Virtual Hub Admin Mode.\r\n\r\nServer Admin Mode allows you manage entire VPN Server and all Virtual Hubs. \r\n\r\nVirtual Hub Admin Mode allows you manage only one Virtual Hub for which you hold privileges. +R_SERVER_ADMIN &Server Admin Mode +R_HUB_ADMIN Virtual H&UB Admin Mode +S_HUBNAME &Virtual Hub Name: +STATIC13 Please enter the password to connect administration mode. +S_PASSWORD &Password: +R_NO_SAVE Do not &Save Admin's Password +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_SERVER +CAPTION %s - SoftEther VPN Server Manager +S_TITLE Manage VPN Server "%S" +S_VHUB_BRIDGE Virtual Hubs Hosted by this VPN Server: +IDOK M&anage Virtual Hub +B_ONLINE &Online +B_OFFLINE O&ffline +B_HUB_STATUS View &Status +B_CREATE &Create a Virtual Hub +B_EDIT Prop&erties +B_DELETE &Delete +STATIC1 Management of &Listeners: +STATIC2 L&istener List (TCP/IP port): +B_CREATE_LISTENER C&reate +B_DELETE_LISTENER Dele&te +B_START Start +B_STOP Sto&p +STATIC3 VPN Server and &Network Information and Settings: +B_SSL &Encryption and Network +B_STATUS &View Server Status +B_INFO About this VPN Server +B_LICENSE Add / Delete &Licenses +B_FARM Clustering Configuration +B_FARM_STATUS Clustering Status +B_CONNECTION Show List of\r\nTCP/IP Connections +B_BRIDGE Local &Bridge Setting +B_L3 Layer &3 Switch Setting +B_CONFIG E&dit Config +B_REFRESH Refres&h +IDCANCEL E&xit +S_BETA Beta Version (Pre-release) +B_IPSEC IPsec / L&2TP Setting +B_DDNS Dynamic DNS Setting +S_DDNS Current DDNS Hostname: +B_OPENVPN OpenVPN / MS-SSTP Setting +B_AZURE VPN Azure Setting +S_AZURE VPN Azure Hostname: +B_VPNGATE VPN Gate Setting + + +PREFIX D_SM_STATUS +IDOK Refres&h +IDCANCEL E&xit + + +PREFIX D_SM_EDIT_HUB +STATIC1 Virtual Hub &Name: +STATIC2 Security &Settings: +S_BOLD Administration password for this Virtual Hub. +STATIC3 &Password: +STATIC4 &Confirm: +R_NO_ENUM No En&umerate to Anonymous Users +STATIC5 V&irtual Hub Options: +R_LIMIT_MAX_SESSION &Limit Max VPN Sessions +S_MAX_SESSION_1 Ma&x Number of Sessions: +S_MAX_SESSION_2 sessions +STATIC6 (Will not count sessions on server side that are generated by Local Bridge, Virtual NAT or Cascade Connection.) +STATIC7 Virtual Hub Status: +STATIC8 Set the Virtual Hub status. +R_ONLINE Onlin&e +R_OFFLINE O&ffline +STATIC9 Set Clustering: +S_FARM_INFO Select the Virtual Hub type in the cluster. +R_STATIC St&atic Virtual Hub +R_DYNAMIC &Dynamic Virtual Hub +S_AO_1 Virtual Hub Admin Option: +S_AO_3 Display and edit the Virtual Hub administration options. +B_ADMINOPTION Virtual Hub Admin Option +S_ACL_3 Sou&rce IP Address Limit List +S_ACL Allow or deny VPN connections to this Virtual Hub according to the client computer's IP address. +B_ACL IP Access Con&trol List +IDOK &OK +IDCANCEL Cancel +STATIC10 You can configure more advanced settings on the Virtual Hub Extended Option List. +B_EXTOPTION Edit Virtual Hub Extended Option List +S_MSG_1 Show Message when Client Connects +S_MSG_2 Shows a message on the screen of a user when a VPN Client connects to this Virtual Hub. +B_MSG Set the Messa&ge + + +PREFIX D_SM_CREATE_LISTENER +CAPTION Create Listener +STATIC1 You can add a TCP/IP port number for the VPN Server to accept connections from clients. \r\n\r\nSpecify the port number to add. +STATIC2 If the port number is already being used by another server program, the status of the new listener will be error. \r\n\r\nIn this case, stop the other program that is opening the same port. +STATIC3 &Port Number: +IDOK &OK +IDCANCEL Cancel +STATIC4 (TCP/IP Port) + + +PREFIX D_SM_SSL +CAPTION Encryption and Network Settings +STATIC1 You can view or change settings related to encryption, communication and security for this VPN Server. +STATIC2 Encryption &Algorithm Settings: +STATIC3 Specify the encryption algorithm for SSL applied to the connection between this VPN Server and VPN Clients. The encryption algorithm must be compatible with SSL Version 3. +STATIC4 En&cryption Algorithm Name: +STATIC6 Server &Certificate Settings: +STATIC7 Specify the X509 certificate and private key to be presented to clients by this server. +B_IMPORT &Import +B_EXPORT E&xport +B_VIEW &View +B_REGENERATE New +STATIC8 &Keep Alive Internet Connection: +STATIC9 For environments where Internet connections will automatically be disconnected when idle, you can keep alive the Internet connection by sending dummy packets to any host on the Internet. +STATIC10 Server Certificate: +R_USE_KEEP_CONNECT Use &Keep Alive Internet Connection +S_HOSTNAME &Host Name: +S_PORT &Port: +S_INTERVAL Send &Interval: +S_INTERVAL2 seconds +S_PROTOCOL Pr&otocol: +R_TCP &TCP/IP Protocol +R_UDP &UDP/IP Protocol +S_INFO Packets sent to keep alive the Internet connection have random bits. No personal information is sent. +STATIC11 Administrator Pass&word: +S_INFO4 You can modify an administrator password of the administrator for all Virtual Hubs and this entire VPN Server. +B_PASSWORD Change Admin &Password +IDOK &OK +IDCANCEL Cancel +IDCANCEL2 Cancel +STATIC12 Syslog Send Function: +STATIC13 You can transfer the entire VPN Server / Bridge Logs, Virtual Hub Administration Logs, or Virtual Hub Packet Logs by using syslog protocol instead of writing to a local disk. +STATIC14 Syslog &Server Host Name: +STATIC15 P&ort: +S_OVER_FUNCS VPN over ICMP / DNS Server Function +S_INFO5 You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. +B_SPECIALLISTENER VPN over ICMP / DNS Settings +B_UPDATE_CONFIG &Update Notify Setting... + + +PREFIX D_SM_SAVE_KEY_PAIR +CAPTION Save Certificate and Private Key +STATIC1 Select the method to save the certificate and private key. +STATIC2 Sa&ve Method: +R_X509_AND_KEY Save as &X509 Certificate (.CER) and Private Key File (.KEY) +R_PKCS12 Save as &PKCA#12 File (.P12) +R_SECURE Write to &Smart Card +STATIC3 Saving by splitting into two files: a standard Base 64-encoded certificate file and a private key file. +STATIC4 Saving as a PKCS#12 (Public Key Cryptography Standard #12) file. \r\nYou can store both certificate and private key in a single PKCS#12 file. +STATIC5 When a smart card is connected to this computer, you can write the certificate and private key to a smart card. +B_SELECT &Select Which Smart Card to Use... +S_PASS3 Private Key P&rotection: +S_PASS4 When saving the private key, you can set a passphrase to encrypt. You will be required to enter the passphrase when loading it. +R_USE_PASS Set P&assphrase +S_PASS1 Pa&ssphrase: +S_PASS2 Con&firm: +IDOK &OK +IDCANCEL Cancel +B_SECURE_MANAGER Smart Card &Manager... + + +PREFIX D_SM_CONNECTION +CAPTION Connection List +S_TITLE The server %S has the following active connections. Connections which have been established as a VPN session are not included. +IDOK Show Connection &Information +B_DISCONNECT &Disconnect +B_REFRESH Refres&h +IDCANCEL E&xit + + +PREFIX D_SM_FARM +CAPTION Clustering Configuration +S_TITLE You can change configuration for clustering function of VPN Server "%S". +STATIC1 Clustering can realize load balancing and fault balance protection to bundle multiple VPN Servers. +STATIC2 Current Mode: +STATIC3 Clustering Se&ttings: +R_STANDALONE &Standalone Server (No Clustering) +R_CONTROLLER &Cluster Controller +R_MEMBER Cluster &Member Server +STATIC4 C&onfigurable Parameters as a Member Server: +S_IP_1 Public &IP Address: +S_IP_2 (When a public IP address is omitted, the IP address of the network interface used when connecting to the cluster controller will be used.) +S_PORT_1 &Public Port List: +S_PORT_2 (Separate multiple port numbers by a space or a comma.) +S_CONTROLLER Controller &Host Name or IP Address: +S_CONTROLLER_PORT Port Number of\r\nControlle&r: +S_PORT_3 (TCP Port) +S_PASSWORD Administration &Password: +STATIC5 When you modify a clustering configuration, the VPN Server service restarts automatically. When this happens, all the currently connected sessions and administration-related connections will be disconnected. +IDOK &OK +IDCANCEL Cancel +S_1 Standard Ratio in Cluster: +S_2 (Standard: 100) +R_CONTROLLER_ONLY Controller Functions Only (No VPN session in itself) + + +PREFIX D_SM_FARM_MEMBER +CAPTION Cluster Member List +S_TITLE Currently the following Cluster Member Servers are connected to the Cluster Controller %S. +IDOK Cluster Member Server &Information +B_REFRESH Refres&h +IDCANCEL E&xit +B_CERT View Server &Certificate + + +PREFIX D_SM_CHANGE_PASSWORD +CAPTION Change Administrator Password of %S +S_TITLE Change the administrator password of the server %S. Enter the new password and click OK. +STATIC1 New &Password: +STATIC2 &Confirm Password: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_HUB +CAPTION Management of Virtual Hub - '%S' +S_TITLE Virtual Hub '%S' +STATIC1 Management of Security &Database: +B_USER Manage &Users +S_USER Add, delete or edit user accounts. +B_GROUP Manage &Groups +S_GROUP Add, delete or edit groups. +B_ACCESS Manage &Access Lists +S_ACCESS Add or delete access lists (Packet filtering rules). +STATIC2 Virtual Hub Settings: +B_PROPERTY Virtual Hub &Properties +S_PROPERTY Configure this Hub. +B_RADIUS Auth&entication Server Setting +S_RADIUS Use external RADIUS authentication server for user authentication. +B_LINK Manage &Cascade Connections +S_LINK Establish Cascade Connection to Hubs on local or remote VPN Servers. +STATIC3 Cu&rrent Status of this Virtual Hub: +B_REFRESH Refres&h +STATIC4 &Other Settings: +B_LOG &Log Save Setting +B_LOG_FILE Log File List +S_LOG Configure settings of log saving function. +B_CA &Trusted CA Certificates +B_CRL Revo&ked Certs +S_CA Manage trusted CA certificates. +B_SNAT &Virtual NAT and Virtual DHCP Server (SecureNAT) +S_SNAT Secure NAT is available on this Virtual Hub. You can run Virtual NAT and Virtual DHCP. +STATIC5 VPN Sess&ions Management: +B_SESSION Manage &Sessions +IDCANCEL E&xit + + +PREFIX D_SM_USER +CAPTION Manage Users +S_TITLE Virtual Hub "%S" has the following users. +IDOK &Edit +B_CREATE &New +B_DELETE &Remove +B_REFRESH &Refresh +IDCANCEL E&xit +B_STATUS &View User Info + + +PREFIX D_SM_EDIT_USER +IDC_STATIC1 &User Name: +IDC_STATIC3 &Full Name: +IDC_STATIC4 &Note: +IDC_STATIC5 Group Name\r\n(Optional): +B_GROUP Browse Groups... +R_EXPIRES &Set the Expiration Date for This Account +IDC_STATIC6 &Auth Type: +S_RADIUS_3 RADIUS or NT Domain Authentication Settings: +S_RADIUS_1 Login attempts by password will be verified by the external RADIUS server, Windows NT domain controller, or Active Directory controller. +R_SET_RADIUS_USERNAME Specify User Name on Authentication Server +S_RADIUS_2 User Name on Authentication Server: +S_POLICY_1 Security Policy +R_POLICY Set Securit&y Policy +B_POLICY Security Policy +S_PASSWORD_1 Password Authentication Settings: +S_PASSWORD_2 &Password: +S_PASSWORD_3 &Confirm Password: +S_USER_CERT_1 Individual Certificate Authentication Settings: +B_LOAD_CERT Sp&ecify Certificate +B_VIEW_CERT &View Certificate +B_CREATE Create Certificate +S_ROOT_CERT_1 Signed Certificate Authentication Settings: +S_ROOT_CERT_2 Verification of whether the client certificate is signed is based on a certificate of a CA trusted by this Virtual Hub. +R_CN Limit Common Name (CN) Value +R_SERIAL &Limit Values of the Certificate Serial Number +S_ROOT_CERT_3 Note: Enter hexadecimal values. (Example: 0155ABCDEF) +S_HINT Hint: Define a user object with username '*' (asterisk) in order to accept a login attempt of a user which does not match any of registered explicit user objects. Such a special user will use the external user-authentication server to verify the login. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_POLICY +STATIC1 Selected &Policy: +S_BOLD Des&cription of the policy: +S_BOLD2 Current &Value: +R_ENABLE &Enable the Policy +R_DISABLE &Disable the Policy +R_DEFINE De&fine the Policy +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_GROUP +CAPTION Manage Groups +S_TITLE Virtual Hub "%S" has the following groups. +B_CREATE &New +IDOK &Edit +B_DELETE &Remove +B_REFRESH &Refresh +B_USER &Member List +IDCANCEL E&xit + + +PREFIX D_SM_EDIT_GROUP +IDC_STATIC1 &Group Name: +IDC_STATIC3 &Full Name: +IDC_STATIC4 &Note: +S_POLICY_1 Security Policy: +R_POLICY Set this group's Securit&y Policy +B_POLICY Security Policy +S_POLICY_2 Statistical Information of the Group: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_ACCESS_LIST +CAPTION Access Lists +S_TITLE The Virtual Hub "%S" has the following access lists (packet filtering rules). +B_ADD &New (IPv&4) +B_ADD_V6 &New (IPv&6) +IDOK &Edit +B_DELETE &Delete +B_SAVE &Save +IDCANCEL &Cancel +STATIC1 Items with higher priority appear higher in the list. +STATIC2 Note: IP packets that did not match any access list items can pass. +B_CLONE Cl&one +B_ENABLE E&nable +B_DISABLE D&isable + + +PREFIX D_SM_EDIT_ACCESS +CAPTION Edit Access List Item +STATIC1 Configure the access list settings. The access list that is defined here will be applied to all IP packets passing through the Virtual Hub. +STATIC2 Basic Settings +STATIC3 &Memo: +STATIC4 &Action: +R_PASS &Pass +R_DISCARD &Discard +STATIC5 P&riority: +STATIC6 (Smaller number has higher priority.) +STATIC7 Filtering Options for IP Headers +S_ACCESS_SRC_ALL Source IP Address: +R_SRC_ALL Applies to All Source Addresses +S_SRC_IP_1 IPv4 Address: +S_SRC_IP_2 Subnet Mask: +S_SRC_IP_3 (255.255.255.255 means a single host) +S_SRC_IP_1_V6 IPv6 Address: +S_SRC_IP_3_V6 (For example: "ffff:ff00::" or "/24". "/128" means a single host.) +S_ACCESS_DST_ALL Destination IP Address: +R_DST_ALL Applies to All Destination Addresses +S_IP_DST_1 IPv4 Address: +S_IP_DST_2 Subnet Mask: +S_IP_DST_3 (255.255.255.255 means Specified host only) +S_IP_DST_1_V6 IPv6 Address: +S_IP_DST_3_V6 (For example: "ffff:ff00::" or "/24". "/128" means a single host.) +STATIC9 Protocol Type: +STATIC10 Filtering Options for TCP Headers and UDP Headers +S_TCP_1 Minimum +S_TCP_2 Maximum +S_TCP_3 Source Port: +S_TCP_5 Destination Port: +S_TCP_7 The blank port number field matches any ports.\r\nIt will apply to packets that match only the minimum value when the minimum value is specified but the maximum value is not. +STATIC11 Filtering Options for Users or Groups +STATIC11_OLD Filtering Options for Users +STATIC12 This access list will be applied only to the packets that for specific users, groups send or receive. +STATIC12_OLD This access list will be applied only to packets that for specific users send or receive. +STATIC13 Source Name: +B_USER1 Browse... +STATIC14 Destination Name: +B_USER2 Browse... +STATIC15 Leave these fields blank if you don't specify user name nor group name. +STATIC15_OLD Leave these fields blank if you don't specify user name. +IDOK &OK +IDCANCEL Cancel +S_PROTOID Specify IP Protocol: +STATIC16 Filtering Options for MAC Headers +S_CHECK_SRC_MAC Source MAC Address: +R_CHECK_SRC_MAC Applies to any Source Addresses +S_SRC_MAC MAC Address: +S_SRC_MAC_MASK Mask: +S_CHECK_DST_MAC Destination MAC Address: +R_CHECK_DST_MAC Applies to any Destination Addresses +B_SIMULATION De&lay and Packet Loss... +S_DST_MAC MAC Address: +S_DST_MAC_MASK Mask: +S_MAC_NOTE You can use hexadecimal number with two separators, "-" or ":", and without the separators.\r\n(FF-FF-FF-FF-FF-FF means a specified host) +R_CHECK_TCP_STATE Verify TCP Connection State (Only TCP Packets) +R_ESTABLISHED Established Packet +R_UNESTABLISHED Unestablished Packet +R_REDIRECT Redirect HTTP Request to Specific URL +B_REDIRECT Set URL Redirect to... + +PREFIX D_SM_RADIUS +CAPTION Authentication Server Settings +S_TITLE To use an external RADIUS server to verify login attempts to the Virtual Hub "%S", specify an external RADIUS server that verifies the user name and password. +STATIC1 RADIUS Server Settings: +R_USE_RADIUS &Use RADIUS Authentication +S_RADIUS_1 RADIUS &Server Host Name or IP: +S_RADIUS_2 &Port: +S_RADIUS3 (UDP Port) +S_RADIUS_4 Shared S&ecret: +S_RADIUS_5 &Confirm Shared Secret: +S_RADIUS_6 The RADIUS server must accept requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. +S_RADIUS_7 milliseconds (above %u, below %u) +S_RADIUS_8 &Retry Interval +S_RADIUS_9 (use ',' or ';' to split multiple hostnames.) +STATIC2 When using Windows NT Domain Controller or Windows Server Active Directory Controller as an external authentication server, you must setup the VPN Server computer to join the domain. To use NT Domain Authentication, there are no items to configure here. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_LINK +CAPTION Cascade Connections on %S +STATIC1 Cascade Connection can make a layer-2 Ethernet-level links between this Virtual Hub and other Virtual Hub which is located on either local or remote VPN Server. +STATIC2 Before Using Cascade Connection +STATIC3 Cascade Connection realizes a Layer 2 Bridge between multiple Virtual Hubs. But if the connection is incorrectly configured, an infinity loop could inadvertently be created. When using a Cascade Connection function please design the network topology with care. +B_CREATE &New +B_EDIT &Edit +B_ONLINE O&nline +B_OFFLINE O&ffline +IDOK &Status +B_DELETE &Delete +B_RENAME Ren&ame +B_REFRESH &Refresh +IDCANCEL E&xit + + +PREFIX D_SM_LOG +CAPTION Log Save Settings +S_TITLE You can save the security logs (such as history of user logins) of Virtual Hub "%S", and the packet logs of all packets that pass through the Virtual Hub. +STATIC1 &Security Log: +B_SEC Save S&ecurity Log +S_SEC Log File S&witch Cycle: +STATIC2 &Packet Log: +B_PACKET Save Pack&et Log +S_PACKET Log File S&witch Cycle: +S_PACKET_0 TCP Connection: +B_PACKET_0_0 Do not Save +B_PACKET_0_1 Header Only +B_PACKET_0_2 Headers && Payloads +S_PACKET_1 TCP Packet: +B_PACKET_1_0 Do not Save +B_PACKET_1_1 Header Only +B_PACKET_1_2 Headers && Payloads +S_PACKET_2 DHCP Packet: +B_PACKET_2_0 Do not Save +B_PACKET_2_1 Header Only +B_PACKET_2_2 Headers && Payloads +S_PACKET_3 UDP Packet: +B_PACKET_3_0 Do not Save +B_PACKET_3_1 Header Only +B_PACKET_3_2 Headers && Payloads +S_PACKET_4 ICMP Packet: +B_PACKET_4_0 Do not Save +B_PACKET_4_1 Header Only +B_PACKET_4_2 Headers && Payloads +S_PACKET_5 IP Packet: +B_PACKET_5_0 Do not Save +B_PACKET_5_1 Header Only +B_PACKET_5_2 Headers && Payloads +S_PACKET_6 ARP Packet: +B_PACKET_6_0 Do not Save +B_PACKET_6_1 Header Only +B_PACKET_6_2 Headers && Payloads +S_PACKET_7 Ethernet\r\nPacket: +B_PACKET_7_0 Do not Save +B_PACKET_7_1 Header Only +B_PACKET_7_2 Headers && Payloads +IDOK &OK +IDCANCEL Cancel +STATIC3 Saving large amounts of packet logs can place a large burden on the CPU and the hard disk and it can cause lower performance of Hub and entire VPN Server. Enable logging on only the necessary packet log to save. + + +PREFIX D_SM_CA +CAPTION Manage Trusted CA Certificates +STATIC1 You can manage the list of certificate authority (CA) certificates that are trusted by this Virtual Hub.\r\n\r\nThe list of CA certificates that is listed here is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. +B_IMPORT &Add +IDOK &View Certificate +IDCANCEL &Close +B_DELETE &Delete + + +PREFIX D_SM_SESSION +CAPTION Manage Sessions - %S +S_TITLE Virtual Hub "%S" has the following VPN sessions currently. +STATIC1 Operations for Sessions +IDOK Session &Information +B_DISCONNECT &Disconnect +B_REFRESH Refres&h +B_SESSION_MAC_TABLE &MAC Table of Selected Session +B_SESSION_IP_TABLE I&P Table of Selected Session +STATIC2 &Other Administration Tasks +B_MAC_TABLE MAC &Address Table List +B_IP_TABLE IP Address Ta&ble List +IDCANCEL E&xit +S_FARM_INFO_2 The sessions displayed here are all sessions on the current cluster. To manage sessions on other cluster member servers you must connect as an administrator to those servers. + + +PREFIX D_SM_MAC +CAPTION MAC Address Table +S_TITLE The MAC address table database on the Virtual Hub "%S" has the following entries. +B_DELETE &Delete Selected Entry +B_REFRESH Refres&h +IDCANCEL E&xit + + +PREFIX D_SM_IP +CAPTION IP Address Table +S_TITLE The IP address table database on the Virtual Hub "%S" has the following entries. +B_DELETE &Delete Selected Entry +B_REFRESH Refres&h +IDCANCEL E&xit + + +PREFIX D_SM_CREATE_CERT +CAPTION Create New Certificate +STATIC1 You can easily create certificates which is signed by self or other certificates. +STATIC2 Certificate &Type: +R_ROOT_CERT &Root Certificate (Self-Signed Certificate) +R_SIGNED_CERT Certificate &Signed by Other Certificate +S_LOAD_1 &Certificate and Private Key for Signing: +B_LOAD &Load Certificate and Private Key +S_LOAD_2 Click 'Load Certificate and Private Key' to specify the X509 Certificate and RSA Private Key that will user a new certificate signature. +S_LOAD_3 Common Name (CN): +S_LOAD_4 Organization (O): +S_LOAD_5 Organization Unit (OU): +S_LOAD_6 Country (C): +S_LOAD_7 State (ST): +S_LOAD_8 Locale (L): +S_LOAD_11 &Serial Number:\r\n(Hexadecimal) +S_LOAD_9 &Expires in: +S_LOAD_10 Days +STATIC3 To manage certificates and certificate authorities on a large scale, you should use either free software such as OpenSSL, or commercial CA (certificate authority) software. +IDOK &OK +IDCANCEL Cancel +S_LOAD_12 Strength&ness: + + +PREFIX D_NM_LOGIN +CAPTION deleted +S_TITLE deleted +STATIC1 deleted +STATIC2 deleted +IDOK deleted +IDCANCEL deleted + + +PREFIX D_SPEEDMETER +CAPTION Network Device Status +STATIC1 Select Network Adapter: +STATIC2 Real-time Status +STATIC3 &Refresh + + +PREFIX D_NM_MAIN +CAPTION deleted +STATIC1 deleted +STATIC2 deleted +B_SETTING Connection &Setting for VPN Server +B_CONNECT &Connect +B_DISCONNECT &Disconnect +STATIC3 Operation Settings of User-mode Router +STATIC4 You can set the operations in a virtual network of a SoftEther VPN User-mode Router. +B_OPTION &Operation Settings of User-mode Router +STATIC5 Operating Status of User-mode Router +STATIC6 Displays the current operating status of the SoftEther VPN User-mode Router. +B_NAT Virtual &NAT Status +B_DHCP Virtual D&HCP Server Status +B_STATUS User-mode &Router Status +B_INFO User-mode Router &Information +B_PASSWORD Administration &Password Setting +B_REFRESH Refr&esh +B_ABOUT &About... +IDCANCEL E&xit + + +PREFIX D_NM_OPTION +CAPTION SecureNAT Configuration +S_TITLE Set how SecureNAT virtual host performs operation on the virtual network of Virtual Hub "%S". +STATIC1 Virtual Host's Network Interface Settings: +STATIC2 &MAC Address: +STATIC3 I&P Address: +STATIC4 &Subnet Mask: +STATIC5 Virtual NAT Settings: +R_USE_NAT Use Virtual N&AT Function +STATIC6 M&TU Value: +STATIC7 bytes +STATIC8 T&CP Session Timeout: +STATIC9 seconds +STATIC10 &UDP Session Timeout: +STATIC11 seconds +R_SAVE_LOG Save NAT or DHCP Server Operations to &Log File +STATIC12 Virtual DHCP Server Settings: +R_USE_DHCP Use Virtual DHCP Server Fu&nctions +STATIC13 &Distributes IP Address: +STATIC14 to +STATIC15 . +STATIC16 Su&bnet Mask: +STATIC17 L&ease Limit: +STATIC18 seconds +STATIC19 Options Applied to Clients (optional): +STATIC20 De&fault Gateway\r\nAddress: +STATIC21 DNS &Server Address 1: +STATIC22 Domain Name: +STATIC23 DNS &Server Address 2: +IDOK &OK +IDCANCEL Cancel +S_1 Static routing table pushing function (for split tunneling) +S_2 Push the static routing table to VPN clients. +B_PUSH Edit the static routing table to push + + +PREFIX D_NM_NAT +CAPTION NAT Session Table on Virtual NAT Router +S_TITLE There are the following TCP or UDP NAT table entries on the virtual NAT router of SecureNAT. +B_REFRESH Refres&h +IDCANCEL E&xit + + +PREFIX D_NM_DHCP +CAPTION IP Lease Table on Virtual DHCP Server +S_TITLE The SecureNAT Virtual DHCP Server has allocated the following IP addresses to clients. +B_REFRESH Refres&h +IDCANCEL E&xit + + +PREFIX D_NM_CHANGE_PASSWORD +CAPTION Change Administrator Password of %S +S_TITLE You can change the administrator password of SoftEther VPN User-mode Router (%S). Click OK after entering the new password. +STATIC1 New &Password: +STATIC2 &Confirm Your Input: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_SNAT +CAPTION Virtual NAT and Virtual DHCP Function (SecureNAT) Setting +S_TITLE SecureNAT enables you to operate a virtual NAT router (IP Masquerade) and DHCP Server function on a virtual network of Virtual Hub "%S". +STATIC1 Warning about SecureNAT +S_WARNING The SecureNAT function is recommended only for system administrators or people with a detailed knowledge of networking. +S_WARNING2 If you use the SecureNAT correctly, it is possible to realize a safety remote access via a VPN. However when you use this as incorrectly, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual or online documentation. +STATIC2 Enabling / Disabling and Changing the Setting of the SecureNAT +STATIC3 You can enable, disable or change the settings of the SecureNAT on this Virtual Hub. +B_ENABLE &Enable SecureNAT +B_DISABLE &Disable SecureNAT +B_CONFIG SecureNAT &Configuration +STATIC4 Note: When a running SecureNAT is disabled, all active TCP and UDP sessions that are connected via SecureNAT will be terminated. +STATIC5 View Current SecureNAT Status +STATIC6 You can view the current SecureNAT operating status. +B_NAT Virtual &NAT Router Status +B_DHCP Virtual D&HCP Server Status +B_STATUS View &SecureNAT Operating Status +S_TSUKUBA2 SecureNAT uses technology that Daiyuu Nobori developed in 2004 at "Special Seminar on Information I" at the College of Information Science of the Third Cluster of Colleges, Tsukuba University. +IDCANCEL E&xit + + +PREFIX D_SM_BRIDGE +CAPTION Local Bridge Settings +STATIC1 Local Bridge can establish a Layer 2 bridge connection between a Virtual Hub on this VPN server and a physical Ethernet Device (Network Adapter). \r\nIt is also possible to create a tap device (virtual network interface) and establish a bridge connection with a Virtual Hub. (Tap is supported on Linux versions only) +B_DELETE &Delete Local Bridge +STATIC2 New &New Local Bridge Definition: +STATIC3 Select the Virtual Hub to bridge. +STATIC4 Virtual &Hub: +STATIC5 &Type to Create: +R_BRIDGE Bridge with &Physical Existing Network Adapter +R_TAP Bridge with New &Tap Device +S_ETH_1 LAN Adapter: +S_TAP_1 New Tap &Device Name: +S_TAP_2 (Maximum 11 Characters) +STATIC6 Note: Although it is possible to establish a bridge using any operating network adapter, in high load environments, you should prepare a network adapter dedicated for bridging. +IDOK Cre&ate Local Bridge +STATIC7 If a network adapter doesn't appear which is recently added on the system, reboot the computer and re-open this screen. +IDCANCEL E&xit +B_VLAN VLAN Transparency Setting Tool + + +PREFIX D_WIN9X_REBOOT +CAPTION VPN Client - Install Virtual Network Adapter +STATIC1 The VPN Client Virtual Network Adapter has been installed. \r\nIt is necessary to shutdown Windows now and restart the computer. \r\n\r\nThe computer will restart automatically. If the computer does not restart, please restart the computer manually. + + +PREFIX D_EM_MAIN +CAPTION SoftEther EtherLogger Manager +STATIC1 SoftEther EtherLogger is a service that captures data flowing through LAN cards connected to the computer and keeps a log of the headers of the packet types specified by the administrator and all data in text file format. \r\n\r\nCurrently, the following capture devices are performing capture logging. +B_PASSWORD Administration &Password +B_LICENSE &License +B_ADD &Add +IDOK &Edit +B_DELETE &Delete +IDCANCEL E&xit + + +PREFIX D_EM_ADD +STATIC1 Name of Network Adapter Used for Capture: +R_PROMISCUOUS Do&n't Use Promiscuous Mode During Capture +STATIC2 &Packet Log: +S_PACKET Log File S&witch Cycle: +S_PACKET_0 TCP Connection Log: +B_PACKET_0_0 Save Nothing +B_PACKET_0_1 Header Information Only +B_PACKET_0_2 Whole Packet Contents +S_PACKET_1 TCP Packet Log: +B_PACKET_1_0 Save Nothing +B_PACKET_1_1 Header Information Only +B_PACKET_1_2 Whole Packet Contents +S_PACKET_2 DHCP Packet Log: +B_PACKET_2_0 Save Nothing +B_PACKET_2_1 Header Information Only +B_PACKET_2_2 Whole Packet Contents +S_PACKET_3 UDP Packet Log: +B_PACKET_3_0 Save Nothing +B_PACKET_3_1 Header Information Only +B_PACKET_3_2 Whole Packet Contents +S_PACKET_4 ICMP Packet Log: +B_PACKET_4_0 Save Nothing +B_PACKET_4_1 Header Information Only +B_PACKET_4_2 Whole Packet Contents +S_PACKET_5 IP Packet Log: +B_PACKET_5_0 Save Nothing +B_PACKET_5_1 Header Information Only +B_PACKET_5_2 Whole Packet Contents +S_PACKET_6 ARP Packet Log: +B_PACKET_6_0 Save Nothing +B_PACKET_6_1 Header Information Only +B_PACKET_6_2 Whole Packet Contents +S_PACKET_7 Ethernet\r\nPacket Log: +B_PACKET_7_0 Save Nothing +B_PACKET_7_1 Header Information Only +B_PACKET_7_2 Whole Packet Contents +IDOK &OK +IDCANCEL Cancel +STATIC3 Saving large volume packet logs can place a large burden on the CPU and the hard disk and it can cause lower performance of the entire system. Please configure settings so that only the necessary packet log information is saved. + + +PREFIX D_EM_PASSWORD +CAPTION Change Administrator Password +S_TITLE You can change the administrator password. Click OK after entering the new password. +STATIC1 New &Password: +STATIC2 &Confirm: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_EM_LICENSE +CAPTION Add or Delete License +STATIC1 To use SoftEther EtherLogger you must acquire a valid license and register the license key. Using this window, you can register a new license key, delete a registered license key and display the current license list and the license mode of the SoftEther EtherLogger. +S_BOLD &List of Currently Registered Licenses: +B_OBTAIN &Obtain License +STATIC2 Click Obtain License to display the website that will provide instructions on how to obtain a license. +B_ADD &Add License Key Registration +B_DEL &Delete +IDOK &Information About License +STATIC3 Select a license and click Information About License to connect to SoftEther VPN Project's website (softether.com) and view the registered information relating to the selected license. +S_BOLD2 Current License &Mode of SoftEther EtherLogger: +IDCANCEL E&xit + + +PREFIX D_EM_LICENSE_ADD +CAPTION Add License Key Registration +S_INFO You can register a license key of a SoftEther EtherLogger product license. +STATIC1 The license keys are 36 alphanumeric characters in length plus hyphens. They are key codes that certify the ownership of a license. \r\n\r\nWhen a license certificate is received together with this software, the license key is printed on this license certificate. If the license for this software has been purchased online, the license key is provided by email and on the website window at the time the license is purchased. The license key may also be written down by some other method. If you don't know where the license key is written down, ask the vendor who sold you the license. +STATIC2 &Input the License Key Correctly: +STATIC3 Enter the license key by separating the input into 6-digit groups. You don't need to input the hyphens. It is also possible to copy && paste the license key. +B_INFO2 This software has world-wide copyright protection. Customers can only make copies and use this software in accordance with the license conditions. Warning: Use of illegitimately obtained license keys, use of a single license on multiple servers, or unauthorized distribution of licenses is a breach of the license agreement and such action may result in civil or legal proceedings. +IDOK &Register +IDCANCEL Cancel + +PREFIX D_EM_REMOTE +STATIC1 &Specify the Host Name of the Destination Computer, or IP Address: +R_LOCAL Connect to &Local Computer (Computer Displaying this Window) +S_HOSTNAME &Computer Name: +IDOK &OK +IDCANCEL Cancel +B_ABOUT Version information + +PREFIX D_SM_CONFIG +CAPTION Edit Config File +IDC_INFO The current configuration of the VPN Server "%S" is as follows.\r\nYou can edit the contents of this configuration file and apply it to the VPN Server. +B_EXPORT &Save to File +B_IMPORT &Import File and Apply +IDCANCEL &Close +STATIC1 You can edit the configuration file by using any text editors. When applying the edited configuration file to the VPN Server, the VPN Server will automatically restart and launch according to the new configuration file. If an invalid configuration file is applied, errors will occur and the current setting contents will get lost, so be careful when editing the configuration file. +B_FACTORY &Restore to Factory Default + + +PREFIX D_SM_ADMIN_OPTION +CAPTION Virtual Hub Administration Option +S_INFO Currently the following administration options are set for the Virtual Hub "%S". +B_ADD &Add Value +B_EDIT &Edit Value +B_DELETE &Delete Value +STATIC1 The purpose of the Virtual Hub administration options is to set limitations to administrators who are in Virtual Hub Admin Mode. +IDOK &Save +IDCANCEL Cancel +STATIC2 Only an administrator for this entire VPN Server may edit the Virtual Hub administration options. The individual Virtual Hub administrators are unable to change the administration options, however they are able to view them.\r\nHowever, if allow_hub_admin_change_option is set to "1", then Virtual Hub administrators are able to edit the administration options. +S_BOLD Description: + + +PREFIX D_SM_MSG +CAPTION Set the Message +S_MSG_2 You can set a message to display on the screen of a user when a VPN Client connects to the Virtual Hub "%S". To show a message, input the message that you want to show. +C_USEMSG Show &Message +STATIC1 About the Message Display Function +S_INFO The VPN Client must be Version 3.0 or later.\r\n\r\nSpecify a single line starts with "http://" as the message to open the default Web browser on the client instead to showing a message. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_NICINFO +CAPTION Virtual Network Adapter "%S" Status +IDCANCEL &Close + + +PREFIX D_SM_VLAN +CAPTION VLAN Transparency Setting Tool +STATIC1 Some network adapters are unable to transmit tagged-VLAN packets (IEEE802.1Q) transparency. by default\r\n\r\nIf you use such a network adapter to bridge to the Virtual Hub and need to exchange Ethernet packets with VLAN tags, you have to configure the network adapter to enable processing packets for VLAN transparency. +B_ENABLE Configure the Selected Network Adapters to VLAN Transparency +B_DISABLE &Unset the Configuration +STATIC2 About the VLAN Transparency Setting Tool +S_WARNING This tool can enable or disable the transparency for tagged VLAN packets on Intel, Broadcom or Marvell's network adapters. (Only using the vendor provided drivers for Windows.) +S_WARNING2 The above network adapters in the list means supported by this tool. No other network adapters can be configured by this tool. However, other network adapters which is not on the list might be able to support tagged VLAN packets by default or by using some configuration.\r\n\r\nSuch network adapters must be configured by the system administrator with logged on Windows. +IDCANCEL E&xit + + +PREFIX D_SM_SIMULATION +CAPTION Delay and Packet Loss Generating Function +STATIC1 This function can generate delays, jitters and packet losses on packets which match the condition of this access list entry when transmitted via this Virtual Hub.\r\n\r\nThis function is convenient to simulate a low-quality and slow Internet, WAN or wireless connections on the desk or laboratory. For example, you can use it to evaluate and test IP telephonies (VoIP). +STATIC2 Generate Delays, Jitters and Packet Losses as follow: +C_DELAY Generate &Delays +S_DELAY The Period of Delay (0 - 10000) : +S_DELAY2 milliseconds +C_JITTER Generate &Jitters (Fluctuation) +S_JITTER The Ratio of Jitter (0 - 100) : +S_JITTER2 Percent (%) +C_LOSS Generate Packet &Losses +S_LOSS The Ratio of Packet Losses (0 - 100) : +S_LOSS2 Percent (%) +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_AO_VALUE +CAPTION Name and Value +STATIC1 &Name: +STATIC2 &Value: +STATIC3 (Integer) +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_L3 +CAPTION Virtual Layer 3 Switch Setting +STATIC1 You can define Virtual Layer 3 Switches between two or more Virtual Hubs operating on this VPN Server to achieve routing between different IP networks. +STATIC2 The Virtual Layer 3 Switch functions are provided for network administrators or people who know a lot about networking and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions.\r\n\r\nIf the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing. +STATIC3 Cautions about Virtual Layer 3 Switch Function +S_BOLD Defined Virtual &Layer 3 &Switches: +B_ADD &New +B_START &Start +B_STOP S&top +IDOK &Edit +B_DELETE &Delete +IDCANCEL &Close + + +PREFIX D_SM_L3_ADD +CAPTION New Virtual Layer 3 Switch +STATIC1 To create a new Virtual Layer 3 Switch, enter a name for the switch. \r\n\r\nThe Virtual Layer 3 Switch cannot have the duplicated name as another Virtual Layer 3 Switch on this VPN Server. +STATIC2 &Name: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_L3_SW +CAPTION Edit Virtual Layer 3 Switch "%S" +STATIC1 You can define multiple virtual interfaces and routing tables on a Virtual Layer 3 Switch. +STATIC2 A virtual interface is associated to a Virtual Hub and operates as a single IP host on the Virtual Hub when the Virtual Hub is running. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. \r\nIt is possible to manually set the routing table and more detailed settings. +S_BOLD1 Virtual &Interfaces: +B_ADD_IF &New Virtual Interface +B_DEL_IF D&elete Virtual Interface +S_BOLD2 Routing &Table: +B_ADD_TABLE A&dd Routing Table Entry +B_DEL_TABLE De&lete Routing Table Entry +B_START &Start +B_STOP S&top +IDCANCEL &Close + + +PREFIX D_SM_L3_SW_IF +CAPTION Add Virtual Interface +STATIC1 Adds a new virtual interface to the Virtual Layer 3 Switch. \r\n\r\nYou must define the IP network that the virtual interface belongs to and the IP address of the interface itself. \r\nPlease select or enter the name of the virtual Hub that the interface will attach to. +STATIC2 Virtual Hub to &Attach +STATIC3 Select or enter the name of the Virtual Hub that this interface will attach to. +STATIC4 Virtual &Hub: +STATIC5 IP A&ddress and Subnet Mask of Virtual Interface: +STATIC6 The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. \r\n\r\nRouting via the Virtual Layer 3 Switches attaching to multiple virtual Hubs operates based on the IP address is specified here. +S_SRC_IP_1 &IP address: +S_SRC_IP_2 &Subnet Mask: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_L3_SW_TABLE +CAPTION New Routing Table Entry +STATIC1 Adds a new routing table entry to the routing table of the Virtual Layer 3 Switch. \r\n\r\nIf the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute the routing. +STATIC2 Definitions of Routing Table &Entry: +STATIC3 The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. \r\n\r\nRouting via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. +S_SRC_IP_1 &Network Address: +S_SRC_IP_2 &Subnet Mask: +S_SRC_IP_3 &Gateway Address: +S_SRC_IP_4 &Metric Value: +STATIC4 Note: To specify the default gateway, specify '0.0.0.0' for both the network address and the subnet mask. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CM_SELECT_SECURE +CAPTION Select Smart Card +STATIC1 Select the type of smart card device to use. \r\n\r\nThe types of smart cards listed in this list have had their drivers installed on the current computer and are supported by VPN software. \r\nIf there is a type of smart card that is currently being used that does not appear in the list, it may be possible that update of the VPN software to a newer version enable you to use it. \r\n\r\nNote: If a driver is not displayed immediately after installation, restart Windows. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CM_SECURE_MANAGER +CAPTION Smart Card Manager +S_INFO Current Smart Card:\r\n\r\n%S +B_BOLD Objects stored on the smart card: +B_REFRESH &Refresh Object List +B_IMPORT &Import to Card... +B_EXPORT &Export from Card... +B_DELETE &Delete from Card +B_NEW_CERT &Write New Certificate and Private Key to Card... +B_PIN &Change PIN Code... +IDCANCEL Close + + +PREFIX D_CM_SECURE_TYPE +CAPTION Select Object Type +STATIC Select the type of the object you want to import. +R_CERT &Certificate +R_KEY Private &Key +R_DATA &Data +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_STRING +CAPTION VPN Software +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_SELECT_KEYPAIR +CAPTION Specify Certificate in Smart Card +S_INFO Currently selected smart card:\r\n\r\n%S +B_BOLD1 Select the certificate in the smart card. +IDOK &OK +IDCANCEL Cancel +B_BOLD2 Select the corresponding private key. + + +PREFIX D_CM_LOAD_X +CAPTION Load Certificate +STATIC1 Select the method to load the certificate. +R_FROM_FILE Load Certificate from &File +R_FROM_SECURE Load Certificate from &Smart Card +S_FILE You can load a certificate from a file that stores certificate data (extensions: .cer, .crt, .p12, .pfx). +S_CERT If a smart card is connected to this computer, you can load a certificate from a smart card. +B_SELECT &Select Which Smart Card to Use... +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_CM_SECURE_PIN +CAPTION Change PIN Code +STATIC1 You can change the PIN code (secret number) of the smart card. \r\n\r\nTo change the PIN code, you are required to enter the current PIN code and the new PIN code twice. +STATIC2 &Current PIN code: +STATIC3 &New PIN Code: +STATIC4 Con&firm New PIN: +STATIC5 Note +STATIC6 If you incorrectly input the current PIN a certain number of times, the smart card will be rendered unusable. +STATIC7 Please insert the smart card and click OK. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_CRL +CAPTION Certificates Revocation List +STATIC1 You can manage the Certificates Revocation List on this Virtual Hub. \r\n\r\nBy adding certificates in Certificates Revocation List, the clients who provide these certificates will be denied to connect to this Virtual Hub using certificate authentication mode. +B_ADD &Add +IDOK &Edit +IDCANCEL &Close +B_DELETE &Delete + + +PREFIX D_SM_EDIT_CRL +CAPTION Revoked Certificate +STATIC1 You can set the contents of an entry on the revocation list. \r\n\r\nWhen a user connects to a Virtual Hub in certificate authentication mode and that certificate matches one or more of the contents defined in the Certificates Revocation List, the user will be denied to connect. +S_BOLD The certificates that matches all the fields of the items will be disabled. +STATIC2 Contents of Certificate: +R_CN Common Name (CN): +R_O Organization (O): +R_OU Organization Unit (OU): +R_C Country (C): +R_ST State (ST): +R_L Locale (L): +STATIC3 Certificate Attribute Value: +R_SERI Serial Number (Hex): +R_MD5_HASH MD5 Digest Value (Hex, 128 bit): +R_SHA1_HASH SHA-1 Digest Value (Hex, 160 bit): +STATIC4 A digest value (hash value) can identify the particular certificate exactly. If you specify a MD5 or SHA-1 digest value, you need not to specify other items. +STATIC5 Import Values from a Certificate File +STATIC6 If there is a certificate file that you want to disable, you can correctly specify the certificate and add it to the invalid list by importing that file. Click Load Certificate and the contents of the specified certificate file will be imported automatically. +B_LOAD &Load Certificate... +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_AC_LIST +CAPTION Source IP Address Limit List +S_TITLE To allow or deny VPN connections to this VPN Server Virtual Hub "%S" according to the client computer's IP address, you can set the rules to allow or deny the connection below. +B_ADD &New Rule +IDOK &Edit Rule +B_DELETE &Delete Rule +B_SAVE &Save +IDCANCEL &Cancel +STATIC1 Items with higher priority appear higher in the list. +STATIC2 If the client's IP address does not match any item in the list, VPN connection to this Virtual Hub will be allowed. + + +PREFIX D_SM_AC +CAPTION Edit Rule Entry of Source IP Address Limit List +STATIC1 Define a rule in the IP Access Control List. The values set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. +STATIC2 Defines of a Rule +STATIC3 Apply this Rule when the client's IP address matches the following: +R_SINGLE &Single IP Address +R_MASKED &Multiple IP Addresses (Specify by IP Network Address and Mask) +STATIC4 &Address: +S_MASK Net Mas&k: +STATIC5 Action +R_PASS &Permit +R_DENY &Deny +STATIC6 Others +STATIC7 P&riority: +STATIC8 (Integer: higher priority is given to smaller numbers) +STATIC9 IP Protocol Version +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_LOG_FILE +CAPTION Log File List +STATIC1 You can download log files that are saved on the server. \r\n\r\nThe administrator of the entire VPN Server is granted to download all Virtual Hub logs and server logs. Virtual Hub administrators are granted to download the log file for that Virtual Hub. +IDOK &Download +B_REFRESH &Refresh +IDCANCEL Close + + +PREFIX D_SM_READ_LOG_FILE +CAPTION Download File +S_INFO2 Downloading the file "%S" from the VPN Server. \r\nPlease wait... +IDCANCEL &Stop Download + + +PREFIX D_SM_SAVE_LOG +CAPTION Downloaded Log File +S_INFO The file "%S" has been downloaded. \r\n\r\nYou can open or save this file. +IDOK &Open +B_SAVE &Save +IDCANCEL Cancel + + +PREFIX D_TCP +CAPTION TCP Optimization Utility +STATIC1 By optimizing the TCP/IP settings on Windows, it is possible to increase the network communication throughput of this computer. \r\n\r\nBy using this TCP Optimization Utility, you can easily configure the settings for optimize the parameters. +STATIC2 Current TCP/IP setting parameters of Windows is as follows. By changing these values you can optimize the TCP/IP settings. Using this utility any time later you can reset the values or restore them to the previous setting. +STATIC3 TCP/IP Communication Setting: +STATIC4 TCP &Receiving Window Size: +R_RECV_DISABLE Use OS &Default Value +R_RECV_ENABLE S&et the Values Below +S_RECV bytes +B_RECV Default Value +STATIC5 TCP &Sending Window Size: +R_SEND_DISABLE Use OS Default Value +R_SEND_ENABLE Set the Values Below +S_SEND bytes +B_SEND Default Value +IDOK &OK +IDCANCEL Cancel +STATIC6 The changes above will take effect after Windows has rebooted. After changing the settings, you do not need to immediately reboot the computer, but until it is rebooted the TCP/IP optimized settings will not take effect. +B_DELETE Do not Manage by this Utility + + +PREFIX D_TCP_MSG +CAPTION TCP Optimization +STATIC1 By optimizing the TCP/IP settings on Windows, it is possible to increase the network communication throughput of this computer. Do you want to optimize the communication settings?\r\n\r\nYou can start at any time in the future the TCP Optimization Utility and optimize the communication settings or restore them to their previous values. +STATIC2 When the TCP/IP settings are changed, the changes will take effect after Windows has restarted. After changing the settings, you do not need to immediately restart the computer, but until it is restarted the TCP/IP optimized settings will not take effect. +R_OPTIMIZE &Automatically Optimize Communication Settings +R_MANUAL &Manually Optimize Using TCP Optimization Utility +R_NO &Do not Optimize +IDOK &Next > +IDOK3 < &Back + + +PREFIX D_CM_PKCSEULA +CAPTION Notice to Use Smart Card's Drivers +S_INFO_1 You are attempting to access the smart card with software "%S". +S_INFO_2 When using software "%S", if there are conditions of use for this software and the smart card that is to be used, you must agree to these conditions of use before using them. \r\n\r\nFor details please contact the vendor of software "%S" and of the smart card. +S_INFO_3 Do you agree to the above and want to use the software "%S" and access the specified smart card? +IDOK &Yes +IDCANCEL &No + + +PREFIX D_CM_TRAFFIC +CAPTION Network Traffic Speed Test Tool +STATIC1 Network Traffic Speed Test Tool performs transmitting packets between two computers connected with TCP/IP, with large amount of throughput as possible, in order to measure the actual network traffic speed available. This tool can be used for not limited VPNs, but it is useful for physical networks. +STATIC2 Use this tool to measure the current bandwidth capacity of the network. Note that the value obtained is sometimes lower than the actual network processing capacity due to the CPU performance of both endpoints, what other programs are currently running and fluctuations in the rate of use of the network. +S_1 Configurations: +S_3 Which is the role of this computer? +R_SERVER Test &Server +R_CLIENT Test &Client +S_4 To activate the test server, specify the listening port number.\r\nTo use it as the test client, specify the host name of the destination test server or the IP address, and port number. If necessary, configure the optional settings below. +S_5 Destination Test Server &Hostname: +S_6 &Port Number: +S_7 (TCP port) +S_8 Configure following options on the client side. +S_9 Direction of Data Communication +R_DOWNLOAD &Download (Incoming: from Server to Client) +R_UPLOAD &Upload (Outgoing: from Client to Server) +R_FULL Download and Upload (&Full-Duplex Mode: In and Out Simultaneously) +S_10 Advanced Settings +S_11 &Number of Concurrent Parallel TCP Connections: +S_12 Me&asuring Period: +S_13 seconds +R_ETHERNET Correct L2 Throughput Assuming &Ethernet +R_DOUBLE Relay Device Mode +S_14 connections +IDOK &Run +IDCANCEL Cancel +S_15 You can also run this tool from the vpncmd Command-line Management Utility (also available on non-Windows OS). + + +PREFIX D_CM_TRAFFIC_RUN +CAPTION Network Traffic Speed Test Tool +S_INFO The Network Traffic Speed Test Tool is running. The operating status is as follows. +STATIC1 To abort the Network Traffic Speed Test Tool, click Exit. +IDCANCEL &Exit + + +PREFIX D_CM_TRAFFIC_RESULT +CAPTION Communication Traffic Measurement Results +STATIC1 Communication traffic has been measured. The results are shown below. +IDCANCEL &Close + + +PREFIX D_SM_LICENSE +CAPTION Add or Remove License +STATIC1 To use SoftEther VPN Server you must acquire a valid license and register the license key. You can register a new license key, delete a registered license key and display the current license list and the license mode of the VPN Server here. +S_BOLD Currently Registered &License Keys: +B_OBTAIN &Obtain or Extend a License +STATIC2 Click Obtain or Extend License to visit the website that will provide instructions on how to obtain a license. +B_ADD &Add a License Key +B_DEL &Delete +IDOK &Information About License +STATIC3 Select a license and click Information About License to connect to SoftEther VPN Project's website (softether.com) and view the registered information relating to the selected license. +S_BOLD2 Current License &Mode of SoftEther VPN Server: +IDCANCEL E&xit + + +PREFIX D_SM_LICENSE_ADD +CAPTION Add License Keys +S_INFO You can register a SoftEther VPN Server product license or a connection license. +STATIC1 The license keys are 36 alphanumeric characters in length plus dashes. They are key codes that certify the ownership of a license. \r\n\r\nWhen a license certificate is received together with this software, the license key is printed on this license certificate. If the license for this software has been purchased online, the license key is provided by email and on the website window at the time the license is purchased. The license key may also be written down by some other method. If you don't know where the license key is written down, ask the vendor who sold you the license. +STATIC2 &Input the License Key Accurately: +STATIC3 Enter the license key by separating the input into 6-digit groups. You don't need to input the dashes. It is also possible to copy && paste the license key. +B_INFO2 This software is protected by world-wide copyright laws. Customers can only make copies and use this software in accordance with the license conditions. Warning: Use of illegitimately obtained license keys, use of a single license on multiple servers, or unauthorized distribution of licenses is a breach of the license agreement and such action may result in civil or legal proceedings. +IDOK &Register +IDCANCEL Cancel + + +PREFIX D_FREEINFO +CAPTION About SoftEther VPN Server Free Edition +S_INFO_1 Thank you for trying out the SoftEther VPN Server Free Edition. +S_INFO_2 The SoftEther VPN Server operating on destination server "%S" is the Free Edition intended for personal use. \r\nWhen using the Free Edition, you can use all the SoftEther VPN Server functions but the User Agreement prohibits the following usage. +S_INFO_3 Use where communication for commercial purposes travels via the VPN Server. +S_INFO_4 Note that if the software is used based on the above mentioned prohibited usage, it is a breach of the SoftEther VPN Server user agreement. The above restriction is lifted once you obtain a regular product license for SoftEther VPN Server. For details on the regular product version, please visit www.softether.com. \r\n\r\nIf this server is being used under the usage described above, please contact us via our website at www.softether.com. \r\n\r\nNote: This window will appear when connected to a Free Edition of VPN Server. This window does not appear when Editions other than the Free Editions of the software product are used. \r\nNote: Apart from this notification window, there are absolutely no differences between the Free Edition software and the product version. +B_HIDE &Hide this window next time. +IDCANCEL &OK + + +PREFIX D_CM_SETTING +CAPTION Switch SoftEther VPN Client Operating Mode +STATIC1 You can use SoftEther VPN Client in either Normal Mode or Easy Mode. To switch to the other mode, check the respective checkbox below. +R_NORMAL &Normal Mode +R_EASY &Easy Mode +STATIC2 When using Normal Mode, you can perform all the operations that the SoftEther VPN Client software provides. We recommend that general users and system administrators use this mode. +STATIC3 Easy Mode only allows the most frequently used operations such as connecting to the VPN Server. We recommend this mode to beginner users. +STATIC4 By using the Setting Locker, you can connect to a VPN Server by using a Connection Setting registered in SoftEther VPN Client, but by doing so, you are prevented from changing the parameters of Connection Settings, creating a new Connection Setting or deleting a Connection Setting. +R_LOCK Enable Setting &Locker +S_PASSWORD1 You can specify a password. The input of that password will be required next time to disable the Setting Locker. +S_PASSWORD2 &Password: +S_PASSWORD3 &Confirm: +IDOK &OK +IDCANCEL Cancel +S_VGS2 You can configure the VPN Gate Academic Service settings. +B_VGS VPN &Gate Service Settings... + + + +PREFIX D_CM_EASY +CAPTION SoftEther VPN Client Easy Manager (Developer Edition) +B_MODE Switch Operation &Mode +IDCANCEL &Close +B_STATUS View Connection &Status +B_VGC VPN Gate Academic Project + + +PREFIX D_SM_SETUP +CAPTION SoftEther VPN Server / Bridge Easy Setup (Developer Edition) +S_TITLE SoftEther VPN Server / Bridge Easy Setup (Developer Edition) +IDC_STATIC_1 By using this setup you can easily setup a SoftEther VPN Server or VPN Bridge for the following use and purpose. After exiting the setup, you can use the VPN Server Manager to freely configure more advanced settings. +S_BOLD Select the type of VPN server you want to build. Multiple types can be selected together. +C_REMOTE &Remote Access VPN Server +S_REMOTE_1 The Remote Access VPN Server allows VPN Client computers in remote locations to access to the existing Ethernet segments, for example company LAN.\r\nAny VPN Clients who is connecting to the VPN Server will be able to access to the network as if they are connected directly and physically to the network. +C_SITE &Site-to-site VPN Server or VPN Bridge +S_SITE_1 Site-to-site VPN is a VPN configuration to connect between two or more remote Ethernet segments.\r\nEach of the sites are connected together, and become the same segment at Layer-2 level. It enables any computers of each sites to communicate to each other as if there is a single network. +S_SITE_2 Select the role of this VPN Server: +C_CENTER VPN Server that Accepts Connection from Other Sites (&Center) +C_EDGE VPN Server or VPN Bridge at Each Site (&Edge) +C_OTHER &Other Advanced Configuration of VPN +S_OTHER Select this if you are planning to build a VPN system that provides advanced functions such as a clustering function and a Virtual Layer 3 Switch function. +IDOK &Next > +IDCANCEL &Close + + +PREFIX D_SM_SETUP_HUB +CAPTION Easy Setup - Decide the Virtual Hub Name +IDC_STATIC_1 You have to create one Virtual Hub on the VPN Server at least. Name the new Virtual Hub as you prefer. +IDC_STATIC_2 Virtual Hub &Name: +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_SETUP_STEP +CAPTION VPN Easy Setup Tasks +IDC_STATIC_1 To complete the setup of this VPN Server / VPN Bridge, you must complete the following tasks. +S_1_1 Step 1. Create a User to Accept VPN Connection +S_1_2 When this VPN Server accepts a remote access VPN, or becomes the central site-to-site VPN server that accepts connections from other sites, create users to accept the VPN connection. +B_USER Create &Users +S_2_1 Step 2. Define a Connection to Destination VPN Server +S_2_2 When this VPN Server is installed on a particular site (edge) of a site-to-site VPN, you have to specify the address of the center VPN Server that accepts the connections, and establish a connection to that central VPN Server. +B_CASCADE &Configure Connection Setting +S_3_1 Step 3. Set Local Bridge +S_3_2 For an site-to-site VPN, use the Local Bridge Function to connect a bridge between the virtual Ethernet segment on the VPN side and the physical Ethernet segment on the local side. Select an existing Ethernet device (Network Adapter) that will be provide the bridge connection to the VPN. +IDCANCEL &Close +IDC_STATIC_8 Once the required settings are configured, click Close. An advanced management tool for VPN Server / VPN Bridge will be appeared. You can then configure any advanced settings as you wish. +B_SECURENAT Configure SecureN&AT + + +PREFIX D_CPU64_WARNING +CAPTION Information on SoftEther VPN 64-bit Edition +S_BOLD The SoftEther VPN software currently installed is the 32-bit edition, but the Windows operating system that is currently running is a 64-bit edition. +S_INFO You can run the 32-bit edition of SoftEther VPN software on a 64-bit edition of Windows, but it will run on Window's 32-bit emulator, and this results in reduced performance. \r\nThere is also a possibility that some functions are not supported. \r\n\r\nWe strongly recommend you to install and use the 64-bit edition of SoftEther VPN software when running it on 64-bit Windows. \r\nYou can download the 64-bit edition of the SoftEther VPN software from http://selinks.org/. \r\n\r\nThis dialog box will close automatically in 30 seconds. +IDOK &OK + + +PREFIX D_ONCEMSG +CAPTION TITLE +C_DONTSHOWAGAIN &Do not show this message again +IDCANCEL &OK + + +PREFIX D_CONNECT +IDCANCEL Cancel + + +PREFIX D_SM_IPSEC +CAPTION IPsec / L2TP / EtherIP / L2TPv3 Settings +S_TITLE IPsec / L2TP / EtherIP / L2TPv3 Server Settings +S_3 Virtual Hubs on the VPN Server can accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP / L2TPv3 Site-to-Site VPN Connection. +S01 L2TP Server (Remote-Access VPN Server Function) +S02 VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from built-in VPN Clients on Mac OS X and Windows can be accepted. +R_L2TP_OVER_IPSEC Enable L2TP Server Function (L2TP over IP&sec) +S03 Make VPN Connections from iPhone, iPad, Android, Windows, and Mac OS X acceptable. +R_L2TP_RAW Enable L2TP Server Function (Raw &L2TP with No Encryptions) +S04 It supports special VPN Clients which uses L2TP with no IPsec encryption. +S_1 Default Virtual &Hub in a case of omitting a name of Hub on the Username: +S_2 Users should specify their username such as "Username@Target Virtual Hub Name" to connect this L2TP Server.\r\nIf designation of a Virtual Hub is omitted, the below Hub will be used as the target. +S05 EtherIP Server Function (Site-to-Site VPN Connection) +S06 Router products which are compatible with EtherIP / L2TPv3 over IPsec can connect to Virtual Hub on the VPN Server and establish Layer-2 (Ethernet) Bridging. +R_ETHERIP Enable &EtherIP / L2TPv3 over IPsec Server Function +B_DETAIL EtherIP / L2TPv3 &Detail Settings +S07 IPsec &Common Settings +S_PSK IPsec &Pre-Shared Key: +S_PSK2 IPsec Pre-Shared Key is also called "PSKs" or "Secrets". Specify it with around eight ASCII characters, and let all VPN users know. +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_ETHERIP +CAPTION EtherIP / L2TPv3 Server Detail Settings +S_TITLE EtherIP / L2TPv3 Server Detail Settings +S01 EtherIP / L2TPv3 over IPsec compatible routers can connect to Virtual Hubs on VPN Server and establish Layer-2 (Ethernet) Bridge. For instance, Cisco routers, NEC IX series and IIJ SEIL routers are recommended as compatible VPN routers. +S02 In order to accept EtherIP / L2TPv3 protocol, define appropriate EtherIP / L2TPv3 Client Settings to identify the client site of the router beforehand. A EtherIP / L2TPv3 Client Setting must have a corresponding IPsec Phase 1 ID. +S_BOLD &Table of IPsec Phase 1 ID and the Virtual Hub +B_ADD &Add +IDOK &Edit +B_DELETE &Delete +IDCANCEL E&xit + + +PREFIX D_SM_ETHERIP_ID +CAPTION EtherIP / L2TPv3 over IPsec Client Setting +S01 The following Virtual Hub connection settings will be applied only when an EtherIP / L2TPv3 over IPsec Client is attempting to connect this VPN Server with an ISAKMP (IKE) Phase ID which is exactly equal to the value specified below. +S02 ISAKMP Phase 1 &ID: +S03 Virtual &Hub: +S04 &Username: +S05 &Password: +S06 Note that the username and the password must be same as a registered on the Virtual Hub. An EtherIP / L2TPv3 Client will be regarded as it connected the Virtual Hub with the identification of the above user information. +IDOK &OK +IDCANCEL Cancel +S07 The ID must be exact same as an ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP / L2TPv3 Client uses IP address as Phase 1 ID. You can specify '*' (asterisk) as a wildcard to match any other clients which don't match other explicit rules. + + +PREFIX D_SM_OPENVPN +CAPTION OpenVPN / MS-SSTP Settings +S_TITLE OpenVPN / MS-SSTP VPN Clone Server Function Settings +S_1 This VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc.\r\n\r\nAny OpenVPN Clients can connect to this VPN Server. +R_OPENVPN Enable &OpenVPN Clone Server Function +S_UDP UDP Ports to Listen for OpenVPN: +B_DEFAULT Restore &Default +S_UDP2 Multiple UDP ports can be specified with splitting by space or comma letters.\r\nOpenVPN Server Function also runs on TCP ports. Any TCP ports which are defined as listeners on the VPN Server accepts OpenVPN Protocol respectively and equally. +S_TOOL Sample File Generating Tool for OpenVPN Clients +S_TOOL2 Making a OpenVPN Client configuration file is a very difficult job. You can use this tool to generate an appropriate OpenVPN Client configuration file. The generated configuration sample can be used immediately. +B_CONFIG Generate a Sample &Configuration File for OpenVPN Clients +S_2 Microsoft SSTP VPN Clone Server Function +S_3 This VPN Server has the clone functions of MS-SSTP VPN Server which is on Windows Server 2008 / 2012 by Microsoft Corporation.\r\nBuilt-in MS-SSTP Clients on Windows Vista / 7 / 8 / RT / 10 can connect to this VPN Server. +R_SSTP Enable &MS-SSTP VPN Clone Server Function +S_SSTP The value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the client, and that certificate must be in the trusted list on the client. For details refer the Microsoft's documents. +S_4 The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using these clone server functions are same to the IPsec Server functions. +B_IPSEC I&Psec Server Configuration +S_13 OpenVPN Clone Server Function +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_SM_DDNS +CAPTION Dynamic DNS Function +S_TITLE Dynamic DNS Function +S_BOLD This VPN Server has a Built-in Dynamic DNS Function. +S_1 The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. +S_22 Also, if your ISP assigns you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address.\r\nTherefore, you need not any longer to keep static global IP addresses with expenses monthly costs. +S_3 Moreover, this VPN Server version supports 'NAT-Traversal' function. If the VPN Server is inside the NAT and is assigned only a private IP address, you can connect to that VPN Server from the Internet side without any special settings on the NAT beforehand. +S_4 Current &Status: +S_STATUS3 Assigned Dynamic DNS &Hostname: +B_HINT Hint +S_STATUS4 Global IPv&4 Address: +S_STATUS5 Global IPv&6 Address: +S_5 Modify the Settings: +S_STATUS6 &Change the Dynamic DNS Hostname: +S_STATUS7 Hostname is with only alphabets numeric, and dashes '-'. Three letters at least.\r\nYou can change it any time later. +IDOK Set to &Above Hostname +B_RESTORE &Restore +S_2 If you are not connected to IPv6 Internet, "Global IPv6 Address" should show an error.\r\nA few countries or territories might prohibit Dynamic DNS Service. +IDCANCEL E&xit +B_DISABLE &Disable Dynamic DNS Function +B_PROXY Connect via &Proxy Server... +S_STATUS8 DNS Key: +B_HINT2 Hint + +PREFIX D_SM_SPECIALLISTENER +CAPTION VPN over ICMP / DNS Function Settings +S_TITLE VPN over ICMP / DNS Function +S_1 VPN over ICMP / DNS Function +S_2 You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You need to enable the following functions beforehand. +R_OVER_ICMP Enable VPN over &ICMP Server Function +R_OVER_DNS Enable VPN over &DNS Server Function (Uses UDP Port 53) +IDOK &OK +IDCANCEL Cancel +S_3 Requires VPN Client / VPN Bridge internal version 4.0 or greater. +S_4 Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. + + +PREFIX D_SM_REDIRECT +CAPTION HTTP URL Redirection Settings +S_1 The specified URL below will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub.\r\n\r\nTo use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. +S_2 Specify a URL which redirects to. +S_BOLD2 The &URL Redirect To: +S_3 Example: +S_4 Simple URL Redirection: +S_5 Advanced URL Redirection: +B_HINT &Usage of Advanced URL Redirection Function... +S_6 Caption +S_BOLD This function is for TCP/IP expert administrator. Read the following instructions and be careful to set up. +S_7 This redirection rule is not effective in the case that the destination session of a packet matches the destination username or groupname of an access list entries. +S_8 This redirection rule is ignored for non-TCP packets if it matches the condition. +S_9 This redirection rule always replies HTTP redirect messages. (Not limited for port 80.) If you want to apply to only port 80, set the destination port to 80 on the condition of the access list entry. +S_10 If as the result of redirection by this rule the client attempts to access the redirected URL and such a new request matches this rule again, the redirection results will be replied for such new requests. It will cause an infinite redirection loop. +IDOK &OK +IDCANCEL Cancel +S_11 The advanced redirection function can provide the VPN Session information to the CGI which is redirected to. + + +PREFIX D_SW_WELCOME +CAPTION D_SW_WELCOME +S_WELCOME SoftEther VPN is freeware developed at University of Tsukuba, Japan. High-performance VPN with the ultimate compatibilities to many devices. Windows, Mac, smartphones, tablets (iPhone, iPad, Android, Windows RT) and Cisco or other VPN routers are supported. SoftEther VPN also accepts OpenVPN and MS-SSTP VPN clients. +S_TITLE Extremely Powerful Open-Source VPN Software. + +PREFIX D_SW_MODE +CAPTION D_SW_MODE +R_SYSTEM &System Mode (Recommended) +R_USER &User Mode +S_1 Install the VPN software to this computer normally. The administrator privilege is required. +S_USER Install the VPN software with the normal user privilege. No administrator privilege is required. Some functions such as Local Bridge will be disabled. Runs only the user "%s" is logged on Windows. +S_2 SoftEther VPN can be installed by one of two methods.\r\n\r\nPlease select the System Mode normally.\r\n\r\nIf you cannot use the administrator privilege for some reasons, you can select the User Mode to continue the installation. + + +PREFIX D_SW_NOT_ADMIN +CAPTION D_SW_NOT_ADMIN +S_INFO The user "%s" which is logged on Windows does not have the administrator privilege.\r\n\r\nLog off Windows, log on by the user who has the administrator privilege and restart the Setup Wizard if you want to continue the setup. +S_INFO6 Click Finish to exit the Setup Wizard. +S_INFO2 If you cannot use the administrator privilege, you can choose the User Mode installation.\r\nTo install the software in the User Mode, click Back. + + +PREFIX D_SW_COMPONENTS +CAPTION D_SW_COMPONENTS + + +PREFIX D_SW_EULA +CAPTION D_SW_EULA +S_1 Please read the End User License Agreement carefully. +B_AGREE I agree to the End User License Agreement. + + +PREFIX D_SW_WARNING +CAPTION D_SW_WARNING +S_1 SoftEther VPN software has extremely powerful communication abilities. Before use please read the Important Notices carefully. + + +PREFIX D_SW_DIR +CAPTION D_SW_DIR +S_INFO Please specify the directory to install %s. +R_CUSTOM &Specify the Directory +S_DEST &Directory: +B_BROWSE &Browse... +R_SHOWCUSTOM &Advanced Install Options for Experts +R_FOR_SYSTEM Install on &Windows of this Computer Entirely +R_FOR_USER Install only on the Environment of User "%s" +S_WARNING Caution: Not recommended. After the user "%s" logs off Windows, %s will stop. Local Bridge function and L2TP/IPsec Function (supports for Mac and Smartphones) will be unavailabe. + + +PREFIX D_SW_READY +CAPTION D_SW_READY +S_INFO Install of %s is ready. +S_INFO7 Click Next to perform the install. + + +PREFIX D_SW_PERFORM +CAPTION D_SW_PERFORM +S_INFO The setup of %s is in progress.\r\nPlease wait... +S_INFO8 SoftEther VPN is a work of the research and development project of Japanese Government, subsidized by Ministry of Economy, Trade and Industry of Japan, administrated by Information Promotion Agency. + + +PREFIX D_SW_ERROR +CAPTION D_SW_ERROR +S_INFO An error occurred and the setup of %s is aborted.\r\n\r\nRestart the Setup Wizard if you want to retry. + + +PREFIX D_SW_FINISH +CAPTION D_SW_FINISH +S_INFO The setup process of %s has completed successfully. +S_INFO8 SoftEther VPN is a work of the research and development project of Japanese Government, subsidized by Ministry of Economy, Trade and Industry of Japan, administrated by Information Promotion Agency. + + +PREFIX D_SW_UNINST1 +CAPTION D_SW_UNINST1 +S_WELCOME The Setup Wizard can uninstall %s from the computer.\r\n\r\nClick Next if you want to start uninstall. +S_TITLE %s Uninstall Wizard + + +PREFIX D_SW_EASY1 +CAPTION D_SW_EASY1 +S_WELCOME Installing and setting up the VPN Clients to a lot of computers in the enterprise is a hard work. +S_TITLE What is SoftEther VPN Client Easy Installer? +S_WELCOME2 Easy Installer Creator is a tool for enterprise administrators. You can create a VPN Client installer with embedding a specific VPN connection setting by using Easy Installer Creator. Personal users can also exploit this tool. +S_WELCOME3 A created Easy Installer can be distributed to employees in the enterprise by using file servers or e-mails. If a user runs the Easy Installer, VPN Client will be installed and the VPN connection setting will be imported, and then the VPN connection will be started automatically. + + +PREFIX D_SW_EASY2 +CAPTION D_SW_EASY2 +S_BOLD1 Specify a VPN connection setting file (.vpn file) to embed +S_1 Please specify a VPN connection setting file (a file which extension is .vpn) to embed on the Easy Installer. You can export a setting file by clicking Export VPN Connection Setting on the right-click menu of the target connection setting on the VPN Client Manager. +S_18 Connection &Setting: +B_BROWSE_SETTING &Browse... +B_DELETE_SENSITIVE &Eliminate Username and Password from Connection Setting File +S_BOLD2 Specify an EXE filename to be generated +S_3 This tool will output an EXE file (executable file) which implements an Easy Installer. Please specify the output filename to be generated. +S_19 Save &as: +B_BROWSE_OUT B&rowse... +B_EASYMODE Set the VPN Client Manager to &Easy Mode when Installation + + +PREFIX D_SW_WEB1 +CAPTION D_SW_WEB1 +S_WELCOME You can create a SoftEther VPN Client Web Installer and upload it on the Web server in the enterprise. A user opens that web page and can install the SoftEther VPN Client automatically. You can also setup the automatic import and kick-start of a built-in VPN connection setting. +S_TITLE What is SoftEther VPN Web Installer? +S_WELCOME2 The generated Web Installer can be placed as HTML files on the intranet Web server. If an employee accesses to the URL of that HTML files, the SoftEther VPN Client Installer will be executed. +S_WELCOME3 Using ActiveX Control. Internet Explorer 5.0, greater on Windows 2000 or greater are supported. Other web browsers or older operating systems (for example Windows 98) are not supported. + + +PREFIX D_SW_WEB2 +CAPTION D_SW_WEB2 +S_BOLD1 Specify a VPN connection setting file (.vpn file) to embed +S_1 Please specify a VPN connection setting file (a file which extension is .vpn) to embed on the Web Installer. You can export a setting file by clicking Export VPN Connection Setting on the right-click menu of the target connection setting on the VPN Client Manager. +S_18 Connection &Setting: +B_BROWSE_SETTING &Browse... +B_DELETE_SENSITIVE &Eliminate Username and Password from Connection Setting File +S_BOLD2 Specify the output filename to be generated +S_3 This tool will output a ZIP file (archive file) which contains HTML files and CAB files that should be placed on the Web server. Please specify the output filename to be generated. +S_19 Save &as: +B_BROWSE_OUT B&rowse... +B_EASYMODE Set the VPN Client Manager to &Easy Mode when Installation + + +PREFIX D_UPDATE_NOTICE +CAPTION Updates of %s +IDOK &Show the Update Information... +B_CONFIG &Configure Update... +IDCANCEL &Do Not Show this Message Again +S_INFO The latest version of %s is released. You can download it and update now. +S_PRODUCT Software: +S_CURRENT Current Version: +S_CURRENT_STR Ver %u.%02u.%04u%s +S_LATEST Latest Version: +S_LATEST_STR Ver %S%s + + +PREFIX D_UPDATE_CONFIG +CAPTION Configuration of Update Notification +S_INFO Checks the new versions of %s periodically and popup a notification when a new version will be released.\r\n\r\nHTTPS packets will be used between this computer and the SoftEther Update server located in Tsukuba-city, Ibaraki-prefecture, Japan in order to check updates. No personal information will be sent. +S_TITLE %s Update and Notify Settings +S_ENABLE &Enable Update Checks +S_DISABLE &Disable Update Checks +IDCANCEL &Close + + +PREFIX D_SM_VMBRIDGE +CAPTION Instructions for Local Bridge on VM +S_TITLE Using Local Bridge Function on VM +S_1 It has been detected that the VPN Server might be running on a VM (Virtual Machine) suchlike VMware or Hyper-V. Read the following instructions carefully. If you are not using a VM, please ignore this message. +S_2 Some VMs prohibit the "Promiscuous Mode" (MAC Address Spoofing) on the network adapters by default.\r\n\r\nIf the Promiscuous Mode (MAC Address Spoofing) is administratively disabled, the Local Bridge function between a Virtual Hub on the VPN Server and a physical network adapter on the physical computer does not work well. You should allow the Promiscuous Mode (MAC Address Spoofing) by using the configuration tool of the VM.\r\n\r\nFor details please refer the documents of your VM. If it is a shared-VM and administrated by other person, please request the administrator to permit the use of the Promiscuous (MAC Address Spoofing) Mode to your VM. +S_BOLD Instructions +IDCANCEL &OK + + +PREFIX D_SM_AZURE +CAPTION VPN Azure Service Settings +S_TITLE VPN Azure Cloud VPN Service (Free) +S_1 VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. +S_2 You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. +S_3 VPN Azure is a cloud VPN service operated by SoftEther VPN Project. VPN Azure is free of charge and available to anyone. Press the right button to see details and how-to-use instructions. +B_BOLD VPN Azure Setting +R_ENABLE &Enable VPN Azure +R_DISABLE &Disable VPN Azure +S_HOSTNAME_BORDER Current VPN Azure Hostname +S_HOSTNAME_INFO The VPN Azure hostname is same to the Dynamic DNS hostname, but altering the domain suffix to "vpnazure.net". +B_CHANGE Change &Hostname +B_WEB How to Use VPN Azure\r\n(Visit the Web) +IDCANCEL &OK + + +PREFIX D_SM_PROXY +CAPTION Connect via Proxy Server +STATIC9 You can connect via a proxy server. +STATIC10 Proxy &Type: +R_DIRECT_TCP &Direct TCP/IP Connection (No Proxy) +R_HTTPS Connect via H&TTP Proxy Server +R_SOCKS Connect via S&OCKS4 Proxy Server +R_SOCKS5 Connect via S&OCKS5 Proxy Server +B_PROXY_CONFIG P&roxy Server Setting +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_VGC_LIST +CAPTION VPN Gate Academic Experimental Project Plugin for SoftEther VPN Client +S_TITLE VPN Gate Public VPN Relay Servers +S_INFO1 Gain freedom access to Internet by using VPN connection via Public VPN Servers provided by volunteers abound the world. Bypass your local malfunctioning firewall's packet blocking, and hide your IP address safely. +IDOK &Connect to the VPN Server +B_PROXY &Proxy Settings +S_VLAN Virtual Network Adapter: +B_WEB VPN Gate Academic\r\nWeb Site +B_REFRESH &Refresh List +S_REFRESH Refreshing the List... +S_RESEARCH Academic project at University of Tsukuba, Japan. +S_INFO9 A VPN Server with higher Line Speed (measured by Mbps) and smaller Ping result are usually more comfortable to use. You might be able to browse websites which are normally unreachable from your area if you use VPN servers that are not in your area. + + +PREFIX D_VGC_PROTOCOL +CAPTION Select VPN Protocol to Connect +S_TITLE The Public VPN Relay Server "%S" (%S) supports both TCP and UDP as VPN protocol. +S_INFO Select preferred VPN Protocol to use in order to connect the VPN Server "%S" (%S). In general, the TCP protocol is easy to pass through the firewall. Try the UDP protocol only if the TCP has been failed. +R_TCP Use &TCP Protocol (Ethernet over HTTPS VPN) (Recommended) +R_UDP Use &UDP Protocol (Ethernet over UDP VPN) +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_VGS_CONFIG +CAPTION VPN Gate Service Control Panel +R_ENABLE &Enable the VPN Gate Relay Service and Join the VPN Gate Research as a Volunteer. +S_TITLE Join the VPN Gate Academic Research Project? +S_INFO1 VPN Gate is an academic experiment for the research on the 'Distributed Public VPN Relay Server' technology, operated at the Graduate School on University of Tsukuba, Japan. VPN Gate Client users can connect to VPN Gate Services running on Public VPN Relay Servers, and enjoy unrestricted Internet access via the VPN Relay Server. +S_INFO9 When a VPN Gate Client user accesses to a server on Internet, the source IP address will be replaced to the IP address of the relaying Public VPN Server. Consequently, the VPN Gate Client user will be able to browse overseas web sites smoothly even if the user's local firewall is out of order by an unknown reason and unable to pass such an access. +S_WARNING If you check the above checkbox and press OK, the VPN Gate Relay Service will be activated on this computer. As the result, any VPN Gate Client will be able to communicate towards the Internet via the VPN Gate Relay Service. It is secure even if your computer is on the private network (e.g. corporate network) because any accesses to private IP addresses will not be permitted to pass via the VPN Gate Relay Service. +B_OPTION VPN Gate Service &Option Settings... +IDOK &OK +IDCANCEL Cancel +B_WEB &Browse http://www.vpngate.net/ ... + + +PREFIX D_VGS_OPTION +CAPTION VPN Gate Service Options +S_TITLE VPN Gate Service Options +S_1 This computer will be a Public VPN Server. Please fill the operator's information of the server. The information will be published on the list at www.vpngate.net and other related services. The contact address will be also used to contact from VPN Gate Academic Project operators. +S_2 Operator: +S_3 &Operator of Server: +S_19 (Up to 64 letters) +S_20 &Abuse Report Address\r\n(e-mail addresses etc.): +S_21 (Up to 64 letters) +S_22 The &Message to Users:\r\n(Up to 128 letters) +S_23 The message will be shown on the list of VPN Gate Servers. Enter an enjoyable message to let users feel pleasure. +S_24 VPN Settings: +R_LOG &Save VPN Packet Logs (Recommended) +R_2WEEKS Auto Delete or Archive with Encoding for Packet Logs After &Two Weeks (Recommended) +R_PERMANENT Make Packet Logs Occupy Free Disk Space &Permanently +R_L2TP Enable &L2TP/IPsec VPN Server Function (Recommended) +S_25 Allows Mac OS X, iPhone, iPad and Android clients to make a VPN connection. +B_MESSAGE Pop-up Your Advertisement Message on the VPN Client &Screen ... +IDOK &OK +IDCANCEL Cancel + + +PREFIX D_VGS_WARNING +CAPTION Caution before Joining VPN Gate Academic Experiment +S1 The VPN Gate Academic Experiment Service is operated as a research project at the graduate school on University of Tsukuba, Japan. The service is governed under the Japanese laws. Other countries' laws are none of our concerns nor responsibilities. +S2 By nature, there are almost 200 countries in the World, with different laws. It is impossible to verify every countries' laws and regulations and make the software comply with all countries' laws in advance to release the software. If a user uses VPN Gate service in a specific country, and damaged by public servants of the authority, the developer of either the service or software will never be liable to recover or compensate such damages or criminal responsibilities. +S3 By using this software and service, the user must observe all concerned laws and rules with user's own responsibility. The user will be completely liable to any damages and responsibilities which are results of using this software and service, regardless of either inside or outside of Japan's territory. +S4 If you don't agree nor understand the above warnings, do not use any of VPN Gate Academic Experiment Service functions. +S5 Note: VPN Gate is a research project for just academic purpose only. VPN Gate was developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN Gate were developed on this research project at University of Tsukuba. Any parts of VPN Gate are not developed by SoftEther VPN Project. The VPN Gate Research Project is not a subject to be led, operated, promoted nor guaranteed by SoftEther VPN Project. +R_NEVER Do Not &Show This Message Again +B_WEB Visit VPN Gate &Web Site... +IDOK &Agree +IDCANCEL &Disagree +S_BOLD Caution! Do Not Use the VPN Gate Services in Countries where VPN Communications are Prohibited. + + +PREFIX D_NM_PUSH +CAPTION Edit the static routing table to push +S1 This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. +S2 Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. +S3 You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. +S4 You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this screen. +S5 Edit the static routing table to push +S6 Example: 192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253\r\n\r\nSplit multiple entries (maximum: 64 entries) by comma or space characters.\r\nEach entry must be specified in the "IP network address/subnet mask/gateway IP address" format. +S7 See the RFC 3442 to understand the classless routes. +IDOK &OK +IDCANCEL Cancel + + + +########################################################################### +# # +#String data of menus in software # +# # +########################################################################### + + +# Connection Manager menu +PREFIX CM_MENU +# [Connect] menu +CMD_TOP_CONNECT &Connect +CMD_CONNECT C&onnect\tEnter +CMD_STATUS View &Status...\tCtrl+S +CMD_DISCONNECT D&isconnect\tCtrl+D +CMD_DISCONNECT_ALL Disconnect &All\tCtrl+I +CMD_NEW &New VPN Connection Setting...\tCtrl+N +CMD_CLONE &Copy\tCtrl+C +CMD_SHORTCUT Create VPN Connection S&hortcut... +CMD_EXPORT_ACCOUNT E&xport VPN Connection Setting... +CMD_IMPORT_ACCOUNT Im&port VPN Connection Setting... +CMD_STARTUP Se&t as Startup Connection\tCtrl+T +CMD_NOSTARTUP R&emove Startup Connection +CMD_RECENT Recent &VPN Servers +CMD_RENAME Rena&me\tF2 +CMD_DELETE &Delete\tDel +CMD_PROPERTY P&roperties...\tAlt+Enter +CMD_EXIT Cl&ose Connection Manager\tAlt+F4 +CMD_QUIT E&xit Connection Manager Program\tAlt+Q +# [Edit] menu +CMD_TOP_EDIT &Edit +CMD_SELECT_ALL Select &All\tCtrl+A +CMD_SWITCH_SELECT Sw&itch Selection +# [View] menu +CMD_TOP_VIEW &View +CMD_STATUSBAR Show &Status Bar +CMD_VISTASTYLE Windows Vista / 7 / 8 / 10 Styles +CMD_SHOWPORT Show &Ports on Connection List +CMD_TRAYICON Show Icons on &Task Tray +CMD_ICON &Icon +CMD_DETAIL &Detail +CMD_GRID Display &Grid +CMD_REFRESH &Refresh\tF5 +# [VLAN] menu +CMD_TOP_VLAN Virtua&l Adapter +CMD_NEW_VLAN &New Virtual Network Adapter...\tCtrl+L +CMD_ENABLE_VLAN &Enable Virtual Network Adapter\tCtrl+E +CMD_DISABLE_VLAN Dis&able Virtual Network Adapter\tCtrl+B +CMD_DELETE_VLAN &Delete Virtual Network Adapter\tDel +CMD_REINSTALL &Reinstall Driver...\tCtrl+U +CMD_WINNET Open Windows Network Connections...\tCtrl+W +# [Connect] menu +CMD_TOP_SECURE &Smart Card +CMD_SECURE_MANAGER Smart Card &Manager...\tCtrl+G +CMD_SECURE_SELECT &Select a Smart Card to Use... +# [Tools] menu +CMD_TOP_TOOL &Tools +CMD_PASSWORD Set &Password...\tCtrl+P +CMD_TRUST Manage &Trusted CA Certificate List\tCtrl+R +CMD_NETIF &Network Device Status... +CMD_TCPIP TCP Optimization &Utility... +CMD_MMCSS Optimization for Windows &Vista / 7 / 8 / 10... +CMD_TRAFFIC Network T&raffic Speed Test Tool...\tCtrl+Q +CMD_CM_SETTING Switch Operation &Mode... +CMD_LANGUAGE &Language Settings... +CMD_OPTION &Options...\tCtrl+O +# [Voice] menu +CMD_TOP_VOICE V&oice +CMD_VOIDE_NONE Voice Gui&de Off +CMD_VOICE_NORMAL &Normal Voice Guide +CMD_VOICE_ODD Extended V&oice Guide +# [Help] menu +CMD_TOP_HELP &Help +CMD_ABOUT &About... + + + + + + + + + + + + + + + + + +########################################################################### +# # +# Command prompt string data # +# # +########################################################################### + +PREFIX NULL + +# Console system general +CON_INFILE_ERROR Error: Unable to open the specified input file "%s". +CON_OUTFILE_ERROR Error: Unable to create the specified output file "%s". +CON_INFILE_START The commands written in the file "%s" will be used instead of input from keyboard. +CON_OUTFILE_START The message output to the console will be saved in the file "%s". +CON_USER_CANCEL [EOF] +CON_UNKNOWN_CMD "%S": Command not found. \nYou can use the HELP command to view a list of the available commands. +CON_AMBIGUOUS_CMD "%S": The command-name is ambiguous. +CON_AMBIGUOUS_CMD_1 The specified command name matches the following multiple commands. +CON_AMBIGUOUS_CMD_2 Please re-specify the command name more strictly. +CON_INVALID_PARAM The parameter "/%S" has been specified. It is not possible to specify this parameter when using the command "%S". Input "%S /HELP" to see the list of what parameters can be used. +CON_AMBIGUOUS_PARAM "%S": The parameter name is ambiguous. +CON_AMBIGUOUS_PARAM_1 The specified parameter name matches with the following parameters that can be specified as a parameter of command "%S". +CON_AMBIGUOUS_PARAM_2 Please re-specify the parameter name more strictly. + + +# Unknown command +CMD_UNKNOWM There is no description for this command. +CMD_UNKNOWN_HELP There is no detailed description for this command. If you would like to know more detail about this command, please refer to the manual or online documentation. +CMD_UNKNOWN_ARGS There is no command execution example. +CMD_UNKNOWN_PARAM There is no description for this parameter. + + +# Strings being used within console system +CMD_HELP_1 You can use the following %u commands: +CMD_HELP_2 To reference the usage for each command, input "command name ?" to view a help. +CMD_EVAL_MIN_MAX You must specify an integer in the range from %u to %u for the value. +CMD_PROMPT Enter a value: +CMD_EVAL_NOT_EMPTY You cannot make a blank specification. +CMD_EVAL_SAFE The string contains unusable characters. +CMD_EVAL_INT You must specify an integer that is not less than 1. +CMD_HELP_TITLE Help for command "%S" +CMD_HELP_DESCRIPTION Purpose: +CMD_HELP_USAGE Usage: +CMD_HELP_HELP Description: +CMD_HELP_ARGS Parameters: +CMD_PROMPT_PORT Input the port number: +CMD_EVAL_PORT Port number is invalid. Specify a port number that is within the range of 1 to 65535. +CMD_CT_STD_COLUMN_1 Item +CMD_CT_STD_COLUMN_2 Value +CMD_CT_STD_COLUMN_3 Description +CMD_PARSE_IP_SUBNET_ERROR_1_6 Specify in the format of "IPv6 address/subnet mask". \nSpecify the IPv6 address by separating the hexadecimal values using colons such as "2001:200:0:1::". For the subnet mask, either specify hexadecimal values separated by colons such as "ffff:ffff:ffff:ffff::", or you can specify the bit length of subnet mask using a decimal value such as 64. \nTo specify a standalone host, specify the subnet mask as either "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" or "128". \n(Example)\n2001:200:0:1::/64\n2001:200:0:1::/ffff:ffff:ffff:ffff::\n2001:200:0:1::5/12\n\n +CMD_PARSE_IP_SUBNET_ERROR_1 Specify in the format of "IPv4 address/subnet mask". \nSpecify the IPv4 address by separating the decimal values using dots such as "192.168.0.1". For the subnet mask, either specify decimal values separated by dots such as "255.255.255.0", or you can specify the bit length of subnet mask using a decimal value such as 24. \nTo specify a standalone host, specify the subnet mask as either "255.255.255.255" or "32". \n(Example)\n 192.168.0.1/24\n 192.168.0.1/255.255.255.0\n192.168.0.5/255.255.255.255\n\n +CMD_PARSE_IP_SUBNET_ERROR_2 The specified IP address is not a network address. +CMD_PARSE_IP_SUBNET_ERROR_3 The specified IP address is not a network prefix address. +CMD_EVAL_DATE_TIME_FAILED The date and time specification is invalid. \nThe date and time must be in the same format as "2005/10/08 19:30:00" where 6 integers are specified, representing year/month/day hour:minute:second separated by forward slashes, a space and then colons. Specify 4 digits for the year. +CMD_PARSE_IP_MASK_ERROR_1_6 Specify in the format of "IPv6 address/mask". \nSpecify the IPv6 address by separating the hexadecimal values using colons such as "2001:200:0:1::". For the mask, either specify hexadecimal values separated by colons such as "ffff:ffff:ffff:ffff::", or you can specify the bit length of mask using a decimal value such as 64. \nTo specify a standalone host, specify the mask as either "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" or "128". \n(Example)\n2001:200:0:1::/64\n2001:200:0:1::/ffff:ffff:ffff:ffff::\n2001:200:0:1::5/12\n\n +CMD_PARSE_IP_MASK_ERROR_1 Specify in the format of "IPv4 address/mask". \nSpecify the IPv4 address by separating the decimal values using dots such as "192.168.0.1". For the mask, either specify decimal values separated by dots such as "255.255.255.0", or you can specify the bit length of mask using a decimal value such as 24. \nTo specify a standalone host, specify the mask as either "255.255.255.255" or "32". \n(Example)\n 192.168.0.1/24\n 192.168.0.1/255.255.255.0\n192.168.0.5/255.255.255.255\n\n + + + +# Common messages +CMD_MSG_INVALID_HOSTNAME Specified host name is invalid. +CMD_MSG_OK The command completed successfully. +CMD_MSG_ALLOW Allow +CMD_MSG_DENY Deny +CMD_MSG_INFINITE Infinite +CMD_MSG_ENABLE Enable +CMD_MSG_DISABLE Disable +CMD_MSG_LOAD_CERT_FAILED Unable to read the specified X.509 certificate file. +CMD_MSG_SAVE_CERT_FAILED Failed to write the X.509 certificate file. +CMD_ACCOUNT_COLUMN_NAME VPN Connection Setting Name +CMD_ACCOUNT_COLUMN_HOSTNAME Destination VPN Server Host Name +CMD_ACCOUNT_COLUMN_PORT Destination VPN Server Port Number +CMD_ACCOUNT_COLUMN_HUBNAME Destination VPN Server Virtual Hub Name +CMD_ACCOUNT_COLUMN_PROXY_TYPE Proxy Server Type +CMD_ACCOUNT_COLUMN_PROXY_HOSTNAME Proxy Server Host Name +CMD_ACCOUNT_COLUMN_PROXY_PORT Proxy Server Port Number +CMD_ACCOUNT_COLUMN_PROXY_USERNAME Proxy Server User Name +CMD_ACCOUNT_COLUMN_SERVER_CERT_USE Verify Server Certificate +CMD_ACCOUNT_COLUMN_SERVER_CERT_NAME Registered Server Individual Certificate +CMD_ACCOUNT_COLUMN_RETRY_ON_SERVER_CERT Retry on Untrusted Server Certificate +CMD_ACCOUNT_COLUMN_DEVICE_NAME Device Name Used for Connection +CMD_ACCOUNT_COLUMN_AUTH_TYPE Authentication Type +CMD_ACCOUNT_COLUMN_AUTH_USERNAME User Name +CMD_ACCOUNT_COLUMN_AUTH_CERT_NAME Client Certificate for Authentication Use +CMD_ACCOUNT_COLUMN_NUMTCP Number of TCP Connections to Use in VPN Communication +CMD_ACCOUNT_COLUMN_TCP_INTERVAL Interval between Establishing Each TCP Connection +CMD_ACCOUNT_COLUMN_TCP_TTL Connection Life of Each TCP Connection +CMD_ACCOUNT_COLUMN_TCP_HALF Use Half Duplex Mode +CMD_ACCOUNT_COLUMN_ENCRYPT Encryption by SSL +CMD_ACCOUNT_COLUMN_COMPRESS Data Compression +CMD_ACCOUNT_COLUMN_BRIDGE_ROUTER Connect by Bridge / Router Mode +CMD_ACCOUNT_COLUMN_MONITOR Connect by Monitoring Mode +CMD_ACCOUNT_COLUMN_NO_TRACKING No Adjustment for Routing Table +CMD_ACCOUNT_COLUMN_QOS_DISABLE Do not Use QoS Control Function +CMD_ACCOUNT_COLUMN_DISABLEUDP Disable UDP Acceleration + + +# Debugging Information Collecting Tool +CMD_DEBUG_SOFTNAME Debugging Information Collecting Tool +CMD_DEBUG_PRINT Debugging Information Collecting Tool\r\n\r\n +CMD_DEBUG_NOT_2000 Windows 2000 or later is required. +CMD_DEBUG_NOT_ADMIN You must login as Administrators on Windows to execute this command. +CMD_DEBUG_UAC_FAILED Failed to obtain the Administrators privilege. +CMD_DEBUG_SAVE_TITLE Specify Destination Path to Save File +CMD_DEBUG_OK A debugging information file was saved as "%s".\r\n\r\nSend this file to your support staff.\r\nYou must verify the contents of this file before sending it to the support staff.\r\nRemove confidential information on this file with your responsibility and by yourself if there are some confidential information which you don't want to disclose it to the staff.\r\n\r\nIf you ignore the confidential information contained on the file, and you agree to send the entire file to the support staff, it means that you have agreed to disclose the entire contents of the file to the support staff. +CMD_DEBUG_NG Failed to save the debugging information as "%s". + + + +# TEST command +CMD_TEST Executing test operation. +CMD_TEST_HELP This is a test command. Executing test operation. With the test command, you can specify a number of arguments. You can omit the number of arguments. +CMD_TEST_ARGS Test [/A1:a_str] [/A2:b_str] [/A3:int_value] +CMD_TEST_A1 Specifies parameter A1. This can be omitted. +CMD_TEST_A2 Specifies parameter A2. If this is omitted, a prompt will be displayed to input parameter A2 when the command is executed. You cannot make a blank specification. +CMD_TEST_A3 Specify a numeric value. You must specify an integer that is within the range of 1 to 100. Specifying an integer outside that range will cause an error message to be displayed. +CMD_TEST_EVAL_A2 You cannot make a blank specification for parameter A2. +CMD_IP_EVAL_FAILED The IP address is incorrectly specified. +CMD_HOSTPORT_EVAL_FAILED The host name and port number specification is invalid. \nPlease specify using the format of host name:port number, or IP address:port number. +CMD_PORTLIST_EVAL_FAILED The port number list specification is invalid. \nThe list must have at least one port number set, and it is also possible to set multiple port numbers. When specifying multiple port numbers, separate them using a comma such as "443,992,8888". +CMD_PROTOCOL_EVAL_FAILED The protocol is incorrectly specified. Specify either ip, tcp, udp, icmpv4, icmpv6 or a protocol number (0 to 255) for the protocol. +CMD_PORT_RANGE_EVAL_FAILED The port number or the port number range was incorrectly specified. If specifying only one port number, an integer must be used to specify that port number. If specifying multiple ports, specify the beginning port number and the end port number joined together by a hyphen like "80-443". +CMD_TCP_CONNECTION_STATE_EVAL_FAILED The TCP connection state specification is invalid. Specify either "Established" or "Unestablished" and specify TCP when selecting protocol. +CMD_MAC_ADDRESS_AND_MASK_EVAL_FAILED The MAC address and mask specification is invalid. Use hexadecimal number with the separators, "-" or ":", and without the separators. An example is "00-AC-84-EA-33-BC/FF-FF-FF-FF-FF-FF". +CMD_EXEC_MSG_NAME %S command - %s +CMD_ID ID +CMD_FILE_NOT_FOUND Cannot find specified file "%s". +CMD_FILE_NAME_EMPTY The file name is not specified. +CMD_SAVECERTPATH Save X.509 certificate to file name: +CMD_SAVECERT_FAILED Failed to save the certificate file. +CMD_SAVEKEYPATH Save private key to file name: +CMD_SAVEKEY_FAILED Failed to save the private key file. +CMD_SAVEFILE_FAILED Failed to save the file. +CMD_LOADFILE_FAILED Failed to open the file. +CMD_LOADCERTPATH Read X.509 certificate from file name: +CMD_LOADCERT_FAILED Failed to read certificate file. +CMD_LOADKEYPATH Read private key from file name: +CMD_LOADKEY_FAILED Failed to read private key file. +CMD_LOADKEY_ENCRYPTED_1 The specified private key file is protected by a passphrase. +CMD_LOADKEY_ENCRYPTED_2 Please enter the passphrase: +CMD_LOADKEY_ENCRYPTED_3 The passphrase is incorrect. +CMD_KEYPAIR_FAILED The X.509 certificate and private key combination has been incorrectly specified. \r\nA certificate and a private key that corresponds to that certificate is required. +CMD_CERT_NOT_EXISTS The certificate is not registered. +CMD_NO_SETTINGS - +CMD_DISCONNECTED_MSG \n--- Error ---\n\nThe communication session with the host you were managing has been disconnected. From now on, if you run any commands an error will occur. \n\nTo reconnect to the host you were managing, first leave the prompt by inputting "EXIT" and then reconnect. \n\n + + +# VPNCMD コマンド +CMD_VPNCMD SoftEther VPN Command Line Management Utility Developer Edition +CMD_VPNCMD_HELP The 'vpncmd' program is a utility that allows you to manage SoftEther VPN software by using command lines. By using vpncmd, you can connect to a VPN Client, a VPN Server or VPN Bridge that is running on a local or remote computer and manage these services. Moreover, by using VPN Tools mode, you can call the Network Traffic Speed Test Tool and the certificate creation function. These can be used even when not connected to the VPN Server or VPN Client. \nWhen using vpncmd, if the file name is specified by using the /IN and /OUT parameter, the command can be executed in a batch according to a file in which the executable commands are enumerated and the execution results can be written to a file. Normally a command prompt will appear after vpncmd is launched but when an input file is specified by the /IN parameter, the program will automatically terminate after the execution of all lines in the input file is complete. Also, when a command to execute is specified by the /CMD parameter, the program will automatically terminate after the execution of that command is complete. You cannot specify the /IN parameter and the /CMD parameter at the same time. The termination code of the vpncmd program will be the error code of the last executed command (0 in the case of successful execution). \nUnder a Windows environment, when vpncmd is launched once or more by a user with administrator privileges, it is possible to simply input 'vpncmd' to a Windows command prompt or [Run...] window to launch vpncmd. To achieve the same result under a UNIX system, you can manually set, as appropriate, the PATH environment variable. +CMD_VPNCMD_ARGS vpncmd [host:port] [/CLIENT|/SERVER|/TOOLS] [/HUB:hub] [/ADMINHUB:adminhub] [/PASSWORD:password] [/IN:infile] [/OUT:outfile] [/CMD commands...] +CMD_VPNCMD_[host:port] By specifying parameters in the format "host name:port number", a connection will automatically be made to that host. If this is not specified, a prompt will appear to input the connection destination. When connecting to a VPN Client, you cannot specify a port number. +CMD_VPNCMD_CLIENT This will connect to VPN Client to do management. You cannot specify it together with /SERVER. +CMD_VPNCMD_SERVER This will connect to VPN Server or VPN Bridge to do management. You cannot specify it together with /CLIENT. +CMD_VPNCMD_TOOLS This will enables use of VPN Tools commands. VPN Tools include the simple certificate creation tool (MakeCert command) and the Network Traffic Speed Test Tool (SpeedTest command). +CMD_VPNCMD_HUB When connecting to the VPN Server by "Virtual Hub Admin Mode", this specifies the Virtual Hub name 'hub'. If you specify the host name but not the /HUB parameter, connection will be by "Server Admin Mode". +CMD_VPNCMD_ADMINHUB This will specify the name of the Virtual Hub 'adminhub' that is automatically selected after connecting to the VPN Server. If the /HUB parameter was specified, the Virtual Hub will be selected automatically and this specification will not be necessary. +CMD_VPNCMD_PASSWORD If the administrator password is required when connecting, specify the password 'password'. When the password is not specified, a prompt to input the password will be displayed. +CMD_VPNCMD_IN This will specify the text file 'infile' that contains the list of commands that are automatically executed after the connection is completed. If the /IN parameter is specified, the vpncmd program will terminate automatically after the execution of all commands in the file are finished. If the file contains multiple-byte characters, the encoding must be Unicode (UTF-8). This cannot be specified together with /CMD (if /CMD is specified, /IN will be ignored). +CMD_VPNCMD_OUT You can specify the text file 'outfile' to write all strings such as onscreen prompts, message, error and execution results. Note that if the specified file already exists, the contents of the existing file will be overwritten. Output strings will be recorded using Unicode (UTF-8) encoding. +CMD_VPNCMD_CMD If the optional command 'commands...' is included after /CMD, that command will be executed after the connection is complete and the vpncmd program will terminate after that. This cannot be specified together with /IN (if specified together with /IN, /IN will be ignored). Specify the /CMD parameter after all other vpncmd parameters. +CMD_VPNCMD_CSV You can specify this option to enable CSV outputs. Results of each command will be printed in the CSV format. It is useful for processing the results by other programs. +CMD_VPNCMD_CS_1 By using vpncmd program, the following can be achieved. \n\n1. Management of VPN Server or VPN Bridge \n2. Management of VPN Client\n3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)\n\n +CMD_VPNCMD_CS_2 Select 1, 2 or 3: +CMD_VPNCMD_HOST_1 Specify the host name or IP address of the computer that the destination VPN Server or VPN Bridge is operating on. \nBy specifying according to the format 'host name:port number', you can also specify the port number. \n(When the port number is unspecified, 443 is used.)\nIf nothing is input and the Enter key is pressed, the connection will be made to the port number 443 of localhost (this computer). +CMD_VPNCMD_HOST_2 Specify the host name or IP address of the computer that the destination VPN Client is operating on. \nIf nothing is input and Enter is pressed, connection will be made to localhost (this computer). +CMD_VPNCMD_HOST_3 Hostname of IP Address of Destination: +CMD_VPNCMD_HUB_1 If connecting to the server by Virtual Hub Admin Mode, please input the Virtual Hub name. \nIf connecting by server admin mode, please press Enter without inputting anything. +CMD_VPNCMD_HUB_2 Specify Virtual Hub Name: +CMD_VPNCMD_ABOUT SoftEther VPN Command Line Management Utility (vpncmd command)\nDeveloper Edition\n%S\n%S\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll rights reserved.\n +CMD_VPNCMD_PASSWORD_1 Access has been denied. Possibly the password is incorrect, or perhaps you are connecting by an incorrect admin mode. You can try inputting the password again. To cancel, press Ctrl+D. +CMD_VPNCMD_PASSWORD_2 Password: +CMD_VPNCMD_ERROR Error occurred. (Error code: %u)\n%s +CMD_VPNCMD_SERVER_CONNECTED Connection has been established with VPN Server "%S" (port %u). +CMD_VPNCMD_SERVER_CONNECTED_1 You have administrator privileges for the entire VPN Server. +CMD_VPNCMD_SERVER_CONNECTED_2 You have administrator privileges for Virtual Hub '%S' on the VPN Server. +CMD_VPNCMD_CLIENT_NO_REMODE The destination VPN Client server does not allow administrating connections from remote computers. Launch the command line management utility or VPN Client Manager on the computer that VPN Client is running on and connect to localhost. +CMD_VPNCMD_PWPROMPT_0 Please enter the password. To cancel press the Ctrl+D key. +CMD_VPNCMD_PWPROMPT_1 Password: +CMD_VPNCMD_PWPROMPT_2 Confirm input: +CMD_VPNCMD_PWPROMPT_3 The password and the password confirmation do not match. Please input the password and confirmation again. +CMD_VPNCMD_CLIENT_CONNECTED Connected to VPN Client "%S". +CMD_VPNCMD_TOOLS_CONNECTED VPN Tools has been launched. By inputting HELP, you can view a list of the commands that can be used. + + +####################################################### +# # +# Management commands for VPN Server are listed below # +# # +####################################################### + + + +# About command +CMD_About Display the version information +CMD_About_HELP This displays the version information of this command line management utility. Included in the version information are the vpncmd version number, build number and build information. +CMD_About_ARGS About + + +# ServerInfoGet command +CMD_ServerInfoGet Get server information +CMD_ServerInfoGet_Help This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on. +CMD_ServerInfoGet_Args ServerInfoGet + + +# ServerStatusGet command +CMD_ServerStatusGet Get Current Server Status +CMD_ServerStatusGet_Help This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS. +CMD_ServerStatusGet_Args ServerStatusGet + + +# ListenerCreate command +CMD_ListenerCreate Create New TCP Listener +CMD_ListenerCreate_Help This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. \nA TCP Listener that has been created can be deleted by the ListenerDelete command. \nYou can also get a list of TCP Listeners currently registered by using the ListenerList command. \nnTo execute this command, you must have VPN Server administrator privileges. +CMD_ListenerCreate_Args ListenerCreate [port] +CMD_ListenerCreate_[port] Using an integer, specify the newly added TCP/IP listener port number. You can also use a port number that is already being used by a different program; however the VPN Server will not be able to use it until that program ends the use of that port. Specify a port number that is within the range of 1 to 65535. +CMD_ListenerCreate_PortPrompt Port number of newly added TCP/IP Listener: + + +# ListenerDelete command +CMD_ListenerDelete Delete TCP Listener +CMD_ListenerDelete_Help This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. \nYou can also get a list of TCP Listeners currently registered by using the ListenerList command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ListenerDelete_Args ListenerDelete [port] +CMD_ListenerDelete_[port] Using an integer, specify the TCP/IP listener port number you want to delete. +CMD_ListenerDelete_PortPrompt Port number of TCP/IP Listener: + + +# ListenerList command +CMD_ListenerList Get List of TCP Listeners +CMD_ListenerList_Help This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ListenerList_Args ListenerList +CMD_ListenerList_Column1 TCP Port Number +CMD_ListenerList_Column2 Status + + +# ListenerEnable command +CMD_ListenerEnable Begin TCP Listener Operation +CMD_ListenerEnable_Help This starts the operation of stopped TCP Listeners registered on the current server. \nYou can also get a list of TCP Listeners currently registered by using the ListenerList command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ListenerEnable_Args ListenerEnable [port] +CMD_ListenerEnable_[port] Using an integer, specify the port number of the TCP/IP listener you want to start. +CMD_ListenerEnable_PortPrompt Port number of TCP/IP Listener to start: + + +# ListenerDisable command +CMD_ListenerDisable Stop TCP Listener Operation +CMD_ListenerDisable_Help This stops the operation of operating TCP Listeners registered on the current server. \nYou can also get a list of TCP Listeners currently registered by using the ListenerList command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ListenerDisable_Args ListenerDisable [port] +CMD_ListenerDisable_[port] Using an integer, specify the port number of the TCP/IP listener you want to stop. +CMD_ListenerDisable_PortPrompt Port number of TCP/IP Listener to start: + + +# ServerPasswordSet command +CMD_ServerPasswordSet Set VPN Server Administrator Password +CMD_ServerPasswordSet_Help This sets the VPN Server administrator password. You can specify the password as a parameter. If the password is not specified, a prompt will be displayed to input the password and password confirmation. If you include the password as a parameter, this password will be displayed momentarily on the screen, which poses a risk. We recommend that whenever possible, avoid specifying this parameter and input the password using the password prompt. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ServerPasswordSet_Args ServerPasswordSet [password] +CMD_ServerPasswordSet_[password] This specifies a new password setting. + + +# ClusterSettingGet command +CMD_ClusterSettingGet Get Clustering Configuration of Current VPN Server +CMD_ClusterSettingGet_Help You can use this to acquire the clustering configuration of the current VPN Server. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ClusterSettingGet_Args ClusterSettingGet +CMD_ClusterSettingGet_Current Current Configuration +CMD_ClusterSettingGet_None (No setting) +CMD_ClusterSettingGet_PublicIp Public IP Address +CMD_ClusterSettingGet_PublicPorts List of Public Ports +CMD_ClusterSettingGet_Controller Destination Controller +CMD_ClusterSettingGet_ControllerOnly Controller Function Only +CMD_ClusterSettingGet_Weight Performance Standard in Cluster + + +# ClusterSettingStandalone command +CMD_ClusterSettingStandalone Set VPN Server Type as Standalone +CMD_ClusterSettingStandalone_Help Use this to set the VPN Server type as Standalone Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, when this command is executed, VPN Server will automatically restart. \nThis command cannot be run on VPN Bridge. +CMD_ClusterSettingStandalone_Args ClusterSettingStandalone + + +# ClusterSettingController command +CMD_ClusterSettingController Set VPN Server Type as Cluster Controller +CMD_ClusterSettingController_Help Use this to set the VPN Server type as Cluster Controller. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, when this command is executed, VPN Server will automatically restart. \nThis command cannot be run on VPN Bridge. +CMD_ClusterSettingController_Args ClusterSettingController [/WEIGHT:weight] [/ONLY:yes|no] +CMD_ClusterSettingController_WEIGHT This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. Normally it is 100. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members during load balancing. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. +CMD_ClusterSettingController_ONLY By specifying "yes" here, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments. If this parameter is left unspecified, "no" will be used. + + +# ClusterSettingMember command +CMD_ClusterSettingMember Set VPN Server Type as Cluster Member +CMD_ClusterSettingMember_Help Use this to set the VPN Server type as Cluster Member Server. A cluster member server is a member computer belonging to a clustering configuration made up of multiple VPN Servers with another existing cluster controller as the center. Multiple cluster members can be added to the cluster as required. \nBefore setting the VPN Server as a cluster member server, first ask the administrator of the cluster controller to be used for the controller's IP address and port number, the public IP address and public port number (when required) of this VPN Server and the password. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, when this command is executed, VPN Server will automatically restart. \nThis command cannot be run on VPN Bridge. +CMD_ClusterSettingMember_Args ClusterSettingMember [server:port] [/IP:ip] [/PORTS:ports] [/PASSWORD:password] [/WEIGHT:weight] +CMD_ClusterSettingMember_[server:port] Specify the host name or IP address, and port number of the destination cluster controller using the parameter with the format host name:port number. +CMD_ClusterSettingMember_IP Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify it like this: "/IP:none". When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used. +CMD_ClusterSettingMember_PORTS Use this to specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers. When specifying multiple port numbers, separate them using a comma such as "/PORTS443,992,8888". +CMD_ClusterSettingMember_PASSWORD Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller. +CMD_ClusterSettingMember_WEIGHT This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used. +CMD_ClusterSettingMember_Prompt_IP_1 Specify a public IP address. \nIf you wish to leave this unspecified, press Enter without inputting anything. +CMD_ClusterSettingMember_Prompt_IP_2 Public IP Address: +CMD_ClusterSettingMember_Prompt_PORT_1 Please specify a list of public port numbers. \nWhen specifying 2 or more port numbers, separate each entry with a comma, like: 444,992,888. +CMD_ClusterSettingMember_Prompt_PORT_2 Public Port Number: +CMD_ClusterSettingMember_Prompt_HOST_1 Destination Controller Host Name and Port Number: + + +# ClusterMemberList command +CMD_ClusterMemberList Get List of Cluster Members +CMD_ClusterMemberList_Help Use this command when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. \nFor each member, the following information is also listed. Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. \nThis command cannot be run on VPN Bridge. +CMD_ClusterMemberList_Args ClusterMemberList + + +# ClusterMemberInfoGet command +CMD_ClusterMemberInfoGet Get Cluster Member Information +CMD_ClusterMemberInfoGet_Help When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. \nYou can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. \nThis command cannot be run on VPN Bridge. +CMD_ClusterMemberInfoGet_Args ClusterMemberInfoGet [id] +CMD_ClusterMemberInfoGet_[id] Specify the ID of the cluster member whose information you want to get. You can obtain the cluster member server ID by using the ClusterMemberList command. +CMD_ClusterMemberInfoGet_PROMPT_ID Cluster Member ID to Get Info: + + +# ClusterMemberCertGet command +CMD_ClusterMemberCertGet Get Cluster Member Certificate +CMD_ClusterMemberCertGet_Help When the VPN Server is operating as a cluster controller, you can get the public X.509 certificate of cluster member servers on that cluster by specifying the IDs of those member servers. You can save the certificate as an X.509 format file. \nThis command cannot be run on VPN Bridge. +CMD_ClusterMemberCertGet_Args ClusterMemberCertGet [id] [/SAVECERT:cert] +CMD_ClusterMemberCertGet_[id] Specify the ID of the cluster member whose certificate you want to get. You can obtain the cluster member server ID by using the ClusterMemberList command. +CMD_ClusterMemberCertGet_SAVECERT Specify the file path name to save the certificate you obtained. You can save the certificate in X.509 format. +CMD_ClusterMemberCertGet_PROMPT_ID Cluster Member ID to Get Certificate: + +# ClusterConnectionStatusGet command +CMD_ClusterConnectionStatusGet Get Connection Status to Cluster Controller +CMD_ClusterConnectionStatusGet_Help Use this command when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. \nYou can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. \nThis command cannot be run on VPN Bridge. +CMD_ClusterConnectionStatusGet_Args ClusterConnectionStatusGet + + +# Debug command +CMD_Debug Execute a Debug Command +CMD_Debug_Help Runs a debug command on the running VPN Server / Bridge process.\nThis command should be executed wjen the support staff requests to do so.\nMisuse of this command might cause a crash of VPN Server / Bridge running. +CMD_Debug_Args Debug [id] [/ARG:arg] +CMD_Debug_[id] Specify a debug command number. +CMD_Debug_ARG Specify a string to pass to the debug command. If a string contains spaces, contains the whole command by " ". +CMD_Debug_Msg1 Sending the debug command... +CMD_Debug_Msg2 The debug command has executed.\nResults: \"%S\" + + +# Crash command +CMD_Crash Raise a error on the VPN Server / Bridge to terminate the process forcefully. +CMD_Crash_Help This command will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted.\nThis command is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This command will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost.\nBefore run this command, run the Flush command to try to save volatile data to the configuration file.\nTo execute this command, you must have VPN Server / VPN Bridge administrator privileges. +CMD_Crash_Args Crash [yes] +CMD_Crash_[yes] Input "yes" for confirmation. +CMD_Crash_Msg Sending the Crush command to the VPN Server. The VPN Server will be let to crash immediately, so you can never get the result value of this command. After this moment, vpncmd will be disconnected from the VPN Server. +CMD_Crash_Confirm Do you really want to crash the VPN Server?\nInput "yes" if it is ok: +CMD_Crash_Aborted The Crash command has been aborted. + + +# Flush command +CMD_Flush Save All Volatile Data of VPN Server / Bridge to the Configuration File +CMD_Flush_Help Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge.\nExecute the Flush command to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush command in a situation that you do not have an enough time to shut down the server process normally.\nTo execute this command, you must have VPN Server administrator privileges. \nTo execute this command, you must have VPN Server / VPN Bridge administrator privileges. +CMD_Flush_Args Flush +CMD_Flush_Msg1 Writing volatile data from memory to the disk...\n +CMD_Flush_Msg2 Saving completed. The file size is %S bytes.\n + + +# ServerCertGet command +CMD_ServerCertGet Get SSL Certificate of VPN Server +CMD_ServerCertGet_Help Use this to get the SSL certificate that the VPN Server provides to the connected client. You can save the certificate as an X.509 format file. +CMD_ServerCertGet_Args ServerCertGet [cert] +CMD_ServerCertGet_[cert] Specify the file path name to save the certificate you obtained. You can save the certificate in X.509 format. + + +# ServerKeyGet command +CMD_ServerKeyGet Get SSL Certificate Private Key of VPN Server +CMD_ServerKeyGet_Help Use this to get the SSL certificate private key that the VPN Server provides to the connected client. You can save the private key as a Base 64 encoded file. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ServerKeyGet_Args ServerKeyGet [key] +CMD_ServerKeyGet_[key] Specify the file path name to save the private key you obtained. You can save the private key in a Base 64 encoded format. + + +# ServerCertSet command +CMD_ServerCertSet Set SSL Certificate and Private Key of VPN Server +CMD_ServerCertSet_Help You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ServerCertSet_Args ServerCertSet [/LOADCERT:cert] [/LOADKEY:key] +CMD_ServerCertSet_LOADCERT Specify the X.509 format certificate file to use. +CMD_ServerCertSet_LOADKEY Specify the Base 64 encoded private key file for the certificate to use. + + +# ServerCipherGet command +CMD_ServerCipherGet Get the Encrypted Algorithm Used for VPN Communication. +CMD_ServerCipherGet_Help Use this to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server. +CMD_ServerCipherGet_Args ServerCipherGet +CMD_ServerCipherGet_SERVER Encrypted Algorithm Currently Used by VPN Server: +CMD_ServerCipherGet_CIPHERS List of Usable Encrypted Algorithm Names: + +# ServerCipherSet command +CMD_ServerCipherSet Set the Encrypted Algorithm Used for VPN Communication. +CMD_ServerCipherSet_Help Use this to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. \nBy specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ServerCipherSet_Args ServerCipherSet [name] +CMD_ServerCipherSet_[name] This specifies the encrypted and electronic signature algorithm to set. You can obtain the list of usable algorithms by using the ServerCipherGet command. +CMD_ServerCipherSet_PROMPT_NAME Encrypted Algorithm Name to Specify: + +# TUNDownOnDisconnectEnable command +CMD_TUNDownOnDisconnectEnable Enable the Turn TUN Interface Down on Client Disconnect Function. +CMD_TUNDownOnDisconnectEnable_Help This allows you to enable Turn TUN Interface Down on Client Disconnect Function. +CMD_TUNDownOnDisconnectEnable_Args TUNDownOnDisconnectEnable + +# TUNDownOnDisconnectDisable command +CMD_TUNDownOnDisconnectDisable Disable the Turn TUN Interface Down on Client Disconnect Function. +CMD_TUNDownOnDisconnectDisable_Help This allows you to disable Turn TUN Interface Down on Client Disconnect Function. +CMD_TUNDownOnDisconnectDisable_Args TUNDownOnDisconnectDisable + +# TUNDownOnDisconnectGet command +CMD_TUNDownOnDisconnectGet Get status of the Turn TUN Interface Down on Client Disconnect Function. +CMD_TUNDownOnDisconnectGet_Help This allows you to get status of the Turn TUN Interface Down on Client Disconnect Function. +CMD_TUNDownOnDisconnectGet_Args TUNDownOnDisconnectGet +CMD_TUNDownOnDisconnectGet_COLUMN1 Put TUN down on disconnect + +# KeepEnable command +CMD_KeepEnable Enable the Keep Alive Internet Connection Function +CMD_KeepEnable_Help This allows you to enable the Keep Alive Internet Connection Function. By using the Keep Alive Internet Connection Function for network connection environments where connections will automatically be disconnected when there are periods of no communication that are longer than a set period, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. \nYou can set a destination host name etc, by using the KeepSet command. \nTo execute this command on a VPN Server or VPN Bridge, you must have administrator privileges. +CMD_KeepEnable_Args KeepEnable + + +# KeepDisable command +CMD_KeepDisable Disable the Keep Alive Internet Connection Function +CMD_KeepDisable_Help This allows you to disable the Keep Alive Internet Connection Function.\nTo execute this command on a VPN Server or VPN Bridge, you must have administrator privileges. +CMD_KeepDisable_Args KeepDisable + + +# KeepSet command +CMD_KeepSet Set the Keep Alive Internet Connection Function +CMD_KeepSet_Help Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. \nWhen using this command, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. \nPackets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. \nYou can use the KeepEnable command or KeepDisable command to enable/disable the Keep Alive Internet Connection Function. KeepSet does not change the enabled/disabled status. \nTo execute this command on a VPN Server or VPN Bridge, you must have administrator privileges. +CMD_KeepSet_Args KeepSet [/HOST:host:port] [/PROTOCOL:tcp|udp] [/INTERVAL:interval] +CMD_KeepSet_HOST Specify the host name or IP address, and port number of the destination using the format "host name:port number". +CMD_KeepSet_PROTOCOL Specify either tcp or udp. +CMD_KeepSet_INTERVAL Specify, in seconds, the interval between the sending of packets. +CMD_KeepSet_PROMPT_HOST Destination Host Name/IP Address and Port Number: +CMD_KeepSet_PROMPT_PROTOCOL tcp or udp: +CMD_KeepSet_PROMPT_INTERVAL Interval Between Packets Sends (Seconds): +CMD_KeepSet_EVAL_TCP_UDP Please specify "tcp" or "udp". + +# KeepGet command +CMD_KeepGet Get the Keep Alive Internet Connection Function +CMD_KeepGet_Help Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function. +CMD_KeepGet_Args KeepGet +CMD_KeepGet_COLUMN_1 Host Name +CMD_KeepGet_COLUMN_2 Port Number +CMD_KeepGet_COLUMN_3 Packet Send Interval (Sec) +CMD_KeepGet_COLUMN_4 Protocol +CMD_KeepGet_COLUMN_5 Current Status + + +# SyslogEnable command +CMD_SyslogEnable Set syslog Send Function +CMD_SyslogEnable_Help Use this to set the usage of syslog send function and which syslog server to use. +CMD_SyslogEnable_Args SyslogEnable [1|2|3] [/HOST:host:port] +CMD_SyslogEnable_[1|2|3] Specify, using an integer, 1, 2 or 3 for the setting to use the syslog send function. \n1: Send server log by syslog. \n2: Send server and Virtual Hub security logs by syslog. \n3: Send server, Virtual Hub security, and packet logs by syslog. +CMD_SyslogEnable_HOST Specify the host name or IP address, and port number of the syslog server using the format [host name:port number]. If the port number is omitted, 514 will be used. +CMD_SyslogEnable_MINMAX Specify, using an integer, 1, 2 or 3 for the setting to use the syslog send function. +CMD_SyslogEnable_Prompt_123 Setting to Use syslog Send Function (1-3): +CMD_SyslogEnable_Prompt_HOST Specify syslog Server: + + +# SyslogDisable command +CMD_SyslogDisable Disable syslog Send Function +CMD_SyslogDisable_Help Use this to disable the syslog send function. +CMD_SyslogDisable_Args SyslogDisable + + +# SyslogGet command +CMD_SyslogGet Get syslog Send Function +CMD_SyslogGet_Help This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use. +CMD_SyslogGet_Args SyslogGet +CMD_SyslogGet_COLUMN_1 Set the Use of syslog Send Function +CMD_SyslogGet_COLUMN_2 syslog Server Host Name +CMD_SyslogGet_COLUMN_3 syslog Server Port Number + + +# ConnectionList command +CMD_ConnectionList Get List of TCP Connections Connecting to the VPN Server +CMD_ConnectionList_Help Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the SessionList command. \nYou can get the following: Connection Name, Connection Source, Connection Start and Type.\nTo execute this command, you must have VPN Server administrator privileges. +CMD_ConnectionList_Args ConnectionList + + +# ConnectionList command +CMD_ConnectionGet Get Information of TCP Connections Connecting to the VPN Server +CMD_ConnectionGet_Help Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. \nYou can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ConnectionGet_Args ConnectionGet [name] +CMD_ConnectionGet_[name] This allows you to specify the name of the connection whose information you want to get. To get a list of connection names, you can use the ConnectionList command. +CMD_ConnectionGet_PROMPT_NAME Connection Name to Get Info: + +# ConnectionDisconnect command +CMD_ConnectionDisconnect Disconnect TCP Connections Connecting to the VPN Server +CMD_ConnectionDisconnect_Help Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ConnectionDisconnect_Args ConnectionDisconnect [name] +CMD_ConnectionDisconnect_[name] Specify the name of the connection to disconnect. To get a list of connection names, you can use the ConnectionList command. +CMD_ConnectionDisconnect_PROMPT_NAME Connection Name to Disconnect: + + +# BridgeDeviceList command +CMD_BridgeDeviceList Get List of Network Adapters Usable as Local Bridge +CMD_BridgeDeviceList_Help Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. \nYou can use a device displayed here by using the BridgeCreate command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_BridgeDeviceList_Args BridgeDeviceList + + +# BridgeList command +CMD_BridgeList Get List of Local Bridge Connection +CMD_BridgeList_Help Use this to get a list of the currently defined Local Bridge connections. \nYou can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status. +CMD_BridgeList_Args BridgeList + + +# BridgeCreate command +CMD_BridgeCreate Create Local Bridge Connection +CMD_BridgeCreate_Help Use this to create a new Local Bridge connection on the VPN Server.\nBy using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). \nYou can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). \nIt is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_BridgeCreate_Args BridgeCreate [hubname] [/DEVICE:device_name] [/TAP:yes|no] +CMD_BridgeCreate_[hubname] Specify the Virtual Hub to create bridge. To get a list of Virtual Hubs, you can use the HubList command. It is not essential that you specify a Virtual Hub that is currently operating. If you specify a Virtual Hub name that is not currently operating or that does not exist, the Local Bridge connection will become enabled when the actual operation of that Virtual Hub begins. +CMD_BridgeCreate_DEVICE Specify the bridge destination Ethernet device (network adapter) or tap device name. You can get the list of Ethernet device names by using the BridgeDeviceList command. +CMD_BridgeCreate_TAP Specify yes if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions). When this is omitted, it will be treated the same as when no is specified. +CMD_BridgeCreate_PROMPT_HUBNAME Virtual Hub Name to Create Bridge: +CMD_BridgeCreate_PROMPT_DEVICE Bridge Destination Device Name: +CMD_BridgeCreate_PROMPT_TAP Use tap device? (yes/no): + + +# BridgeDelete command +CMD_BridgeDelete Delete Local Bridge Connection +CMD_BridgeDelete_Help Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the BridgeDeviceList command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_BridgeDelete_Args BridgeDelete [hubname] [/DEVICE:device_name] +CMD_BridgeDelete_[hubname] Specify the Virtual Hub of the Local Bridge to delete. +CMD_BridgeDelete_DEVICE Specify the device name (network adapter or tap device name) of the Local Bridge to delete. +CMD_BridgeDelete_PROMPT_HUBNAME Virtual Hub Name to Delete Bridge: +CMD_BridgeDelete_PROMPT_DEVICE Bridge Device Name to Delete: + + +# Caps command +CMD_Caps Get List of Server Functions/Capability +CMD_Caps_Help Use this get a list of functions and capability of the VPN Server currently connected and being managed. \nThe function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Sometimes commands may be included in the command line management utility that cannot operate because of the function and capability of the destination VPN Server. Using this command, you can find out the capability of the target VPN Server and report it. \nIf the version of the VPN Server is newer than the command line management utility and there are functions that the command line management utility does not recognize, you can display the contents strings (variable names) as they are. +CMD_Caps_Args Caps + + +# Reboot command +CMD_Reboot Reboot VPN Server Service +CMD_Reboot_Help Use this to restart the VPN Server service. \nWhen you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. \nBy using this command, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. \nAlso, by specifying the /RESTCONFIG:yes parameter, the contents of the configuration file (.config) held by the current VPN Server will be initialized. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_Reboot_Args Reboot [/RESETCONFIG:yes|no] +CMD_Reboot_RESETCONFIG By specifying yes, the contents of the configuration file (.config) held by the current VPN Server will be initialized. Please carefully consider the implications when setting this parameter. + + +# ConfigGet command +CMD_ConfigGet Get the current configuration of the VPN Server +CMD_ConfigGet_Help Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this command is executed. \nWhen part of the contents of the configuration file does not specify a parameter, it will be displayed on screen as it is. By specifying a save destination file name by parameter, the contents will be saved by that file name. \nYou can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the ConfigSet command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ConfigGet_Args ConfigGet [path] +CMD_ConfigGet_[path] When you want to save the contents of the configuration file to a file, use this to specify the file name. If left unspecified, the configuration contents will be displayed on screen. If the configuration file contains multiple-byte characters, the encoding must be saved as Unicode (UTF-8). +CMD_ConfigGet_FILENAME Config name: "%S", Size: %u +CMD_ConfigGet_FILE_SAVE_FAILED Creation of specified file failed. + + +# ConfigSet command +CMD_ConfigSet Write Configuration File to VPN Server +CMD_ConfigSet_Help Use this to write the configuration file to the VPN Server. By executing this command, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. \nBecause it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the ConfigGet command to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the ConfigSet command to rewrite the contents to the VPN Server. \nThis command is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_ConfigSet_Args ConfigSet [path] +CMD_ConfigSet_[path] Specify the file name of the write destination configuration file. If the write destination file contains multiple-byte characters, the encoding must be Unicode (UTF-8). +CMD_ConfigSet_PROMPT_PATH Config file path name to upload to server: +CMD_ConfigSet_FILE_LOAD_FAILED Reading from specified file failed. + + +# RouterList command +CMD_RouterList Get List of Virtual Layer 3 Switches +CMD_RouterList_Help Use this to get the list of Virtual Layer 3 Switches defined on the VPN Server. You can get the following information on the Virtual Layer 3 Switches: Switch Name, Operating Status, Number of Interfaces, and Number of Routing Tables. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. +CMD_RouterList_Args RouterList + + +# RouterAdd command +CMD_RouterAdd Define New Virtual Layer 3 Switch +CMD_RouterAdd_Help Use this to define a new Virtual Layer 3 Switch on the VPN Server. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. \n\n[Explanation on Virtual Layer 3 Switch Function]\nYou can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. \n\n[Caution about the Virtual Layer 3 Switch Function]\nThe Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. \nIf the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. +CMD_RouterAdd_Args RouterAdd [name] +CMD_RouterAdd_[name] Use this to specify the name of the newly created Virtual Layer 3 Switch name. You cannot add a name that is identical to an existing Virtual Layer 3 Switch. +CMD_RouterAdd_PROMPT_NAME Name of Virtual Layer 3 Switch to Create: + + +# RouterDelete command +CMD_RouterDelete Delete Virtual Layer 3 Switch +CMD_RouterDelete_Help Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. \nTo get a list of existing Virtual Layer 3 Switches, use the RouterList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. +CMD_RouterDelete_Args RouterDelete [name] +CMD_RouterDelete_[name] Use this to specify the name of the Virtual Layer 3 Switch to be deleted. +CMD_RouterDelete_PROMPT_NAME Name of Virtual Layer 3 Switch to Delete: + + +# RouterStart command +CMD_RouterStart Start Virtual Layer 3 Switch Operation +CMD_RouterStart_Help Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. \nTo get a list of existing Virtual Layer 3 Switches, use the RouterList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. \n\n[Explanation on Virtual Layer 3 Switch Function]\nYou can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. \n\n[Caution about the Virtual Layer 3 Switch Function]\nThe Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. \nIf the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network. +CMD_RouterStart_Args RouterStart [name] +CMD_RouterStart_[name] Use this to specify the name of the Virtual Layer 3 Switch to start. +CMD_RouterStart_PROMPT_NAME Name of Virtual Layer 3 Switch to Start: + + +# RouterStop command +CMD_RouterStop Stop Virtual Layer 3 Switch Operation +CMD_RouterStop_Help Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. \nTo get a list of existing Virtual Layer 3 Switches, use the RouterList command. \nTo execute this command, you must have VPN Server administrator privileges. +CMD_RouterStop_Args RouterStop [name] +CMD_RouterStop_[name] Use this to specify the name of the Virtual Layer 3 Switch to stop. +CMD_RouterStop_PROMPT_NAME Name of Virtual Layer 3 Switch to Stop: + + +# RouterIfList command +CMD_RouterIfList Get List of Interfaces Registered on the Virtual Layer 3 Switch +CMD_RouterIfList_Help Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. \nYou can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. \nA virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. +CMD_RouterIfList_Args RouterIfList [name] +CMD_RouterIfList_[name] Use this to specify the name of the Virtual Layer 3 Switch. +CMD_RouterIfList_PROMPT_NAME Name of Virtual Layer 3 Switch: + + +# RouterIfAdd command +CMD_RouterIfAdd Add Virtual Interface to Virtual Layer 3 Switch +CMD_RouterIfAdd_Help Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. \nYou can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. \nA virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. \nYou must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. \nAlso, you must specify the name of the Virtual Hub that the interface will connect to. \nYou can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. \nThe virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. \nRouting via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. \nTo execute this command, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the RouterStop command to stop it and then execute this command. +CMD_RouterIfAdd_Args RouterIfAdd [name] [/HUB:hub] [/IP:ip/mask] +CMD_RouterIfAdd_[name] Use this to specify the name of the Virtual Layer 3 Switch. +CMD_RouterIfAdd_HUB Use this to specify the name of the Virtual Hub to be the connection destination of the virtual interface to be newly added. To get a list of Virtual Hubs, you can use the HubList command. It is not essential that you specify a Virtual Hub that is currently operating. If you specify a Virtual Hub name that is not currently operating or that does not exist, the Virtual Layer 3 Switch will become enabled when the actual operation of that Virtual Hub begins. +CMD_RouterIfAdd_IP Using the format: "IP address/subnet mask", specify the IP address and subnet mask held by the virtual interface to be newly added. Specify the IP address by separating the decimal values using dots such as 192.168.0.1 For the subnet mask, either specify decimal values separated by dots such as 255.255.255.0, or you can specify the bit length from the header using a decimal value such as 24. +CMD_RouterIfAdd_PROMPT_NAME Name of Virtual Layer 3 Switch: +CMD_RouterIfAdd_PROMPT_HUB Destination Virtual Hub Name of Virtual Interface: +CMD_RouterIfAdd_PROMPT_IP IP Address/Subnet Mask: + + +# RouterIfDel command +CMD_RouterIfDel Delete Virtual Interface of Virtual Layer 3 Switch +CMD_RouterIfDel_Help Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. \nYou can get a list of the virtual interfaces currently defined, by using the RouterIfList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. \nTo execute this command, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the RouterStop command to stop it and then execute this command. +CMD_RouterIfDel_Args RouterIfDel [name] [/HUB:hub] +CMD_RouterIfDel_[name] Use this to specify the name of the Virtual Layer 3 Switch. +CMD_RouterIfDel_HUB Use this to specify the name of the Virtual Hub to be the connection destination of the virtual interface to be deleted. + + +# RouterTableList command +CMD_RouterTableList Get List of Routing Tables of Virtual Layer 3 Switch +CMD_RouterTableList_Help Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. \nIf the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. +CMD_RouterTableList_Args RouterTableList [name] +CMD_RouterTableList_[name] Use this to specify the name of the Virtual Layer 3 Switch. +CMD_RouterTableList_PROMPT_NAME Name of Virtual Layer 3 Switch: + + +# RouterTableAdd command +CMD_RouterTableAdd Add Routing Table Entry for Virtual Layer 3 Switch +CMD_RouterTableAdd_Help Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. \nIf the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. \nYou must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. \nTo execute this command, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the RouterStop command to stop it and then execute this command. +CMD_RouterTableAdd_Args RouterTableAdd [name] [/NETWORK:ip/mask] [/GATEWAY:gwip] [/METRIC:metric] +CMD_RouterTableAdd_[name] Use this to specify the name of the Virtual Layer 3 Switch. +CMD_RouterTableAdd_NETWORK Using the format: "IP address/subnet mask", specify the network address and subnet mask of the routing table entry to be newly added. Specify the network address by separating the decimal values using dots such as "192.168.0.1". For the subnet mask, either specify decimal values separated by dots such as 255.255.255.0, or you can specify the bit length from the header using a decimal value such as 24. If you specify 0.0.0.0/0.0.0.0, the default route will be used. +CMD_RouterTableAdd_GATEWAY Specify the gateway IP address. +CMD_RouterTableAdd_METRIC Specify a metric value. Specify an integer (1 or higher). +CMD_RouterTableAdd_PROMPT_NAME Name of Virtual Layer 3 Switch: +CMD_RouterTableAdd_PROMPT_NETWORK Network Address/Subnet Mask: +CMD_RouterTableAdd_PROMPT_GATEWAY Gateway Address: +CMD_RouterTableAdd_PROMPT_METRIC Metric Value: + + +# RouterTableDel command +CMD_RouterTableDel Delete Routing Table Entry of Virtual Layer 3 Switch +CMD_RouterTableDel_Help Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. \nYou can get a list of the already defined routing table entries by using the RouterTableList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Bridge. \nTo execute this command, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the RouterStop command to stop it and then execute this command. +CMD_RouterTableDel_Args RouterTableDel [name] [/NETWORK:ip/mask] [/GATEWAY:gwip] [/METRIC:metric] +CMD_RouterTableDel_[name] Use this to specify the name of the Virtual Layer 3 Switch. +CMD_RouterTableDel_NETWORK Using the format: "IP address/subnet mask", specify the network address of the routing table entry to be deleted. +CMD_RouterTableDel_GATEWAY Specify the gateway IP address. +CMD_RouterTableDel_METRIC Specify a metric value. Specify an integer (1 or higher). + + +# LogFileList command +CMD_LogFileList Get List of Log Files +CMD_LogFileList_Help Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the LogFileGet command you can download the contents of the log file. \nIf you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. \nWhen connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. +CMD_LogFileList_Args LogFileList +CMD_LogFileList_START Getting list of log files. This may take a while. Please wait... +CMD_LogFileList_NUM_LOGS In total there are %u log files. + + +# LogFileGet command +CMD_LogFileGet Download Log file +CMD_LogFileGet_Help Use this to download the log file that is saved on the VPN Server computer. To download the log file first display the list of log files using the LogFileList command and then download the log file using the LogFileGet command. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management. \nIf you have specified the file name as a parameter, the downloaded log file will be saved to the file of that file name. If the destination file is not specified, the log file will be displayed onscreen. \nThe size of the log file can get very big, so pay careful attention to this issue. +CMD_LogFileGet_Args LogFileGet [name] [/SERVER:server] [/SAVEPATH:savepath] +CMD_LogFileGet_[name] Specify the name of the log file to be downloaded. To get a list of downloadable log files, use the LogFileList command. +CMD_LogFileGet_SERVER Use this to specify the server name when making a download request to a cluster controller. Specify the server that will be displayed by the LogFileGet command. +CMD_LogFileGet_SAVEPATH Use this to specify the destination file name for when saving the downloaded log file. When this is left unspecified, the file will be displayed onscreen. +CMD_LogFileGet_PROMPT_NAME Name of log file to download: +CMD_LogFileGet_START Downloading log file. This may take a while. Please wait... +CMD_LogFileGet_FAILED The download failed. +CMD_LogFileGet_SAVE_FAILED Unable to write to the specified file. +CMD_LogFileGet_FILESIZE File size of log file: %u + + +# HubCreate command +CMD_HubCreate Create New Virtual Hub +CMD_HubCreate_Help Use this to create a new Virtual Hub on the VPN Server. \nThe created Virtual Hub will begin operation immediately. \nWhen the VPN Server is operating on a cluster, this command is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the HubSetStatic command. To get a list of Virtual Hubs that are already on the VPN Server, use the HubList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. \nWhen issuing the command to a cluster controller on a cluster to create a Virtual Hub, use either the HubCreateStatic command or the HubCreateDynamic command (issuing the HubCreate command to a cluster controller has the same operational effect as issuing the HubCreateDynamic command). +CMD_HubCreate_Args HubCreate [name] [/PASSWORD:password] +CMD_HubCreate_[name] Specify the name of the Virtual Hub to create. +CMD_HubCreate_PASSWORD Specify an administrator password when the administrator password is going to be set for the Virtual Hub to be created. If this is not specified, a prompt will appear to input the password. +CMD_HubCreate_PROMPT_NAME Name of Virtual Hub to be created: + + +# HubCreateDynamic command +CMD_HubCreateDynamic Create New Dynamic Virtual Hub (For Clustering) +CMD_HubCreateDynamic_Help Use this to create a new dynamic Virtual Hub on the VPN Server. \nThe created Virtual Hub will begin operation immediately. \nWhen the VPN Server is operating on a cluster, this command is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the HubSetStatic command. To get a list of Virtual Hubs that are already on the VPN Server, use the HubList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Servers that are operating as a VPN Bridge, cluster member or standalone server. +CMD_HubCreateDynamic_Args HubCreateDynamic [name] [/PASSWORD:password] +CMD_HubCreateDynamic_[name] Specify the name of the Virtual Hub to create. +CMD_HubCreateDynamic_PASSWORD Specify an administrator password when the administrator password is going to be set for the Virtual Hub to be created. If this is not specified, a prompt will appear to input the password. + + +# HubCreateStatic command +CMD_HubCreateStatic Create New Static Virtual Hub (For Clustering) +CMD_HubCreateStatic_Help Use this to create a new static Virtual Hub on the VPN Server. \nThe created Virtual Hub will begin operation immediately. \nWhen the VPN Server is operating on a cluster, this command is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the HubSetStatic command. To get a list of Virtual Hubs that are already on the VPN Server, use the HubList command. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Servers that are operating as a VPN Bridge, cluster member or standalone server. +CMD_HubCreateStatic_Args HubCreateStatic [name] [/PASSWORD:password] +CMD_HubCreateStatic_[name] Specify the name of the Virtual Hub to create. +CMD_HubCreateStatic_PASSWORD Specify an administrator password when the administrator password is going to be set for the Virtual Hub to be created. If this is not specified, a prompt will appear to input the password. + + +# HubDelete command +CMD_HubDelete Delete Virtual Hub +CMD_HubDelete_Help Use this to delete an existing Virtual Hub on the VPN Server. \nIf you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. \nAlso, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. \nOnce you delete the Virtual Hub, it cannot be recovered. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Servers that are operating as a VPN Bridge or cluster member. +CMD_HubDelete_Args HubDelete [name] +CMD_HubDelete_[name] Specify the name of the Virtual Hub to delete. +CMD_HubDelete_PROMPT_NAME Name of Virtual Hub to delete: + + +# HubSetStatic command +CMD_HubSetStatic Change Virtual Hub Type to Static Virtual Hub +CMD_HubSetStatic_Help Use this when a VPN Server is operating on a cluster and you want to change the type of the Virtual Hub to a static Virtual Hub. When the type of the Virtual Hub is changed, all sessions that are currently connected to the Virtual Hub will be disconnected. \nWhen there is a Virtual Hub operating as a static virtual Hub, a Virtual Hub with that name will be created on all the cluster member servers. A user who attempts to connect this Virtual Hub will be connected to one of the cluster members hosting this Virtual Hub as determined by an algorithm based on each server's load status. \nA static Virtual Hub, for example, could be used for a remote access VPN that allows thousands or tens of thousands of users to connect at the same time for the purpose of remotely accessing an internal company LAN from the Internet for business. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Servers that are operating as a VPN Bridge, cluster member or standalone server. \nThis command cannot be used for VPN Servers that are newer than Build 5190. +CMD_HubSetStatic_Args HubSetStatic [name] +CMD_HubSetStatic_[name] Specify the name of the Virtual Hub to be set as the static Virtual Hub. +CMD_HubChange_PROMPT_NAME Name of Virtual Hub to change setting: + + +# HubSetDynamic command +CMD_HubSetDynamic Change Virtual Hub Type to Dynamic Virtual Hub +CMD_HubSetDynamic_Help Use this when a VPN Server is operating on a cluster and you want to change the type of the Virtual Hub to a dynamic Virtual Hub. When the type of the Virtual Hub is changed, all sessions that are currently connected to the Virtual Hub will be disconnected. \nWhen there is not even one client connected to a dynamic Virtual Hub defined on the cluster, then that Virtual Hub does not exist on any cluster member. When the first client to attempt to connect to the dynamic Virtual Hub does so, the server with the lowest load on the cluster starts hosting that Virtual Hub. When the second and subsequent clients attempt to connect to the same virtual Hub, they are automatically connected to the server hosting the Virtual Hub. When all the clients are disconnected from a particular dynamic Virtual Hub, the Virtual Hub will return to the original state of not existing on any of the servers. \nThere is a broad range of applications for dynamic Virtual Hubs, such as a Virtual Hub defined for each business section within a company so that employees can connect to the Virtual Hub of their own department to do their work in a centralized management environment that is deployed on a single cluster. \nTo execute this command, you must have VPN Server administrator privileges. \nAlso, this command does not operate on VPN Servers that are operating as a VPN Bridge, cluster member or standalone server. \nThis command cannot be used for VPN Servers that are newer than Build 5190. +CMD_HubSetDynamic_Args HubSetDynamic [name] +CMD_HubSetDynamic_[name] Specify the name of the Virtual Hub to be set as the dynamic Virtual Hub. + + +# HubList command +CMD_HubList Get List of Virtual Hubs +CMD_HubList_Help Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication.\nNote that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. \nWhen connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed. +CMD_HubList_Args HubList + + +# Hub command +CMD_Hub Select Virtual Hub to Manage +CMD_Hub_Help Use this to select the Virtual Hub to be the target of administration. For an administration utility with the status of being connected to a VPN Server, before executing a command to set or manage a Virtual Hub, you must use the Hub command to select the Virtual Hub to manage. \nWhen in the status of being connected to a VPN Server in Virtual Hub Admin Mode, you can select a single Virtual Hub to be the target of administration but you cannot select other Virtual Hubs. When having the status of being connected to the VPN Server in Server Admin Mode, you can make all Virtual Hubs the target of administration. \nTo get a list of Virtual Hubs that currently exist on the VPN Server, use the HubList command. \nFor the VPN Bridge, you can only select the Virtual Hub that has the name "BRIDGE". +CMD_Hub_Args Hub [name] +CMD_Hub_[name] Specify the name of the Virtual Hub to manage. If this parameter is left unspecified, the Select Virtual Hub to Manage will be cancelled. +CMD_Hub_Unselected The Virtual Hub selection has been unselected. +CMD_Hub_Selected The Virtual Hub "%S" has been selected. +CMD_Hub_Select_Failed When attempting to select Virtual Hub "%S" that has been specified by /ADMINHUB, the following error occurred. +CMD_Hub_Not_Selected Before executing this command, first select the Virtual Hub to manage using the Hub command. + + +# Online command +CMD_Online Switch Virtual Hub to Online +CMD_Online_Help Use this when the Virtual Hub currently being managed is offline to switch it to online. A Virtual Hub with an offline status cannot receive VPN connections from clients. By switching the Virtual Hub to online, that Virtual Hub becomes able to receive connections from users and provide services. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_Online_Args Online + + +# Offline command +CMD_Offline Switch Virtual Hub to Offline +CMD_Offline_Help Use this when the Virtual Hub currently being managed is online to switch it to offline. If there are sessions currently connected to the Virtual Hub, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_Offline_Args Offline + + +# SetMaxSession command +CMD_SetMaxSession Set the Max Number of Concurrently Connected Sessions for Virtual Hub +CMD_SetMaxSession_Help Use this to set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. When there are more sessions than the maximum number of concurrently connected sessions that are being connected from the VPN Client or VPN Bridge, when the maximum number of sessions is reached, clients will no longer be able to connect. This limit on the maximum number of concurrently connected sessions does not include sessions generated in the Virtual Hub by Local Bridges, Virtual NAT, and Cascade Connections. \nYou can get the current setting for the max number of concurrently connected sessions by using the OptionsGet command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SetMaxSession_Args SetMaxSession [max_session] +CMD_SetMaxSession_[max_session] Using an integer, specify the maximum number of concurrently connected sessions to set. Specifying 0 results in a setting of unlimited. +CMD_SetMaxSession_Prompt Max Number of Sessions: + + +# SetHubPassword command +CMD_SetHubPassword Set Virtual Hub Administrator Password +CMD_SetHubPassword_Help Use this to set the Administrator Password for the Virtual Hub that is currently being managed. When a Virtual Hub administrator password has been set, you are able to connect to that Virtual Hub from a VPN Server connection utility in Virtual Hub Admin Mode, by specifying the password. It is also possible to make a VPN connection from a VPN client or VPN Bridge by specifying "Administrator" for the user name and the password for the Virtual Hub administrator password. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SetHubPassword_Args SetHubPassword [password] +CMD_SetHubPassword_[password] Specify the password you wish to set. If a password is not specified by parameter, a prompt will appear to input the password. + + +# SetEnumAllow command +CMD_SetEnumAllow Allow Enumeration by Virtual Hub Anonymous Users +CMD_SetEnumAllow_Help Use this to change the options setting of the Virtual Hub you are currently managing to allow anonymous users to enumerate this Virtual Hub. By setting this option, it makes it possible for VPN Client users to enumerate this Virtual Hub simply by inputting this VPN Server address. Also, by using the SetEnumDeny command, you can deny anonymous users the ability to enumerate. At the time a Virtual Hub is created, enumeration will be allowed. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SetEnumAllow_Args SetEnumAllow + + +# SetEnumDeny command +CMD_SetEnumDeny Deny Enumeration by Virtual Hub Anonymous Users +CMD_SetEnumDeny_Help Use this to change the options setting of the Virtual Hub you are currently managing to prevent anonymous users from enumerating this Virtual Hub. By setting this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server. Also, by using the SetEnumAllow command, you can allow anonymous users to enumerate. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SetEnumDeny_Args SetEnumDeny + + +# OptionsGet command +CMD_OptionsGet Get Options Setting of Virtual Hubs +CMD_OptionsGet_Help Use this to get a list of the Options setting of the Virtual Hub currently being managed. You can get the following: Allow/Deny Virtual Hub Enumeration, Maximum Concurrent Connections, Online/Offline Status, and Virtual Hub Type in Clustering Environment. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OptionsGet_Args OptionsGet +CMD_OptionsGet_TITLE Options Setting List of Virtual Hub "%S" +CMD_OptionsGet_ENUM Enumeration of Virtual Hub for Anonymous User +CMD_OptionsGet_MAXSESSIONS Max Number of Sessions +CMD_OptionsGet_STATUS Status +CMD_OptionsGet_TYPE Virtual Hub Type + + + +# RadiusServerSet command +CMD_RadiusServerSet Set RADIUS Server to use for User Authentication +CMD_RadiusServerSet_Help To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) \nThe RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_RadiusServerSet_Args RadiusServerSet [server_name:port] [/SECRET:secret] [/RETRY_INTERVAL:interval] +CMD_RadiusServerSet_[server_name:port] Using the format "host name:port number", specify the host name or IP address, and the UDP port number of the RADIUS server being used. If the port number is omitted, 1812 will be used. You can specify multiple hostname by splitting with comma or semicolon. +CMD_RadiusServerSet_SECRET Specify the shared secret (password) used for communication with the RADIUS Server +CMD_RadiusServerSet_RETRY_INTERVAL Specify the retry interval between retries in milliseconds. +CMD_RadiusServerSet_Prompt_Host Host Number and Port Number of RADIUS Server to Use: +CMD_RadiusServerSet_Prompt_Secret Shared Secret: +CMD_RadiusServerSet_Prompt_RetryInterval Retry Interval (milliseconds): +CMD_RadiusServerSet_EVAL_NUMINTERVAL The retry interval must be in from 500 to 10000 milliseconds. + + +# RadiusServerDelete command +CMD_RadiusServerDelete Delete Setting to Use RADIUS Server for User Authentication +CMD_RadiusServerDelete_Help Use this to delete the setting related to using a RADIUS server when a user connects to the currently managed Virtual Hub in RADIUS Server Authentication Mode and disable the RADIUS authentication. To get the settings related to the current RADIUS server use the RadiusServerGet command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_RadiusServerDelete_Args RadiusServerDelete + + +# RadiusServerGet command +CMD_RadiusServerGet Get Setting of RADIUS Server Used for User Authentication +CMD_RadiusServerGet_Help Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_RadiusServerGet_Args RadiusServerGet +CMD_RadiusServerGet_STATUS Use RADIUS Server +CMD_RadiusServerGet_HOST RADIUS Server Host Name or IP Address: +CMD_RadiusServerGet_PORT RADIUS Server Port Number +CMD_RadiusServerGet_SECRET Shared Secret +CMD_RadiusServerGet_RetryInterval Retry Interval (in milliseconds) + + +# StatusGet command +CMD_StatusGet Get Current Status of Virtual Hub +CMD_StatusGet_Help Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data. +CMD_StatusGet_Args StatusGet + + +# LogGet command +CMD_LogGet Get Log Save Setting of Virtual Hub +CMD_LogGet_Help Use this to get the log save setting for the Virtual Hub that is currently being managed. You can get the setting information such as the save setting related to security logs and packet logs and information on what has been saved. +CMD_LogGet_Args LogGet +CMD_Log_SecurityLog Save Security Log +CMD_Log_PacketLog Save Packet Log +CMD_Log_SwitchType Log File Switch Cycle +CMD_Log_0 TCP Connection Log +CMD_Log_1 TCP Packet Log +CMD_Log_2 DHCP Log +CMD_Log_3 UDP Log +CMD_Log_4 ICMP Log +CMD_Log_5 IP Log +CMD_Log_6 ARP Log +CMD_Log_7 Ethernet Log + + +# LogEnable command +CMD_LogEnable Enable Security Log or Packet Log +CMD_LogEnable_Help Use this to enable a security log or packet log of the Virtual Hub currently being managed. \nTo get the current setting, you can use the LogGet command. +CMD_LogEnable_Args LogEnable [security|packet] +CMD_LogEnable_[security|packet] Select the type of log to enable. Specify either "security" or "packet". +CMD_LogEnable_Prompt Select Security or Packet: +CMD_LogEnable_Prompt_Error Invalid specification. + + +# LogDisable command +CMD_LogDisable Disable Security Log or Packet Log +CMD_LogDisable_Help Use this to disable a security log or packet log of the Virtual Hub currently being managed. \nTo get the current setting, you can use the LogGet command. +CMD_LogDisable_Args LogDisable [security|packet] +CMD_LogDisable_[security|packet] Select the type of log to disable. Specify either "security" or "packet". + + +# LogSwitchSet command +CMD_LogSwitchSet Set Log File Switch Cycle +CMD_LogSwitchSet_Help Use this to set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month ,or not switch. \nTo get the current setting, you can use the LogGet command. +CMD_LogSwitchSet_Args LogSwitchSet [security|packet] [/SWITCH:sec|min|hour|day|month|none] +CMD_LogSwitchSet_[security|packet] Select the type of log to change setting. Specify either "security" or "packet". +CMD_LogSwitchSet_SWITCH Select the switch cycle to set. Specify sec, min, hour, day, month or none. +CMD_LogSwitchSet_Prompt Specify sec, min, hour, day, month or none: + + +# LogPacketSaveType command +CMD_LogPacketSaveType Set Save Contents and Type of Packet to Save to Packet Log +CMD_LogPacketSaveType_Help Use this to set the save contents of the packet log for each type of packet to be saved by the currently managed Virtual Hub. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log.\nTo get the current setting, you can use the LogGet command. +CMD_LogPacketSaveType_Args LogPacketSaveType [/TYPE:tcpconn|tcpdata|dhcp|udp|icmp|ip|arp|ether] [/SAVE:none|header|full] +CMD_LogPacketSaveType_TYPE Specify tcpconn, tcpdata, dhcp, udp, icmp, ip, arp, or ether to specify the type of packet whose save contents are going to be changed. +CMD_LogPacketSaveType_SAVE Specify the save contents of the packet log. \nSpecify either none: save nothing\nheader: header information only\nfull: all packet contents +CMD_LogPacketSaveType_Prompt_TYPE Specify tcpconn, tcpdata, dhcp, udp, icmp, ip, arp, or ether: +CMD_LogPacketSaveType_Prompt_SAVE Specify none, header, or full: + + +# CAList command +CMD_CAList Get List of Trusted CA Certificates +CMD_CAList_Help Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_CAList_Args CAList +CMD_CAList_COLUMN_ID ID + + +# CAAdd command +CMD_CAAdd Add Trusted CA Certificate +CMD_CAAdd_Help Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. \nTo get a list of the current certificates you can use the CAList command. \nThe certificate you add must be saved in the X.509 file format. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_CAAdd_Args CAAdd [path] +CMD_CAAdd_[path] Specify the file name of the X.509 certificate to register. +CMD_CAAdd_PROMPT_PATH Name of X.509 Certificate File to Register: + + +# CADelete command +CMD_CADelete Delete Trusted CA Certificate +CMD_CADelete_Help Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. \nTo get a list of the current certificates you can use the CAList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_CADelete_Args CADelete [id] +CMD_CADelete_[id] Specify the ID of the certificate to delete. +CMD_CADelete_PROMPT_ID ID of Certificate to Delete: + + +# CAGet command +CMD_CAGet Get Trusted CA Certificate +CMD_CAGet_Help Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_CAGet_Args CAGet [id] [/SAVECERT:path] +CMD_CAGet_[id] Specify the ID of the certificate to get. +CMD_CAGet_SAVECERT Specify the file name to save the certificate you obtained. +CMD_CAGet_PROMPT_ID ID of Certificate to Get: +CMD_CAGet_PROMPT_SAVECERT Name of File to Save: + + +# CascadeList command +CMD_CascadeList Get List of Cascade Connections +CMD_CascadeList_Help Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. \nBy using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. \n\n[Warning About Cascade Connections]\nBy connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeList_Args CascadeList + + +# CascadeCreate command +CMD_CascadeCreate Create New Cascade Connection +CMD_CascadeCreate_Help Use this to create a new Cascade Connection on the currently managed Virtual Hub. \nBy using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. \nTo create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other commands that begin with the name "Cascade". \n\n[Warning About Cascade Connections]\nBy connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. \n\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeCreate_Args CascadeCreate [name] [/SERVER:hostname:port] [/HUB:hubname] [/USERNAME:username] +CMD_CascadeCreate_[name] Specify the name of the Cascade Connection to create. +CMD_CascadeCreate_SERVER Specify the host name and port number of the destination VPN Server using the format [host name:port number]. You can also specify by IP address. +CMD_CascadeCreate_HUB Specify the Virtual Hub on the destination VPN Server. +CMD_CascadeCreate_USERNAME Specify the user name to use for user authentication when connecting to the destination VPN Server. +CMD_CascadeCreate_Prompt_Name Cascade Connection Name: +CMD_CascadeCreate_Prompt_Server Destination VPN Server Host Name and Port Number: +CMD_CascadeCreate_Prompt_Hub Destination Virtual Hub Name: +CMD_CascadeCreate_Prompt_Username Connecting User Name: + + +# CascadeSet command +CMD_CascadeSet Set the Destination for Cascade Connection +CMD_CascadeSet_Help Use this to set the destination VPN Server host name and port number, Virtual Hub name and the user name that will use the connection for the Cascade Connection registered on the currently managed virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeSet_Args CascadeSet [name] [/SERVER:hostname:port] [/HUB:hubname] +CMD_CascadeSet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeSet_SERVER Specify the host name and port number of the destination VPN Server using the format [host name:port number]. You can also specify by IP address. +CMD_CascadeSet_HUB Specify the Virtual Hub on the destination VPN Server. + + +# CascadeGet command +CMD_CascadeGet Get the Cascade Connection Setting +CMD_CascadeGet_Help Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. \nTo change the Connection Setting contents of the Cascade Connection, use the other commands that begin with the name "Cascade" after creating the Cascade Connection. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeGet_Args CascadeGet [name] +CMD_CascadeGet_[name] Specify the name of the Cascade Connection whose setting you want to get. +CMD_CascadeGet_Policy [Cascade Session Security Policy Setting Value] + +# CascadeDelete command +CMD_CascadeDelete Delete Cascade Connection Setting +CMD_CascadeDelete_Help Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeDelete_Args CascadeDelete [name] +CMD_CascadeDelete_[name] Specify the name of the Cascade Connection to delete. + + +# CascadeUsernameSet command +CMD_CascadeUsernameSet Set User Name to Use Connection of Cascade Connection +CMD_CascadeUsernameSet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to the VPN Server, use this to specify the user name required for user authentication. \nIn some cases it is necessary to specify the type of user authentication and specify the required parameters. To change this information you can use commands such as CascadeAnonymousSet, CascadePasswordSet, and CascadeCertSet. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeUsernameSet_Args CascadeUsernameSet [name] [/USERNAME:username] +CMD_CascadeUsernameSet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeUsernameSet_USERNAME Specify the user name required for user authentication when the Cascade Connection connects to the VPN Server. +CMD_CascadeUsername_Notice The auth type for this Connection Setting is currently set as password authentication. After changing the user name, you must use the CascadePasswordSet command to reset the password. + + +# CascadeAnonymousSet command +CMD_CascadeAnonymousSet Set User Authentication Type of Cascade Connection to Anonymous Authentication +CMD_CascadeAnonymousSet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to the VPN Server, set the user authe type to [anonymous authentication]. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeAnonymousSet_Args CascadeAnonymousSet [name] +CMD_CascadeAnonymousSet_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadePasswordSet command +CMD_CascadePasswordSet Set User Authentication Type of Cascade Connection to Password Authentication +CMD_CascadePasswordSet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to the VPN Server, use this to set the user auth type to Password Authentication. Specify Standard Password Authentication and RADIUS or NT Domain Authentication as the password authentication type. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadePasswordSet_Args CascadePasswordSet [name] [/PASSWORD:password] [/TYPE:standard|radius] +CMD_CascadePasswordSet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadePasswordSet_PASSWORD Specify the password to use for password authentication. If this is not specified, a prompt will appear to input the password. +CMD_CascadePasswordSet_TYPE Specify either "standard" (Standard Password Authentication) or "radius" (RADIUS or NT Domain Authentication) as the password authentication type. +CMD_CascadePasswordSet_Prompt_Type Specify standard or radius: +CMD_CascadePasswordSet_Type_Invalid The standard or radius specification is invalid. + + +# CascadeCertSet command +CMD_CascadeCertSet Set User Authentication Type of Cascade Connection to Client Certificate Authentication +CMD_CascadeCertSet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to the VPN Server, use this to set the user auth type to Client Certificate Authentication. For this certificate, you must specify a certificate file in the X.509 format and a private key file that is Base 64 encoded. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeCertSet_Args CascadeCertSet [name] [/LOADCERT:cert] [/LOADKEY:key] +CMD_CascadeCertSet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeCertSet_LOADCERT Specify the X.509 format certificate file to provide for certificate authentication. +CMD_CascadeCertSet_LOADKEY Specify the Base-64-encoded private key file name for the certificate. + + +# CascadeCertGet command +CMD_CascadeCertGet Get Client Certificate to Use for Cascade Connection +CMD_CascadeCertGet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection uses client certificate authentication, use this to get the certificate that is provided as the client certificate and save the certificate file in X.509 format. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeCertGet_Args CascadeCertGet [name] [/SAVECERT:cert] +CMD_CascadeCertGet_[name] Specify the name of the Cascade Connection whose setting you want to get. +CMD_CascadeCertGet_SAVECERT Specify the file name to save the certificate you obtained in X.509 format. +CMD_CascadeCertSet_Not_Auth_Cert The specified Cascade Connection is not in client certificate authentication mode. +CMD_CascadeCertSet_Cert_Not_Exists The certificate is not stored in the Connection Setting of the specified Cascade Connection. + + +# CascadeEncryptEnable command +CMD_CascadeEncryptEnable Enable Encryption when Communicating by Cascade Connection +CMD_CascadeEncryptEnable_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers to be encrypted by SSL. \nNormally communication between VPN Servers is encrypted by SSL to prevent eavesdropping of information and fraud. You can also disable encryption. When encryption is disabled, the communication throughput improves but the communication data flows over the network in plain text. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeEncryptEnable_Args CascadeEncryptEnable [name] +CMD_CascadeEncryptEnable_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeEncryptDisable command +CMD_CascadeEncryptDisable Disable Encryption when Communicating by Cascade Connection +CMD_CascadeEncryptDisable_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers not to be encrypted. \nNormally communication between VPN Servers is encrypted by SSL to prevent eavesdropping of information and fraud. You can also disable encryption. When encryption is disabled, the communication throughput improves but the communication data flows over the network in plain text. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeEncryptDisable_Args CascadeEncryptDisable [name] +CMD_CascadeEncryptDisable_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeCompressEnable command +CMD_CascadeCompressEnable Enable Data Compression when Communicating by Cascade Connection +CMD_CascadeCompressEnable_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers to be compressed. \nIt is possible to achieve a maximum of 80% compression. Compression however places higher loads on the CPU of both the client and server machines. When the line speed is about 10 Mbps or greater, compression can lower throughput, but sometimes it can have the opposite effect. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeCompressEnable_Args CascadeCompressEnable [name] +CMD_CascadeCompressEnable_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeCompressDisable command +CMD_CascadeCompressDisable Disable Data Compression when Communicating by Cascade Connection +CMD_CascadeCompressDisable_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers to be not compressed. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] +CMD_CascadeCompressDisable_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + +# CascadeProxyNone command +CMD_CascadeProxyNone Specify Direct TCP/IP Connection as the Connection Method of Cascade Connection +CMD_CascadeProxyNone_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeProxyNone_Args CascadeProxyNone [name] +CMD_CascadeProxyNone_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeProxyHttp command +CMD_CascadeProxyHttp Set Connection Method of Cascade Connection to be via an HTTP Proxy Server +CMD_CascadeProxyHttp_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Connect via HTTP Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the HTTP Proxy server to communicate via as well as a user name and password (when required). \nThe HTTP server that communication will travel via must be compatible with the CONNECT method to use HTTPS communication. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeProxyHttp_Args CascadeProxyHttp [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxyHttp_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeProxyHttp_SERVER Specify the host name or IP address, and port number of the on-route HTTP proxy server using the format [host name:port number]. +CMD_CascadeProxyHttp_USERNAME When user authentication is required to connect to the on-route HTTP proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_CascadeProxyHttp_PASSWORD When user authentication is required to connect to the on-route HTTP proxy server, specify the password. Specify this together with the /USERNAME parameter. +CMD_CascadeProxyHttp_Prompt_Server Proxy Server Host Name and Port Number: + + +# CascadeProxySocks command +CMD_CascadeProxySocks Set Connection Method of Cascade Connection to be via a SOCKS4 Proxy Server +CMD_CascadeProxySocks_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Connect via SOCKS4 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS4 Proxy server to communicate via as well as a user name and password (when required). \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeProxySocks_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeProxySocks_SERVER Specify the host name or IP address, and port number of the on-route SOCKS4 proxy server using the format "host name:port number". +CMD_CascadeProxySocks_USERNAME When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_CascadeProxySocks_PASSWORD When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the password. Specify this together with the /USERNAME parameter. + + +# CascadeProxySocks5 command +CMD_CascadeProxySocks5 Set Connection Method of Cascade Connection to be via a SOCKS5 Proxy Server +CMD_CascadeProxySocks5_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Connect via SOCKS5 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS Proxy server to communicate via as well as a user name and password (when required). \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeProxySocks5_Args CascadeProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks5_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeProxySocks5_SERVER Specify the host name or IP address, and port number of the on-route SOCKS5 proxy server using the format "host name:port number". +CMD_CascadeProxySocks5_USERNAME When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_CascadeProxySocks5_PASSWORD When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the password. Specify this together with the /USERNAME parameter. + + +# CascadeServerCertEnable command +CMD_CascadeServerCertEnable Enable Cascade Connection Server Certificate Verification Option +CMD_CascadeServerCertEnable_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to enable the option to check whether the SSL certificate provided by the destination VPN Server can be trusted. \nIf this option is enabled you must either use the CascadeServerCertSet command to save the connection destination server SSL certificate beforehand in the Cascade Connection Settings beforehand, or use the CAAdd command etc. to register a root certificate containing the signed server SSL certificate in the list of Virtual Hub trusted CA certificates. \nIf the certificate of the connected VPN Server cannot be trusted under the condition where the option to verify server certificates was enabled for the Cascade Connection, the connection will be promptly cancelled and continual reattempts at connection will be made. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeServerCertEnable_Args CascadeServerCertEnable [name] +CMD_CascadeServerCertEnable_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeServerCertDisable command +CMD_CascadeServerCertDisable Disable Cascade Connection Server Certificate Verification Option +CMD_CascadeServerCertDisable_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to disable the option to check whether the SSL certificate provided by the destination VPN Server can be trusted. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeServerCertDisable_Args CascadeServerCertDisable [name] +CMD_CascadeServerCertDisable_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeServerCertSet command +CMD_CascadeServerCertSet Set the Server Individual Certificate for Cascade Connection +CMD_CascadeServerCertSet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to register beforehand the same certificate as the SSL certificate provided by the destination VPN Server. \nIf the option to verify server certificates for Cascade Connections is enabled, you must either use this command to save the connection destination server SSL certificate beforehand in the Cascade Connection Settings beforehand, or use the CAAdd command etc. to register a root certificate containing the signed server SSL certificate in the list of Virtual Hub trusted CA certificates. \nIf the certificate of the connected VPN Server cannot be trusted under the condition where the option to verify server certificates was enabled for the Cascade Connection, the connection will be promptly cancelled and continual reattempts at connection will be made. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeServerCertSet_Args CascadeServerCertSet [name] [/LOADCERT:cert] +CMD_CascadeServerCertSet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeServerCertSet_LOADCERT Specify X.509 format certificate file name that the server individual certificate you wish to set is saved under. + + +# CascadeServerCertDelete command +CMD_CascadeServerCertDelete Delete the Server Individual Certificate for Cascade Connection +CMD_CascadeServerCertDelete_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and a server individual certificate is registered for that Cascade Connection, use this to delete that server individual certificate. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeServerCertDelete_Args CascadeServerCertDelete [name] +CMD_CascadeServerCertDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. + + +# CascadeServerCertGet command +CMD_CascadeServerCertGet Get the Server Individual Certificate for Cascade Connection +CMD_CascadeServerCertGet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and a server individual certificate is registered for that Cascade Connection, use this to get that certificate and save it as an X.509 format certificate file. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeServerCertGet_Args CascadeServerCertGet [name] [/SAVECERT:path] +CMD_CascadeServerCertGet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeServerCertGet_SAVECERT Specify the certificate file name to save the server individual certificate in X.509 format. + + +# CascadeDetailSet command +CMD_CascadeDetailSet Set Advanced Settings for Cascade Connection +CMD_CascadeDetailSet_Help Use this to customize the VPN protocol communication settings used when a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to the VPN Server. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeDetailSet_Args CascadeDetailSet [name] [/MAXTCP:max_connection] [/INTERVAL:interval] [/TTL:disconnect_span] [/HALF:yes|no] [/NOQOS:yes|no] +CMD_CascadeDetailSet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeDetailSet_MAXTCP Specify, using an integer in the range 1 to 32, the number of TCP connections to be used for VPN communication. By using data transmission by multiple TCP connections for VPN communication sessions with VPN Servers it is sometimes possible to increase communication speed. \nNote: We recommend about 8 lines when the connection lines to the server are fast, and 1 line when using a slow connection such as dialup. +CMD_CascadeDetailSet_INTERVAL When communicating by VPN by establishing multiple TCP connections, specify in seconds, the establishing interval for each TCP connection. The standard value is 1 second. +CMD_CascadeDetailSet_TTL When specifying connection life of each TCP connection specify in seconds the keep-alive time from establishing a TCP connection until disconnection. If 0 is specified, keep-alive will not be set. +CMD_CascadeDetailSet_HALF Specify "yes" when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. +CMD_CascadeDetailSet_NOQOS Specify "yes" when disabling VoIP / QoS functions. Normally "no" is specified. +CMD_CascadeDetailSet_Eval_MaxTcp Specify an integer in the range 1 to 32 for the number of TCP connections. +CMD_CascadeDetailSet_Eval_Interval Set at least 1 second for the interval to establish a TCP connection. +CMD_CascadeDetailSet_Prompt_MaxTcp Number of TCP Connections to Use in VPN Communication: +CMD_CascadeDetailSet_Prompt_Interval Interval between Establishing Each TCP Connection: +CMD_CascadeDetailSet_Prompt_TTL Connection Life of Each TCP Connection (0 for no keep-alive): +CMD_CascadeDetailSet_Prompt_HALF Enable half-duplex mode (yes/no): + + +# CascadePolicySet command +CMD_CascadePolicySet Set Cascade Connection Session Security Policy +CMD_CascadePolicySet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is established, use this to change the security policy contents that are applied to the session generated by the Virtual Hub. \nWhen a Virtual Hub makes a Cascade Connection to another VPN Server, a Cascade Session will be newly generated on the Virtual Hub that is the Cascade Connection source. You can use this command to set the security policy contents that will set this Cascade session. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadePolicySet_Args [name] [/NAME:policy_name] [/VALUE:num|yes|no] +CMD_CascadePolicySet_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadePolicySet_NAME Specify the name of policy whose values you want to change. You can use the PolicyList command to display a list of policy names and values that can be set. +CMD_CascadePolicySet_VALUE Specify a new policy value. If the policy is an integer value, specify an integer. Specify yes or no for Boolean types. You can view the type and value that can be set by using the PolicyList command. +CMD_CascadePolicySet_PROMPT_POLNAME Name of Policy Whose Value you want to Change: +CMD_CascadePolicySet_PROMPT_POLVALUE Value to newly set: +CMD_CascadePolicySet_Invalid_Name The specified policy name "%S" is invalid. \nCheck the list of policy names that can be set using the PolicyList command. +CMD_CascadePolicySet_Invalid_Name_For_Cascade The specified policy name "%S" cannot be used for a Cascade Connection security policy setting. +CMD_CascadePolicySet_Invalid_Range Specify policy "%S" within the range of %s. + + +# PolicyList command +CMD_PolicyList Display List of Security Policy Types and Settable Values +CMD_PolicyList_Help Use this to display a list of item names, descriptions, and settable values in the security policies that can be set for VPN Server users and groups and Cascade Connections. \nBy running the PolicyList command without specifying any parameters, a list of all supported security policy names and descriptions will be displayed. \nBy specifying the name using the PolicyList command parameter, a detailed description related to this value and the type and range of the settable value will be displayed. +CMD_PolicyList_Args PolicyList [name] +CMD_PolicyList_[name] This allows you to specify the policy name whose description you want to display. If you don't specify a name, a list of all supported security names and descriptions will be displayed. +CMD_PolicyList_Invalid_Name The specified policy name is invalid. +CMD_PolicyList_Column_1 Policy name +CMD_PolicyList_Column_2 Simple description of policy +CMD_PolicyList_Column_3 Setting value +CMD_PolicyList_Help_1 [Policy Name] +CMD_PolicyList_Help_2 [Simple Description of Policy] +CMD_PolicyList_Help_3 [Range of Settable Values] +CMD_PolicyList_Help_4 [Default Value] +CMD_PolicyList_Help_5 [Detailed Description of Policy] +CMD_PolicyList_Range_Bool yes or no +CMD_PolicyList_Range_Int_1 Range from %s to %s (0 cannot be specified) +CMD_PolicyList_Range_Int_2 Range from %s to %s (if 0 is specified, nothing is set) + + +# CascadeStatusGet command +CMD_CascadeStatusGet Get Current Cascade Connection Status +CMD_CascadeStatusGet_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeStatusGet_Args CascadeStatusGet [name] +CMD_CascadeStatusGet_[name] Specify the name of the Cascade Connection whose information you want to get. + + +# CascadeRename command +CMD_CascadeRename Change Name of Cascade Connection +CMD_CascadeRename_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeRename_Args CascadeRename [name] [/NEW:new_name] +CMD_CascadeRename_[name] Specify the current name of the Cascade Connection whose name you want to change. +CMD_CascadeRename_NEW Specify the new name after the change. +CMD_CascadeRename_PROMPT_OLD Current Name: +CMD_CascadeRename_PROMPT_NEW New Name: + + + +# CascadeOnline command +CMD_CascadeOnline Switch Cascade Connection to Online Status +CMD_CascadeOnline_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeOnline_Args CascadeOnline [name] +CMD_CascadeOnline_[name] Specify the name of the Cascade Connection to switch to online status. + + +# CascadeOffline command +CMD_CascadeOffline Switch Cascade Connection to Offline Status +CMD_CascadeOffline_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the CascadeOnline command \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CascadeOffline_Args CascadeOffline [name] +CMD_CascadeOffline_[name] Specify the name of the Cascade Connection to switch to offline status. + + +# AccessAdd command +CMD_AccessAdd Add Access List Rules (IPv4) +CMD_AccessAdd_Help Use this to add a new rule to the access list of the currently managed Virtual Hub. \nThe access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the AccessAddEx command to generate delays, jitters and packet losses. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessAdd_Args AccessAdd [pass|discard] [/MEMO:memo] [/PRIORITY:priority] [/SRCUSERNAME:username] [/DESTUSERNAME:username] [/SRCMAC:mac/mask] [/DESTMAC:mac/mask] [/SRCIP:ip/mask] [/DESTIP:ip/mask] [/PROTOCOL:tcp|udp|icmpv4|icmpv6|ip|num] [/SRCPORT:start-end] [/DESTPORT:start-end] [/TCPSTATE: established|unestablished] +CMD_AccessAdd_[pass|discard] When a packet matches this rule condition, this operation is decided. When pass is specified, the packet is allowed to pass, and when discard is specified, the packet is discarded. +CMD_AccessAdd_MEMO Specify a description (memo) for this rule. +CMD_AccessAdd_PRIORITY Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +CMD_AccessAdd_SRCIP Specify a source IPv4 address as a rule condition. Specify the IPv4 address in the format of "IP Address/Mask" by separating the decimal values using dots such as "192.168.0.1". For the mask, either specify decimal values separated by dots such as "255.255.255.0", or you can specify the bit length from the header using a decimal value such as "24". If you specify "0.0.0.0/0.0.0.0", this means all hosts. +CMD_AccessAdd_DESTIP Specify a destination IPv4 address as a rule condition in the format of "IP Address/Mask". Use the same method of specification as for the /SRCIP parameter. +CMD_AccessAdd_PROTOCOL Specify a protocol type as a rule condition. Input the IP protocol number using decimal values or specify one of the keywords "tcp" (TCP/IP protocol, no.6), "udp" (UDP/IP protocol, no.17), "icmpv4" (ICMPv4 protocol, no.1), "icmpv6" (ICMPv6 protocol, no.58) or "ip" (all protocols, no.0). Specify 0 to make the rule apply to all IP protocols. +CMD_AccessAdd_SRCPORT If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. When specifying, do so using the following method "1-1024" (1 to 1024), "23" (only 23). +CMD_AccessAdd_DESTPORT If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. Use the same method of specification as for the /SRCPORT parameter. +CMD_AccessAdd_SRCUSERNAME You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAdd_DESTUSERNAME You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAdd_SRCMAC Specify destination MAC address as a rule. Specify MAC address with "-" or ":" separators and hexadecimal number like "00-AC-84-EA-33-BC/FF-FF-FF-FF-FF-00". The separators are skippable. +CMD_AccessAdd_DESTMAC Specify destination MAC address as a rule. Use the same method of specification as for the /SRCMAC parameter. +CMD_AccessAdd_TCPSTATE Specify TCP connection state as a rule. Use Established or Unestablished. +CMD_AccessAdd_Prompt_TYPE Pass or Discard: +CMD_AccessAdd_Prompt_MEMO Rule Description (Memo): +CMD_AccessAdd_Prompt_PRIORITY Rule Priority: +CMD_AccessAdd_Eval_PRIORITY Specify an integer of 1 or higher for the priority. +CMD_AccessAdd_Prompt_SRCIP Source IP Address ("0.0.0.0/0" specifies all): +CMD_AccessAdd_Prompt_DESTIP Destination IP Address ("0.0.0.0/0" specifies all): +CMD_AccessAdd_Prompt_PROTOCOL Protocol No. or Protocol Name (tcp/udp/icmpv4/icmpv6/ip): +CMD_AccessAdd_Prompt_SRCPORT Source Port Number Range (tcp/udp only): +CMD_AccessAdd_Prompt_DESTPORT Destination Port Number Range (tcp/udp only): +CMD_AccessAdd_Prompt_SRCUSERNAME Source User Name (all when unspecified): +CMD_AccessAdd_Prompt_DESTUSERNAME Destination User Name (all when unspecified): +CMD_AccessAdd_Prompt_SRCMAC Source MAC Address and Mask (all when unspecified): +CMD_AccessAdd_Prompt_DESTMAC Destination MAC Address and Mask (all when unspecified): +CMD_AccessAdd_Prompt_TCPSTATE TCP Connection State (Established/Unestablished): + + +# AccessAddEx command +CMD_AccessAddEx Add Extended Access List Rules (IPv4: Delay, Jitter and Packet Loss Generating) +CMD_AccessAddEx_Help Use this to add a new rule to the access list of the currently managed Virtual Hub. You can set to generate delays, jitters and packet losses when a packet is passing via the Virtual Hub. \nThe access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the AccessAddEx command to generate delays, jitters and packet losses. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessAddEx_Args AccessAddEx [pass|discard] [/MEMO:memo] [/PRIORITY:priority] [/SRCUSERNAME:username] [/DESTUSERNAME:username] [/SRCMAC:mac/mask] [/DESTMAC:mac/mask] [/SRCIP:ip/mask] [/DESTIP:ip/mask] [/PROTOCOL:tcp|udp|icmpv4|icmpv6|ip|num] [/SRCPORT:start-end] [/DESTPORT:start-end] [/TCPSTATE: established|unestablished] [/DELAY:delay_millisec] [/JITTER:jitter_percent] [/LOSS:loss_percent] [/REDIRECTURL:url] +CMD_AccessAddEx_[pass|discard] When a packet matches this rule condition, this operation is decided. When pass is specified, the packet is allowed to pass, and when discard is specified, the packet is discarded. The setting of delays, jitters and packet losses is applied if the action is pass. +CMD_AccessAddEx_MEMO Specify a description (memo) for this rule. +CMD_AccessAddEx_PRIORITY Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +CMD_AccessAddEx_SRCIP Specify a source IPv4 address as a rule condition. Specify the IPv4 address in the format of "IP Address/Mask" by separating the decimal values using dots such as "192.168.0.1". For the mask, either specify decimal values separated by dots such as "255.255.255.0", or you can specify the bit length from the header using a decimal value such as "24". If you specify "0.0.0.0/0.0.0.0", this means all hosts. +CMD_AccessAddEx_DESTIP Specify a destination IPv4 address as a rule condition in the format of "IP Address/Mask". Use the same method of specification as for the /SRCIP parameter. +CMD_AccessAddEx_PROTOCOL Specify a protocol type as a rule condition. Input the IP protocol number using decimal values or specify one of the keywords "tcp" (TCP/IP protocol, no.6), "udp" (UDP/IP protocol, no.17), "icmpv4" (ICMPv4 protocol, no.1), "icmpv6" (ICMPv6 protocol, no.58) or "ip" (all protocols, no.0). Specify 0 to make the rule apply to all IP protocols. +CMD_AccessAddEx_SRCPORT If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. When specifying, do so using the following method "1-1024" (1 to 1024), "23" (only 23). +CMD_AccessAddEx_DESTPORT If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. Use the same method of specification as for the /SRCPORT parameter. +CMD_AccessAddEx_SRCUSERNAME You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAddEx_DESTUSERNAME You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAddEx_SRCMAC Specify destination MAC address as a rule. Specify MAC address with "-" or ":" separators and hexadecimal number like "00-AC-84-EA-33-BC/FF-FF-FF-FF-FF-00". The separators are skippable. +CMD_AccessAddEx_DESTMAC Specify destination MAC address as a rule. Use the same method of specification as for the /SRCMAC parameter. +CMD_AccessAddEx_TCPSTATE Specify TCP connection state as a rule. Use Established or Unestablished. +CMD_AccessAddEx_DELAY Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. +CMD_AccessAddEx_JITTER Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. +CMD_AccessAddEx_LOSS Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. +CMD_AccessAddEx_REDIRECTURL The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. +CMD_AccessAddEx_Prompt_DELAY Delays to Generate (in milliseconds: 0 - 10000): +CMD_AccessAddEx_Prompt_JITTER Fluctuation of Jitters to Generate (Percent: 0 - 100): +CMD_AccessAddEx_Prompt_LOSS Ratio of Packet Losses (Percent: 0 - 100): +CMD_AccessAddEx_Eval_DELAY Delays must be 10000 at maximum. +CMD_AccessAddEx_Eval_JITTER Fluctuation of Jitters must be 100 at maximum. +CMD_AccessAddEx_Eval_LOSS Ratio of Packet Losses must be 100 at maximum. + + +# AccessAdd6 command +CMD_AccessAdd6 Add Access List Rules (IPv6) +CMD_AccessAdd6_Help Use this to add a new rule to the access list of the currently managed Virtual Hub. \nThe access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the AccessAddEx6 command to generate delays, jitters and packet losses. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessAdd6_Args AccessAdd6 [pass|discard] [/MEMO:memo] [/PRIORITY:priority] [/SRCUSERNAME:username] [/DESTUSERNAME:username] [/SRCMAC:mac/mask] [/DESTMAC:mac/mask] [/SRCIP:ip/mask] [/DESTIP:ip/mask] [/PROTOCOL:tcp|udp|icmpv4|icmpv6|ip|num] [/SRCPORT:start-end] [/DESTPORT:start-end] [/TCPSTATE: established|unestablished] +CMD_AccessAdd6_[pass|discard] When a packet matches this rule condition, this operation is decided. When pass is specified, the packet is allowed to pass, and when discard is specified, the packet is discarded. +CMD_AccessAdd6_MEMO Specify a description (memo) for this rule. +CMD_AccessAdd6_PRIORITY Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +CMD_AccessAdd6_SRCIP Specify a source IPv6 address as a rule condition. Specify the IPv6 address in the format of "IP Address/Mask" by separating the hexadecimal values using colons such as "2001:200:0:1::". For the mask, either specify hexadecimal values separated by colons such as ffff:ffff:ffff:ffff::, or you can specify the bit length from the header using a decimal value such as "64". If you specify "::/0", this means all hosts. +CMD_AccessAdd6_DESTIP Specify a destination IPv6 address as a rule condition in the format of "IP Address/Mask". Use the same method of specification as for the /SRCIP parameter. +CMD_AccessAdd6_PROTOCOL Specify a protocol type as a rule condition. Input the IP protocol number using decimal values or specify one of the keywords "tcp" (TCP/IP protocol, no.6), "udp" (UDP/IP protocol, no.17), "icmpv4" (ICMPv4 protocol, no.1), "icmpv6" (ICMPv6 protocol, no.58) or "ip" (all protocols, no.0). Specify 0 to make the rule apply to all IP protocols. +CMD_AccessAdd6_SRCPORT If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. When specifying, do so using the following method "1-1024" (1 to 1024), "23" (only 23). +CMD_AccessAdd6_DESTPORT If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. Use the same method of specification as for the /SRCPORT parameter. +CMD_AccessAdd6_SRCUSERNAME You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAdd6_DESTUSERNAME You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAdd6_SRCMAC Specify destination MAC address as a rule. Specify MAC address with "-" or ":" separators and hexadecimal number like "00-AC-84-EA-33-BC/FF-FF-FF-FF-FF-00". The separators can be skipped. +CMD_AccessAdd6_DESTMAC Specify destination MAC address as a rule. Use the same method of specification as for the /SRCMAC parameter. +CMD_AccessAdd6_TCPSTATE Specify TCP connection state as a rule. Use Established or Unestablished. +CMD_AccessAdd6_Prompt_TYPE Pass or Discard: +CMD_AccessAdd6_Prompt_MEMO Rule Description (Memo): +CMD_AccessAdd6_Prompt_PRIORITY Rule Priority: +CMD_AccessAdd6_Eval_PRIORITY Specify an integer of 1 or higher for the priority. +CMD_AccessAdd6_Prompt_SRCIP Source IP Address ("::/0" specifies all): +CMD_AccessAdd6_Prompt_DESTIP Destination IP Address ("::/0" specifies all): +CMD_AccessAdd6_Prompt_PROTOCOL Protocol No. or Protocol Name (tcp/udp/icmpv4/icmpv6/ip): +CMD_AccessAdd6_Prompt_SRCPORT Source Port Number Range (tcp/udp only): +CMD_AccessAdd6_Prompt_DESTPORT Destination Port Number Range (tcp/udp only): +CMD_AccessAdd6_Prompt_SRCUSERNAME Source User Name (all when unspecified): +CMD_AccessAdd6_Prompt_DESTUSERNAME Destination User Name (all when unspecified): +CMD_AccessAdd6_Prompt_SRCMAC Source MAC Address and Mask (all when unspecified): +CMD_AccessAdd6_Prompt_DESTMAC Destination MAC Address and Mask (all when unspecified): +CMD_AccessAdd6_Prompt_TCPSTATE TCP Connection State (Established/Unestablished): + + +# AccessAddEx6 command +CMD_AccessAddEx6 Add Extended Access List Rules (IPv6: Delay, Jitter and Packet Loss Generating) +CMD_AccessAddEx6_Help Use this to add a new rule to the access list of the currently managed Virtual Hub. You can set to generate delays, jitters and packet losses when a packet is passing via the Virtual Hub. \nThe access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the AccessAddEx6 command to generate delays, jitters and packet losses. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessAddEx6_Args AccessAddEx6 [pass|discard] [/MEMO:memo] [/PRIORITY:priority] [/SRCUSERNAME:username] [/DESTUSERNAME:username] [/SRCMAC:mac/mask] [/DESTMAC:mac/mask] [/SRCIP:ip/mask] [/DESTIP:ip/mask] [/PROTOCOL:tcp|udp|icmpv4|icmpv6|ip|num] [/SRCPORT:start-end] [/DESTPORT:start-end] [/TCPSTATE: established|unestablished] [/DELAY:delay_millisec] [/JITTER:jitter_percent] [/LOSS:loss_percent] [/REDIRECTURL:url] +CMD_AccessAddEx6_[pass|discard] When a packet matches this rule condition, this operation is decided. When pass is specified, the packet is allowed to pass, and when discard is specified, the packet is discarded. The setting of delays, jitters and packet losses is applied if the action is pass. +CMD_AccessAddEx6_MEMO Specify a description (memo) for this rule. +CMD_AccessAddEx6_PRIORITY Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values. +CMD_AccessAddEx6_SRCIP Specify a source IPv6 address as a rule condition. Specify the IPv6 address in the format of "IP Address/Mask" by separating the hexadecimal values using colons such as "2001:200:0:1::". For the mask, either specify hexadecimal values separated by colons such as "ffff:ffff:ffff:ffff::", or you can specify the bit length from the header using a decimal value such as 64. If you specify "::/0", this means all hosts. +CMD_AccessAddEx6_DESTIP Specify a destination IPv6 address as a rule condition in the format of "IP Address/Mask". Use the same method of specification as for the /SRCIP parameter. +CMD_AccessAddEx6_PROTOCOL Specify a protocol type as a rule condition. Input the IP protocol number using decimal values or specify one of the keywords "tcp" (TCP/IP protocol, no.6), "udp" (UDP/IP protocol, no.17), "icmpv4" (ICMPv4 protocol, no.1), "icmpv6" (ICMPv6 protocol, no.58) or "ip" (all protocols, no.0). Specify 0 to make the rule apply to all IP protocols. +CMD_AccessAddEx6_SRCPORT If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers. When specifying, do so using the following method "1-1024" (1 to 1024), "23" (only 23). +CMD_AccessAddEx6_DESTPORT If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. Use the same method of specification as for the /SRCPORT parameter. +CMD_AccessAddEx6_SRCUSERNAME You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAddEx6_DESTUSERNAME You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name. +CMD_AccessAddEx6_SRCMAC Specify destination MAC address as a rule. Specify MAC address with "-" or ":" separators and hexadecimal number like "00-AC-84-EA-33-BC/FF-FF-FF-FF-FF-00". The separators can be skipped. +CMD_AccessAddEx6_DESTMAC Specify destination MAC address as a rule. Use the same method of specification as for the /SRCMAC parameter. +CMD_AccessAddEx6_TCPSTATE Specify TCP connection state as a rule. Use Established or Unestablished. +CMD_AccessAddEx6_DELAY Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most. +CMD_AccessAddEx6_JITTER Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate. +CMD_AccessAddEx6_LOSS Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate. +CMD_AccessAddEx6_REDIRECTURL The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address. +CMD_AccessAddEx6_Prompt_DELAY Delays to Generate (in milliseconds: 0 - 10000): +CMD_AccessAddEx6_Prompt_JITTER Fluctuation of Jitters to Generate (Percent: 0 - 100): +CMD_AccessAddEx6_Prompt_LOSS Ratio of Packet Losses (Percent: 0 - 100): +CMD_AccessAddEx6_Eval_DELAY Delays must be 10000 at maximum. +CMD_AccessAddEx6_Eval_JITTER Fluctuation of Jitters must be 100 at maximum. +CMD_AccessAddEx6_Eval_LOSS Ratio of Packet Losses must be 100 at maximum. + + +# AccessList command +CMD_AccessList Get Access List Rule List +CMD_AccessList_Help Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. \nThe access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessList_Args AccessList + + +# AccessDelete command +CMD_AccessDelete Delete Rule from Access List +CMD_AccessDelete_Help Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. \nTo delete a rule, you must specify that rule's ID. You can display the ID by using the AccessList command. \nIf you wish not to delete the rule but to only temporarily disable it, use the AccessDisable command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessDelete_Args AccessDelete [id] +CMD_AccessDelete_[id] Specify either the ID or the Unique ID of the rule to delete. +CMD_Access_Prompt_ID Access List Rule ID or Unique ID: + + +# AccessEnable command +CMD_AccessEnable Enable Access List Rule +CMD_AccessEnable_Help Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and enable it. The enabled rule will be used by packet filtering. \nTo enable a rule, you must specify that rule's ID. You can display the ID by using the AccessList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessEnable_Args AccessEnable [id] +CMD_AccessEnable_[id] Specify the ID of the rule to enable. + + +# AccessDisable command +CMD_AccessDisable Disable Access List Rule +CMD_AccessDisable_Help Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and disable it. The disabled rule will be used by packet filtering. \nTo disable a rule, you must specify that rule's ID. You can display the ID by using the AccessList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_AccessDisable_Args AccessDisable [id] +CMD_AccessDisable_[id] Specify the ID of the rule to disable. + + +# UserList command +CMD_UserList Get List of Users +CMD_UserList_Help Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserList_Args UserList + + +# UserCreate command +CMD_UserCreate Create User +CMD_UserCreate_Help Use this to create a new user in the security account database of the currently managed Virtual Hub. \nBy creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. \nWhen a user is created using the UserCreate command and the auth type of that user is registered as Password Authentication, a random string will be assigned as the password. Therefore, that user will not be able to connect to the Virtual Hub in that state. After creating the user, you must always use the UserPasswordSet command to specify the user password, or alternatively use the UserAnonymousSet command, UserCertSet command, UserSignedSet command, UserRadiusSet command or UserNTLMSet command to change the user's auth type. \nNote that a user whose user name has been created as "*" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "*" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". \nTo change the user information of a user that has been created, use the UserSet command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserCreate_Args UserCreate [name] [/GROUP:group] [/REALNAME:realname] [/NOTE:note] +CMD_UserCreate_[name] Specify the user name of the user to be newly created. +CMD_UserCreate_GROUP When assigning a user in a group, specify the group name. When not assigning a user to any group, specify /GROUP:none. +CMD_UserCreate_REALNAME Specify the user's full name. If you are not specifying this, specify /REALNAME:none. +CMD_UserCreate_NOTE Specify a description of the user. If you are not specifying this, specify /NOTE:none +CMD_UserCreate_Prompt_NAME User Name: +CMD_UserCreate_Prompt_GROUP Assigned Group Name: +CMD_UserCreate_Prompt_REALNAME User Full Name: +CMD_UserCreate_Prompt_NOTE User Description: + + +# UserSet command +CMD_UserSet Change User Information +CMD_UserSet_Help Use this to change user information that is registered on the security account database of the currently managed Virtual Hub. \nThe user information that can be changed using this command are the three items that are specified when a new user is created using the UserCreate command: Group Name, Full Name, and Description. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserSet_Args UserSet [name] [/GROUP:group] [/REALNAME:realname] [/NOTE:note] +CMD_UserSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserSet_GROUP When assigning a user in a group, specify the group name. When not assigning a user to any group, specify /GROUP:none. +CMD_UserSet_REALNAME Specify the user's full name. If you are not specifying this, specify /REALNAME:none +CMD_UserSet_NOTE Specify a description of the user. If you are not specifying this, specify /NOTE:none. + + +# UserDelete command +CMD_UserDelete Delete User +CMD_UserDelete_Help Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. \nYou can use the UserPolicySet command to instead of deleting a user, set the user to be temporarily denied from logging in. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserDelete_Args UserDelete [name] +CMD_UserDelete_[name] Specify the name of the user to delete. + + +# UserGet command +CMD_UserGet Get User Information +CMD_UserGet_Help Use this to get user registration information that is registered on the security account database of the currently managed Virtual Hub. \nThe information that you can get using this command are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserGet_Args UserGet [name] +CMD_UserGet_[name] Specify the user name of the user whose information you want to get. +CMD_UserGet_Column_Name User Name +CMD_UserGet_Column_RealName Full Name +CMD_UserGet_Column_Note Description +CMD_UserGet_Column_Group Group Name +CMD_UserGet_Column_Expires Expiration Date +CMD_UserGet_Column_AuthType Auth Type +CMD_UserGet_Column_UserCert Registered User Individual Certificate +CMD_UserGet_Column_RadiusAlias External Authentication Server Authentication User Name +CMD_UserGet_Column_RootCert_CN Limit of Certificate CN Value +CMD_UserGet_Column_RootCert_SERIAL Limit of Certificate Serial Number +CMD_UserGet_Policy Security Policy Set for this User + + +# UserAnonymousSet command +CMD_UserAnonymousSet Set Anonymous Authentication for User Auth Type +CMD_UserAnonymousSet_Help Use this to set Anonymous Authentication as the auth type for a user that is registered on the security account database of the currently managed Virtual Hub. A VPN Client that has connected to a Virtual Hub using a user name of a user set to anonymous authentication can connect to a Virtual Hub without undergoing user authentication and without conditions. The anonymous authentication function is ideally suited to public VPN Servers that are setup to allow anyone to connect via the Internet etc. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserAnonymousSet_Args UserAnonymousSet [name] +CMD_UserAnonymousSet_[name] Specify the user name of the user whose setting you want to change. + + +# UserPasswordSet command +CMD_UserPasswordSet Set Password Authentication for User Auth Type and Set Password +CMD_UserPasswordSet_Help Use this to set Password Authentication as the auth type for a user that is registered on the security account database of the currently managed Virtual Hub. Password Authentication requires a user-defined password to be set for the user object in the security account database of the Virtual Hub and when a user attempts to connect to the Virtual Hub using this user name, they will be prompted to input a password and if it is the matching password, connection will be allowed. \nThe user password is actually saved in hash code which means even if the VPN Server setting file is analyzed, the original password cannot be deciphered. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserPasswordSet_Args UserPasswordSet [name] [/PASSWORD:password] +CMD_UserPasswordSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserPasswordSet_PASSWORD Specify the password to be set for the user. If this parameter is not specified a prompt will appear to input the password. + + +# UserCertSet command +CMD_UserCertSet Set Individual Certificate Authentication for User Auth Type and Set Certificate +CMD_UserCertSet_Help Use this to set Individual Certificate Authentication as the Auth Type for a user that is registered on the security account database of the currently managed Virtual Hub. Individual Certificate Authentication requires one X.509 format certificate to be set for the user object in the security account database of the Virtual Hub and when a user attempts to connect to the Virtual Hub using this user name, an RSA algorithm is used to verify if the provided certificate matches the registered certificate and whether the client holds a private key that corresponds to that certificate and if so, connection is allowed. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserCertSet_Args UserCertSet [name] [/LOADCERT:cert] +CMD_UserCertSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserCertSet_LOADCERT Specify the certificate to set for the user by specifying an X.509 format certificate file. + + +# UserCertGet command +CMD_UserCertGet Get Certificate Registered for Individual Certificate Authentication User +CMD_UserCertGet_Help Use this to get an X.509 format certificate registered for a user of Individual Certificate Authentication who is registered in the security account database of the currently managed Virtual Hub and save it to file. \nIf the specified user is not set as Individual Certificate Authentication an error will occur. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserCertGet_Args UserCertGet [name] [/SAVECERT:cert] +CMD_UserCertGet_[name] Specify the user name of the user whose information you want to get. +CMD_UserCertGet_SAVECERT Specify the file name to save, in X.509 format, the user certificate you obtained. +CMD_UserCertGet_Not_Cert Either the user is not set as individual certificate authentication or a unique certificate is not set. + + +# UserSignedSet command +CMD_UserSignedSet Set Signed Certificate Authentication for User Auth Type +CMD_UserSignedSet_Help Use this to set Signed Certificate Authentication as the auth type for a user that is registered on the security account database of the currently managed Virtual Hub. When a user connects to a Virtual Hub using a user name that is set for signed certificate authentication, an RSA algorithm is used to verify whether the certificate provided by the user is signed by any of the certificates in the list of trusted CA certificates of that Virtual Hub and whether the client holds a private key that corresponds with that certificate, and if so, connection is allowed. \nIt is also possible to set the connection to be allowed only when a certificate common name (CN) and serial number that is expected for each user is registered and the contents of the certificate after the abovementioned verification is passed matches the set value. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserSignedSet_Args UserSignedSet [name] [/CN:cn] [/SERIAL:serial] +CMD_UserSignedSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserSignedSet_CN When this parameter is set, after it has been verified that the certificate that the user provided has been signed by the trusted certificate authority, connection will only be allowed when the value of the common name (CN) of this certificate is compared with the value set by this parameter and the values match. When "none" is specified, this check is not made. +CMD_UserSignedSet_SERIAL When this parameter is set, after it has been verified that the certificate that the user provided has been signed by the trusted certificate authority, connection will only be allowed when the value of the serial number of this certificate is compared with the value set by this parameter and the values match. When "none" is specified, this check is not made. +CMD_UserSignedSet_Prompt_CN Limit of Common Name (CN) Value: +CMD_UserSignedSet_Prompt_SERIAL Limit of Serial Number Value: + + +# UserRadiusSet command +CMD_UserRadiusSet Set RADIUS Authentication for User Auth Type +CMD_UserRadiusSet_Help Use this to set RADIUS Authentication as the auth type for a user that is registered on the security account database of the currently managed Virtual Hub. When a user connects to a Virtual Hub using a user name that is set for RADIUS authentication, the user name and the user input password is sent to the RADIUS server where the RADIUS SERVER checks the user name and password, then if the verification is successful, that user is allowed VPN connection. \nIn order to user RADIUS authentication, the RADIUS server used for this verification must be set in the Virtual Hub beforehand by using the RadiusServerSet command. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserRadiusSet_Args UserRadiusSet [name] [/ALIAS:alias_name] +CMD_UserRadiusSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserRadiusSet_ALIAS When this parameter is set, it is possible to make the user name sent to the RADIUS server different to the user name on the Virtual Hub. When this is not set, please specify /ALIAS:none (the user name on the Virtual Hub will be used). If the user name is "*", the /ALIAS parameter will be ignored. To read an explanation of the "*" user, please input UserCreate/HELP to display this information. +CMD_UserRadiusSet_Prompt_ALIAS Alias Name for Authentication (Optional): + + +# UserNTLMSet コマンド +CMD_UserNTLMSet Set NT Domain Authentication for User Auth Type +CMD_UserNTLMSet_Help Use this to set NT Domain Authentication as the auth type for a user that is registered on the security account database of the currently managed Virtual Hub. When a user connects to a Virtual Hub using a user name that is set for NT Domain authentication, the user name and the user input password is sent to the Windows NT / 2000 / Server 2003 / Server 2008 / Server 2008 R2 / Server 2012 Domain Controller or Active Directory Server where the server checks the user name and password, then if the verification is successful, that user is allowed VPN connection. \nTo use NT Domain authentication, the VPN Server must be operating on a Windows NT 4.0, Windows 2000, Windows XP, Windows Vista, Windows Server 2008, Windows Server 2008 R2 or Windows Server 2012 operating system that is connected to that domain. For details please contact the VPN Server's administrator. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserNTLMSet_Args UserNTLMSet [name] [/ALIAS:alias_name] +CMD_UserNTLMSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserNTLMSet_ALIAS When this parameter is set, it is possible to make the user name sent to the NT Domain or Active Directory server different to the user name on the Virtual Hub. When this is not set, please specify /ALIAS:none (the user name on the Virtual Hub will be used). If the user name is "*", the /ALIAS parameter will be ignored. To read an explanation of the "*" user, please input UserCreate/HELP to display this information. + + +# UserPolicyRemove command +CMD_UserPolicyRemove Delete User Security Policy +CMD_UserPolicyRemove_Help Use this to delete the security policy setting that is set for a user that is registered on the security account database of the currently managed Virtual Hub. A user who has had their security policy setting deleted will be assigned the security policy setting of the group that user is assigned to. In the cases where the user is not assigned to a group or when a security policy setting has not been set for the group, the default values (Allow Access: Enabled, Maximum Number of TCP Connections: 32, Time-out Period: 20 seconds) will be applied. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserPolicyRemove_Args UserPolicyRemove [name] +CMD_UserPolicyRemove_[name] Specify the user name of the user whose setting you want to change. + + +# UserPolicySet command +CMD_UserPolicySet Set User Security Policy +CMD_UserPolicySet_Help Use this to set the security policy contents that are set for a user that is registered on the security account database of the currently managed Virtual Hub. \nWhen a user has not been set a security policy, use this to change the specified values after a new default security policy has been set. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserPolicySet_Args UserPolicySet [name] [/NAME:policy_name] [/VALUE:num|yes|no] +CMD_UserPolicySet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserPolicySet_NAME Specify the name of policy whose values you want to change. You can use the PolicyList command to display a list of policy names and values that can be set. +CMD_UserPolicySet_VALUE Specify a new policy value. If the policy is an integer value, specify an integer. Specify yes or no for Boolean types. You can view the type and value that can be set by using the PolicyList command. + + +# UserExpiresSet command +CMD_UserExpiresSet Set User's Expiration Date +CMD_UserExpiresSet_Help Use this to set the user's expiration date that is registered on the security account database of the currently managed Virtual Hub. A user whose expiration date has expired cannot connect to the Virtual Hub. \nTo get the list of currently registered users, use the UserList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_UserExpiresSet_Args UserExpiresSet [name] [/EXPIRES:expires] +CMD_UserExpiresSet_[name] Specify the user name of the user whose setting you want to change. +CMD_UserExpiresSet_EXPIRES Specify the user expiration date and time. The date and time must be in the same format as "2005/10/08 19:30:00" where 6 integers are specified, representing year/month/day hour:minute:second separated by forward slashes, a space and then colons. Specify 4 digits for the year. If you put a space in a value, the entire value must be enclosed by "". For this specification, local time (standard time for the computer on which the command line management utility is running) can be specified. By specifying /EXPIRES:none, you can remove the expiration date restriction. +CMD_UserExpiresSet_Prompt_EXPIRES User Expiration Date (no expiration if nothing specified): + + +# GroupList command +CMD_GroupList Get List of Groups +CMD_GroupList_Help Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupList_Args GroupList + + +# GroupCreate command +CMD_GroupCreate Create Group +CMD_GroupCreate_Help Use this to create a new group in the security account database of the currently managed Virtual Hub. \nYou can register multiple users in a group. To register users in a group use the GroupJoin command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupCreate_Args GroupCreate [name] [/REALNAME:realname] [/NOTE:note] +CMD_GroupCreate_[name] Specify the name of the group to create. +CMD_GroupCreate_REALNAME Specify the group's full name. For example, if the group corresponds to an actual section or department name, specify that name. If you are not specifying this, specify /REALNAME:none +CMD_GroupCreate_NOTE Specify a description of the group. If you are not specifying this, specify /NOTE:none +CMD_GroupCreate_Prompt_NAME Group Name: +CMD_GroupCreate_Prompt_REALNAME Group Full Name: +CMD_GroupCreate_Prompt_NOTE Group Description: + + +# GroupSet command +CMD_GroupSet Set Group Information +CMD_GroupSet_Help Use this to set group information that is registered on the security account database of the currently managed Virtual Hub. \nTo get the list of currently registered groups, use the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupSet_Args GroupSet [name] [/REALNAME:realname] [/NOTE:note] +CMD_GroupSet_[name] Specify the group name of the group whose setting you want to change. +CMD_GroupSet_REALNAME Specify the group's Full name. For example, if the group corresponds to an actual section or department name, specify that name. If you are not specifying this, specify /REALNAME:none +CMD_GroupSet_NOTE Specify a description of the group. If you are not specifying this, specify /NOTE:none. + + +# GroupDelete command +CMD_GroupDelete Delete Group +CMD_GroupDelete_Help Use this to delete a group that is registered on the security account database of the currently managed Virtual Hub. \nWhen you delete a group all users assigned to that group will become unassigned. \nTo get the list of currently registered groups, use the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupDelete_Args GroupDelete [name] +CMD_GroupDelete_[name] Specify the name of the group to delete. + + +# GroupGet command +CMD_GroupGet Get Group Information and List of Assigned Users +CMD_GroupGet_Help Use this to get the information of a group that is registered on the security account database of the currently managed Virtual Hub as well as a list of users assigned to that group. \nTo get the list of currently registered groups, use the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupGet_Args GroupGet [name] +CMD_GroupGet_[name] Specify the group name of the group whose information you want to get. +CMD_GroupGet_Column_NAME Group Name +CMD_GroupGet_Column_REALNAME Full Name +CMD_GroupGet_Column_NOTE Description +CMD_GroupGet_Column_POLICY This is the security policy that is set for this group. +CMD_GroupGet_Column_MEMBERS This is a list of user names of users who are assigned to this group. + + +# GroupJoin command +CMD_GroupJoin Add User to Group +CMD_GroupJoin_Help Use this to add a user in the security account database of the currently managed Virtual Hub to a group that is registered on that security account database. \nTo get a list of users and groups that are currently registered, use the UserList command and the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupJoin_Args GroupJoin [name] [/USERNAME:username] +CMD_GroupJoin_[name] Specify the group name of the group to which you want to add a user. +CMD_GroupJoin_USERNAME Specify the user name of the user you want to add to the group specified by "name". +CMD_GroupJoin_Prompt_USERNAME Name of User to Join Group: + + +# GroupUnjoin command +CMD_GroupUnjoin Delete User from Group +CMD_GroupUnjoin_Help Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. \nTo get a list of users that are currently assigned to a group, use the GroupGet command. \nTo get the list of currently registered groups, use the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupUnjoin_Args GroupUnjoin [name] +CMD_GroupUnjoin_[name] Specify the name of the user to delete from the group. +CMD_GroupUnjoin_Prompt_name Name of User to Delete from Group: + + +# GroupPolicyRemove command +CMD_GroupPolicyRemove Delete Group Security Policy +CMD_GroupPolicyRemove_Help Use this to delete the security policy setting that is set for a group that is registered on the security account database of the currently managed Virtual Hub. Users who do not have a security policy set for the user themselves or for the group they are assigned to, will have the default values (Allow Access: Enabled, Maximum Number of TCP Connections: 32, Time-out Period: 20 seconds) applied to them. \nTo get the list of currently registered groups, use the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupPolicyRemove_Args GroupPolicyRemove [name] +CMD_GroupPolicyRemove_[name] Specify the group name of the group whose setting you want to change. + + +# GroupPolicySet command +CMD_GroupPolicySet Set Group Security Policy +CMD_GroupPolicySet_Help Use this to set the security policy contents that are set for a group that is registered on the security account database of the currently managed Virtual Hub. \nWhen a group has not been set a security policy, use this to change the specified values after a new default security policy has been set. \nTo get the list of currently registered groups, use the GroupList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a member server on a cluster. +CMD_GroupPolicySet_Args GroupPolicySet [name] [/NAME:policy_name] [/VALUE:num|yes|no] +CMD_GroupPolicySet_[name] Specify the group name of the group whose setting you want to change. +CMD_GroupPolicySet_NAME Specify the name of policy whose values you want to change. You can use the PolicyList command to display a list of policy names and values that can be set. +CMD_GroupPolicySet_VALUE Specify a new policy value. If the policy is an integer value, specify an integer. Specify yes or no for Boolean types. You can view the type and value that can be set by using the PolicyList command. + + +# SessionList command +CMD_SessionList Get List of Connected Sessions +CMD_SessionList_Help Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be displayed for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. \nIf the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. \nIn all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained. +CMD_SessionList_Args SessionList + + +# SessionGet command +CMD_SessionGet Get Session Information +CMD_SessionGet_Help Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session information includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. \nTo get the list of currently connected sessions, use the SessionList command. +CMD_SessionGet_Args SessionGet [name] +CMD_SessionGet_[name] Specify the session name of the session whose information you want to get. +CMD_SessionGet_Prompt_NAME Session name: + + +# SessionDisconnect command +CMD_SessionDisconnect Disconnect Session +CMD_SessionDisconnect_Help Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. \nNote that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. \nTo get the list of currently connected sessions, use the SessionList command. +CMD_SessionDisconnect_Args SessionDisconnect [name] +CMD_SessionDisconnect_[name] Specify the session name of the session to disconnect. + + +# MacTable command +CMD_MacTable Get the MAC Address Table Database +CMD_MacTable_Help Use this to get the MAC address table database that is held by the currently managed Virtual Hub. \nThe MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication throughput. \nBy specifying the session name you can get the MAC address table entry that has been associated with that session. +CMD_MacTable_Args MacTable [session_name] +CMD_MacTable_[session_name] By specifying the session name as a parameter, you can display only the MAC address table entry that is associated with that session. When this is left unspecified, all the entries will be displayed. + + +# MacDelete command +CMD_MacDelete Delete MAC Address Table Entry +CMD_MacDelete_Help Use this command to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. \nTo get the contents of the current MAC address table database use the MacTable command. +CMD_MacDelete_Args MacDelete [id] +CMD_MacDelete_[id] Specify the ID of the MAC address table entry to delete. +CMD_MacDelete_Prompt ID to Delete: + + +# IpTable command +CMD_IpTable Get the IP Address Table Database +CMD_IpTable_Help Use this to get the IP address table database that is held by the currently managed Virtual Hub. \nThe IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. \nBy specifying the session name you can get the IP address table entry that has been associated with that session. +CMD_IpTable_Args IpTable [session_name] +CMD_IpTable_[session_name] By specifying the session name as a parameter, you can display only the IP address table entry that is associated with that session. When this is left unspecified, all the entries will be displayed. + + +# IpDelete command +CMD_IpDelete Delete IP Address Table Entry +CMD_IpDelete_Help Use this command to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. \nTo get the contents of the current IP address table database use the IpTable command. +CMD_IpDelete_Args IpDelete [id] +CMD_IpDelete_[id] Specify the ID of the IP address table entry to delete. + + +# SecureNatEnable command +CMD_SecureNatEnable Enable the Virtual NAT and DHCP Server Function (SecureNat Function) +CMD_SecureNatEnable_Help Use this to enable the Virtual NAT and DHCP Server function (SecureNat Function) on the currently managed Virtual Hub and begin its operation. Before executing this command, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SecureNatHostGet command, NatGet command and DhcpGet command. \nBy enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. \n\n[Warning about SecureNAT Function]\nThe SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. \nIf you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SecureNatEnable_Args SecureNatEnable + + +# SecureNatDisable command +CMD_SecureNatDisable Disable the Virtual NAT and DHCP Server Function (SecureNat Function) +CMD_SecureNatDisable_Help Use this to disable the Virtual NAT and DHCP Server function (SecureNat Function) on the currently managed Virtual Hub. By executing this command the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SecureNatDisable_Args SecureNatDisable + + +# SecureNatStatusGet command +CMD_SecureNatStatusGet Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNat Function) +CMD_SecureNatStatusGet_Help Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNat Function) when it is operating on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SecureNatStatusGet_Args SecureNatStatusGet + + +# SecureNatHostGet command +CMD_SecureNatHostGet Get Network Interface Setting of Virtual Host of SecureNAT Function +CMD_SecureNatHostGet_Help Use this to get the virtual host network interface setting from the setting items of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. \nThe SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. \n\n[Warning about SecureNAT Function]\nThe SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. \nIf you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SecureNatHostGet_Args SecureNatHostGet +CMD_SecureNatHostGet_Column_MAC MAC Address +CMD_SecureNatHostGet_Column_IP IP Address +CMD_SecureNatHostGet_Column_MASK Subnet Mask +CMD_SecureNatHostGet_Column_LOG Save NAT and DHCP Operation Log + + +# SecureNatHostSet command +CMD_SecureNatHostSet Change Network Interface Setting of Virtual Host of SecureNAT Function +CMD_SecureNatHostSet_Help Use this to change and save the virtual host network interface setting in the setting items of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. \nThe SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. \n\n[Warning about SecureNAT Function]\nThe SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. \nIf you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SecureNatHostSet_Args SecureNatHostSet [/MAC:mac] [/IP:ip] [/MASK:mask] +CMD_SecureNatHostSet_MAC Specify the MAC address to assign for the virtual interface. Specify a MAC address using a string like "00-AC-01-23-45-67". When /MAC:none is specified, no changes will be made to the current setting. +CMD_SecureNatHostSet_IP Specify the IP address to assign for the virtual interface. When /IP:none is specified, no changes will be made to the current setting. +CMD_SecureNatHostSet_MASK Specify the subnet mask to assign for the virtual interface. When /MASK:none is specified, no changes will be made to the current setting. +CMD_SecureNatHostSet_Prompt_MAC MAC Address: +CMD_SecureNatHostSet_Prompt_IP IP Address: +CMD_SecureNatHostSet_Prompt_MASK Subnet Mask: + + +# NatGet command +CMD_NatGet Get Virtual NAT Function Setting of SecureNAT Function +CMD_NatGet_Help Use this to get the virtual NAT setting from the setting items of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_NatGet_Args NatGet +CMD_NatGet_Column_USE Use Virtual NAT Function +CMD_NetGet_Column_MTU MTU Value +CMD_NatGet_Column_TCP TCP Session Timeout (Seconds) +CMD_NatGet_Column_UDP UDP Session Timeout (Seconds) + + +# NatEnable command +CMD_NatEnable Enable Virtual NAT Function of SecureNAT Function +CMD_NatEnable_Help Use this to enable the Virtual NAT function on the currently managed Virtual Hub. \nIf the SecureNAT function is still not operating even after this command has been used to enable the Virtual NAT function, Virtual NAT is not operating. To start the operation of the SecureNAT Function, use the SecureNatEnable command. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_NatEnable_Args NatEnable + + +# NatDisable command +CMD_NatDisable Disable Virtual NAT Function of SecureNAT Function +CMD_NatDisable_Help Use this to disable the Virtual NAT function on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_NatDisable_Args NatDisable + + +# NatSet command +CMD_NatSet Change Virtual NAT Function Setting of SecureNAT Function +CMD_NatSet_Help Use this to change the Virtual NAT setting of the currently managed Virtual Hub. The contents of the Virtual NAT setting includes: MTU value, TCP session timeout and UDP session timeout \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_NatSet_Args NatSet [/MTU:mtu] [/TCPTIMEOUT:tcp_timeout] [/UDPTIMEOUT:udp_timeout] [/LOG:yes|no] +CMD_NatSet_MTU Set the MTU (Maximum transferable unit size) using an integer to specify the byte length unit. This value is the maximum payload length excluding the MAC header of the Ethernet frame that the Virtual NAT sends and the default is 1500 bytes. +CMD_NatSet_TCPTIMEOUT This sets how many seconds a condition of non-communication continues in a TCP session that the Virtual NAT is relaying before a timeout occurs and the session is discarded. +CMD_NatSet_UDPTIMEOUT This sets how many seconds a condition of non-communication continues in a UDP session that the Virtual NAT is relaying before a timeout occurs and the session is discarded. +CMD_NatSet_LOG Specify whether or not to save the Virtual NAT operation in the Virtual Hub security log. Specify "yes" to save it, and "no" to not save it. +CMD_NatSet_Prompt_MTU MTU Value: +CMD_NatSet_Prompt_TCPTIMEOUT TCP Session Timeout (Seconds): +CMD_NatSet_Prompt_UDPTIMEOUT UDP Session Timeout (Seconds): +CMD_NatSet_Prompt_LOG Save Log (yes / no): +CMD_NatSet_Eval_MTU Specify a value in the range %d to %d for the MTU value. +CMD_NatSet_Eval_TCP Specify the number of seconds in the range %d to %d for the TCP session timeout. +CMD_NatSet_Eval_UDP Specify the number of seconds in the range %d to %d for the UDP session timeout. + + +# NatTable command +CMD_NatTable Get Virtual NAT Function Session Table of SecureNAT Function +CMD_NatTable_Help Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_NatTable_Args NatTable + + +# DhcpGet command +CMD_DhcpGet Get Virtual DHCP Server Function Setting of SecureNAT Function +CMD_DhcpGet_Help Use this to get the virtual DHCP Server setting from the setting items of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_DhcpGet_Args DhcpGet +CMD_DhcpGet_Column_Log Record Log of NAT and DHCP Operation +CMD_DhcpGet_Column_USE Use Virtual DHCP Function +CMD_DhcpGet_Column_IP1 Start Distribution Address Band +CMD_DhcpGet_Column_IP2 End Distribution Address Band +CMD_DhcpGet_Column_MASK Subnet Mask +CMD_DhcpGet_Column_LEASE Lease Limit (Seconds) +CMD_DhcpGet_Column_GW Default Gateway Address +CMD_DhcpGet_Column_DNS DNS Server Address 1 +CMD_DhcpGet_Column_DNS2 DNS Server Address 2 +CMD_DhcpGet_Column_DOMAIN Domain Name +CMD_DhcpGet_Column_PUSHROUTE Static Routing Table to Push + + +# DhcpEnable command +CMD_DhcpEnable Enable Virtual DHCP Server Function of SecureNAT Function +CMD_DhcpEnable_Help Use this to enable the Virtual DHCP Server function on the currently managed Virtual Hub. \nIf the SecureNAT function is still not operating even after this command has been used to enable the Virtual DHCP function, Virtual DHCP Server is not operating. To start the operation of the SecureNAT Function, use the SecureNatEnable command. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_DhcpEnable_Args DhcpEnable + + +# DhcpDisable command +CMD_DhcpDisable Disable Virtual DHCP Server Function of SecureNAT Function +CMD_DhcpDisable_Help Use this to disable the Virtual DHCP Server function on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_DhcpDisable_Args DhcpDisable + + +# DhcpSet command +CMD_DhcpSet Change Virtual DHCP Server Function Setting of SecureNAT Function +CMD_DhcpSet_Help Use this to change the Virtual DHCP Server setting of the currently managed Virtual Hub. The Virtual DHCP Server settings include the following items: distribution address band, subnet mask, lease limit, and option values assigned to clients. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_DhcpSet_Args DhcpSet [/START:start_ip] [/END:end_ip] [/MASK:subnetmask] [/EXPIRE:sec] [/GW:gwip] [/DNS:dns] [/DNS2:dns2][/DOMAIN:domain] [/LOG:yes|no] [/PUSHROUTE:"routing_table"] +CMD_DhcpSet_START Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10) +CMD_DhcpSet_END Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200) +CMD_DhcpSet_MASK Specify the subnet mask to be specified for the client. (Example: 255.255.255.0) +CMD_DhcpSet_EXPIRE Specify the expiration date in second units for leasing an IP address to a client. +CMD_DhcpSet_GW Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway. +CMD_DhcpSet_DNS Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the DNS Server address. +CMD_DhcpSet_DNS2 Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the DNS Server address. +CMD_DhcpSet_DOMAIN Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name. +CMD_DhcpSet_LOG Specify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify "yes" to save it. This value is interlinked with the Virtual NAT Function log save setting. +CMD_DhcpSet_PUSHROUTE Specify the static routing table to push.\nExample: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253"\nSplit multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format.\nThis Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients.\nWhether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage.\nYou can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this command.\nSee the RFC 3442 to understand the classless routes. +CMD_DhcpSet_Prompt_START Start Point for Distributed Address Band: +CMD_DhcpSet_Prompt_END End Point for Distributed Address Band: +CMD_DhcpSet_Prompt_MASK Subnet Mask: +CMD_DhcpSet_Prompt_EXPIRE Lease Limit (Seconds): +CMD_DhcpSet_Prompt_GW Default Gateway ('none' to not set this): +CMD_DhcpSet_Prompt_DNS DNS Server 1 ('none' to not set this): +CMD_DhcpSet_Prompt_DNS2 DNS Server 2 ('none' to not set this): +CMD_DhcpSet_Prompt_DOMAIN Domain Name: + + +# DhcpTable command +CMD_DhcpTable Get Virtual DHCP Server Function Lease Table of SecureNAT Function +CMD_DhcpTable_Help Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_DhcpTable_Args DhcpTable + + +# AdminOptionList command +CMD_AdminOptionList Get List of Virtual Hub Administration Options +CMD_AdminOptionList_Help Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. \nThe purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. \nOnly an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. \nThere is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster member. +CMD_AdminOptionList_Args AdminOptionList + + +# AdminOptionSet command +CMD_AdminOptionSet Set Values of Virtual Hub Administration Options +CMD_AdminOptionSet_Help Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. \nThe purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. \nOnly an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. \nThere is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster member. +CMD_AdminOptionSet_Args AdminOptionSet [name] [/VALUE:value] +CMD_AdminOptionSet_[name] Specify the name of the administration option whose value you want to change. You can get a list of names by using the AdminOptionList command. +CMD_AdminOptionSet_VALUE Specify an integer for the setting value. +CMD_AdminOptionSet_Prompt_name Name of Administration Option to Change Value: +CMD_AdminOptionSet_Prompt_VALUE Setting Value (Integer): + + +# ExtOptionList command +CMD_ExtOptionList Get List of Virtual Hub Extended Options +CMD_ExtOptionList_Help Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub.\nVirtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub.\nBy default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options.\nHowever, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options.\nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster member. +CMD_ExtOptionList_Args ExtOptionList + + +# ExtOptionSet command +CMD_ExtOptionSet Set a Value of Virtual Hub Extended Options +CMD_ExtOptionSet_Help Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub.\nVirtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub.\nBy default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options.\nHowever, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options.\nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster member. +CMD_ExtOptionSet_Args ExtOptionSet [name] [/VALUE:value] +CMD_ExtOptionSet_[name] Specify the name of the Virtual Hub Extended Options whose value you want to change. You can get a list of names by using the ExtOptionList command. +CMD_ExtOptionSet_VALUE Specify an integer for the setting value. +CMD_ExtOptionSet_Prompt_name Name of Extended Option to Change Value: +CMD_ExtOptionSet_Prompt_VALUE Setting Value (Integer): + + +# CrlList command +CMD_CrlList Get List of Certificates Revocation List +CMD_CrlList_Help Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. \nBy registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. \nNormally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CrlList_Args CrlList + + +# CrlAdd command +CMD_CrlAdd Add a Revoked Certificate +CMD_CrlAdd_Help Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. \nSpecify the contents to be registered in the Certificate Revocation List by using the parameters of this command. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. \nA certificate that matches all the conditions that are defined by the parameters specified by this command will be judged as invalid. \nThe items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CrlAdd_Args CrlAdd [/SERIAL:serial] [/MD5:md5] [/SHA1:sha1] [/CN:cn] [/O:o] [/OU:ou] [/C:c] [/ST:st] [/L:l] +CMD_CrlAdd_SERIAL Use this parameter to specify the value for the certificate serial number (hexadecimal) when it is set as a condition. +CMD_CrlAdd_MD5 Use this parameter to specify the value for the certificate MD5 digest value (hexadecimal, 128 bits) when it is set as a condition. If this parameter specification is other than a hexadecimal value of 32 characters (16 bytes), it will be ignored. +CMD_CrlAdd_SHA1 Use this parameter to specify the value for the certificate SHA1 digest value (hexadecimal, 160 bits) when it is set as a condition. If this parameter specification is other than a hexadecimal value of 40 characters (16 bytes), it will be ignored. +CMD_CrlAdd_CN Use this parameter to specify the name (CN) of the certificate when it is set as a condition. +CMD_CrlAdd_O Use this parameter to specify the organization (O) of the certificate when it is set as a condition. +CMD_CrlAdd_OU Use this parameter to specify the organization unit (OU) of the certificate when it is set as a condition. +CMD_CrlAdd_C Use this parameter to specify the country (C) of the certificate when it is set as a condition. +CMD_CrlAdd_ST Use this parameter to specify the state (ST) of the certificate when it is set as a condition. +CMD_CrlAdd_L Use this parameter to specify the locale (L) of the certificate when it is set as a condition. + + +# CrlDel command +CMD_CrlDel Delete a Revoked Certificate +CMD_CrlDel_Help Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. \nTo get the list of currently registered revoked certificate definitions, use the CrlList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CrlDel_Args CrlDel [id] +CMD_CrlDel_[id] Specify the ID of the revoked certificate definition you want to delete. +CMD_CrlDel_Prompt_ID ID to Delete: + + +# CrlGet command +CMD_CrlGet Get a Revoked Certificate +CMD_CrlGet_Help Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. \nTo get the list of currently registered revoked certificate definitions, use the CrlList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_CrlGet_Args CrlGet [id] +CMD_CrlGet_[id] Specify the ID of the revoked certificate definition you want to get. +CMD_CrlGet_Prompt_ID ID to Get: +CMD_CrlGet_CN Common Name (CN) +CMD_CrlGet_O Organization (O) +CMD_CrlGet_OU Organization Unit (OU) +CMD_CrlGet_C Country (C) +CMD_CrlGet_ST State (ST) +CMD_CrlGet_L Locale (L) +CMD_CrlGet_SERI Serial Number (Hexadecimal) +CMD_CrlGet_MD5_HASH MD5 Digest Value (Hexadecimal, 128 bit) +CMD_CrlGet_SHA1_HASH SHA-1 Digest Value (Hexadecimal, 160 bit) + + +# AcList command +CMD_AcList Get List of Rule Items of Source IP Address Limit List +CMD_AcList_Help Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. \nYou can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_AcList_Args AcList + + +# AcAdd command +CMD_AcAdd Add Rule to Source IP Address Limit List (IPv4) +CMD_AcAdd_Help Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. \nThe items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. \nYou can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. \nYou can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. \nTo get a list of the currently registered Source IP Address Limit List, use the AcList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_AcAdd_Args AcAdd [allow|deny] [/PRIORITY:priority] [/IP:ip/mask] +CMD_AcAdd_[allow|deny] Set whether to "allow" or "deny" the connection from a client that matches the rule. +CMD_AcAdd_PRIORITY Specify an integer of 1 or higher to indicate the priority of the rule. The smaller the value the higher the priority. +CMD_AcAdd_IP Using the format: "IP Address/Mask", specify the range of client IPv4 addresses. Specify the IPv4 address by separating the decimal values using dots such as "192.168.0.1". For the mask, either specify decimal values separated by dots such as "255.255.255.0", or you can specify the bit length from the header using a decimal value such as "24". To specify a single IPv4 host, specify the mask as "32" or "255.255.255.255". +CMD_AcAdd_Prompt_AD allow or deny: +CMD_AcAdd_Prompt_PRIORITY Priority: +CMD_AcAdd_Prompt_IP IPv4 Address/Mask: +CMD_AcAdd_Eval_PRIORITY Specify 1 or higher for the priority. + + +# AcAdd6 command +CMD_AcAdd6 Add Rule to Source IP Address Limit List (IPv6) +CMD_AcAdd6_Help Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. \nThe items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. \nYou can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. \nYou can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. \nTo get a list of the currently registered Source IP Address Limit List, use the AcList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_AcAdd6_Args AcAdd6 [allow|deny] [/PRIORITY:priority] [/IP:ip/mask] +CMD_AcAdd6_[allow|deny] Set whether to "allow" or "deny" the connection from a client that matches the rule. +CMD_AcAdd6_PRIORITY Specify an integer of 1 or higher to indicate the priority of the rule. The smaller the value the higher the priority. +CMD_AcAdd6_IP Using the format: "IP Address/Mask", specify the range of client IPv6 addresses. Specify the IPv6 address by separating the hexadecimal values using colons such as "2001:200:0:1::". For the mask, either specify hexadecimal values separated by colons such as "ffff:ffff:ffff:ffff::", or you can specify the bit length from the header using a decimal value such as "64". To specify a single IPv6 host, specify the mask as "128" or "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff". +CMD_AcAdd6_Prompt_AD allow or deny: +CMD_AcAdd6_Prompt_PRIORITY Priority: +CMD_AcAdd6_Prompt_IP IPv6 Address/Mask: +CMD_AcAdd6_Eval_PRIORITY Specify 1 or higher for the priority. + + +# AcDel command +CMD_AcDel Delete Rule from Source IP Address Limit List +CMD_AcDel_Help Use this to delete a rule from the Source IP Address Limit List that is set on the currently managed Virtual Hub. \nTo get a list of the currently registered IP access control list, use the AcList command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_AcDel_Args AcDel [id] +CMD_AcDel_[id] Specify the ID of the rule in the Source IP Address Limit List that you want to delete. +CMD_AcDel_Prompt_ID ID of Rule to Delete: + + +# LicenseAdd command +CMD_LicenseAdd Add License Key Registration +CMD_LicenseAdd_Help Use this to register a new license key on the SoftEther VPN Server. \nTo use SoftEther VPN Server you must acquire a valid license and register the license key. The license keys are 36 alphanumeric characters in length plus hyphens. They are key codes that certify the ownership of a license. \nWhen a license certificate is received together with this software, the license key is printed on this license certificate. If the license for this software has been purchased online, the license key is provided by email and on the website window at the time the license is purchased. The license key may also be written down by some other method. If you don't know where the license key is written down, ask the vendor who sold you the license. \n\nTo get the list of currently registered licenses, use the LicenseList command. \nTo display the license status of the current VPN Server, use the LicenseStatus command. \nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_LicenseAdd_Args LicenseAdd [key] +CMD_LicenseAdd_[key] Specify the license key to register. Specify 36 digits of alphanumeric characters and group the digits in groups of 6 separating them by hyphen. +CMD_LicenseAdd_Prompt_Key License Key: + + +# LicenseDel command +CMD_LicenseDel Delete Registered License +CMD_LicenseDel_Help Use this to delete a specified license from the license list that is currently registered on the SoftEther VPN Server. \n\nTo get the list of currently registered licenses, use the LicenseList command. \nTo display the license status of the current VPN Server, use the LicenseStatus command. \nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_LicenseDel_Args LicenseDel [id] +CMD_LicenseDel_[id] Specify the license number to delete. +CMD_LicenseDel_Prompt_ID License Number to Delete: + + +# LicenseList command +CMD_LicenseList Get List of Registered Licenses +CMD_LicenseList_Help Use this to display a list of license information currently registered on the SoftEther VPN Server including: license key, license type name, status, expiration date, license ID, license type ID, server ID and serial ID. \n\nTo display the license status of the current VPN Server, use the LicenseStatus command. \nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_LicenseList_Args LicenseList + + +# LicenseStatus command +CMD_LicenseStatus Get License Status of Current VPN Server +CMD_LicenseStatus_Help Use this to get and display the license status of the current SoftEther VPN Server. \nThe following current information on the SoftEther VPN Server will be displayed: product edition, server ID, product license expiration date, number of usable Client Connection Licenses and number of Bridge Connection Licenses. \n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_LicenseStatus_Args LicenseStatus + + +# Commands added after SoftEther VPN 4.0 +# IPsecEnable command +CMD_IPsecEnable Enable or Disable IPsec VPN Server Function +CMD_IPsecEnable_Help Enable or Disable IPsec VPN Server Function on SoftEther VPN Server.\nIf you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_IPsecEnable_Args IPsecEnable [/L2TP:yes|no] [/L2TPRAW:yes|no] [/ETHERIP:yes|no] [/PSK:pre-shared-key] [/DEFAULTHUB:default_hub] +CMD_IPsecEnable_L2TP Enable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option. +CMD_IPsecEnable_L2TPRAW Enable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option. +CMD_IPsecEnable_ETHERIP Enable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging. +CMD_IPsecEnable_PSK Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters. +CMD_IPsecEnable_DEFAULTHUB Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target. +CMD_IPsecEnable_Prompt_L2TP Enable L2TP over IPsec Server Function (yes / no): +CMD_IPsecEnable_Prompt_L2TPRAW Enable Raw L2TP Server Function (yes / no): +CMD_IPsecEnable_Prompt_ETHERIP Enable EtherIP / L2TPv3 over IPsec Server Function (yes / no): +CMD_IPsecEnable_Prompt_PSK Pre Shared Key for IPsec (Recommended: 9 letters at maximum): +CMD_IPsecEnable_Prompt_DEFAULTHUB Default Virtual HUB in a case of omitting the HUB on the Username: + + +# IPsecGet command +CMD_IPsecGet Get the Current IPsec VPN Server Settings +CMD_IPsecGet_Help Get and view the current IPsec VPN Server settings on the SoftEther VPN Server.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_IPsecGet_Args IPsecGet +CMD_IPsecGet_PRINT_L2TP L2TP over IPsec Server Function Enabled +CMD_IPsecGet_PRINT_L2TPRAW Raw L2TP Server Function Enabled +CMD_IPsecGet_PRINT_ETHERIP EtherIP / L2TPv3 over IPsec Server Function Enabled +CMD_IPsecGet_PRINT_PSK IPsec Pre-Shared Key String +CMD_IPsecGet_PRINT_DEFAULTHUB Name of Default Virtual Hub + + +# EtherIpClientAdd command +CMD_EtherIpClientAdd Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EtherIP / L2TPv3 Client Devices +CMD_EtherIpClientAdd_Help Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices.\nIn order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub.\nAfter you add a definition entry by EtherIpClientAdd command, the defined connection setting to the Virtual Hub will be applied on the login-attempting session from an EtherIP / L2TPv3 over IPsec client device.\nThe username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_EtherIpClientAdd_Args EtherIpClientAdd [ID] [/HUB:hubname] [/USERNAME:username] [/PASSWORD:password] +CMD_EtherIpClientAdd_[ID] Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules. +CMD_EtherIpClientAdd_HUB Specify the name of the Virtual Hub to connect. +CMD_EtherIpClientAdd_USERNAME Specify the username to login to the destination Virtual Hub. +CMD_EtherIpClientAdd_PASSWORD Specify the password to login to the destination Virtual Hub. +CMD_EtherIpClientAdd_Prompt_ID ISAKMP Phase 1 ID ('*' is a wildcard): +CMD_EtherIpClientAdd_Prompt_HUB Virtual Hub Name: +CMD_EtherIpClientAdd_Prompt_USERNAME Username to Login Virtual Hub: +CMD_EtherIpClientAdd_Prompt_PASSWORD Password to Login Virtual Hub: + + +# EtherIpClientDelete command +CMD_EtherIpClientDelete Delete an EtherIP / L2TPv3 over IPsec Client Setting +CMD_EtherIpClientDelete_Help This command deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. \n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_EtherIpClientDelete_Args EtherIpClientDelete [ID] +CMD_EtherIpClientDelete_[ID] Specify the ISAKMP Phase 1 ID to delete. +CMD_EtherIpClientDelete_Prompt_ID ISAKMP Phase 1 ID: + + +# EtherIpClientList command +CMD_EtherIpClientList Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions +CMD_EtherIpClientList_Help This command gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_EtherIpClientList_Args EtherIpClientList + + +# OpenVpnEnable command +CMD_OpenVpnEnable Enable / Disable OpenVPN Clone Server Function +CMD_OpenVpnEnable_Help This VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server.\n\nThe manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. For details, please see the help of the IPsecEnable command.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnEnable_Args OpenVpnEnable [yes|no] [/PORTS:udp_port_list] +CMD_OpenVpnEnable_[yes|no] Specify yes to enable the OpenVPN Clone Server Function. Specify no to disable. +CMD_OpenVpnEnable_PORTS Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports. +CMD_OpenVpnEnable_Prompt_[yes|no] Enables OpenVPN Clone Server Function (yes / no): +CMD_OpenVpnEnable_Prompt_PORTS UDP Ports to Listen for OpenVPN (Default: 1194 / Multiple Accepted): + + +# OpenVpnGet command +CMD_OpenVpnGet Get the Current Settings of OpenVPN Clone Server Function +CMD_OpenVpnGet_Help Get and show the current settings of OpenVPN Clone Server Function.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnGet_Args OpenVpnGet +CMD_OpenVpnGet_PRINT_Enabled OpenVPN Clone Server Enabled +CMD_OpenVpnGet_PRINT_Ports UDP Port List + +# OpenVpnMakeConfig command +CMD_OpenVpnMakeConfig Generate a Sample Setting File for OpenVPN Client +CMD_OpenVpnMakeConfig_Help Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This tool helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this command.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnMakeConfig_Args OpenVpnMakeConfig [ZIP_FileName] +CMD_OpenVpnMakeConfig_[ZIP_FileName] Specify the output setting files to be saved as ZIP compression format. If no file extension is specified, the ".zip" extension will be appended to the filename. +CMD_OpenVpnMakeConfig_Prompt_ZIP Output Filename of Setting Files (ZIP compressed file): +CMD_OpenVpnMakeConfig_OK The sample setting file was saved as "%s". You can unzip this file to extract setting files.\n +CMD_OpenVpnMakeConfig_ERROR The sample setting files were unable to be saved as "%s". The filename might be invalid.\n + + +# OpenVpnObfuscationEnable +CMD_OpenVpnObfuscationEnable Enable / Disable the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationEnable_Help This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.\nThe same XOR mask have to be applied to the client, otherwise it will not be able to connect with certain obfuscation methods!\nBeware that you need a special OpenVPN client with the "XOR patch" applied in order to use this function, because it has never been merged in the official OpenVPN repository.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnObfuscationEnable_Args OpenVpnObfuscationEnable [yes|no] [/MASK:mask] +CMD_OpenVpnObfuscationEnable_[yes|no] Specify "yes" to enable the OpenVPN obfuscation function. Specify "no" to disable it. +CMD_OpenVpnObfuscationEnable_MASK Mask used to XOR the bytes in the packet (used for certain obfuscation modes). +CMD_OpenVpnObfuscationEnable_Prompt_[yes|no] Enable OpenVPN packet obfuscation (yes / no): +CMD_OpenVpnObfuscationEnable_Prompt_MASK XOR mask: + + +# OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet Get the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Help Get and show the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Args OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet_PRINT_Enabled OpenVPN obfuscation enabled +CMD_OpenVpnObfuscationGet_PRINT_Mask XOR mask + + +# SstpEnable command +CMD_SstpEnable Enable / Disable Microsoft SSTP VPN Clone Server Function +CMD_SstpEnable_Help This VPN Server has the clone functions of MS-SSTP VPN Server which is on Windows Server 2008 / 2012 by Microsoft Corporation. Standard MS-SSTP Clients in Windows Vista / 7 / 8 / RT / 10 can connect to this VPN Server.\n\n[Caution]\nThe value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the client, and that certificate must be in the trusted list on the SSTP VPN client. For details refer the Microsoft's documents.\nYou can use the ServerCertRegenerate command to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. In that case, you have to register such a new self-signed certificate on the SSTP VPN Client as a trusted root certificate. If you do not want to do such a bother tasks, please consider to purchase a SSL certificate provided by commercial authority such as VeriSign or GlobalSign.\n\nThe manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. For details, please see the help of the IPsecEnable command.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SstpEnable_Args SstpEnable [yes|no] +CMD_SstpEnable_[yes|no] Specify yes to enable the Microsoft SSTP VPN Clone Server Function. Specify no to disable. +CMD_SstpEnable_Prompt_[yes|no] Enables SSTP VPN Clone Server Function (yes / no): +CMD_SstpEnable_PRINT_Enabled SSTP VPN Clone Server Enabled + + +# SstpGet command +CMD_SstpGet Get the Current Settings of Microsoft SSTP VPN Clone Server Function +CMD_SstpGet_Help Get and show the current settings of Microsoft SSTP VPN Clone Server Function.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_SstpGet_Args SstpGet + + +# ServerCertRegenerate command +CMD_ServerCertRegenerate Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server +CMD_ServerCertRegenerate_Help You can use this command to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields.\n\nThis command is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client.\nFor details please see the help of SstpEnable command.\n\nThis command will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the ServerKeyGet command beforehand.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_ServerCertRegenerate_Args ServerCertRegenerate [CN] +CMD_ServerCertRegenerate_[CN] Specify a Common Name (CN) which the new certificate will have. +CMD_ServerCertRegenerate_Prompt_CN Value of Common Name (CN): + + +# VpnOverIcmpDnsEnable command +CMD_VpnOverIcmpDnsEnable Enable / Disable the VPN over ICMP / VPN over DNS Server Function +CMD_VpnOverIcmpDnsEnable_Help You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand.\n\nWarning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_VpnOverIcmpDnsEnable_Args VpnOverIcmpDnsEnable [/ICMP:yes|no] [/DNS:yes|no] +CMD_VpnOverIcmpDnsEnable_ICMP Specify yes to enable the VPN over ICMP Server. Specify no to disable. +CMD_VpnOverIcmpDnsEnable_DNS Specify yes to enable the VPN over DNS Server. Specify no to disable. +CMD_VpnOverIcmpDnsEnable_Prompt_ICMP Enable VPN over ICMP Server (yes / no): +CMD_VpnOverIcmpDnsEnable_Prompt_DNS Enable VPN over DNS Server (yes / no): + + +# VpnOverIcmpDnsGet command +CMD_VpnOverIcmpDnsGet Get Current Setting of the VPN over ICMP / VPN over DNS Function +CMD_VpnOverIcmpDnsGet_Help Get and show the current VPN over ICMP / VPN over DNS Function status.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_VpnOverIcmpDnsGet_Args VpnOverIcmpDnsGet +CMD_VpnOverIcmpDnsGet_PRINT_ICMP VPN over ICMP Server Enabled +CMD_VpnOverIcmpDnsGet_PRINT_DNS VPN over DNS Server Enabled + + +# DynamicDnsGetStatus command +CMD_DynamicDnsGetStatus Show the Current Status of Dynamic DNS Function +CMD_DynamicDnsGetStatus_Help Get and show the current status of the Dynamic DNS function.\n\nThe Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name.\nAlso, if your ISP assigns you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address.\r\nTherefore, you need not any longer to keep static global IP addresses with expenses monthly costs.\n[Caution]\nTo disable the Dynamic DNS Function, modify the configuration file of VPN Server.\r\n\r\nThe "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled.\r\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_DynamicDnsGetStatus_Args DynamicDnsGetStatus +CMD_DynamicDnsGetStatus_PRINT_FQDN Assigned Dynamic DNS Hostname (Full) +CMD_DynamicDnsGetStatus_PRINT_HOSTNAME Assigned Dynamic DNS Hostname (Hostname) +CMD_DynamicDnsGetStatus_PRINT_SUFFIX DNS Suffix +CMD_DynamicDnsGetStatus_PRINT_IPv4 Global IPv4 Address +CMD_DynamicDnsGetStatus_PRINT_IPv6 Global IPv6 Address + + +# DynamicDnsSetHostname command +CMD_DynamicDnsSetHostname Set the Dynamic DNS Hostname +CMD_DynamicDnsSetHostname_Help You can use this command to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the DynamicDnsGetStatus command.\n\nThe Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name.\nAlso, if your ISP assigns you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address.\r\nTherefore, you need not any longer to keep static global IP addresses with expenses monthly costs.\n[Caution]\nTo disable the Dynamic DNS Function, modify the configuration file of VPN Server.\r\n\r\nThe "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled.\r\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge. +CMD_DynamicDnsSetHostname_Args DynamicDnsSetHostname [hostname] +CMD_DynamicDnsSetHostname_[hostname] Specify the new hostname with 3 letters at least and 31 letters at most. Only alphabets and numerics can be used. +CMD_DynamicDnsSetHostname_Prompt_hostname Dynamic DNS Hostname (3 - 31 letters): + + +# VpnAzureGetStatus command +CMD_VpnAzureGetStatus Show the current status of VPN Azure function +CMD_VpnAzureGetStatus_Help Get and show the current status of the VPN Azure function.\n\nVPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company.\nYou don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC.\nVPN Azure is a cloud VPN service operated by SoftEther VPN Project. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions.\n\nThe VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the DynamicDnsSetHostname command.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_VpnAzureGetStatus_Args VpnAzureGetStatus +CMD_VpnAzureGetStatus_PRINT_ENABLED VPN Azure Function is Enabled +CMD_VpnAzureGetStatus_PRINT_CONNECTED Connection to VPN Azure Cloud Server is Established +CMD_VpnAzureGetStatus_PRINT_HOSTNAME Hostname of this VPN Server on VPN Azure Service + + +# VpnAzureSetStatus command +CMD_VpnAzureSetEnable Enable / Disable VPN Azure Function +CMD_VpnAzureSetEnable_Help Enable or disable the VPN Azure function.\n\nVPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company.\nYou don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC.\nVPN Azure is a cloud VPN service operated by SoftEther VPN Project. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions.\n\nThe VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the DynamicDnsSetHostname command.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_VpnAzureSetEnable_Args VpnAzureSetEnable [yes|no] +CMD_VpnAzureSetEnable_[yes|no] Specify 'yes' to enable VPN Azure. 'no' to disable it. +CMD_VpnAzureSetEnable_PROMPT Enable VPN Azure (yes / no): + + + + +####################################################### +# # +# Management commands for VPN Client are listed below # +# # +####################################################### + + +# VersionGet command +CMD_VersionGet Get Version Information of VPN Client Service +CMD_VersionGet_Help Use this to get the version information of the currently managed VPN Client Service program. +CMD_VersionGet_Args VersionGet +CMD_VersionGet_1 Product Name +CMD_VersionGet_2 Version Information +CMD_VersionGet_3 Build Information +CMD_VersionGet_4 Process ID +CMD_VersionGet_5 OS Type + + +# PasswordSet command +CMD_PasswordSet Set the password to connect to the VPN Client service. +CMD_PasswordSet_Help You can make it mandatory to input a password for occasions when the Command Line Management Utility and the VPN Client Manager connect to a VPN Client service to control it. You can use this command to set the password that must be input. \nYou can also make it mandatory for this password to be input when doing remote operations (from a computer that is not localhost) +CMD_PasswordSet_Args PasswordSet [password] [/REMOTEONLY:yes|no] +CMD_PasswordSet_[password] Specify the password you wish to set. You can delete the password setting by specifying "none". +CMD_PasswordSet_REMOTEONLY Specify "yes" to only require the password to be input when operation is done remotely (from a computer that is not localhost). This stops the password being required when the connection is from localhost. When this parameter is omitted, it will be regarded as "no". + + +# PasswordGet command +CMD_PasswordGet Get Password Setting to Connect to VPN Client Service +CMD_PasswordGet_Help Use this to get the setting that determines whether to input a password for occasions when the Command Line Management Utility and the VPN Client Manager connect to a VPN Client service to control it. \nIn the case when a password is requested, it also gets the setting that determines whether this password is only requested when operation is performed remotely (from a computer that is not localhost). +CMD_PasswordGet_Args PasswordGet +CMD_PasswordGet_1 Set Password +CMD_PasswordGet_2 Request Password for Remote Operation Only + + +# CertList command +CMD_CertList Get List of Trusted CA Certificates +CMD_CertList_Help Here you can manage the list of certificate authority certificates that are trusted by VPN client. You can use the registered CA certificate list to verify server certificates when connecting to VPN Servers. +CMD_CertList_Args CertList + + +# CertAdd command +CMD_CertAdd Add Trusted CA Certificate +CMD_CertAdd_Help Use this to add a new certificate to a list of CA certificates trusted by the VPN Client. You can use the registered CA certificate list to verify server certificates when connecting to VPN Servers. \nTo get a list of the current certificates you can use the CertList command. \nThe certificate you add must be saved in the X.509 file format. +CMD_CertAdd_Args CertAdd [path] +CMD_CertAdd_[path] Specify the file name of the X.509 certificate to register. + + +# CertDelete command +CMD_CertDelete Delete Trusted CA Certificate +CMD_CertDelete_Help Use this to delete an existing certificate from a list of CA certificates trusted by the VPN Client. \nTo get a list of the current certificates you can use the CertList command. +CMD_CertDelete_Args CertDelete [id] +CMD_CertDelete_[id] Specify the ID of the certificate to delete. + + +# CertGet command +CMD_CertGet Get Trusted CA Certificate +CMD_CertGet_Help Use this to get an existing certificate from the list of CA certificates trusted by the VPN Client and save it as a file in X.509 format. +CMD_CertGet_Args CertGet [id] [/SAVECERT:path] +CMD_CertGet_[id] Specify the ID of the certificate to get. +CMD_CertGet_SAVECERT Specify the file name to save the certificate you obtained. + + +# SecureList command +CMD_SecureList Get List of Usable Smart Card Types +CMD_SecureList_Help Use this to display a list of smart cards that are supported by VPN Client. \nThe types of smart cards listed in this list have had their drivers installed on the current computer and are supported by VPN software. \r\nIf there is a type of smart card that is currently being used that does not appear in the list, it may be possible to enable use by updating the VPN software to a newer version. +CMD_SecureList_Args SecureList + + +# SecureSelect command +CMD_SecureSelect Select the Smart Card Type to Use +CMD_SecureSelect_Help Use this to select the type of the smart card to be used by the VPN Client. \nTo get the list of usable smart card types, use the SecureList command. +CMD_SecureSelect_Args SecureSelect [id] +CMD_SecureSelect_[id] Specify the ID of the smart card type. +CMD_SecureSelect_PROMPT_ID ID of Smart Card Type to Use + + +# SecureGet command +CMD_SecureGet Get ID of Smart Card Type to Use +CMD_SecureGet_Help Use this to get the ID of the smart card type that is set to be used for the current VPN Client. By viewing the results of the SecureList command based on this ID, you can get the type of the currently selected smart card. \nIf there is no smart card that is currently selected, 0 will be displayed for the ID. +CMD_SecureGet_Args SecureGet +CMD_SecureGet_Print The currently selected smart card ID is %u. +CMD_SecureGet_NoPrint Currently, a smart card is not selected. + + +# NicCreate command +CMD_NicCreate Create New Virtual Network Adapter +CMD_NicCreate_Help Use this to add a new Virtual Network Adapter to the system. You can give the virtual network adapter a name of your choice. \nYou can set a name that consists of alphanumeric characters for the virtual network adapter. For Windows 2000 or newer systems, this name can be up to 31 characters, but for Windows 98, 98SE and ME it can be up to 4 characters. \nIf the NicCreate command was called, a new virtual network adapter device driver will be installed on the operating system that the VPN Client is operating on. \nIn this case, depending on the operating system, a dialog box may appear to confirm if it is OK to install the device driver. +CMD_NicCreate_Args NicCreate [name] +CMD_NicCreate_[name] Specify the name of the virtual network adapter. +CMD_NicCreate_PROMPT_NAME Virtual Network Adapter Name: + + +# NicDelete command +CMD_NicDelete Delete Virtual Network Adapter +CMD_NicDelete_Help Use this to delete an existing virtual network adapter from the system. \nWhen you delete a virtual network adapter from the system, all the connections which are using that virtual network adapter will be disconnected. \nAlso, the Connection Settings that are set to use a virtual network adapter that has been deleted will have their settings automatically changed to use another virtual network adapter. \nThis command can be used when VPN Client is operating on Windows 2000 or newer operating systems. +CMD_NicDelete_Args NicDelete [name] +CMD_NicDelete_[name] Specify the name of the virtual network adapter. + + +# NicUpgrade command +CMD_NicUpgrade Upgrade Virtual Network Adapter Device Driver +CMD_NicUpgrade_Help If the device driver version of the existing virtual network adapter is old, then this upgrades to the latest device driver that was bundled with the currently operating VPN client. Even if a upgrade is not performed, the device driver will be reinstalled. \nIn this case, depending on the operating system, a dialog box may appear to confirm if it is OK to install the device driver. \nThis command can be used when VPN Client is operating on Windows 2000 or newer operating systems. +CMD_NicUpgrade_Args NicUpgrade [name] +CMD_NicUpgrade_[name] Specify the name of the virtual network adapter. + + +# NicGetSetting command +CMD_NicGetSetting Get Virtual Network Adapter Setting +CMD_NicGetSetting_Help Use this to get the MAC address setting of the existing virtual network adapter. \nThis command can be used when VPN Client is operating on Windows 2000 or newer operating systems. +CMD_NicGetSetting_Args NicGetSetting [name] +CMD_NicGetSetting_[name] Specify the name of the virtual network adapter. +CMD_NicGetSetting_1 Device Name +CMD_NicGetSetting_2 Status +CMD_NicGetSetting_3 MAC Address +CMD_NicGetSetting_4 Version +CMD_NicGetSetting_5 Driver File Name +CMD_NicGetSetting_6 GUID + + +# NicSetSetting command +CMD_NicSetSetting Change Virtual Network Adapter Setting +CMD_NicSetSetting_Help Use this to change the MAC address setting of the existing virtual network adapter. When this command is executed, the currently operating virtual network adapter device drivers will be restarted. \nThis command can be used when VPN Client is operating on Windows 2000 or newer operating systems. +CMD_NicSetSetting_Args NicSetSetting [name] [/MAC:mac] +CMD_NicSetSetting_[name] Specify the name of the virtual network adapter. +CMD_NicSetSetting_MAC Specify the MAC address you wish to set. \nSpecify a 6-byte hexadecimal string for the MAC address. \nExample: 00:AC:01:23:45:67 or 00-AC-01-23-45-67 +CMD_NicSetSetting_PROMPT_MAC MAC Address to Set: + + +# NicEnable command +CMD_NicEnable Enable Virtual Network Adapter +CMD_NicEnable_Help Use this to enable an existing, disabled virtual network adapter. \nThis command can be used when VPN Client is operating on Windows 2000 or newer operating systems. +CMD_NicEnable_Args NicEnable [name] +CMD_NicEnable_[name] Specify the name of the virtual network adapter. + + +# NicDisable command +CMD_NicDisable Disable Virtual Network Adapter +CMD_NicDisable_Help Use this to disable an existing, enabled virtual network adapter. \nThis command can be used when VPN Client is operating on Windows 2000 or newer operating systems. +CMD_NicDisable_Args NicDisable [name] +CMD_NicDisable_[name] Specify the name of the virtual network adapter. + + +# NicList command +CMD_NicList Get List of Virtual Network Adapters +CMD_NicList_Help This allows you to get a list of virtual network adapters registered on the current system. +CMD_NicList_Args NicList + + +# AccountList command +CMD_AccountList Get List of VPN Connection Settings +CMD_AccountList_Help Use this to get a list of VPN Connection Settings registered on the VPN Client. +CMD_AccountList_Args AccountList + + +# AccountCreate command +CMD_AccountCreate Create New VPN Connection Setting +CMD_AccountCreate_Help Use this to create a new VPN Connection Setting on the VPN Client. \nTo create a VPN Connection Setting, in addition to specifying the VPN Connection Setting name and destination server as initial parameters and the destination virtual Hub, and user name, you must also specify the name of the virtual network adapter to use. When a new VPN Connection Setting is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after the VPN Connection Setting has been created, use the other commands that begin with the name "Account". +CMD_AccountCreate_Args AccountCreate [name] [/SERVER:hostname:port] [/HUB:hubname] [/USERNAME:username] [/NICNAME:nicname] +CMD_AccountCreate_[name] Specify the name of the VPN Connection Setting to create. +CMD_AccountCreate_SERVER Specify the host name and port number of the destination VPN Server using the format [host name:port number]. You can also specify by IP address. +CMD_AccountCreate_HUB Specify the Virtual Hub on the destination VPN Server. +CMD_AccountCreate_USERNAME Specify the user name to use for user authentication when connecting to the destination VPN Server. +CMD_AccountCreate_NICNAME Specify the virtual network adapter to use to connect. +CMD_AccountCreate_Prompt_Name Name of VPN Connection Setting: +CMD_AccountCreate_Prompt_Server Destination VPN Server Host Name and Port Number: +CMD_AccountCreate_Prompt_Hub Destination Virtual Hub Name: +CMD_AccountCreate_Prompt_Username Connecting User Name: +CMD_AccountCreate_Prompt_Nicname Used Virtual Network Adapter Name: + + +# AccountSet command +CMD_AccountSet Set the VPN Connection Setting Connection Destination +CMD_AccountSet_Help Use this to set, for the VPN Connection Setting registered on the VPN Client, the destination VPN Server host name and port number, Virtual Hub name, user name used for connection and virtual network adapter name to use. +CMD_AccountSet_Args AccountSet [name] [/SERVER:hostname:port] [/HUB:hubname] +CMD_AccountSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountSet_SERVER Specify the host name and port number of the destination VPN Server using the format "host name:port number". You can also specify by IP address. +CMD_AccountSet_HUB Specify the Virtual Hub on the destination VPN Server. + + +# AccountGet command +CMD_AccountGet Get Setting of VPN Connection Setting +CMD_AccountGet_Help Use this to get the VPN Connection Setting contents of a VPN Connection Setting registered on the VPN Client. \nTo change the VPN Connection Setting contents of the VPN Connection Setting, use the other commands that begin with the name "Account" after creating the VPN Connection Setting. +CMD_AccountGet_Args AccountGet [name] +CMD_AccountGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + +# AccountDelete command +CMD_AccountDelete Delete VPN Connection Setting +CMD_AccountDelete_Help Use this to delete VPN Connection Setting that is registered on the VPN Client. If the specified VPN Connection Setting has a status of online, the connections will be automatically disconnected and then the VPN Connection Setting will be deleted. +CMD_AccountDelete_Args AccountDelete [name] +CMD_AccountDelete_[name] Specify the name of the VPN Connection Setting to delete. + + +# AccountUsernameSet command +CMD_AccountUsernameSet Set User Name of User to Use Connection of VPN Connection Setting +CMD_AccountUsernameSet_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to the VPN Server, use this to specify the user name required for user authentication. \nIn some cases it is necessary to specify the type of user authentication and specify the required parameters. To change this information you can use commands such as AccountAnonymousSet, AccountPasswordSet, AccountCertSet and AccountSecureCertSet. +CMD_AccountUsernameSet_Args AccountUsernameSet [name] [/USERNAME:username] +CMD_AccountUsernameSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountUsernameSet_USERNAME Specify the user name required for user authentication when the VPN Connection Setting connects to the VPN Server. +CMD_AccountUsername_Notice The auth type for this VPN Connection Setting is currently set as password authentication. After changing the user name, you must use the AccountPasswordSet command to reset the password. + + +# AccountAnonymousSet command +CMD_AccountAnonymousSet Set User Authentication Type of VPN Connection Setting to Anonymous Authentication +CMD_AccountAnonymousSet_Help Use this to set the user auth type to [Anonymous Authentication] for when a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to the VPN Server. +CMD_AccountAnonymousSet_Args AccountAnonymousSet [name] +CMD_AccountAnonymousSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountPasswordSet command +CMD_AccountPasswordSet Set User Authentication Type of VPN Connection Setting to Password Authentication +CMD_AccountPasswordSet_Help Use this to set the user auth type to Password Authentication for when a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to the VPN Server. Specify Standard Password Authentication and RADIUS or NT Domain Authentication as the password authentication type. +CMD_AccountPasswordSet_Args AccountPasswordSet [name] [/PASSWORD:password] [/TYPE:standard|radius] +CMD_AccountPasswordSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountPasswordSet_PASSWORD Specify the password to use for password authentication. If this is not specified, a prompt will appear to input the password. +CMD_AccountPasswordSet_TYPE Specify either "standard" (Standard Password Authentication) or "radius" (RADIUS or NT Domain Authentication) as the password authentication type. +CMD_AccountPasswordSet_Prompt_Type Specify standard or radius: +CMD_AccountPasswordSet_Type_Invalid The standard or radius specification is invalid. + + +# AccountCertSet command +CMD_AccountCertSet Set User Authentication Type of VPN Connection Setting to Client Certificate Authentication +CMD_AccountCertSet_Help Use this to set the user auth type to Client Certificate Authentication for when a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to the VPN Server. For this certificate, you must specify a certificate file in the X.509 format and a private key file that is Base 64 encoded. +CMD_AccountCertSet_Args AccountCertSet [name] [/LOADCERT:cert] [/LOADKEY:key] +CMD_AccountCertSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountCertSet_LOADCERT Specify the X.509 format certificate file to provide for certificate authentication. +CMD_AccountCertSet_LOADKEY Specify the Base-64-encoded private key file name for the certificate. + + +# AccountCertGet command +CMD_AccountCertGet Get Client Certificate to Use for Cascade Connection +CMD_AccountCertGet_Help When a VPN Connection Setting registered on VPN Client is specified and that VPN Connection Setting uses client certificate authentication, use this to get the certificate that is provided as the client certificate and save the certificate file in X.509 format. +CMD_AccountCertGet_Args AccountCertGet [name] [/SAVECERT:cert] +CMD_AccountCertGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. +CMD_AccountCertGet_SAVECERT Specify the file name to save the certificate you obtained in X.509 format. + + +# AccountEncryptEnable command +CMD_AccountEncryptEnable Enable Encryption when Communicating by VPN Connection Setting +CMD_AccountEncryptEnable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers to be encrypted by SSL. \nNormally communication between VPN Servers is encrypted by SSL to prevent eavesdropping of information and fraud. You can also disable encryption. When encryption is disabled, the communication throughput improves but the communication data flows over the network in plain text. +CMD_AccountEncryptEnable_Args AccountEncryptEnable [name] +CMD_AccountEncryptEnable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountEncryptDisable command +CMD_AccountEncryptDisable Disable Encryption when Communicating by VPN Connection Setting +CMD_AccountEncryptDisable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers not to be encrypted. \nNormally communication between VPN Servers is encrypted by SSL to prevent eavesdropping of information and fraud. You can also disable encryption. When encryption is disabled, the communication throughput improves but the communication data flows over the network in plain text. +CMD_AccountEncryptDisable_Args AccountEncryptDisable [name] +CMD_AccountEncryptDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountCompressEnable command +CMD_AccountCompressEnable Enable Data Compression when Communicating by VPN Connection Setting +CMD_AccountCompressEnable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers to be compressed. \nIt is possible to achieve a maximum of 80% compression. Compression however places higher loads on the CPU of both the client and server machines. When the line speed is about 10 Mbps or greater, compression can lower throughput, but sometimes it can have the opposite effect. +CMD_AccountCompressEnable_Args AccountCompressEnable [name] +CMD_AccountCompressEnable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountCompressDisable command +CMD_AccountCompressDisable Disable Data Compression when Communicating by VPN Connection Setting +CMD_AccountCompressDisable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting is used for communication between VPN Servers via a VPN connection, use this to set the communication contents between the VPN Servers not to be compressed. +CMD_AccountCompressDisable_Args AccountCompressDisable [name] +CMD_AccountCompressDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + +# AccountProxyNone command +CMD_AccountProxyNone Specify Direct TCP/IP Connection as the Connection Method of VPN Connection Setting +CMD_AccountProxyNone_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. +CMD_AccountProxyNone_Args AccountProxyNone [name] +CMD_AccountProxyNone_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountProxyHttp command +CMD_AccountProxyHttp Set Connection Method of VPN Connection Setting to be via an HTTP Proxy Server +CMD_AccountProxyHttp_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Connect via HTTP Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the HTTP Proxy server to communicate via as well as a user name and password (when required). \nThe HTTP proxy server that communication will travel via must be compatible with the CONNECT method to use HTTPS communication. +CMD_AccountProxyHttp_Args AccountProxyHttp [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxyHttp_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountProxyHttp_SERVER Specify the host name or IP address, and port number of the on-route HTTP proxy server using the format [host name:port number]. +CMD_AccountProxyHttp_USERNAME When user authentication is required to connect to the on-route HTTP proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_AccountProxyHttp_PASSWORD When user authentication is required to connect to the on-route HTTP proxy server, specify the password. Specify this together with the /USERNAME parameter. +CMD_AccountProxyHttp_Prompt_Server Proxy Server Host Name and Port Number: + + +# AccountProxySocks command +CMD_AccountProxySocks Set Connection Method of VPN Connection Setting to be via a SOCKS4 Proxy Server +CMD_AccountProxySocks_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Connect via SOCKS4 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS4 Proxy server to communicate via as well as a user name and password (when required). +CMD_AccountProxySocks_Args AccountProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountProxySocks_SERVER Specify the host name or IP address, and port number of the on-route SOCKS4 proxy server using the format [host name:port number]. +CMD_AccountProxySocks_USERNAME When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_AccountProxySocks_PASSWORD When user authentication is required to connect to the on-route SOCKS4 proxy server, specify the password. Specify this together with the /USERNAME parameter. + + +# AccountProxySocks5 command +CMD_AccountProxySocks5 Set Connection Method of VPN Connection Setting to be via a SOCKS5 Proxy Server +CMD_AccountProxySocks5_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Connect via SOCKS5 Proxy Server as the method of connection to use, which requires the specification of the host name and port number of the SOCKS5 Proxy server to communicate via as well as a user name and password (when required). +CMD_AccountProxySocks5_Args AccountProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks5_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountProxySocks5_SERVER Specify the host name or IP address, and port number of the on-route SOCKS5 proxy server using the format [host name:port number]. +CMD_AccountProxySocks5_USERNAME When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the user name. Also, specify the /PASSWORD parameter at the same time. If the parameters /USERNAME and /PASSWORD are not specified, the user authentication data will not be set. +CMD_AccountProxySocks5_PASSWORD When user authentication is required to connect to the on-route SOCKS5 proxy server, specify the password. Specify this together with the /USERNAME parameter. + + +# AccountServerCertEnable command +CMD_AccountServerCertEnable Enable VPN Connection Setting Server Certificate Verification Option +CMD_AccountServerCertEnable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to enable the option to check whether the SSL certificate provided by the destination VPN Server can be trusted. \nIf this option is enabled, we recommend that you either use the AccountServerCertSet command to save the connection destination server SSL certificate beforehand in the VPN Connection Setting settings beforehand, or use the CertAdd command etc. to register a root certificate containing the signed server SSL certificate in the list of Virtual Hub trusted CA certificates. If it is not registered, a confirmation message sometimes is displayed on the initial connection. \nIf the certificate of the connected VPN Server cannot be trusted under the condition where the option to verify server certificates has been enabled for the VPN Connection Setting, the connection will be promptly cancelled and continual reattempts at connection will be made. +CMD_AccountServerCertEnable_Args AccountServerCertEnable [name] +CMD_AccountServerCertEnable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountServerCertDisable command +CMD_AccountServerCertDisable Disable VPN Connection Setting Server Certificate Verification Option +CMD_AccountServerCertDisable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to disable the option to check whether the SSL certificate provided by the destination VPN Server can be trusted. +CMD_AccountServerCertDisable_Args AccountServerCertDisable [name] +CMD_AccountServerCertDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountRetryOnServerCertEnable command +CMD_AccountRetryOnServerCertEnable Enable VPN connection retry if server certificate is invalid +CMD_AccountRetryOnServerCertEnable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to enable the option to retry connection if Server certificate cannot be trusted. +CMD_AccountRetryOnServerCertEnable_Args AccountRetryOnServerCertEnable [name] +CMD_AccountRetryOnServerCertEnable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountRetryOnServerCertDisable command +CMD_AccountRetryOnServerCertDisable Enable VPN connection retry if server certificate is invalid +CMD_AccountRetryOnServerCertDisable_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to disable the option to retry connection if Server certificate cannot be trusted. +CMD_AccountRetryOnServerCertDisable_Args AccountRetryOnServerCertEnable [name] +CMD_AccountRetryOnServerCertDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountServerCertSet command +CMD_AccountServerCertSet Set Server Individual Certificate for VPN Connection Setting +CMD_AccountServerCertSet_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to register the same certificate as the SSL certificate provided by the destination VPN Server. \nIf the option to verify server certificates for VPN Connection Settings is enabled, you must either use this command to save the connection destination server SSL certificate beforehand in the VPN Connection Setting settings beforehand, or use the CAAdd command etc. to register a root certificate containing the signed server SSL certificate in the list of Virtual Hub trusted CA certificates. \nIf the certificate of the connected VPN Server cannot be trusted under the condition where the option to verify server certificates has been enabled for the VPN Connection Setting, the connection will be promptly cancelled and continual reattempts at connection will be made. +CMD_AccountServerCertSet_Args AccountServerCertSet [name] [/LOADCERT:cert] +CMD_AccountServerCertSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountServerCertSet_LOADCERT Specify X.509 format certificate file name that the server individual certificate which you wish to set is saved under. + + +# AccountServerCertDelete command +CMD_AccountServerCertDelete Delete Server Individual Certificate for VPN Connection Setting +CMD_AccountServerCertDelete_Help When a VPN Connection Setting registered on the VPN Client is specified and a server individual certificate is registered for that VPN Connection Setting, use this to delete that certificate. +CMD_AccountServerCertDelete_Args AccountServerCertDelete [name] +CMD_AccountServerCertDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountServerCertGet command +CMD_AccountServerCertGet Get Server Individual Certificate for VPN Connection Setting +CMD_AccountServerCertGet_Help When a VPN Connection Setting is specified and a server Individual certificate is registered for that VPN Connection Setting, use this to get that certificate and save it as an X.509 format certificate file. +CMD_AccountServerCertGet_Args AccountServerCertGet [name] [/SAVECERT:path] +CMD_AccountServerCertGet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountServerCertGet_SAVECERT Specify the certificate file name to save the server individual certificate in X.509 format. + + +# AccountDetailSet command +CMD_AccountDetailSet Set Advanced Settings for VPN Connection Setting +CMD_AccountDetailSet_Help Use this to customize the VPN protocol communication settings used when a VPN Connection Setting registered on a VPN Client is specified and that VPN Connection Setting connects to the VPN Server. +CMD_AccountDetailSet_Args AccountDetailSet [name] [/MAXTCP:max_connection] [/INTERVAL:additional_interval] [/TTL:disconnect_span] [/HALF:yes|no] [/BRIDGE:yes|no] [/MONITOR:yes|no] [/NOTRACK:yes|no] [/NOQOS:yes|no] +CMD_AccountDetailSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountDetailSet_MAXTCP Specify, using an integer in the range 1 to 32, the number of TCP connections to be used for VPN communication. By using data transmission by multiple TCP connections for VPN communication sessions with VPN Servers it is sometimes possible to increase communication speed. \nNote: We recommend about 8 lines when the connection lines to the server are fast, and 1 line when using a slow connection such as dialup. +CMD_AccountDetailSet_INTERVAL When communicating by VPN by establishing multiple TCP connections, specify in seconds, the establishing interval for each TCP connection. The standard value is 1 second. +CMD_AccountDetailSet_TTL When specifying connection life of each TCP connection specify in seconds the keep-alive time from establishing a TCP connection until disconnection. If 0 is specified, keep-alive will not be set. +CMD_AccountDetailSet_HALF Specify "yes" when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction. +CMD_AccountDetailSet_BRIDGE Specify "yes" when connecting to the VPN Server using Bridge / Router Mode. When using Bridge / Router Mode to connect, it is possible to provide bridging or routing to another network on the side of the virtual network adapter of the VPN Client. However, if the security policy of the user who is being used for connection denies the use of bridges or routing, then connection will fail. +CMD_AccountDetailSet_MONITOR Specify "yes" when connecting to the VPN Server using Monitoring Mode. When a connection is made using Monitoring Mode, you can receive all packets that flow through the Virtual Hub. However, if the security policy of the user who is being used for connection does not allow Monitoring Mode, then connection will fail. +CMD_AccountDetailSet_NOTRACK Specify "yes" will disable the adjustments of routing table. Normally "no" is specified. +CMD_AccountDetailSet_NOQOS Specify "yes" when disabling VoIP / QoS functions. Normally "no" is specified. +CMD_AccountDetailSet_DISABLEUDP Specify "yes" when disabling UDP acceleration function. Normally "no" is specified. +CMD_AccountDetailSet_Eval_MaxTcp Specify an integer in the range 1 to 32 for the number of TCP connections. +CMD_AccountDetailSet_Eval_Interval Set at least 1 second for the interval to establish a TCP connection. +CMD_AccountDetailSet_Prompt_MaxTcp Number of TCP Connections to Use in VPN Communication: +CMD_AccountDetailSet_Prompt_Interval Interval between Establishing Each TCP Connection: +CMD_AccountDetailSet_Prompt_TTL Connection Life of Each TCP Connection (0 for no keep-alive): +CMD_AccountDetailSet_Prompt_HALF Enable Half-Duplex Mode (yes/no): +CMD_AccountDetailSet_Prompt_BRIDGE Enable Bridge / Router Mode (yes/no): +CMD_AccountDetailSet_Prompt_MONITOR Enable Monitoring Mode (yes/no): +CMD_AccountDetailSet_Prompt_NOTRACK Disable Adjustment of Routing Table (yes/no): +CMD_AccountDetailSet_Prompt_NOQOS Disable QoS Control Function (yes/no): +CMD_AccountDetailSet_Prompt_DISABLEUDP Disable UDP Acceleration Function (yes/no): + + +# AccountRename command +CMD_AccountRename Change VPN Connection Setting Name +CMD_AccountRename_Help Use this to specify a VPN Connection Setting registered on the VPN Client and change its name. +CMD_AccountRename_Args AccountRename [name] [/NEW:new_name] +CMD_AccountRename_[name] Specify the current name of the VPN Connection Setting whose name you want to change. +CMD_AccountRename_NEW Specify the new name after the change. +CMD_AccountRename_PROMPT_OLD Current Name: +CMD_AccountRename_PROMPT_NEW New Name: + + +# AccountConnect command +CMD_AccountConnect Start Connection to VPN Server using VPN Connection Setting +CMD_AccountConnect_Help Use this to specify a VPN Connection Setting registered on the VPN Client and start a connection to the VPN Server using that VPN Connection Setting. A VPN Connection Setting that has a connecting status or a connected status will continue to be connected to the VPN Server, or continue to attempt to connect to the VPN Server until the AccountDisconnect command is used to disconnect the connection (Note however, if the AccountRetrySet command is used to specify the number of retries, connection attempts will be aborted when the specified value is reached.) +CMD_AccountConnect_Args AccountConnect [name] +CMD_AccountConnect_[name] Specify the name of the VPN Connection Setting whose connection you want to start. + + +# AccountDisconnect command +CMD_AccountDisconnect Disconnect VPN Connection Setting During Connection +CMD_AccountDisconnect_Help Use this to specify a VPN Connection Setting that is registered on the VPN Client and that is either in the condition of connecting or is connected, and immediately disconnect it. +CMD_AccountDisconnect_Args AccountDisconnect [name] +CMD_AccountDisconnect_[name] Specify the name of the VPN Connection Setting to disconnect. + + +# AccountStatusGet command +CMD_AccountStatusGet Get Current VPN Connection Setting Status +CMD_AccountStatusGet_Help When a VPN Connection Setting that is registered on the VPN Client is specified and that VPN Connection Setting is currently connected, use this to get its connection status and other information. +CMD_AccountStatusGet_Args AccountStatusGet [name] +CMD_AccountStatusGet_[name] Specify the name of the VPN Connection Setting whose information you want to get. + + +# AccountNicSet command +CMD_AccountNicSet Set Virtual Network Adapter for VPN Connection Setting to Use +CMD_AccountNicSet_Help Use this to change the Virtual Network Adapter name that the existing VPN Connection Settings registered on the VPN Client will use for the connection to a VPN Server. +CMD_AccountNicSet_Args AccountNicSet [name] [/NICNAME:nicname] +CMD_AccountNicSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountNicSet_NICNAME Specify the Virtual Network Adapter name to use when connecting to the VPN Server. + + +# AccountStatusShow command +CMD_AccountStatusShow Set Connection Status and Error Screen to Display when Connecting to VPN Server +CMD_AccountStatusShow_Help When a communication setting is registered on the VPN Client and that communication setting is being used to connect to the VPN Server, use this to set the connection status and error screen to be displayed on the computer display. +CMD_AccountStatusShow_Args AccountStatusShow [name] +CMD_AccountStatusShow_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountStatusHide command +CMD_AccountStatusHide Set Connection Status and Error Screen to be Hidden when Connecting to VPN Server +CMD_AccountStatusHide_Help When a communication setting is registered on the VPN Client and that communication setting is being used to connect to the VPN Server, use this to set the connection status and error screen to not be displayed on the computer display. +CMD_AccountStatusHide_Args AccountStatusHide [name] +CMD_AccountStatusHide_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountSecureCertSet command +CMD_AccountSecureCertSet Set User Authentication Type of VPN Connection Setting to Smart Card Authentication +CMD_AccountSecureCertSet_Help Use this to set the user auth type to Smart Card Authentication for when a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to the VPN Server. Also, you must specify the names of the certificate object and the private key object stored on the smart card. +CMD_AccountSecureCertSet_Args AccountSecureCertSet [name] [/CERTNAME:cert] [/KEYNAME:key] +CMD_AccountSecureCertSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountSecureCertSet_CERTNAME Specify the name of the certificate object stored on the smart card. +CMD_AccountSecureCertSet_KEYNAME Specify the name of the private key object stored on the smart card. The private key must be compatible with the certificate specified by /CERTNAME. +CMD_AccountSecureCertSet_PROMPT_CERTNAME Name of Certificate Object on Smart Card: +CMD_AccountSecureCertSet_PROMPT_KEYNAME Name of Private Key Object on Smart Card: + + +# AccountRetrySet コマンド +CMD_AccountRetrySet Set Interval between Connection Retries for Connection Failures or Disconnections of VPN Connection Setting +CMD_AccountRetrySet_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting attempts to connect to a VPN Server, use this to specify the interval to wait between connection attempts and the limit of how many times to retry connecting when communication with the VPN Server has been disconnected or when the connection process failed. \nIf the user authentication type is Smart Card Authentication, no connection retry will be performed regardless of the Number of Connection Attempts setting. +CMD_AccountRetrySet_Args AccountRetrySet [name] [/NUM:num_retry] [/INTERVAL:retry_interval] +CMD_AccountRetrySet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountRetrySet_NUM Specify the number of times to make consecutive retries. By specifying "999", there will be limitless attempts to reconnection (always connect). By specifying "0", not attempt at reconnection will be made. +CMD_AccountRetrySet_INTERVAL When attempting a reconnection, this sets how many seconds to wait after the previous disconnection or connection failure before starting the reconnection process. +CMD_AccountRetrySet_PROMPT_NUM Reconnection Count ("999" is unlimited): +CMD_AccountRetrySet_PROMPT_INTERVAL Reconnection Interval (Seconds): +CMD_AccountRetrySet_EVAL_INTERVAL Specify 5 seconds or more for the retries interval. + + +# AccountStartupSet command +CMD_AccountStartupSet Set VPN Connection Setting as Startup Connection +CMD_AccountStartupSet_Help Use this to specify a VPN Connection Setting registered on the VPN Client and set it as the startup connection. The VPN Connection Setting that is set as the startup connection will automatically start the connection process when the VPN Client service starts. +CMD_AccountStartupSet_Args AccountStartupSet [name] +CMD_AccountStartupSet_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountStartupRemove command +CMD_AccountStartupRemove Remove Startup Connection of VPN Connection Setting +CMD_AccountStartupRemove_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting is currently set as a startup connection, use this to delete the startup connection. +CMD_AccountStartupRemove_Args AccountStartupRemove [name] +CMD_AccountStartupRemove_[name] Specify the name of the VPN Connection Setting whose setting you want to change. + + +# AccountExport command +CMD_AccountExport Export VPN Connection Setting +CMD_AccountExport_Help Use this to specify a VPN Connection Setting registered on the VPN Client and export its contents as a text file. By exporting a VPN Connection Setting file, and then later, importing it, you can duplicate the contents of a VPN Connection Setting. Also, because it gets saved as a text file, you can edit the contents using a conventional text editor. \nThe export destination file is saved as a UTF-8 format text file. Also, it is convenient to save the file name with the file extension .vpn as this file extension is associated to the Windows Edition VPN Client Manager. +CMD_AccountExport_Args AccountExport [name] [/SAVEPATH:savepath] +CMD_AccountExport_[name] Specify the name of the VPN Connection Setting to export. +CMD_AccountExport_SAVEPATH Specify a file name for the save destination. +CMD_AccountExport_PROMPT_SAVEPATH Save Destination File Name (recommended extension: vpn): + + +# AccountImport command +CMD_AccountImport Import VPN Connection Setting +CMD_AccountImport_Help Use this to import the VPN Connection Setting file that has been exported by the AccountExport command and add it to the VPN Client. +CMD_AccountImport_Args AccountImport [path] +CMD_AccountImport_[path] Specify the file name of the import source. +CMD_AccountImport_PROMPT_PATH Import Source File Name: +CMD_AccountImport_FAILED_PARSE Unable to correctly parse the specified file. Please check it if the file was exported correctly. +CMD_AccountImport_OK The VPN Connection Setting "%s" has been imported. + + + +# RemoteEnable command +CMD_RemoteEnable Allow Remote Management of VPN Client Service +CMD_RemoteEnable_Help Use this to allow management of a VPN Client service from a remote computer that is not localhost, via a remote connection by Command Line Management Utility or VPN Client Manager. +CMD_RemoteEnable_Args RemoteEnable + + +# RemoteDisable command +CMD_RemoteDisable Deny Remote Management of VPN Client Service +CMD_RemoteDisable_Help Use this to deny management of a VPN Client service from a remote computer that is not localhost, via a remote connection by Command Line Management Utility or VPN Client Manager. +CMD_RemoteDisable_Args RemoteDisable + + + + + + +################################################### +# # +# Commands for VPN Tools are listed below # +# # +################################################### + + +# MakeCert command +CMD_MakeCert Create New X.509 Certificate and Private Key (1024 bit) +CMD_MakeCert_Help Use this to create a new X.509 certificate and private key and save it as a file. \nThe algorithm used to create the public key and private key of the certificate is RSA 1024 bit. \nYou can choose to create a root certificate (self-signed certificate) or a certificate signed by another certificate. To create a certificate that is signed by another certificate, you require a private key file (base 64 encoded) that is compatible with the certificate that uses the signature (X.509 format file). \n\nWhen creating a certificate, you can specify the following: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number, and Expiration Date. \nThe created certificate will be saved as an X.509 format file and the private key file will be saved in a Base 64 encoded RSA 1024 bit format file. \n\nThe MakeCert command is a tool that provides the most rudimentary function for creating certificates. If you want to create a more substantial certificate, we recommend that you use either free software such as OpenSSL, or commercial CA (certificate authority) software. \n\nNote: This command can be called from the SoftEther VPN Command Line Management Utility. You can also execute this command while connected to the current VPN Server or VPN Client in Administration Mode but, what actually performs the RSA computation, generates the certificate data and saves it to file is the computer on which the command is running, and all this is executed in a context that has absolutely no relationship to the computer that is the destination of the Administration Mode connection. +CMD_MakeCert_Args MakeCert [/CN:cn] [/O:o] [/OU:ou] [/C:c] [/ST:st] [/L:l] [/SERIAL:serial] [/EXPIRES:expires] [/SIGNCERT:signcert] [/SIGNKEY:signkey] [/SAVECERT:savecert] [/SAVEKEY:savekey] +CMD_MakeCert_CN Specify the Name (CN) item of the certificate to create. You can specify "none". +CMD_MakeCert_O Specify the Organization (O) item of the certificate to create. You can specify "none". +CMD_MakeCert_OU Specify the Organization Unit (OU) item of the certificate to create. You can specify "none". +CMD_MakeCert_C Specify the Country (C) item of the certificate to create. You can specify "none". +CMD_MakeCert_ST Specify the State (ST) item of the certificate to create. You can specify "none". +CMD_MakeCert_L Specify the Locale (L) item of the certificate to create. You can specify "none". +CMD_MakeCert_SERIAL Specify the Serial Number item of the certificate to create. Specify using hexadecimal values. You can specify "none". +CMD_MakeCert_EXPIRES Specify the Expiration Date item of the certificate to create. If you specify "none" or "0", 3650 days (approx. 10 years) will be used. You can specify a maximum of 10950 days (about 30 years). +CMD_MakeCert_SIGNCERT For cases when the certificate to be created is signed by an existing certificate, specify the X.509 format certificate file name to be used to sign the signature. When this parameter is omitted, such signature signing is not performed and the new certificate is created as a root certificate. +CMD_MakeCert_SIGNKEY Specify a private key (RSA, base-64 encoded) that is compatible with the certificate specified by /SIGNCERT. +CMD_MakeCert_SAVECERT Specify the file name to save the certificate you created. The certificate is saved as an X.509 file that includes a public key that is RSA format 1024 bit. +CMD_MakeCert_SAVEKEY Specify the file name to save private key that is compatible with the certificate you created. The private key will be saved as an RSA-format 1024-bit private key file. +CMD_MakeCert_PROMPT_CN Name of Certificate to Create (CN): +CMD_MakeCert_PROMPT_O Organization of Certificate to Create (O): +CMD_MakeCert_PROMPT_OU Organization Unit of Certificate to Create (OU): +CMD_MakeCert_PROMPT_C Country of Certificate to Create (C): +CMD_MakeCert_PROMPT_ST State of Certificate to Create (ST): +CMD_MakeCert_PROMPT_L Locale of Certificate to Create (L): +CMD_MakeCert_PROMPT_SERIAL Serial Number of Certificate to Create (Hexadecimal): +CMD_MakeCert_PROMPT_EXPIRES Expiration Date of Certificate to Create (Days): +CMD_MakeCert_PROMPT_SAVECERT File Name to Save Certificate to Create: +CMD_MakeCert_PROMPT_SAVEKEY File Name to Save Private Key to Create: +CMD_MakeCert_EVAL_EXPIRES Specify the Expiration Date within the range %u to %u. +CMD_MakeCert_ERROR_SIGNKEY Either it is not possible to read the certificate or private key specified by /SIGNCERT and /SIGNKEY, or they were an invalid combination. +CMD_MakeCert_ERROR_GEN_FAILED Creation of certificate and private key failed. + + +# MakeCert2048 command +CMD_MakeCert2048 Create New X.509 Certificate and Private Key (2048 bit) +CMD_MakeCert2048_Help Use this to create a new X.509 certificate and private key and save it as a file. \nThe algorithm used to create the public key and private key of the certificate is RSA 2048 bit. \nYou can choose to create a root certificate (self-signed certificate) or a certificate signed by another certificate. To create a certificate that is signed by another certificate, you require a private key file (base 64 encoded) that is compatible with the certificate that uses the signature (X.509 format file). \n\nWhen creating a certificate, you can specify the following: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number, and Expiration Date. \nThe created certificate will be saved as an X.509 format file and the private key file will be saved in a Base 64 encoded RSA 2048 bit format file. \n\nThe MakeCert command is a tool that provides the most rudimentary function for creating certificates. If you want to create a more substantial certificate, we recommend that you use either free software such as OpenSSL, or commercial CA (certificate authority) software. \n\nNote: This command can be called from the SoftEther VPN Command Line Management Utility. You can also execute this command while connected to the current VPN Server or VPN Client in Administration Mode but, what actually performs the RSA computation, generates the certificate data and saves it to file is the computer on which the command is running, and all this is executed in a context that has absolutely no relationship to the computer that is the destination of the Administration Mode connection. +CMD_MakeCert2048_Args MakeCert2048 [/CN:cn] [/O:o] [/OU:ou] [/C:c] [/ST:st] [/L:l] [/SERIAL:serial] [/EXPIRES:expires] [/SIGNCERT:signcert] [/SIGNKEY:signkey] [/SAVECERT:savecert] [/SAVEKEY:savekey] +CMD_MakeCert2048_CN Specify the Name (CN) item of the certificate to create. You can specify "none". +CMD_MakeCert2048_O Specify the Organization (O) item of the certificate to create. You can specify "none". +CMD_MakeCert2048_OU Specify the Organization Unit (OU) item of the certificate to create. You can specify "none". +CMD_MakeCert2048_C Specify the Country (C) item of the certificate to create. You can specify "none". +CMD_MakeCert2048_ST Specify the State (ST) item of the certificate to create. You can specify "none". +CMD_MakeCert2048_L Specify the Locale (L) item of the certificate to create. You can specify "none". +CMD_MakeCert2048_SERIAL Specify the Serial Number item of the certificate to create. Specify using hexadecimal values. You can specify "none". +CMD_MakeCert2048_EXPIRES Specify the Expiration Date item of the certificate to create. If you specify "none" or "0", 3650 days (approx. 10 years) will be used. You can specify a maximum of 10950 days (about 30 years). +CMD_MakeCert2048_SIGNCERT For cases when the certificate to be created is signed by an existing certificate, specify the X.509 format certificate file name to be used to sign the signature. When this parameter is omitted, such signature signing is not performed and the new certificate is created as a root certificate. +CMD_MakeCert2048_SIGNKEY Specify a private key (RSA, base-64 encoded) that is compatible with the certificate specified by /SIGNCERT. +CMD_MakeCert2048_SAVECERT Specify the file name to save the certificate you created. The certificate is saved as an X.509 file that includes a public key that is RSA format 2048 bit. +CMD_MakeCert2048_SAVEKEY Specify the file name to save private key that is compatible with the certificate you created. The private key will be saved as an RSA-format 2048-bit private key file. + + +# TrafficClient command +CMD_TrafficClient Run Network Traffic Speed Test Tool in Client Mode +CMD_TrafficClient_Help Use this to execute the communication throughput measurement tool's client program. \nTwo commands, TrafficClient and TrafficServer, are used for the communication throughput measurement tool to enable the measurement of communication throughput that can be transferred between two computers connected by IP network. The TrafficServer command is used first on another computer which puts the communication throughput measurement tool server in a listening condition. Then the TrafficClient command is used to connect to that server by specifying its host name or IP address and port number, which makes it possible to measure the communication speed. \nMeasurement of the communication speed is carried out by concurrently establishing multiple TCP connections and calculating the actual number of bits of data that can be transferred within a specified time based on the respective results of transferring the maximum stream data on each connection and then using that to calculate the average value (bps) of communication throughput. Normally when there is one TCP connection, it is common to only be able to achieve communication speeds slower than the actual net throughput because of limitations related to the TCP algorithm. We therefore recommend the establishment of multiple concurrent TCP connections when measuring communication results. Because the throughput that is measured using this measurement method is calculated from the bit length of the data that arrives on the receiver side as a stream by TCP, the packet loss that occurs during transfer and the packets with corrupted data are not included in the packets that actually arrive, which means it is possible to calculate a genuine value that is close to the maximum possible communication bandwidth of the network. \nUsing the measurement results, i.e. the stream size transferred by TCP, the approximate value of data volume that actually passed through the network is calculated and this is divided by time to calculate the bits per sec (bps). The calculation assumes the type of the physical network is Ethernet (IEEE802.3) and the MAC frame payload size is 1,500 bytes (TCP MSS is 1,460 bytes). By specifying the /RAW option, the calculation will not make corrections for the TCP/IP header and MAC header data volume. \n\nNote: This command can be called from the SoftEther VPN Command Line Management Utility. You can also execute this command while connected to the current VPN Server or VPN Client in Administration Mode but, what actually conducts communication and measures the throughput is the computer on which the command is running, and all this is executed in a context that has absolutely no relationship to the computer that is the destination of the Administration Mode connection. +CMD_TrafficClient_Args TrafficClient [host:port] [/NUMTCP:numtcp] [/TYPE:download|upload|full] [/SPAN:span] [/DOUBLE:yes|no] [/RAW:yes|no] +CMD_TrafficClient_[host:port] Specify the host name or IP address and port number that the communication throughput measurement tool server (TrafficServer) is listening for. If the port number is omitted, 9821 will be used. +CMD_TrafficClient_NUMTCP Specify the number of TCP connections to be concurrently established between the client and the server for data transfer. If omitted, 32 will be used. +CMD_TrafficClient_TYPE Specify the direction of data flow when throughput measurement is performed. Specify one of the following options: "download", "upload" or "full". By specifying "download" the data will be transmitted from the server side to the client side. By specifying "upload" the data will be transmitted from the client side to the server side. By specifying "full", the data will be transferred in both directions. When "full" is specified, the NUMTCP value must be an even number of two or more (half the number will be used for concurrent TCP connections in the download direction and the other half will be used in the upload direction). If this parameter is omitted, "full" will be used. +CMD_TrafficClient_SPAN Specify, using seconds, the time span to conduct data transfer for the measurement of throughput. If this parameter is omitted, "15" will be used. +CMD_TrafficClient_DOUBLE When "yes" is specified, the throughput of the measured result will be doubled and then displayed. This option is used for cases when a network device etc. is somewhere on the data route and the total throughput capability that is input and output by this network device is being measured. +CMD_TrafficClient_RAW By specifying "yes", the calculation will not make corrections for the TCP/IP header and MAC header data volume. +CMD_TrafficClient_EVAL_NUMTCP Specify a value of 32 or less for the number of TCP connections. +CMD_TrafficClient_PROMPT_HOST Measurement Server Name and Port Number (9821 if omitted): +CMD_TrafficClient_ERROR_NUMTCP When the data direction is "full" (both directions), you must specify an even value for the number of TCP connections (/NUMTCP). +CMD_TrafficClient_ERROR_HOSTPORT The host name or port number is incorrectly specified. + + +# TrafficServer command +CMD_TrafficServer Run Network Traffic Speed Test Tool in Server Mode +CMD_TrafficServer_Help Use this to execute the communication throughput measurement tool's server program. \nTwo commands, TrafficClient and TrafficServer, are used for the communication throughput measurement tool to enable the measurement of communication throughput that can be transferred between two computers connected by IP network. \nTo set the TCP port of this computer to the Listen status to listen for the connection from the TrafficClient of another computer, specify the port number and start the server program using the TrafficServer command. \nYou can display more detailed information on the communication throughput measurement tool by inputting "TrafficClient ?". \n\nNote: This command can be called from the SoftEther VPN Command Line Management Utility. You can also execute this command while connected to the current VPN Server or VPN Client in Administration Mode but, what actually conducts communication and measures the throughput is the computer on which the command is running, and all this is executed in a context that has absolutely no relationship to the computer that is the destination of the Administration Mode connection. +CMD_TrafficServer_Args TrafficServer [port] [/NOHUP:yes|no] +CMD_TrafficServer_[port] Specify, using an integer, the port number at which to listen for the connection. If the specified port has been already being used by another program, or if the port cannot be opened, an error will occur. +CMD_TrafficServer_NOHUP When "yes" is specified, the server process never stops without regard to any input from the console. It is convenient when you want to run the TrafficServer endlessly. + + + +# Internal message strings concerning TrafficClient / TrafficServer +TT_LISTEN_FAILED Unable to set TCP port %u to Listen status. The port may be being used by another application or this application did not have the authority to open the port. +TTS_LISTEN_STOP The port for listening has been closed. +TTS_ENTER_TO_EXIT \n----------------------------------------\nThe Network Traffic Speed Test Tool in Server Mode started. \n\nPress the Enter key to stop the server program. \n----------------------------------------\n\n +TTS_INIT Starting the server program... +TTS_LISTEN_STARTED The server program has been started. Now the IPv4 TCP port %u is set to Listen status and listening for connection from the client. +TTS_LISTEN_STARTED_V6 The IPv6 TCP Port %u is listening to accept clients. +TTS_LISTEN_FAILED_V6 Failed to open the IPv6 TCP Port %u. Another application might be using the same IPv6 TCP Port, or the IPv6 stack is not installed on the operating system. +TTS_STOP_INIT Stopping the server program... +TTS_STOP_FINISHED The stopping of the server program is complete. +TTS_ACCEPTED Connection %u: Connected from Client %S Port %u. +TTS_DISCONNECTED Connection %u (%S) has been disconnected. +TTS_DISCONNECT Connection %u (%S) has been disconnected. +TTC_INIT Starting the client program... +TTC_FREE The client program has beens terminated. +TTC_CONNECT_START The connection to server %S (port %u) will start. %u TCP connections will be connected. +TTC_CONNECT_FAILED The connection of TCP connection number %u failed. +TTC_CONNECT_NOT_SERVER Because a program other than TrafficServer is operating on the destination TCP port, traffic cannot be measured. +TTC_CONNECT_OK TCP connection number %u has been connected. +TTC_CONNECT_OK_2 \ Data transfer direction: %s +TTC_ERROR_ABORTED The TCP connection initialization with the server failed. Measurement will stop. +TTC_SUMMARY_BAR ------------------------------------------------------- +TTC_SUMMARY_TITLE Network Traffic Speed Test Tool Client Setting Parameters +TTC_SUMMARY_HOST Destination Host Name +TTC_SUMMARY_PORT Destination TCP Port Number +TTC_SUMMARY_NUMTCP Number of TCP Connections to Establish +TTC_SUMMARY_TYPE Data Transfer Direction +TTC_SUMMARY_SPAN Data Transmission Time +TTC_SUMMARY_ETHER Data Correction for Ethernet Frames +TTC_SUMMARY_DOUBLE Measurement of Total Speed of Relay Device Input Output +TTC_TYPE_DOWNLOAD Download (Server to Client) +TTC_TYPE_UPLOAD Upload (Client to Server) +TTC_TYPE_FULL Full (Server < -- > Client) +TTC_SPAN_STR %.1f seconds +TTC_COMM_START \nAll connections were established and so data transfer started. \nMeasurement Start Time: %s\nScheduled Finish Time: %s\n\nMeasuring in progress. Please wait... \n(Do not use any other applications while measuring is in progress.)\n\n +TTC_COMM_END Because %.1f seconds or more have passed, the data communication will end. \n\n +TTC_COMM_USER_CANCEL Because of cancellation by user, the data communication will end. \n\n +TTC_COMM_DISCONNECTED The TCP connection %u has been disconnected. +TTC_STOPPING Stopping the operation of the communication throughput measurement tool client... +TTC_ENTER_TO_EXIT \n----------------------------------------\nThe Network Traffic Speed Test Tool in Client Mode started. \n\nPress the Enter key to stop the client program. \n----------------------------------------\n\n +TTC_RES_TITLE \n\nNetwork Traffic Speed Test Tool\n\n +TTC_RES_COLUMN_1 Item Name +TTC_RES_COLUMN_2 Normal View +TTC_RES_COLUMN_3 Simplified View +TTC_RES_SPAN Time Span for Measurement +TTC_RES_ETHER Data Correction for Ethernet Frames +TTC_RES_BYTES_DOWNLOAD Communication Data Volume in Download Direction +TTC_RES_BYTES_UPLOAD Communication Data Volume in Upload Direction +TTC_RES_BYTES_TOTAL Total Communication Data Volume +TTC_RES_DOUBLE Relay Device Input Output Total Throughput Computation +TTC_RES_BPS_DOWNLOAD Average Throughput in Download Direction +TTC_RES_BPS_UPLOAD Average Throughput in Upload Direction +TTC_RES_BPS_TOTAL Total Average Throughput + + +# Check command +CMD_Check Check whether SoftEther VPN Operation is Possible +CMD_Check_Help Use this to check if the current computer that is running vpncmd is a suitable operation platform for SoftEther VPN Server / Bridge. \nIf this check passes on a system, it is most likely that SoftEther VPN software will operate correctly on that system. \nAlso, if this check does not pass on a system, then this indicates that some type of trouble may arise if SoftEther VPN software is used on that system. +CMD_Check_Args Check + + +# Concerning System Checker +# (This contains some strange character strings which are used to check character code conversion.) +CHECK_TITLE ---------------------------------------------------\nSoftEther VPN Operation Environment Check Tool\nDeveloper Edition\n\nCopyright (c) SoftEther VPN Project.\nAll Rights Reserved.\n\n +CHECK_NOTE If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait...\n\n +CHECK_EXEC_TAG Checking '%s'... \n +CHECK_PASS Pass +CHECK_FAIL Fail +CHECK_RESULT_1 All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system. +CHECK_RESULT_2 Some checks failed. Please check the operation environment of this system. If SoftEther VPN Server / Bridge were to be executed on this system, troubles may occur. +CHECK_TEST_123456789 123456789 + + +CHECK_PROC_KERNEL Kernel System +CHECK_PROC_MEMORY Memory Operation System +CHECK_PROC_STRINGS ANSI / Unicode string processing system +CHECK_PROC_FILESYSTEM File system +CHECK_PROC_THREAD Thread processing system +CHECK_PROC_NETWORK Network system + + + + + + + + +###################################################### +# # +# Setup Wizard (SW) Strings # +# # +###################################################### + +SW_TITLE SoftEther VPN Developer Edition Setup Wizard (Version %S) +SW_EXIT_CONFIRM The setup process of SoftEther VPN hasn't been finished yet.\r\n\r\nDo you want to exit the setup? +SW_UNINSTALL_CONFIRM Starting the uninstall process of %s.\r\n\r\nDo you want to continue? + + +SW_COMPONENT_VPNSERVER_TITLE SoftEther VPN Server +SW_COMPONENT_VPNSERVER_DESCRIPTION Install it on a server computer at the central site of VPN. The management tools will be also installed. + +SW_COMPONENT_VPNCLIENT_TITLE SoftEther VPN Client +SW_COMPONENT_VPNCLIENT_DESCRIPTION Install it on VPN client computers. A VPN client computer will be able to connect to the central VPN Server. The management tools will be also installed. + +SW_COMPONENT_VPNBRIDGE_TITLE SoftEther VPN Bridge +SW_COMPONENT_VPNBRIDGE_DESCRIPTION Install it on computers at each site. Each VPN Bridge will establish a VPN connection to the central VPN Server. The management tools will be also installed. + +SW_COMPONENT_VPNSMGR_TITLE SoftEther VPN Server Manager (Admin Tools Only) +SW_COMPONENT_VPNSMGR_DESCRIPTION Only the VPN Server Manager will be installed. The VPN Server service program will not be installed. You can use the VPN Server Manager to connect and manage remote VPN Servers and VPN Bridges on other computers which can be run on Windows, Linux, Mac OS X, Solaris and FreeBSD. + +SW_COMPONENT_VPNCMGR_TITLE SoftEther VPN Client Manager (Admin Tools Only) +SW_COMPONENT_VPNCMGR_DESCRIPTION Only the VPN Client Manager will be installed. The VPN Client service program will not be installed. You can use the VPN Client Manager to connect and manage remote VPN Clients on other computers which can be run on Windows and Linux. + +SW_WELCOME_TITLE Welcome to the SoftEther VPN Developer Edition Setup Wizard +SW_MODE_TITLE Select a Setup Mode +SW_NOT_ADMIN_TITLE Not Enough Privileges +SW_COMPONENTS_TITLE Select Software Components to Install +SW_EULA_TITLE End User License Agreement +SW_WARNING_TITLE Important Notices +SW_DIR_TITLE Directory to Install on +SW_READY_TITLE Ready to Install +SW_PERFORM_TITLE Setup is in Progress +SW_ERROR_TITLE Results of Setup +SW_FINISH_TITLE Setup Finished +SW_UNINST1_TITLE Uninstaller +SW_LANG1_TITLE SoftEther VPN: Configure the Display Language +SW_EASY1_TITLE Welcome to SoftEther VPN Client Easy Installer Creator +SW_EASY2_TITLE Specify Files +SW_WEB1_TITLE Welcome to SoftEther VPN Client Web Installer Creator +SW_WEB2_TITLE Specify Files + +SW_UNINSTALLINFO_URL http://selinks.org/ +SW_UNINSTALLINFO_PUBLISHER SoftEther VPN Project + +SW_KB3033929_REQUIRED In Windows 7 and Windows Server 2008 R2, some SoftEther VPN functions require the Microsoft's Windows Update module KB3033929 installed.\r\n\r\nIf KB3033929 is not installed in your Windows, please install it from Windows Update or Microsoft website before installing SoftEther VPN. + + +SW_COMPONENTS_ABOUT_TAG About %s +SW_COMPONENTS_REQUIRE_ADMIN Installation Requires Administrators Privileges +SW_COMPONENTS_REQUIRE_ADMIN_TEXT You have to restart the setup wizard by a user who has Administrators privileges to install %s in the System Mode. To install in the System Mode, click Back. +SW_DIR_SELECT Please Specify the Directory to Install +SW_DIR_MORE_THAN_110 The directory name is too long.\r\nSpecify 110 letters at most. +SW_DIR_WRITE_ERROR Unable to create the specified directory "%s" or failed to write a file on the directory.\r\n\r\nSpecify another directory. +SW_DIR_DST_IS_SAME_TO_SRC The specified directory "%s" is same as the source directory. +SW_DIR_IS_NOT_HDD The specified directory "%s" is not a local hard disk drive.\r\n\r\nTo install %s in the System Mode, you have to specify a directory on a local hard disk drive. +SW_DIR_IS_NOT_FULLPATH The directory "%s" is not a format of full path.\r\n\r\nPlease specify the full path of the directory. +SW_DIR_DST_IS_OTHER_PRODUCT The specified directory has another component already installed.\r\n\r\nPlease specify another directory. +SW_DIR_DST_IS_NEWER Newer version of the software has been installed on the specified directory.\r\n\r\nYou need not to install this version. +SW_DIR_DST_IS_NEWER_2 Newer version of the software has been installed on the specified directory.\r\n\r\nThis installer will import and apply the VPN Connection Settings which is built-in on the Easy Installer. No program files will be overwritten. +SW_DIR_DST_IS_BROKEN Unable to read a file "%s" which is on the specified directory.\r\n\r\nPlease specify another directory. +SW_DIR_DST_IS_SYSTEM_MODE The same software is already installed on the specified directory as the System Mode.\r\n\r\nPlease specify another directory. +SW_DIR_DST_IS_USER_MODE The same software is already installed on the specified directory as the User Mode.\r\n\r\nPlease specify another directory. +SW_SYSTEM_MODE_ALREADY_INSTALLED The software "%s" is already installed on this computer as the System Mode.\r\n\r\nBoth the System Mode and the User Mode installation of the same software on the same computer will conflict.\r\n\r\nDo you really want to continue the installation as the User Mode? + +SW_NOT_INSTALL_SRC The setup program has been executed from outside an install source.\r\n\r\nUnable to continue the installation. +SW_SETUPLOG_CORRUPTED The "setuplog.dat" file is broken. +SW_MSI_UNINSTALL_FAILED The older version of %s (Product Code: "%S") is installed. Windows Installer failed to uninstall this older version.\r\n\r\nPlease uninstall this older version manually and restart this installer again. +SW_MSI_UNINSTALL_REBOOT_REQUIRED Windows Installer has uninstalled the older version of %s. The reboot of computer is required.\r\n\r\nPress Finish button and reboot the computer MANUALLY, and restart this installer after the reboot. +SW_NOTICE_VPNSERVER_IS_INSTALLED SoftEther VPN Bridge is selected as a component to install. However, this computer has already had SoftEther VPN Server installed.\r\n\r\nUsually, you don't need to install both SoftEther VPN Server and SoftEther VPN Bridge on the same computer.\r\nIf you install both software, conflicts such as port number duplication will occur.\r\nIf you want to replace the SoftEther VPN Server to SoftEther VPN Bridge, you should exit this installer, uninstall SoftEther VPN Server and restart this installer after that.\r\n\r\nDo you really want to continue the SoftEther VPN Bridge installation? +SW_NOTICE_VPNBRIDGE_IS_INSTALLED SoftEther VPN Server is selected as a component to install. However, this computer has already had SoftEther VPN Bridge installed.\r\n\r\nUsually, you don't need to install both SoftEther VPN Bridge and SoftEther VPN Server on the same computer.\r\nIf you install both software, conflicts such as port number duplication will occur.\r\nIf you want to replace the SoftEther VPN Server to SoftEther VPN Server, you should exit this installer, uninstall SoftEther VPN Bridge and restart this installer after that.\r\n\r\nDo you really want to continue the SoftEther VPN Server installation? +SW_OS_FAILED This operating system doesn't support %s. +SW_LANG_NOT_CHANGED The language settings of %s were not changed. +SW_LANG_LIST_LOAD_FAILED Loading the available language list failed. +SW_LANG_OK The display language of %s has been changed successfully.\r\nIf %s programs are currently running, exit a program and restart it to apply the new display language. If the display language still doesn't effect, reboot Windows.\r\n +SW_LANG_OK_SERVICE \r\nThe language of log files which the service program records will be changed to the new language after a reboot. +SW_LANG_OK_VPNCMGR \r\nThe display setting of VPN Client Manager will be changed after exit and reboot VPN Client Manager. (Including complete termination from the task tray.) +SW_CHILD_PROCESS_ERROR Failed to execute a child process. +SW_EXE_FILTER Windows Executable Files (*.EXE)|*.exe|All Files (*.*)|*.* +SW_PERFORM_MSG_EASY_INFO Compiling the VPN Client Easy Installer... +SW_EASY_FINISHED_MSG The VPN Client Easy Installer is created successfully.\r\nThe installer is saved as the following filename.\r\n\r\n%s\r\n\r\nYou can distribute the above file in the enterprise. +SW_EASY_ERROR_MSG Failed to create a VPN Client Easy Installer. +SW_OTHER_INSTANCE_EXISTS Another SoftEther VPN Setup Wizard is running.\r\n\r\nYou can continue this wizard after another wizard exits. +SW_PERFORM_MSG_WEB_INFO Compiling the VPN Client Web Installer... +SW_WEB_ERROR_MSG Failed to create a VPN Client Web Installer. +SW_INSTALLER_CACHE_IS_NOT_SIGNED The currently installed SoftEther VPN Client of this computer has not been installed from the digital-signed package signed by an Authenticode digital certificate of SoftEther VPN Project.\r\nIt might be installed from a customized installer (for example, an installer created by Easy Installer Creator.)\r\n\r\nIf you continue to create a Web Installer, a warning message will be appeared on the user's screen when its loading.\r\nTo avoid showing the warning message, you should cancel this creating wizard, download the latest version of SoftEther VPN Client from the SoftEther VPN Project's web site, re-install it and restart the Web Installer Creator wizard.\r\n\r\nDo you really to continue to create a Web Installer? +SW_FILE_NOT_FOUNT The file "%s" not found. +SW_WEB_FINISHED The Web Installer is created and saved as "%s".\r\n\r\nPlease extract inner files from the ZIP file, upload them into the Web server, and edit a HTML file and an inf file to replace URLs appropriately.\r\n\r\nThe explanation to deploy the Web Installer is described on the ZIP file. + +SW_VG_CONFIRM_MSG Do you really want to install and activate the VPN Gate P2P Relay Function plug-in module with SoftEther VPN Client?\r\n\r\nThis plug-in will realize the stability of communication to bypass the government censorship firewall. However, the communication of VPN Gate usually consumes some network bandwidth. VPN Gate is not recommended to be used in the mobile connections. \r\n\r\nPlease note that there are some countries and regions which have the regulation to forbid the encrypted communications to bypass government censorship firewalls. In such a case, you must not use the VPN Gate functions on your computer. VPN Gate is intended to be used mainly in Japan. VPN Gate is a research project for just academic purpose only. VPN Gate is governed under the Japanese laws. Other countries' laws are none of our concerns nor responsibilities. By using this software and service, you must observe all concerned laws and rules with your own responsibility. You will be completely liable to any damages and responsibilities which are results of using this software and service, regardless of either inside or outside of Japan's territory. + + + + +SW_PERFORM_MSG_INIT_TASKS Preparing the tasks... +SW_PERFORM_MSG_COPY_PREPARE Preparing the copying of files... +SW_PERFORM_MSG_WRITE_ERROR Failed to write the destination file "%s".\r\n\r\nThere might be another person who has been keeping this file open.\r\nIf programs or services of %s are running, please terminate them and click Retry. +SW_PERFORM_MSG_COPY_FILE Copying "%s" ... +SW_PERFORM_MSG_SET_SECURITY Setting a security on "%s" ... +SW_PERFORM_MSG_PLUGIN Installing the plugins... +SW_PERFORM_MSG_STOP_SVC Stopping the "%s" service ... +SW_PERFORM_MSG_WAIT_FOR_FILE_UNLOCK The file "%s" is locked by a running program. Waiting to unlock... +SW_PERFORM_MSG_INSTALL_SVC Installing the %s service... +SW_PERFORM_MSG_START_SVC Starting the %s service... +SW_PERFORM_MSG_CREATE_LINKS Creating shortcut files... +SW_PERFORM_MSG_DELETE_LINKS Deleting shortcut files... +SW_PERFORM_MSG_DELETE_OLD_LINKS Deleting old shortcut files... +SW_PERFORM_MSG_REGISTER_UNINSTALL Registering uninstall information on the Control Panel... +SW_PERFORM_MSG_IMPORTING_ACCOUNT Importing the Built-in VPN Connection Setting in the Easy Installer... +SW_PERFORM_MSG_DELETE_SETUP_INFO Deleting the install information and logs... +SW_PERFORM_MSG_WRITE_LOG Writing a setup log... +SW_PERFORM_MSG_COPY_ERROR Copying to the file "%s" failed. +SW_PERFORM_MSG_CREATE_LINK_ERROR Creating the shortcut file "%s" failed.\r\n\r\nDo you want to retry? +SW_PERFORM_MSG_WRITE_LOG_ERROR Creating the setup log file "%s".\r\n\r\nDo you want to retry? +SW_PERFORM_MSG_STOP_SVC_ERROR Stopping the "%s" service (internal name: "%S") failed. +SW_PERFORM_MSG_START_SVC_ERROR Starting the "%s" service (internal name: "%S") failed. +SW_PERFORM_MSG_SVC_UNINSTALL_FAILED Uninstall of the "%s" service (internal name: "%S") failed. +SW_PERFORM_MSG_SVC_INSTALL_FAILED Install of the "%s" service (internal name: "%S") failed. +SW_PERFORM_MSG_SVC_USERMODE_EXEC_FAILED Starting the user-mode service "%s" failed. +SW_PERFORM_MSG_UPDATING Updating system settings... +SW_PERFORM_MSG_DELETE_NIC Removing the Virtual Network Adapters... +SW_PERFORM_MSG_FINISHED Setup progress finished. +SW_PERFORM_MSG_UNINSTALL_MSI Windows Installer is uninstalling the older version of %s... +SW_PERFORM_MSG_UPDATE_LANG_CONFIG Changing the language settings... + +SW_PERFORM_MSG_INIT_UNINST Preparing uninstall... +SW_PERFORM_MSG_DELETE_PREPARE Preparing to delete files... +SW_PERFORM_MSG_DELETE_ERROR Unable to delete the file "%s".\r\n\r\nThere might be another program who is keeping this file open.\r\nIf programs or services of %s are running, please terminate them and click Retry. +SW_PERFORM_MSG_UNINSTALL_SVC Uninstalling the "%s" service ... +SW_PERFORM_MSG_DELETE Deleting the "%s" service ... +SW_PERFORM_MSG_EASY_INIT Building the Easy Installer... +SW_PERFORM_MSG_WEB_INIT Building the Web Installer... +SW_PERFORM_MSG_INSTALL_SELOW Creating a restore point of the system and installing essential components. It may take a while... + + +SW_TAG_USERNAME \ (User-mode) +SW_DIRNAME_CONFIG_TOOLS Configuration Tools +SW_DIRNAME_ADMIN_TOOLS Administrative Tools +SW_DIRNAME_LANGUAGE_TOOLS Language Settings + +SW_RUN_TEXT_VPNSMGR Start the SoftEther VPN Server Manager. +SW_RUN_TEXT_VPNCMGR Start the SoftEther VPN Client Manager. + +SW_NIC_UNINSTALL Virtual Network Adapters of SoftEther VPN Client have been created on the system.\r\nDo you want to delete these Virtual Network Adapters? + +# Do not translate this section !!! +SW_TAG_USERNAME_ENGLISH \ (User-Mode) +SW_LINK_NAME_VPNSERVER_SVC SoftEther VPN Server Developer User-mode Service +SW_LINK_NAME_VPNBRIDGE_SVC SoftEther VPN Bridge Developer User-mode Service +SW_LONG_VPNSERVER SoftEther VPN Server Developer Edition +SW_LONG_VPNCLIENT SoftEther VPN Client Developer Edition +SW_LONG_VPNBRIDGE SoftEther VPN Bridge Developer Edition +SW_LONG_VPNSMGR SoftEther VPN Server Manager Developer Edition +SW_LONG_VPNCMGR SoftEther VPN Client Manager Developer Edition +SW_LANG_SET_FAILED Failed to write the new language setting on lang.config file. +# --- end of "Do not translate this section" --- + + +# Shortcuts Filenames +SW_LINK_NAME_VPNSMGR_SHORT SoftEther VPN Server Manager (Dev) +SW_LINK_NAME_VPNSMGR_SHORT_UM SE-VPN Server Manager (Dev User) +SW_LINK_NAME_VPNSMGR_SHORT_TOOLSONLY SE-VPN Server Manager (Dev Tools) +SW_LINK_NAME_VPNSMGR_SHORT_TOOLSONLY_UM SE-VPN Server Manager (Dev Tools User) +SW_LINK_NAME_VPNSMGR_FULL SoftEther VPN Server Manager Developer Edition +SW_LINK_NAME_VPNSMGR_COMMENT You can manage SoftEther VPN Server or SoftEther VPN Bridge on a remote computer. + +SW_LINK_NAME_VPNCMGR_SHORT SoftEther VPN Client Manager (Dev) +SW_LINK_NAME_VPNCMGR_FULL SoftEther VPN Client Manager Developer Edition +SW_LINK_NAME_VPNCMGR_COMMENT You can connect to a VPN Server by using SoftEther VPN Client. + +SW_LINK_NAME_VPNCMGRTOOLS_SHORT SoftEther VPN Client Remote Manager (Dev) +SW_LINK_NAME_VPNCMGRTOOLS_SHORT_UM SE-VPN Client Remote Manager (Dev User) +SW_LINK_NAME_VPNCMGRTOOLS_FULL SoftEther VPN Client Remote Manager Developer Edition + +SW_LINK_NAME_VPNCMGR2_FULL Manage Remote Computer's SoftEther VPN Client +SW_LINK_NAME_VPNCMGR2_COMMENT You can establish a remote connection to and manage a SoftEther VPN Client on a remote computer. + +SW_LINK_NAME_VPNCMGRTRAY_FULL SoftEther VPN Client Manager Developer Edition Startup +SW_LINK_NAME_VPNCMGRTRAY_COMMENT Registers an icon of SoftEther VPN Client Developer Edition on the taskbar's notification area. + +SW_LINK_NAME_EASYINSTALLER Easy Installer Creator +SW_LINK_NAME_EASYINSTALLER_COMMENT A tool for enterprise system administrators to create a SoftEther VPN Client Easy Installer which has a function to kick-start a VPN connection to the specific destination automatically. + +SW_LINK_NAME_WEBINSTALLER Web Installer Creator +SW_LINK_NAME_WEBINSTALLER_COMMENT A tool for enterprise system administrators to create a SoftEther VPN Client Web Installer (ActiveX Installer) which has a function to kick-start a VPN connection to the specific destination automatically. + + +SW_LINK_NAME_VPNCMD SoftEther VPN Command Line Utility (vpncmd) +SW_LINK_NAME_VPNCMD_COMMENT Manage SoftEther VPN Server, SoftEther VPN Bridge and SoftEther VPN Client on the command-line interface in vpncmd. +SW_LINK_NAME_TRAFFIC Network Traffic Speed Test Tool +SW_LINK_NAME_TRAFFIC_COMMENT Performs transmitting packets between two computers connected with TCP/IP, with large amount of throughput as possible, in order to measure the actual network traffic speed available. +SW_LINK_NAME_TCP TCP Optimization Utility +SW_LINK_NAME_TCP_COMMENT TCP Optimization Utility can adjust the parameters of TCP/IP of Windows in order to increase the network communication throughput of this computer. +SW_LINK_NAME_SERVICES Services Running on this Computer +SW_LINK_NAME_SERVICES_COMMENT Starts, stops, and configures Windows services. You can start and stop SoftEther VPN services. +SW_LINK_NAME_VPNSERVER_SVC_COMMENT Starts SoftEther VPN Server Service in the User Mode. +SW_LINK_NAME_VPNBRIDGE_SVC_COMMENT Starts SoftEther VPN Bridge Service in the User Mode. + +SW_LINK_NAME_UNINSTALL Uninstall %s +SW_LINK_NAME_UNINSTALL_COMMENT Uninstall %s on this computer. + +SW_LINK_NAME_LANGUAGE Configure Display Language +SW_LINK_NAME_LANGUAGE_COMMENT Change the display language setting of %s. + +SW_LINK_NAME_DEBUG Debugging Information Collecting Tool +SW_LINK_NAME_DEBUG_COMMENT Collects debugging information of SoftEther VPN. Use this tool only if your support staff asks you to do so. diff --git a/src/bin/hamcore/strtable_tw.stb b/src/bin/hamcore/strtable_tw.stb index 77652b19..15c20e0d 100644 --- a/src/bin/hamcore/strtable_tw.stb +++ b/src/bin/hamcore/strtable_tw.stb @@ -1,7 +1,8 @@ # SoftEther VPN String Table -# Copyright (c) SoftEther VPN Project. All Rights Reserved. -# -# http://www.softether.co.jp/ +# Copyright (c) all contributors on SoftEther VPN project in GitHub. +# Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. +# +# https://www.softether.org/ # # Contributors: # - YF (https://github.com/yfdyh000) @@ -160,11 +161,11 @@ ERR_91 無法斷開虛擬 3 層交換機會話。要刪除會話,請停止 ERR_92 具有指定名稱的虛擬 3 層交換機已存在。指定一個不同的名稱。 ERR_93 找不到指定的虛擬 3 層交換機。 ERR_94 指定的名稱無效。檢查名稱是否有不能使用的字元 -ERR_95 無法添加虛擬 3 層介面。 -ERR_96 無法刪除虛擬 3 層介面。 +ERR_95 無法添加虛擬 3 層介面。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. +ERR_96 無法刪除虛擬 3 層介面。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting interfaces are unable when the Virtual Layer 3 switch is running. ERR_97 與指定虛擬 3 層交換介面的目標虛擬 HUB 連接的虛擬 3 層介面已在虛擬 3 層交換機中存在。不能在同一個虛擬 3 層交換機中定義超過一個連接到同一個虛擬 HUB 的虛擬 3 層介面。 -ERR_98 無法添加路由表項。 -ERR_99 無法刪除路由表項。 +ERR_98 無法添加路由表項。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. +ERR_99 無法刪除路由表項。Please check that the parameters are valid. Also please make sure that the Virtual Layer 3 switch is stopped. Adding or deleting routing table entries are unable when the Virtual Layer 3 switch is running. ERR_100 指定的路由表項已存在。 ERR_101 用戶端和伺服器的時鐘彼此不同步。檢查時間設置。 ERR_102 無法啟動此虛擬 3 層交換機。 要啟動虛擬 3 層交換機,必須在虛擬 3 層交換機定義至少一個虛擬介面。 @@ -454,7 +455,7 @@ WINVER_ERROR_PC_REMOTE 遠端伺服器 # 開源版本的警告 -OSS_MSG 歡迎來到 SoftEther VPN 伺服器學術版 !\r\n\r\n此 VPN 伺服器作為日本筑波大學的一個學術研究由免費軟體發展的,且由,開源 (GPL) SoftEther 項目 (http://www.softether.org/) 為公眾利益免費發佈的。\r\n\r\nSoftEther VPN 軟體是作為筑波大學和 SoftEther 公司之間的聯合研究合同的一部分而發佈給公眾的。SoftEther VPN 軟體的開發和發佈僅為學術研究目的。因此,對 SoftEther VPN 軟體不提供支援服務,即使它包含錯誤或漏洞。用戶將對使用 SoftEther VPN 的結果承擔責任。 SoftEther VPN 的開發者和發行者都將永遠不會為任何後果或損失承擔責任。\r\n\r\n在您同意上述啟示後,使用 SoftEther VPN 伺服器享受 VPN 通信。\r\n\r\n對於 SoftEther VPN 的更多細節,請參閱 http://www.softether.org/。\r\n\r\n +OSS_MSG 歡迎來到 SoftEther VPN 伺服器學術版 !\r\n\r\n此 VPN 伺服器作為日本筑波大學的一個學術研究由免費軟體發展的,且由,開源 SoftEther 項目 (http://www.softether.org/) 為公眾利益免費發佈的。\r\n\r\nSoftEther VPN 軟體是作為筑波大學和 SoftEther 公司之間的聯合研究合同的一部分而發佈給公眾的。SoftEther VPN 軟體的開發和發佈僅為學術研究目的。因此,對 SoftEther VPN 軟體不提供支援服務,即使它包含錯誤或漏洞。用戶將對使用 SoftEther VPN 的結果承擔責任。 SoftEther VPN 的開發者和發行者都將永遠不會為任何後果或損失承擔責任。\r\n\r\n在您同意上述啟示後,使用 SoftEther VPN 伺服器享受 VPN 通信。\r\n\r\n對於 SoftEther VPN 的更多細節,請參閱 http://www.softether.org/。\r\n\r\n # NAT Traversal warning @@ -583,7 +584,8 @@ ERRDLG_DEVICE_ERROR 與 VPN Server 的連接被中斷,因為虛擬網路介 # 關於協議 PROTO_DIRECT_TCP 直接的 TCP/IP 連接 PROTO_HTTP_PROXY 通過 HTTP 代理伺服器連接 -PROTO_SOCKS_PROXY 通過 SOCKS 代理伺服器連接 +PROTO_SOCKS_PROXY 通過 SOCKS4 代理伺服器連接 +PROTO_SOCKS5_PROXY 通過 SOCKS5 代理伺服器連接 PROTO_SSH 通過 SSH 伺服器連接 PROTO_UNKNOWN 未知協議 @@ -947,6 +949,8 @@ CM_STOP_INST_VLAN_1 要想在此電腦上安裝虛擬網路介面卡,您必 CM_STOP_INST_VLAN_2 要想在此電腦上安裝虛擬網路介面卡,您必須在“控制台會話”下啟動 VPN Client 管理器。\r\n\r\n目前,此電腦上已安裝 %s,且用戶已登入遠端會話 (會話ID: %u) 而不是控制台進程。\r\n若要安裝虛擬網路介面卡,必須在“控制台會話”下啟動 VPN Client 管理器。\r\n(目前用戶並未登入到控制台會話 (會話ID: 0)。) \r\n\r\n首先使用切換用戶功能從本地登入到電腦,或在遠端桌面使用 “/console” 論據功能,或切換電腦的本地控制台設備,之後啟動 VPN Client 管理器,並安裝虛擬網路介面卡。 CM_SHORTCUT_DESKTOP_MSG 若要使用 VPN 連接設置快捷方式啟動連接,您必須在“控制台會話”下運行快捷方式檔。\r\n\r\n目前用戶作為遠端會話 (會話ID: %u) 登入而不是控制台會話。 CM_HTTP_PROXY_WARNING 已選擇“通過 HTTP 代理伺服器連接”。\r\n\r\n一般情況下,HTTP 伺服器只允許兩種 TCP 埠作為連接到目標伺服器的埠號: HTTP 協議 (TCP 埠號 80) 和 HTTPS 協議 (TCP 埠號 443)。\r\n(同樣,也有的代理伺服器提供更寬泛的 TCP 埠供連接使用。) \r\n\r\n當通過一台禁用除 HTTP 埠或 HTTPS 埠的 HTTP 代理伺服器建立 VPN 連接時,您必須指定 443 (HTTPS 協定) 作為目標 VPN Server 的埠號。\r\n\r\n要檢查您當前使用的 HTTP 代理伺服器是否允許 80 或 443 意外的埠,請與 HTTP 代理伺服器的管理員聯繫。\r\n\r\n目前 %d 指定為目標 VPN Server 的埠號。您是否要更改埠號為 443 (HTTPS 協議) ?\r\n(您所連接的 VPN Server 的 443 埠必須被設為監聽狀態並且空閒。) \r\n如果您無法確定,請與系統管理員或網路系統管理員聯繫。 +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED 密碼已更改。 CM_ACCOUNT_SETTING_FILE VPN 連接設置檔案 (*.VPN)|*.vpn|所有檔案 (*.*)|*.* CM_ACCOUNT_SAVE_TITLE 輸入要匯出的 VPN 連接設置檔案的檔案名 @@ -1085,7 +1089,7 @@ SVC_HIDE_TRAY_MSG 啟動 %S 使用者模式時將隱藏工作列圖示。\r\n #關於服務 (UNIX) -UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n +UNIX_SVC_HELP %S service program\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n UNIX_SVC_STARTED The %S service has been started.\n UNIX_SVC_STOPPING Stopping the %S service ...\n UNIX_SVC_STOPPED %S service has been stopped.\n @@ -1804,6 +1808,9 @@ LS_LICENSE_NOT_VPNSERVER 連接 "%S": 許可證錯誤。VPN Client 嘗試連接 LS_LICENSE_NOT_VPNCLUSTER 連接 "%S": 許可證錯誤。此 VPN Server 上註冊的許可證是禁止使用當前群集功能的類型,且一個 VPN Client 已嘗試在群集模式下連接。您必須重啟 VPN Server。 LS_LICENSE_VIOLATION 連接 "%S": VPN Server 發生違反許可證錯誤,不接受連接。 LS_LICENSE_VIOLATION_DETECTED 發現許可證違反錯誤,一個不同的 VPN Server 與此服務端具有相同的服務端ID "%I64u"。可能是在群集中有兩個或以上 VPN Server 正在使用相同的許可證。請檢查每一個 VPN Server 的許可證資訊。 +LS_API_AUTH_OK HTTPS API client "%r:%u" (%S): Administration mode: "%S": The embedded HTTPS web server accepted the successful login. Username: "%S", Method: "%S", Path: "%S" +LS_API_AUTH_ERROR HTTPS API client "%r:%u" (%S): The embedded HTTPS web server refused a login attempt. Username: "%S", Method: "%S", Path: "%S" +LS_API_RPC_CALL HTTPS API client "%r:%u" (%S): The client called a JSON-API. Method: "%S", Returned error code: %u (0 = success), Returned error message: "%s" # (OpenVPN Logs) @@ -2103,6 +2110,7 @@ L3_SWITCH_STOP 虛擬 3 層交換機 "%S" 終止。 #關於Microsoft.c +MS_VIRTUAL 专有的虚拟/内部接口 MS_ETHERNET 網路介面 MS_TOKENRING 標記環介面 MS_FDDI FDDI 介面 @@ -2311,7 +2319,8 @@ STATIC9 您可以通過代理伺服器連接到 VPN Server。 STATIC10 代理類型(&T): R_DIRECT_TCP 直接 TCP/IP 連接(無代理)(&D) R_HTTPS 通過 HTTP 代理伺服器連接(&T) -R_SOCKS 通過 SOCKS 代理伺服器連接(&S) +R_SOCKS 通過 SOCKS4 代理伺服器連接(&S) +R_SOCKS5 通過 SOCKS5 代理伺服器連接(&S) B_PROXY_CONFIG 代理伺服器設置(&R) STATIC11 服務端證書驗證選項(&F): R_CHECK_CERT 總是驗證服務端證書(&C) @@ -2353,12 +2362,22 @@ STATIC2 主機名稱(&H): STATIC3 埠(&A): STATIC4 用戶名(&U): STATIC5 密碼(&P): +B_HTTP_HEADER Custom HTTP header values IDOK 確定(&O) IDCANCEL 取消 STATIC6 (可選) STATIC7 (可選) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 進階設置 STATIC1 為系統管理員,和在網路,通信協定,安全方面有一定瞭解的用戶提供了可選擇的設置。可以由此來自訂 VPN 通信協議設置。為系統管理員和專家在網路、通信協定和安全方面提供可選設置。自訂 VPN 協議的通訊設定。 @@ -2453,7 +2472,7 @@ STATIC7 保持網際網路連接功能(&K) PREFIX D_ABOUT S_INFO1 SoftEther VPN %u.0 Developer Edition (Ver %u.%02u, Build %u) -S_INFO2 Open-Source VPN Software for Academic Purpose, under the GPLv2 License.\r\nCopyright (c) 2012-%u SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S +S_INFO2 Licensed under the Apache License, Version 2.0.\r\nCopyright (c) 2012-%u all contributors on SoftEther VPN project in GitHub. All Rights Reserved.\r\nWeb Site: http://www.softether.org/\r\n%S S_INFO3 This product includes the following software components:\r\nBitVisor: Copyright (c) 2007, 2008 University of Tsukuba. Copyright (C) 2007, 2008 National Institute of Information and Communications Technology. All rights reserved. / Microsoft(R) C Runtime Library: (c) 2007 Microsoft Corporation. All Rights Reserved. / PKCS #11 Cryptographic Token Interface (Cryptoki): Copyright (c) RSA Security Inc. / WinPcap: Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy). All rights reserved. / libedit: Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. / libiconv: Copyright (C) 2007 Free Software Foundation, Inc. / ncurses: Copyright (c) 1998-2005, 2006 Free Software Foundation, Inc. / OpenSSL: Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). / zlib: (C) 1995-2004 Jean-loup Gailly and Mark Adler. / Special Thanks to: Software Laboratory, Academic Computing Communication Center, Industrial Liaison and Cooperative Research Center and Professor Yasushi Shinjo in University of Tsukuba, Japan. S_INFO4 此 VPN 伺服器作為的一個學術研究且由 (http://www.softether.org/) 為公眾利益免費發佈的。本軟體是日本筑波大學 SoftEther 專案下開發的免費軟體,無任何擔保。開發人員、版權所有者或分銷商在任何情況下對於使用本軟體的任何索賠、損害賠償或其他情況不承擔責任。\r\n\r\nSoftEther VPN 是日本政府的研究和開發項目的一項工作,由日本的經濟、貿易和工業部資助,由資訊化推進機構管理。 IDCANCEL 確定(&O) @@ -2526,7 +2545,8 @@ STATIC9 您可以通過代理伺服器連接到 VPN Server。 STATIC10 代理類型(&T): R_DIRECT_TCP 直接 TCP/IP 連接 (無代理) (&D) R_HTTPS 通過 HTTP 代理伺服器連接(&T) -R_SOCKS 通過 SOCKS 代理伺服器連接(&O) +R_SOCKS 通過 SOCKS4 代理伺服器連接(&O) +R_SOCKS5 通過 SOCKS5 代理伺服器連接(&O) B_PROXY_CONFIG 代理伺服器設置(&R) STATIC11 選擇管理模式並輸入密碼(&M) STATIC12 您可以使用服務端管理模式或虛擬 HUB 管理模式連接到 VPN Server。\r\n\r\n伺服器管理模式允許您管理整個 VPN Server 和所有虛擬 HUB 。\r\n\r\n虛擬 HUB 管理模式允許您只能管理您擁有許可權的一個虛擬 HUB 。 @@ -4110,7 +4130,8 @@ STATIC9 您可以通過代理伺服器連接 STATIC10 代表類型: R_DIRECT_TCP 直接 TCP/IP 連接(無代理)(&D) R_HTTPS 通過 HTTP 代理伺服器連接(&T) -R_SOCKS 通過 SOCKS 代理伺服器連接(&K) +R_SOCKS 通過 SOCKS4 代理伺服器連接(&K) +R_SOCKS5 通過 SOCKS5 代理伺服器連接(&K) B_PROXY_CONFIG 代理伺服器設置(&R) IDOK 確定(&O) IDCANCEL 取消 @@ -4462,7 +4483,7 @@ CMD_VPNCMD_HOST_2 指定的主機名稱或正在運行的目標 VPN Client 電 CMD_VPNCMD_HOST_3 目標 IP 位址的主機名稱: CMD_VPNCMD_HUB_1 如果通過虛擬 HUB 管理模式連接到伺服器,請輸入虛擬 HUB 的名稱。\n如果通過伺服器管理模式連接,無須輸入任何內容請按Backspace鍵。\n CMD_VPNCMD_HUB_2 指定虛擬 HUB 名稱: -CMD_VPNCMD_ABOUT SoftEther VPN 命令列管理工具 (vpncmd 命令)\nDeveloper Edition\n%S\n%S\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n +CMD_VPNCMD_ABOUT SoftEther VPN 命令列管理工具 (vpncmd 命令)\nDeveloper Edition\n%S\n%S\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll rights reserved.\n CMD_VPNCMD_PASSWORD_1 訪問被拒絕。可能是密碼不正確,或者是您以不正確的管理模式連接。您可以嘗試再次輸入密碼。要取消,請按 Ctrl + D。 CMD_VPNCMD_PASSWORD_2 密碼: CMD_VPNCMD_ERROR 發生錯誤。(錯誤代碼: %u)\n%s @@ -5324,6 +5345,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 指定級聯名稱來改變設置。 +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone 命令 CMD_CascadeProxyNone 將級聯的連接方法設置為直接與 TCP/IP 連接 CMD_CascadeProxyNone_Help 指定已經在當前虛擬 HUB 註冊的級聯連接,當此連接和 VPN Server 之間通信時,設置連接方法為 [直接與 TCP/IP 連接],而不通過代理伺服器。\n此命令在集群虛擬 HUB 中不能運行。 @@ -5342,15 +5392,24 @@ CMD_CascadeProxyHttp_PASSWORD 如果連接到 HTTP 代理伺服器時需要使 CMD_CascadeProxyHttp_Prompt_Server 代理伺服器主機名稱和埠號: - # CascadeProxySocks 命令 -CMD_CascadeProxySocks 將級聯連接方法設定為通過 SOCKS 代理伺服器 -CMD_CascadeProxySocks_Help 指定已經在當前虛擬 HUB 註冊的級聯連接,當此連接和 VPN Server 之間通信時,設置連接方法為 [通過 SOCKS 代理伺服器],設置 SOCKS8 代理伺服器的主機名稱和埠號,用戶名和密碼 (如果需要)。\nSOCKS 伺服器,需與 SOCKS 第 4 版想匹配。\n此命令在集群虛擬 HUB 中不能運行。 +CMD_CascadeProxySocks 將級聯連接方法設定為通過 SOCKS4 代理伺服器 +CMD_CascadeProxySocks_Help 指定已經在當前虛擬 HUB 註冊的級聯連接,當此連接和 VPN Server 之間通信時,設置連接方法為 [通過 SOCKS4 代理伺服器],設置 SOCKS4 代理伺服器的主機名稱和埠號,用戶名和密碼 (如果需要)。\n此命令在集群虛擬 HUB 中不能運行。 CMD_CascadeProxySocks_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_CascadeProxySocks_[name] 指定級聯名稱來改變設置。 CMD_CascadeProxySocks_SERVER 按照 [主機名稱:埠號] 的格式,設定代理伺服器主機名稱或 IP 位址和埠號。 -CMD_CascadeProxySocks_USERNAME 如果連接到 SOCKS 代理伺服器時需要使用者驗證,則指定用戶名。同時設定密碼和參數。如果沒有設定用戶名和密碼參數,則不需要設置使用者身份驗證。 -CMD_CascadeProxySocks_PASSWORD 如果連接到 SOCKS 代理伺服器時需要使用者驗證,則指定密碼。/USERNAME,參數等同時設定。 +CMD_CascadeProxySocks_USERNAME 如果連接到 SOCKS4 代理伺服器時需要使用者驗證,則指定用戶名。同時設定密碼和參數。如果沒有設定用戶名和密碼參數,則不需要設置使用者身份驗證。 +CMD_CascadeProxySocks_PASSWORD 如果連接到 SOCKS4 代理伺服器時需要使用者驗證,則指定密碼。/USERNAME,參數等同時設定。 + + +# CascadeProxySocks5 命令 +CMD_CascadeProxySocks5 將級聯連接方法設定為通過 SOCKS5 代理伺服器 +CMD_CascadeProxySocks5_Help 指定已經在當前虛擬 HUB 註冊的級聯連接,當此連接和 VPN Server 之間通信時,設置連接方法為 [通過 SOCKS5 代理伺服器],設置 SOCKS5 代理伺服器的主機名稱和埠號,用戶名和密碼 (如果需要)。\n此命令在集群虛擬 HUB 中不能運行。 +CMD_CascadeProxySocks5_Args CascadeProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_CascadeProxySocks5_[name] 指定級聯名稱來改變設置。 +CMD_CascadeProxySocks5_SERVER 按照 [主機名稱:埠號] 的格式,設定代理伺服器主機名稱或 IP 位址和埠號。 +CMD_CascadeProxySocks5_USERNAME 如果連接到 SOCKS5 代理伺服器時需要使用者驗證,則指定用戶名。同時設定密碼和參數。如果沒有設定用戶名和密碼參數,則不需要設置使用者身份驗證。 +CMD_CascadeProxySocks5_PASSWORD 如果連接到 SOCKS5 代理伺服器時需要使用者驗證,則指定密碼。/USERNAME,參數等同時設定。 # CascadeServerCertEnable 命令 @@ -6267,6 +6326,24 @@ CMD_OpenVpnMakeConfig_OK 樣本設置檔案被保存為 "%s"。您可以解 CMD_OpenVpnMakeConfig_ERROR 本樣本設置檔案不能保存為 "%s"。該檔案名無效。\n +# OpenVpnObfuscationEnable +CMD_OpenVpnObfuscationEnable Enable / Disable the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationEnable_Help This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it.\nThe same XOR mask have to be applied to the client, otherwise it will not be able to connect with certain obfuscation methods!\nBeware that you need a special OpenVPN client with the "XOR patch" applied in order to use this function, because it has never been merged in the official OpenVPN repository.\n\nTo execute this command, you must have VPN Server administrator privileges. \nThis command cannot be run on VPN Bridge.\nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. +CMD_OpenVpnObfuscationEnable_Args OpenVpnObfuscationEnable [yes|no] [/MASK:mask] +CMD_OpenVpnObfuscationEnable_[yes|no] Specify "yes" to enable the OpenVPN obfuscation function. Specify "no" to disable it. +CMD_OpenVpnObfuscationEnable_MASK Mask used to XOR the bytes in the packet (used for certain obfuscation modes). +CMD_OpenVpnObfuscationEnable_Prompt_[yes|no] Enable OpenVPN packet obfuscation (yes / no): +CMD_OpenVpnObfuscationEnable_Prompt_MASK XOR mask: + + +# OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet Get the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Help Get and show the current settings of the OpenVPN clone server function's obfuscation mode +CMD_OpenVpnObfuscationGet_Args OpenVpnObfuscationGet +CMD_OpenVpnObfuscationGet_PRINT_Enabled OpenVPN obfuscation enabled +CMD_OpenVpnObfuscationGet_PRINT_Mask XOR mask + + # SstpEnable 命令 CMD_SstpEnable 啟用/禁用 Microsoft SSTP VPN 克隆伺服器功能 CMD_SstpEnable_Help 本 VPN Server 擁有植入在微軟 Windows Server 2008 / 2012 中的 MS-SSTP VPN Server 的克隆功能。Windows Vista / 7 / 8 / RT / 10 中的標準 MS-SSTP 用戶端可以連接本 VPN Server。\n\n[注意]\n在 VPN Server 上的 SSL 證書 CN 值必須要和指定給用戶端的主機名稱吻合。並且,該證書必須在 SSTP VPN Client 的信任清單中。詳情請參見微軟相關檔。\n您可以用用 ServerCertRegenerate 命令來取代當前 VPN Server 的證書,形成一個新的,有 CN 值欄位的自我認證證書。這樣的話,您需要在 SSTP VPN Client 註冊這樣一個新的自我認證證書作為一個可信任根證書。如果您的確想做這件複雜的事,請考慮購買一個商業權威機構的 SSL 證書,如 VeriSign 或者 GlobalSign。\n\n指定用戶名連接到虛擬 HUB 的的方式,使用本克隆伺服器功能來為預設虛擬 HUB 的選擇規則都與 IPsec 伺服器功能相同。詳情,請參見 IPsecEnable 命令的幫助。\n\n要執行此命令,您必須具有 VPN Server 管理員許可權。\n該命令在 VPN Bridge 上不能運行。\n以集群成員運行的 VPN Server 的虛擬 HUB 不能執行此命令。 @@ -6609,6 +6686,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 指定要更改設置的連接設置名。 +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone 命令 CMD_AccountProxyNone 將連接設置的連接方法直接設置為 TCP/IP 連接 CMD_AccountProxyNone_Help 當指定註冊到 VPN Client 的連接設置,將其連接設置與 VPN Server 間進行 VPN 連接時使用的連接方法設置為 [直接 TCP/IP連接],不通過代理伺服器。 @@ -6627,15 +6733,24 @@ CMD_AccountProxyHttp_PASSWORD 如果因為連接通過 HTTP 代理伺服器而 CMD_AccountProxyHttp_Prompt_Server 代理伺服器主機名稱和埠號: - # AccountProxySocks 命令 -CMD_AccountProxySocks 將連接設置的連接方法設置為通過 SOCKS 代理伺服器連接 -CMD_AccountProxySocks_Help 當指定註冊到 VPN Client 的連接設置,將其連接設置與 VPN Server 間進行 VPN 連接時使用的連接方法設置為 [通過 SOCKS 伺服器連接],並指定要通過的 SOCKS 代理伺服器的主機名稱和埠號,用戶名和密碼 (如果需要)。\n通過 SOCKS 伺服器,必須對應 SOCKS 版本 4。 +CMD_AccountProxySocks 將連接設置的連接方法設置為通過 SOCKS4 代理伺服器連接 +CMD_AccountProxySocks_Help 當指定註冊到 VPN Client 的連接設置,將其連接設置與 VPN Server 間進行 VPN 連接時使用的連接方法設置為 [通過 SOCKS4 伺服器連接],並指定要通過的 SOCKS4 代理伺服器的主機名稱和埠號,用戶名和密碼 (如果需要)。 CMD_AccountProxySocks_Args AccountProxySocks [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] CMD_AccountProxySocks_[name] 指定要更改設置的連接設置名。 -CMD_AccountProxySocks_SERVER 以 [主機名稱:埠號] 形式,指定要通過的 SOCKS 代理伺服器主機名稱或 IP 位址和埠號。 -CMD_AccountProxySocks_USERNAME 如果因為連接通過 SOCKS 代理伺服器而需要使用者認證時,指定用戶名。與此同時也指定 /PASSWORD 參數。/USERNAME 和 /PASSWORD 參數沒有被指定時,不設置使用者身份驗證資料。 -CMD_AccountProxySocks_PASSWORD 如果因為連接通過 SOCKS 代理伺服器而需要使用者認證時,指定密碼。與 /USERNAME 參數一起指定。 +CMD_AccountProxySocks_SERVER 以 [主機名稱:埠號] 形式,指定要通過的 SOCKS4 代理伺服器主機名稱或 IP 位址和埠號。 +CMD_AccountProxySocks_USERNAME 如果因為連接通過 SOCKS4 代理伺服器而需要使用者認證時,指定用戶名。與此同時也指定 /PASSWORD 參數。/USERNAME 和 /PASSWORD 參數沒有被指定時,不設置使用者身份驗證資料。 +CMD_AccountProxySocks_PASSWORD 如果因為連接通過 SOCKS4 代理伺服器而需要使用者認證時,指定密碼。與 /USERNAME 參數一起指定。 + + +# AccountProxySocks5 命令 +CMD_AccountProxySocks5 將連接設置的連接方法設置為通過 SOCKS5 代理伺服器連接 +CMD_AccountProxySocks5_Help 當指定註冊到 VPN Client 的連接設置,將其連接設置與 VPN Server 間進行 VPN 連接時使用的連接方法設置為 [通過 SOCKS5 伺服器連接],並指定要通過的 SOCKS5 代理伺服器的主機名稱和埠號,用戶名和密碼 (如果需要)。 +CMD_AccountProxySocks5_Args AccountProxySocks5 [name] [/SERVER:hostname:port] [/USERNAME:username] [/PASSWORD:password] +CMD_AccountProxySocks5_[name] 指定要更改設置的連接設置名。 +CMD_AccountProxySocks5_SERVER 以 [主機名稱:埠號] 形式,指定要通過的 SOCKS5 代理伺服器主機名稱或 IP 位址和埠號。 +CMD_AccountProxySocks5_USERNAME 如果因為連接通過 SOCKS5 代理伺服器而需要使用者認證時,指定用戶名。與此同時也指定 /PASSWORD 參數。/USERNAME 和 /PASSWORD 參數沒有被指定時,不設置使用者身份驗證資料。 +CMD_AccountProxySocks5_PASSWORD 如果因為連接通過 SOCKS5 代理伺服器而需要使用者認證時,指定密碼。與 /USERNAME 參數一起指定。 # AccountServerCertEnable 命令 @@ -6985,7 +7100,7 @@ CMD_Check_Args Check # 關於系統 checker # (包含著一部分奇怪的字串,不過,是檢測字元編碼變換用的) -CHECK_TITLE ---------------------------------------------------\nSoftEther VPN 運行環境檢查工具\nDeveloper Edition\n\nCopyright (c) SoftEther VPN Project.\nAll Rights Reserved.\n\n +CHECK_TITLE ---------------------------------------------------\nSoftEther VPN 運行環境檢查工具\nDeveloper Edition\n\nCopyright (c) all contributors on SoftEther VPN project in GitHub.\nCopyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.\nAll Rights Reserved.\n\n CHECK_NOTE 如果運行了此運行環境檢測工具的系統通過了測試,SoftEther VPN 軟體有較高的運行可能性。檢測可能需要一定的時間。請稍候...\n\n CHECK_EXEC_TAG '%s' 的檢測中...\n CHECK_PASS [合格] ○ @@ -7050,6 +7165,7 @@ SW_WEB2_TITLE 指定資料夾 SW_UNINSTALLINFO_URL http://selinks.org/ SW_UNINSTALLINFO_PUBLISHER SoftEther VPN Project +SW_KB3033929_REQUIRED In Windows 7 and Windows Server 2008 R2, some SoftEther VPN functions require the Microsoft's Windows Update module KB3033929 installed.\r\n\r\nIf KB3033929 is not installed in your Windows, please install it from Windows Update or Microsoft website before installing SoftEther VPN. SW_COMPONENTS_ABOUT_TAG 關於 %s SW_COMPONENTS_REQUIRE_ADMIN 安裝需要管理員許可權 diff --git a/src/bin/hamcore/vpninstall_cn.inf b/src/bin/hamcore/vpninstall_cn.inf index 126d5f34..cb04339b 100644 --- a/src/bin/hamcore/vpninstall_cn.inf +++ b/src/bin/hamcore/vpninstall_cn.inf @@ -1,5 +1,5 @@ # SoftEther VPN Client 自动安装设定文件 -# (为了 VPN Client Web 安装程序的样品设定文件) +# (VPN Client Web 安装程序示例设定文件) # # Copyright (c) SoftEther Project at University of Tsukuba, Japan. # All Rights Reserved. @@ -9,22 +9,22 @@ # ※ 如果在这个文件内包含中文等的 2 字节字符, # 字符编码请使用 UTF-8。 # -# 文字 "#" 在 (sharp) 开始的行是评语。 +# “#” 之后的文字为注释。 # vpninstall.exe 版本号 -# (请在 vpninstall.exe 文件的 [属性] 画面确认。 +# (请在 vpninstall.exe 文件的 [属性] 页中确认。 # 请在这里输入文件版本的末尾的 4 位整数。) VpnInstallBuild $VER_BUILD$ VpnClientBuild $VER_BUILD$ -# 有关Windows 事情的 VPN Client 包装文件的信息 -# ※ 请指定 Web 服务器上的 URL。盘上的传球名不能指定。 +# Windows 下的 VPN Client 安装包路径 +# ※ 请指定 Web 服务器上的 URL 路径。 不可指定本地文件路径。 VpnClientPath http://example.com/any_folder/$PACKAGE_FILENAME$ -# 是不是要 VPN Client 的安装完成紧接之后的动作方式 "简单模式" 和 "标准模式" 的哪边。 -# 写 true 的话 "标准模式",那个以外的情况成为 "简单模式"。 +# 该值为 "true" 时, VPN Client Manager将会使用标准模式。 +# 保留默认值则为简单模式。 NormalMode $NORMAL_MODE$ diff --git a/src/bin/hamcore/vpnserver_api_doc.html b/src/bin/hamcore/vpnserver_api_doc.html new file mode 100644 index 00000000..1735667e --- /dev/null +++ b/src/bin/hamcore/vpnserver_api_doc.html @@ -0,0 +1,14648 @@ + + + + + SoftEther VPN Server JSON-RPC Suite Document + + + + + + +
+

SoftEther VPN Server JSON-RPC API Suite Document

+

This reference describes all JSON-RPC functions available on SoftEther VPN Server.

+

You can access to the latest SoftEther VPN Server JSON-RPC Document on GitHub.

+

What is SoftEther VPN Server JSON-RPC API Suite?

+

The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions).

+
    +
  • Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API.
  • +
  • You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.)
  • +
  • If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server.
  • +
  • No need to use any specific API client library since all APIs are provided on the JSON-RPC 2.0 Specification. You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment.
  • +
  • Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. The Node.js Client Library for VPN Server RPC (vpnrpc) package is also available.
  • +
+

Principle

+

Entry point

+

The entry point URL of JSON-RPC is:

+
https://<vpn_server_hostname>:<port>/api/
+
+
    +
  • Older versions of SoftEther VPN before June 2019 don't support JSON-RPC APIs.
  • +
  • If you want to completely disable the JSON-RPC on your VPN Server, set the DisableJsonRpcWebApi variable to true on the vpn_server.config.
  • +
+

JSON-RPC specification

+

You must use HTTPS 1.1 POST method to call each of JSON-RPC APIs.
+All APIs are based on the JSON-RPC 2.0 Specification.

+
    +
  • JSON-RPC Notification is not supported.
  • +
  • JSON-RPC Batch is not supported.
  • +
+

"vpnrpc": Node.js Client Library package for VPN Server JSON-RPC

+

If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the JavaScript Client Library for VPN Server RPC (vpnrpc).

+
    +
  • You can use the vpnrpc library in JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js.
  • +
  • As a sample code there is the sample.ts program in TypeScript. This sample calls all of available JSON-RPC APIs against the specified SoftEther VPN Server. (Note: This sample code is written in TypeScript.)
  • +
+

You can use the following command to download the vpnrpc library package with Node.js.

+
$ npm install --save-dev vpnrpc
+
+

"vpnrpc.ts": TypeScript Client Library for VPN Server JSON-RPC

+

If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the TypeScript Client Library for VPN Server RPC (vpnrpc.ts).

+
    +
  • You can use the vpnrpc.ts library in TypeScript / JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js.
  • +
  • As a sample code there is the sample.ts program in TypeScript. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server.
  • +
+

"vpnserver-jsonrpc-client-csharp": C# Client Library for VPN Server JSON-RPC

+

If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the vpnserver-jsonrpc-client-csharp C# library.

+
    +
  • The client library codes for C# is written in pure C# 7.3. It works on .NET Core 2.1 or later on Windows, Linux and macOS. Very comfort with Visual Studio for both Windows or macOS.
  • +
  • As a sample code there is the VpnServerRpcTest.cs program in C#. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server.
  • +
+

HTTPS Authentication

+

You must specify the following HTTPS custom headers for authentication on each of requests.

+ + + + + + + + + + + + + + + + + +
ValueDescription
X-VPNADMIN-HUBNAMEThe name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify empty string if you want to connect to the VPN Server as the Entire VPN Server Admin Mode.
X-VPNADMIN-PASSWORDSpecify the administration password.
+
    +
  • You can omit the above HTTPS custom authentication headers if you are calling JSON-RPC APIs from the web browser which is already logged in to the VPN Server with HTTPS Basic Authentication. In such usage the credential of HTTPS Basic Authtication will be used.
  • +
+
+

Table of contents

+ +
+

+

"Test" RPC API - Test RPC function

+

Description

+

Test RPC function. Input any integer value to the IntValue_u32 field. Then the server will convert the integer to the string, and return the string in the StrValue_str field.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "Test",
+  "params": {
+    "IntValue_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"GetServerInfo" RPC API - Get server information

+

Description

+

Get server information. This allows you to obtain the server information of the currently connected VPN Server or VPN Bridge. Included in the server information are the version number, build number and build information. You can also obtain information on the current server operation mode and the information of operating system that the server is operating on.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerInfo",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerProductName_str": "serverproductname",
+    "ServerVersionString_str": "serverversionstring",
+    "ServerBuildInfoString_str": "serverbuildinfostring",
+    "ServerVerInt_u32": 0,
+    "ServerBuildInt_u32": 0,
+    "ServerHostName_str": "serverhostname",
+    "ServerType_u32": 0,
+    "ServerBuildDate_dt": "2020-08-01T12:24:36.123",
+    "ServerFamilyName_str": "serverfamilyname",
+    "OsType_u32": 0,
+    "OsServicePack_u32": 0,
+    "OsSystemName_str": "ossystemname",
+    "OsProductName_str": "osproductname",
+    "OsVendorName_str": "osvendorname",
+    "OsVersion_str": "osversion",
+    "KernelName_str": "kernelname",
+    "KernelVersion_str": "kernelversion"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerProductName_strstring (ASCII)Server product name
ServerVersionString_strstring (ASCII)Server version string
ServerBuildInfoString_strstring (ASCII)Server build information string
ServerVerInt_u32number (uint32)Server version integer value
ServerBuildInt_u32number (uint32)Server build number integer value
ServerHostName_strstring (ASCII)Server host name
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
ServerBuildDate_dtDateBuild date and time of the server
ServerFamilyName_strstring (ASCII)Family name
OsType_u32number (enum)OS type
Values:
1100: Windows 95
1200: Windows 98
1300: Windows Me
1400: Windows (unknown)
2100: Windows NT 4.0 Workstation
2110: Windows NT 4.0 Server
2111: Windows NT 4.0 Server, Enterprise Edition
2112: Windows NT 4.0 Terminal Server
2113: BackOffice Server 4.5
2114: Small Business Server 4.5
2200: Windows 2000 Professional
2211: Windows 2000 Server
2212: Windows 2000 Advanced Server
2213: Windows 2000 Datacenter Server
2214: BackOffice Server 2000
2215: Small Business Server 2000
2300: Windows XP Home Edition
2301: Windows XP Professional
2410: Windows Server 2003 Web Edition
2411: Windows Server 2003 Standard Edition
2412: Windows Server 2003 Enterprise Edition
2413: Windows Server 2003 DataCenter Edition
2414: BackOffice Server 2003
2415: Small Business Server 2003
2500: Windows Vista
2510: Windows Server 2008
2600: Windows 7
2610: Windows Server 2008 R2
2700: Windows 8
2710: Windows Server 2012
2701: Windows 8.1
2711: Windows Server 2012 R2
2702: Windows 10
2712: Windows Server 10
2800: Windows 11 or later
2810: Windows Server 11 or later
3000: Unknown UNIX
3100: Linux
3200: Solaris
3300: Cygwin
3400: BSD
3500: MacOS X
OsServicePack_u32number (uint32)Service pack number
OsSystemName_strstring (ASCII)OS system name
OsProductName_strstring (ASCII)OS product name
OsVendorName_strstring (ASCII)OS vendor name
OsVersion_strstring (ASCII)OS version
KernelName_strstring (ASCII)Kernel name
KernelVersion_strstring (ASCII)Kernel version
+
+

+

"GetServerStatus" RPC API - Get Current Server Status

+

Description

+

Get Current Server Status. This allows you to obtain in real-time the current status of the currently connected VPN Server or VPN Bridge. You can get statistical information on data communication and the number of different kinds of objects that exist on the server. You can get information on how much memory is being used on the current computer by the OS.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerType_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "NumTcpConnectionsLocal_u32": 0,
+    "NumTcpConnectionsRemote_u32": 0,
+    "NumHubTotal_u32": 0,
+    "NumHubStandalone_u32": 0,
+    "NumHubStatic_u32": 0,
+    "NumHubDynamic_u32": 0,
+    "NumSessionsTotal_u32": 0,
+    "NumSessionsLocal_u32": 0,
+    "NumSessionsRemote_u32": 0,
+    "NumMacTables_u32": 0,
+    "NumIpTables_u32": 0,
+    "NumUsers_u32": 0,
+    "NumGroups_u32": 0,
+    "AssignedBridgeLicenses_u32": 0,
+    "AssignedClientLicenses_u32": 0,
+    "AssignedBridgeLicensesTotal_u32": 0,
+    "AssignedClientLicensesTotal_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "CurrentTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentTick_u64": 0,
+    "StartTime_dt": "2020-08-01T12:24:36.123",
+    "TotalMemory_u64": 0,
+    "UsedMemory_u64": 0,
+    "FreeMemory_u64": 0,
+    "TotalPhys_u64": 0,
+    "UsedPhys_u64": 0,
+    "FreePhys_u64": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
NumTcpConnections_u32number (uint32)Total number of TCP connections
NumTcpConnectionsLocal_u32number (uint32)Number of Local TCP connections
NumTcpConnectionsRemote_u32number (uint32)Number of remote TCP connections
NumHubTotal_u32number (uint32)Total number of HUBs
NumHubStandalone_u32number (uint32)Nymber of stand-alone HUB
NumHubStatic_u32number (uint32)Number of static HUBs
NumHubDynamic_u32number (uint32)Number of Dynamic HUBs
NumSessionsTotal_u32number (uint32)Total number of sessions
NumSessionsLocal_u32number (uint32)Number of local VPN sessions
NumSessionsRemote_u32number (uint32)The number of remote sessions
NumMacTables_u32number (uint32)Number of MAC table entries (total sum of all Virtual Hubs)
NumIpTables_u32number (uint32)Number of IP table entries (total sum of all Virtual Hubs)
NumUsers_u32number (uint32)Number of users (total sum of all Virtual Hubs)
NumGroups_u32number (uint32)Number of groups (total sum of all Virtual Hubs)
AssignedBridgeLicenses_u32number (uint32)Number of assigned bridge licenses (Useful to make a commercial version)
AssignedClientLicenses_u32number (uint32)Number of assigned client licenses (Useful to make a commercial version)
AssignedBridgeLicensesTotal_u32number (uint32)Number of Assigned bridge license (cluster-wide), useful to make a commercial version
AssignedClientLicensesTotal_u32number (uint32)Number of assigned client licenses (cluster-wide), useful to make a commercial version
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
CurrentTime_dtDateCurrent time
CurrentTick_u64number (uint64)64 bit High-Precision Logical System Clock
StartTime_dtDateVPN Server Start-up time
TotalMemory_u64number (uint64)Memory information: Total Memory
UsedMemory_u64number (uint64)Memory information: Used Memory
FreeMemory_u64number (uint64)Memory information: Free Memory
TotalPhys_u64number (uint64)Memory information: Total Phys
UsedPhys_u64number (uint64)Memory information: Used Phys
FreePhys_u64number (uint64)Memory information: Free Phys
+
+

+

"CreateListener" RPC API - Create New TCP Listener

+

Description

+

Create New TCP Listener. This allows you to create a new TCP Listener on the server. By creating the TCP Listener the server starts listening for a connection from clients at the specified TCP/IP port number. A TCP Listener that has been created can be deleted by the DeleteListener API. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To execute this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateListener",
+  "params": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Port_u32number (uint32)Port number (Range: 1 - 65535)
Enable_boolbooleanActive state
+
+

+

"EnumListener" RPC API - Get List of TCP Listeners

+

Description

+

Get List of TCP Listeners. This allows you to get a list of TCP listeners registered on the current server. You can obtain information on whether the various TCP listeners have a status of operating or error. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumListener",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ListenerList": [
+      {
+        "Ports_u32": 0,
+        "Enables_bool": false,
+        "Errors_bool": false
+      },
+      {
+        "Ports_u32": 0,
+        "Enables_bool": false,
+        "Errors_bool": false
+      },
+      {
+        "Ports_u32": 0,
+        "Enables_bool": false,
+        "Errors_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ListenerListArray objectList of listener items
Ports_u32number (uint32)TCP port number (range: 1 - 65535)
Enables_boolbooleanActive state
Errors_boolbooleanThe flag to indicate if the error occurred on the listener port
+
+

+

"DeleteListener" RPC API - Delete TCP Listener

+

Description

+

Delete TCP Listener. This allows you to delete a TCP Listener that's registered on the server. When the TCP Listener is in a state of operation, the listener will automatically be deleted when its operation stops. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteListener",
+  "params": {
+    "Port_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Port_u32number (uint32)Port number (Range: 1 - 65535)
Enable_boolbooleanActive state
+
+

+

"EnableListener" RPC API - Enable / Disable TCP Listener

+

Description

+

Enable / Disable TCP Listener. This starts or stops the operation of TCP Listeners registered on the current server. You can also get a list of TCP Listeners currently registered by using the EnumListener API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnableListener",
+  "params": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Port_u32": 0,
+    "Enable_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Port_u32number (uint32)Port number (Range: 1 - 65535)
Enable_boolbooleanActive state
+
+

+

"SetServerPassword" RPC API - Set VPN Server Administrator Password

+

Description

+

Set VPN Server Administrator Password. This sets the VPN Server administrator password. You can specify the password as a parameter. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetServerPassword",
+  "params": {
+    "PlainTextPassword_str": "plaintextpassword"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "PlainTextPassword_str": "plaintextpassword"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
PlainTextPassword_strstring (ASCII)The plaintext password
+
+

+

"SetFarmSetting" RPC API - Set the VPN Server clustering configuration

+

Description

+

Set the VPN Server clustering configuration. Use this to set the VPN Server type as Standalone Server, Cluster Controller Server or Cluster Member Server. Standalone server means a VPN Server that does not belong to any cluster in its current state. When VPN Server is installed, by default it will be in standalone server mode. Unless you have particular plans to configure a cluster, we recommend the VPN Server be operated in standalone mode. A cluster controller is the central computer of all member servers of a cluster in the case where a clustering environment is made up of multiple VPN Servers. Multiple cluster members can be added to the cluster as required. A cluster requires one computer to serve this role. The other cluster member servers that are configured in the same cluster begin operation as a cluster member by connecting to the cluster controller. To call this API, you must have VPN Server administrator privileges. Also, when this API is executed, VPN Server will automatically restart. This API cannot be called on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetFarmSetting",
+  "params": {
+    "ServerType_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "PublicIp_ip": "192.168.0.1",
+    "ControllerName_str": "controllername",
+    "ControllerPort_u32": 0,
+    "MemberPasswordPlaintext_str": "memberpasswordplaintext",
+    "Weight_u32": 0,
+    "ControllerOnly_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerType_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "PublicIp_ip": "192.168.0.1",
+    "ControllerName_str": "controllername",
+    "ControllerPort_u32": 0,
+    "MemberPasswordPlaintext_str": "memberpasswordplaintext",
+    "Weight_u32": 0,
+    "ControllerOnly_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
NumPort_u32number (uint32)Valid only for Cluster Member servers. Number of the Ports_u32 element.
Ports_u32number[] (uint32)Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers.
PublicIp_ipstring (IP address)Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used.
ControllerName_strstring (ASCII)Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller.
ControllerPort_u32number (uint32)Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller.
MemberPasswordPlaintext_strstring (ASCII)Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller.
Weight_u32number (uint32)This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used.
ControllerOnly_boolbooleanValid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments.
+
+

+

"GetFarmSetting" RPC API - Get Clustering Configuration of Current VPN Server

+

Description

+

Get Clustering Configuration of Current VPN Server. You can use this to acquire the clustering configuration of the current VPN Server. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetFarmSetting",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerType_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "PublicIp_ip": "192.168.0.1",
+    "ControllerName_str": "controllername",
+    "ControllerPort_u32": 0,
+    "MemberPasswordPlaintext_str": "memberpasswordplaintext",
+    "Weight_u32": 0,
+    "ControllerOnly_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerType_u32number (enum)Type of server
Values:
0: Stand-alone server
1: Farm controller server
2: Farm member server
NumPort_u32number (uint32)Valid only for Cluster Member servers. Number of the Ports_u32 element.
Ports_u32number[] (uint32)Valid only for Cluster Member servers. Specify the list of public port numbers on this server. The list must have at least one public port number set, and it is also possible to set multiple public port numbers.
PublicIp_ipstring (IP address)Valid only for Cluster Member servers. Specify the public IP address of this server. If you wish to leave public IP address unspecified, specify the empty string. When a public IP address is not specified, the IP address of the network interface used when connecting to the cluster controller will be automatically used.
ControllerName_strstring (ASCII)Valid only for Cluster Member servers. Specify the host name or IP address of the destination cluster controller.
ControllerPort_u32number (uint32)Valid only for Cluster Member servers. Specify the TCP port number of the destination cluster controller.
MemberPasswordPlaintext_strstring (ASCII)Valid only for Cluster Member servers. Specify the password required to connect to the destination controller. It needs to be the same as an administrator password on the destination controller.
Weight_u32number (uint32)This sets a value for the performance standard ratio of this VPN Server. This is the standard value for when load balancing is performed in the cluster. For example, making only one machine 200 while the other members have a status of 100, will regulate that machine to receive twice as many connections as the other members. Specify 1 or higher for the value. If this parameter is left unspecified, 100 will be used.
ControllerOnly_boolbooleanValid only for Cluster Controller server. By specifying true, the VPN Server will operate only as a controller on the cluster and it will always distribute general VPN Client connections to members other than itself. This function is used in high-load environments.
+
+

+

"GetFarmInfo" RPC API - Get Cluster Member Information

+

Description

+

Get Cluster Member Information. When the VPN Server is operating as a cluster controller, you can get information on cluster member servers on that cluster by specifying the IDs of the member servers. You can get the following information about the specified cluster member server: Server Type, Time Connection has been Established, IP Address, Host Name, Points, Public Port List, Number of Operating Virtual Hubs, First Virtual Hub, Number of Sessions and Number of TCP Connections. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetFarmInfo",
+  "params": {
+    "Id_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_u32": 0,
+    "Controller_bool": false,
+    "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "Ip_ip": "192.168.0.1",
+    "Hostname_str": "hostname",
+    "Point_u32": 0,
+    "NumPort_u32": 0,
+    "Ports_u32": [
+      1,
+      2,
+      3
+    ],
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "NumFarmHub_u32": 0,
+    "HubsList": [
+      {
+        "HubName_str": "hubname",
+        "DynamicHub_bool": false
+      },
+      {
+        "HubName_str": "hubname",
+        "DynamicHub_bool": false
+      },
+      {
+        "HubName_str": "hubname",
+        "DynamicHub_bool": false
+      }
+    ],
+    "NumSessions_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "Weight_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_u32number (uint32)ID
Controller_boolbooleanThe flag if the server is Cluster Controller (false: Cluster Member servers)
ConnectedTime_dtDateConnection Established Time
Ip_ipstring (IP address)IP address
Hostname_strstring (ASCII)Host name
Point_u32number (uint32)Point
NumPort_u32number (uint32)Number of Public Ports
Ports_u32number[] (uint32)Public Ports
ServerCert_binstring (Base64 binary)Server certificate
NumFarmHub_u32number (uint32)Number of farm HUB
HubsListArray objectThe hosted Virtual Hub list
NumSessions_u32number (uint32)Number of hosted VPN sessions
NumTcpConnections_u32number (uint32)Number of TCP connections
Weight_u32number (uint32)Performance Standard Ratio
HubName_strstring (ASCII)The Virtual Hub name
DynamicHub_boolbooleanDynamic HUB
+
+

+

"EnumFarmMember" RPC API - Get List of Cluster Members

+

Description

+

Get List of Cluster Members. Use this API when the VPN Server is operating as a cluster controller to get a list of the cluster member servers on the same cluster, including the cluster controller itself. For each member, the following information is also listed: Type, Connection Start, Host Name, Points, Number of Session, Number of TCP Connections, Number of Operating Virtual Hubs, Using Client Connection License and Using Bridge Connection License. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumFarmMember",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "NumFarm_u32": 0,
+    "FarmMemberList": [
+      {
+        "Id_u32": 0,
+        "Controller_bool": false,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Ip_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "Point_u32": 0,
+        "NumSessions_u32": 0,
+        "NumTcpConnections_u32": 0,
+        "NumHubs_u32": 0,
+        "AssignedClientLicense_u32": 0,
+        "AssignedBridgeLicense_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Controller_bool": false,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Ip_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "Point_u32": 0,
+        "NumSessions_u32": 0,
+        "NumTcpConnections_u32": 0,
+        "NumHubs_u32": 0,
+        "AssignedClientLicense_u32": 0,
+        "AssignedBridgeLicense_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Controller_bool": false,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Ip_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "Point_u32": 0,
+        "NumSessions_u32": 0,
+        "NumTcpConnections_u32": 0,
+        "NumHubs_u32": 0,
+        "AssignedClientLicense_u32": 0,
+        "AssignedBridgeLicense_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NumFarm_u32number (uint32)Number of Cluster Members
FarmMemberListArray objectCluster Members list
Id_u32number (uint32)ID
Controller_boolbooleanController
ConnectedTime_dtDateConnection time
Ip_ipstring (IP address)IP address
Hostname_strstring (ASCII)Host name
Point_u32number (uint32)Point
NumSessions_u32number (uint32)Number of sessions
NumTcpConnections_u32number (uint32)Number of TCP connections
NumHubs_u32number (uint32)Number of HUBs
AssignedClientLicense_u32number (uint32)Number of assigned client licenses
AssignedBridgeLicense_u32number (uint32)Number of assigned bridge licenses
+
+

+

"GetFarmConnectionStatus" RPC API - Get Connection Status to Cluster Controller

+

Description

+

Get Connection Status to Cluster Controller. Use this API when the VPN Server is operating as a cluster controller to get the status of connection to the cluster controller. You can get the following information: Controller IP Address, Port Number, Connection Status, Connection Start Time, First Connection Established Time, Current Connection Established Time, Number of Connection Attempts, Number of Successful Connections, Number of Failed Connections. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetFarmConnectionStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Ip_ip": "192.168.0.1",
+    "Port_u32": 0,
+    "Online_bool": false,
+    "LastError_u32": 0,
+    "StartedTime_dt": "2020-08-01T12:24:36.123",
+    "FirstConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "NumTry_u32": 0,
+    "NumConnected_u32": 0,
+    "NumFailed_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Ip_ipstring (IP address)IP address
Port_u32number (uint32)Port number
Online_boolbooleanOnline state
LastError_u32number (uint32)Last error code
StartedTime_dtDateConnection start time
FirstConnectedTime_dtDateFirst connection time
CurrentConnectedTime_dtDateConnection time of this time
NumTry_u32number (uint32)Number of retries
NumConnected_u32number (uint32)Number of connection count
NumFailed_u32number (uint32)Connection failure count
+
+

+

"SetServerCert" RPC API - Set SSL Certificate and Private Key of VPN Server

+

Description

+

Set SSL Certificate and Private Key of VPN Server. You can set the SSL certificate that the VPN Server provides to the connected client and the private key for that certificate. The certificate must be in X.509 format and the private key must be Base 64 encoded format. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetServerCert",
+  "params": {
+    "Cert_bin": "SGVsbG8gV29ybGQ=",
+    "Key_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Cert_bin": "SGVsbG8gV29ybGQ=",
+    "Key_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Cert_binstring (Base64 binary)The body of the certificate
Key_binstring (Base64 binary)The body of the private key
+
+

+

"GetServerCert" RPC API - Get SSL Certificate and Private Key of VPN Server

+

Description

+

Get SSL Certificate and Private Key of VPN Server. Use this to get the SSL certificate private key that the VPN Server provides to the connected client. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerCert",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Cert_bin": "SGVsbG8gV29ybGQ=",
+    "Key_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Cert_binstring (Base64 binary)The body of the certificate
Key_binstring (Base64 binary)The body of the private key
+
+

+

"GetServerCipher" RPC API - Get the Encrypted Algorithm Used for VPN Communication

+

Description

+

Get the Encrypted Algorithm Used for VPN Communication. Use this API to get the current setting of the algorithm used for the electronic signature and encrypted for SSL connection to be used for communication between the VPN Server and the connected client and the list of algorithms that can be used on the VPN Server.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetServerCipher",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "String_str": "string"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
String_strstring (ASCII)A string value
+
+

+

"SetServerCipher" RPC API - Set the Encrypted Algorithm Used for VPN Communication

+

Description

+

Set the Encrypted Algorithm Used for VPN Communication. Use this API to set the algorithm used for the electronic signature and encrypted for SSL connections to be used for communication between the VPN Server and the connected client. By specifying the algorithm name, the specified algorithm will be used later between the VPN Client and VPN Bridge connected to this server and the data will be encrypted. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetServerCipher",
+  "params": {
+    "String_str": "string"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "String_str": "string"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
String_strstring (ASCII)A string value
+
+

+

"CreateHub" RPC API - Create New Virtual Hub

+

Description

+

Create New Virtual Hub. Use this to create a new Virtual Hub on the VPN Server. The created Virtual Hub will begin operation immediately. When the VPN Server is operating on a cluster, this API is only valid for the cluster controller. Also, the new Virtual Hub will operate as a dynamic Virtual Hub. You can change it to a static Virtual Hub by using the SetHub API. To get a list of Virtual Hubs that are already on the VPN Server, use the EnumHub API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateHub",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Specify the name of the Virtual Hub to create / update.
AdminPasswordPlainText_strstring (ASCII)Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password.
Online_boolbooleanOnline flag
MaxSession_u32number (uint32)Maximum number of VPN sessions
NoEnum_boolbooleanNo Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server.
HubType_u32number (enum)Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
+
+

+

"SetHub" RPC API - Set the Virtual Hub configuration

+

Description

+

Set the Virtual Hub configuration. You can call this API to change the configuration of the specified Virtual Hub. You can set the Virtual Hub online or offline. You can set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. You can set the Virtual Hub administrator password. You can set other parameters for the Virtual Hub. Before call this API, you need to obtain the latest state of the Virtual Hub by using the GetHub API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHub",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Specify the name of the Virtual Hub to create / update.
AdminPasswordPlainText_strstring (ASCII)Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password.
Online_boolbooleanOnline flag
MaxSession_u32number (uint32)Maximum number of VPN sessions
NoEnum_boolbooleanNo Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server.
HubType_u32number (enum)Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
+
+

+

"GetHub" RPC API - Get the Virtual Hub configuration

+

Description

+

Get the Virtual Hub configuration. You can call this API to get the current configuration of the specified Virtual Hub. To change the configuration of the Virtual Hub, call the SetHub API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHub",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminPasswordPlainText_str": "adminpasswordplaintext",
+    "Online_bool": false,
+    "MaxSession_u32": 0,
+    "NoEnum_bool": false,
+    "HubType_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Specify the name of the Virtual Hub to create / update.
AdminPasswordPlainText_strstring (ASCII)Specify an administrator password when the administrator password is going to be set for the Virtual Hub. On the update, leave it to empty string if you don't want to change the password.
Online_boolbooleanOnline flag
MaxSession_u32number (uint32)Maximum number of VPN sessions
NoEnum_boolbooleanNo Enum flag. By enabling this option, the VPN Client user will be unable to enumerate this Virtual Hub even if they send a Virtual Hub enumeration request to the VPN Server.
HubType_u32number (enum)Type of the Virtual Hub (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
+
+

+

"EnumHub" RPC API - Get List of Virtual Hubs

+

Description

+

Get List of Virtual Hubs. Use this to get a list of existing Virtual Hubs on the VPN Server. For each Virtual Hub, you can get the following information: Virtual Hub Name, Status, Type, Number of Users, Number of Groups, Number of Sessions, Number of MAC Tables, Number of IP Tables, Number of Logins, Last Login, and Last Communication. Note that when connecting in Virtual Hub Admin Mode, if in the options of a Virtual Hub that you do not have administrator privileges for, the option Don't Enumerate this Virtual Hub for Anonymous Users is enabled then that Virtual Hub will not be enumerated. If you are connected in Server Admin Mode, then the list of all Virtual Hubs will be displayed. When connecting to and managing a non-cluster-controller cluster member of a clustering environment, only the Virtual Hub currently being hosted by that VPN Server will be displayed. When connecting to a cluster controller for administration purposes, all the Virtual Hubs will be displayed.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumHub",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "NumHub_u32": 0,
+    "HubList": [
+      {
+        "HubName_str": "hubname",
+        "Online_bool": false,
+        "HubType_u32": 0,
+        "NumUsers_u32": 0,
+        "NumGroups_u32": 0,
+        "NumSessions_u32": 0,
+        "NumMacTables_u32": 0,
+        "NumIpTables_u32": 0,
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "NumLogin_u32": 0,
+        "IsTrafficFilled_bool": false,
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "HubName_str": "hubname",
+        "Online_bool": false,
+        "HubType_u32": 0,
+        "NumUsers_u32": 0,
+        "NumGroups_u32": 0,
+        "NumSessions_u32": 0,
+        "NumMacTables_u32": 0,
+        "NumIpTables_u32": 0,
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "NumLogin_u32": 0,
+        "IsTrafficFilled_bool": false,
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "HubName_str": "hubname",
+        "Online_bool": false,
+        "HubType_u32": 0,
+        "NumUsers_u32": 0,
+        "NumGroups_u32": 0,
+        "NumSessions_u32": 0,
+        "NumMacTables_u32": 0,
+        "NumIpTables_u32": 0,
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "NumLogin_u32": 0,
+        "IsTrafficFilled_bool": false,
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NumHub_u32number (uint32)Number of Virtual Hubs
HubListArray objectVirtual Hubs
HubName_strstring (ASCII)The name of the Virtual Hub
Online_boolbooleanOnline state
HubType_u32number (enum)Type of HUB (Valid only for Clustered VPN Servers)
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
NumUsers_u32number (uint32)Number of users
NumGroups_u32number (uint32)Number of registered groups
NumSessions_u32number (uint32)Number of registered sessions
NumMacTables_u32number (uint32)Number of current MAC table entries
NumIpTables_u32number (uint32)Number of current IP table entries
LastCommTime_dtDateLast communication date and time
LastLoginTime_dtDateLast login date and time
CreatedTime_dtDateCreation date and time
NumLogin_u32number (uint32)Number of accumulated logins
IsTrafficFilled_boolbooleanWhether the traffic information is provided
Ex.Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Ex.Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Ex.Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Ex.Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Ex.Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Ex.Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Ex.Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Ex.Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
+
+

+

"DeleteHub" RPC API - Delete Virtual Hub

+

Description

+

Delete Virtual Hub. Use this to delete an existing Virtual Hub on the VPN Server. If you delete the Virtual Hub, all sessions that are currently connected to the Virtual Hub will be disconnected and new sessions will be unable to connect to the Virtual Hub. Also, this will also delete all the Hub settings, user objects, group objects, certificates and Cascade Connections. Once you delete the Virtual Hub, it cannot be recovered. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Servers that are operating as a VPN Bridge or cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteHub",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
+
+

+

"GetHubRadius" RPC API - Get Setting of RADIUS Server Used for User Authentication

+

Description

+

Get Setting of RADIUS Server Used for User Authentication. Use this to get the current settings for the RADIUS server used when a user connects to the currently managed Virtual Hub using RADIUS Server Authentication Mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubRadius",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "RadiusServerName_str": "radiusservername",
+    "RadiusPort_u32": 0,
+    "RadiusSecret_str": "radiussecret",
+    "RadiusRetryInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
RadiusServerName_strstring (ASCII)RADIUS server name
RadiusPort_u32number (uint32)RADIUS port number
RadiusSecret_strstring (ASCII)Secret key
RadiusRetryInterval_u32number (uint32)Radius retry interval
+
+

+

"SetHubRadius" RPC API - Set RADIUS Server to use for User Authentication

+

Description

+

Set RADIUS Server to use for User Authentication. To accept users to the currently managed Virtual Hub in RADIUS server authentication mode, you can specify an external RADIUS server that confirms the user name and password. (You can specify multiple hostname by splitting with comma or semicolon.) The RADIUS server must be set to receive requests from IP addresses of this VPN Server. Also, authentication by Password Authentication Protocol (PAP) must be enabled. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubRadius",
+  "params": {
+    "HubName_str": "hubname",
+    "RadiusServerName_str": "radiusservername",
+    "RadiusPort_u32": 0,
+    "RadiusSecret_str": "radiussecret",
+    "RadiusRetryInterval_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "RadiusServerName_str": "radiusservername",
+    "RadiusPort_u32": 0,
+    "RadiusSecret_str": "radiussecret",
+    "RadiusRetryInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
RadiusServerName_strstring (ASCII)RADIUS server name
RadiusPort_u32number (uint32)RADIUS port number
RadiusSecret_strstring (ASCII)Secret key
RadiusRetryInterval_u32number (uint32)Radius retry interval
+
+

+

"EnumConnection" RPC API - Get List of TCP Connections Connecting to the VPN Server

+

Description

+

Get List of TCP Connections Connecting to the VPN Server. Use this to get a list of TCP/IP connections that are currently connecting to the VPN Server. It does not display the TCP connections that have been established as VPN sessions. To get the list of TCP/IP connections that have been established as VPN sessions, you can use the EnumSession API. You can get the following: Connection Name, Connection Source, Connection Start and Type. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumConnection",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "NumConnection_u32": 0,
+    "ConnectionList": [
+      {
+        "Name_str": "name",
+        "Hostname_str": "hostname",
+        "Ip_ip": "192.168.0.1",
+        "Port_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Type_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "Hostname_str": "hostname",
+        "Ip_ip": "192.168.0.1",
+        "Port_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Type_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "Hostname_str": "hostname",
+        "Ip_ip": "192.168.0.1",
+        "Port_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Type_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NumConnection_u32number (uint32)Number of connections
ConnectionListArray objectConnection list
Name_strstring (ASCII)Connection name
Hostname_strstring (ASCII)Host name
Ip_ipstring (IP address)IP address
Port_u32number (uint32)Port number
ConnectedTime_dtDateConnected time
Type_u32number (enum)Connection type
Values:
0: VPN Client
1: During initialization
2: Login connection
3: Additional connection
4: RPC for server farm
5: RPC for Management
6: HUB enumeration
7: Password change
8: SSTP
9: OpenVPN
+
+

+

"DisconnectConnection" RPC API - Disconnect TCP Connections Connecting to the VPN Server

+

Description

+

Disconnect TCP Connections Connecting to the VPN Server. Use this to forcefully disconnect specific TCP/IP connections that are connecting to the VPN Server. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DisconnectConnection",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Connection name
+
+

+

"GetConnectionInfo" RPC API - Get Information of TCP Connections Connecting to the VPN Server

+

Description

+

Get Information of TCP Connections Connecting to the VPN Server. Use this to get detailed information of a specific TCP/IP connection that is connecting to the VPN Server. You can get the following information: Connection Name, Connection Type, Source Hostname, Source IP Address, Source Port Number (TCP), Connection Start, Server Product Name, Server Version, Server Build Number, Client Product Name, Client Version, and Client Build Number. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetConnectionInfo",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "Type_u32": 0,
+    "Hostname_str": "hostname",
+    "Ip_ip": "192.168.0.1",
+    "Port_u32": 0,
+    "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+    "ServerStr_str": "serverstr",
+    "ServerVer_u32": 0,
+    "ServerBuild_u32": 0,
+    "ClientStr_str": "clientstr",
+    "ClientVer_u32": 0,
+    "ClientBuild_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Connection name
Type_u32number (enum)Type
Values:
0: VPN Client
1: During initialization
2: Login connection
3: Additional connection
4: RPC for server farm
5: RPC for Management
6: HUB enumeration
7: Password change
8: SSTP
9: OpenVPN
Hostname_strstring (ASCII)Host name
Ip_ipstring (IP address)IP address
Port_u32number (uint32)Port number
ConnectedTime_dtDateConnected time
ServerStr_strstring (ASCII)Server string
ServerVer_u32number (uint32)Server version
ServerBuild_u32number (uint32)Server build number
ClientStr_strstring (ASCII)Client string
ClientVer_u32number (uint32)Client version
ClientBuild_u32number (uint32)Client build number
+
+

+

"SetHubOnline" RPC API - Switch Virtual Hub to Online or Offline

+

Description

+

Switch Virtual Hub to Online or Offline. Use this to set the Virtual Hub to online or offline. A Virtual Hub with an offline status cannot receive VPN connections from clients. When you set the Virtual Hub offline, all sessions will be disconnected. A Virtual Hub with an offline status cannot receive VPN connections from clients. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubOnline",
+  "params": {
+    "HubName_str": "hubname",
+    "Online_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Online_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline / offline flag
+
+

+

"GetHubStatus" RPC API - Get Current Status of Virtual Hub

+

Description

+

Get Current Status of Virtual Hub. Use this to get the current status of the Virtual Hub currently being managed. You can get the following information: Virtual Hub Type, Number of Sessions, Number of Each Type of Object, Number of Logins, Last Login, Last Communication, and Communication Statistical Data.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubStatus",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Online_bool": false,
+    "HubType_u32": 0,
+    "NumSessions_u32": 0,
+    "NumSessionsClient_u32": 0,
+    "NumSessionsBridge_u32": 0,
+    "NumAccessLists_u32": 0,
+    "NumUsers_u32": 0,
+    "NumGroups_u32": 0,
+    "NumMacTables_u32": 0,
+    "NumIpTables_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "SecureNATEnabled_bool": false,
+    "LastCommTime_dt": "2020-08-01T12:24:36.123",
+    "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "NumLogin_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline
HubType_u32number (enum)Type of HUB
Values:
0: Stand-alone HUB
1: Static HUB
2: Dynamic HUB
NumSessions_u32number (uint32)Number of sessions
NumSessionsClient_u32number (uint32)Number of sessions (client mode)
NumSessionsBridge_u32number (uint32)Number of sessions (bridge mode)
NumAccessLists_u32number (uint32)Number of Access list entries
NumUsers_u32number (uint32)Number of users
NumGroups_u32number (uint32)Number of groups
NumMacTables_u32number (uint32)Number of MAC table entries
NumIpTables_u32number (uint32)Number of IP table entries
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
SecureNATEnabled_boolbooleanWhether SecureNAT is enabled
LastCommTime_dtDateLast communication date and time
LastLoginTime_dtDateLast login date and time
CreatedTime_dtDateCreation date and time
NumLogin_u32number (uint32)Number of logins
+
+

+

"SetHubLog" RPC API - Set the logging configuration of the Virtual Hub

+

Description

+

Set the logging configuration of the Virtual Hub. Use this to enable or disable a security log or packet logs of the Virtual Hub currently being managed, set the save contents of the packet log for each type of packet to be saved, and set the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. There are the following packet types: TCP Connection Log, TCP Packet Log, DHCP Packet Log, UDP Packet Log, ICMP Packet Log, IP Packet Log, ARP Packet Log, and Ethernet Packet Log. To get the current setting, you can use the LogGet API. The log file switch cycle can be changed to switch in every second, every minute, every hour, every day, every month or not switch. To get the current setting, you can use the GetHubLog API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubLog",
+  "params": {
+    "HubName_str": "hubname",
+    "SaveSecurityLog_bool": false,
+    "SecurityLogSwitchType_u32": 0,
+    "SavePacketLog_bool": false,
+    "PacketLogSwitchType_u32": 0,
+    "PacketLogConfig_u32": [
+      1,
+      2,
+      3
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "SaveSecurityLog_bool": false,
+    "SecurityLogSwitchType_u32": 0,
+    "SavePacketLog_bool": false,
+    "PacketLogSwitchType_u32": 0,
+    "PacketLogConfig_u32": [
+      1,
+      2,
+      3
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
SaveSecurityLog_boolbooleanThe flag to enable / disable saving the security log
SecurityLogSwitchType_u32number (enum)The log filename switching setting of the security log
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
SavePacketLog_boolbooleanThe flag to enable / disable saving the security log
PacketLogSwitchType_u32number (enum)The log filename switching settings of the packet logs
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
PacketLogConfig_u32number (enum)Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7.
Values:
0: Not save
1: Only header
2: All payloads
+
+

+

"GetHubLog" RPC API - Get the logging configuration of the Virtual Hub

+

Description

+

Get the logging configuration of the Virtual Hub. Use this to get the configuration for a security log or packet logs of the Virtual Hub currently being managed, get the setting for save contents of the packet log for each type of packet to be saved, and get the log file switch cycle for the security log or packet log that the currently managed Virtual Hub saves. To set the current setting, you can use the SetHubLog API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubLog",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "SaveSecurityLog_bool": false,
+    "SecurityLogSwitchType_u32": 0,
+    "SavePacketLog_bool": false,
+    "PacketLogSwitchType_u32": 0,
+    "PacketLogConfig_u32": [
+      1,
+      2,
+      3
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
SaveSecurityLog_boolbooleanThe flag to enable / disable saving the security log
SecurityLogSwitchType_u32number (enum)The log filename switching setting of the security log
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
SavePacketLog_boolbooleanThe flag to enable / disable saving the security log
PacketLogSwitchType_u32number (enum)The log filename switching settings of the packet logs
Values:
0: No switching
1: Secondly basis
2: Minutely basis
3: Hourly basis
4: Daily basis
5: Monthly basis
PacketLogConfig_u32number (enum)Specify the save contents of the packet logs (uint * 16 array). The index numbers: TcpConnection = 0, TcpAll = 1, DHCP = 2, UDP = 3, ICMP = 4, IP = 5, ARP = 6, Ethernet = 7.
Values:
0: Not save
1: Only header
2: All payloads
+
+

+

"AddCa" RPC API - Add Trusted CA Certificate

+

Description

+

Add Trusted CA Certificate. Use this to add a new certificate to a list of CA certificates trusted by the currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. To get a list of the current certificates you can use the EnumCa API. The certificate you add must be saved in the X.509 file format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddCa",
+  "params": {
+    "HubName_str": "hubname",
+    "Cert_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Cert_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Cert_binstring (Base64 binary)The body of the X.509 certificate
+
+

+

"EnumCa" RPC API - Get List of Trusted CA Certificates

+

Description

+

Get List of Trusted CA Certificates. Here you can manage the certificate authority certificates that are trusted by this currently managed Virtual Hub. The list of certificate authority certificates that are registered is used to verify certificates when a VPN Client is connected in signed certificate authentication mode. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumCa",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "CAList": [
+      {
+        "Key_u32": 0,
+        "SubjectName_utf": "subjectname",
+        "IssuerName_utf": "issuername",
+        "Expires_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Key_u32": 0,
+        "SubjectName_utf": "subjectname",
+        "IssuerName_utf": "issuername",
+        "Expires_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Key_u32": 0,
+        "SubjectName_utf": "subjectname",
+        "IssuerName_utf": "issuername",
+        "Expires_dt": "2020-08-01T12:24:36.123"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
CAListArray objectThe list of CA
Key_u32number (uint32)The key id of the item
SubjectName_utfstring (UTF8)Subject
IssuerName_utfstring (UTF8)Issuer
Expires_dtDateExpiration date
+
+

+

"GetCa" RPC API - Get Trusted CA Certificate

+

Description

+

Get Trusted CA Certificate. Use this to get an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub and save it as a file in X.509 format. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetCa",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "Cert_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)The key id of the certificate
Cert_binstring (Base64 binary)The body of the X.509 certificate
+
+

+

"DeleteCa" RPC API - Delete Trusted CA Certificate

+

Description

+

Delete Trusted CA Certificate. Use this to delete an existing certificate from the list of CA certificates trusted by the currently managed Virtual Hub. To get a list of the current certificates you can use the EnumCa API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteCa",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Certificate key id to be deleted
+
+

+ +

Description

+

Create New Cascade Connection. Use this to create a new Cascade Connection on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Cascade Connection to another Virtual Hub that is operating on the same or a different computer. To create a Cascade Connection, you must specify the name of the Cascade Connection, destination server and destination Virtual Hub and user name. When a new Cascade Connection is created, the type of user authentication is initially set as Anonymous Authentication and the proxy server setting and the verification options of the server certificate is not set. To change these settings and other advanced settings after a Cascade Connection has been created, use the other APIs that include the name "Link". [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateLink",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "CheckServerCert_bool": false,
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "Online_bool": false,
+    "CheckServerCert_bool": false,
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "ProxyName_str": "clientoption_proxyname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "clientoption_proxyusername",
+    "ProxyPassword_str": "clientoption_proxypassword",
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "DisableQoS_bool": false,
+    "NoTls1_bool": false,
+    "NoUdpAcceleration_bool": false,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
CheckServerCert_boolbooleanThe flag to enable validation for the server certificate
ServerCert_binstring (Base64 binary)The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true.
AccountName_utfstring (UTF8)Client Option Parameters: Specify the name of the Cascade Connection
Hostname_strstring (ASCII)Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address.
Port_u32number (uint32)Client Option Parameters: Specify the port number of the destination VPN Server.
ProxyType_u32number (enum)Client Option Parameters: The type of the proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyName_strstring (ASCII)Client Option Parameters: The hostname or IP address of the proxy server name
ProxyPort_u32number (uint32)Client Option Parameters: The port number of the proxy server
ProxyUsername_strstring (ASCII)Client Option Parameters: The username to connect to the proxy server
ProxyPassword_strstring (ASCII)Client Option Parameters: The password to connect to the proxy server
HubName_strstring (ASCII)Client Option Parameters: The Virtual Hub on the destination VPN Server
MaxConnection_u32number (uint32)Client Option Parameters: Number of TCP Connections to Use in VPN Communication
UseEncrypt_boolbooleanClient Option Parameters: The flag to enable the encryption on the communication
UseCompress_boolbooleanClient Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection
HalfConnection_boolbooleanClient Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction.
AdditionalConnectionInterval_u32number (uint32)Client Option Parameters: Connection attempt interval when additional connection will be established
ConnectionDisconnectSpan_u32number (uint32)Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive)
DisableQoS_boolbooleanClient Option Parameters: Disable QoS Control Function if the value is true
NoTls1_boolbooleanClient Option Parameters: Do not use TLS 1.x of the value is true
NoUdpAcceleration_boolbooleanClient Option Parameters: Do not use UDP acceleration mode if the value is true
AuthType_u32number (enum)Authentication type
Values:
0: Anonymous authentication
1: SHA-0 hashed password authentication
2: Plain password authentication
3: Certificate authentication
Username_strstring (ASCII)User name
HashedPassword_binstring (Base64 binary)SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
PlainPassword_strstring (ASCII)Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
ClientX_binstring (Base64 binary)Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
ClientK_binstring (Base64 binary)Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
SecPol_CheckMac_boolbooleanSecurity policy: Prohibit the duplicate MAC address
SecPol_CheckIP_boolbooleanSecurity policy: Prohibit a duplicate IP address (IPv4)
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
SecPol_RAFilter_boolbooleanSecurity policy: Filter the router advertisement packet (IPv6)
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
SecPol_CheckIPv6_boolbooleanSecurity policy: Prohibit the duplicate IP address (IPv6)
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+ +

Description

+

Get the Cascade Connection Setting. Use this to get the Connection Setting of a Cascade Connection that is registered on the currently managed Virtual Hub. To change the Connection Setting contents of the Cascade Connection, use the APIs that include the name "Link" after creating the Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetLink",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "AccountName_utf": "clientoption_accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "Online_bool": false,
+    "CheckServerCert_bool": false,
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "ProxyName_str": "clientoption_proxyname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "clientoption_proxyusername",
+    "ProxyPassword_str": "clientoption_proxypassword",
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "DisableQoS_bool": false,
+    "NoTls1_bool": false,
+    "NoUdpAcceleration_bool": false,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
CheckServerCert_boolbooleanThe flag to enable validation for the server certificate
ServerCert_binstring (Base64 binary)The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true.
AccountName_utfstring (UTF8)Client Option Parameters: Specify the name of the Cascade Connection
Hostname_strstring (ASCII)Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address.
Port_u32number (uint32)Client Option Parameters: Specify the port number of the destination VPN Server.
ProxyType_u32number (enum)Client Option Parameters: The type of the proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyName_strstring (ASCII)Client Option Parameters: The hostname or IP address of the proxy server name
ProxyPort_u32number (uint32)Client Option Parameters: The port number of the proxy server
ProxyUsername_strstring (ASCII)Client Option Parameters: The username to connect to the proxy server
ProxyPassword_strstring (ASCII)Client Option Parameters: The password to connect to the proxy server
HubName_strstring (ASCII)Client Option Parameters: The Virtual Hub on the destination VPN Server
MaxConnection_u32number (uint32)Client Option Parameters: Number of TCP Connections to Use in VPN Communication
UseEncrypt_boolbooleanClient Option Parameters: The flag to enable the encryption on the communication
UseCompress_boolbooleanClient Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection
HalfConnection_boolbooleanClient Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction.
AdditionalConnectionInterval_u32number (uint32)Client Option Parameters: Connection attempt interval when additional connection will be established
ConnectionDisconnectSpan_u32number (uint32)Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive)
DisableQoS_boolbooleanClient Option Parameters: Disable QoS Control Function if the value is true
NoTls1_boolbooleanClient Option Parameters: Do not use TLS 1.x of the value is true
NoUdpAcceleration_boolbooleanClient Option Parameters: Do not use UDP acceleration mode if the value is true
AuthType_u32number (enum)Authentication type
Values:
0: Anonymous authentication
1: SHA-0 hashed password authentication
2: Plain password authentication
3: Certificate authentication
Username_strstring (ASCII)User name
HashedPassword_binstring (Base64 binary)SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
PlainPassword_strstring (ASCII)Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
ClientX_binstring (Base64 binary)Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
ClientK_binstring (Base64 binary)Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
SecPol_CheckMac_boolbooleanSecurity policy: Prohibit the duplicate MAC address
SecPol_CheckIP_boolbooleanSecurity policy: Prohibit a duplicate IP address (IPv4)
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
SecPol_RAFilter_boolbooleanSecurity policy: Filter the router advertisement packet (IPv6)
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
SecPol_CheckIPv6_boolbooleanSecurity policy: Prohibit the duplicate IP address (IPv6)
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+ +

Description

+

Change Existing Cascade Connection. Use this to alter the setting of an existing Cascade Connection on the currently managed Virtual Hub.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetLink",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "CheckServerCert_bool": false,
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "Online_bool": false,
+    "CheckServerCert_bool": false,
+    "ServerCert_bin": "SGVsbG8gV29ybGQ=",
+    "AccountName_utf": "clientoption_accountname",
+    "Hostname_str": "clientoption_hostname",
+    "Port_u32": 0,
+    "ProxyType_u32": 0,
+    "ProxyName_str": "clientoption_proxyname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "clientoption_proxyusername",
+    "ProxyPassword_str": "clientoption_proxypassword",
+    "HubName_str": "clientoption_hubname",
+    "MaxConnection_u32": 0,
+    "UseEncrypt_bool": false,
+    "UseCompress_bool": false,
+    "HalfConnection_bool": false,
+    "AdditionalConnectionInterval_u32": 0,
+    "ConnectionDisconnectSpan_u32": 0,
+    "DisableQoS_bool": false,
+    "NoTls1_bool": false,
+    "NoUdpAcceleration_bool": false,
+    "AuthType_u32": 0,
+    "Username_str": "clientauth_username",
+    "HashedPassword_bin": "SGVsbG8gV29ybGQ=",
+    "PlainPassword_str": "clientauth_plainpassword",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientK_bin": "SGVsbG8gV29ybGQ=",
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "SecPol_CheckMac_bool": false,
+    "SecPol_CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:RSandRAFilter_bool": false,
+    "SecPol_RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "SecPol_CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
CheckServerCert_boolbooleanThe flag to enable validation for the server certificate
ServerCert_binstring (Base64 binary)The body of server X.509 certificate to compare. Valid only if the CheckServerCert_bool flag is true.
AccountName_utfstring (UTF8)Client Option Parameters: Specify the name of the Cascade Connection
Hostname_strstring (ASCII)Client Option Parameters: Specify the hostname of the destination VPN Server. You can also specify by IP address.
Port_u32number (uint32)Client Option Parameters: Specify the port number of the destination VPN Server.
ProxyType_u32number (enum)Client Option Parameters: The type of the proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyName_strstring (ASCII)Client Option Parameters: The hostname or IP address of the proxy server name
ProxyPort_u32number (uint32)Client Option Parameters: The port number of the proxy server
ProxyUsername_strstring (ASCII)Client Option Parameters: The username to connect to the proxy server
ProxyPassword_strstring (ASCII)Client Option Parameters: The password to connect to the proxy server
HubName_strstring (ASCII)Client Option Parameters: The Virtual Hub on the destination VPN Server
MaxConnection_u32number (uint32)Client Option Parameters: Number of TCP Connections to Use in VPN Communication
UseEncrypt_boolbooleanClient Option Parameters: The flag to enable the encryption on the communication
UseCompress_boolbooleanClient Option Parameters: Enable / Disable Data Compression when Communicating by Cascade Connection
HalfConnection_boolbooleanClient Option Parameters: Specify true when enabling half duplex mode. When using two or more TCP connections for VPN communication, it is possible to use Half Duplex Mode. By enabling half duplex mode it is possible to automatically fix data transmission direction as half and half for each TCP connection. In the case where a VPN using 8 TCP connections is established, for example, when half-duplex is enabled, communication can be fixes so that 4 TCP connections are dedicated to the upload direction and the other 4 connections are dedicated to the download direction.
AdditionalConnectionInterval_u32number (uint32)Client Option Parameters: Connection attempt interval when additional connection will be established
ConnectionDisconnectSpan_u32number (uint32)Client Option Parameters: Connection Life of Each TCP Connection (0 for no keep-alive)
DisableQoS_boolbooleanClient Option Parameters: Disable QoS Control Function if the value is true
NoTls1_boolbooleanClient Option Parameters: Do not use TLS 1.x of the value is true
NoUdpAcceleration_boolbooleanClient Option Parameters: Do not use UDP acceleration mode if the value is true
AuthType_u32number (enum)Authentication type
Values:
0: Anonymous authentication
1: SHA-0 hashed password authentication
2: Plain password authentication
3: Certificate authentication
Username_strstring (ASCII)User name
HashedPassword_binstring (Base64 binary)SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
PlainPassword_strstring (ASCII)Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
ClientX_binstring (Base64 binary)Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
ClientK_binstring (Base64 binary)Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
SecPol_CheckMac_boolbooleanSecurity policy: Prohibit the duplicate MAC address
SecPol_CheckIP_boolbooleanSecurity policy: Prohibit a duplicate IP address (IPv4)
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
SecPol_RAFilter_boolbooleanSecurity policy: Filter the router advertisement packet (IPv6)
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
SecPol_CheckIPv6_boolbooleanSecurity policy: Prohibit the duplicate IP address (IPv6)
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+ +

Description

+

Get List of Cascade Connections. Use this to get a list of Cascade Connections that are registered on the currently managed Virtual Hub. By using a Cascade Connection, you can connect this Virtual Hub by Layer 2 Cascade Connection to another Virtual Hub that is operating on the same or a different computer. [Warning About Cascade Connections] By connecting using a Cascade Connection you can create a Layer 2 bridge between multiple Virtual Hubs but if the connection is incorrectly configured, a loopback Cascade Connection could inadvertently be created. When using a Cascade Connection function please design the network topology with care. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumLink",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "NumLink_u32": 0,
+    "LinkList": [
+      {
+        "AccountName_utf": "accountname",
+        "Online_bool": false,
+        "Connected_bool": false,
+        "LastError_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Hostname_str": "hostname",
+        "TargetHubName_str": "targethubname"
+      },
+      {
+        "AccountName_utf": "accountname",
+        "Online_bool": false,
+        "Connected_bool": false,
+        "LastError_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Hostname_str": "hostname",
+        "TargetHubName_str": "targethubname"
+      },
+      {
+        "AccountName_utf": "accountname",
+        "Online_bool": false,
+        "Connected_bool": false,
+        "LastError_u32": 0,
+        "ConnectedTime_dt": "2020-08-01T12:24:36.123",
+        "Hostname_str": "hostname",
+        "TargetHubName_str": "targethubname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
NumLink_u32number (uint32)Number of cascade connections
LinkListArray objectThe list of cascade connections
AccountName_utfstring (UTF8)The name of cascade connection
Online_boolbooleanOnline flag
Connected_boolbooleanThe flag indicates whether the cascade connection is established
LastError_u32number (uint32)The error last occurred if the cascade connection is in the fail state
ConnectedTime_dtDateConnection completion time
Hostname_strstring (ASCII)Host name of the destination VPN server
TargetHubName_strstring (ASCII)The Virtual Hub name
+
+

+

"SetLinkOnline" RPC API - Switch Cascade Connection to Online Status

+

Description

+

Switch Cascade Connection to Online Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetLinkOnline",
+  "params": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
+
+

+

"SetLinkOffline" RPC API - Switch Cascade Connection to Offline Status

+

Description

+

Switch Cascade Connection to Offline Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the SetLinkOnline API You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetLinkOffline",
+  "params": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
+
+

+ +

Description

+

Delete Cascade Connection Setting. Use this to delete a Cascade Connection that is registered on the currently managed Virtual Hub. If the specified Cascade Connection has a status of online, the connections will be automatically disconnected and then the Cascade Connection will be deleted. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteLink",
+  "params": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
+
+

+ +

Description

+

Change Name of Cascade Connection. When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to change the name of that Cascade Connection. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "RenameLink",
+  "params": {
+    "HubName_str": "hubname",
+    "OldAccountName_utf": "oldaccountname",
+    "NewAccountName_utf": "newaccountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "OldAccountName_utf": "oldaccountname",
+    "NewAccountName_utf": "newaccountname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
OldAccountName_utfstring (UTF8)The old name of the cascade connection
NewAccountName_utfstring (UTF8)The new name of the cascade connection
+
+

+

"GetLinkStatus" RPC API - Get Current Cascade Connection Status

+

Description

+

Get Current Cascade Connection Status. When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection is currently online, use this to get its connection status and other information. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetLinkStatus",
+  "params": {
+    "HubName_Ex_str": "hubname_ex",
+    "AccountName_utf": "accountname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_Ex_str": "hubname_ex",
+    "AccountName_utf": "accountname",
+    "Active_bool": false,
+    "Connected_bool": false,
+    "SessionStatus_u32": 0,
+    "ServerName_str": "servername",
+    "ServerPort_u32": 0,
+    "ServerProductName_str": "serverproductname",
+    "ServerProductVer_u32": 0,
+    "ServerProductBuild_u32": 0,
+    "ServerX_bin": "SGVsbG8gV29ybGQ=",
+    "ClientX_bin": "SGVsbG8gV29ybGQ=",
+    "StartTime_dt": "2020-08-01T12:24:36.123",
+    "FirstConnectionEstablisiedTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentConnectionEstablishTime_dt": "2020-08-01T12:24:36.123",
+    "NumConnectionsEatablished_u32": 0,
+    "HalfConnection_bool": false,
+    "QoS_bool": false,
+    "MaxTcpConnections_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "NumTcpConnectionsUpload_u32": 0,
+    "NumTcpConnectionsDownload_u32": 0,
+    "UseEncrypt_bool": false,
+    "CipherName_str": "ciphername",
+    "UseCompress_bool": false,
+    "IsRUDPSession_bool": false,
+    "UnderlayProtocol_str": "underlayprotocol",
+    "IsUdpAccelerationEnabled_bool": false,
+    "IsUsingUdpAcceleration_bool": false,
+    "SessionName_str": "sessionname",
+    "ConnectionName_str": "connectionname",
+    "SessionKey_bin": "SGVsbG8gV29ybGQ=",
+    "TotalSendSize_u64": 0,
+    "TotalRecvSize_u64": 0,
+    "TotalSendSizeReal_u64": 0,
+    "TotalRecvSizeReal_u64": 0,
+    "IsBridgeMode_bool": false,
+    "IsMonitorMode_bool": false,
+    "VLanId_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_Ex_strstring (ASCII)The Virtual Hub name
AccountName_utfstring (UTF8)The name of the cascade connection
Active_boolbooleanThe flag whether the cascade connection is enabled
Connected_boolbooleanThe flag whether the cascade connection is established
SessionStatus_u32number (enum)The session status
Values:
0: Connecting
1: Negotiating
2: During user authentication
3: Connection complete
4: Wait to retry
5: Idle state
ServerName_strstring (ASCII)The destination VPN server name
ServerPort_u32number (uint32)The port number of the server
ServerProductName_strstring (ASCII)Server product name
ServerProductVer_u32number (uint32)Server product version
ServerProductBuild_u32number (uint32)Server product build number
ServerX_binstring (Base64 binary)Server's X.509 certificate
ClientX_binstring (Base64 binary)Client certificate
StartTime_dtDateConnection start time
FirstConnectionEstablisiedTime_dtDateConnection completion time of the first connection
CurrentConnectionEstablishTime_dtDateConnection completion time of this connection
NumConnectionsEatablished_u32number (uint32)Number of connections have been established so far
HalfConnection_boolbooleanHalf-connection
QoS_boolbooleanVoIP / QoS
MaxTcpConnections_u32number (uint32)Maximum number of the underlying TCP connections
NumTcpConnections_u32number (uint32)Number of current underlying TCP connections
NumTcpConnectionsUpload_u32number (uint32)Number of underlying inbound TCP connections
NumTcpConnectionsDownload_u32number (uint32)Number of underlying outbound TCP connections
UseEncrypt_boolbooleanUse of encryption
CipherName_strstring (ASCII)Cipher algorithm name
UseCompress_boolbooleanUse of compression
IsRUDPSession_boolbooleanThe flag whether this is a R-UDP session
UnderlayProtocol_strstring (ASCII)Underlying physical communication protocol
IsUdpAccelerationEnabled_boolbooleanThe UDP acceleration is enabled
IsUsingUdpAcceleration_boolbooleanThe UDP acceleration is being actually used
SessionName_strstring (ASCII)Session name
ConnectionName_strstring (ASCII)Connection name
SessionKey_binstring (Base64 binary)Session key
TotalSendSize_u64number (uint64)Total transmitted data size
TotalRecvSize_u64number (uint64)Total received data size
TotalSendSizeReal_u64number (uint64)Total transmitted data size (no compression)
TotalRecvSizeReal_u64number (uint64)Total received data size (no compression)
IsBridgeMode_boolbooleanThe flag whether the VPN session is Bridge Mode
IsMonitorMode_boolbooleanThe flag whether the VPN session is Monitor mode
VLanId_u32number (uint32)VLAN ID
+
+

+

"AddAccess" RPC API - Add Access List Rule

+

Description

+

Add Access List Rule. Use this to add a new rule to the access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define an priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. You can also use the access list to generate delays, jitters and packet losses. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddAccess",
+  "params": {
+    "HubName_str": "hubname",
+    "AccessListSingle": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccessListSingle": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccessListSingleArray objectAccess list (Must be a single item)
Id_u32number (uint32)ID
Note_utfstring (UTF8)Specify a description (note) for this rule
Active_boolbooleanEnabled flag (true: enabled, false: disabled)
Priority_u32number (uint32)Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values.
Discard_boolbooleanThe flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded.
IsIPv6_boolbooleanThe flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6.
SrcIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field.
SrcSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
DestIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field.
DestSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
SrcIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field.
SrcSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
DestIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field.
DestSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
Protocol_u32number (enum)The IP protocol number
Values:
1: ICMP for IPv4
6: TCP
17: UDP
58: ICMP for IPv6
SrcPortStart_u32number (uint32)The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcPortEnd_u32number (uint32)The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortStart_u32number (uint32)The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortEnd_u32number (uint32)The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcUsername_strstring (ASCII)Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
DestUsername_strstring (ASCII)Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
CheckSrcMac_boolbooleanSpecify true if you want to check the source MAC address.
SrcMacAddress_binstring (Base64 binary)Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
SrcMacMask_binstring (Base64 binary)Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckDstMac_boolbooleanSpecify true if you want to check the destination MAC address.
DstMacAddress_binstring (Base64 binary)Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
DstMacMask_binstring (Base64 binary)Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckTcpState_boolbooleanSpecify true if you want to check the state of the TCP connection.
Established_boolbooleanValid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets.
Delay_u32number (uint32)Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most.
Jitter_u32number (uint32)Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate.
Loss_u32number (uint32)Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate.
RedirectUrl_strstring (ASCII)The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address.
+
+

+

"DeleteAccess" RPC API - Delete Rule from Access List

+

Description

+

Delete Rule from Access List. Use this to specify a packet filter rule registered on the access list of the currently managed Virtual Hub and delete it. To delete a rule, you must specify that rule's ID. You can display the ID by using the EnumAccess API. If you wish not to delete the rule but to only temporarily disable it, use the SetAccessList API to set the rule status to disable. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteAccess",
+  "params": {
+    "HubName_str": "hubname",
+    "Id_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Id_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Id_u32number (uint32)ID
+
+

+

"EnumAccess" RPC API - Get Access List Rule List

+

Description

+

Get Access List Rule List. Use this to get a list of packet filter rules that are registered on access list of the currently managed Virtual Hub. The access list is a set of packet file rules that are applied to packets that flow through the Virtual Hub. You can register multiple rules in an access list and you can also define a priority for each rule. All packets are checked for the conditions specified by the rules registered in the access list and based on the operation that is stipulated by the first matching rule, they either pass or are discarded. Packets that do not match any rule are implicitly allowed to pass. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumAccess",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccessList": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccessListArray objectAccess list
Id_u32number (uint32)ID
Note_utfstring (UTF8)Specify a description (note) for this rule
Active_boolbooleanEnabled flag (true: enabled, false: disabled)
Priority_u32number (uint32)Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values.
Discard_boolbooleanThe flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded.
IsIPv6_boolbooleanThe flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6.
SrcIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field.
SrcSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
DestIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field.
DestSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
SrcIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field.
SrcSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
DestIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field.
DestSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
Protocol_u32number (enum)The IP protocol number
Values:
1: ICMP for IPv4
6: TCP
17: UDP
58: ICMP for IPv6
SrcPortStart_u32number (uint32)The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcPortEnd_u32number (uint32)The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortStart_u32number (uint32)The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortEnd_u32number (uint32)The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcUsername_strstring (ASCII)Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
DestUsername_strstring (ASCII)Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
CheckSrcMac_boolbooleanSpecify true if you want to check the source MAC address.
SrcMacAddress_binstring (Base64 binary)Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
SrcMacMask_binstring (Base64 binary)Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckDstMac_boolbooleanSpecify true if you want to check the destination MAC address.
DstMacAddress_binstring (Base64 binary)Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
DstMacMask_binstring (Base64 binary)Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckTcpState_boolbooleanSpecify true if you want to check the state of the TCP connection.
Established_boolbooleanValid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets.
Delay_u32number (uint32)Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most.
Jitter_u32number (uint32)Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate.
Loss_u32number (uint32)Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate.
RedirectUrl_strstring (ASCII)The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address.
+
+

+

"SetAccessList" RPC API - Replace all access lists on a single bulk API call

+

Description

+

Replace all access lists on a single bulk API call. This API removes all existing access list rules on the Virtual Hub, and replace them by new access list rules specified by the parameter.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetAccessList",
+  "params": {
+    "HubName_str": "hubname",
+    "AccessList": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AccessList": [
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      },
+      {
+        "Id_u32": 0,
+        "Note_utf": "note",
+        "Active_bool": false,
+        "Priority_u32": 0,
+        "Discard_bool": false,
+        "IsIPv6_bool": false,
+        "SrcIpAddress_ip": "192.168.0.1",
+        "SrcSubnetMask_ip": "255.255.255.255",
+        "DestIpAddress_ip": "192.168.0.1",
+        "DestSubnetMask_ip": "255.255.255.255",
+        "SrcIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "SrcSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "DestIpAddress6_bin": "SGVsbG8gV29ybGQ=",
+        "DestSubnetMask6_bin": "SGVsbG8gV29ybGQ=",
+        "Protocol_u32": 0,
+        "SrcPortStart_u32": 0,
+        "SrcPortEnd_u32": 0,
+        "DestPortStart_u32": 0,
+        "DestPortEnd_u32": 0,
+        "SrcUsername_str": "srcusername",
+        "DestUsername_str": "destusername",
+        "CheckSrcMac_bool": false,
+        "SrcMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "SrcMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckDstMac_bool": false,
+        "DstMacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "DstMacMask_bin": "SGVsbG8gV29ybGQ=",
+        "CheckTcpState_bool": false,
+        "Established_bool": false,
+        "Delay_u32": 0,
+        "Jitter_u32": 0,
+        "Loss_u32": 0,
+        "RedirectUrl_str": "redirecturl"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
AccessListArray objectAccess list
Id_u32number (uint32)ID
Note_utfstring (UTF8)Specify a description (note) for this rule
Active_boolbooleanEnabled flag (true: enabled, false: disabled)
Priority_u32number (uint32)Specify an integer of 1 or higher to indicate the priority of the rule. Higher priority is given to rules with the lower priority values.
Discard_boolbooleanThe flag if the rule is DISCARD operation or PASS operation. When a packet matches this rule condition, this operation is decided. When the operation of the rule is PASS, the packet is allowed to pass, otherwise the packet will be discarded.
IsIPv6_boolbooleanThe flag if the rule is for IPv6. Specify false for IPv4, or specify true for IPv6.
SrcIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 address as a rule condition. You must also specify the SrcSubnetMask_ip field.
SrcSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a source IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
DestIpAddress_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 address as a rule condition. You must also specify the DestSubnetMask_ip field.
DestSubnetMask_ipstring (IP address)Valid only if the rule is IPv4 mode (IsIPv6_bool == false). Specify a destination IPv4 subnet mask as a rule condition. "0.0.0.0" means all hosts. "255.255.255.255" means one single host.
SrcIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the SrcSubnetMask6_bin field.
SrcSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a source IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
DestIpAddress6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 address as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 address in binary form. You must also specify the DestSubnetMask6_bin field.
DestSubnetMask6_binstring (Base64 binary)Valid only if the rule is IPv6 mode (IsIPv6_bool == true). Specify a destination IPv6 subnet mask as a rule condition. The field must be a byte array of 16 bytes (128 bits) to contain the IPv6 subnet mask in binary form.
Protocol_u32number (enum)The IP protocol number
Values:
1: ICMP for IPv4
6: TCP
17: UDP
58: ICMP for IPv6
SrcPortStart_u32number (uint32)The Start Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcPortEnd_u32number (uint32)The End Value of the Source Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the source port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortStart_u32number (uint32)The Start Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
DestPortEnd_u32number (uint32)The End Value of the Destination Port Number Range. If the specified protocol is TCP/IP or UDP/IP, specify the destination port number as the rule condition. Protocols other than this will be ignored. When this parameter is not specified, the rules will apply to all port numbers.
SrcUsername_strstring (ASCII)Source user name. You can apply this rule to only the packets sent by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
DestUsername_strstring (ASCII)Destination user name. You can apply this rule to only the packets received by a user session of a user name that has been specified as a rule condition. In this case, specify the user name.
CheckSrcMac_boolbooleanSpecify true if you want to check the source MAC address.
SrcMacAddress_binstring (Base64 binary)Source MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
SrcMacMask_binstring (Base64 binary)Source MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckDstMac_boolbooleanSpecify true if you want to check the destination MAC address.
DstMacAddress_binstring (Base64 binary)Destination MAC address (6 bytes), valid only if CheckSrcMac_bool == true.
DstMacMask_binstring (Base64 binary)Destination MAC address mask (6 bytes), valid only if CheckSrcMac_bool == true.
CheckTcpState_boolbooleanSpecify true if you want to check the state of the TCP connection.
Established_boolbooleanValid only if CheckTcpState_bool == true. Set this field true to match only TCP-established packets. Set this field false to match only TCP-non established packets.
Delay_u32number (uint32)Set this value to generate delays when packets is passing. Specify the delay period in milliseconds. Specify 0 means no delays to generate. The delays must be 10000 milliseconds at most.
Jitter_u32number (uint32)Set this value to generate jitters when packets is passing. Specify the ratio of fluctuation of jitters within 0% to 100% range. Specify 0 means no jitters to generate.
Loss_u32number (uint32)Set this value to generate packet losses when packets is passing. Specify the ratio of packet losses within 0% to 100% range. Specify 0 means no packet losses to generate.
RedirectUrl_strstring (ASCII)The specified URL will be mandatory replied to the client as a response for TCP connecting request packets which matches the conditions of this access list entry via this Virtual Hub. To use this setting, you can enforce the web browser of the VPN Client computer to show the specified web site when that web browser tries to access the specific IP address.
+
+

+

"CreateUser" RPC API - Create a user

+

Description

+

Create a user. Use this to create a new user in the security account database of the currently managed Virtual Hub. By creating a user, the VPN Client can connect to the Virtual Hub by using the authentication information of that user. Note that a user whose user name has been created as "" (a single asterisk character) will automatically be registered as a RADIUS authentication user. For cases where there are users with "" as the name, when a user, whose user name that has been provided when a client connected to a VPN Server does not match existing user names, is able to be authenticated by a RADIUS server or NT domain controller by inputting a user name and password, the authentication settings and security policy settings will follow the setting for the user "*". To change the user information of a user that has been created, use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "NumLogin_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Specify the user name of the user
GroupName_strstring (ASCII)Assigned group name for the user
Realname_utfstring (UTF8)Optional real name (full name) of the user, allow using any Unicode characters
Note_utfstring (UTF8)Optional User Description
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateLast modified date and time
ExpireTime_dtDateExpiration date and time
AuthType_u32number (enum)Authentication method of the user
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
Auth_Password_strstring (ASCII)User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations.
UserX_binstring (Base64 binary)User certificate, valid only if AuthType_u32 == UserCert(2).
Serial_binstring (Base64 binary)Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3).
CommonName_utfstring (UTF8)Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3).
RadiusUsername_utfstring (UTF8)Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
NtUsername_utfstring (UTF8)Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
NumLogin_u32number (uint32)Number of total logins of the user
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"SetUser" RPC API - Change User Settings

+

Description

+

Change User Settings. Use this to change user settings that is registered on the security account database of the currently managed Virtual Hub. The user settings that can be changed using this API are the three items that are specified when a new user is created using the CreateUser API: Group Name, Full Name, and Description. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "NumLogin_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Specify the user name of the user
GroupName_strstring (ASCII)Assigned group name for the user
Realname_utfstring (UTF8)Optional real name (full name) of the user, allow using any Unicode characters
Note_utfstring (UTF8)Optional User Description
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateLast modified date and time
ExpireTime_dtDateExpiration date and time
AuthType_u32number (enum)Authentication method of the user
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
Auth_Password_strstring (ASCII)User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations.
UserX_binstring (Base64 binary)User certificate, valid only if AuthType_u32 == UserCert(2).
Serial_binstring (Base64 binary)Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3).
CommonName_utfstring (UTF8)Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3).
RadiusUsername_utfstring (UTF8)Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
NtUsername_utfstring (UTF8)Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
NumLogin_u32number (uint32)Number of total logins of the user
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"GetUser" RPC API - Get User Settings

+

Description

+

Get User Settings. Use this to get user settings information that is registered on the security account database of the currently managed Virtual Hub. The information that you can get using this API are User Name, Full Name, Group Name, Expiration Date, Security Policy, and Auth Type, as well as parameters that are specified as auth type attributes and the statistical data of that user. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "GroupName_str": "groupname",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "CreatedTime_dt": "2020-08-01T12:24:36.123",
+    "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+    "ExpireTime_dt": "2020-08-01T12:24:36.123",
+    "AuthType_u32": 0,
+    "Auth_Password_str": "auth_password",
+    "UserX_bin": "SGVsbG8gV29ybGQ=",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "CommonName_utf": "auth_rootcert_commonname",
+    "RadiusUsername_utf": "auth_radius_radiususername",
+    "NtUsername_utf": "auth_nt_ntusername",
+    "NumLogin_u32": 0,
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Specify the user name of the user
GroupName_strstring (ASCII)Assigned group name for the user
Realname_utfstring (UTF8)Optional real name (full name) of the user, allow using any Unicode characters
Note_utfstring (UTF8)Optional User Description
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateLast modified date and time
ExpireTime_dtDateExpiration date and time
AuthType_u32number (enum)Authentication method of the user
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
Auth_Password_strstring (ASCII)User password, valid only if AuthType_u32 == Password(1). Valid only to create or set operations.
UserX_binstring (Base64 binary)User certificate, valid only if AuthType_u32 == UserCert(2).
Serial_binstring (Base64 binary)Certificate Serial Number, optional, valid only if AuthType_u32 == RootCert(3).
CommonName_utfstring (UTF8)Certificate Common Name, optional, valid only if AuthType_u32 == RootCert(3).
RadiusUsername_utfstring (UTF8)Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
NtUsername_utfstring (UTF8)Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
NumLogin_u32number (uint32)Number of total logins of the user
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"DeleteUser" RPC API - Delete a user

+

Description

+

Delete a user. Use this to delete a user that is registered on the security account database of the currently managed Virtual Hub. By deleting the user, that user will no long be able to connect to the Virtual Hub. You can use the SetUser API to set the user's security policy to deny access instead of deleting a user, set the user to be temporarily denied from logging in. To get the list of currently registered users, use the EnumUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteUser",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)User or group name
+
+

+

"EnumUser" RPC API - Get List of Users

+

Description

+

Get List of Users. Use this to get a list of users that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumUser",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "UserList": [
+      {
+        "Name_str": "name",
+        "GroupName_str": "groupname",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "AuthType_u32": 0,
+        "NumLogin_u32": 0,
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "DenyAccess_bool": false,
+        "IsTrafficFilled_bool": false,
+        "IsExpiresFilled_bool": false,
+        "Expires_dt": "2020-08-01T12:24:36.123",
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "Name_str": "name",
+        "GroupName_str": "groupname",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "AuthType_u32": 0,
+        "NumLogin_u32": 0,
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "DenyAccess_bool": false,
+        "IsTrafficFilled_bool": false,
+        "IsExpiresFilled_bool": false,
+        "Expires_dt": "2020-08-01T12:24:36.123",
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      },
+      {
+        "Name_str": "name",
+        "GroupName_str": "groupname",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "AuthType_u32": 0,
+        "NumLogin_u32": 0,
+        "LastLoginTime_dt": "2020-08-01T12:24:36.123",
+        "DenyAccess_bool": false,
+        "IsTrafficFilled_bool": false,
+        "IsExpiresFilled_bool": false,
+        "Expires_dt": "2020-08-01T12:24:36.123",
+        "Ex.Recv.BroadcastBytes_u64": 0,
+        "Ex.Recv.BroadcastCount_u64": 0,
+        "Ex.Recv.UnicastBytes_u64": 0,
+        "Ex.Recv.UnicastCount_u64": 0,
+        "Ex.Send.BroadcastBytes_u64": 0,
+        "Ex.Send.BroadcastCount_u64": 0,
+        "Ex.Send.UnicastBytes_u64": 0,
+        "Ex.Send.UnicastCount_u64": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
UserListArray objectUser list
Name_strstring (ASCII)User name
GroupName_strstring (ASCII)Group name
Realname_utfstring (UTF8)Real name
Note_utfstring (UTF8)Note
AuthType_u32number (enum)Authentication method
Values:
0: Anonymous authentication
1: Password authentication
2: User certificate authentication
3: Root certificate which is issued by trusted Certificate Authority
4: Radius authentication
5: Windows NT authentication
NumLogin_u32number (uint32)Number of logins
LastLoginTime_dtDateLast login date and time
DenyAccess_boolbooleanAccess denied
IsTrafficFilled_boolbooleanFlag of whether the traffic variable is set
IsExpiresFilled_boolbooleanFlag of whether expiration date variable is set
Expires_dtDateExpiration date
Ex.Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Ex.Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Ex.Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Ex.Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Ex.Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Ex.Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Ex.Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Ex.Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
+
+

+

"CreateGroup" RPC API - Create Group

+

Description

+

Create Group. Use this to create a new group in the security account database of the currently managed Virtual Hub. You can register multiple users in a group. To register users in a group use the SetUser API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "CreateGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)The group name
Realname_utfstring (UTF8)Optional real name (full name) of the group, allow using any Unicode characters
Note_utfstring (UTF8)Optional, specify a description of the group
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"SetGroup" RPC API - Set group settings

+

Description

+

Set group settings. Use this to set group settings that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)The group name
Realname_utfstring (UTF8)Optional real name (full name) of the group, allow using any Unicode characters
Note_utfstring (UTF8)Optional, specify a description of the group
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"GetGroup" RPC API - Get Group Setting (Sync mode)

+

Description

+

Get Group Setting (Sync mode). Use this to get the setting of a group that is registered on the security account database of the currently managed Virtual Hub. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Realname_utf": "realname",
+    "Note_utf": "note",
+    "Recv.BroadcastBytes_u64": 0,
+    "Recv.BroadcastCount_u64": 0,
+    "Recv.UnicastBytes_u64": 0,
+    "Recv.UnicastCount_u64": 0,
+    "Send.BroadcastBytes_u64": 0,
+    "Send.BroadcastCount_u64": 0,
+    "Send.UnicastBytes_u64": 0,
+    "Send.UnicastCount_u64": 0,
+    "UsePolicy_bool": false,
+    "policy:Access_bool": false,
+    "policy:DHCPFilter_bool": false,
+    "policy:DHCPNoServer_bool": false,
+    "policy:DHCPForce_bool": false,
+    "policy:NoBridge_bool": false,
+    "policy:NoRouting_bool": false,
+    "policy:CheckMac_bool": false,
+    "policy:CheckIP_bool": false,
+    "policy:ArpDhcpOnly_bool": false,
+    "policy:PrivacyFilter_bool": false,
+    "policy:NoServer_bool": false,
+    "policy:NoBroadcastLimiter_bool": false,
+    "policy:MonitorPort_bool": false,
+    "policy:MaxConnection_u32": 0,
+    "policy:TimeOut_u32": 0,
+    "policy:MaxMac_u32": 0,
+    "policy:MaxIP_u32": 0,
+    "policy:MaxUpload_u32": 0,
+    "policy:MaxDownload_u32": 0,
+    "policy:FixPassword_bool": false,
+    "policy:MultiLogins_u32": 0,
+    "policy:NoQoS_bool": false,
+    "policy:RSandRAFilter_bool": false,
+    "policy:RAFilter_bool": false,
+    "policy:DHCPv6Filter_bool": false,
+    "policy:DHCPv6NoServer_bool": false,
+    "policy:NoRoutingV6_bool": false,
+    "policy:CheckIPv6_bool": false,
+    "policy:NoServerV6_bool": false,
+    "policy:MaxIPv6_u32": 0,
+    "policy:NoSavePassword_bool": false,
+    "policy:AutoDisconnect_u32": 0,
+    "policy:FilterIPv4_bool": false,
+    "policy:FilterIPv6_bool": false,
+    "policy:FilterNonIP_bool": false,
+    "policy:NoIPv6DefaultRouterInRA_bool": false,
+    "policy:NoIPv6DefaultRouterInRAWhenIPv6_bool": false,
+    "policy:VLanId_u32": 0,
+    "policy:Ver3_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)The group name
Realname_utfstring (UTF8)Optional real name (full name) of the group, allow using any Unicode characters
Note_utfstring (UTF8)Optional, specify a description of the group
Recv.BroadcastBytes_u64number (uint64)Number of broadcast packets (Recv)
Recv.BroadcastCount_u64number (uint64)Broadcast bytes (Recv)
Recv.UnicastBytes_u64number (uint64)Unicast count (Recv)
Recv.UnicastCount_u64number (uint64)Unicast bytes (Recv)
Send.BroadcastBytes_u64number (uint64)Number of broadcast packets (Send)
Send.BroadcastCount_u64number (uint64)Broadcast bytes (Send)
Send.UnicastBytes_u64number (uint64)Unicast bytes (Send)
Send.UnicastCount_u64number (uint64)Unicast bytes (Send)
UsePolicy_boolbooleanThe flag whether to use security policy
policy:Access_boolbooleanSecurity policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
policy:DHCPFilter_boolbooleanSecurity policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPNoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv4). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv4 addresses to DHCP clients.
policy:DHCPForce_boolbooleanSecurity policy: Enforce DHCP Allocated IP Addresses (IPv4). Computers in sessions that have this policy setting will only be able to use IPv4 addresses allocated by a DHCP server on the virtual network side.
policy:NoBridge_boolbooleanSecurity policy: Deny Bridge Operation. Bridge-mode connections are denied for user sessions that have this policy setting. Even in cases when the Ethernet Bridge is configured in the client side, communication will not be possible.
policy:NoRouting_boolbooleanSecurity policy: Deny Routing Operation (IPv4). IPv4 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckMac_boolbooleanSecurity policy: Deny MAC Addresses Duplication. The use of duplicating MAC addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:CheckIP_boolbooleanSecurity policy: Deny IP Address Duplication (IPv4). The use of duplicating IPv4 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:ArpDhcpOnly_boolbooleanSecurity policy: Deny Non-ARP / Non-DHCP / Non-ICMPv6 broadcasts. The sending or receiving of broadcast packets that are not ARP protocol, DHCP protocol, nor ICMPv6 on the virtual network will not be allowed for sessions with this policy setting.
policy:PrivacyFilter_boolbooleanSecurity policy: Privacy Filter Mode. All direct communication between sessions with the privacy filter mode policy setting will be filtered.
policy:NoServer_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv4). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv4.
policy:NoBroadcastLimiter_boolbooleanSecurity policy: Unlimited Number of Broadcasts. If a computer of a session with this policy setting sends broadcast packets of a number unusually larger than what would be considered normal on the virtual network, there will be no automatic limiting.
policy:MonitorPort_boolbooleanSecurity policy: Allow Monitoring Mode. Users with this policy setting will be granted to connect to the Virtual Hub in Monitoring Mode. Sessions in Monitoring Mode are able to monitor (tap) all packets flowing through the Virtual Hub.
policy:MaxConnection_u32number (uint32)Security policy: Maximum Number of TCP Connections. For sessions with this policy setting, this sets the maximum number of physical TCP connections consists in a physical VPN session.
policy:TimeOut_u32number (uint32)Security policy: Time-out Period. For sessions with this policy setting, this sets, in seconds, the time-out period to wait before disconnecting a session when communication trouble occurs between the VPN Client / VPN Server.
policy:MaxMac_u32number (uint32)Security policy: Maximum Number of MAC Addresses. For sessions with this policy setting, this limits the number of MAC addresses per session.
policy:MaxIP_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv4). For sessions with this policy setting, this specifies the number of IPv4 addresses that can be registered for a single session.
policy:MaxUpload_u32number (uint32)Security policy: Upload Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the inwards direction from outside to inside the Virtual Hub.
policy:MaxDownload_u32number (uint32)Security policy: Download Bandwidth. For sessions with this policy setting, this limits the traffic bandwidth that is in the outwards direction from inside the Virtual Hub to outside the Virtual Hub.
policy:FixPassword_boolbooleanSecurity policy: Deny Changing Password. The users which use password authentication with this policy setting are not allowed to change their own password from the VPN Client Manager or similar.
policy:MultiLogins_u32number (uint32)Security policy: Maximum Number of Multiple Logins. Users with this policy setting are unable to have more than this number of concurrent logins. Bridge Mode sessions are not subjects to this policy.
policy:NoQoS_boolbooleanSecurity policy: Deny VoIP / QoS Function. Users with this security policy are unable to use VoIP / QoS functions in VPN connection sessions.
policy:RSandRAFilter_boolbooleanSecurity policy: Filter RS / RA Packets (IPv6). All ICMPv6 packets which the message-type is 133 (Router Solicitation) or 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, an IPv6 client will be unable to use IPv6 address prefix auto detection and IPv6 default gateway auto detection.
policy:RAFilter_boolbooleanSecurity policy: Filter RA Packets (IPv6). All ICMPv6 packets which the message-type is 134 (Router Advertisement) in sessions defined this policy will be filtered. As a result, a malicious users will be unable to spread illegal IPv6 prefix or default gateway advertisements on the network.
policy:DHCPv6Filter_boolbooleanSecurity policy: Filter DHCP Packets (IPv6). All IPv6 DHCP packets in sessions defined this policy will be filtered.
policy:DHCPv6NoServer_boolbooleanSecurity policy: Disallow DHCP Server Operation (IPv6). Computers connected to sessions that have this policy setting will not be allowed to become a DHCP server and distribute IPv6 addresses to DHCP clients.
policy:NoRoutingV6_boolbooleanSecurity policy: Deny Routing Operation (IPv6). IPv6 routing will be denied for sessions that have this policy setting. Even in the case where the IP router is operating on the user client side, communication will not be possible.
policy:CheckIPv6_boolbooleanSecurity policy: Deny IP Address Duplication (IPv6). The use of duplicating IPv6 addresses that are in use by computers of different sessions cannot be used by sessions with this policy setting.
policy:NoServerV6_boolbooleanSecurity policy: Deny Operation as TCP/IP Server (IPv6). Computers of sessions with this policy setting can't listen and accept TCP/IP connections in IPv6.
policy:MaxIPv6_u32number (uint32)Security policy: Maximum Number of IP Addresses (IPv6). For sessions with this policy setting, this specifies the number of IPv6 addresses that can be registered for a single session.
policy:NoSavePassword_boolbooleanSecurity policy: Disallow Password Save in VPN Client. For users with this policy setting, when the user is using standard password authentication, the user will be unable to save the password in VPN Client. The user will be required to input passwords for every time to connect a VPN. This will improve the security. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:AutoDisconnect_u32number (uint32)Security policy: VPN Client Automatic Disconnect. For users with this policy setting, a user's VPN session will be disconnected automatically after the specific period will elapse. In this case no automatic re-connection will be performed. This can prevent a lot of inactive VPN Sessions. If this policy is enabled, VPN Client Version 2.0 will be denied to access.
policy:FilterIPv4_boolbooleanSecurity policy: Filter All IPv4 Packets. All IPv4 and ARP packets in sessions defined this policy will be filtered.
policy:FilterIPv6_boolbooleanSecurity policy: Filter All IPv6 Packets. All IPv6 packets in sessions defined this policy will be filtered.
policy:FilterNonIP_boolbooleanSecurity policy: Filter All Non-IP Packets. All non-IP packets in sessions defined this policy will be filtered. "Non-IP packet" mean a packet which is not IPv4, ARP nor IPv6. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets.
policy:NoIPv6DefaultRouterInRA_boolbooleanSecurity policy: No Default-Router on IPv6 RA. In all VPN Sessions defines this policy, any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:NoIPv6DefaultRouterInRAWhenIPv6_boolbooleanSecurity policy: No Default-Router on IPv6 RA (physical IPv6). In all VPN Sessions defines this policy (only when the physical communication protocol between VPN Client / VPN Bridge and VPN Server is IPv6), any IPv6 RA (Router Advertisement) packet with non-zero value in the router-lifetime will set to zero-value. This is effective to avoid the horrible behavior from the IPv6 routing confusion which is caused by the VPN client's attempts to use the remote-side IPv6 router as its local IPv6 router.
policy:VLanId_u32number (uint32)Security policy: VLAN ID (IEEE802.1Q). You can specify the VLAN ID on the security policy. All VPN Sessions defines this policy, all Ethernet packets toward the Virtual Hub from the user will be inserted a VLAN tag (IEEE 802.1Q) with the VLAN ID. The user can also receive only packets with a VLAN tag which has the same VLAN ID. (Receiving process removes the VLAN tag automatically.) Any Ethernet packets with any other VLAN IDs or non-VLAN packets will not be received. All VPN Sessions without this policy definition can send / receive any kinds of Ethernet packets regardless of VLAN tags, and VLAN tags are not inserted or removed automatically. Any tagged-VLAN packets via the Virtual Hub will be regarded as non-IP packets. Therefore, tagged-VLAN packets are not subjects for IPv4 / IPv6 security policies, access lists nor other IPv4 / IPv6 specific deep processing.
policy:Ver3_boolbooleanSecurity policy: Whether version 3.0 (must be true)
+
+

+

"DeleteGroup" RPC API - Delete User from Group

+

Description

+

Delete User from Group. Use this to delete a specified user from the group that is registered on the security account database of the currently managed Virtual Hub. By deleting a user from the group, that user becomes unassigned. To get the list of currently registered groups, use the EnumGroup API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteGroup",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)User or group name
+
+

+

"EnumGroup" RPC API - Get List of Groups

+

Description

+

Get List of Groups. Use this to get a list of groups that are registered on the security account database of the currently managed Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a member server on a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumGroup",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "GroupList": [
+      {
+        "Name_str": "name",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "NumUsers_u32": 0,
+        "DenyAccess_bool": false
+      },
+      {
+        "Name_str": "name",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "NumUsers_u32": 0,
+        "DenyAccess_bool": false
+      },
+      {
+        "Name_str": "name",
+        "Realname_utf": "realname",
+        "Note_utf": "note",
+        "NumUsers_u32": 0,
+        "DenyAccess_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
GroupListArray objectGroup list
Name_strstring (ASCII)User name
Realname_utfstring (UTF8)Real name
Note_utfstring (UTF8)Note
NumUsers_u32number (uint32)Number of users
DenyAccess_boolbooleanAccess denied
+
+

+

"EnumSession" RPC API - Get List of Connected VPN Sessions

+

Description

+

Get List of Connected VPN Sessions. Use this to get a list of the sessions connected to the Virtual Hub currently being managed. In the list of sessions, the following information will be obtained for each connection: Session Name, Session Site, User Name, Source Host Name, TCP Connection, Transfer Bytes and Transfer Packets. If the currently connected VPN Server is a cluster controller and the currently managed Virtual Hub is a static Virtual Hub, you can get an all-linked-together list of all sessions connected to that Virtual Hub on all cluster members. In all other cases, only the list of sessions that are actually connected to the currently managed VPN Server will be obtained.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumSession",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "SessionList": [
+      {
+        "Name_str": "name",
+        "RemoteSession_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "Username_str": "username",
+        "ClientIP_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "MaxNumTcp_u32": 0,
+        "CurrentNumTcp_u32": 0,
+        "PacketSize_u64": 0,
+        "PacketNum_u64": 0,
+        "LinkMode_bool": false,
+        "SecureNATMode_bool": false,
+        "BridgeMode_bool": false,
+        "Layer3Mode_bool": false,
+        "Client_BridgeMode_bool": false,
+        "Client_MonitorMode_bool": false,
+        "VLanId_u32": 0,
+        "UniqueId_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Name_str": "name",
+        "RemoteSession_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "Username_str": "username",
+        "ClientIP_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "MaxNumTcp_u32": 0,
+        "CurrentNumTcp_u32": 0,
+        "PacketSize_u64": 0,
+        "PacketNum_u64": 0,
+        "LinkMode_bool": false,
+        "SecureNATMode_bool": false,
+        "BridgeMode_bool": false,
+        "Layer3Mode_bool": false,
+        "Client_BridgeMode_bool": false,
+        "Client_MonitorMode_bool": false,
+        "VLanId_u32": 0,
+        "UniqueId_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "Name_str": "name",
+        "RemoteSession_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "Username_str": "username",
+        "ClientIP_ip": "192.168.0.1",
+        "Hostname_str": "hostname",
+        "MaxNumTcp_u32": 0,
+        "CurrentNumTcp_u32": 0,
+        "PacketSize_u64": 0,
+        "PacketNum_u64": 0,
+        "LinkMode_bool": false,
+        "SecureNATMode_bool": false,
+        "BridgeMode_bool": false,
+        "Layer3Mode_bool": false,
+        "Client_BridgeMode_bool": false,
+        "Client_MonitorMode_bool": false,
+        "VLanId_u32": 0,
+        "UniqueId_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
SessionListArray objectVPN sessions list
Name_strstring (ASCII)Session name
RemoteSession_boolbooleanRemote session
RemoteHostname_strstring (ASCII)Remote server name
Username_strstring (ASCII)User name
ClientIP_ipstring (IP address)IP address
Hostname_strstring (ASCII)Host name
MaxNumTcp_u32number (uint32)Maximum number of underlying TCP connections
CurrentNumTcp_u32number (uint32)Number of current underlying TCP connections
PacketSize_u64number (uint64)Packet size transmitted
PacketNum_u64number (uint64)Number of packets transmitted
LinkMode_boolbooleanIs a Cascade VPN session
SecureNATMode_boolbooleanIs a SecureNAT VPN session
BridgeMode_boolbooleanIs the VPN session for Local Bridge
Layer3Mode_boolbooleanIs a Layer-3 Switch VPN session
Client_BridgeMode_boolbooleanIs in Bridge Mode
Client_MonitorMode_boolbooleanIs in Monitor Mode
VLanId_u32number (uint32)VLAN ID
UniqueId_binstring (Base64 binary)Unique ID of the VPN Session
CreatedTime_dtDateCreation date and time
LastCommTime_dtDateLast communication date and time
+
+

+

"GetSessionStatus" RPC API - Get Session Status

+

Description

+

Get Session Status. Use this to specify a session currently connected to the currently managed Virtual Hub and get the session information. The session status includes the following: source host name and user name, version information, time information, number of TCP connections, communication parameters, session key, statistical information on data transferred, and other client and server information. To get the list of currently connected sessions, use the EnumSession API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSessionStatus",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name",
+    "Username_str": "username",
+    "RealUsername_str": "realusername",
+    "GroupName_str": "groupname",
+    "LinkMode_bool": false,
+    "Client_Ip_Address_ip": "192.168.0.1",
+    "SessionStatus_ClientHostName_str": "clienthostname",
+    "Active_bool": false,
+    "Connected_bool": false,
+    "SessionStatus_u32": 0,
+    "ServerName_str": "servername",
+    "ServerPort_u32": 0,
+    "ServerProductName_str": "serverproductname",
+    "ServerProductVer_u32": 0,
+    "ServerProductBuild_u32": 0,
+    "StartTime_dt": "2020-08-01T12:24:36.123",
+    "FirstConnectionEstablisiedTime_dt": "2020-08-01T12:24:36.123",
+    "CurrentConnectionEstablishTime_dt": "2020-08-01T12:24:36.123",
+    "NumConnectionsEatablished_u32": 0,
+    "HalfConnection_bool": false,
+    "QoS_bool": false,
+    "MaxTcpConnections_u32": 0,
+    "NumTcpConnections_u32": 0,
+    "NumTcpConnectionsUpload_u32": 0,
+    "NumTcpConnectionsDownload_u32": 0,
+    "UseEncrypt_bool": false,
+    "CipherName_str": "ciphername",
+    "UseCompress_bool": false,
+    "IsRUDPSession_bool": false,
+    "UnderlayProtocol_str": "underlayprotocol",
+    "IsUdpAccelerationEnabled_bool": false,
+    "IsUsingUdpAcceleration_bool": false,
+    "SessionName_str": "sessionname",
+    "ConnectionName_str": "connectionname",
+    "SessionKey_bin": "SGVsbG8gV29ybGQ=",
+    "TotalSendSize_u64": 0,
+    "TotalRecvSize_u64": 0,
+    "TotalSendSizeReal_u64": 0,
+    "TotalRecvSizeReal_u64": 0,
+    "IsBridgeMode_bool": false,
+    "IsMonitorMode_bool": false,
+    "VLanId_u32": 0,
+    "ClientProductName_str": "clientproductname",
+    "ClientProductVer_u32": 0,
+    "ClientProductBuild_u32": 0,
+    "ClientOsName_str": "clientosname",
+    "ClientOsVer_str": "clientosver",
+    "ClientOsProductId_str": "clientosproductid",
+    "ClientHostname_str": "clienthostname",
+    "UniqueId_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)VPN session name
Username_strstring (ASCII)User name
RealUsername_strstring (ASCII)Real user name which was used for the authentication
GroupName_strstring (ASCII)Group name
LinkMode_boolbooleanIs Cascade Session
Client_Ip_Address_ipstring (IP address)Client IP address
SessionStatus_ClientHostName_strstring (ASCII)Client host name
Active_boolbooleanOperation flag
Connected_boolbooleanConnected flag
SessionStatus_u32number (enum)State of the client session
Values:
0: Connecting
1: Negotiating
2: During user authentication
3: Connection complete
4: Wait to retry
5: Idle state
ServerName_strstring (ASCII)Server name
ServerPort_u32number (uint32)Port number of the server
ServerProductName_strstring (ASCII)Server product name
ServerProductVer_u32number (uint32)Server product version
ServerProductBuild_u32number (uint32)Server product build number
StartTime_dtDateConnection start time
FirstConnectionEstablisiedTime_dtDateConnection completion time of the first connection
CurrentConnectionEstablishTime_dtDateConnection completion time of this connection
NumConnectionsEatablished_u32number (uint32)Number of connections have been established so far
HalfConnection_boolbooleanHalf-connection
QoS_boolbooleanVoIP / QoS
MaxTcpConnections_u32number (uint32)Maximum number of the underlying TCP connections
NumTcpConnections_u32number (uint32)Number of current underlying TCP connections
NumTcpConnectionsUpload_u32number (uint32)Number of inbound underlying connections
NumTcpConnectionsDownload_u32number (uint32)Number of outbound underlying connections
UseEncrypt_boolbooleanUse of encryption
CipherName_strstring (ASCII)Cipher algorithm name
UseCompress_boolbooleanUse of compression
IsRUDPSession_boolbooleanIs R-UDP session
UnderlayProtocol_strstring (ASCII)Physical underlying communication protocol
IsUdpAccelerationEnabled_boolbooleanThe UDP acceleration is enabled
IsUsingUdpAcceleration_boolbooleanUsing the UDP acceleration function
SessionName_strstring (ASCII)VPN session name
ConnectionName_strstring (ASCII)Connection name
SessionKey_binstring (Base64 binary)Session key
TotalSendSize_u64number (uint64)Total transmitted data size
TotalRecvSize_u64number (uint64)Total received data size
TotalSendSizeReal_u64number (uint64)Total transmitted data size (no compression)
TotalRecvSizeReal_u64number (uint64)Total received data size (no compression)
IsBridgeMode_boolbooleanIs Bridge Mode
IsMonitorMode_boolbooleanIs Monitor mode
VLanId_u32number (uint32)VLAN ID
ClientProductName_strstring (ASCII)Client product name
ClientProductVer_u32number (uint32)Client version
ClientProductBuild_u32number (uint32)Client build number
ClientOsName_strstring (ASCII)Client OS name
ClientOsVer_strstring (ASCII)Client OS version
ClientOsProductId_strstring (ASCII)Client OS Product ID
ClientHostname_strstring (ASCII)Client host name
UniqueId_binstring (Base64 binary)Unique ID
+
+

+

"DeleteSession" RPC API - Disconnect Session

+

Description

+

Disconnect Session. Use this to specify a session currently connected to the currently managed Virtual Hub and forcefully disconnect that session using manager privileges. Note that when communication is disconnected by settings on the source client side and the automatically reconnect option is enabled, it is possible that the client will reconnect. To get the list of currently connected sessions, use the EnumSession API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteSession",
+  "params": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Name_strstring (ASCII)Session name
+
+

+

"EnumMacTable" RPC API - Get the MAC Address Table Database

+

Description

+

Get the MAC Address Table Database. Use this to get the MAC address table database that is held by the currently managed Virtual Hub. The MAC address table database is a table that the Virtual Hub requires to perform the action of switching Ethernet frames and the Virtual Hub decides the sorting destination session of each Ethernet frame based on the MAC address table database. The MAC address database is built by the Virtual Hub automatically analyzing the contents of the communication.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumMacTable",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "MacTable": [
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "VlanId_u32": 0
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "VlanId_u32": 0
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname",
+        "VlanId_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
MacTableArray objectMAC table
Key_u32number (uint32)Key ID
SessionName_strstring (ASCII)Session name
MacAddress_binstring (Base64 binary)MAC address
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateUpdating date
RemoteItem_boolbooleanRemote items
RemoteHostname_strstring (ASCII)Remote host name
VlanId_u32number (uint32)VLAN ID
+
+

+

"DeleteMacTable" RPC API - Delete MAC Address Table Entry

+

Description

+

Delete MAC Address Table Entry. Use this API to operate the MAC address table database held by the currently managed Virtual Hub and delete a specified MAC address table entry from the database. To get the contents of the current MAC address table database use the EnumMacTable API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteMacTable",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
+
+

+

"EnumIpTable" RPC API - Get the IP Address Table Database

+

Description

+

Get the IP Address Table Database. Use this to get the IP address table database that is held by the currently managed Virtual Hub. The IP address table database is a table that is automatically generated by analyzing the contents of communication so that the Virtual Hub can always know which session is using which IP address and it is frequently used by the engine that applies the Virtual Hub security policy. By specifying the session name you can get the IP address table entry that has been associated with that session.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumIpTable",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "IpTable": [
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "IpAddress_ip": "192.168.0.1",
+        "DhcpAllocated_bool": false,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname"
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "IpAddress_ip": "192.168.0.1",
+        "DhcpAllocated_bool": false,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname"
+      },
+      {
+        "Key_u32": 0,
+        "SessionName_str": "sessionname",
+        "IpAddress_ip": "192.168.0.1",
+        "DhcpAllocated_bool": false,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123",
+        "RemoteItem_bool": false,
+        "RemoteHostname_str": "remotehostname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
IpTableArray objectMAC table
Key_u32number (uint32)Key ID
SessionName_strstring (ASCII)Session name
IpAddress_ipstring (IP address)IP address
DhcpAllocated_boolbooleanAssigned by the DHCP
CreatedTime_dtDateCreation date and time
UpdatedTime_dtDateUpdating date
RemoteItem_boolbooleanRemote items
RemoteHostname_strstring (ASCII)Remote host name
+
+

+

"DeleteIpTable" RPC API - Delete IP Address Table Entry

+

Description

+

Delete IP Address Table Entry. Use this API to operate the IP address table database held by the currently managed Virtual Hub and delete a specified IP address table entry from the database. To get the contents of the current IP address table database use the EnumIpTable API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteIpTable",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
+
+

+

"SetKeep" RPC API - Set the Keep Alive Internet Connection Function

+

Description

+

Set the Keep Alive Internet Connection Function. Use this to set the destination host name etc. of the Keep Alive Internet Connection Function. For network connection environments where connections will automatically be disconnected where there are periods of no communication that are longer than a set period, by using the Keep Alive Internet Connection Function, it is possible to keep alive the Internet connection by sending packets to a nominated server on the Internet at set intervals. When using this API, you can specify the following: Host Name, Port Number, Packet Send Interval, and Protocol. Packets sent to keep alive the Internet connection will have random content and personal information that could identify a computer or user is not sent. You can use the SetKeep API to enable/disable the Keep Alive Internet Connection Function. To execute this API on a VPN Server or VPN Bridge, you must have administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetKeep",
+  "params": {
+    "UseKeepConnect_bool": false,
+    "KeepConnectHost_str": "keepconnecthost",
+    "KeepConnectPort_u32": 0,
+    "KeepConnectProtocol_u32": 0,
+    "KeepConnectInterval_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "UseKeepConnect_bool": false,
+    "KeepConnectHost_str": "keepconnecthost",
+    "KeepConnectPort_u32": 0,
+    "KeepConnectProtocol_u32": 0,
+    "KeepConnectInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
UseKeepConnect_boolbooleanThe flag to enable keep-alive to the Internet
KeepConnectHost_strstring (ASCII)Specify the host name or IP address of the destination
KeepConnectPort_u32number (uint32)Specify the port number of the destination
KeepConnectProtocol_u32number (enum)Protocol type
Values:
0: TCP
1: UDP
KeepConnectInterval_u32number (uint32)Interval Between Packets Sends (Seconds)
+
+

+

"GetKeep" RPC API - Get the Keep Alive Internet Connection Function

+

Description

+

Get the Keep Alive Internet Connection Function. Use this to get the current setting contents of the Keep Alive Internet Connection Function. In addition to the destination's Host Name, Port Number, Packet Send Interval and Protocol, you can obtain the current enabled/disabled status of the Keep Alive Internet Connection Function.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetKeep",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "UseKeepConnect_bool": false,
+    "KeepConnectHost_str": "keepconnecthost",
+    "KeepConnectPort_u32": 0,
+    "KeepConnectProtocol_u32": 0,
+    "KeepConnectInterval_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
UseKeepConnect_boolbooleanThe flag to enable keep-alive to the Internet
KeepConnectHost_strstring (ASCII)Specify the host name or IP address of the destination
KeepConnectPort_u32number (uint32)Specify the port number of the destination
KeepConnectProtocol_u32number (enum)Protocol type
Values:
0: TCP
1: UDP
KeepConnectInterval_u32number (uint32)Interval Between Packets Sends (Seconds)
+
+

+

"EnableSecureNAT" RPC API - Enable the Virtual NAT and DHCP Server Function (SecureNAT Function)

+

Description

+

Enable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to enable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub and begin its operation. Before executing this API, you must first check the setting contents of the current Virtual NAT function and DHCP Server function using the SetSecureNATOption API and GetSecureNATOption API. By enabling the SecureNAT function, you can virtually operate a NAT router (IP masquerade) and the DHCP Server function on a virtual network on the Virtual Hub. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrator's permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnableSecureNAT",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
+
+

+

"DisableSecureNAT" RPC API - Disable the Virtual NAT and DHCP Server Function (SecureNAT Function)

+

Description

+

Disable the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to disable the Virtual NAT and DHCP Server function (SecureNAT Function) on the currently managed Virtual Hub. By executing this API the Virtual NAT function immediately stops operating and the Virtual DHCP Server function deletes the DHCP lease database and stops the service. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DisableSecureNAT",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
+
+

+

"SetSecureNATOption" RPC API - Change Settings of SecureNAT Function

+

Description

+

Change Settings of SecureNAT Function. Use this to change and save the virtual host network interface settings, virtual NAT function settings and virtual DHCP server settings of the Virtual NAT and DHCP Server function (SecureNAT function) on the currently managed Virtual Hub. The SecureNAT function holds one virtual network adapter on the L2 segment inside the Virtual Hub and it has been assigned a MAC address and an IP address. By doing this, another host connected to the same L2 segment is able to communicate with the SecureNAT virtual host as if it is an actual IP host existing on the network. [Warning about SecureNAT Function] The SecureNAT function is recommended only for system administrators and people with a detailed knowledge of networks. If you use the SecureNAT function correctly, it is possible to achieve a safe form of remote access via a VPN. However when used in the wrong way, it can put the entire network in danger. Anyone who does not have a thorough knowledge of networks and anyone who does not have the network administrators permission must not enable the SecureNAT function. For a detailed explanation of the SecureNAT function, please refer to the VPN Server's manual and online documentation. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetSecureNATOption",
+  "params": {
+    "RpcHubName_str": "rpchubname",
+    "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+    "Ip_ip": "192.168.0.1",
+    "Mask_ip": "255.255.255.255",
+    "UseNat_bool": false,
+    "Mtu_u32": 0,
+    "NatTcpTimeout_u32": 0,
+    "NatUdpTimeout_u32": 0,
+    "UseDhcp_bool": false,
+    "DhcpLeaseIPStart_ip": "192.168.0.1",
+    "DhcpLeaseIPEnd_ip": "192.168.0.1",
+    "DhcpSubnetMask_ip": "255.255.255.255",
+    "DhcpExpireTimeSpan_u32": 0,
+    "DhcpGatewayAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress2_ip": "192.168.0.1",
+    "DhcpDomainName_str": "dhcpdomainname",
+    "SaveLog_bool": false,
+    "ApplyDhcpPushRoutes_bool": false,
+    "DhcpPushRoutes_str": "dhcppushroutes"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "RpcHubName_str": "rpchubname",
+    "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+    "Ip_ip": "192.168.0.1",
+    "Mask_ip": "255.255.255.255",
+    "UseNat_bool": false,
+    "Mtu_u32": 0,
+    "NatTcpTimeout_u32": 0,
+    "NatUdpTimeout_u32": 0,
+    "UseDhcp_bool": false,
+    "DhcpLeaseIPStart_ip": "192.168.0.1",
+    "DhcpLeaseIPEnd_ip": "192.168.0.1",
+    "DhcpSubnetMask_ip": "255.255.255.255",
+    "DhcpExpireTimeSpan_u32": 0,
+    "DhcpGatewayAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress2_ip": "192.168.0.1",
+    "DhcpDomainName_str": "dhcpdomainname",
+    "SaveLog_bool": false,
+    "ApplyDhcpPushRoutes_bool": false,
+    "DhcpPushRoutes_str": "dhcppushroutes"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
RpcHubName_strstring (ASCII)Target Virtual HUB name
MacAddress_binstring (Base64 binary)MAC address
Ip_ipstring (IP address)IP address
Mask_ipstring (IP address)Subnet mask
UseNat_boolbooleanUse flag of the Virtual NAT function
Mtu_u32number (uint32)MTU value (Standard: 1500)
NatTcpTimeout_u32number (uint32)NAT TCP timeout in seconds
NatUdpTimeout_u32number (uint32)NAT UDP timeout in seconds
UseDhcp_boolbooleanUsing flag of DHCP function
DhcpLeaseIPStart_ipstring (IP address)Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10)
DhcpLeaseIPEnd_ipstring (IP address)Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200)
DhcpSubnetMask_ipstring (IP address)Specify the subnet mask to be specified for the client. (Example: 255.255.255.0)
DhcpExpireTimeSpan_u32number (uint32)Specify the expiration date in second units for leasing an IP address to a client.
DhcpGatewayAddress_ipstring (IP address)Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway.
DhcpDnsServerAddress_ipstring (IP address)Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDnsServerAddress2_ipstring (IP address)Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDomainName_strstring (ASCII)Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name.
SaveLog_boolbooleanSpecify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting.
ApplyDhcpPushRoutes_boolbooleanThe flag to enable the DhcpPushRoutes_str field.
DhcpPushRoutes_strstring (ASCII)Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes.
+
+

+

"GetSecureNATOption" RPC API - Get Settings of SecureNAT Function

+

Description

+

Get Settings of SecureNAT Function. This API get the registered settings for the SecureNAT function which is set by the SetSecureNATOption API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSecureNATOption",
+  "params": {
+    "RpcHubName_str": "rpchubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "RpcHubName_str": "rpchubname",
+    "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+    "Ip_ip": "192.168.0.1",
+    "Mask_ip": "255.255.255.255",
+    "UseNat_bool": false,
+    "Mtu_u32": 0,
+    "NatTcpTimeout_u32": 0,
+    "NatUdpTimeout_u32": 0,
+    "UseDhcp_bool": false,
+    "DhcpLeaseIPStart_ip": "192.168.0.1",
+    "DhcpLeaseIPEnd_ip": "192.168.0.1",
+    "DhcpSubnetMask_ip": "255.255.255.255",
+    "DhcpExpireTimeSpan_u32": 0,
+    "DhcpGatewayAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress_ip": "192.168.0.1",
+    "DhcpDnsServerAddress2_ip": "192.168.0.1",
+    "DhcpDomainName_str": "dhcpdomainname",
+    "SaveLog_bool": false,
+    "ApplyDhcpPushRoutes_bool": false,
+    "DhcpPushRoutes_str": "dhcppushroutes"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
RpcHubName_strstring (ASCII)Target Virtual HUB name
MacAddress_binstring (Base64 binary)MAC address
Ip_ipstring (IP address)IP address
Mask_ipstring (IP address)Subnet mask
UseNat_boolbooleanUse flag of the Virtual NAT function
Mtu_u32number (uint32)MTU value (Standard: 1500)
NatTcpTimeout_u32number (uint32)NAT TCP timeout in seconds
NatUdpTimeout_u32number (uint32)NAT UDP timeout in seconds
UseDhcp_boolbooleanUsing flag of DHCP function
DhcpLeaseIPStart_ipstring (IP address)Specify the start point of the address band to be distributed to the client. (Example: 192.168.30.10)
DhcpLeaseIPEnd_ipstring (IP address)Specify the end point of the address band to be distributed to the client. (Example: 192.168.30.200)
DhcpSubnetMask_ipstring (IP address)Specify the subnet mask to be specified for the client. (Example: 255.255.255.0)
DhcpExpireTimeSpan_u32number (uint32)Specify the expiration date in second units for leasing an IP address to a client.
DhcpGatewayAddress_ipstring (IP address)Specify the IP address of the default gateway to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify 0 or none, then the client will not be notified of the default gateway.
DhcpDnsServerAddress_ipstring (IP address)Specify the IP address of the primary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDnsServerAddress2_ipstring (IP address)Specify the IP address of the secondary DNS Server to be notified to the client. You can specify a SecureNAT Virtual Host IP address for this when the SecureNAT Function's Virtual NAT Function has been enabled and is being used also. If you specify empty, then the client will not be notified of the DNS Server address.
DhcpDomainName_strstring (ASCII)Specify the domain name to be notified to the client. If you specify none, then the client will not be notified of the domain name.
SaveLog_boolbooleanSpecify whether or not to save the Virtual DHCP Server operation in the Virtual Hub security log. Specify true to save it. This value is interlinked with the Virtual NAT Function log save setting.
ApplyDhcpPushRoutes_boolbooleanThe flag to enable the DhcpPushRoutes_str field.
DhcpPushRoutes_strstring (ASCII)Specify the static routing table to push. Example: "192.168.5.0/255.255.255.0/192.168.4.254, 10.0.0.0/255.0.0.0/192.168.4.253" Split multiple entries (maximum: 64 entries) by comma or space characters. Each entry must be specified in the "IP network address/subnet mask/gateway IP address" format. This Virtual DHCP Server can push the classless static routes (RFC 3442) with DHCP reply messages to VPN clients. Whether or not a VPN client can recognize the classless static routes (RFC 3442) depends on the target VPN client software. SoftEther VPN Client and OpenVPN Client are supporting the classless static routes. On L2TP/IPsec and MS-SSTP protocols, the compatibility depends on the implementation of the client software. You can realize the split tunneling if you clear the default gateway field on the Virtual DHCP Server options. On the client side, L2TP/IPsec and MS-SSTP clients need to be configured not to set up the default gateway for the split tunneling usage. You can also push the classless static routes (RFC 3442) by your existing external DHCP server. In that case, disable the Virtual DHCP Server function on SecureNAT, and you need not to set up the classless routes on this API. See the RFC 3442 to understand the classless routes.
+
+

+

"EnumNAT" RPC API - Get Virtual NAT Function Session Table of SecureNAT Function

+

Description

+

Get Virtual NAT Function Session Table of SecureNAT Function. Use this to get the table of TCP and UDP sessions currently communicating via the Virtual NAT (NAT table) in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumNAT",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "NatTable": [
+      {
+        "Id_u32": 0,
+        "Protocol_u32": 0,
+        "SrcIp_ip": "192.168.0.1",
+        "SrcHost_str": "srchost",
+        "SrcPort_u32": 0,
+        "DestIp_ip": "192.168.0.1",
+        "DestHost_str": "desthost",
+        "DestPort_u32": 0,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "SendSize_u64": 0,
+        "RecvSize_u64": 0,
+        "TcpStatus_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Protocol_u32": 0,
+        "SrcIp_ip": "192.168.0.1",
+        "SrcHost_str": "srchost",
+        "SrcPort_u32": 0,
+        "DestIp_ip": "192.168.0.1",
+        "DestHost_str": "desthost",
+        "DestPort_u32": 0,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "SendSize_u64": 0,
+        "RecvSize_u64": 0,
+        "TcpStatus_u32": 0
+      },
+      {
+        "Id_u32": 0,
+        "Protocol_u32": 0,
+        "SrcIp_ip": "192.168.0.1",
+        "SrcHost_str": "srchost",
+        "SrcPort_u32": 0,
+        "DestIp_ip": "192.168.0.1",
+        "DestHost_str": "desthost",
+        "DestPort_u32": 0,
+        "CreatedTime_dt": "2020-08-01T12:24:36.123",
+        "LastCommTime_dt": "2020-08-01T12:24:36.123",
+        "SendSize_u64": 0,
+        "RecvSize_u64": 0,
+        "TcpStatus_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual Hub Name
NatTableArray objectNAT item
Id_u32number (uint32)ID
Protocol_u32number (enum)Protocol
Values:
0: TCP
1: UDP
2: DNS
3: ICMP
SrcIp_ipstring (IP address)Source IP address
SrcHost_strstring (ASCII)Source host name
SrcPort_u32number (uint32)Source port number
DestIp_ipstring (IP address)Destination IP address
DestHost_strstring (ASCII)Destination host name
DestPort_u32number (uint32)Destination port number
CreatedTime_dtDateConnection time
LastCommTime_dtDateLast communication time
SendSize_u64number (uint64)Transmission size
RecvSize_u64number (uint64)Receive size
TcpStatus_u32number (enum)TCP state
Values:
0: Connecting
1: Send the RST (Connection failure or disconnected)
2: Connection complete
3: Connection established
4: Wait for socket disconnection
+
+

+

"EnumDHCP" RPC API - Get Virtual DHCP Server Function Lease Table of SecureNAT Function

+

Description

+

Get Virtual DHCP Server Function Lease Table of SecureNAT Function. Use this to get the lease table of IP addresses, held by the Virtual DHCP Server, that are assigned to clients in cases when the Virtual NAT function is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumDHCP",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "DhcpTable": [
+      {
+        "Id_u32": 0,
+        "LeasedTime_dt": "2020-08-01T12:24:36.123",
+        "ExpireTime_dt": "2020-08-01T12:24:36.123",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "IpAddress_ip": "192.168.0.1",
+        "Mask_u32": 0,
+        "Hostname_str": "hostname"
+      },
+      {
+        "Id_u32": 0,
+        "LeasedTime_dt": "2020-08-01T12:24:36.123",
+        "ExpireTime_dt": "2020-08-01T12:24:36.123",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "IpAddress_ip": "192.168.0.1",
+        "Mask_u32": 0,
+        "Hostname_str": "hostname"
+      },
+      {
+        "Id_u32": 0,
+        "LeasedTime_dt": "2020-08-01T12:24:36.123",
+        "ExpireTime_dt": "2020-08-01T12:24:36.123",
+        "MacAddress_bin": "SGVsbG8gV29ybGQ=",
+        "IpAddress_ip": "192.168.0.1",
+        "Mask_u32": 0,
+        "Hostname_str": "hostname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual Hub Name
DhcpTableArray objectDHCP Item
Id_u32number (uint32)ID
LeasedTime_dtDateLease time
ExpireTime_dtDateExpiration date
MacAddress_binstring (Base64 binary)MAC address
IpAddress_ipstring (IP address)IP address
Mask_u32number (uint32)Subnet mask
Hostname_strstring (ASCII)Host name
+
+

+

"GetSecureNATStatus" RPC API - Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function)

+

Description

+

Get the Operating Status of the Virtual NAT and DHCP Server Function (SecureNAT Function). Use this to get the operating status of the Virtual NAT and DHCP Server function (SecureNAT Function) when it is operating on the currently managed Virtual Hub. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSecureNATStatus",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "NumTcpSessions_u32": 0,
+    "NumUdpSessions_u32": 0,
+    "NumIcmpSessions_u32": 0,
+    "NumDnsSessions_u32": 0,
+    "NumDhcpClients_u32": 0,
+    "IsKernelMode_bool": false,
+    "IsRawIpMode_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual Hub Name
NumTcpSessions_u32number (uint32)Number of TCP sessions
NumUdpSessions_u32number (uint32)Ntmber of UDP sessions
NumIcmpSessions_u32number (uint32)Nymber of ICMP sessions
NumDnsSessions_u32number (uint32)Number of DNS sessions
NumDhcpClients_u32number (uint32)Number of DHCP clients
IsKernelMode_boolbooleanWhether the NAT is operating in the Kernel Mode
IsRawIpMode_boolbooleanWhether the NAT is operating in the Raw IP Mode
+
+

+

"EnumEthernet" RPC API - Get List of Network Adapters Usable as Local Bridge

+

Description

+

Get List of Network Adapters Usable as Local Bridge. Use this to get a list of Ethernet devices (network adapters) that can be used as a bridge destination device as part of a Local Bridge connection. If possible, network connection name is displayed. You can use a device displayed here by using the AddLocalBridge API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumEthernet",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "EthList": [
+      {
+        "DeviceName_str": "devicename",
+        "NetworkConnectionName_utf": "networkconnectionname"
+      },
+      {
+        "DeviceName_str": "devicename",
+        "NetworkConnectionName_utf": "networkconnectionname"
+      },
+      {
+        "DeviceName_str": "devicename",
+        "NetworkConnectionName_utf": "networkconnectionname"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EthListArray objectEthernet Network Adapters list
DeviceName_strstring (ASCII)Device name
NetworkConnectionName_utfstring (UTF8)Network connection name (description)
+
+

+

"AddLocalBridge" RPC API - Create Local Bridge Connection

+

Description

+

Create Local Bridge Connection. Use this to create a new Local Bridge connection on the VPN Server. By using a Local Bridge, you can configure a Layer 2 bridge connection between a Virtual Hub operating on this VPN server and a physical Ethernet Device (Network Adapter). You can create a tap device (virtual network interface) on the system and connect a bridge between Virtual Hubs (the tap device is only supported by Linux versions). It is possible to establish a bridge to an operating network adapter of your choice for the bridge destination Ethernet device (network adapter), but in high load environments, we recommend you prepare a network adapter dedicated to serve as a bridge. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddLocalBridge",
+  "params": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb",
+    "Online_bool": false,
+    "Active_bool": false,
+    "TapMode_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DeviceName_strstring (ASCII)Physical Ethernet device name
HubNameLB_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
Active_boolbooleanRunning flag
TapMode_boolbooleanSpecify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions).
+
+

+

"DeleteLocalBridge" RPC API - Delete Local Bridge Connection

+

Description

+

Delete Local Bridge Connection. Use this to delete an existing Local Bridge connection. To get a list of current Local Bridge connections use the EnumLocalBridge API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteLocalBridge",
+  "params": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "DeviceName_str": "devicename",
+    "HubNameLB_str": "hubnamelb",
+    "Online_bool": false,
+    "Active_bool": false,
+    "TapMode_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DeviceName_strstring (ASCII)Physical Ethernet device name
HubNameLB_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
Active_boolbooleanRunning flag
TapMode_boolbooleanSpecify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions).
+
+

+

"EnumLocalBridge" RPC API - Get List of Local Bridge Connection

+

Description

+

Get List of Local Bridge Connection. Use this to get a list of the currently defined Local Bridge connections. You can get the Local Bridge connection Virtual Hub name and the bridge destination Ethernet device (network adapter) name or tap device name, as well as the operating status.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumLocalBridge",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "LocalBridgeList": [
+      {
+        "DeviceName_str": "devicename",
+        "HubNameLB_str": "hubnamelb",
+        "Online_bool": false,
+        "Active_bool": false,
+        "TapMode_bool": false
+      },
+      {
+        "DeviceName_str": "devicename",
+        "HubNameLB_str": "hubnamelb",
+        "Online_bool": false,
+        "Active_bool": false,
+        "TapMode_bool": false
+      },
+      {
+        "DeviceName_str": "devicename",
+        "HubNameLB_str": "hubnamelb",
+        "Online_bool": false,
+        "Active_bool": false,
+        "TapMode_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
LocalBridgeListArray objectLocal Bridge list
DeviceName_strstring (ASCII)Physical Ethernet device name
HubNameLB_strstring (ASCII)The Virtual Hub name
Online_boolbooleanOnline flag
Active_boolbooleanRunning flag
TapMode_boolbooleanSpecify true if you are using a tap device rather than a network adapter for the bridge destination (only supported for Linux versions).
+
+

+

"GetBridgeSupport" RPC API - Get whether the localbridge function is supported on the current system

+

Description

+

Get whether the localbridge function is supported on the current system.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetBridgeSupport",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IsBridgeSupportedOs_bool": false,
+    "IsWinPcapNeeded_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IsBridgeSupportedOs_boolbooleanWhether the OS supports the Local Bridge function
IsWinPcapNeeded_boolbooleanWhether WinPcap is necessary to install
+
+

+

"RebootServer" RPC API - Reboot VPN Server Service

+

Description

+

Reboot VPN Server Service. Use this to restart the VPN Server service. When you restart the VPN Server, all currently connected sessions and TCP connections will be disconnected and no new connections will be accepted until the restart process has completed. By using this API, only the VPN Server service program will be restarted and the physical computer that VPN Server is operating on does not restart. This management session will also be disconnected, so you will need to reconnect to continue management. Also, by specifying the "IntValue" parameter to "1", the contents of the configuration file (.config) held by the current VPN Server will be initialized. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "RebootServer",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"GetCaps" RPC API - Get List of Server Functions / Capability

+

Description

+

Get List of Server Functions / Capability. Use this get a list of functions and capability of the VPN Server currently connected and being managed. The function and capability of VPN Servers are different depending on the operating VPN server's edition and version. Using this API, you can find out the capability of the target VPN Server and report it.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetCaps",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "CapsList": [
+      {
+        "CapsName_str": "capsname",
+        "CapsValue_u32": 0,
+        "CapsDescrption_utf": "capsdescrption"
+      },
+      {
+        "CapsName_str": "capsname",
+        "CapsValue_u32": 0,
+        "CapsDescrption_utf": "capsdescrption"
+      },
+      {
+        "CapsName_str": "capsname",
+        "CapsValue_u32": 0,
+        "CapsDescrption_utf": "capsdescrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
CapsListArray objectCaps list of the VPN Server
CapsName_strstring (ASCII)Name
CapsValue_u32number (uint32)Value
CapsDescrption_utfstring (UTF8)Descrption
+
+

+

"GetConfig" RPC API - Get the current configuration of the VPN Server

+

Description

+

Get the current configuration of the VPN Server. Use this to get a text file (.config file) that contains the current configuration contents of the VPN server. You can get the status on the VPN Server at the instant this API is executed. You can edit the configuration file by using a regular text editor. To write an edited configuration to the VPN Server, use the SetConfig API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetConfig",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "FileName_str": "filename",
+    "FileData_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FileName_strstring (ASCII)File name (valid only for returning from the server)
FileData_binstring (Base64 binary)File data
+
+

+

"SetConfig" RPC API - Write Configuration File to VPN Server

+

Description

+

Write Configuration File to VPN Server. Use this to write the configuration file to the VPN Server. By executing this API, the contents of the specified configuration file will be applied to the VPN Server and the VPN Server program will automatically restart and upon restart, operate according to the new configuration contents. Because it is difficult for an administrator to write all the contents of a configuration file, we recommend you use the GetConfig API to get the current contents of the VPN Server configuration and save it to file. You can then edit these contents in a regular text editor and then use the SetConfig API to rewrite the contents to the VPN Server. This API is for people with a detailed knowledge of the VPN Server and if an incorrectly configured configuration file is written to the VPN Server, it not only could cause errors, it could also result in the lost of the current setting data. Take special care when carrying out this action. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetConfig",
+  "params": {
+    "FileData_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "FileName_str": "filename",
+    "FileData_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FileName_strstring (ASCII)File name (valid only for returning from the server)
FileData_binstring (Base64 binary)File data
+
+

+

"GetDefaultHubAdminOptions" RPC API - Get Virtual Hub Administration Option default values

+

Description

+

Get Virtual Hub Administration Option default values.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetDefaultHubAdminOptions",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"GetHubAdminOptions" RPC API - Get List of Virtual Hub Administration Options

+

Description

+

Get List of Virtual Hub Administration Options. Use this to get a list of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubAdminOptions",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"SetHubAdminOptions" RPC API - Set Values of Virtual Hub Administration Options

+

Description

+

Set Values of Virtual Hub Administration Options. Use this to change the values of Virtual Hub administration options that are set on the currently managed Virtual Hub. The purpose of the Virtual Hub administration options is for the VPN Server Administrator to set limits for the setting ranges when the administration of the Virtual Hub is to be trusted to each Virtual Hub administrator. Only an administrator with administration privileges for this entire VPN Server is able to add, edit and delete the Virtual Hub administration options. The Virtual Hub administrators are unable to make changes to the administration options, however they are able to view them. There is an exception however. If allow_hub_admin_change_option is set to "1", even Virtual Hub administrators are able to edit the administration options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubAdminOptions",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"GetHubExtOptions" RPC API - Get List of Virtual Hub Extended Options

+

Description

+

Get List of Virtual Hub Extended Options. Use this to get a Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubExtOptions",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"SetHubExtOptions" RPC API - Set a Value of Virtual Hub Extended Options

+

Description

+

Set a Value of Virtual Hub Extended Options. Use this to set a value in the Virtual Hub Extended Options List that is set on the currently managed Virtual Hub. Virtual Hub Extended Option enables you to configure more detail settings of the Virtual Hub. By default, both VPN Server's global administrators and individual Virtual Hub's administrators can modify the Virtual Hub Extended Options. However, if the deny_hub_admin_change_ext_option is set to 1 on the Virtual Hub Admin Options, the individual Virtual Hub's administrators cannot modify the Virtual Hub Extended Options. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster member.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubExtOptions",
+  "params": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "AdminOptionList": [
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      },
+      {
+        "Name_str": "name",
+        "Value_u32": 0,
+        "Descrption_utf": "descrption"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)Virtual HUB name
AdminOptionListArray objectList data
Name_strstring (ASCII)Name
Value_u32number (uint32)Data
Descrption_utfstring (UTF8)Descrption
+
+

+

"AddL3Switch" RPC API - Define New Virtual Layer 3 Switch

+

Description

+

Define New Virtual Layer 3 Switch. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"DelL3Switch" RPC API - Delete Virtual Layer 3 Switch

+

Description

+

Delete Virtual Layer 3 Switch. Use this to delete an existing Virtual Layer 3 Switch that is defined on the VPN Server. When the specified Virtual Layer 3 Switch is operating, it will be automatically deleted after operation stops. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"EnumL3Switch" RPC API - Get List of Virtual Layer 3 Switches

+

Description

+

Get List of Virtual Layer 3 Switches. Use this to define a new Virtual Layer 3 Switch on the VPN Server. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumL3Switch",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "L3SWList": [
+      {
+        "Name_str": "name",
+        "NumInterfaces_u32": 0,
+        "NumTables_u32": 0,
+        "Active_bool": false,
+        "Online_bool": false
+      },
+      {
+        "Name_str": "name",
+        "NumInterfaces_u32": 0,
+        "NumTables_u32": 0,
+        "Active_bool": false,
+        "Online_bool": false
+      },
+      {
+        "Name_str": "name",
+        "NumInterfaces_u32": 0,
+        "NumTables_u32": 0,
+        "Active_bool": false,
+        "Online_bool": false
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
L3SWListArray objectLayer-3 switch list
Name_strstring (ASCII)Name of the layer-3 switch
NumInterfaces_u32number (uint32)Number of layer-3 switch virtual interfaces
NumTables_u32number (uint32)Number of routing tables
Active_boolbooleanActivated flag
Online_boolbooleanOnline flag
+
+

+

"StartL3Switch" RPC API - Start Virtual Layer 3 Switch Operation

+

Description

+

Start Virtual Layer 3 Switch Operation. Use this to start the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently stopped. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. [Explanation on Virtual Layer 3 Switch Function] You can define Virtual Layer 3 Switches between multiple Virtual Hubs operating on this VPN Server and configure routing between different IP networks. [Caution about the Virtual Layer 3 Switch Function] The Virtual Layer 3 Switch functions are provided for network administrators and other people who know a lot about networks and IP routing. If you are using the regular VPN functions, you do not need to use the Virtual Layer 3 Switch functions. If the Virtual Layer 3 Switch functions are to be used, the person who configures them must have sufficient knowledge of IP routing and be perfectly capable of not impacting the network.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "StartL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"StopL3Switch" RPC API - Stop Virtual Layer 3 Switch Operation

+

Description

+

Stop Virtual Layer 3 Switch Operation. Use this to stop the operation of an existing Virtual Layer 3 Switch defined on the VPN Server whose operation is currently operating. To get a list of existing Virtual Layer 3 Switches, use the EnumL3Switch API. To call this API, you must have VPN Server administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "StopL3Switch",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 Switch name
+
+

+

"AddL3If" RPC API - Add Virtual Interface to Virtual Layer 3 Switch

+

Description

+

Add Virtual Interface to Virtual Layer 3 Switch. Use this to add to a specified Virtual Layer 3 Switch, a virtual interface that connects to a Virtual Hub operating on the same VPN Server. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. You must define the IP network space that the virtual interface belongs to and the IP address of the interface itself. Also, you must specify the name of the Virtual Hub that the interface will connect to. You can specify a Virtual Hub that currently doesn't exist for the Virtual Hub name. The virtual interface must have one IP address in the Virtual Hub. You also must specify the subnet mask of an IP network that the IP address belongs to. Routing via the Virtual Layer 3 Switches of IP spaces of multiple virtual Hubs operates based on the IP address is specified here. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddL3If",
+  "params": {
+    "Name_str": "name",
+    "HubName_str": "hubname",
+    "IpAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "HubName_str": "hubname",
+    "IpAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
HubName_strstring (ASCII)Virtual HUB name
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask
+
+

+

"DelL3If" RPC API - Delete Virtual Interface of Virtual Layer 3 Switch

+

Description

+

Delete Virtual Interface of Virtual Layer 3 Switch. Use this to delete a virtual interface already defined in the specified Virtual Layer 3 Switch. You can get a list of the virtual interfaces currently defined, by using the EnumL3If API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelL3If",
+  "params": {
+    "Name_str": "name",
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "HubName_str": "hubname",
+    "IpAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
HubName_strstring (ASCII)Virtual HUB name
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask
+
+

+

"EnumL3If" RPC API - Get List of Interfaces Registered on the Virtual Layer 3 Switch

+

Description

+

Get List of Interfaces Registered on the Virtual Layer 3 Switch. Use this to get a list of virtual interfaces when virtual interfaces have been defined on a specified Virtual Layer 3 Switch. You can define multiple virtual interfaces and routing tables for a single Virtual Layer 3 Switch. A virtual interface is associated to a virtual Hub and operates as a single IP host on the Virtual Hub when that Virtual Hub is operating. When multiple virtual interfaces that respectively belong to a different IP network of a different Virtual Hub are defined, IP routing will be automatically performed between these interfaces. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumL3If",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "L3IFList": [
+      {
+        "Name_str": "name",
+        "HubName_str": "hubname",
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Name_str": "name",
+        "HubName_str": "hubname",
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Name_str": "name",
+        "HubName_str": "hubname",
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)Layer-3 switch name
L3IFListArray objectLayer-3 interface list
Name_strstring (ASCII)L3 switch name
HubName_strstring (ASCII)Virtual HUB name
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask
+
+

+

"AddL3Table" RPC API - Add Routing Table Entry for Virtual Layer 3 Switch

+

Description

+

Add Routing Table Entry for Virtual Layer 3 Switch. Here you can add a new routing table entry to the routing table of the specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference the routing table and execute routing. You must specify the contents of the routing table entry to be added to the Virtual Layer 3 Switch. You must specify any IP address that belongs to the same IP network in the virtual interface of this Virtual Layer 3 Switch as the gateway address. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddL3Table",
+  "params": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
NetworkAddress_ipstring (IP address)Network address
SubnetMask_ipstring (IP address)Subnet mask
GatewayAddress_ipstring (IP address)Gateway address
Metric_u32number (uint32)Metric
+
+

+

"DelL3Table" RPC API - Delete Routing Table Entry of Virtual Layer 3 Switch

+

Description

+

Delete Routing Table Entry of Virtual Layer 3 Switch. Use this to delete a routing table entry that is defined in the specified Virtual Layer 3 Switch. You can get a list of the already defined routing table entries by using the EnumL3Table API. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge. To execute this API, the target Virtual Layer 3 Switch must be stopped. If it is not stopped, first use the StopL3Switch API to stop it and then execute this API.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelL3Table",
+  "params": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "NetworkAddress_ip": "192.168.0.1",
+    "SubnetMask_ip": "255.255.255.255",
+    "GatewayAddress_ip": "192.168.0.1",
+    "Metric_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
NetworkAddress_ipstring (IP address)Network address
SubnetMask_ipstring (IP address)Subnet mask
GatewayAddress_ipstring (IP address)Gateway address
Metric_u32number (uint32)Metric
+
+

+

"EnumL3Table" RPC API - Get List of Routing Tables of Virtual Layer 3 Switch

+

Description

+

Get List of Routing Tables of Virtual Layer 3 Switch. Use this to get a list of routing tables when routing tables have been defined on a specified Virtual Layer 3 Switch. If the destination IP address of the IP packet does not belong to any IP network that belongs to a virtual interface, the IP routing engine of the Virtual Layer 3 Switch will reference this routing table and execute routing. To call this API, you must have VPN Server administrator privileges. Also, this API does not operate on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumL3Table",
+  "params": {
+    "Name_str": "name"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Name_str": "name",
+    "L3Table": [
+      {
+        "Name_str": "name",
+        "NetworkAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255",
+        "GatewayAddress_ip": "192.168.0.1",
+        "Metric_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "NetworkAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255",
+        "GatewayAddress_ip": "192.168.0.1",
+        "Metric_u32": 0
+      },
+      {
+        "Name_str": "name",
+        "NetworkAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255",
+        "GatewayAddress_ip": "192.168.0.1",
+        "Metric_u32": 0
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Name_strstring (ASCII)L3 switch name
L3TableArray objectRouting table item list
Name_strstring (ASCII)L3 switch name
NetworkAddress_ipstring (IP address)Network address
SubnetMask_ipstring (IP address)Subnet mask
GatewayAddress_ipstring (IP address)Gateway address
Metric_u32number (uint32)Metric
+
+

+

"EnumCrl" RPC API - Get List of Certificates Revocation List

+

Description

+

Get List of Certificates Revocation List. Use this to get a Certificates Revocation List that is set on the currently managed Virtual Hub. By registering certificates in the Certificates Revocation List, the clients who provide these certificates will be unable to connect to this Virtual Hub using certificate authentication mode. Normally with this function, in cases where the security of a private key has been compromised or where a person holding a certificate has been stripped of their privileges, by registering that certificate as invalid on the Virtual Hub, it is possible to deny user authentication when that certificate is used by a client to connect to the Virtual Hub. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumCrl",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "CRLList": [
+      {
+        "Key_u32": 0,
+        "CrlInfo_utf": "crlinfo"
+      },
+      {
+        "Key_u32": 0,
+        "CrlInfo_utf": "crlinfo"
+      },
+      {
+        "Key_u32": 0,
+        "CrlInfo_utf": "crlinfo"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
CRLListArray objectCRL list
Key_u32number (uint32)Key ID
CrlInfo_utfstring (UTF8)The contents of the CRL item
+
+

+

"AddCrl" RPC API - Add a Revoked Certificate

+

Description

+

Add a Revoked Certificate. Use this to add a new revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddCrl",
+  "params": {
+    "HubName_str": "hubname",
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"DelCrl" RPC API - Delete a Revoked Certificate

+

Description

+

Delete a Revoked Certificate. Use this to specify and delete a revoked certificate definition from the certificate revocation list that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DelCrl",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"GetCrl" RPC API - Get a Revoked Certificate

+

Description

+

Get a Revoked Certificate. Use this to specify and get the contents of a revoked certificate definition from the Certificates Revocation List that is set on the currently managed Virtual Hub. To get the list of currently registered revoked certificate definitions, use the EnumCrl API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetCrl",
+  "params": {
+    "HubName_str": "hubname",
+    "Key_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"SetCrl" RPC API - Change Existing CRL (Certificate Revocation List) Entry

+

Description

+

Change Existing CRL (Certificate Revocation List) Entry. Use this to alter an existing revoked certificate definition in the Certificate Revocation List that is set on the currently managed Virtual Hub. Specify the contents to be registered in the Certificate Revocation List by using the parameters of this API. When a user connects to a Virtual Hub in certificate authentication mode and that certificate matches 1 or more of the contents registered in the certificates revocation list, the user is denied connection. A certificate that matches all the conditions that are defined by the parameters specified by this API will be judged as invalid. The items that can be set are as follows: Name (CN), Organization (O), Organization Unit (OU), Country (C), State (ST), Locale (L), Serial Number (hexadecimal), MD5 Digest Value (hexadecimal, 128 bit), and SHA-1 Digest Value (hexadecimal, 160 bit). For the specification of a digest value (hash value) a certificate is optionally specified depending on the circumstances. Normally when a MD5 or SHA-1 digest value is input, it is not necessary to input the other items. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetCrl",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Key_u32": 0,
+    "CommonName_utf": "commonname",
+    "Organization_utf": "organization",
+    "Unit_utf": "unit",
+    "Country_utf": "country",
+    "State_utf": "state",
+    "Local_utf": "local",
+    "Serial_bin": "SGVsbG8gV29ybGQ=",
+    "DigestMD5_bin": "SGVsbG8gV29ybGQ=",
+    "DigestSHA1_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Key_u32number (uint32)Key ID
CommonName_utfstring (UTF8)CN, optional
Organization_utfstring (UTF8)O, optional
Unit_utfstring (UTF8)OU, optional
Country_utfstring (UTF8)C, optional
State_utfstring (UTF8)ST, optional
Local_utfstring (UTF8)L, optional
Serial_binstring (Base64 binary)Serial, optional
DigestMD5_binstring (Base64 binary)MD5 Digest, optional
DigestSHA1_binstring (Base64 binary)SHA1 Digest, optional
+
+

+

"SetAcList" RPC API - Add Rule to Source IP Address Limit List

+

Description

+

Add Rule to Source IP Address Limit List. Use this to add a new rule to the Source IP Address Limit List that is set on the currently managed Virtual Hub. The items set here will be used to decide whether to allow or deny connection from a VPN Client when this client attempts connection to the Virtual Hub. You can specify a client IP address, or IP address or mask to match the rule as the contents of the rule item. By specifying an IP address only, there will only be one specified computer that will match the rule, but by specifying an IP net mask address or subnet mask address, all the computers in the range of that subnet will match the rule. You can specify the priority for the rule. You can specify an integer of 1 or greater for the priority and the smaller the number, the higher the priority. To get a list of the currently registered Source IP Address Limit List, use the GetAcList API. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetAcList",
+  "params": {
+    "HubName_str": "hubname",
+    "ACList": [
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "ACList": [
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
ACListArray objectSource IP Address Limit List
Id_u32number (uint32)ID
Priority_u32number (uint32)Priority
Deny_boolbooleanDeny access
Masked_boolbooleanSet true if you want to specify the SubnetMask_ip item.
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask, valid only if Masked_bool == true
+
+

+

"GetAcList" RPC API - Get List of Rule Items of Source IP Address Limit List

+

Description

+

Get List of Rule Items of Source IP Address Limit List. Use this to get a list of Source IP Address Limit List rules that is set on the currently managed Virtual Hub. You can allow or deny VPN connections to this Virtual Hub according to the client computer's source IP address. You can define multiple rules and set a priority for each rule. The search proceeds from the rule with the highest order or priority and based on the action of the rule that the IP address first matches, the connection from the client is either allowed or denied. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetAcList",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "ACList": [
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      },
+      {
+        "Id_u32": 0,
+        "Priority_u32": 0,
+        "Deny_bool": false,
+        "Masked_bool": false,
+        "IpAddress_ip": "192.168.0.1",
+        "SubnetMask_ip": "255.255.255.255"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
ACListArray objectSource IP Address Limit List
Id_u32number (uint32)ID
Priority_u32number (uint32)Priority
Deny_boolbooleanDeny access
Masked_boolbooleanSet true if you want to specify the SubnetMask_ip item.
IpAddress_ipstring (IP address)IP address
SubnetMask_ipstring (IP address)Subnet mask, valid only if Masked_bool == true
+
+

+

"EnumLogFile" RPC API - Get List of Log Files

+

Description

+

Get List of Log Files. Use this to display a list of log files outputted by the VPN Server that have been saved on the VPN Server computer. By specifying a log file file name displayed here and calling it using the ReadLogFile API you can download the contents of the log file. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumLogFile",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "LogFiles": [
+      {
+        "ServerName_str": "servername",
+        "FilePath_str": "filepath",
+        "FileSize_u32": 0,
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "ServerName_str": "servername",
+        "FilePath_str": "filepath",
+        "FileSize_u32": 0,
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123"
+      },
+      {
+        "ServerName_str": "servername",
+        "FilePath_str": "filepath",
+        "FileSize_u32": 0,
+        "UpdatedTime_dt": "2020-08-01T12:24:36.123"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
LogFilesArray objectLog file list
ServerName_strstring (ASCII)Server name
FilePath_strstring (ASCII)File path
FileSize_u32number (uint32)File size
UpdatedTime_dtDateLast write date
+
+

+

"ReadLogFile" RPC API - Download a part of Log File

+

Description

+

Download a part of Log File. Use this to download the log file that is saved on the VPN Server computer. To download the log file first get the list of log files using the EnumLogFile API and then download the log file using the ReadLogFile API. If you are connected to the VPN Server in server admin mode, you can display or download the packet logs and security logs of all Virtual Hubs and the server log of the VPN Server. When connected in Virtual Hub Admin Mode, you are able to view or download only the packet log and security log of the Virtual Hub that is the target of management.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "ReadLogFile",
+  "params": {
+    "FilePath_str": "filepath"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerName_str": "servername",
+    "FilePath_str": "filepath",
+    "Offset_u32": 0,
+    "Buffer_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerName_strstring (ASCII)Server name
FilePath_strstring (ASCII)File Path
Offset_u32number (uint32)Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field.
Buffer_binstring (Base64 binary)Received buffer
+
+

+

"SetSysLog" RPC API - Set syslog Send Function

+

Description

+

Set syslog Send Function. Use this to set the usage of syslog send function and which syslog server to use.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetSysLog",
+  "params": {
+    "SaveType_u32": 0,
+    "Hostname_str": "hostname",
+    "Port_u32": 0
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "SaveType_u32": 0,
+    "Hostname_str": "hostname",
+    "Port_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SaveType_u32number (enum)The behavior of the syslog function
Values:
0: Do not use syslog
1: Only server log
2: Server and Virtual HUB security log
3: Server, Virtual HUB security, and packet log
Hostname_strstring (ASCII)Specify the host name or IP address of the syslog server
Port_u32number (uint32)Specify the port number of the syslog server
+
+

+

"GetSysLog" RPC API - Get syslog Send Function

+

Description

+

Get syslog Send Function. This allows you to get the current setting contents of the syslog send function. You can get the usage setting of the syslog function and the host name and port number of the syslog server to use.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSysLog",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "SaveType_u32": 0,
+    "Hostname_str": "hostname",
+    "Port_u32": 0
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SaveType_u32number (enum)The behavior of the syslog function
Values:
0: Do not use syslog
1: Only server log
2: Server and Virtual HUB security log
3: Server, Virtual HUB security, and packet log
Hostname_strstring (ASCII)Specify the host name or IP address of the syslog server
Port_u32number (uint32)Specify the port number of the syslog server
+
+

+

"SetHubMsg" RPC API - Set Today's Message of Virtual Hub

+

Description

+

Set Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetHubMsg",
+  "params": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Msg_binstring (Base64 binary)Message (Unicode strings acceptable)
+
+

+

"GetHubMsg" RPC API - Get Today's Message of Virtual Hub

+

Description

+

Get Today's Message of Virtual Hub. The message will be displayed on VPN Client UI when a user will establish a connection to the Virtual Hub.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetHubMsg",
+  "params": {
+    "HubName_str": "hubname"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Msg_binstring (Base64 binary)Message (Unicode strings acceptable)
+
+

+

"Crash" RPC API - Raise a vital error on the VPN Server / Bridge to terminate the process forcefully

+

Description

+

Raise a vital error on the VPN Server / Bridge to terminate the process forcefully. This API will raise a fatal error (memory access violation) on the VPN Server / Bridge running process in order to crash the process. As the result, VPN Server / Bridge will be terminated and restarted if it is running as a service mode. If the VPN Server is running as a user mode, the process will not automatically restarted. This API is for a situation when the VPN Server / Bridge is under a non-recoverable error or the process is in an infinite loop. This API will disconnect all VPN Sessions on the VPN Server / Bridge. All unsaved settings in the memory of VPN Server / Bridge will be lost. Before run this API, call the Flush API to try to save volatile data to the configuration file. To execute this API, you must have VPN Server / VPN Bridge administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "Crash",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"GetAdminMsg" RPC API - Get the message for administrators

+

Description

+

Get the message for administrators.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetAdminMsg",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "HubName_str": "hubname",
+    "Msg_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
HubName_strstring (ASCII)The Virtual Hub name
Msg_binstring (Base64 binary)Message (Unicode strings acceptable)
+
+

+

"Flush" RPC API - Save All Volatile Data of VPN Server / Bridge to the Configuration File

+

Description

+

Save All Volatile Data of VPN Server / Bridge to the Configuration File. The number of configuration file bytes will be returned as the "IntValue" parameter. Normally, the VPN Server / VPN Bridge retains the volatile configuration data in memory. It is flushed to the disk as vpn_server.config or vpn_bridge.config periodically. The period is 300 seconds (5 minutes) by default. (The period can be altered by modifying the AutoSaveConfigSpan item in the configuration file.) The data will be saved on the timing of shutting down normally of the VPN Server / Bridge. Execute the Flush API to make the VPN Server / Bridge save the settings to the file immediately. The setting data will be stored on the disk drive of the server computer. Use the Flush API in a situation that you do not have an enough time to shut down the server process normally. To call this API, you must have VPN Server administrator privileges. To execute this API, you must have VPN Server / VPN Bridge administrator privileges.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "Flush",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"SetIPsecServices" RPC API - Enable or Disable IPsec VPN Server Function

+

Description

+

Enable or Disable IPsec VPN Server Function. Enable or Disable IPsec VPN Server Function on the VPN Server. If you enable this function, Virtual Hubs on the VPN Server will be able to accept Remote-Access VPN connections from L2TP-compatible PCs, Mac OS X and Smartphones, and also can accept EtherIP Site-to-Site VPN Connection. VPN Connections from Smartphones suchlike iPhone, iPad and Android, and also from native VPN Clients on Mac OS X and Windows can be accepted. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetIPsecServices",
+  "params": {
+    "L2TP_Raw_bool": false,
+    "L2TP_IPsec_bool": false,
+    "EtherIP_IPsec_bool": false,
+    "IPsec_Secret_str": "ipsec_secret",
+    "L2TP_DefaultHub_str": "l2tp_defaulthub"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "L2TP_Raw_bool": false,
+    "L2TP_IPsec_bool": false,
+    "EtherIP_IPsec_bool": false,
+    "IPsec_Secret_str": "ipsec_secret",
+    "L2TP_DefaultHub_str": "l2tp_defaulthub"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
L2TP_Raw_boolbooleanEnable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option.
L2TP_IPsec_boolbooleanEnable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option.
EtherIP_IPsec_boolbooleanEnable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging.
IPsec_Secret_strstring (ASCII)Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters.
L2TP_DefaultHub_strstring (ASCII)Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target.
+
+

+

"GetIPsecServices" RPC API - Get the Current IPsec VPN Server Settings

+

Description

+

Get the Current IPsec VPN Server Settings. Get and view the current IPsec VPN Server settings on the VPN Server. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetIPsecServices",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "L2TP_Raw_bool": false,
+    "L2TP_IPsec_bool": false,
+    "EtherIP_IPsec_bool": false,
+    "IPsec_Secret_str": "ipsec_secret",
+    "L2TP_DefaultHub_str": "l2tp_defaulthub"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
L2TP_Raw_boolbooleanEnable or Disable the L2TP Server Function (Raw L2TP with No Encryptions). To accept special VPN clients, enable this option.
L2TP_IPsec_boolbooleanEnable or Disable the L2TP over IPsec Server Function. To accept VPN connections from iPhone, iPad, Android, Windows or Mac OS X, enable this option.
EtherIP_IPsec_boolbooleanEnable or Disable the EtherIP / L2TPv3 over IPsec Server Function (for site-to-site VPN Server function). Router Products which are compatible with EtherIP over IPsec can connect to Virtual Hubs on the VPN Server and establish Layer-2 (Ethernet) Bridging.
IPsec_Secret_strstring (ASCII)Specify the IPsec Pre-Shared Key. An IPsec Pre-Shared Key is also called as "PSK" or "secret". Specify it equal or less than 8 letters, and distribute it to every users who will connect to the VPN Server. Please note: Google Android 4.0 has a bug which a Pre-Shared Key with 10 or more letters causes a unexpected behavior. For that reason, the letters of a Pre-Shared Key should be 9 or less characters.
L2TP_DefaultHub_strstring (ASCII)Specify the default Virtual HUB in a case of omitting the name of HUB on the Username. Users should specify their username such as "Username@Target Virtual HUB Name" to connect this L2TP Server. If the designation of the Virtual Hub is omitted, the above HUB will be used as the target.
+
+

+

"AddEtherIpId" RPC API - Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices

+

Description

+

Add New EtherIP / L2TPv3 over IPsec Client Setting to Accept EthreIP / L2TPv3 Client Devices. Add a new setting entry to enable the EtherIP / L2TPv3 over IPsec Server Function to accept client devices. In order to accept connections from routers by the EtherIP / L2TPv3 over IPsec Server Function, you have to define the relation table between an IPsec Phase 1 string which is presented by client devices of EtherIP / L2TPv3 over IPsec compatible router, and the designation of the destination Virtual Hub. After you add a definition entry by AddEtherIpId API, the defined connection setting to the Virtual Hub will be applied on the login-attepting session from an EtherIP / L2TPv3 over IPsec client device. The username and password in an entry must be registered on the Virtual Hub. An EtherIP / L2TPv3 client will be regarded as it connected the Virtual HUB with the identification of the above user information. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "AddEtherIpId",
+  "params": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"GetEtherIpId" RPC API - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions

+

Description

+

Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetEtherIpId",
+  "params": {
+    "Id_str": "id"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"DeleteEtherIpId" RPC API - Delete an EtherIP / L2TPv3 over IPsec Client Setting

+

Description

+

Delete an EtherIP / L2TPv3 over IPsec Client Setting. This API deletes an entry to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "DeleteEtherIpId",
+  "params": {
+    "Id_str": "id"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Id_str": "id",
+    "HubName_str": "hubname",
+    "UserName_str": "username",
+    "Password_str": "password"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"EnumEtherIpId" RPC API - Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions

+

Description

+

Get the Current List of EtherIP / L2TPv3 Client Device Entry Definitions. This API gets and shows the list of entries to accept VPN clients by EtherIP / L2TPv3 over IPsec Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "EnumEtherIpId",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Settings": [
+      {
+        "Id_str": "id",
+        "HubName_str": "hubname",
+        "UserName_str": "username",
+        "Password_str": "password"
+      },
+      {
+        "Id_str": "id",
+        "HubName_str": "hubname",
+        "UserName_str": "username",
+        "Password_str": "password"
+      },
+      {
+        "Id_str": "id",
+        "HubName_str": "hubname",
+        "UserName_str": "username",
+        "Password_str": "password"
+      }
+    ]
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SettingsArray objectSetting list
Id_strstring (ASCII)Specify an ISAKMP Phase 1 ID. The ID must be exactly same as a ID in the configuration of the EtherIP / L2TPv3 Client. You can specify IP address as well as characters as ID, if the EtherIP Client uses IP address as Phase 1 ID. If you specify '*' (asterisk), it will be a wildcard to match any clients which doesn't match other explicit rules.
HubName_strstring (ASCII)Specify the name of the Virtual Hub to connect.
UserName_strstring (ASCII)Specify the username to login to the destination Virtual Hub.
Password_strstring (ASCII)Specify the password to login to the destination Virtual Hub.
+
+

+

"SetOpenVpnSstpConfig" RPC API - Set Settings for OpenVPN Clone Server Function

+

Description

+

Set Settings for OpenVPN Clone Server Function. The VPN Server has the clone functions of OpenVPN software products by OpenVPN Technologies, Inc. Any OpenVPN Clients can connect to this VPN Server. The manner to specify a username to connect to the Virtual Hub, and the selection rule of default Hub by using this clone server functions are same to the IPsec Server functions. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetOpenVpnSstpConfig",
+  "params": {
+    "EnableOpenVPN_bool": false,
+    "OpenVPNPortList_str": "openvpnportlist",
+    "EnableSSTP_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "EnableOpenVPN_bool": false,
+    "OpenVPNPortList_str": "openvpnportlist",
+    "EnableSSTP_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EnableOpenVPN_boolbooleanSpecify true to enable the OpenVPN Clone Server Function. Specify false to disable.
OpenVPNPortList_strstring (ASCII)Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports.
EnableSSTP_boolbooleanpecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable.
+
+

+

"GetOpenVpnSstpConfig" RPC API - Get the Current Settings of OpenVPN Clone Server Function

+

Description

+

Get the Current Settings of OpenVPN Clone Server Function. Get and show the current settings of OpenVPN Clone Server Function. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetOpenVpnSstpConfig",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "EnableOpenVPN_bool": false,
+    "OpenVPNPortList_str": "openvpnportlist",
+    "EnableSSTP_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EnableOpenVPN_boolbooleanSpecify true to enable the OpenVPN Clone Server Function. Specify false to disable.
OpenVPNPortList_strstring (ASCII)Specify UDP ports to listen for OpenVPN. Multiple UDP ports can be specified with splitting by space or comma letters, for example: "1194, 2001, 2010, 2012". The default port for OpenVPN is UDP 1194. You can specify any other UDP ports.
EnableSSTP_boolbooleanpecify true to enable the Microsoft SSTP VPN Clone Server Function. Specify false to disable.
+
+

+

"GetDDnsClientStatus" RPC API - Show the Current Status of Dynamic DNS Function

+

Description

+

Show the Current Status of Dynamic DNS Function. Get and show the current status of the Dynamic DNS function. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetDDnsClientStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "Err_IPv4_u32": 0,
+    "ErrStr_IPv4_utf": "errstr_ipv4",
+    "Err_IPv6_u32": 0,
+    "ErrStr_IPv6_utf": "errstr_ipv6",
+    "CurrentHostName_str": "currenthostname",
+    "CurrentFqdn_str": "currentfqdn",
+    "DnsSuffix_str": "dnssuffix",
+    "CurrentIPv4_str": "currentipv4",
+    "CurrentIPv6_str": "currentipv6"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Err_IPv4_u32number (uint32)Last error code (IPv4)
ErrStr_IPv4_utfstring (UTF8)Last error string (IPv4)
Err_IPv6_u32number (uint32)Last error code (IPv6)
ErrStr_IPv6_utfstring (UTF8)Last error string (IPv6)
CurrentHostName_strstring (ASCII)Current DDNS host name
CurrentFqdn_strstring (ASCII)Current FQDN of the DDNS hostname
DnsSuffix_strstring (ASCII)DDNS suffix
CurrentIPv4_strstring (ASCII)Current IPv4 address of the VPN Server
CurrentIPv6_strstring (ASCII)Current IPv6 address of the VPN Server
+
+

+

"ChangeDDnsClientHostname" RPC API - Set the Dynamic DNS Hostname

+

Description

+

Set the Dynamic DNS Hostname. You must specify the new hostname on the StrValue_str field. You can use this API to change the hostname assigned by the Dynamic DNS function. The currently assigned hostname can be showen by the GetDDnsClientStatus API. The Dynamic DNS assigns a unique and permanent DNS hostname for this VPN Server. You can use that hostname to specify this VPN Server on the settings for VPN Client and VPN Bridge. You need not to register and keep a domain name. Also, if your ISP assignes you a dynamic (not-fixed) IP address, the corresponding IP address of your Dynamic DNS hostname will be automatically changed. It enables you to keep running the VPN Server by using only a dynamic IP address. Therefore, you need not any longer to keep static global IP addresses with expenses monthly costs. [Caution] To disable the Dynamic DNS Function, modify the configuration file of VPN Server. The "declare root" directive has the "declare DDnsClient" directive. In this directive, you can switch "bool Disable" from false to true, and reboot the VPN Server, then the Dynamic DNS Function will be disabled. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "ChangeDDnsClientHostname",
+  "params": {
+    "StrValue_str": "strvalue"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"RegenerateServerCert" RPC API - Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server

+

Description

+

Generate New Self-Signed Certificate with Specified CN (Common Name) and Register on VPN Server. You can specify the new CN (common name) value on the StrValue_str field. You can use this API to replace the current certificate on the VPN Server to a new self-signed certificate which has the CN (Common Name) value in the fields. This API is convenient if you are planning to use Microsoft SSTP VPN Clone Server Function. Because of the value of CN (Common Name) on the SSL certificate of VPN Server must match to the hostname specified on the SSTP VPN client. This API will delete the existing SSL certificate of the VPN Server. It is recommended to backup the current SSL certificate and private key by using the GetServerCert API beforehand. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "RegenerateServerCert",
+  "params": {
+    "StrValue_str": "strvalue"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IntValue_u32": 0,
+    "Int64Value_u64": 0,
+    "StrValue_str": "strvalue",
+    "UniStrValue_utf": "unistrvalue"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IntValue_u32number (uint32)A 32-bit integer field
Int64Value_u64number (uint64)A 64-bit integer field
StrValue_strstring (ASCII)An Ascii string field
UniStrValue_utfstring (UTF8)An UTF-8 string field
+
+

+

"MakeOpenVpnConfigFile" RPC API - Generate a Sample Setting File for OpenVPN Client

+

Description

+

Generate a Sample Setting File for OpenVPN Client. Originally, the OpenVPN Client requires a user to write a very difficult configuration file manually. This API helps you to make a useful configuration sample. What you need to generate the configuration file for the OpenVPN Client is to run this API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "MakeOpenVpnConfigFile",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ServerName_str": "servername",
+    "FilePath_str": "filepath",
+    "Offset_u32": 0,
+    "Buffer_bin": "SGVsbG8gV29ybGQ="
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ServerName_strstring (ASCII)Server name
FilePath_strstring (ASCII)File Path
Offset_u32number (uint32)Offset to download. You have to call the ReadLogFile API multiple times to download the entire log file with requesting a part of the file by specifying the Offset_u32 field.
Buffer_binstring (Base64 binary)Received buffer
+
+

+

"SetSpecialListener" RPC API - Enable / Disable the VPN over ICMP / VPN over DNS Server Function

+

Description

+

Enable / Disable the VPN over ICMP / VPN over DNS Server Function. You can establish a VPN only with ICMP or DNS packets even if there is a firewall or routers which blocks TCP/IP communications. You have to enable the following functions beforehand. Warning: Use this function for emergency only. It is helpful when a firewall or router is misconfigured to blocks TCP/IP, but either ICMP or DNS is not blocked. It is not for long-term stable using. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetSpecialListener",
+  "params": {
+    "VpnOverIcmpListener_bool": false,
+    "VpnOverDnsListener_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "VpnOverIcmpListener_bool": false,
+    "VpnOverDnsListener_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
VpnOverIcmpListener_boolbooleanThe flag to activate the VPN over ICMP server function
VpnOverDnsListener_boolbooleanThe flag to activate the VPN over DNS function
+
+

+

"GetSpecialListener" RPC API - Get Current Setting of the VPN over ICMP / VPN over DNS Function

+

Description

+

Get Current Setting of the VPN over ICMP / VPN over DNS Function. Get and show the current VPN over ICMP / VPN over DNS Function status. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetSpecialListener",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "VpnOverIcmpListener_bool": false,
+    "VpnOverDnsListener_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
VpnOverIcmpListener_boolbooleanThe flag to activate the VPN over ICMP server function
VpnOverDnsListener_boolbooleanThe flag to activate the VPN over DNS function
+
+

+

"GetAzureStatus" RPC API - Show the current status of VPN Azure function

+

Description

+

Show the current status of VPN Azure function. Get and show the current status of the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetAzureStatus",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IsEnabled_bool": false,
+    "IsConnected_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IsEnabled_boolbooleanWhether VPN Azure Function is Enabled
IsConnected_boolbooleanWhether connection to VPN Azure Cloud Server is established
+
+

+

"SetAzureStatus" RPC API - Enable / Disable VPN Azure Function

+

Description

+

Enable / Disable VPN Azure Function. Enable or disable the VPN Azure function. VPN Azure makes it easier to establish a VPN Session from your home PC to your office PC. While a VPN connection is established, you can access to any other servers on the private network of your company. You don't need a global IP address on the office PC (VPN Server). It can work behind firewalls or NATs. No network administrator's configuration required. You can use the built-in SSTP-VPN Client of Windows in your home PC. VPN Azure is a cloud VPN service operated by SoftEther Corporation. VPN Azure is free of charge and available to anyone. Visit http://www.vpnazure.net/ to see details and how-to-use instructions. The VPN Azure hostname is same to the hostname of the Dynamic DNS setting, but altering the domain suffix to "vpnazure.net". To change the hostname use the ChangeDDnsClientHostname API. To call this API, you must have VPN Server administrator privileges. This API cannot be invoked on VPN Bridge. You cannot execute this API for Virtual Hubs of VPN Servers operating as a cluster.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetAzureStatus",
+  "params": {
+    "IsEnabled_bool": false
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "IsEnabled_bool": false,
+    "IsConnected_bool": false
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IsEnabled_boolbooleanWhether VPN Azure Function is Enabled
IsConnected_boolbooleanWhether connection to VPN Azure Cloud Server is established
+
+

+

"GetDDnsInternetSettng" RPC API - Get the Proxy Settings for Connecting to the DDNS server

+

Description

+

Get the Proxy Settings for Connecting to the DDNS server.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "GetDDnsInternetSettng",
+  "params": {}
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ProxyType_u32": 0,
+    "ProxyHostName_str": "proxyhostname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "proxyusername",
+    "ProxyPassword_str": "proxypassword"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ProxyType_u32number (enum)Type of proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyHostName_strstring (ASCII)Proxy server host name
ProxyPort_u32number (uint32)Proxy server port number
ProxyUsername_strstring (ASCII)Proxy server user name
ProxyPassword_strstring (ASCII)Proxy server password
+
+

+

"SetDDnsInternetSettng" RPC API - Set the Proxy Settings for Connecting to the DDNS server

+

Description

+

Set the Proxy Settings for Connecting to the DDNS server.

+

Input JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "method": "SetDDnsInternetSettng",
+  "params": {
+    "ProxyType_u32": 0,
+    "ProxyHostName_str": "proxyhostname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "proxyusername",
+    "ProxyPassword_str": "proxypassword"
+  }
+}
+
+

Output JSON-RPC Format

+
{
+  "jsonrpc": "2.0",
+  "id": "rpc_call_id",
+  "result": {
+    "ProxyType_u32": 0,
+    "ProxyHostName_str": "proxyhostname",
+    "ProxyPort_u32": 0,
+    "ProxyUsername_str": "proxyusername",
+    "ProxyPassword_str": "proxypassword"
+  }
+}
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ProxyType_u32number (enum)Type of proxy server
Values:
0: Direct TCP connection
1: Connection via HTTP proxy server
2: Connection via SOCKS proxy server
ProxyHostName_strstring (ASCII)Proxy server host name
ProxyPort_u32number (uint32)Proxy server port number
ProxyUsername_strstring (ASCII)Proxy server user name
ProxyPassword_strstring (ASCII)Proxy server password
+
+

Automatically generated at 2019-07-10 14:36:11 by vpnserver-jsonrpc-codegen.
+Copyright (c) 2014-2019 SoftEther VPN Project under the Apache License 2.0.

+ +
+ + diff --git a/src/bin/hamcore/warning_ru.txt b/src/bin/hamcore/warning_ru.txt new file mode 100644 index 00000000..f1f010b3 --- /dev/null +++ b/src/bin/hamcore/warning_ru.txt @@ -0,0 +1,139 @@ +THE IMPORTANT NOTICES ABOUT SOFTETHER VPN + +FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGE YOURSELF. IN ORDER TO AVOID SUCH RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5 CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE. + + +1. VPN Communication Protocols +1.1. SoftEther VPN Protocol +SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols, SoftEther VPN has an implementation of the newly-designed "SoftEther VPN Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can communicate beyond firewalls even if the firewall is configured to block traditional VPN packets by network administrator. SE-VPN protocol is designed and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it sometimes have different behavior to RFCs. If you are a network administrator and want to block SE-VPN protocols on the firewall, you can adopt a "white-list" policy on the firewall to filter any TCP or UDP packets on the border except explicitly allowed packets towards specific web sites and servers. + +1.2. NAT Traversal Function +Generally, if you use traditional VPN systems you have to request a network administrator to make the NAT or firewall to "open" or "relay" specific TCP or UDP ports. However, there are demands somehow to eliminate such working costs on network administrators. In order to satisfy such demands, SoftEther VPN has the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by default. A SoftEther VPN Server running on the computer behind NAT or firewall can accept VPN connections from the Internet, without any special configurations on firewalls or NATs. If you want to disable the NAT Traversal function, modify the "DisableNatTraversal" to "true" on the configuration file of SoftEther VPN Server. In order to disable it on the client-side, append "/tcp" suffix on the destination hostname. + +1.3. Dynamic DNS Function +Traditional legacy VPN system requires a static global IP address on the VPN server. In consideration of shortage of global IP addresses, SoftEther Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server. Dynamic DNS is enabled by default. Dynamic DNS function notify the current global IP address of the PC to the Dynamic DNS Servers which are operated by SoftEther Corporation. A globally-unique hostname (FQDN) such as "abc.softether.net" ( "abc" varies as unique per a user) will be assigned on the VPN Server. If you tell this unique hostname to a VPN user, the user can specify it as the destination VPN Sever hostname on the VPN Client and will be able to connect the VPN Server. No IP addresses are required to know beforehand. If the IP address of the VPN Server varies, the registered IP address related to the hostname of Dynamic DNS service will be changed automatically. By this mechanism, no longer need a static global IP address which costs monthly to ISPs. You can use consumer-level inexpensive Internet connection with dynamic IP address in order to operate an enterprise-level VPN system. If you want to disable Dynamic DNS, specify "true" on the "Disabled" items of the "DDnsClient" directive on the SoftEther VPN Server configuration file. * Note for residents in People's Republic of China: If your VPN Server is running on the People's Republic of China, the DNS suffix will be replaced to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a Chinese-local enterprise. + +1.4. VPN over ICMP / VPN over DNS functions +If you want to make a VPN connection between SoftEther VPN Client / Bridge and SoftEther VPN Server, but if TCP and UDP packets are prohibited by the firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or "DNS" packets. This function can realize a VPN connection by using ICMP or DNS even if the firewall or router blocks every TCP or UDP connections. VPN over ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS specifications as possible, however it sometimes has a behavior not to fully comply them. Therefore, few poor-quality routers may be caused a memory-overflow or something troubles when a lot of ICMP or DNS packets are passed, and such routers sometimes freezes or reboots. It might affects other users on the same network. To avoid such risks, append the suffix "/tcp" on the destination hostname which is specified on the VPN-client side to disable VPN over ICMP / DNS functions. + +1.5. VPN Azure Cloud Service +If your SoftEther VPN Server is placed behind the NAT or firewall, and by some reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over ICMP/DNS function, you can use VPN Azure Cloud Service. SoftEther Corporation operates VPN Azure Cloud on Internet. After the VPN Server makes a connection to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique hostname) can be specified to connect to the VPN Server via the VPN Azure Cloud. Practically, such a hostname is pointing a global IP address of one of cloud servers which are operated by SoftEther Corporation. If A VPN Client connects to such a VPN Azure host, then the VPN Azure host will relay all traffics between the VPN Client and the VPN Server. VPN Azure is disabled by default. You can activate it easily by using VPN Server Configuration Tool. + +1.6. UDP Acceleration +SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two sites detects that UDP channel can be established, UDP will be automatically used. By this function, throughput of UDP increases. If direct UDP channel can be established, direct UDP packets will be used. However, if there is something obstacles such as firewalls or NATs, the "UDP Hole Punching" technology will be used, instead. The "UDP Hole Punching" uses the cloud servers which SoftEther Corporation operates on Internet. UDP Acceleration can be disabled anytime by setting up so on the VPN-client side. + + +2. VPN Software +2.1. SoftEther VPN Client +If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device driver will be installed on Windows. The Virtual Network Adapter is implemented as a kernel-mode driver for Windows. The driver is digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed by Symantec Corporation. A message to ask you want to sure install the driver might be popped up on the screen. SoftEther VPN Client may response the message if possible. SoftEther VPN Client also optimizes the configuration of MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the optimizations of MMCSS afterwards. + +2.2. SoftEther VPN Server / Bridge +If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge" functions, you have to install the low-level Ethernet packet processing driver on the computer. The driver is digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN Server / Bridge may disable the TCP/IP offloading features on the physical network adapter for Local Bridge function. In Windows Vista / 2008 or greater version, VPN Server may inject a packet-filter driver which complies Windows Filter Platform (WPF) specification into the kernel in order to provide IPsec function. The packet-filter driver will be loaded available only if IPsec function is enabled. Once you enables IPsec function of SoftEther VPN Server, the built-in IPsec function of Windows will be disabled. After you disabled IPsec function of SoftEther VPN Server, then the built-in IPsec function of Windows will revive. In order to provide the Local Bridge function, SoftEther VPN Server / Bridge disables the TCP/IP offloading function on the operating system. + +2.3. User-mode Installation +You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode" on Windows. In other words, even if you don't have Windows system administrator's privileges, you can install SoftEther VPN as a normal user. User-mode install will disable a few functions, however other most functions work well. Therefore, for example, an employee can install SoftEther VPN Server on the computer in the office network, and he will be able to connect to the server from his home. In order to realize such a system by user-self, no system administrative privileges are required in the view-point of technical. However, breaking rules of the company to install software on the computer without authority might be regarded as an unfavorable behavior. If you are an employee and belong to the company, and the company-policy prohibits installing software or making communications towards Internet without permission, you have to obtain a permission from the network administrator or the executive officer of your company in advance to install SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will be appeared on the Windows task-tray. If you feel that the icon disturbs you, you can hide it by your operation. However, you must not exploit this hiding function to install VPN Server on other person's computer as a spyware. Such behavior might be an offence against the criminal law. + +2.4. Keep Alive Function +SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by default. The purpose of this function is to sustain the Internet line active. The function transmits UDP packets with a random-byte-array-payload periodically. This function is useful to avoid automatic disconnection on mobile or dial-up connections. You can disable Keep Alive Function anytime. + +2.5. Uninstallation +The uninstallation process of SoftEther VPN software will delete all program files. However, non-program files (such as files and data which are generated by running of programs) ) will not be deleted. For technical reason, the exe and resource files of uninstaller might remain. Such remaining files never affects to use the computer, however you can delete it manually. Kernel-mode drivers might not be deleted, however such drivers will not be loaded after the next boot of Windows. You can use "sc" command of Windows to delete kernel-mode drivers manually. + +2.6. Security +You should set the administrator's password on SoftEther VPN Server / Bridge after installation. If you neglect to do it, another person can access to SoftEther VPN Server / Bridge and can set the password without your permission. This caution might be also applied on SoftEther VPN Client for Linux. + +2.7. Automatic Update Notification +SoftEther VPN software for Windows has an automatic update notification function. It accesses to the SoftEther Update server periodically to check whether or not the latest version of software is released. If the latest version is released, the notification message will be popped up on the screen. In order to achieve this purpose, the version, language settings, the unique identifier, the IP address of your computer and the hostname of VPN Server which is connected to will be sent to the SoftEther Update server. No personal information will be sent. Automatic Update Notification is enabled by default, however you can disable it on the configuration screen. The setting whether turned on or turned off will be saved individually corresponding to each destination VPN server, by VPN Server Manager. + +2.8. Virtual NAT Function +A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" . Virtual NAT Function can share a single IP address on the physical network by multiple private IP address of VPN Clients. There are two operation mode of Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual NAT shares an IP address which is assigned on the host operating system. Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on the physical network. If there are two or more physical networks, a DHCP server will be sought automatically for each segments serially. If a DHCP server found, and an IP address is acquired, the IP address will be used by the Virtual NAT. In this case, an IP entry as a DHCP client will be registered on the IP pool of the physical DHCP Server. The physical default gateway and the DNS server will be used by the Virtual NAT in order to communicate with hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC address which is operating on the physical Ethernet segment. In order to check the connectivity to Internet, SoftEther VPN periodically sends DNS query packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" , and attempts to connect to the TCP port 80 of such a resulted IP address for connectivity check. + +2.9. Unattended Installation of Kernel-mode Components +When SoftEther VPN will detect a necessity to install the kernel-mode components on Windows, a confirmation message will be appeared by Windows system. In this occasion, SoftEther VPN software will switch to the Unattended Installation mode in order to respond "Yes" to Windows. This is a solution to prevent dead-locks when a remote-administration is performed from remote place. + +2.10. Windows Firewall +SoftEther VPN software will register itself as a safe-program. Such an entry will be remain after the uninstallation. You can remove it manually from the Control Panel of Windows. + + +3. Internet Services +3.1. Internet Services which are provided by SoftEther Corporation +SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server services on the Internet. These services are free of charge. Customers can access to the services by using SoftEther VPN software, via Internet. These service will be planned to be available from Open-Source version of "SoftEther VPN" which will be released in the future. + +3.2. Sent Information and Privacy Protection +SoftEther VPN software may send an IP address, hostname, the version of VPN software on the customer's computer to the cloud service operated by SoftEther Corporation, in order to use the above services. These sending of information are minimal necessary to use the services. No personal information will be sent. SoftEther Corporation records log files of the cloud service servers for 90 days at least with the received information. Such logs will be used for troubleshooting and other legitimate activities. SoftEther Corporation may provide logs to a public servant of Japanese government who are belonging to courts, police stations and the prosecutor's office, in order to comply such authorities' order. (Every Japanese public servants are liable by law to keep the information close.) Moreover, the IP addresses or other information will be processed statistically and provided to the public, not to expose the each concrete IP address, in order to release the release of research activities. + +3.3. Communication Data via VPN Azure Service +Regardless of the above 3.2 rule, if the customer sends or receives VPN packets using VPN Azure Cloud Service, the actual payloads will stored and forwarded via the volatile memory of the servers for very short period. Such a behavior is naturally needed to provide the "VPN relay service" . No payloads will be recorded on "fixed" storages such as hard-drives. However, the "Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on August 18, 1999 in Japan) requires telecommunication companies to allow the Japanese government authority to conduct a wire-tapping on the line. VPN Azure Servers which are physically placed on Japan are subjects of this law. + +3.4. Comply to Japanese Telecommunication Laws +SoftEther Corporation complies with Japanese Telecommunication Laws as necessary to provide online services via Internet. + +3.5. Free and Academic Experiment Services +SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic experiment services. Therefore, there services can be used for free of charge. These services are not parts of "SoftEther VPN Software Products" . These services are provided without any warranty. The services may be suspended or discontinued by technical or operational matters. In such occasions, users will not be able to use the services. A user have to understand such risks, and to acknowledge that such risks are borne by a user-self. SoftEther will never be liable to results or damages of use or unable-to-use of the service. Even if the user has already paid the license-fee of the commercial version of SoftEther VPN, such paid fees don't include any fees of these services. Therefore, if the online services will stop or be discontinued, no refunds or recoveries of damages will be provided by SoftEther Corporation. + +3.6. DNS Proxy Cloud Servers +In some regions, when a user uses Internet, a DNS query sometimes broken or lost when it is passing through the ISP line. If SoftEther VPN Server, Client or Bridge detects a possibility that the accessing to the actual VPN server might be unstable, then DNS queries will be also transferred to the DNS proxy cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud server will respond DNS queries with answering correct a IP address. + + +4. General Cautions +4.1. Needs an Approval from Network Administrator +SoftEther VPN has powerful functions which don't require special settings by network administrators. For example, you need not to ask the administrator to configure the existing firewall in order to "open" a TCP/UDP port. Such characteristic features are for the purpose to eliminate working times and costs of network administrators, and avoid misconfiguration-risks around the tasks to open specific exception ports on the firewall. However, any employees belong to the company have to obtain an approval from the network administrator before installs SoftEther VPN. If your network administrator neglects to provide such an approval, you can consider to take an approval from an upper authority. (For example, executive officer of the company.) If you use SoftEther VPN without any approvals from the authority of your company, you might have disadvantage. SoftEther Corporation will be never liable for results or damages of using SoftEther VPN. + +4.2. Observe Laws of Your Country +If your country's law prohibits the use of encryption, you have to disable the encryption function of SoftEther VPN by yourself. Similarly, in some countries or regions, some functions of SoftEther VPN might be prohibited to use by laws. Other countries' laws are none of SoftEther Corporation's concern because SoftEther Corporation is an enterprise which is located and registered in Japan physically. For example, there might be a risk that a part of SoftEther VPN conflicts an existing patent which is valid only on the specific region. SoftEther Corporation has no interests in such specific region outside Japan's territory. Therefore, if you want to use SoftEther VPN in regions outside Japan, you have to be careful not to violate third-person's rights. You have to verify the legitimacy of the use of SoftEther VPN in the specific region before you actually use it in such region. By nature, there are almost 200 countries in the World, and each country's law is different each other. It is practically impossible to verify every countries' laws and regulations and make the software comply with all countries' laws in advance to release the software. Therefore SoftEther Corporation has verified the legitimacy of SoftEther VPN against the laws and regulations of only Japan. If a user uses SoftEther VPN in a specific country, and damaged by public servants of the government authority, SoftEther Corporation will never be liable to recover or compensate such damages or criminal responsibilities. + + +5. VPN Gate Academic Experiment Project +(This chapter applies only on SoftEther VPN software package which contains the extension plug-in for VPN Gate Academic Experiment Project.) +5.1. About VPN Gate Academic Experiment Project +VPN Gate Academic Experiment Project is an online service operated for just the academic research purpose at the graduate school of University of Tsukuba, Japan. The purpose of this research is to expend our knowledge about the "Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details, please visit http://www.vpngate.net/. + +5.2. About VPN Gate Service +SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service" program. However, VPN Gate Service is disabled by default. +VPN Gate Service should be activated and enabled by the voluntary intention of the owner of the computer which SoftEther VPN Server or SoftEther VPN Client is installed on. After you activate VPN Gate Service, the computer will be start to serve as a part of the Global Distributed Public VPN Relay Servers. The IP address, hostname and related information of the computer will be sent and registered to the directory server of VPN Gate Academic Experiment Project, and they will be published and disclosed to the public. This mechanism will allow any VPN Gate Client software's user to connect to the VPN Gate Service running on your computer. While the VPN session between a VPN Gate Client and your VPN Gate Service is established, the VPN Gate Client's user can send/receive any IP packets towards the Internet via the VPN Gate Service. The global IP address of the VPN Gate Service's hosing computer will be used as the source IP address of such communications which a VPN Gate Client initiates. +VPN Gate Service will send some information to the VPN Gate Academic Experiment Service Directory Server. The information includes the operator's information which described in section 5.5, logging settings, uptime, operating system version, type of protocol, port numbers, quality information, statistical information, VPN Gate clients' log history data (includes dates, IP addresses, version numbers and IDs) and the version of the software. These information will be exposed on the directory. VPN Gate Service also receives a key for encoding which is described on the chapter 5.9 from the directory server. + +5.3. Details of VPN Gate Service's Behavior +If you enable VPN Gate Service manually, which is disabled by default, the "VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are using SoftEther VPN Client and attempt to active VPN Gate Service on it, an equivalent program to SoftEther VPN Server will be invoked on the same process of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The "VPNGATE" Virtual Hub contains a user named "VPN" by default which permits anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN Client connects to the "VPNGATE" Virtual Hub, any communication between the user and the Internet will pass through the Virtual Hub, and transmitted/received using the physical network interface on the computer which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will cause the result that a destination host specified by the VPN Client will identify that the source of the communication has initiated from the VPN Gate Service's hosting computer's IP address. However, for safety, any packets which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0 or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to protect your local network. Therefore, if you run VPN Gate Service on your corporate network or private network, it is safe because anonymous VPN Client users will not be permitted to access such private networks. VPN Gate Service also serves as relay for accessing to the VPN Gate Directory Server. +In order to make VPN Gate Service familiar with firewalls and NATs, it opens an UDP port by using the NAT Traversal function which is described on the section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP ports will be specified as the target port of Universal Plug and Play (UPnP) Port Transfer entries which are requested to your local routers. UPnP request packets will be sent periodically. Some routers keep such an opened TCP/UDP port permanently on the device. If you wish to close them, do it manually. +VPN Gate Service also provides the mirror-site function for www.vpngate.net. This is a mechanism that a copy of the latest contents from www.vpngate.net will be hosted by the mirror-site tiny HTTP server which is running on the VPN Gate Service program. It will register itself on the mirror-sites list in www.vpngate.net. However, it never relays any other communications which are not towards www.vpngate.net. + +5.4. Communication between Internet via VPN Gate Service +VPN Gate Service provides a routing between users and the Internet, by using the Virtual NAT Function which is described on the section 2.8. VPN Gate Service sends polling Ping packets to the server which is located on University of Tsukuba, and the Google Public DNS Server which is identified as 8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate Service also sends and receives a lot of random packets to/from the Speed Test Server on University of Tsukuba. These quality data will be reported to VPN Gate Directory Server, automatically and periodically. The result will be saved and disclosed to the public. These periodical polling communication are adjusted not to occupy the Internet line, however in some circumstances they might occupy the line. + +5.5. Operator's Information of VPN Gate Service +If you activate VPN Gate Service on your computer, the computer will be a part of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's administrative information of your VPN Gate Service should be reported and registered on the VPN Gate Service Directory. Operator's information contains the name of the operator and the abuse-reporting contact e-mail address. These information can be inputted on the screen if the VPN Gate configuration. Inputted information will be transmitted to the VPN Gate Directory Server, stored and disclosed to the public. So you have to be careful to input information. By the way, until you specify something as the operator's information, the computer's hostname will be used automatically as the field of the name of the operator, by appending the "'s owner" string after the hostname. + +5.6. Observe Laws to Operate VPN Gate Service +In some countries or regions, a user who is planning to activate and operate VPN Gate Service, he are mandated to obtain a license or register a service from/to the government. If your region has such a regulation, you must fulfill mandated process before activating VPN Gate Service in advance. Neither the developers nor operators of the VPN Gate Academic Experiment Project will be liable for legal/criminal responsibilities or damages which are occurred from failure to comply your local laws. + +5.7. Protect Privacy of Communication +Most of countries have a law which requires communication service's operators, including VPN Gate Service operators, to protect the privacy of communication of third-persons. When you operate VPN Gate Service, you must always protect user's privacy. + +5.8. Packet Logs +The packet logging function is implemented on VPN Gate Service. It records essential headers of major TCP/IP packets which are transmitted via the Virtual Hub. This function will be helpful to investigate the "original IP address" of the initiator of communication who was a connected user of your VPN Gate Service, by checking the packet logs and the connection logs. The packet logs are recorded only for such legitimate investigates purpose. Do not peek nor leak packet logs except the rightful purpose. Such act will be violate the section 5.7. + +5.9. Packet Logs Automatic Archiving and Encoding Function +The VPN Gate Academic Experiment Service is operated and running under the Japanese constitution and laws. The Japanese constitution laws demand strictly protection over the privacy of communication. Because this service is under Japanese rules, the program of VPN Gate Service implements this "Automatic Log File Encoding" protection mechanism, and enabled by default. +The VPN Gate Service is currently configured to encode packet log files which has passed two or more weeks automatically, by default. In order to protect privacy of communication, if a packet log file is once encoded, even the administrator of the local computer cannot censor the packet log file. This mechanism protects privacy of end-users of VPN Gate Service. +You can change the VPN Gate Service setting to disable this automatic encoding function. Then packet log files will never be encoded even after two weeks passed. In such a configuration, all packet logs will remain as plain-text on the disk. Therefore you have to take care not to violate user's privacy. +If you are liable to decode an encoded packet log files (for example: a VPN Gate Service's user illegally abused your VPN Gate Service and you have to decode the packet logs in order to comply the laws), contact the administrator of the VPN Gate Academic Experiment Service at Graduate School of University of Tsukuba, Japan. You can find the contact address at http://www.vpngate.net/. The administrator of VPN Gate Service will respond to decode the packet logs if there is an appropriate and legal request from court or other judicial authorities, according to laws. + +5.10. Caution if You Operate VPN Gate Service in the Japan's Territories +When a user operates VPN Gate Service in the Japan's territories, such an act may be regulated under the Japanese Telecommunication Laws if the operation is a subject to the law. However, in such a circumstance, according to the "Japanese Telecommunication Business Compete Manual [supplemental version]" , non- profitable operations of communications are not identified as a "telecommunication business" . So usual operators of VPN Gate Service are not subjects to "telecommunication business operators" , and not be mandated to register to the government. Even so, legalities to protect the privacy of communication still imposed. As a conclusion, if you operate VPN Gate Service in the Japan's Territories, you must not leak the secrets of communications which are transmitted via your operating VPN Gate Service. + +5.11. VPN Gate Client +If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it to obtain the list of current operating VPN Gate Service servers in the Internet, and make a VPN connection to a specific server on the list. +VPN Gate Client always keeps the latest list of the VPN Gate Services periodically. Be careful if you are using a pay-per-use Internet line. +When you start the VPN Gate Client software, the screen which asks you activate or not VPN Gate Service will be appeared. For details of VPN Gate Service, read the above sections. + +5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment Project +The VPN Gate Academic Experiment Service is operated as a research project at the graduate school on University of Tsukuba, Japan. The service is governed under the Japanese laws. Other countries' laws are none of our concerns nor responsibilities. +By nature, there are almost 200 countries in the World, with different laws. It is impossible to verify every countries' laws and regulations and make the software comply with all countries' laws in advance to release the software. If a user uses VPN Gate service in a specific country, and damaged by public servants of the authority, the developer of either the service or software will never be liable to recover or compensate such damages or criminal responsibilities. +By using this software and service, the user must observe all concerned laws and rules with user's own responsibility. The user will be completely liable to any damages and responsibilities which are results of using this software and service, regardless of either inside or outside of Japan's territory. +If you don't agree nor understand the above warnings, do not use any of VPN Gate Academic Experiment Service functions. +VPN Gate is a research project for just academic purpose only. VPN Gate was developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN Gate were developed on this research project at University of Tsukuba. Any parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate Research Project is not a subject to be led, operated, promoted nor guaranteed by SoftEther Corporation. + +5.13. The P2P Relay Function in the VPN Gate Client to strengthen the capability of circumvention of censorship firewalls +VPN Gate Clients, which are published since January 2015, include the P2P Relay Function. The P2P Relay Function is implemented in order to strengthen the capability of circumvention of censorship firewalls. If the P2P Relay Function in your VPN Gate Client is enabled, then the P2P Relay Function will accept the incoming VPN connections from the VPN Gate users, which are located on mainly same regions around you, and will provide the relay function to the external remote VPN Gate Servers, which are hosted by third parties in the free Internet environment. This P2P Relay Function never provides the shared NAT functions nor replaces the outgoing IP address of the VPN Gate users to your IP addresses because this P2P Relay Function only provides the "reflection service" (hair-pin relaying), relaying from incoming VPN Gate users to an external VPN Gate Server. In this situation, VPN tunnels via your P2P Relay Function will be finally terminated on the external VPN Gate Server, not your VPN Gate Client. However, the VPN Gate Server as the final destination will record your IP address as the source IP address of VPN tunnels which will be initiated by your P2P Relay Function. Additionally, user packets which are transmitted via your P2P Relay Function will be recorded on your computer as packet logs as described on the section 5.8. After you installed the VPN Gate Client, and if the P2P Relay Function will be enabled automatically, then all matters on the 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 5.10, 5.11 and 5.12 sections will be applied to you and your computer, as same to the situation when you enabled the VPN Gate Service (the VPN Gate Server function). If your P2P Function is enabled, then your computer's IP address and the default operator's name which is described on the section 5.5 will be listed on the VPN Gate Server List which is provided by the VPN Gate Project. You can change these strings by editing the "vpn_gate_relay.config" file manually. Note that you need to stop the VPN Client service before editing it. The VPN Gate Client will automatically enable the P2P Relay Function on your computer if the VPN Gate Client detects that your computer might be located in regions where there are existing censorship firewalls. If you want to disable the P2P Relay Function, you must set the "DisableRelayServer" flag to "true" on the "vpn_client.config" file which is the configuration file of the VPN Client. Note that you need to stop the VPN Client service before editing it. The VPN Gate Client does not recognize the particular regulation of your country or your region. The VPN Gate Client activates the P2P Relay Function even if your country or your region has the law to restrict running P2P relay functions. Therefore, in such a case, you must disable the P2P Relay Function on the VPN Gate Client manually by setting the "DisableRelayServer" flag if you reside in such a restricted area, in your own responsibility. + diff --git a/src/bin/hamcore/wwwroot/admin/README.md b/src/bin/hamcore/wwwroot/admin/README.md new file mode 100644 index 00000000..35fa8d56 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/README.md @@ -0,0 +1,22 @@ +# About "admin" directory (for developers) +This `bin/hamcore/wwwroot/admin/` directory is the web contents root of the embedded HTML5 web administration console: `http://:/admin/`. + +Currently there is only the `default/` sub directory. It is corresponding to `http://:/admin/default/`. + + +The `/admin/index.html` file always redirects all clients to the `/admin/default/`. + + +If you are willing to develop the web-based administration console you have two choices: + +1. Modify and improve the `/admin/default/` project. + + +2. Create your entirely new web project in the `/admin/NEW_PATH_HERE/` directory. You can choose the unique directory name instead of `NEW_PATH_HERE` on the above directory path. + + +If you want to create an independent new web project, the choice #2 is the best way. You can do anything freely in your new directory. In such a case, please edit the `/admin/index.html` not to redirect to the `/admin/default/index.html` automatically. Instead, put the list of the systems for each of sub directories in the `/admin/index.html` so that the user can choose which system to use. + + + + diff --git a/src/bin/hamcore/wwwroot/admin/default/.gitignore b/src/bin/hamcore/wwwroot/admin/default/.gitignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/src/bin/hamcore/wwwroot/admin/default/.vscode/launch.json b/src/bin/hamcore/wwwroot/admin/default/.vscode/launch.json new file mode 100644 index 00000000..843c27cc --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "trace": true, + "sourceMaps": true, + "name": "Launch Chrome", + "preLaunchTask": "webpack build", + "file": "${workspaceFolder}/index.html", + "webRoot": "${workspaceFolder}", + "internalConsoleOptions": "openOnSessionStart" + } + ] +} \ No newline at end of file diff --git a/src/bin/hamcore/wwwroot/admin/default/.vscode/settings.json b/src/bin/hamcore/wwwroot/admin/default/.vscode/settings.json new file mode 100644 index 00000000..601be7a5 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "tsconfig_webpack.json": "jsonc" + } +} \ No newline at end of file diff --git a/src/bin/hamcore/wwwroot/admin/default/.vscode/tasks.json b/src/bin/hamcore/wwwroot/admin/default/.vscode/tasks.json new file mode 100644 index 00000000..97d314c4 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/.vscode/tasks.json @@ -0,0 +1,45 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "webpack build", + "type": "npm", + "script": "build", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "webpack watch", + "type": "npm", + "script": "watch", + "isBackground": true, + "problemMatcher": { + "pattern": { + "regexp": "^$" + }, + "background": { + "activeOnStart": true, + "beginsPattern": ".*Version: webpack.*", + "endsPattern": ".*\\[built\\]" + }, + } + }, + { + "label": "tsc build", + "type": "typescript", + "tsconfig": "tsconfig.json", + }, + { + "label": "tsc watch", + "type": "typescript", + "tsconfig": "tsconfig.json", + "option": "watch", + "problemMatcher": [ + "$tsc-watch" + ] + } + ] +} \ No newline at end of file diff --git a/src/bin/hamcore/wwwroot/admin/default/hub.html b/src/bin/hamcore/wwwroot/admin/default/hub.html new file mode 100644 index 00000000..ae846508 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/hub.html @@ -0,0 +1,23 @@ + + + + + +
+

+ + + +

List of Users

+
    + +

    List of Active VPN Sessions

    +
      + +
      + + + + diff --git a/src/bin/hamcore/wwwroot/admin/default/include_footer.html b/src/bin/hamcore/wwwroot/admin/default/include_footer.html new file mode 100644 index 00000000..859d6c61 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/include_footer.html @@ -0,0 +1,4 @@ +

       

      +

       

      +
      +

      Copyright (c) SoftEther VPN Project under the Apache License 2.0.

      diff --git a/src/bin/hamcore/wwwroot/admin/default/include_head.html b/src/bin/hamcore/wwwroot/admin/default/include_head.html new file mode 100644 index 00000000..778c5bde --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/include_head.html @@ -0,0 +1,9 @@ + + SoftEther VPN Server HTML5 Web Administration Console (Under construction!) + + + + + + + diff --git a/src/bin/hamcore/wwwroot/admin/default/include_menu.html b/src/bin/hamcore/wwwroot/admin/default/include_menu.html new file mode 100644 index 00000000..883c6911 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/include_menu.html @@ -0,0 +1,29 @@ + + diff --git a/src/bin/hamcore/wwwroot/admin/default/index.html b/src/bin/hamcore/wwwroot/admin/default/index.html new file mode 100644 index 00000000..bf2f0349 --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/index.html @@ -0,0 +1,45 @@ + + + + + +
      +

      SoftEther VPN Server HTML5 Ajax-based Web Administration Console
      (Under construction!)

      +

      This is the sample of HTML5 Ajax-based VPN Server Web Administration Console.

      +

      The purpose of this HTML5 admin page is to make administrators easy to set up and manage the running VPN Servers.

      +

      Authentication for this page

      +

      You must supply the HTTP basic authentication credential as following.

      +
        +
      • To login to the VPN server as the entire server administrator, specify empty or "administrator" as the username field, + and specify the server administrative password as the password field.
      • +
      • To login to a particular Virtual Hub as the hub administrator, specify the hub name as the username field, and specify + the hub administrative password as the password field.
      • +
      + +

      Your HTML5 development contribution is very appreciated

      +

      This HTML5 page is obviously under construction, and providing very minimum functions as sample.
      This initial page is written by Daiyuu Nobori (the core developer of SoftEther VPN). He is obviously lack of HTML5 development ability.
      Please kindly consider to contribute for SoftEther VPN's development on GitHub. Your code will help every people running SoftEther VPN Server.

      + +

      This HTML5 page's JavaScript codes directly call SoftEther VPN Server JSON-RPC API on the running VPN Server from the web browser.
      You can also call the SoftEther VPN Server JSON-RPC API remotely from your original application. (JavaScript, TypeScript, C#, Java, Python, Ruby, etc.)

      +

      The insanely kindness API reference is available.

      + +

      List of Virtual Hubs

      +
        + +

        Create new Virtual Hub

        + Virtual Hub Name:
        + + +

        VPN Server Information

        +
          + +

          VPN Server Status

          +
            + +
            + + + + diff --git a/src/bin/hamcore/wwwroot/admin/default/out_webpack/bundle.js b/src/bin/hamcore/wwwroot/admin/default/out_webpack/bundle.js new file mode 100644 index 00000000..a2a06fdf --- /dev/null +++ b/src/bin/hamcore/wwwroot/admin/default/out_webpack/bundle.js @@ -0,0 +1,2144 @@ +var JS = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./src/ts/main.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/base64-js/index.js": +/*!*****************************************!*\ + !*** ./node_modules/base64-js/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYmFzZTY0LWpzL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvYmFzZTY0LWpzL2luZGV4LmpzPzFmYjUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnXG5cbmV4cG9ydHMuYnl0ZUxlbmd0aCA9IGJ5dGVMZW5ndGhcbmV4cG9ydHMudG9CeXRlQXJyYXkgPSB0b0J5dGVBcnJheVxuZXhwb3J0cy5mcm9tQnl0ZUFycmF5ID0gZnJvbUJ5dGVBcnJheVxuXG52YXIgbG9va3VwID0gW11cbnZhciByZXZMb29rdXAgPSBbXVxudmFyIEFyciA9IHR5cGVvZiBVaW50OEFycmF5ICE9PSAndW5kZWZpbmVkJyA/IFVpbnQ4QXJyYXkgOiBBcnJheVxuXG52YXIgY29kZSA9ICdBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvJ1xuZm9yICh2YXIgaSA9IDAsIGxlbiA9IGNvZGUubGVuZ3RoOyBpIDwgbGVuOyArK2kpIHtcbiAgbG9va3VwW2ldID0gY29kZVtpXVxuICByZXZMb29rdXBbY29kZS5jaGFyQ29kZUF0KGkpXSA9IGlcbn1cblxuLy8gU3VwcG9ydCBkZWNvZGluZyBVUkwtc2FmZSBiYXNlNjQgc3RyaW5ncywgYXMgTm9kZS5qcyBkb2VzLlxuLy8gU2VlOiBodHRwczovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9CYXNlNjQjVVJMX2FwcGxpY2F0aW9uc1xucmV2TG9va3VwWyctJy5jaGFyQ29kZUF0KDApXSA9IDYyXG5yZXZMb29rdXBbJ18nLmNoYXJDb2RlQXQoMCldID0gNjNcblxuZnVuY3Rpb24gZ2V0TGVucyAoYjY0KSB7XG4gIHZhciBsZW4gPSBiNjQubGVuZ3RoXG5cbiAgaWYgKGxlbiAlIDQgPiAwKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIHN0cmluZy4gTGVuZ3RoIG11c3QgYmUgYSBtdWx0aXBsZSBvZiA0JylcbiAgfVxuXG4gIC8vIFRyaW0gb2ZmIGV4dHJhIGJ5dGVzIGFmdGVyIHBsYWNlaG9sZGVyIGJ5dGVzIGFyZSBmb3VuZFxuICAvLyBTZWU6IGh0dHBzOi8vZ2l0aHViLmNvbS9iZWF0Z2FtbWl0L2Jhc2U2NC1qcy9pc3N1ZXMvNDJcbiAgdmFyIHZhbGlkTGVuID0gYjY0LmluZGV4T2YoJz0nKVxuICBpZiAodmFsaWRMZW4gPT09IC0xKSB2YWxpZExlbiA9IGxlblxuXG4gIHZhciBwbGFjZUhvbGRlcnNMZW4gPSB2YWxpZExlbiA9PT0gbGVuXG4gICAgPyAwXG4gICAgOiA0IC0gKHZhbGlkTGVuICUgNClcblxuICByZXR1cm4gW3ZhbGlkTGVuLCBwbGFjZUhvbGRlcnNMZW5dXG59XG5cbi8vIGJhc2U2NCBpcyA0LzMgKyB1cCB0byB0d28gY2hhcmFjdGVycyBvZiB0aGUgb3JpZ2luYWwgZGF0YVxuZnVuY3Rpb24gYnl0ZUxlbmd0aCAoYjY0KSB7XG4gIHZhciBsZW5zID0gZ2V0TGVucyhiNjQpXG4gIHZhciB2YWxpZExlbiA9IGxlbnNbMF1cbiAgdmFyIHBsYWNlSG9sZGVyc0xlbiA9IGxlbnNbMV1cbiAgcmV0dXJuICgodmFsaWRMZW4gKyBwbGFjZUhvbGRlcnNMZW4pICogMyAvIDQpIC0gcGxhY2VIb2xkZXJzTGVuXG59XG5cbmZ1bmN0aW9uIF9ieXRlTGVuZ3RoIChiNjQsIHZhbGlkTGVuLCBwbGFjZUhvbGRlcnNMZW4pIHtcbiAgcmV0dXJuICgodmFsaWRMZW4gKyBwbGFjZUhvbGRlcnNMZW4pICogMyAvIDQpIC0gcGxhY2VIb2xkZXJzTGVuXG59XG5cbmZ1bmN0aW9uIHRvQnl0ZUFycmF5IChiNjQpIHtcbiAgdmFyIHRtcFxuICB2YXIgbGVucyA9IGdldExlbnMoYjY0KVxuICB2YXIgdmFsaWRMZW4gPSBsZW5zWzBdXG4gIHZhciBwbGFjZUhvbGRlcnNMZW4gPSBsZW5zWzFdXG5cbiAgdmFyIGFyciA9IG5ldyBBcnIoX2J5dGVMZW5ndGgoYjY0LCB2YWxpZExlbiwgcGxhY2VIb2xkZXJzTGVuKSlcblxuICB2YXIgY3VyQnl0ZSA9IDBcblxuICAvLyBpZiB0aGVyZSBhcmUgcGxhY2Vob2xkZXJzLCBvbmx5IGdldCB1cCB0byB0aGUgbGFzdCBjb21wbGV0ZSA0IGNoYXJzXG4gIHZhciBsZW4gPSBwbGFjZUhvbGRlcnNMZW4gPiAwXG4gICAgPyB2YWxpZExlbiAtIDRcbiAgICA6IHZhbGlkTGVuXG5cbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47IGkgKz0gNCkge1xuICAgIHRtcCA9XG4gICAgICAocmV2TG9va3VwW2I2NC5jaGFyQ29kZUF0KGkpXSA8PCAxOCkgfFxuICAgICAgKHJldkxvb2t1cFtiNjQuY2hhckNvZGVBdChpICsgMSldIDw8IDEyKSB8XG4gICAgICAocmV2TG9va3VwW2I2NC5jaGFyQ29kZUF0KGkgKyAyKV0gPDwgNikgfFxuICAgICAgcmV2TG9va3VwW2I2NC5jaGFyQ29kZUF0KGkgKyAzKV1cbiAgICBhcnJbY3VyQnl0ZSsrXSA9ICh0bXAgPj4gMTYpICYgMHhGRlxuICAgIGFycltjdXJCeXRlKytdID0gKHRtcCA+PiA4KSAmIDB4RkZcbiAgICBhcnJbY3VyQnl0ZSsrXSA9IHRtcCAmIDB4RkZcbiAgfVxuXG4gIGlmIChwbGFjZUhvbGRlcnNMZW4gPT09IDIpIHtcbiAgICB0bXAgPVxuICAgICAgKHJldkxvb2t1cFtiNjQuY2hhckNvZGVBdChpKV0gPDwgMikgfFxuICAgICAgKHJldkxvb2t1cFtiNjQuY2hhckNvZGVBdChpICsgMSldID4+IDQpXG4gICAgYXJyW2N1ckJ5dGUrK10gPSB0bXAgJiAweEZGXG4gIH1cblxuICBpZiAocGxhY2VIb2xkZXJzTGVuID09PSAxKSB7XG4gICAgdG1wID1cbiAgICAgIChyZXZMb29rdXBbYjY0LmNoYXJDb2RlQXQoaSldIDw8IDEwKSB8XG4gICAgICAocmV2TG9va3VwW2I2NC5jaGFyQ29kZUF0KGkgKyAxKV0gPDwgNCkgfFxuICAgICAgKHJldkxvb2t1cFtiNjQuY2hhckNvZGVBdChpICsgMildID4+IDIpXG4gICAgYXJyW2N1ckJ5dGUrK10gPSAodG1wID4+IDgpICYgMHhGRlxuICAgIGFycltjdXJCeXRlKytdID0gdG1wICYgMHhGRlxuICB9XG5cbiAgcmV0dXJuIGFyclxufVxuXG5mdW5jdGlvbiB0cmlwbGV0VG9CYXNlNjQgKG51bSkge1xuICByZXR1cm4gbG9va3VwW251bSA+PiAxOCAmIDB4M0ZdICtcbiAgICBsb29rdXBbbnVtID4+IDEyICYgMHgzRl0gK1xuICAgIGxvb2t1cFtudW0gPj4gNiAmIDB4M0ZdICtcbiAgICBsb29rdXBbbnVtICYgMHgzRl1cbn1cblxuZnVuY3Rpb24gZW5jb2RlQ2h1bmsgKHVpbnQ4LCBzdGFydCwgZW5kKSB7XG4gIHZhciB0bXBcbiAgdmFyIG91dHB1dCA9IFtdXG4gIGZvciAodmFyIGkgPSBzdGFydDsgaSA8IGVuZDsgaSArPSAzKSB7XG4gICAgdG1wID1cbiAgICAgICgodWludDhbaV0gPDwgMTYpICYgMHhGRjAwMDApICtcbiAgICAgICgodWludDhbaSArIDFdIDw8IDgpICYgMHhGRjAwKSArXG4gICAgICAodWludDhbaSArIDJdICYgMHhGRilcbiAgICBvdXRwdXQucHVzaCh0cmlwbGV0VG9CYXNlNjQodG1wKSlcbiAgfVxuICByZXR1cm4gb3V0cHV0LmpvaW4oJycpXG59XG5cbmZ1bmN0aW9uIGZyb21CeXRlQXJyYXkgKHVpbnQ4KSB7XG4gIHZhciB0bXBcbiAgdmFyIGxlbiA9IHVpbnQ4Lmxlbmd0aFxuICB2YXIgZXh0cmFCeXRlcyA9IGxlbiAlIDMgLy8gaWYgd2UgaGF2ZSAxIGJ5dGUgbGVmdCwgcGFkIDIgYnl0ZXNcbiAgdmFyIHBhcnRzID0gW11cbiAgdmFyIG1heENodW5rTGVuZ3RoID0gMTYzODMgLy8gbXVzdCBiZSBtdWx0aXBsZSBvZiAzXG5cbiAgLy8gZ28gdGhyb3VnaCB0aGUgYXJyYXkgZXZlcnkgdGhyZWUgYnl0ZXMsIHdlJ2xsIGRlYWwgd2l0aCB0cmFpbGluZyBzdHVmZiBsYXRlclxuICBmb3IgKHZhciBpID0gMCwgbGVuMiA9IGxlbiAtIGV4dHJhQnl0ZXM7IGkgPCBsZW4yOyBpICs9IG1heENodW5rTGVuZ3RoKSB7XG4gICAgcGFydHMucHVzaChlbmNvZGVDaHVuayhcbiAgICAgIHVpbnQ4LCBpLCAoaSArIG1heENodW5rTGVuZ3RoKSA+IGxlbjIgPyBsZW4yIDogKGkgKyBtYXhDaHVua0xlbmd0aClcbiAgICApKVxuICB9XG5cbiAgLy8gcGFkIHRoZSBlbmQgd2l0aCB6ZXJvcywgYnV0IG1ha2Ugc3VyZSB0byBub3QgZm9yZ2V0IHRoZSBleHRyYSBieXRlc1xuICBpZiAoZXh0cmFCeXRlcyA9PT0gMSkge1xuICAgIHRtcCA9IHVpbnQ4W2xlbiAtIDFdXG4gICAgcGFydHMucHVzaChcbiAgICAgIGxvb2t1cFt0bXAgPj4gMl0gK1xuICAgICAgbG9va3VwWyh0bXAgPDwgNCkgJiAweDNGXSArXG4gICAgICAnPT0nXG4gICAgKVxuICB9IGVsc2UgaWYgKGV4dHJhQnl0ZXMgPT09IDIpIHtcbiAgICB0bXAgPSAodWludDhbbGVuIC0gMl0gPDwgOCkgKyB1aW50OFtsZW4gLSAxXVxuICAgIHBhcnRzLnB1c2goXG4gICAgICBsb29rdXBbdG1wID4+IDEwXSArXG4gICAgICBsb29rdXBbKHRtcCA+PiA0KSAmIDB4M0ZdICtcbiAgICAgIGxvb2t1cFsodG1wIDw8IDIpICYgMHgzRl0gK1xuICAgICAgJz0nXG4gICAgKVxuICB9XG5cbiAgcmV0dXJuIHBhcnRzLmpvaW4oJycpXG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/base64-js/index.js\n"); + +/***/ }), + +/***/ "./node_modules/buffer/index.js": +/*!**************************************!*\ + !*** ./node_modules/buffer/index.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYnVmZmVyL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvYnVmZmVyL2luZGV4LmpzP2I2MzkiXSwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBUaGUgYnVmZmVyIG1vZHVsZSBmcm9tIG5vZGUuanMsIGZvciB0aGUgYnJvd3Nlci5cbiAqXG4gKiBAYXV0aG9yICAgRmVyb3NzIEFib3VraGFkaWplaCA8ZmVyb3NzQGZlcm9zcy5vcmc+IDxodHRwOi8vZmVyb3NzLm9yZz5cbiAqIEBsaWNlbnNlICBNSVRcbiAqL1xuLyogZXNsaW50LWRpc2FibGUgbm8tcHJvdG8gKi9cblxuJ3VzZSBzdHJpY3QnXG5cbnZhciBiYXNlNjQgPSByZXF1aXJlKCdiYXNlNjQtanMnKVxudmFyIGllZWU3NTQgPSByZXF1aXJlKCdpZWVlNzU0JylcbnZhciBpc0FycmF5ID0gcmVxdWlyZSgnaXNhcnJheScpXG5cbmV4cG9ydHMuQnVmZmVyID0gQnVmZmVyXG5leHBvcnRzLlNsb3dCdWZmZXIgPSBTbG93QnVmZmVyXG5leHBvcnRzLklOU1BFQ1RfTUFYX0JZVEVTID0gNTBcblxuLyoqXG4gKiBJZiBgQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlRgOlxuICogICA9PT0gdHJ1ZSAgICBVc2UgVWludDhBcnJheSBpbXBsZW1lbnRhdGlvbiAoZmFzdGVzdClcbiAqICAgPT09IGZhbHNlICAgVXNlIE9iamVjdCBpbXBsZW1lbnRhdGlvbiAobW9zdCBjb21wYXRpYmxlLCBldmVuIElFNilcbiAqXG4gKiBCcm93c2VycyB0aGF0IHN1cHBvcnQgdHlwZWQgYXJyYXlzIGFyZSBJRSAxMCssIEZpcmVmb3ggNCssIENocm9tZSA3KywgU2FmYXJpIDUuMSssXG4gKiBPcGVyYSAxMS42KywgaU9TIDQuMisuXG4gKlxuICogRHVlIHRvIHZhcmlvdXMgYnJvd3NlciBidWdzLCBzb21ldGltZXMgdGhlIE9iamVjdCBpbXBsZW1lbnRhdGlvbiB3aWxsIGJlIHVzZWQgZXZlblxuICogd2hlbiB0aGUgYnJvd3NlciBzdXBwb3J0cyB0eXBlZCBhcnJheXMuXG4gKlxuICogTm90ZTpcbiAqXG4gKiAgIC0gRmlyZWZveCA0LTI5IGxhY2tzIHN1cHBvcnQgZm9yIGFkZGluZyBuZXcgcHJvcGVydGllcyB0byBgVWludDhBcnJheWAgaW5zdGFuY2VzLFxuICogICAgIFNlZTogaHR0cHM6Ly9idWd6aWxsYS5tb3ppbGxhLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9Njk1NDM4LlxuICpcbiAqICAgLSBDaHJvbWUgOS0xMCBpcyBtaXNzaW5nIHRoZSBgVHlwZWRBcnJheS5wcm90b3R5cGUuc3ViYXJyYXlgIGZ1bmN0aW9uLlxuICpcbiAqICAgLSBJRTEwIGhhcyBhIGJyb2tlbiBgVHlwZWRBcnJheS5wcm90b3R5cGUuc3ViYXJyYXlgIGZ1bmN0aW9uIHdoaWNoIHJldHVybnMgYXJyYXlzIG9mXG4gKiAgICAgaW5jb3JyZWN0IGxlbmd0aCBpbiBzb21lIHNpdHVhdGlvbnMuXG5cbiAqIFdlIGRldGVjdCB0aGVzZSBidWdneSBicm93c2VycyBhbmQgc2V0IGBCdWZmZXIuVFlQRURfQVJSQVlfU1VQUE9SVGAgdG8gYGZhbHNlYCBzbyB0aGV5XG4gKiBnZXQgdGhlIE9iamVjdCBpbXBsZW1lbnRhdGlvbiwgd2hpY2ggaXMgc2xvd2VyIGJ1dCBiZWhhdmVzIGNvcnJlY3RseS5cbiAqL1xuQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQgPSBnbG9iYWwuVFlQRURfQVJSQVlfU1VQUE9SVCAhPT0gdW5kZWZpbmVkXG4gID8gZ2xvYmFsLlRZUEVEX0FSUkFZX1NVUFBPUlRcbiAgOiB0eXBlZEFycmF5U3VwcG9ydCgpXG5cbi8qXG4gKiBFeHBvcnQga01heExlbmd0aCBhZnRlciB0eXBlZCBhcnJheSBzdXBwb3J0IGlzIGRldGVybWluZWQuXG4gKi9cbmV4cG9ydHMua01heExlbmd0aCA9IGtNYXhMZW5ndGgoKVxuXG5mdW5jdGlvbiB0eXBlZEFycmF5U3VwcG9ydCAoKSB7XG4gIHRyeSB7XG4gICAgdmFyIGFyciA9IG5ldyBVaW50OEFycmF5KDEpXG4gICAgYXJyLl9fcHJvdG9fXyA9IHtfX3Byb3RvX186IFVpbnQ4QXJyYXkucHJvdG90eXBlLCBmb286IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDQyIH19XG4gICAgcmV0dXJuIGFyci5mb28oKSA9PT0gNDIgJiYgLy8gdHlwZWQgYXJyYXkgaW5zdGFuY2VzIGNhbiBiZSBhdWdtZW50ZWRcbiAgICAgICAgdHlwZW9mIGFyci5zdWJhcnJheSA9PT0gJ2Z1bmN0aW9uJyAmJiAvLyBjaHJvbWUgOS0xMCBsYWNrIGBzdWJhcnJheWBcbiAgICAgICAgYXJyLnN1YmFycmF5KDEsIDEpLmJ5dGVMZW5ndGggPT09IDAgLy8gaWUxMCBoYXMgYnJva2VuIGBzdWJhcnJheWBcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiBmYWxzZVxuICB9XG59XG5cbmZ1bmN0aW9uIGtNYXhMZW5ndGggKCkge1xuICByZXR1cm4gQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlRcbiAgICA/IDB4N2ZmZmZmZmZcbiAgICA6IDB4M2ZmZmZmZmZcbn1cblxuZnVuY3Rpb24gY3JlYXRlQnVmZmVyICh0aGF0LCBsZW5ndGgpIHtcbiAgaWYgKGtNYXhMZW5ndGgoKSA8IGxlbmd0aCkge1xuICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdJbnZhbGlkIHR5cGVkIGFycmF5IGxlbmd0aCcpXG4gIH1cbiAgaWYgKEJ1ZmZlci5UWVBFRF9BUlJBWV9TVVBQT1JUKSB7XG4gICAgLy8gUmV0dXJuIGFuIGF1Z21lbnRlZCBgVWludDhBcnJheWAgaW5zdGFuY2UsIGZvciBiZXN0IHBlcmZvcm1hbmNlXG4gICAgdGhhdCA9IG5ldyBVaW50OEFycmF5KGxlbmd0aClcbiAgICB0aGF0Ll9fcHJvdG9fXyA9IEJ1ZmZlci5wcm90b3R5cGVcbiAgfSBlbHNlIHtcbiAgICAvLyBGYWxsYmFjazogUmV0dXJuIGFuIG9iamVjdCBpbnN0YW5jZSBvZiB0aGUgQnVmZmVyIGNsYXNzXG4gICAgaWYgKHRoYXQgPT09IG51bGwpIHtcbiAgICAgIHRoYXQgPSBuZXcgQnVmZmVyKGxlbmd0aClcbiAgICB9XG4gICAgdGhhdC5sZW5ndGggPSBsZW5ndGhcbiAgfVxuXG4gIHJldHVybiB0aGF0XG59XG5cbi8qKlxuICogVGhlIEJ1ZmZlciBjb25zdHJ1Y3RvciByZXR1cm5zIGluc3RhbmNlcyBvZiBgVWludDhBcnJheWAgdGhhdCBoYXZlIHRoZWlyXG4gKiBwcm90b3R5cGUgY2hhbmdlZCB0byBgQnVmZmVyLnByb3RvdHlwZWAuIEZ1cnRoZXJtb3JlLCBgQnVmZmVyYCBpcyBhIHN1YmNsYXNzIG9mXG4gKiBgVWludDhBcnJheWAsIHNvIHRoZSByZXR1cm5lZCBpbnN0YW5jZXMgd2lsbCBoYXZlIGFsbCB0aGUgbm9kZSBgQnVmZmVyYCBtZXRob2RzXG4gKiBhbmQgdGhlIGBVaW50OEFycmF5YCBtZXRob2RzLiBTcXVhcmUgYnJhY2tldCBub3RhdGlvbiB3b3JrcyBhcyBleHBlY3RlZCAtLSBpdFxuICogcmV0dXJucyBhIHNpbmdsZSBvY3RldC5cbiAqXG4gKiBUaGUgYFVpbnQ4QXJyYXlgIHByb3RvdHlwZSByZW1haW5zIHVubW9kaWZpZWQuXG4gKi9cblxuZnVuY3Rpb24gQnVmZmVyIChhcmcsIGVuY29kaW5nT3JPZmZzZXQsIGxlbmd0aCkge1xuICBpZiAoIUJ1ZmZlci5UWVBFRF9BUlJBWV9TVVBQT1JUICYmICEodGhpcyBpbnN0YW5jZW9mIEJ1ZmZlcikpIHtcbiAgICByZXR1cm4gbmV3IEJ1ZmZlcihhcmcsIGVuY29kaW5nT3JPZmZzZXQsIGxlbmd0aClcbiAgfVxuXG4gIC8vIENvbW1vbiBjYXNlLlxuICBpZiAodHlwZW9mIGFyZyA9PT0gJ251bWJlcicpIHtcbiAgICBpZiAodHlwZW9mIGVuY29kaW5nT3JPZmZzZXQgPT09ICdzdHJpbmcnKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICdJZiBlbmNvZGluZyBpcyBzcGVjaWZpZWQgdGhlbiB0aGUgZmlyc3QgYXJndW1lbnQgbXVzdCBiZSBhIHN0cmluZydcbiAgICAgIClcbiAgICB9XG4gICAgcmV0dXJuIGFsbG9jVW5zYWZlKHRoaXMsIGFyZylcbiAgfVxuICByZXR1cm4gZnJvbSh0aGlzLCBhcmcsIGVuY29kaW5nT3JPZmZzZXQsIGxlbmd0aClcbn1cblxuQnVmZmVyLnBvb2xTaXplID0gODE5MiAvLyBub3QgdXNlZCBieSB0aGlzIGltcGxlbWVudGF0aW9uXG5cbi8vIFRPRE86IExlZ2FjeSwgbm90IG5lZWRlZCBhbnltb3JlLiBSZW1vdmUgaW4gbmV4dCBtYWpvciB2ZXJzaW9uLlxuQnVmZmVyLl9hdWdtZW50ID0gZnVuY3Rpb24gKGFycikge1xuICBhcnIuX19wcm90b19fID0gQnVmZmVyLnByb3RvdHlwZVxuICByZXR1cm4gYXJyXG59XG5cbmZ1bmN0aW9uIGZyb20gKHRoYXQsIHZhbHVlLCBlbmNvZGluZ09yT2Zmc2V0LCBsZW5ndGgpIHtcbiAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ251bWJlcicpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdcInZhbHVlXCIgYXJndW1lbnQgbXVzdCBub3QgYmUgYSBudW1iZXInKVxuICB9XG5cbiAgaWYgKHR5cGVvZiBBcnJheUJ1ZmZlciAhPT0gJ3VuZGVmaW5lZCcgJiYgdmFsdWUgaW5zdGFuY2VvZiBBcnJheUJ1ZmZlcikge1xuICAgIHJldHVybiBmcm9tQXJyYXlCdWZmZXIodGhhdCwgdmFsdWUsIGVuY29kaW5nT3JPZmZzZXQsIGxlbmd0aClcbiAgfVxuXG4gIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7XG4gICAgcmV0dXJuIGZyb21TdHJpbmcodGhhdCwgdmFsdWUsIGVuY29kaW5nT3JPZmZzZXQpXG4gIH1cblxuICByZXR1cm4gZnJvbU9iamVjdCh0aGF0LCB2YWx1ZSlcbn1cblxuLyoqXG4gKiBGdW5jdGlvbmFsbHkgZXF1aXZhbGVudCB0byBCdWZmZXIoYXJnLCBlbmNvZGluZykgYnV0IHRocm93cyBhIFR5cGVFcnJvclxuICogaWYgdmFsdWUgaXMgYSBudW1iZXIuXG4gKiBCdWZmZXIuZnJvbShzdHJbLCBlbmNvZGluZ10pXG4gKiBCdWZmZXIuZnJvbShhcnJheSlcbiAqIEJ1ZmZlci5mcm9tKGJ1ZmZlcilcbiAqIEJ1ZmZlci5mcm9tKGFycmF5QnVmZmVyWywgYnl0ZU9mZnNldFssIGxlbmd0aF1dKVxuICoqL1xuQnVmZmVyLmZyb20gPSBmdW5jdGlvbiAodmFsdWUsIGVuY29kaW5nT3JPZmZzZXQsIGxlbmd0aCkge1xuICByZXR1cm4gZnJvbShudWxsLCB2YWx1ZSwgZW5jb2RpbmdPck9mZnNldCwgbGVuZ3RoKVxufVxuXG5pZiAoQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQpIHtcbiAgQnVmZmVyLnByb3RvdHlwZS5fX3Byb3RvX18gPSBVaW50OEFycmF5LnByb3RvdHlwZVxuICBCdWZmZXIuX19wcm90b19fID0gVWludDhBcnJheVxuICBpZiAodHlwZW9mIFN5bWJvbCAhPT0gJ3VuZGVmaW5lZCcgJiYgU3ltYm9sLnNwZWNpZXMgJiZcbiAgICAgIEJ1ZmZlcltTeW1ib2wuc3BlY2llc10gPT09IEJ1ZmZlcikge1xuICAgIC8vIEZpeCBzdWJhcnJheSgpIGluIEVTMjAxNi4gU2VlOiBodHRwczovL2dpdGh1Yi5jb20vZmVyb3NzL2J1ZmZlci9wdWxsLzk3XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEJ1ZmZlciwgU3ltYm9sLnNwZWNpZXMsIHtcbiAgICAgIHZhbHVlOiBudWxsLFxuICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSlcbiAgfVxufVxuXG5mdW5jdGlvbiBhc3NlcnRTaXplIChzaXplKSB7XG4gIGlmICh0eXBlb2Ygc2l6ZSAhPT0gJ251bWJlcicpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdcInNpemVcIiBhcmd1bWVudCBtdXN0IGJlIGEgbnVtYmVyJylcbiAgfSBlbHNlIGlmIChzaXplIDwgMCkge1xuICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdcInNpemVcIiBhcmd1bWVudCBtdXN0IG5vdCBiZSBuZWdhdGl2ZScpXG4gIH1cbn1cblxuZnVuY3Rpb24gYWxsb2MgKHRoYXQsIHNpemUsIGZpbGwsIGVuY29kaW5nKSB7XG4gIGFzc2VydFNpemUoc2l6ZSlcbiAgaWYgKHNpemUgPD0gMCkge1xuICAgIHJldHVybiBjcmVhdGVCdWZmZXIodGhhdCwgc2l6ZSlcbiAgfVxuICBpZiAoZmlsbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgLy8gT25seSBwYXkgYXR0ZW50aW9uIHRvIGVuY29kaW5nIGlmIGl0J3MgYSBzdHJpbmcuIFRoaXNcbiAgICAvLyBwcmV2ZW50cyBhY2NpZGVudGFsbHkgc2VuZGluZyBpbiBhIG51bWJlciB0aGF0IHdvdWxkXG4gICAgLy8gYmUgaW50ZXJwcmV0dGVkIGFzIGEgc3RhcnQgb2Zmc2V0LlxuICAgIHJldHVybiB0eXBlb2YgZW5jb2RpbmcgPT09ICdzdHJpbmcnXG4gICAgICA/IGNyZWF0ZUJ1ZmZlcih0aGF0LCBzaXplKS5maWxsKGZpbGwsIGVuY29kaW5nKVxuICAgICAgOiBjcmVhdGVCdWZmZXIodGhhdCwgc2l6ZSkuZmlsbChmaWxsKVxuICB9XG4gIHJldHVybiBjcmVhdGVCdWZmZXIodGhhdCwgc2l6ZSlcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgbmV3IGZpbGxlZCBCdWZmZXIgaW5zdGFuY2UuXG4gKiBhbGxvYyhzaXplWywgZmlsbFssIGVuY29kaW5nXV0pXG4gKiovXG5CdWZmZXIuYWxsb2MgPSBmdW5jdGlvbiAoc2l6ZSwgZmlsbCwgZW5jb2RpbmcpIHtcbiAgcmV0dXJuIGFsbG9jKG51bGwsIHNpemUsIGZpbGwsIGVuY29kaW5nKVxufVxuXG5mdW5jdGlvbiBhbGxvY1Vuc2FmZSAodGhhdCwgc2l6ZSkge1xuICBhc3NlcnRTaXplKHNpemUpXG4gIHRoYXQgPSBjcmVhdGVCdWZmZXIodGhhdCwgc2l6ZSA8IDAgPyAwIDogY2hlY2tlZChzaXplKSB8IDApXG4gIGlmICghQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHNpemU7ICsraSkge1xuICAgICAgdGhhdFtpXSA9IDBcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHRoYXRcbn1cblxuLyoqXG4gKiBFcXVpdmFsZW50IHRvIEJ1ZmZlcihudW0pLCBieSBkZWZhdWx0IGNyZWF0ZXMgYSBub24temVyby1maWxsZWQgQnVmZmVyIGluc3RhbmNlLlxuICogKi9cbkJ1ZmZlci5hbGxvY1Vuc2FmZSA9IGZ1bmN0aW9uIChzaXplKSB7XG4gIHJldHVybiBhbGxvY1Vuc2FmZShudWxsLCBzaXplKVxufVxuLyoqXG4gKiBFcXVpdmFsZW50IHRvIFNsb3dCdWZmZXIobnVtKSwgYnkgZGVmYXVsdCBjcmVhdGVzIGEgbm9uLXplcm8tZmlsbGVkIEJ1ZmZlciBpbnN0YW5jZS5cbiAqL1xuQnVmZmVyLmFsbG9jVW5zYWZlU2xvdyA9IGZ1bmN0aW9uIChzaXplKSB7XG4gIHJldHVybiBhbGxvY1Vuc2FmZShudWxsLCBzaXplKVxufVxuXG5mdW5jdGlvbiBmcm9tU3RyaW5nICh0aGF0LCBzdHJpbmcsIGVuY29kaW5nKSB7XG4gIGlmICh0eXBlb2YgZW5jb2RpbmcgIT09ICdzdHJpbmcnIHx8IGVuY29kaW5nID09PSAnJykge1xuICAgIGVuY29kaW5nID0gJ3V0ZjgnXG4gIH1cblxuICBpZiAoIUJ1ZmZlci5pc0VuY29kaW5nKGVuY29kaW5nKSkge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ1wiZW5jb2RpbmdcIiBtdXN0IGJlIGEgdmFsaWQgc3RyaW5nIGVuY29kaW5nJylcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBieXRlTGVuZ3RoKHN0cmluZywgZW5jb2RpbmcpIHwgMFxuICB0aGF0ID0gY3JlYXRlQnVmZmVyKHRoYXQsIGxlbmd0aClcblxuICB2YXIgYWN0dWFsID0gdGhhdC53cml0ZShzdHJpbmcsIGVuY29kaW5nKVxuXG4gIGlmIChhY3R1YWwgIT09IGxlbmd0aCkge1xuICAgIC8vIFdyaXRpbmcgYSBoZXggc3RyaW5nLCBmb3IgZXhhbXBsZSwgdGhhdCBjb250YWlucyBpbnZhbGlkIGNoYXJhY3RlcnMgd2lsbFxuICAgIC8vIGNhdXNlIGV2ZXJ5dGhpbmcgYWZ0ZXIgdGhlIGZpcnN0IGludmFsaWQgY2hhcmFjdGVyIHRvIGJlIGlnbm9yZWQuIChlLmcuXG4gICAgLy8gJ2FieHhjZCcgd2lsbCBiZSB0cmVhdGVkIGFzICdhYicpXG4gICAgdGhhdCA9IHRoYXQuc2xpY2UoMCwgYWN0dWFsKVxuICB9XG5cbiAgcmV0dXJuIHRoYXRcbn1cblxuZnVuY3Rpb24gZnJvbUFycmF5TGlrZSAodGhhdCwgYXJyYXkpIHtcbiAgdmFyIGxlbmd0aCA9IGFycmF5Lmxlbmd0aCA8IDAgPyAwIDogY2hlY2tlZChhcnJheS5sZW5ndGgpIHwgMFxuICB0aGF0ID0gY3JlYXRlQnVmZmVyKHRoYXQsIGxlbmd0aClcbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkgKz0gMSkge1xuICAgIHRoYXRbaV0gPSBhcnJheVtpXSAmIDI1NVxuICB9XG4gIHJldHVybiB0aGF0XG59XG5cbmZ1bmN0aW9uIGZyb21BcnJheUJ1ZmZlciAodGhhdCwgYXJyYXksIGJ5dGVPZmZzZXQsIGxlbmd0aCkge1xuICBhcnJheS5ieXRlTGVuZ3RoIC8vIHRoaXMgdGhyb3dzIGlmIGBhcnJheWAgaXMgbm90IGEgdmFsaWQgQXJyYXlCdWZmZXJcblxuICBpZiAoYnl0ZU9mZnNldCA8IDAgfHwgYXJyYXkuYnl0ZUxlbmd0aCA8IGJ5dGVPZmZzZXQpIHtcbiAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignXFwnb2Zmc2V0XFwnIGlzIG91dCBvZiBib3VuZHMnKVxuICB9XG5cbiAgaWYgKGFycmF5LmJ5dGVMZW5ndGggPCBieXRlT2Zmc2V0ICsgKGxlbmd0aCB8fCAwKSkge1xuICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdcXCdsZW5ndGhcXCcgaXMgb3V0IG9mIGJvdW5kcycpXG4gIH1cblxuICBpZiAoYnl0ZU9mZnNldCA9PT0gdW5kZWZpbmVkICYmIGxlbmd0aCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgYXJyYXkgPSBuZXcgVWludDhBcnJheShhcnJheSlcbiAgfSBlbHNlIGlmIChsZW5ndGggPT09IHVuZGVmaW5lZCkge1xuICAgIGFycmF5ID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXksIGJ5dGVPZmZzZXQpXG4gIH0gZWxzZSB7XG4gICAgYXJyYXkgPSBuZXcgVWludDhBcnJheShhcnJheSwgYnl0ZU9mZnNldCwgbGVuZ3RoKVxuICB9XG5cbiAgaWYgKEJ1ZmZlci5UWVBFRF9BUlJBWV9TVVBQT1JUKSB7XG4gICAgLy8gUmV0dXJuIGFuIGF1Z21lbnRlZCBgVWludDhBcnJheWAgaW5zdGFuY2UsIGZvciBiZXN0IHBlcmZvcm1hbmNlXG4gICAgdGhhdCA9IGFycmF5XG4gICAgdGhhdC5fX3Byb3RvX18gPSBCdWZmZXIucHJvdG90eXBlXG4gIH0gZWxzZSB7XG4gICAgLy8gRmFsbGJhY2s6IFJldHVybiBhbiBvYmplY3QgaW5zdGFuY2Ugb2YgdGhlIEJ1ZmZlciBjbGFzc1xuICAgIHRoYXQgPSBmcm9tQXJyYXlMaWtlKHRoYXQsIGFycmF5KVxuICB9XG4gIHJldHVybiB0aGF0XG59XG5cbmZ1bmN0aW9uIGZyb21PYmplY3QgKHRoYXQsIG9iaikge1xuICBpZiAoQnVmZmVyLmlzQnVmZmVyKG9iaikpIHtcbiAgICB2YXIgbGVuID0gY2hlY2tlZChvYmoubGVuZ3RoKSB8IDBcbiAgICB0aGF0ID0gY3JlYXRlQnVmZmVyKHRoYXQsIGxlbilcblxuICAgIGlmICh0aGF0Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgcmV0dXJuIHRoYXRcbiAgICB9XG5cbiAgICBvYmouY29weSh0aGF0LCAwLCAwLCBsZW4pXG4gICAgcmV0dXJuIHRoYXRcbiAgfVxuXG4gIGlmIChvYmopIHtcbiAgICBpZiAoKHR5cGVvZiBBcnJheUJ1ZmZlciAhPT0gJ3VuZGVmaW5lZCcgJiZcbiAgICAgICAgb2JqLmJ1ZmZlciBpbnN0YW5jZW9mIEFycmF5QnVmZmVyKSB8fCAnbGVuZ3RoJyBpbiBvYmopIHtcbiAgICAgIGlmICh0eXBlb2Ygb2JqLmxlbmd0aCAhPT0gJ251bWJlcicgfHwgaXNuYW4ob2JqLmxlbmd0aCkpIHtcbiAgICAgICAgcmV0dXJuIGNyZWF0ZUJ1ZmZlcih0aGF0LCAwKVxuICAgICAgfVxuICAgICAgcmV0dXJuIGZyb21BcnJheUxpa2UodGhhdCwgb2JqKVxuICAgIH1cblxuICAgIGlmIChvYmoudHlwZSA9PT0gJ0J1ZmZlcicgJiYgaXNBcnJheShvYmouZGF0YSkpIHtcbiAgICAgIHJldHVybiBmcm9tQXJyYXlMaWtlKHRoYXQsIG9iai5kYXRhKVxuICAgIH1cbiAgfVxuXG4gIHRocm93IG5ldyBUeXBlRXJyb3IoJ0ZpcnN0IGFyZ3VtZW50IG11c3QgYmUgYSBzdHJpbmcsIEJ1ZmZlciwgQXJyYXlCdWZmZXIsIEFycmF5LCBvciBhcnJheS1saWtlIG9iamVjdC4nKVxufVxuXG5mdW5jdGlvbiBjaGVja2VkIChsZW5ndGgpIHtcbiAgLy8gTm90ZTogY2Fubm90IHVzZSBgbGVuZ3RoIDwga01heExlbmd0aCgpYCBoZXJlIGJlY2F1c2UgdGhhdCBmYWlscyB3aGVuXG4gIC8vIGxlbmd0aCBpcyBOYU4gKHdoaWNoIGlzIG90aGVyd2lzZSBjb2VyY2VkIHRvIHplcm8uKVxuICBpZiAobGVuZ3RoID49IGtNYXhMZW5ndGgoKSkge1xuICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdBdHRlbXB0IHRvIGFsbG9jYXRlIEJ1ZmZlciBsYXJnZXIgdGhhbiBtYXhpbXVtICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICdzaXplOiAweCcgKyBrTWF4TGVuZ3RoKCkudG9TdHJpbmcoMTYpICsgJyBieXRlcycpXG4gIH1cbiAgcmV0dXJuIGxlbmd0aCB8IDBcbn1cblxuZnVuY3Rpb24gU2xvd0J1ZmZlciAobGVuZ3RoKSB7XG4gIGlmICgrbGVuZ3RoICE9IGxlbmd0aCkgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIGVxZXFlcVxuICAgIGxlbmd0aCA9IDBcbiAgfVxuICByZXR1cm4gQnVmZmVyLmFsbG9jKCtsZW5ndGgpXG59XG5cbkJ1ZmZlci5pc0J1ZmZlciA9IGZ1bmN0aW9uIGlzQnVmZmVyIChiKSB7XG4gIHJldHVybiAhIShiICE9IG51bGwgJiYgYi5faXNCdWZmZXIpXG59XG5cbkJ1ZmZlci5jb21wYXJlID0gZnVuY3Rpb24gY29tcGFyZSAoYSwgYikge1xuICBpZiAoIUJ1ZmZlci5pc0J1ZmZlcihhKSB8fCAhQnVmZmVyLmlzQnVmZmVyKGIpKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQXJndW1lbnRzIG11c3QgYmUgQnVmZmVycycpXG4gIH1cblxuICBpZiAoYSA9PT0gYikgcmV0dXJuIDBcblxuICB2YXIgeCA9IGEubGVuZ3RoXG4gIHZhciB5ID0gYi5sZW5ndGhcblxuICBmb3IgKHZhciBpID0gMCwgbGVuID0gTWF0aC5taW4oeCwgeSk7IGkgPCBsZW47ICsraSkge1xuICAgIGlmIChhW2ldICE9PSBiW2ldKSB7XG4gICAgICB4ID0gYVtpXVxuICAgICAgeSA9IGJbaV1cbiAgICAgIGJyZWFrXG4gICAgfVxuICB9XG5cbiAgaWYgKHggPCB5KSByZXR1cm4gLTFcbiAgaWYgKHkgPCB4KSByZXR1cm4gMVxuICByZXR1cm4gMFxufVxuXG5CdWZmZXIuaXNFbmNvZGluZyA9IGZ1bmN0aW9uIGlzRW5jb2RpbmcgKGVuY29kaW5nKSB7XG4gIHN3aXRjaCAoU3RyaW5nKGVuY29kaW5nKS50b0xvd2VyQ2FzZSgpKSB7XG4gICAgY2FzZSAnaGV4JzpcbiAgICBjYXNlICd1dGY4JzpcbiAgICBjYXNlICd1dGYtOCc6XG4gICAgY2FzZSAnYXNjaWknOlxuICAgIGNhc2UgJ2xhdGluMSc6XG4gICAgY2FzZSAnYmluYXJ5JzpcbiAgICBjYXNlICdiYXNlNjQnOlxuICAgIGNhc2UgJ3VjczInOlxuICAgIGNhc2UgJ3Vjcy0yJzpcbiAgICBjYXNlICd1dGYxNmxlJzpcbiAgICBjYXNlICd1dGYtMTZsZSc6XG4gICAgICByZXR1cm4gdHJ1ZVxuICAgIGRlZmF1bHQ6XG4gICAgICByZXR1cm4gZmFsc2VcbiAgfVxufVxuXG5CdWZmZXIuY29uY2F0ID0gZnVuY3Rpb24gY29uY2F0IChsaXN0LCBsZW5ndGgpIHtcbiAgaWYgKCFpc0FycmF5KGxpc3QpKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignXCJsaXN0XCIgYXJndW1lbnQgbXVzdCBiZSBhbiBBcnJheSBvZiBCdWZmZXJzJylcbiAgfVxuXG4gIGlmIChsaXN0Lmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybiBCdWZmZXIuYWxsb2MoMClcbiAgfVxuXG4gIHZhciBpXG4gIGlmIChsZW5ndGggPT09IHVuZGVmaW5lZCkge1xuICAgIGxlbmd0aCA9IDBcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7ICsraSkge1xuICAgICAgbGVuZ3RoICs9IGxpc3RbaV0ubGVuZ3RoXG4gICAgfVxuICB9XG5cbiAgdmFyIGJ1ZmZlciA9IEJ1ZmZlci5hbGxvY1Vuc2FmZShsZW5ndGgpXG4gIHZhciBwb3MgPSAwXG4gIGZvciAoaSA9IDA7IGkgPCBsaXN0Lmxlbmd0aDsgKytpKSB7XG4gICAgdmFyIGJ1ZiA9IGxpc3RbaV1cbiAgICBpZiAoIUJ1ZmZlci5pc0J1ZmZlcihidWYpKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdcImxpc3RcIiBhcmd1bWVudCBtdXN0IGJlIGFuIEFycmF5IG9mIEJ1ZmZlcnMnKVxuICAgIH1cbiAgICBidWYuY29weShidWZmZXIsIHBvcylcbiAgICBwb3MgKz0gYnVmLmxlbmd0aFxuICB9XG4gIHJldHVybiBidWZmZXJcbn1cblxuZnVuY3Rpb24gYnl0ZUxlbmd0aCAoc3RyaW5nLCBlbmNvZGluZykge1xuICBpZiAoQnVmZmVyLmlzQnVmZmVyKHN0cmluZykpIHtcbiAgICByZXR1cm4gc3RyaW5nLmxlbmd0aFxuICB9XG4gIGlmICh0eXBlb2YgQXJyYXlCdWZmZXIgIT09ICd1bmRlZmluZWQnICYmIHR5cGVvZiBBcnJheUJ1ZmZlci5pc1ZpZXcgPT09ICdmdW5jdGlvbicgJiZcbiAgICAgIChBcnJheUJ1ZmZlci5pc1ZpZXcoc3RyaW5nKSB8fCBzdHJpbmcgaW5zdGFuY2VvZiBBcnJheUJ1ZmZlcikpIHtcbiAgICByZXR1cm4gc3RyaW5nLmJ5dGVMZW5ndGhcbiAgfVxuICBpZiAodHlwZW9mIHN0cmluZyAhPT0gJ3N0cmluZycpIHtcbiAgICBzdHJpbmcgPSAnJyArIHN0cmluZ1xuICB9XG5cbiAgdmFyIGxlbiA9IHN0cmluZy5sZW5ndGhcbiAgaWYgKGxlbiA9PT0gMCkgcmV0dXJuIDBcblxuICAvLyBVc2UgYSBmb3IgbG9vcCB0byBhdm9pZCByZWN1cnNpb25cbiAgdmFyIGxvd2VyZWRDYXNlID0gZmFsc2VcbiAgZm9yICg7Oykge1xuICAgIHN3aXRjaCAoZW5jb2RpbmcpIHtcbiAgICAgIGNhc2UgJ2FzY2lpJzpcbiAgICAgIGNhc2UgJ2xhdGluMSc6XG4gICAgICBjYXNlICdiaW5hcnknOlxuICAgICAgICByZXR1cm4gbGVuXG4gICAgICBjYXNlICd1dGY4JzpcbiAgICAgIGNhc2UgJ3V0Zi04JzpcbiAgICAgIGNhc2UgdW5kZWZpbmVkOlxuICAgICAgICByZXR1cm4gdXRmOFRvQnl0ZXMoc3RyaW5nKS5sZW5ndGhcbiAgICAgIGNhc2UgJ3VjczInOlxuICAgICAgY2FzZSAndWNzLTInOlxuICAgICAgY2FzZSAndXRmMTZsZSc6XG4gICAgICBjYXNlICd1dGYtMTZsZSc6XG4gICAgICAgIHJldHVybiBsZW4gKiAyXG4gICAgICBjYXNlICdoZXgnOlxuICAgICAgICByZXR1cm4gbGVuID4+PiAxXG4gICAgICBjYXNlICdiYXNlNjQnOlxuICAgICAgICByZXR1cm4gYmFzZTY0VG9CeXRlcyhzdHJpbmcpLmxlbmd0aFxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgaWYgKGxvd2VyZWRDYXNlKSByZXR1cm4gdXRmOFRvQnl0ZXMoc3RyaW5nKS5sZW5ndGggLy8gYXNzdW1lIHV0ZjhcbiAgICAgICAgZW5jb2RpbmcgPSAoJycgKyBlbmNvZGluZykudG9Mb3dlckNhc2UoKVxuICAgICAgICBsb3dlcmVkQ2FzZSA9IHRydWVcbiAgICB9XG4gIH1cbn1cbkJ1ZmZlci5ieXRlTGVuZ3RoID0gYnl0ZUxlbmd0aFxuXG5mdW5jdGlvbiBzbG93VG9TdHJpbmcgKGVuY29kaW5nLCBzdGFydCwgZW5kKSB7XG4gIHZhciBsb3dlcmVkQ2FzZSA9IGZhbHNlXG5cbiAgLy8gTm8gbmVlZCB0byB2ZXJpZnkgdGhhdCBcInRoaXMubGVuZ3RoIDw9IE1BWF9VSU5UMzJcIiBzaW5jZSBpdCdzIGEgcmVhZC1vbmx5XG4gIC8vIHByb3BlcnR5IG9mIGEgdHlwZWQgYXJyYXkuXG5cbiAgLy8gVGhpcyBiZWhhdmVzIG5laXRoZXIgbGlrZSBTdHJpbmcgbm9yIFVpbnQ4QXJyYXkgaW4gdGhhdCB3ZSBzZXQgc3RhcnQvZW5kXG4gIC8vIHRvIHRoZWlyIHVwcGVyL2xvd2VyIGJvdW5kcyBpZiB0aGUgdmFsdWUgcGFzc2VkIGlzIG91dCBvZiByYW5nZS5cbiAgLy8gdW5kZWZpbmVkIGlzIGhhbmRsZWQgc3BlY2lhbGx5IGFzIHBlciBFQ01BLTI2MiA2dGggRWRpdGlvbixcbiAgLy8gU2VjdGlvbiAxMy4zLjMuNyBSdW50aW1lIFNlbWFudGljczogS2V5ZWRCaW5kaW5nSW5pdGlhbGl6YXRpb24uXG4gIGlmIChzdGFydCA9PT0gdW5kZWZpbmVkIHx8IHN0YXJ0IDwgMCkge1xuICAgIHN0YXJ0ID0gMFxuICB9XG4gIC8vIFJldHVybiBlYXJseSBpZiBzdGFydCA+IHRoaXMubGVuZ3RoLiBEb25lIGhlcmUgdG8gcHJldmVudCBwb3RlbnRpYWwgdWludDMyXG4gIC8vIGNvZXJjaW9uIGZhaWwgYmVsb3cuXG4gIGlmIChzdGFydCA+IHRoaXMubGVuZ3RoKSB7XG4gICAgcmV0dXJuICcnXG4gIH1cblxuICBpZiAoZW5kID09PSB1bmRlZmluZWQgfHwgZW5kID4gdGhpcy5sZW5ndGgpIHtcbiAgICBlbmQgPSB0aGlzLmxlbmd0aFxuICB9XG5cbiAgaWYgKGVuZCA8PSAwKSB7XG4gICAgcmV0dXJuICcnXG4gIH1cblxuICAvLyBGb3JjZSBjb2Vyc2lvbiB0byB1aW50MzIuIFRoaXMgd2lsbCBhbHNvIGNvZXJjZSBmYWxzZXkvTmFOIHZhbHVlcyB0byAwLlxuICBlbmQgPj4+PSAwXG4gIHN0YXJ0ID4+Pj0gMFxuXG4gIGlmIChlbmQgPD0gc3RhcnQpIHtcbiAgICByZXR1cm4gJydcbiAgfVxuXG4gIGlmICghZW5jb2RpbmcpIGVuY29kaW5nID0gJ3V0ZjgnXG5cbiAgd2hpbGUgKHRydWUpIHtcbiAgICBzd2l0Y2ggKGVuY29kaW5nKSB7XG4gICAgICBjYXNlICdoZXgnOlxuICAgICAgICByZXR1cm4gaGV4U2xpY2UodGhpcywgc3RhcnQsIGVuZClcblxuICAgICAgY2FzZSAndXRmOCc6XG4gICAgICBjYXNlICd1dGYtOCc6XG4gICAgICAgIHJldHVybiB1dGY4U2xpY2UodGhpcywgc3RhcnQsIGVuZClcblxuICAgICAgY2FzZSAnYXNjaWknOlxuICAgICAgICByZXR1cm4gYXNjaWlTbGljZSh0aGlzLCBzdGFydCwgZW5kKVxuXG4gICAgICBjYXNlICdsYXRpbjEnOlxuICAgICAgY2FzZSAnYmluYXJ5JzpcbiAgICAgICAgcmV0dXJuIGxhdGluMVNsaWNlKHRoaXMsIHN0YXJ0LCBlbmQpXG5cbiAgICAgIGNhc2UgJ2Jhc2U2NCc6XG4gICAgICAgIHJldHVybiBiYXNlNjRTbGljZSh0aGlzLCBzdGFydCwgZW5kKVxuXG4gICAgICBjYXNlICd1Y3MyJzpcbiAgICAgIGNhc2UgJ3Vjcy0yJzpcbiAgICAgIGNhc2UgJ3V0ZjE2bGUnOlxuICAgICAgY2FzZSAndXRmLTE2bGUnOlxuICAgICAgICByZXR1cm4gdXRmMTZsZVNsaWNlKHRoaXMsIHN0YXJ0LCBlbmQpXG5cbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIGlmIChsb3dlcmVkQ2FzZSkgdGhyb3cgbmV3IFR5cGVFcnJvcignVW5rbm93biBlbmNvZGluZzogJyArIGVuY29kaW5nKVxuICAgICAgICBlbmNvZGluZyA9IChlbmNvZGluZyArICcnKS50b0xvd2VyQ2FzZSgpXG4gICAgICAgIGxvd2VyZWRDYXNlID0gdHJ1ZVxuICAgIH1cbiAgfVxufVxuXG4vLyBUaGUgcHJvcGVydHkgaXMgdXNlZCBieSBgQnVmZmVyLmlzQnVmZmVyYCBhbmQgYGlzLWJ1ZmZlcmAgKGluIFNhZmFyaSA1LTcpIHRvIGRldGVjdFxuLy8gQnVmZmVyIGluc3RhbmNlcy5cbkJ1ZmZlci5wcm90b3R5cGUuX2lzQnVmZmVyID0gdHJ1ZVxuXG5mdW5jdGlvbiBzd2FwIChiLCBuLCBtKSB7XG4gIHZhciBpID0gYltuXVxuICBiW25dID0gYlttXVxuICBiW21dID0gaVxufVxuXG5CdWZmZXIucHJvdG90eXBlLnN3YXAxNiA9IGZ1bmN0aW9uIHN3YXAxNiAoKSB7XG4gIHZhciBsZW4gPSB0aGlzLmxlbmd0aFxuICBpZiAobGVuICUgMiAhPT0gMCkge1xuICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdCdWZmZXIgc2l6ZSBtdXN0IGJlIGEgbXVsdGlwbGUgb2YgMTYtYml0cycpXG4gIH1cbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47IGkgKz0gMikge1xuICAgIHN3YXAodGhpcywgaSwgaSArIDEpXG4gIH1cbiAgcmV0dXJuIHRoaXNcbn1cblxuQnVmZmVyLnByb3RvdHlwZS5zd2FwMzIgPSBmdW5jdGlvbiBzd2FwMzIgKCkge1xuICB2YXIgbGVuID0gdGhpcy5sZW5ndGhcbiAgaWYgKGxlbiAlIDQgIT09IDApIHtcbiAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignQnVmZmVyIHNpemUgbXVzdCBiZSBhIG11bHRpcGxlIG9mIDMyLWJpdHMnKVxuICB9XG4gIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyBpICs9IDQpIHtcbiAgICBzd2FwKHRoaXMsIGksIGkgKyAzKVxuICAgIHN3YXAodGhpcywgaSArIDEsIGkgKyAyKVxuICB9XG4gIHJldHVybiB0aGlzXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUuc3dhcDY0ID0gZnVuY3Rpb24gc3dhcDY0ICgpIHtcbiAgdmFyIGxlbiA9IHRoaXMubGVuZ3RoXG4gIGlmIChsZW4gJSA4ICE9PSAwKSB7XG4gICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ0J1ZmZlciBzaXplIG11c3QgYmUgYSBtdWx0aXBsZSBvZiA2NC1iaXRzJylcbiAgfVxuICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgaSArPSA4KSB7XG4gICAgc3dhcCh0aGlzLCBpLCBpICsgNylcbiAgICBzd2FwKHRoaXMsIGkgKyAxLCBpICsgNilcbiAgICBzd2FwKHRoaXMsIGkgKyAyLCBpICsgNSlcbiAgICBzd2FwKHRoaXMsIGkgKyAzLCBpICsgNClcbiAgfVxuICByZXR1cm4gdGhpc1xufVxuXG5CdWZmZXIucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24gdG9TdHJpbmcgKCkge1xuICB2YXIgbGVuZ3RoID0gdGhpcy5sZW5ndGggfCAwXG4gIGlmIChsZW5ndGggPT09IDApIHJldHVybiAnJ1xuICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkgcmV0dXJuIHV0ZjhTbGljZSh0aGlzLCAwLCBsZW5ndGgpXG4gIHJldHVybiBzbG93VG9TdHJpbmcuYXBwbHkodGhpcywgYXJndW1lbnRzKVxufVxuXG5CdWZmZXIucHJvdG90eXBlLmVxdWFscyA9IGZ1bmN0aW9uIGVxdWFscyAoYikge1xuICBpZiAoIUJ1ZmZlci5pc0J1ZmZlcihiKSkgdGhyb3cgbmV3IFR5cGVFcnJvcignQXJndW1lbnQgbXVzdCBiZSBhIEJ1ZmZlcicpXG4gIGlmICh0aGlzID09PSBiKSByZXR1cm4gdHJ1ZVxuICByZXR1cm4gQnVmZmVyLmNvbXBhcmUodGhpcywgYikgPT09IDBcbn1cblxuQnVmZmVyLnByb3RvdHlwZS5pbnNwZWN0ID0gZnVuY3Rpb24gaW5zcGVjdCAoKSB7XG4gIHZhciBzdHIgPSAnJ1xuICB2YXIgbWF4ID0gZXhwb3J0cy5JTlNQRUNUX01BWF9CWVRFU1xuICBpZiAodGhpcy5sZW5ndGggPiAwKSB7XG4gICAgc3RyID0gdGhpcy50b1N0cmluZygnaGV4JywgMCwgbWF4KS5tYXRjaCgvLnsyfS9nKS5qb2luKCcgJylcbiAgICBpZiAodGhpcy5sZW5ndGggPiBtYXgpIHN0ciArPSAnIC4uLiAnXG4gIH1cbiAgcmV0dXJuICc8QnVmZmVyICcgKyBzdHIgKyAnPidcbn1cblxuQnVmZmVyLnByb3RvdHlwZS5jb21wYXJlID0gZnVuY3Rpb24gY29tcGFyZSAodGFyZ2V0LCBzdGFydCwgZW5kLCB0aGlzU3RhcnQsIHRoaXNFbmQpIHtcbiAgaWYgKCFCdWZmZXIuaXNCdWZmZXIodGFyZ2V0KSkge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0FyZ3VtZW50IG11c3QgYmUgYSBCdWZmZXInKVxuICB9XG5cbiAgaWYgKHN0YXJ0ID09PSB1bmRlZmluZWQpIHtcbiAgICBzdGFydCA9IDBcbiAgfVxuICBpZiAoZW5kID09PSB1bmRlZmluZWQpIHtcbiAgICBlbmQgPSB0YXJnZXQgPyB0YXJnZXQubGVuZ3RoIDogMFxuICB9XG4gIGlmICh0aGlzU3RhcnQgPT09IHVuZGVmaW5lZCkge1xuICAgIHRoaXNTdGFydCA9IDBcbiAgfVxuICBpZiAodGhpc0VuZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgdGhpc0VuZCA9IHRoaXMubGVuZ3RoXG4gIH1cblxuICBpZiAoc3RhcnQgPCAwIHx8IGVuZCA+IHRhcmdldC5sZW5ndGggfHwgdGhpc1N0YXJ0IDwgMCB8fCB0aGlzRW5kID4gdGhpcy5sZW5ndGgpIHtcbiAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignb3V0IG9mIHJhbmdlIGluZGV4JylcbiAgfVxuXG4gIGlmICh0aGlzU3RhcnQgPj0gdGhpc0VuZCAmJiBzdGFydCA+PSBlbmQpIHtcbiAgICByZXR1cm4gMFxuICB9XG4gIGlmICh0aGlzU3RhcnQgPj0gdGhpc0VuZCkge1xuICAgIHJldHVybiAtMVxuICB9XG4gIGlmIChzdGFydCA+PSBlbmQpIHtcbiAgICByZXR1cm4gMVxuICB9XG5cbiAgc3RhcnQgPj4+PSAwXG4gIGVuZCA+Pj49IDBcbiAgdGhpc1N0YXJ0ID4+Pj0gMFxuICB0aGlzRW5kID4+Pj0gMFxuXG4gIGlmICh0aGlzID09PSB0YXJnZXQpIHJldHVybiAwXG5cbiAgdmFyIHggPSB0aGlzRW5kIC0gdGhpc1N0YXJ0XG4gIHZhciB5ID0gZW5kIC0gc3RhcnRcbiAgdmFyIGxlbiA9IE1hdGgubWluKHgsIHkpXG5cbiAgdmFyIHRoaXNDb3B5ID0gdGhpcy5zbGljZSh0aGlzU3RhcnQsIHRoaXNFbmQpXG4gIHZhciB0YXJnZXRDb3B5ID0gdGFyZ2V0LnNsaWNlKHN0YXJ0LCBlbmQpXG5cbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47ICsraSkge1xuICAgIGlmICh0aGlzQ29weVtpXSAhPT0gdGFyZ2V0Q29weVtpXSkge1xuICAgICAgeCA9IHRoaXNDb3B5W2ldXG4gICAgICB5ID0gdGFyZ2V0Q29weVtpXVxuICAgICAgYnJlYWtcbiAgICB9XG4gIH1cblxuICBpZiAoeCA8IHkpIHJldHVybiAtMVxuICBpZiAoeSA8IHgpIHJldHVybiAxXG4gIHJldHVybiAwXG59XG5cbi8vIEZpbmRzIGVpdGhlciB0aGUgZmlyc3QgaW5kZXggb2YgYHZhbGAgaW4gYGJ1ZmZlcmAgYXQgb2Zmc2V0ID49IGBieXRlT2Zmc2V0YCxcbi8vIE9SIHRoZSBsYXN0IGluZGV4IG9mIGB2YWxgIGluIGBidWZmZXJgIGF0IG9mZnNldCA8PSBgYnl0ZU9mZnNldGAuXG4vL1xuLy8gQXJndW1lbnRzOlxuLy8gLSBidWZmZXIgLSBhIEJ1ZmZlciB0byBzZWFyY2hcbi8vIC0gdmFsIC0gYSBzdHJpbmcsIEJ1ZmZlciwgb3IgbnVtYmVyXG4vLyAtIGJ5dGVPZmZzZXQgLSBhbiBpbmRleCBpbnRvIGBidWZmZXJgOyB3aWxsIGJlIGNsYW1wZWQgdG8gYW4gaW50MzJcbi8vIC0gZW5jb2RpbmcgLSBhbiBvcHRpb25hbCBlbmNvZGluZywgcmVsZXZhbnQgaXMgdmFsIGlzIGEgc3RyaW5nXG4vLyAtIGRpciAtIHRydWUgZm9yIGluZGV4T2YsIGZhbHNlIGZvciBsYXN0SW5kZXhPZlxuZnVuY3Rpb24gYmlkaXJlY3Rpb25hbEluZGV4T2YgKGJ1ZmZlciwgdmFsLCBieXRlT2Zmc2V0LCBlbmNvZGluZywgZGlyKSB7XG4gIC8vIEVtcHR5IGJ1ZmZlciBtZWFucyBubyBtYXRjaFxuICBpZiAoYnVmZmVyLmxlbmd0aCA9PT0gMCkgcmV0dXJuIC0xXG5cbiAgLy8gTm9ybWFsaXplIGJ5dGVPZmZzZXRcbiAgaWYgKHR5cGVvZiBieXRlT2Zmc2V0ID09PSAnc3RyaW5nJykge1xuICAgIGVuY29kaW5nID0gYnl0ZU9mZnNldFxuICAgIGJ5dGVPZmZzZXQgPSAwXG4gIH0gZWxzZSBpZiAoYnl0ZU9mZnNldCA+IDB4N2ZmZmZmZmYpIHtcbiAgICBieXRlT2Zmc2V0ID0gMHg3ZmZmZmZmZlxuICB9IGVsc2UgaWYgKGJ5dGVPZmZzZXQgPCAtMHg4MDAwMDAwMCkge1xuICAgIGJ5dGVPZmZzZXQgPSAtMHg4MDAwMDAwMFxuICB9XG4gIGJ5dGVPZmZzZXQgPSArYnl0ZU9mZnNldCAgLy8gQ29lcmNlIHRvIE51bWJlci5cbiAgaWYgKGlzTmFOKGJ5dGVPZmZzZXQpKSB7XG4gICAgLy8gYnl0ZU9mZnNldDogaXQgaXQncyB1bmRlZmluZWQsIG51bGwsIE5hTiwgXCJmb29cIiwgZXRjLCBzZWFyY2ggd2hvbGUgYnVmZmVyXG4gICAgYnl0ZU9mZnNldCA9IGRpciA/IDAgOiAoYnVmZmVyLmxlbmd0aCAtIDEpXG4gIH1cblxuICAvLyBOb3JtYWxpemUgYnl0ZU9mZnNldDogbmVnYXRpdmUgb2Zmc2V0cyBzdGFydCBmcm9tIHRoZSBlbmQgb2YgdGhlIGJ1ZmZlclxuICBpZiAoYnl0ZU9mZnNldCA8IDApIGJ5dGVPZmZzZXQgPSBidWZmZXIubGVuZ3RoICsgYnl0ZU9mZnNldFxuICBpZiAoYnl0ZU9mZnNldCA+PSBidWZmZXIubGVuZ3RoKSB7XG4gICAgaWYgKGRpcikgcmV0dXJuIC0xXG4gICAgZWxzZSBieXRlT2Zmc2V0ID0gYnVmZmVyLmxlbmd0aCAtIDFcbiAgfSBlbHNlIGlmIChieXRlT2Zmc2V0IDwgMCkge1xuICAgIGlmIChkaXIpIGJ5dGVPZmZzZXQgPSAwXG4gICAgZWxzZSByZXR1cm4gLTFcbiAgfVxuXG4gIC8vIE5vcm1hbGl6ZSB2YWxcbiAgaWYgKHR5cGVvZiB2YWwgPT09ICdzdHJpbmcnKSB7XG4gICAgdmFsID0gQnVmZmVyLmZyb20odmFsLCBlbmNvZGluZylcbiAgfVxuXG4gIC8vIEZpbmFsbHksIHNlYXJjaCBlaXRoZXIgaW5kZXhPZiAoaWYgZGlyIGlzIHRydWUpIG9yIGxhc3RJbmRleE9mXG4gIGlmIChCdWZmZXIuaXNCdWZmZXIodmFsKSkge1xuICAgIC8vIFNwZWNpYWwgY2FzZTogbG9va2luZyBmb3IgZW1wdHkgc3RyaW5nL2J1ZmZlciBhbHdheXMgZmFpbHNcbiAgICBpZiAodmFsLmxlbmd0aCA9PT0gMCkge1xuICAgICAgcmV0dXJuIC0xXG4gICAgfVxuICAgIHJldHVybiBhcnJheUluZGV4T2YoYnVmZmVyLCB2YWwsIGJ5dGVPZmZzZXQsIGVuY29kaW5nLCBkaXIpXG4gIH0gZWxzZSBpZiAodHlwZW9mIHZhbCA9PT0gJ251bWJlcicpIHtcbiAgICB2YWwgPSB2YWwgJiAweEZGIC8vIFNlYXJjaCBmb3IgYSBieXRlIHZhbHVlIFswLTI1NV1cbiAgICBpZiAoQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQgJiZcbiAgICAgICAgdHlwZW9mIFVpbnQ4QXJyYXkucHJvdG90eXBlLmluZGV4T2YgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIGlmIChkaXIpIHtcbiAgICAgICAgcmV0dXJuIFVpbnQ4QXJyYXkucHJvdG90eXBlLmluZGV4T2YuY2FsbChidWZmZXIsIHZhbCwgYnl0ZU9mZnNldClcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBVaW50OEFycmF5LnByb3RvdHlwZS5sYXN0SW5kZXhPZi5jYWxsKGJ1ZmZlciwgdmFsLCBieXRlT2Zmc2V0KVxuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gYXJyYXlJbmRleE9mKGJ1ZmZlciwgWyB2YWwgXSwgYnl0ZU9mZnNldCwgZW5jb2RpbmcsIGRpcilcbiAgfVxuXG4gIHRocm93IG5ldyBUeXBlRXJyb3IoJ3ZhbCBtdXN0IGJlIHN0cmluZywgbnVtYmVyIG9yIEJ1ZmZlcicpXG59XG5cbmZ1bmN0aW9uIGFycmF5SW5kZXhPZiAoYXJyLCB2YWwsIGJ5dGVPZmZzZXQsIGVuY29kaW5nLCBkaXIpIHtcbiAgdmFyIGluZGV4U2l6ZSA9IDFcbiAgdmFyIGFyckxlbmd0aCA9IGFyci5sZW5ndGhcbiAgdmFyIHZhbExlbmd0aCA9IHZhbC5sZW5ndGhcblxuICBpZiAoZW5jb2RpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgIGVuY29kaW5nID0gU3RyaW5nKGVuY29kaW5nKS50b0xvd2VyQ2FzZSgpXG4gICAgaWYgKGVuY29kaW5nID09PSAndWNzMicgfHwgZW5jb2RpbmcgPT09ICd1Y3MtMicgfHxcbiAgICAgICAgZW5jb2RpbmcgPT09ICd1dGYxNmxlJyB8fCBlbmNvZGluZyA9PT0gJ3V0Zi0xNmxlJykge1xuICAgICAgaWYgKGFyci5sZW5ndGggPCAyIHx8IHZhbC5sZW5ndGggPCAyKSB7XG4gICAgICAgIHJldHVybiAtMVxuICAgICAgfVxuICAgICAgaW5kZXhTaXplID0gMlxuICAgICAgYXJyTGVuZ3RoIC89IDJcbiAgICAgIHZhbExlbmd0aCAvPSAyXG4gICAgICBieXRlT2Zmc2V0IC89IDJcbiAgICB9XG4gIH1cblxuICBmdW5jdGlvbiByZWFkIChidWYsIGkpIHtcbiAgICBpZiAoaW5kZXhTaXplID09PSAxKSB7XG4gICAgICByZXR1cm4gYnVmW2ldXG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBidWYucmVhZFVJbnQxNkJFKGkgKiBpbmRleFNpemUpXG4gICAgfVxuICB9XG5cbiAgdmFyIGlcbiAgaWYgKGRpcikge1xuICAgIHZhciBmb3VuZEluZGV4ID0gLTFcbiAgICBmb3IgKGkgPSBieXRlT2Zmc2V0OyBpIDwgYXJyTGVuZ3RoOyBpKyspIHtcbiAgICAgIGlmIChyZWFkKGFyciwgaSkgPT09IHJlYWQodmFsLCBmb3VuZEluZGV4ID09PSAtMSA/IDAgOiBpIC0gZm91bmRJbmRleCkpIHtcbiAgICAgICAgaWYgKGZvdW5kSW5kZXggPT09IC0xKSBmb3VuZEluZGV4ID0gaVxuICAgICAgICBpZiAoaSAtIGZvdW5kSW5kZXggKyAxID09PSB2YWxMZW5ndGgpIHJldHVybiBmb3VuZEluZGV4ICogaW5kZXhTaXplXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoZm91bmRJbmRleCAhPT0gLTEpIGkgLT0gaSAtIGZvdW5kSW5kZXhcbiAgICAgICAgZm91bmRJbmRleCA9IC0xXG4gICAgICB9XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGlmIChieXRlT2Zmc2V0ICsgdmFsTGVuZ3RoID4gYXJyTGVuZ3RoKSBieXRlT2Zmc2V0ID0gYXJyTGVuZ3RoIC0gdmFsTGVuZ3RoXG4gICAgZm9yIChpID0gYnl0ZU9mZnNldDsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHZhciBmb3VuZCA9IHRydWVcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdmFsTGVuZ3RoOyBqKyspIHtcbiAgICAgICAgaWYgKHJlYWQoYXJyLCBpICsgaikgIT09IHJlYWQodmFsLCBqKSkge1xuICAgICAgICAgIGZvdW5kID0gZmFsc2VcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoZm91bmQpIHJldHVybiBpXG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIC0xXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUuaW5jbHVkZXMgPSBmdW5jdGlvbiBpbmNsdWRlcyAodmFsLCBieXRlT2Zmc2V0LCBlbmNvZGluZykge1xuICByZXR1cm4gdGhpcy5pbmRleE9mKHZhbCwgYnl0ZU9mZnNldCwgZW5jb2RpbmcpICE9PSAtMVxufVxuXG5CdWZmZXIucHJvdG90eXBlLmluZGV4T2YgPSBmdW5jdGlvbiBpbmRleE9mICh2YWwsIGJ5dGVPZmZzZXQsIGVuY29kaW5nKSB7XG4gIHJldHVybiBiaWRpcmVjdGlvbmFsSW5kZXhPZih0aGlzLCB2YWwsIGJ5dGVPZmZzZXQsIGVuY29kaW5nLCB0cnVlKVxufVxuXG5CdWZmZXIucHJvdG90eXBlLmxhc3RJbmRleE9mID0gZnVuY3Rpb24gbGFzdEluZGV4T2YgKHZhbCwgYnl0ZU9mZnNldCwgZW5jb2RpbmcpIHtcbiAgcmV0dXJuIGJpZGlyZWN0aW9uYWxJbmRleE9mKHRoaXMsIHZhbCwgYnl0ZU9mZnNldCwgZW5jb2RpbmcsIGZhbHNlKVxufVxuXG5mdW5jdGlvbiBoZXhXcml0ZSAoYnVmLCBzdHJpbmcsIG9mZnNldCwgbGVuZ3RoKSB7XG4gIG9mZnNldCA9IE51bWJlcihvZmZzZXQpIHx8IDBcbiAgdmFyIHJlbWFpbmluZyA9IGJ1Zi5sZW5ndGggLSBvZmZzZXRcbiAgaWYgKCFsZW5ndGgpIHtcbiAgICBsZW5ndGggPSByZW1haW5pbmdcbiAgfSBlbHNlIHtcbiAgICBsZW5ndGggPSBOdW1iZXIobGVuZ3RoKVxuICAgIGlmIChsZW5ndGggPiByZW1haW5pbmcpIHtcbiAgICAgIGxlbmd0aCA9IHJlbWFpbmluZ1xuICAgIH1cbiAgfVxuXG4gIC8vIG11c3QgYmUgYW4gZXZlbiBudW1iZXIgb2YgZGlnaXRzXG4gIHZhciBzdHJMZW4gPSBzdHJpbmcubGVuZ3RoXG4gIGlmIChzdHJMZW4gJSAyICE9PSAwKSB0aHJvdyBuZXcgVHlwZUVycm9yKCdJbnZhbGlkIGhleCBzdHJpbmcnKVxuXG4gIGlmIChsZW5ndGggPiBzdHJMZW4gLyAyKSB7XG4gICAgbGVuZ3RoID0gc3RyTGVuIC8gMlxuICB9XG4gIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyArK2kpIHtcbiAgICB2YXIgcGFyc2VkID0gcGFyc2VJbnQoc3RyaW5nLnN1YnN0cihpICogMiwgMiksIDE2KVxuICAgIGlmIChpc05hTihwYXJzZWQpKSByZXR1cm4gaVxuICAgIGJ1ZltvZmZzZXQgKyBpXSA9IHBhcnNlZFxuICB9XG4gIHJldHVybiBpXG59XG5cbmZ1bmN0aW9uIHV0ZjhXcml0ZSAoYnVmLCBzdHJpbmcsIG9mZnNldCwgbGVuZ3RoKSB7XG4gIHJldHVybiBibGl0QnVmZmVyKHV0ZjhUb0J5dGVzKHN0cmluZywgYnVmLmxlbmd0aCAtIG9mZnNldCksIGJ1Ziwgb2Zmc2V0LCBsZW5ndGgpXG59XG5cbmZ1bmN0aW9uIGFzY2lpV3JpdGUgKGJ1Ziwgc3RyaW5nLCBvZmZzZXQsIGxlbmd0aCkge1xuICByZXR1cm4gYmxpdEJ1ZmZlcihhc2NpaVRvQnl0ZXMoc3RyaW5nKSwgYnVmLCBvZmZzZXQsIGxlbmd0aClcbn1cblxuZnVuY3Rpb24gbGF0aW4xV3JpdGUgKGJ1Ziwgc3RyaW5nLCBvZmZzZXQsIGxlbmd0aCkge1xuICByZXR1cm4gYXNjaWlXcml0ZShidWYsIHN0cmluZywgb2Zmc2V0LCBsZW5ndGgpXG59XG5cbmZ1bmN0aW9uIGJhc2U2NFdyaXRlIChidWYsIHN0cmluZywgb2Zmc2V0LCBsZW5ndGgpIHtcbiAgcmV0dXJuIGJsaXRCdWZmZXIoYmFzZTY0VG9CeXRlcyhzdHJpbmcpLCBidWYsIG9mZnNldCwgbGVuZ3RoKVxufVxuXG5mdW5jdGlvbiB1Y3MyV3JpdGUgKGJ1Ziwgc3RyaW5nLCBvZmZzZXQsIGxlbmd0aCkge1xuICByZXR1cm4gYmxpdEJ1ZmZlcih1dGYxNmxlVG9CeXRlcyhzdHJpbmcsIGJ1Zi5sZW5ndGggLSBvZmZzZXQpLCBidWYsIG9mZnNldCwgbGVuZ3RoKVxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlID0gZnVuY3Rpb24gd3JpdGUgKHN0cmluZywgb2Zmc2V0LCBsZW5ndGgsIGVuY29kaW5nKSB7XG4gIC8vIEJ1ZmZlciN3cml0ZShzdHJpbmcpXG4gIGlmIChvZmZzZXQgPT09IHVuZGVmaW5lZCkge1xuICAgIGVuY29kaW5nID0gJ3V0ZjgnXG4gICAgbGVuZ3RoID0gdGhpcy5sZW5ndGhcbiAgICBvZmZzZXQgPSAwXG4gIC8vIEJ1ZmZlciN3cml0ZShzdHJpbmcsIGVuY29kaW5nKVxuICB9IGVsc2UgaWYgKGxlbmd0aCA9PT0gdW5kZWZpbmVkICYmIHR5cGVvZiBvZmZzZXQgPT09ICdzdHJpbmcnKSB7XG4gICAgZW5jb2RpbmcgPSBvZmZzZXRcbiAgICBsZW5ndGggPSB0aGlzLmxlbmd0aFxuICAgIG9mZnNldCA9IDBcbiAgLy8gQnVmZmVyI3dyaXRlKHN0cmluZywgb2Zmc2V0WywgbGVuZ3RoXVssIGVuY29kaW5nXSlcbiAgfSBlbHNlIGlmIChpc0Zpbml0ZShvZmZzZXQpKSB7XG4gICAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICAgIGlmIChpc0Zpbml0ZShsZW5ndGgpKSB7XG4gICAgICBsZW5ndGggPSBsZW5ndGggfCAwXG4gICAgICBpZiAoZW5jb2RpbmcgPT09IHVuZGVmaW5lZCkgZW5jb2RpbmcgPSAndXRmOCdcbiAgICB9IGVsc2Uge1xuICAgICAgZW5jb2RpbmcgPSBsZW5ndGhcbiAgICAgIGxlbmd0aCA9IHVuZGVmaW5lZFxuICAgIH1cbiAgLy8gbGVnYWN5IHdyaXRlKHN0cmluZywgZW5jb2RpbmcsIG9mZnNldCwgbGVuZ3RoKSAtIHJlbW92ZSBpbiB2MC4xM1xuICB9IGVsc2Uge1xuICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICdCdWZmZXIud3JpdGUoc3RyaW5nLCBlbmNvZGluZywgb2Zmc2V0WywgbGVuZ3RoXSkgaXMgbm8gbG9uZ2VyIHN1cHBvcnRlZCdcbiAgICApXG4gIH1cblxuICB2YXIgcmVtYWluaW5nID0gdGhpcy5sZW5ndGggLSBvZmZzZXRcbiAgaWYgKGxlbmd0aCA9PT0gdW5kZWZpbmVkIHx8IGxlbmd0aCA+IHJlbWFpbmluZykgbGVuZ3RoID0gcmVtYWluaW5nXG5cbiAgaWYgKChzdHJpbmcubGVuZ3RoID4gMCAmJiAobGVuZ3RoIDwgMCB8fCBvZmZzZXQgPCAwKSkgfHwgb2Zmc2V0ID4gdGhpcy5sZW5ndGgpIHtcbiAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignQXR0ZW1wdCB0byB3cml0ZSBvdXRzaWRlIGJ1ZmZlciBib3VuZHMnKVxuICB9XG5cbiAgaWYgKCFlbmNvZGluZykgZW5jb2RpbmcgPSAndXRmOCdcblxuICB2YXIgbG93ZXJlZENhc2UgPSBmYWxzZVxuICBmb3IgKDs7KSB7XG4gICAgc3dpdGNoIChlbmNvZGluZykge1xuICAgICAgY2FzZSAnaGV4JzpcbiAgICAgICAgcmV0dXJuIGhleFdyaXRlKHRoaXMsIHN0cmluZywgb2Zmc2V0LCBsZW5ndGgpXG5cbiAgICAgIGNhc2UgJ3V0ZjgnOlxuICAgICAgY2FzZSAndXRmLTgnOlxuICAgICAgICByZXR1cm4gdXRmOFdyaXRlKHRoaXMsIHN0cmluZywgb2Zmc2V0LCBsZW5ndGgpXG5cbiAgICAgIGNhc2UgJ2FzY2lpJzpcbiAgICAgICAgcmV0dXJuIGFzY2lpV3JpdGUodGhpcywgc3RyaW5nLCBvZmZzZXQsIGxlbmd0aClcblxuICAgICAgY2FzZSAnbGF0aW4xJzpcbiAgICAgIGNhc2UgJ2JpbmFyeSc6XG4gICAgICAgIHJldHVybiBsYXRpbjFXcml0ZSh0aGlzLCBzdHJpbmcsIG9mZnNldCwgbGVuZ3RoKVxuXG4gICAgICBjYXNlICdiYXNlNjQnOlxuICAgICAgICAvLyBXYXJuaW5nOiBtYXhMZW5ndGggbm90IHRha2VuIGludG8gYWNjb3VudCBpbiBiYXNlNjRXcml0ZVxuICAgICAgICByZXR1cm4gYmFzZTY0V3JpdGUodGhpcywgc3RyaW5nLCBvZmZzZXQsIGxlbmd0aClcblxuICAgICAgY2FzZSAndWNzMic6XG4gICAgICBjYXNlICd1Y3MtMic6XG4gICAgICBjYXNlICd1dGYxNmxlJzpcbiAgICAgIGNhc2UgJ3V0Zi0xNmxlJzpcbiAgICAgICAgcmV0dXJuIHVjczJXcml0ZSh0aGlzLCBzdHJpbmcsIG9mZnNldCwgbGVuZ3RoKVxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICBpZiAobG93ZXJlZENhc2UpIHRocm93IG5ldyBUeXBlRXJyb3IoJ1Vua25vd24gZW5jb2Rpbmc6ICcgKyBlbmNvZGluZylcbiAgICAgICAgZW5jb2RpbmcgPSAoJycgKyBlbmNvZGluZykudG9Mb3dlckNhc2UoKVxuICAgICAgICBsb3dlcmVkQ2FzZSA9IHRydWVcbiAgICB9XG4gIH1cbn1cblxuQnVmZmVyLnByb3RvdHlwZS50b0pTT04gPSBmdW5jdGlvbiB0b0pTT04gKCkge1xuICByZXR1cm4ge1xuICAgIHR5cGU6ICdCdWZmZXInLFxuICAgIGRhdGE6IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKHRoaXMuX2FyciB8fCB0aGlzLCAwKVxuICB9XG59XG5cbmZ1bmN0aW9uIGJhc2U2NFNsaWNlIChidWYsIHN0YXJ0LCBlbmQpIHtcbiAgaWYgKHN0YXJ0ID09PSAwICYmIGVuZCA9PT0gYnVmLmxlbmd0aCkge1xuICAgIHJldHVybiBiYXNlNjQuZnJvbUJ5dGVBcnJheShidWYpXG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIGJhc2U2NC5mcm9tQnl0ZUFycmF5KGJ1Zi5zbGljZShzdGFydCwgZW5kKSlcbiAgfVxufVxuXG5mdW5jdGlvbiB1dGY4U2xpY2UgKGJ1Ziwgc3RhcnQsIGVuZCkge1xuICBlbmQgPSBNYXRoLm1pbihidWYubGVuZ3RoLCBlbmQpXG4gIHZhciByZXMgPSBbXVxuXG4gIHZhciBpID0gc3RhcnRcbiAgd2hpbGUgKGkgPCBlbmQpIHtcbiAgICB2YXIgZmlyc3RCeXRlID0gYnVmW2ldXG4gICAgdmFyIGNvZGVQb2ludCA9IG51bGxcbiAgICB2YXIgYnl0ZXNQZXJTZXF1ZW5jZSA9IChmaXJzdEJ5dGUgPiAweEVGKSA/IDRcbiAgICAgIDogKGZpcnN0Qnl0ZSA+IDB4REYpID8gM1xuICAgICAgOiAoZmlyc3RCeXRlID4gMHhCRikgPyAyXG4gICAgICA6IDFcblxuICAgIGlmIChpICsgYnl0ZXNQZXJTZXF1ZW5jZSA8PSBlbmQpIHtcbiAgICAgIHZhciBzZWNvbmRCeXRlLCB0aGlyZEJ5dGUsIGZvdXJ0aEJ5dGUsIHRlbXBDb2RlUG9pbnRcblxuICAgICAgc3dpdGNoIChieXRlc1BlclNlcXVlbmNlKSB7XG4gICAgICAgIGNhc2UgMTpcbiAgICAgICAgICBpZiAoZmlyc3RCeXRlIDwgMHg4MCkge1xuICAgICAgICAgICAgY29kZVBvaW50ID0gZmlyc3RCeXRlXG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICBzZWNvbmRCeXRlID0gYnVmW2kgKyAxXVxuICAgICAgICAgIGlmICgoc2Vjb25kQnl0ZSAmIDB4QzApID09PSAweDgwKSB7XG4gICAgICAgICAgICB0ZW1wQ29kZVBvaW50ID0gKGZpcnN0Qnl0ZSAmIDB4MUYpIDw8IDB4NiB8IChzZWNvbmRCeXRlICYgMHgzRilcbiAgICAgICAgICAgIGlmICh0ZW1wQ29kZVBvaW50ID4gMHg3Rikge1xuICAgICAgICAgICAgICBjb2RlUG9pbnQgPSB0ZW1wQ29kZVBvaW50XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgMzpcbiAgICAgICAgICBzZWNvbmRCeXRlID0gYnVmW2kgKyAxXVxuICAgICAgICAgIHRoaXJkQnl0ZSA9IGJ1ZltpICsgMl1cbiAgICAgICAgICBpZiAoKHNlY29uZEJ5dGUgJiAweEMwKSA9PT0gMHg4MCAmJiAodGhpcmRCeXRlICYgMHhDMCkgPT09IDB4ODApIHtcbiAgICAgICAgICAgIHRlbXBDb2RlUG9pbnQgPSAoZmlyc3RCeXRlICYgMHhGKSA8PCAweEMgfCAoc2Vjb25kQnl0ZSAmIDB4M0YpIDw8IDB4NiB8ICh0aGlyZEJ5dGUgJiAweDNGKVxuICAgICAgICAgICAgaWYgKHRlbXBDb2RlUG9pbnQgPiAweDdGRiAmJiAodGVtcENvZGVQb2ludCA8IDB4RDgwMCB8fCB0ZW1wQ29kZVBvaW50ID4gMHhERkZGKSkge1xuICAgICAgICAgICAgICBjb2RlUG9pbnQgPSB0ZW1wQ29kZVBvaW50XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgNDpcbiAgICAgICAgICBzZWNvbmRCeXRlID0gYnVmW2kgKyAxXVxuICAgICAgICAgIHRoaXJkQnl0ZSA9IGJ1ZltpICsgMl1cbiAgICAgICAgICBmb3VydGhCeXRlID0gYnVmW2kgKyAzXVxuICAgICAgICAgIGlmICgoc2Vjb25kQnl0ZSAmIDB4QzApID09PSAweDgwICYmICh0aGlyZEJ5dGUgJiAweEMwKSA9PT0gMHg4MCAmJiAoZm91cnRoQnl0ZSAmIDB4QzApID09PSAweDgwKSB7XG4gICAgICAgICAgICB0ZW1wQ29kZVBvaW50ID0gKGZpcnN0Qnl0ZSAmIDB4RikgPDwgMHgxMiB8IChzZWNvbmRCeXRlICYgMHgzRikgPDwgMHhDIHwgKHRoaXJkQnl0ZSAmIDB4M0YpIDw8IDB4NiB8IChmb3VydGhCeXRlICYgMHgzRilcbiAgICAgICAgICAgIGlmICh0ZW1wQ29kZVBvaW50ID4gMHhGRkZGICYmIHRlbXBDb2RlUG9pbnQgPCAweDExMDAwMCkge1xuICAgICAgICAgICAgICBjb2RlUG9pbnQgPSB0ZW1wQ29kZVBvaW50XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChjb2RlUG9pbnQgPT09IG51bGwpIHtcbiAgICAgIC8vIHdlIGRpZCBub3QgZ2VuZXJhdGUgYSB2YWxpZCBjb2RlUG9pbnQgc28gaW5zZXJ0IGFcbiAgICAgIC8vIHJlcGxhY2VtZW50IGNoYXIgKFUrRkZGRCkgYW5kIGFkdmFuY2Ugb25seSAxIGJ5dGVcbiAgICAgIGNvZGVQb2ludCA9IDB4RkZGRFxuICAgICAgYnl0ZXNQZXJTZXF1ZW5jZSA9IDFcbiAgICB9IGVsc2UgaWYgKGNvZGVQb2ludCA+IDB4RkZGRikge1xuICAgICAgLy8gZW5jb2RlIHRvIHV0ZjE2IChzdXJyb2dhdGUgcGFpciBkYW5jZSlcbiAgICAgIGNvZGVQb2ludCAtPSAweDEwMDAwXG4gICAgICByZXMucHVzaChjb2RlUG9pbnQgPj4+IDEwICYgMHgzRkYgfCAweEQ4MDApXG4gICAgICBjb2RlUG9pbnQgPSAweERDMDAgfCBjb2RlUG9pbnQgJiAweDNGRlxuICAgIH1cblxuICAgIHJlcy5wdXNoKGNvZGVQb2ludClcbiAgICBpICs9IGJ5dGVzUGVyU2VxdWVuY2VcbiAgfVxuXG4gIHJldHVybiBkZWNvZGVDb2RlUG9pbnRzQXJyYXkocmVzKVxufVxuXG4vLyBCYXNlZCBvbiBodHRwOi8vc3RhY2tvdmVyZmxvdy5jb20vYS8yMjc0NzI3Mi82ODA3NDIsIHRoZSBicm93c2VyIHdpdGhcbi8vIHRoZSBsb3dlc3QgbGltaXQgaXMgQ2hyb21lLCB3aXRoIDB4MTAwMDAgYXJncy5cbi8vIFdlIGdvIDEgbWFnbml0dWRlIGxlc3MsIGZvciBzYWZldHlcbnZhciBNQVhfQVJHVU1FTlRTX0xFTkdUSCA9IDB4MTAwMFxuXG5mdW5jdGlvbiBkZWNvZGVDb2RlUG9pbnRzQXJyYXkgKGNvZGVQb2ludHMpIHtcbiAgdmFyIGxlbiA9IGNvZGVQb2ludHMubGVuZ3RoXG4gIGlmIChsZW4gPD0gTUFYX0FSR1VNRU5UU19MRU5HVEgpIHtcbiAgICByZXR1cm4gU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNvZGVQb2ludHMpIC8vIGF2b2lkIGV4dHJhIHNsaWNlKClcbiAgfVxuXG4gIC8vIERlY29kZSBpbiBjaHVua3MgdG8gYXZvaWQgXCJjYWxsIHN0YWNrIHNpemUgZXhjZWVkZWRcIi5cbiAgdmFyIHJlcyA9ICcnXG4gIHZhciBpID0gMFxuICB3aGlsZSAoaSA8IGxlbikge1xuICAgIHJlcyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlLmFwcGx5KFxuICAgICAgU3RyaW5nLFxuICAgICAgY29kZVBvaW50cy5zbGljZShpLCBpICs9IE1BWF9BUkdVTUVOVFNfTEVOR1RIKVxuICAgIClcbiAgfVxuICByZXR1cm4gcmVzXG59XG5cbmZ1bmN0aW9uIGFzY2lpU2xpY2UgKGJ1Ziwgc3RhcnQsIGVuZCkge1xuICB2YXIgcmV0ID0gJydcbiAgZW5kID0gTWF0aC5taW4oYnVmLmxlbmd0aCwgZW5kKVxuXG4gIGZvciAodmFyIGkgPSBzdGFydDsgaSA8IGVuZDsgKytpKSB7XG4gICAgcmV0ICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoYnVmW2ldICYgMHg3RilcbiAgfVxuICByZXR1cm4gcmV0XG59XG5cbmZ1bmN0aW9uIGxhdGluMVNsaWNlIChidWYsIHN0YXJ0LCBlbmQpIHtcbiAgdmFyIHJldCA9ICcnXG4gIGVuZCA9IE1hdGgubWluKGJ1Zi5sZW5ndGgsIGVuZClcblxuICBmb3IgKHZhciBpID0gc3RhcnQ7IGkgPCBlbmQ7ICsraSkge1xuICAgIHJldCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGJ1ZltpXSlcbiAgfVxuICByZXR1cm4gcmV0XG59XG5cbmZ1bmN0aW9uIGhleFNsaWNlIChidWYsIHN0YXJ0LCBlbmQpIHtcbiAgdmFyIGxlbiA9IGJ1Zi5sZW5ndGhcblxuICBpZiAoIXN0YXJ0IHx8IHN0YXJ0IDwgMCkgc3RhcnQgPSAwXG4gIGlmICghZW5kIHx8IGVuZCA8IDAgfHwgZW5kID4gbGVuKSBlbmQgPSBsZW5cblxuICB2YXIgb3V0ID0gJydcbiAgZm9yICh2YXIgaSA9IHN0YXJ0OyBpIDwgZW5kOyArK2kpIHtcbiAgICBvdXQgKz0gdG9IZXgoYnVmW2ldKVxuICB9XG4gIHJldHVybiBvdXRcbn1cblxuZnVuY3Rpb24gdXRmMTZsZVNsaWNlIChidWYsIHN0YXJ0LCBlbmQpIHtcbiAgdmFyIGJ5dGVzID0gYnVmLnNsaWNlKHN0YXJ0LCBlbmQpXG4gIHZhciByZXMgPSAnJ1xuICBmb3IgKHZhciBpID0gMDsgaSA8IGJ5dGVzLmxlbmd0aDsgaSArPSAyKSB7XG4gICAgcmVzICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoYnl0ZXNbaV0gKyBieXRlc1tpICsgMV0gKiAyNTYpXG4gIH1cbiAgcmV0dXJuIHJlc1xufVxuXG5CdWZmZXIucHJvdG90eXBlLnNsaWNlID0gZnVuY3Rpb24gc2xpY2UgKHN0YXJ0LCBlbmQpIHtcbiAgdmFyIGxlbiA9IHRoaXMubGVuZ3RoXG4gIHN0YXJ0ID0gfn5zdGFydFxuICBlbmQgPSBlbmQgPT09IHVuZGVmaW5lZCA/IGxlbiA6IH5+ZW5kXG5cbiAgaWYgKHN0YXJ0IDwgMCkge1xuICAgIHN0YXJ0ICs9IGxlblxuICAgIGlmIChzdGFydCA8IDApIHN0YXJ0ID0gMFxuICB9IGVsc2UgaWYgKHN0YXJ0ID4gbGVuKSB7XG4gICAgc3RhcnQgPSBsZW5cbiAgfVxuXG4gIGlmIChlbmQgPCAwKSB7XG4gICAgZW5kICs9IGxlblxuICAgIGlmIChlbmQgPCAwKSBlbmQgPSAwXG4gIH0gZWxzZSBpZiAoZW5kID4gbGVuKSB7XG4gICAgZW5kID0gbGVuXG4gIH1cblxuICBpZiAoZW5kIDwgc3RhcnQpIGVuZCA9IHN0YXJ0XG5cbiAgdmFyIG5ld0J1ZlxuICBpZiAoQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQpIHtcbiAgICBuZXdCdWYgPSB0aGlzLnN1YmFycmF5KHN0YXJ0LCBlbmQpXG4gICAgbmV3QnVmLl9fcHJvdG9fXyA9IEJ1ZmZlci5wcm90b3R5cGVcbiAgfSBlbHNlIHtcbiAgICB2YXIgc2xpY2VMZW4gPSBlbmQgLSBzdGFydFxuICAgIG5ld0J1ZiA9IG5ldyBCdWZmZXIoc2xpY2VMZW4sIHVuZGVmaW5lZClcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHNsaWNlTGVuOyArK2kpIHtcbiAgICAgIG5ld0J1ZltpXSA9IHRoaXNbaSArIHN0YXJ0XVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBuZXdCdWZcbn1cblxuLypcbiAqIE5lZWQgdG8gbWFrZSBzdXJlIHRoYXQgYnVmZmVyIGlzbid0IHRyeWluZyB0byB3cml0ZSBvdXQgb2YgYm91bmRzLlxuICovXG5mdW5jdGlvbiBjaGVja09mZnNldCAob2Zmc2V0LCBleHQsIGxlbmd0aCkge1xuICBpZiAoKG9mZnNldCAlIDEpICE9PSAwIHx8IG9mZnNldCA8IDApIHRocm93IG5ldyBSYW5nZUVycm9yKCdvZmZzZXQgaXMgbm90IHVpbnQnKVxuICBpZiAob2Zmc2V0ICsgZXh0ID4gbGVuZ3RoKSB0aHJvdyBuZXcgUmFuZ2VFcnJvcignVHJ5aW5nIHRvIGFjY2VzcyBiZXlvbmQgYnVmZmVyIGxlbmd0aCcpXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZFVJbnRMRSA9IGZ1bmN0aW9uIHJlYWRVSW50TEUgKG9mZnNldCwgYnl0ZUxlbmd0aCwgbm9Bc3NlcnQpIHtcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBieXRlTGVuZ3RoID0gYnl0ZUxlbmd0aCB8IDBcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tPZmZzZXQob2Zmc2V0LCBieXRlTGVuZ3RoLCB0aGlzLmxlbmd0aClcblxuICB2YXIgdmFsID0gdGhpc1tvZmZzZXRdXG4gIHZhciBtdWwgPSAxXG4gIHZhciBpID0gMFxuICB3aGlsZSAoKytpIDwgYnl0ZUxlbmd0aCAmJiAobXVsICo9IDB4MTAwKSkge1xuICAgIHZhbCArPSB0aGlzW29mZnNldCArIGldICogbXVsXG4gIH1cblxuICByZXR1cm4gdmFsXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZFVJbnRCRSA9IGZ1bmN0aW9uIHJlYWRVSW50QkUgKG9mZnNldCwgYnl0ZUxlbmd0aCwgbm9Bc3NlcnQpIHtcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBieXRlTGVuZ3RoID0gYnl0ZUxlbmd0aCB8IDBcbiAgaWYgKCFub0Fzc2VydCkge1xuICAgIGNoZWNrT2Zmc2V0KG9mZnNldCwgYnl0ZUxlbmd0aCwgdGhpcy5sZW5ndGgpXG4gIH1cblxuICB2YXIgdmFsID0gdGhpc1tvZmZzZXQgKyAtLWJ5dGVMZW5ndGhdXG4gIHZhciBtdWwgPSAxXG4gIHdoaWxlIChieXRlTGVuZ3RoID4gMCAmJiAobXVsICo9IDB4MTAwKSkge1xuICAgIHZhbCArPSB0aGlzW29mZnNldCArIC0tYnl0ZUxlbmd0aF0gKiBtdWxcbiAgfVxuXG4gIHJldHVybiB2YWxcbn1cblxuQnVmZmVyLnByb3RvdHlwZS5yZWFkVUludDggPSBmdW5jdGlvbiByZWFkVUludDggKG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tPZmZzZXQob2Zmc2V0LCAxLCB0aGlzLmxlbmd0aClcbiAgcmV0dXJuIHRoaXNbb2Zmc2V0XVxufVxuXG5CdWZmZXIucHJvdG90eXBlLnJlYWRVSW50MTZMRSA9IGZ1bmN0aW9uIHJlYWRVSW50MTZMRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDIsIHRoaXMubGVuZ3RoKVxuICByZXR1cm4gdGhpc1tvZmZzZXRdIHwgKHRoaXNbb2Zmc2V0ICsgMV0gPDwgOClcbn1cblxuQnVmZmVyLnByb3RvdHlwZS5yZWFkVUludDE2QkUgPSBmdW5jdGlvbiByZWFkVUludDE2QkUgKG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tPZmZzZXQob2Zmc2V0LCAyLCB0aGlzLmxlbmd0aClcbiAgcmV0dXJuICh0aGlzW29mZnNldF0gPDwgOCkgfCB0aGlzW29mZnNldCArIDFdXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZFVJbnQzMkxFID0gZnVuY3Rpb24gcmVhZFVJbnQzMkxFIChvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrT2Zmc2V0KG9mZnNldCwgNCwgdGhpcy5sZW5ndGgpXG5cbiAgcmV0dXJuICgodGhpc1tvZmZzZXRdKSB8XG4gICAgICAodGhpc1tvZmZzZXQgKyAxXSA8PCA4KSB8XG4gICAgICAodGhpc1tvZmZzZXQgKyAyXSA8PCAxNikpICtcbiAgICAgICh0aGlzW29mZnNldCArIDNdICogMHgxMDAwMDAwKVxufVxuXG5CdWZmZXIucHJvdG90eXBlLnJlYWRVSW50MzJCRSA9IGZ1bmN0aW9uIHJlYWRVSW50MzJCRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDQsIHRoaXMubGVuZ3RoKVxuXG4gIHJldHVybiAodGhpc1tvZmZzZXRdICogMHgxMDAwMDAwKSArXG4gICAgKCh0aGlzW29mZnNldCArIDFdIDw8IDE2KSB8XG4gICAgKHRoaXNbb2Zmc2V0ICsgMl0gPDwgOCkgfFxuICAgIHRoaXNbb2Zmc2V0ICsgM10pXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEludExFID0gZnVuY3Rpb24gcmVhZEludExFIChvZmZzZXQsIGJ5dGVMZW5ndGgsIG5vQXNzZXJ0KSB7XG4gIG9mZnNldCA9IG9mZnNldCB8IDBcbiAgYnl0ZUxlbmd0aCA9IGJ5dGVMZW5ndGggfCAwXG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrT2Zmc2V0KG9mZnNldCwgYnl0ZUxlbmd0aCwgdGhpcy5sZW5ndGgpXG5cbiAgdmFyIHZhbCA9IHRoaXNbb2Zmc2V0XVxuICB2YXIgbXVsID0gMVxuICB2YXIgaSA9IDBcbiAgd2hpbGUgKCsraSA8IGJ5dGVMZW5ndGggJiYgKG11bCAqPSAweDEwMCkpIHtcbiAgICB2YWwgKz0gdGhpc1tvZmZzZXQgKyBpXSAqIG11bFxuICB9XG4gIG11bCAqPSAweDgwXG5cbiAgaWYgKHZhbCA+PSBtdWwpIHZhbCAtPSBNYXRoLnBvdygyLCA4ICogYnl0ZUxlbmd0aClcblxuICByZXR1cm4gdmFsXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEludEJFID0gZnVuY3Rpb24gcmVhZEludEJFIChvZmZzZXQsIGJ5dGVMZW5ndGgsIG5vQXNzZXJ0KSB7XG4gIG9mZnNldCA9IG9mZnNldCB8IDBcbiAgYnl0ZUxlbmd0aCA9IGJ5dGVMZW5ndGggfCAwXG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrT2Zmc2V0KG9mZnNldCwgYnl0ZUxlbmd0aCwgdGhpcy5sZW5ndGgpXG5cbiAgdmFyIGkgPSBieXRlTGVuZ3RoXG4gIHZhciBtdWwgPSAxXG4gIHZhciB2YWwgPSB0aGlzW29mZnNldCArIC0taV1cbiAgd2hpbGUgKGkgPiAwICYmIChtdWwgKj0gMHgxMDApKSB7XG4gICAgdmFsICs9IHRoaXNbb2Zmc2V0ICsgLS1pXSAqIG11bFxuICB9XG4gIG11bCAqPSAweDgwXG5cbiAgaWYgKHZhbCA+PSBtdWwpIHZhbCAtPSBNYXRoLnBvdygyLCA4ICogYnl0ZUxlbmd0aClcblxuICByZXR1cm4gdmFsXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEludDggPSBmdW5jdGlvbiByZWFkSW50OCAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDEsIHRoaXMubGVuZ3RoKVxuICBpZiAoISh0aGlzW29mZnNldF0gJiAweDgwKSkgcmV0dXJuICh0aGlzW29mZnNldF0pXG4gIHJldHVybiAoKDB4ZmYgLSB0aGlzW29mZnNldF0gKyAxKSAqIC0xKVxufVxuXG5CdWZmZXIucHJvdG90eXBlLnJlYWRJbnQxNkxFID0gZnVuY3Rpb24gcmVhZEludDE2TEUgKG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tPZmZzZXQob2Zmc2V0LCAyLCB0aGlzLmxlbmd0aClcbiAgdmFyIHZhbCA9IHRoaXNbb2Zmc2V0XSB8ICh0aGlzW29mZnNldCArIDFdIDw8IDgpXG4gIHJldHVybiAodmFsICYgMHg4MDAwKSA/IHZhbCB8IDB4RkZGRjAwMDAgOiB2YWxcbn1cblxuQnVmZmVyLnByb3RvdHlwZS5yZWFkSW50MTZCRSA9IGZ1bmN0aW9uIHJlYWRJbnQxNkJFIChvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrT2Zmc2V0KG9mZnNldCwgMiwgdGhpcy5sZW5ndGgpXG4gIHZhciB2YWwgPSB0aGlzW29mZnNldCArIDFdIHwgKHRoaXNbb2Zmc2V0XSA8PCA4KVxuICByZXR1cm4gKHZhbCAmIDB4ODAwMCkgPyB2YWwgfCAweEZGRkYwMDAwIDogdmFsXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEludDMyTEUgPSBmdW5jdGlvbiByZWFkSW50MzJMRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDQsIHRoaXMubGVuZ3RoKVxuXG4gIHJldHVybiAodGhpc1tvZmZzZXRdKSB8XG4gICAgKHRoaXNbb2Zmc2V0ICsgMV0gPDwgOCkgfFxuICAgICh0aGlzW29mZnNldCArIDJdIDw8IDE2KSB8XG4gICAgKHRoaXNbb2Zmc2V0ICsgM10gPDwgMjQpXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEludDMyQkUgPSBmdW5jdGlvbiByZWFkSW50MzJCRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDQsIHRoaXMubGVuZ3RoKVxuXG4gIHJldHVybiAodGhpc1tvZmZzZXRdIDw8IDI0KSB8XG4gICAgKHRoaXNbb2Zmc2V0ICsgMV0gPDwgMTYpIHxcbiAgICAodGhpc1tvZmZzZXQgKyAyXSA8PCA4KSB8XG4gICAgKHRoaXNbb2Zmc2V0ICsgM10pXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEZsb2F0TEUgPSBmdW5jdGlvbiByZWFkRmxvYXRMRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDQsIHRoaXMubGVuZ3RoKVxuICByZXR1cm4gaWVlZTc1NC5yZWFkKHRoaXMsIG9mZnNldCwgdHJ1ZSwgMjMsIDQpXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZEZsb2F0QkUgPSBmdW5jdGlvbiByZWFkRmxvYXRCRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDQsIHRoaXMubGVuZ3RoKVxuICByZXR1cm4gaWVlZTc1NC5yZWFkKHRoaXMsIG9mZnNldCwgZmFsc2UsIDIzLCA0KVxufVxuXG5CdWZmZXIucHJvdG90eXBlLnJlYWREb3VibGVMRSA9IGZ1bmN0aW9uIHJlYWREb3VibGVMRSAob2Zmc2V0LCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSBjaGVja09mZnNldChvZmZzZXQsIDgsIHRoaXMubGVuZ3RoKVxuICByZXR1cm4gaWVlZTc1NC5yZWFkKHRoaXMsIG9mZnNldCwgdHJ1ZSwgNTIsIDgpXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUucmVhZERvdWJsZUJFID0gZnVuY3Rpb24gcmVhZERvdWJsZUJFIChvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrT2Zmc2V0KG9mZnNldCwgOCwgdGhpcy5sZW5ndGgpXG4gIHJldHVybiBpZWVlNzU0LnJlYWQodGhpcywgb2Zmc2V0LCBmYWxzZSwgNTIsIDgpXG59XG5cbmZ1bmN0aW9uIGNoZWNrSW50IChidWYsIHZhbHVlLCBvZmZzZXQsIGV4dCwgbWF4LCBtaW4pIHtcbiAgaWYgKCFCdWZmZXIuaXNCdWZmZXIoYnVmKSkgdGhyb3cgbmV3IFR5cGVFcnJvcignXCJidWZmZXJcIiBhcmd1bWVudCBtdXN0IGJlIGEgQnVmZmVyIGluc3RhbmNlJylcbiAgaWYgKHZhbHVlID4gbWF4IHx8IHZhbHVlIDwgbWluKSB0aHJvdyBuZXcgUmFuZ2VFcnJvcignXCJ2YWx1ZVwiIGFyZ3VtZW50IGlzIG91dCBvZiBib3VuZHMnKVxuICBpZiAob2Zmc2V0ICsgZXh0ID4gYnVmLmxlbmd0aCkgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ0luZGV4IG91dCBvZiByYW5nZScpXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUud3JpdGVVSW50TEUgPSBmdW5jdGlvbiB3cml0ZVVJbnRMRSAodmFsdWUsIG9mZnNldCwgYnl0ZUxlbmd0aCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBieXRlTGVuZ3RoID0gYnl0ZUxlbmd0aCB8IDBcbiAgaWYgKCFub0Fzc2VydCkge1xuICAgIHZhciBtYXhCeXRlcyA9IE1hdGgucG93KDIsIDggKiBieXRlTGVuZ3RoKSAtIDFcbiAgICBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBieXRlTGVuZ3RoLCBtYXhCeXRlcywgMClcbiAgfVxuXG4gIHZhciBtdWwgPSAxXG4gIHZhciBpID0gMFxuICB0aGlzW29mZnNldF0gPSB2YWx1ZSAmIDB4RkZcbiAgd2hpbGUgKCsraSA8IGJ5dGVMZW5ndGggJiYgKG11bCAqPSAweDEwMCkpIHtcbiAgICB0aGlzW29mZnNldCArIGldID0gKHZhbHVlIC8gbXVsKSAmIDB4RkZcbiAgfVxuXG4gIHJldHVybiBvZmZzZXQgKyBieXRlTGVuZ3RoXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUud3JpdGVVSW50QkUgPSBmdW5jdGlvbiB3cml0ZVVJbnRCRSAodmFsdWUsIG9mZnNldCwgYnl0ZUxlbmd0aCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBieXRlTGVuZ3RoID0gYnl0ZUxlbmd0aCB8IDBcbiAgaWYgKCFub0Fzc2VydCkge1xuICAgIHZhciBtYXhCeXRlcyA9IE1hdGgucG93KDIsIDggKiBieXRlTGVuZ3RoKSAtIDFcbiAgICBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBieXRlTGVuZ3RoLCBtYXhCeXRlcywgMClcbiAgfVxuXG4gIHZhciBpID0gYnl0ZUxlbmd0aCAtIDFcbiAgdmFyIG11bCA9IDFcbiAgdGhpc1tvZmZzZXQgKyBpXSA9IHZhbHVlICYgMHhGRlxuICB3aGlsZSAoLS1pID49IDAgJiYgKG11bCAqPSAweDEwMCkpIHtcbiAgICB0aGlzW29mZnNldCArIGldID0gKHZhbHVlIC8gbXVsKSAmIDB4RkZcbiAgfVxuXG4gIHJldHVybiBvZmZzZXQgKyBieXRlTGVuZ3RoXG59XG5cbkJ1ZmZlci5wcm90b3R5cGUud3JpdGVVSW50OCA9IGZ1bmN0aW9uIHdyaXRlVUludDggKHZhbHVlLCBvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIHZhbHVlID0gK3ZhbHVlXG4gIG9mZnNldCA9IG9mZnNldCB8IDBcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tJbnQodGhpcywgdmFsdWUsIG9mZnNldCwgMSwgMHhmZiwgMClcbiAgaWYgKCFCdWZmZXIuVFlQRURfQVJSQVlfU1VQUE9SVCkgdmFsdWUgPSBNYXRoLmZsb29yKHZhbHVlKVxuICB0aGlzW29mZnNldF0gPSAodmFsdWUgJiAweGZmKVxuICByZXR1cm4gb2Zmc2V0ICsgMVxufVxuXG5mdW5jdGlvbiBvYmplY3RXcml0ZVVJbnQxNiAoYnVmLCB2YWx1ZSwgb2Zmc2V0LCBsaXR0bGVFbmRpYW4pIHtcbiAgaWYgKHZhbHVlIDwgMCkgdmFsdWUgPSAweGZmZmYgKyB2YWx1ZSArIDFcbiAgZm9yICh2YXIgaSA9IDAsIGogPSBNYXRoLm1pbihidWYubGVuZ3RoIC0gb2Zmc2V0LCAyKTsgaSA8IGo7ICsraSkge1xuICAgIGJ1ZltvZmZzZXQgKyBpXSA9ICh2YWx1ZSAmICgweGZmIDw8ICg4ICogKGxpdHRsZUVuZGlhbiA/IGkgOiAxIC0gaSkpKSkgPj4+XG4gICAgICAobGl0dGxlRW5kaWFuID8gaSA6IDEgLSBpKSAqIDhcbiAgfVxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlVUludDE2TEUgPSBmdW5jdGlvbiB3cml0ZVVJbnQxNkxFICh2YWx1ZSwgb2Zmc2V0LCBub0Fzc2VydCkge1xuICB2YWx1ZSA9ICt2YWx1ZVxuICBvZmZzZXQgPSBvZmZzZXQgfCAwXG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrSW50KHRoaXMsIHZhbHVlLCBvZmZzZXQsIDIsIDB4ZmZmZiwgMClcbiAgaWYgKEJ1ZmZlci5UWVBFRF9BUlJBWV9TVVBQT1JUKSB7XG4gICAgdGhpc1tvZmZzZXRdID0gKHZhbHVlICYgMHhmZilcbiAgICB0aGlzW29mZnNldCArIDFdID0gKHZhbHVlID4+PiA4KVxuICB9IGVsc2Uge1xuICAgIG9iamVjdFdyaXRlVUludDE2KHRoaXMsIHZhbHVlLCBvZmZzZXQsIHRydWUpXG4gIH1cbiAgcmV0dXJuIG9mZnNldCArIDJcbn1cblxuQnVmZmVyLnByb3RvdHlwZS53cml0ZVVJbnQxNkJFID0gZnVuY3Rpb24gd3JpdGVVSW50MTZCRSAodmFsdWUsIG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBpZiAoIW5vQXNzZXJ0KSBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCAyLCAweGZmZmYsIDApXG4gIGlmIChCdWZmZXIuVFlQRURfQVJSQVlfU1VQUE9SVCkge1xuICAgIHRoaXNbb2Zmc2V0XSA9ICh2YWx1ZSA+Pj4gOClcbiAgICB0aGlzW29mZnNldCArIDFdID0gKHZhbHVlICYgMHhmZilcbiAgfSBlbHNlIHtcbiAgICBvYmplY3RXcml0ZVVJbnQxNih0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBmYWxzZSlcbiAgfVxuICByZXR1cm4gb2Zmc2V0ICsgMlxufVxuXG5mdW5jdGlvbiBvYmplY3RXcml0ZVVJbnQzMiAoYnVmLCB2YWx1ZSwgb2Zmc2V0LCBsaXR0bGVFbmRpYW4pIHtcbiAgaWYgKHZhbHVlIDwgMCkgdmFsdWUgPSAweGZmZmZmZmZmICsgdmFsdWUgKyAxXG4gIGZvciAodmFyIGkgPSAwLCBqID0gTWF0aC5taW4oYnVmLmxlbmd0aCAtIG9mZnNldCwgNCk7IGkgPCBqOyArK2kpIHtcbiAgICBidWZbb2Zmc2V0ICsgaV0gPSAodmFsdWUgPj4+IChsaXR0bGVFbmRpYW4gPyBpIDogMyAtIGkpICogOCkgJiAweGZmXG4gIH1cbn1cblxuQnVmZmVyLnByb3RvdHlwZS53cml0ZVVJbnQzMkxFID0gZnVuY3Rpb24gd3JpdGVVSW50MzJMRSAodmFsdWUsIG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBpZiAoIW5vQXNzZXJ0KSBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCA0LCAweGZmZmZmZmZmLCAwKVxuICBpZiAoQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQpIHtcbiAgICB0aGlzW29mZnNldCArIDNdID0gKHZhbHVlID4+PiAyNClcbiAgICB0aGlzW29mZnNldCArIDJdID0gKHZhbHVlID4+PiAxNilcbiAgICB0aGlzW29mZnNldCArIDFdID0gKHZhbHVlID4+PiA4KVxuICAgIHRoaXNbb2Zmc2V0XSA9ICh2YWx1ZSAmIDB4ZmYpXG4gIH0gZWxzZSB7XG4gICAgb2JqZWN0V3JpdGVVSW50MzIodGhpcywgdmFsdWUsIG9mZnNldCwgdHJ1ZSlcbiAgfVxuICByZXR1cm4gb2Zmc2V0ICsgNFxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlVUludDMyQkUgPSBmdW5jdGlvbiB3cml0ZVVJbnQzMkJFICh2YWx1ZSwgb2Zmc2V0LCBub0Fzc2VydCkge1xuICB2YWx1ZSA9ICt2YWx1ZVxuICBvZmZzZXQgPSBvZmZzZXQgfCAwXG4gIGlmICghbm9Bc3NlcnQpIGNoZWNrSW50KHRoaXMsIHZhbHVlLCBvZmZzZXQsIDQsIDB4ZmZmZmZmZmYsIDApXG4gIGlmIChCdWZmZXIuVFlQRURfQVJSQVlfU1VQUE9SVCkge1xuICAgIHRoaXNbb2Zmc2V0XSA9ICh2YWx1ZSA+Pj4gMjQpXG4gICAgdGhpc1tvZmZzZXQgKyAxXSA9ICh2YWx1ZSA+Pj4gMTYpXG4gICAgdGhpc1tvZmZzZXQgKyAyXSA9ICh2YWx1ZSA+Pj4gOClcbiAgICB0aGlzW29mZnNldCArIDNdID0gKHZhbHVlICYgMHhmZilcbiAgfSBlbHNlIHtcbiAgICBvYmplY3RXcml0ZVVJbnQzMih0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBmYWxzZSlcbiAgfVxuICByZXR1cm4gb2Zmc2V0ICsgNFxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlSW50TEUgPSBmdW5jdGlvbiB3cml0ZUludExFICh2YWx1ZSwgb2Zmc2V0LCBieXRlTGVuZ3RoLCBub0Fzc2VydCkge1xuICB2YWx1ZSA9ICt2YWx1ZVxuICBvZmZzZXQgPSBvZmZzZXQgfCAwXG4gIGlmICghbm9Bc3NlcnQpIHtcbiAgICB2YXIgbGltaXQgPSBNYXRoLnBvdygyLCA4ICogYnl0ZUxlbmd0aCAtIDEpXG5cbiAgICBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBieXRlTGVuZ3RoLCBsaW1pdCAtIDEsIC1saW1pdClcbiAgfVxuXG4gIHZhciBpID0gMFxuICB2YXIgbXVsID0gMVxuICB2YXIgc3ViID0gMFxuICB0aGlzW29mZnNldF0gPSB2YWx1ZSAmIDB4RkZcbiAgd2hpbGUgKCsraSA8IGJ5dGVMZW5ndGggJiYgKG11bCAqPSAweDEwMCkpIHtcbiAgICBpZiAodmFsdWUgPCAwICYmIHN1YiA9PT0gMCAmJiB0aGlzW29mZnNldCArIGkgLSAxXSAhPT0gMCkge1xuICAgICAgc3ViID0gMVxuICAgIH1cbiAgICB0aGlzW29mZnNldCArIGldID0gKCh2YWx1ZSAvIG11bCkgPj4gMCkgLSBzdWIgJiAweEZGXG4gIH1cblxuICByZXR1cm4gb2Zmc2V0ICsgYnl0ZUxlbmd0aFxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlSW50QkUgPSBmdW5jdGlvbiB3cml0ZUludEJFICh2YWx1ZSwgb2Zmc2V0LCBieXRlTGVuZ3RoLCBub0Fzc2VydCkge1xuICB2YWx1ZSA9ICt2YWx1ZVxuICBvZmZzZXQgPSBvZmZzZXQgfCAwXG4gIGlmICghbm9Bc3NlcnQpIHtcbiAgICB2YXIgbGltaXQgPSBNYXRoLnBvdygyLCA4ICogYnl0ZUxlbmd0aCAtIDEpXG5cbiAgICBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBieXRlTGVuZ3RoLCBsaW1pdCAtIDEsIC1saW1pdClcbiAgfVxuXG4gIHZhciBpID0gYnl0ZUxlbmd0aCAtIDFcbiAgdmFyIG11bCA9IDFcbiAgdmFyIHN1YiA9IDBcbiAgdGhpc1tvZmZzZXQgKyBpXSA9IHZhbHVlICYgMHhGRlxuICB3aGlsZSAoLS1pID49IDAgJiYgKG11bCAqPSAweDEwMCkpIHtcbiAgICBpZiAodmFsdWUgPCAwICYmIHN1YiA9PT0gMCAmJiB0aGlzW29mZnNldCArIGkgKyAxXSAhPT0gMCkge1xuICAgICAgc3ViID0gMVxuICAgIH1cbiAgICB0aGlzW29mZnNldCArIGldID0gKCh2YWx1ZSAvIG11bCkgPj4gMCkgLSBzdWIgJiAweEZGXG4gIH1cblxuICByZXR1cm4gb2Zmc2V0ICsgYnl0ZUxlbmd0aFxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlSW50OCA9IGZ1bmN0aW9uIHdyaXRlSW50OCAodmFsdWUsIG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBpZiAoIW5vQXNzZXJ0KSBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCAxLCAweDdmLCAtMHg4MClcbiAgaWYgKCFCdWZmZXIuVFlQRURfQVJSQVlfU1VQUE9SVCkgdmFsdWUgPSBNYXRoLmZsb29yKHZhbHVlKVxuICBpZiAodmFsdWUgPCAwKSB2YWx1ZSA9IDB4ZmYgKyB2YWx1ZSArIDFcbiAgdGhpc1tvZmZzZXRdID0gKHZhbHVlICYgMHhmZilcbiAgcmV0dXJuIG9mZnNldCArIDFcbn1cblxuQnVmZmVyLnByb3RvdHlwZS53cml0ZUludDE2TEUgPSBmdW5jdGlvbiB3cml0ZUludDE2TEUgKHZhbHVlLCBvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIHZhbHVlID0gK3ZhbHVlXG4gIG9mZnNldCA9IG9mZnNldCB8IDBcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tJbnQodGhpcywgdmFsdWUsIG9mZnNldCwgMiwgMHg3ZmZmLCAtMHg4MDAwKVxuICBpZiAoQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQpIHtcbiAgICB0aGlzW29mZnNldF0gPSAodmFsdWUgJiAweGZmKVxuICAgIHRoaXNbb2Zmc2V0ICsgMV0gPSAodmFsdWUgPj4+IDgpXG4gIH0gZWxzZSB7XG4gICAgb2JqZWN0V3JpdGVVSW50MTYodGhpcywgdmFsdWUsIG9mZnNldCwgdHJ1ZSlcbiAgfVxuICByZXR1cm4gb2Zmc2V0ICsgMlxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlSW50MTZCRSA9IGZ1bmN0aW9uIHdyaXRlSW50MTZCRSAodmFsdWUsIG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBpZiAoIW5vQXNzZXJ0KSBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCAyLCAweDdmZmYsIC0weDgwMDApXG4gIGlmIChCdWZmZXIuVFlQRURfQVJSQVlfU1VQUE9SVCkge1xuICAgIHRoaXNbb2Zmc2V0XSA9ICh2YWx1ZSA+Pj4gOClcbiAgICB0aGlzW29mZnNldCArIDFdID0gKHZhbHVlICYgMHhmZilcbiAgfSBlbHNlIHtcbiAgICBvYmplY3RXcml0ZVVJbnQxNih0aGlzLCB2YWx1ZSwgb2Zmc2V0LCBmYWxzZSlcbiAgfVxuICByZXR1cm4gb2Zmc2V0ICsgMlxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlSW50MzJMRSA9IGZ1bmN0aW9uIHdyaXRlSW50MzJMRSAodmFsdWUsIG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgdmFsdWUgPSArdmFsdWVcbiAgb2Zmc2V0ID0gb2Zmc2V0IHwgMFxuICBpZiAoIW5vQXNzZXJ0KSBjaGVja0ludCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCA0LCAweDdmZmZmZmZmLCAtMHg4MDAwMDAwMClcbiAgaWYgKEJ1ZmZlci5UWVBFRF9BUlJBWV9TVVBQT1JUKSB7XG4gICAgdGhpc1tvZmZzZXRdID0gKHZhbHVlICYgMHhmZilcbiAgICB0aGlzW29mZnNldCArIDFdID0gKHZhbHVlID4+PiA4KVxuICAgIHRoaXNbb2Zmc2V0ICsgMl0gPSAodmFsdWUgPj4+IDE2KVxuICAgIHRoaXNbb2Zmc2V0ICsgM10gPSAodmFsdWUgPj4+IDI0KVxuICB9IGVsc2Uge1xuICAgIG9iamVjdFdyaXRlVUludDMyKHRoaXMsIHZhbHVlLCBvZmZzZXQsIHRydWUpXG4gIH1cbiAgcmV0dXJuIG9mZnNldCArIDRcbn1cblxuQnVmZmVyLnByb3RvdHlwZS53cml0ZUludDMyQkUgPSBmdW5jdGlvbiB3cml0ZUludDMyQkUgKHZhbHVlLCBvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIHZhbHVlID0gK3ZhbHVlXG4gIG9mZnNldCA9IG9mZnNldCB8IDBcbiAgaWYgKCFub0Fzc2VydCkgY2hlY2tJbnQodGhpcywgdmFsdWUsIG9mZnNldCwgNCwgMHg3ZmZmZmZmZiwgLTB4ODAwMDAwMDApXG4gIGlmICh2YWx1ZSA8IDApIHZhbHVlID0gMHhmZmZmZmZmZiArIHZhbHVlICsgMVxuICBpZiAoQnVmZmVyLlRZUEVEX0FSUkFZX1NVUFBPUlQpIHtcbiAgICB0aGlzW29mZnNldF0gPSAodmFsdWUgPj4+IDI0KVxuICAgIHRoaXNbb2Zmc2V0ICsgMV0gPSAodmFsdWUgPj4+IDE2KVxuICAgIHRoaXNbb2Zmc2V0ICsgMl0gPSAodmFsdWUgPj4+IDgpXG4gICAgdGhpc1tvZmZzZXQgKyAzXSA9ICh2YWx1ZSAmIDB4ZmYpXG4gIH0gZWxzZSB7XG4gICAgb2JqZWN0V3JpdGVVSW50MzIodGhpcywgdmFsdWUsIG9mZnNldCwgZmFsc2UpXG4gIH1cbiAgcmV0dXJuIG9mZnNldCArIDRcbn1cblxuZnVuY3Rpb24gY2hlY2tJRUVFNzU0IChidWYsIHZhbHVlLCBvZmZzZXQsIGV4dCwgbWF4LCBtaW4pIHtcbiAgaWYgKG9mZnNldCArIGV4dCA+IGJ1Zi5sZW5ndGgpIHRocm93IG5ldyBSYW5nZUVycm9yKCdJbmRleCBvdXQgb2YgcmFuZ2UnKVxuICBpZiAob2Zmc2V0IDwgMCkgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ0luZGV4IG91dCBvZiByYW5nZScpXG59XG5cbmZ1bmN0aW9uIHdyaXRlRmxvYXQgKGJ1ZiwgdmFsdWUsIG9mZnNldCwgbGl0dGxlRW5kaWFuLCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSB7XG4gICAgY2hlY2tJRUVFNzU0KGJ1ZiwgdmFsdWUsIG9mZnNldCwgNCwgMy40MDI4MjM0NjYzODUyODg2ZSszOCwgLTMuNDAyODIzNDY2Mzg1Mjg4NmUrMzgpXG4gIH1cbiAgaWVlZTc1NC53cml0ZShidWYsIHZhbHVlLCBvZmZzZXQsIGxpdHRsZUVuZGlhbiwgMjMsIDQpXG4gIHJldHVybiBvZmZzZXQgKyA0XG59XG5cbkJ1ZmZlci5wcm90b3R5cGUud3JpdGVGbG9hdExFID0gZnVuY3Rpb24gd3JpdGVGbG9hdExFICh2YWx1ZSwgb2Zmc2V0LCBub0Fzc2VydCkge1xuICByZXR1cm4gd3JpdGVGbG9hdCh0aGlzLCB2YWx1ZSwgb2Zmc2V0LCB0cnVlLCBub0Fzc2VydClcbn1cblxuQnVmZmVyLnByb3RvdHlwZS53cml0ZUZsb2F0QkUgPSBmdW5jdGlvbiB3cml0ZUZsb2F0QkUgKHZhbHVlLCBvZmZzZXQsIG5vQXNzZXJ0KSB7XG4gIHJldHVybiB3cml0ZUZsb2F0KHRoaXMsIHZhbHVlLCBvZmZzZXQsIGZhbHNlLCBub0Fzc2VydClcbn1cblxuZnVuY3Rpb24gd3JpdGVEb3VibGUgKGJ1ZiwgdmFsdWUsIG9mZnNldCwgbGl0dGxlRW5kaWFuLCBub0Fzc2VydCkge1xuICBpZiAoIW5vQXNzZXJ0KSB7XG4gICAgY2hlY2tJRUVFNzU0KGJ1ZiwgdmFsdWUsIG9mZnNldCwgOCwgMS43OTc2OTMxMzQ4NjIzMTU3RSszMDgsIC0xLjc5NzY5MzEzNDg2MjMxNTdFKzMwOClcbiAgfVxuICBpZWVlNzU0LndyaXRlKGJ1ZiwgdmFsdWUsIG9mZnNldCwgbGl0dGxlRW5kaWFuLCA1MiwgOClcbiAgcmV0dXJuIG9mZnNldCArIDhcbn1cblxuQnVmZmVyLnByb3RvdHlwZS53cml0ZURvdWJsZUxFID0gZnVuY3Rpb24gd3JpdGVEb3VibGVMRSAodmFsdWUsIG9mZnNldCwgbm9Bc3NlcnQpIHtcbiAgcmV0dXJuIHdyaXRlRG91YmxlKHRoaXMsIHZhbHVlLCBvZmZzZXQsIHRydWUsIG5vQXNzZXJ0KVxufVxuXG5CdWZmZXIucHJvdG90eXBlLndyaXRlRG91YmxlQkUgPSBmdW5jdGlvbiB3cml0ZURvdWJsZUJFICh2YWx1ZSwgb2Zmc2V0LCBub0Fzc2VydCkge1xuICByZXR1cm4gd3JpdGVEb3VibGUodGhpcywgdmFsdWUsIG9mZnNldCwgZmFsc2UsIG5vQXNzZXJ0KVxufVxuXG4vLyBjb3B5KHRhcmdldEJ1ZmZlciwgdGFyZ2V0U3RhcnQ9MCwgc291cmNlU3RhcnQ9MCwgc291cmNlRW5kPWJ1ZmZlci5sZW5ndGgpXG5CdWZmZXIucHJvdG90eXBlLmNvcHkgPSBmdW5jdGlvbiBjb3B5ICh0YXJnZXQsIHRhcmdldFN0YXJ0LCBzdGFydCwgZW5kKSB7XG4gIGlmICghc3RhcnQpIHN0YXJ0ID0gMFxuICBpZiAoIWVuZCAmJiBlbmQgIT09IDApIGVuZCA9IHRoaXMubGVuZ3RoXG4gIGlmICh0YXJnZXRTdGFydCA+PSB0YXJnZXQubGVuZ3RoKSB0YXJnZXRTdGFydCA9IHRhcmdldC5sZW5ndGhcbiAgaWYgKCF0YXJnZXRTdGFydCkgdGFyZ2V0U3RhcnQgPSAwXG4gIGlmIChlbmQgPiAwICYmIGVuZCA8IHN0YXJ0KSBlbmQgPSBzdGFydFxuXG4gIC8vIENvcHkgMCBieXRlczsgd2UncmUgZG9uZVxuICBpZiAoZW5kID09PSBzdGFydCkgcmV0dXJuIDBcbiAgaWYgKHRhcmdldC5sZW5ndGggPT09IDAgfHwgdGhpcy5sZW5ndGggPT09IDApIHJldHVybiAwXG5cbiAgLy8gRmF0YWwgZXJyb3IgY29uZGl0aW9uc1xuICBpZiAodGFyZ2V0U3RhcnQgPCAwKSB7XG4gICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ3RhcmdldFN0YXJ0IG91dCBvZiBib3VuZHMnKVxuICB9XG4gIGlmIChzdGFydCA8IDAgfHwgc3RhcnQgPj0gdGhpcy5sZW5ndGgpIHRocm93IG5ldyBSYW5nZUVycm9yKCdzb3VyY2VTdGFydCBvdXQgb2YgYm91bmRzJylcbiAgaWYgKGVuZCA8IDApIHRocm93IG5ldyBSYW5nZUVycm9yKCdzb3VyY2VFbmQgb3V0IG9mIGJvdW5kcycpXG5cbiAgLy8gQXJlIHdlIG9vYj9cbiAgaWYgKGVuZCA+IHRoaXMubGVuZ3RoKSBlbmQgPSB0aGlzLmxlbmd0aFxuICBpZiAodGFyZ2V0Lmxlbmd0aCAtIHRhcmdldFN0YXJ0IDwgZW5kIC0gc3RhcnQpIHtcbiAgICBlbmQgPSB0YXJnZXQubGVuZ3RoIC0gdGFyZ2V0U3RhcnQgKyBzdGFydFxuICB9XG5cbiAgdmFyIGxlbiA9IGVuZCAtIHN0YXJ0XG4gIHZhciBpXG5cbiAgaWYgKHRoaXMgPT09IHRhcmdldCAmJiBzdGFydCA8IHRhcmdldFN0YXJ0ICYmIHRhcmdldFN0YXJ0IDwgZW5kKSB7XG4gICAgLy8gZGVzY2VuZGluZyBjb3B5IGZyb20gZW5kXG4gICAgZm9yIChpID0gbGVuIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgIHRhcmdldFtpICsgdGFyZ2V0U3RhcnRdID0gdGhpc1tpICsgc3RhcnRdXG4gICAgfVxuICB9IGVsc2UgaWYgKGxlbiA8IDEwMDAgfHwgIUJ1ZmZlci5UWVBFRF9BUlJBWV9TVVBQT1JUKSB7XG4gICAgLy8gYXNjZW5kaW5nIGNvcHkgZnJvbSBzdGFydFxuICAgIGZvciAoaSA9IDA7IGkgPCBsZW47ICsraSkge1xuICAgICAgdGFyZ2V0W2kgKyB0YXJnZXRTdGFydF0gPSB0aGlzW2kgKyBzdGFydF1cbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgVWludDhBcnJheS5wcm90b3R5cGUuc2V0LmNhbGwoXG4gICAgICB0YXJnZXQsXG4gICAgICB0aGlzLnN1YmFycmF5KHN0YXJ0LCBzdGFydCArIGxlbiksXG4gICAgICB0YXJnZXRTdGFydFxuICAgIClcbiAgfVxuXG4gIHJldHVybiBsZW5cbn1cblxuLy8gVXNhZ2U6XG4vLyAgICBidWZmZXIuZmlsbChudW1iZXJbLCBvZmZzZXRbLCBlbmRdXSlcbi8vICAgIGJ1ZmZlci5maWxsKGJ1ZmZlclssIG9mZnNldFssIGVuZF1dKVxuLy8gICAgYnVmZmVyLmZpbGwoc3RyaW5nWywgb2Zmc2V0WywgZW5kXV1bLCBlbmNvZGluZ10pXG5CdWZmZXIucHJvdG90eXBlLmZpbGwgPSBmdW5jdGlvbiBmaWxsICh2YWwsIHN0YXJ0LCBlbmQsIGVuY29kaW5nKSB7XG4gIC8vIEhhbmRsZSBzdHJpbmcgY2FzZXM6XG4gIGlmICh0eXBlb2YgdmFsID09PSAnc3RyaW5nJykge1xuICAgIGlmICh0eXBlb2Ygc3RhcnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICBlbmNvZGluZyA9IHN0YXJ0XG4gICAgICBzdGFydCA9IDBcbiAgICAgIGVuZCA9IHRoaXMubGVuZ3RoXG4gICAgfSBlbHNlIGlmICh0eXBlb2YgZW5kID09PSAnc3RyaW5nJykge1xuICAgICAgZW5jb2RpbmcgPSBlbmRcbiAgICAgIGVuZCA9IHRoaXMubGVuZ3RoXG4gICAgfVxuICAgIGlmICh2YWwubGVuZ3RoID09PSAxKSB7XG4gICAgICB2YXIgY29kZSA9IHZhbC5jaGFyQ29kZUF0KDApXG4gICAgICBpZiAoY29kZSA8IDI1Nikge1xuICAgICAgICB2YWwgPSBjb2RlXG4gICAgICB9XG4gICAgfVxuICAgIGlmIChlbmNvZGluZyAhPT0gdW5kZWZpbmVkICYmIHR5cGVvZiBlbmNvZGluZyAhPT0gJ3N0cmluZycpIHtcbiAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ2VuY29kaW5nIG11c3QgYmUgYSBzdHJpbmcnKVxuICAgIH1cbiAgICBpZiAodHlwZW9mIGVuY29kaW5nID09PSAnc3RyaW5nJyAmJiAhQnVmZmVyLmlzRW5jb2RpbmcoZW5jb2RpbmcpKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdVbmtub3duIGVuY29kaW5nOiAnICsgZW5jb2RpbmcpXG4gICAgfVxuICB9IGVsc2UgaWYgKHR5cGVvZiB2YWwgPT09ICdudW1iZXInKSB7XG4gICAgdmFsID0gdmFsICYgMjU1XG4gIH1cblxuICAvLyBJbnZhbGlkIHJhbmdlcyBhcmUgbm90IHNldCB0byBhIGRlZmF1bHQsIHNvIGNhbiByYW5nZSBjaGVjayBlYXJseS5cbiAgaWYgKHN0YXJ0IDwgMCB8fCB0aGlzLmxlbmd0aCA8IHN0YXJ0IHx8IHRoaXMubGVuZ3RoIDwgZW5kKSB7XG4gICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ091dCBvZiByYW5nZSBpbmRleCcpXG4gIH1cblxuICBpZiAoZW5kIDw9IHN0YXJ0KSB7XG4gICAgcmV0dXJuIHRoaXNcbiAgfVxuXG4gIHN0YXJ0ID0gc3RhcnQgPj4+IDBcbiAgZW5kID0gZW5kID09PSB1bmRlZmluZWQgPyB0aGlzLmxlbmd0aCA6IGVuZCA+Pj4gMFxuXG4gIGlmICghdmFsKSB2YWwgPSAwXG5cbiAgdmFyIGlcbiAgaWYgKHR5cGVvZiB2YWwgPT09ICdudW1iZXInKSB7XG4gICAgZm9yIChpID0gc3RhcnQ7IGkgPCBlbmQ7ICsraSkge1xuICAgICAgdGhpc1tpXSA9IHZhbFxuICAgIH1cbiAgfSBlbHNlIHtcbiAgICB2YXIgYnl0ZXMgPSBCdWZmZXIuaXNCdWZmZXIodmFsKVxuICAgICAgPyB2YWxcbiAgICAgIDogdXRmOFRvQnl0ZXMobmV3IEJ1ZmZlcih2YWwsIGVuY29kaW5nKS50b1N0cmluZygpKVxuICAgIHZhciBsZW4gPSBieXRlcy5sZW5ndGhcbiAgICBmb3IgKGkgPSAwOyBpIDwgZW5kIC0gc3RhcnQ7ICsraSkge1xuICAgICAgdGhpc1tpICsgc3RhcnRdID0gYnl0ZXNbaSAlIGxlbl1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gdGhpc1xufVxuXG4vLyBIRUxQRVIgRlVOQ1RJT05TXG4vLyA9PT09PT09PT09PT09PT09XG5cbnZhciBJTlZBTElEX0JBU0U2NF9SRSA9IC9bXitcXC8wLTlBLVphLXotX10vZ1xuXG5mdW5jdGlvbiBiYXNlNjRjbGVhbiAoc3RyKSB7XG4gIC8vIE5vZGUgc3RyaXBzIG91dCBpbnZhbGlkIGNoYXJhY3RlcnMgbGlrZSBcXG4gYW5kIFxcdCBmcm9tIHRoZSBzdHJpbmcsIGJhc2U2NC1qcyBkb2VzIG5vdFxuICBzdHIgPSBzdHJpbmd0cmltKHN0cikucmVwbGFjZShJTlZBTElEX0JBU0U2NF9SRSwgJycpXG4gIC8vIE5vZGUgY29udmVydHMgc3RyaW5ncyB3aXRoIGxlbmd0aCA8IDIgdG8gJydcbiAgaWYgKHN0ci5sZW5ndGggPCAyKSByZXR1cm4gJydcbiAgLy8gTm9kZSBhbGxvd3MgZm9yIG5vbi1wYWRkZWQgYmFzZTY0IHN0cmluZ3MgKG1pc3NpbmcgdHJhaWxpbmcgPT09KSwgYmFzZTY0LWpzIGRvZXMgbm90XG4gIHdoaWxlIChzdHIubGVuZ3RoICUgNCAhPT0gMCkge1xuICAgIHN0ciA9IHN0ciArICc9J1xuICB9XG4gIHJldHVybiBzdHJcbn1cblxuZnVuY3Rpb24gc3RyaW5ndHJpbSAoc3RyKSB7XG4gIGlmIChzdHIudHJpbSkgcmV0dXJuIHN0ci50cmltKClcbiAgcmV0dXJuIHN0ci5yZXBsYWNlKC9eXFxzK3xcXHMrJC9nLCAnJylcbn1cblxuZnVuY3Rpb24gdG9IZXggKG4pIHtcbiAgaWYgKG4gPCAxNikgcmV0dXJuICcwJyArIG4udG9TdHJpbmcoMTYpXG4gIHJldHVybiBuLnRvU3RyaW5nKDE2KVxufVxuXG5mdW5jdGlvbiB1dGY4VG9CeXRlcyAoc3RyaW5nLCB1bml0cykge1xuICB1bml0cyA9IHVuaXRzIHx8IEluZmluaXR5XG4gIHZhciBjb2RlUG9pbnRcbiAgdmFyIGxlbmd0aCA9IHN0cmluZy5sZW5ndGhcbiAgdmFyIGxlYWRTdXJyb2dhdGUgPSBudWxsXG4gIHZhciBieXRlcyA9IFtdXG5cbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7ICsraSkge1xuICAgIGNvZGVQb2ludCA9IHN0cmluZy5jaGFyQ29kZUF0KGkpXG5cbiAgICAvLyBpcyBzdXJyb2dhdGUgY29tcG9uZW50XG4gICAgaWYgKGNvZGVQb2ludCA+IDB4RDdGRiAmJiBjb2RlUG9pbnQgPCAweEUwMDApIHtcbiAgICAgIC8vIGxhc3QgY2hhciB3YXMgYSBsZWFkXG4gICAgICBpZiAoIWxlYWRTdXJyb2dhdGUpIHtcbiAgICAgICAgLy8gbm8gbGVhZCB5ZXRcbiAgICAgICAgaWYgKGNvZGVQb2ludCA+IDB4REJGRikge1xuICAgICAgICAgIC8vIHVuZXhwZWN0ZWQgdHJhaWxcbiAgICAgICAgICBpZiAoKHVuaXRzIC09IDMpID4gLTEpIGJ5dGVzLnB1c2goMHhFRiwgMHhCRiwgMHhCRClcbiAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9IGVsc2UgaWYgKGkgKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICAvLyB1bnBhaXJlZCBsZWFkXG4gICAgICAgICAgaWYgKCh1bml0cyAtPSAzKSA+IC0xKSBieXRlcy5wdXNoKDB4RUYsIDB4QkYsIDB4QkQpXG4gICAgICAgICAgY29udGludWVcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHZhbGlkIGxlYWRcbiAgICAgICAgbGVhZFN1cnJvZ2F0ZSA9IGNvZGVQb2ludFxuXG4gICAgICAgIGNvbnRpbnVlXG4gICAgICB9XG5cbiAgICAgIC8vIDIgbGVhZHMgaW4gYSByb3dcbiAgICAgIGlmIChjb2RlUG9pbnQgPCAweERDMDApIHtcbiAgICAgICAgaWYgKCh1bml0cyAtPSAzKSA+IC0xKSBieXRlcy5wdXNoKDB4RUYsIDB4QkYsIDB4QkQpXG4gICAgICAgIGxlYWRTdXJyb2dhdGUgPSBjb2RlUG9pbnRcbiAgICAgICAgY29udGludWVcbiAgICAgIH1cblxuICAgICAgLy8gdmFsaWQgc3Vycm9nYXRlIHBhaXJcbiAgICAgIGNvZGVQb2ludCA9IChsZWFkU3Vycm9nYXRlIC0gMHhEODAwIDw8IDEwIHwgY29kZVBvaW50IC0gMHhEQzAwKSArIDB4MTAwMDBcbiAgICB9IGVsc2UgaWYgKGxlYWRTdXJyb2dhdGUpIHtcbiAgICAgIC8vIHZhbGlkIGJtcCBjaGFyLCBidXQgbGFzdCBjaGFyIHdhcyBhIGxlYWRcbiAgICAgIGlmICgodW5pdHMgLT0gMykgPiAtMSkgYnl0ZXMucHVzaCgweEVGLCAweEJGLCAweEJEKVxuICAgIH1cblxuICAgIGxlYWRTdXJyb2dhdGUgPSBudWxsXG5cbiAgICAvLyBlbmNvZGUgdXRmOFxuICAgIGlmIChjb2RlUG9pbnQgPCAweDgwKSB7XG4gICAgICBpZiAoKHVuaXRzIC09IDEpIDwgMCkgYnJlYWtcbiAgICAgIGJ5dGVzLnB1c2goY29kZVBvaW50KVxuICAgIH0gZWxzZSBpZiAoY29kZVBvaW50IDwgMHg4MDApIHtcbiAgICAgIGlmICgodW5pdHMgLT0gMikgPCAwKSBicmVha1xuICAgICAgYnl0ZXMucHVzaChcbiAgICAgICAgY29kZVBvaW50ID4+IDB4NiB8IDB4QzAsXG4gICAgICAgIGNvZGVQb2ludCAmIDB4M0YgfCAweDgwXG4gICAgICApXG4gICAgfSBlbHNlIGlmIChjb2RlUG9pbnQgPCAweDEwMDAwKSB7XG4gICAgICBpZiAoKHVuaXRzIC09IDMpIDwgMCkgYnJlYWtcbiAgICAgIGJ5dGVzLnB1c2goXG4gICAgICAgIGNvZGVQb2ludCA+PiAweEMgfCAweEUwLFxuICAgICAgICBjb2RlUG9pbnQgPj4gMHg2ICYgMHgzRiB8IDB4ODAsXG4gICAgICAgIGNvZGVQb2ludCAmIDB4M0YgfCAweDgwXG4gICAgICApXG4gICAgfSBlbHNlIGlmIChjb2RlUG9pbnQgPCAweDExMDAwMCkge1xuICAgICAgaWYgKCh1bml0cyAtPSA0KSA8IDApIGJyZWFrXG4gICAgICBieXRlcy5wdXNoKFxuICAgICAgICBjb2RlUG9pbnQgPj4gMHgxMiB8IDB4RjAsXG4gICAgICAgIGNvZGVQb2ludCA+PiAweEMgJiAweDNGIHwgMHg4MCxcbiAgICAgICAgY29kZVBvaW50ID4+IDB4NiAmIDB4M0YgfCAweDgwLFxuICAgICAgICBjb2RlUG9pbnQgJiAweDNGIHwgMHg4MFxuICAgICAgKVxuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ludmFsaWQgY29kZSBwb2ludCcpXG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGJ5dGVzXG59XG5cbmZ1bmN0aW9uIGFzY2lpVG9CeXRlcyAoc3RyKSB7XG4gIHZhciBieXRlQXJyYXkgPSBbXVxuICBmb3IgKHZhciBpID0gMDsgaSA8IHN0ci5sZW5ndGg7ICsraSkge1xuICAgIC8vIE5vZGUncyBjb2RlIHNlZW1zIHRvIGJlIGRvaW5nIHRoaXMgYW5kIG5vdCAmIDB4N0YuLlxuICAgIGJ5dGVBcnJheS5wdXNoKHN0ci5jaGFyQ29kZUF0KGkpICYgMHhGRilcbiAgfVxuICByZXR1cm4gYnl0ZUFycmF5XG59XG5cbmZ1bmN0aW9uIHV0ZjE2bGVUb0J5dGVzIChzdHIsIHVuaXRzKSB7XG4gIHZhciBjLCBoaSwgbG9cbiAgdmFyIGJ5dGVBcnJheSA9IFtdXG4gIGZvciAodmFyIGkgPSAwOyBpIDwgc3RyLmxlbmd0aDsgKytpKSB7XG4gICAgaWYgKCh1bml0cyAtPSAyKSA8IDApIGJyZWFrXG5cbiAgICBjID0gc3RyLmNoYXJDb2RlQXQoaSlcbiAgICBoaSA9IGMgPj4gOFxuICAgIGxvID0gYyAlIDI1NlxuICAgIGJ5dGVBcnJheS5wdXNoKGxvKVxuICAgIGJ5dGVBcnJheS5wdXNoKGhpKVxuICB9XG5cbiAgcmV0dXJuIGJ5dGVBcnJheVxufVxuXG5mdW5jdGlvbiBiYXNlNjRUb0J5dGVzIChzdHIpIHtcbiAgcmV0dXJuIGJhc2U2NC50b0J5dGVBcnJheShiYXNlNjRjbGVhbihzdHIpKVxufVxuXG5mdW5jdGlvbiBibGl0QnVmZmVyIChzcmMsIGRzdCwgb2Zmc2V0LCBsZW5ndGgpIHtcbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7ICsraSkge1xuICAgIGlmICgoaSArIG9mZnNldCA+PSBkc3QubGVuZ3RoKSB8fCAoaSA+PSBzcmMubGVuZ3RoKSkgYnJlYWtcbiAgICBkc3RbaSArIG9mZnNldF0gPSBzcmNbaV1cbiAgfVxuICByZXR1cm4gaVxufVxuXG5mdW5jdGlvbiBpc25hbiAodmFsKSB7XG4gIHJldHVybiB2YWwgIT09IHZhbCAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXNlbGYtY29tcGFyZVxufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/buffer/index.js\n"); + +/***/ }), + +/***/ "./node_modules/builtin-status-codes/browser.js": +/*!******************************************************!*\ + !*** ./node_modules/builtin-status-codes/browser.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYnVpbHRpbi1zdGF0dXMtY29kZXMvYnJvd3Nlci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2J1aWx0aW4tc3RhdHVzLWNvZGVzL2Jyb3dzZXIuanM/OGMwNSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHtcbiAgXCIxMDBcIjogXCJDb250aW51ZVwiLFxuICBcIjEwMVwiOiBcIlN3aXRjaGluZyBQcm90b2NvbHNcIixcbiAgXCIxMDJcIjogXCJQcm9jZXNzaW5nXCIsXG4gIFwiMjAwXCI6IFwiT0tcIixcbiAgXCIyMDFcIjogXCJDcmVhdGVkXCIsXG4gIFwiMjAyXCI6IFwiQWNjZXB0ZWRcIixcbiAgXCIyMDNcIjogXCJOb24tQXV0aG9yaXRhdGl2ZSBJbmZvcm1hdGlvblwiLFxuICBcIjIwNFwiOiBcIk5vIENvbnRlbnRcIixcbiAgXCIyMDVcIjogXCJSZXNldCBDb250ZW50XCIsXG4gIFwiMjA2XCI6IFwiUGFydGlhbCBDb250ZW50XCIsXG4gIFwiMjA3XCI6IFwiTXVsdGktU3RhdHVzXCIsXG4gIFwiMjA4XCI6IFwiQWxyZWFkeSBSZXBvcnRlZFwiLFxuICBcIjIyNlwiOiBcIklNIFVzZWRcIixcbiAgXCIzMDBcIjogXCJNdWx0aXBsZSBDaG9pY2VzXCIsXG4gIFwiMzAxXCI6IFwiTW92ZWQgUGVybWFuZW50bHlcIixcbiAgXCIzMDJcIjogXCJGb3VuZFwiLFxuICBcIjMwM1wiOiBcIlNlZSBPdGhlclwiLFxuICBcIjMwNFwiOiBcIk5vdCBNb2RpZmllZFwiLFxuICBcIjMwNVwiOiBcIlVzZSBQcm94eVwiLFxuICBcIjMwN1wiOiBcIlRlbXBvcmFyeSBSZWRpcmVjdFwiLFxuICBcIjMwOFwiOiBcIlBlcm1hbmVudCBSZWRpcmVjdFwiLFxuICBcIjQwMFwiOiBcIkJhZCBSZXF1ZXN0XCIsXG4gIFwiNDAxXCI6IFwiVW5hdXRob3JpemVkXCIsXG4gIFwiNDAyXCI6IFwiUGF5bWVudCBSZXF1aXJlZFwiLFxuICBcIjQwM1wiOiBcIkZvcmJpZGRlblwiLFxuICBcIjQwNFwiOiBcIk5vdCBGb3VuZFwiLFxuICBcIjQwNVwiOiBcIk1ldGhvZCBOb3QgQWxsb3dlZFwiLFxuICBcIjQwNlwiOiBcIk5vdCBBY2NlcHRhYmxlXCIsXG4gIFwiNDA3XCI6IFwiUHJveHkgQXV0aGVudGljYXRpb24gUmVxdWlyZWRcIixcbiAgXCI0MDhcIjogXCJSZXF1ZXN0IFRpbWVvdXRcIixcbiAgXCI0MDlcIjogXCJDb25mbGljdFwiLFxuICBcIjQxMFwiOiBcIkdvbmVcIixcbiAgXCI0MTFcIjogXCJMZW5ndGggUmVxdWlyZWRcIixcbiAgXCI0MTJcIjogXCJQcmVjb25kaXRpb24gRmFpbGVkXCIsXG4gIFwiNDEzXCI6IFwiUGF5bG9hZCBUb28gTGFyZ2VcIixcbiAgXCI0MTRcIjogXCJVUkkgVG9vIExvbmdcIixcbiAgXCI0MTVcIjogXCJVbnN1cHBvcnRlZCBNZWRpYSBUeXBlXCIsXG4gIFwiNDE2XCI6IFwiUmFuZ2UgTm90IFNhdGlzZmlhYmxlXCIsXG4gIFwiNDE3XCI6IFwiRXhwZWN0YXRpb24gRmFpbGVkXCIsXG4gIFwiNDE4XCI6IFwiSSdtIGEgdGVhcG90XCIsXG4gIFwiNDIxXCI6IFwiTWlzZGlyZWN0ZWQgUmVxdWVzdFwiLFxuICBcIjQyMlwiOiBcIlVucHJvY2Vzc2FibGUgRW50aXR5XCIsXG4gIFwiNDIzXCI6IFwiTG9ja2VkXCIsXG4gIFwiNDI0XCI6IFwiRmFpbGVkIERlcGVuZGVuY3lcIixcbiAgXCI0MjVcIjogXCJVbm9yZGVyZWQgQ29sbGVjdGlvblwiLFxuICBcIjQyNlwiOiBcIlVwZ3JhZGUgUmVxdWlyZWRcIixcbiAgXCI0MjhcIjogXCJQcmVjb25kaXRpb24gUmVxdWlyZWRcIixcbiAgXCI0MjlcIjogXCJUb28gTWFueSBSZXF1ZXN0c1wiLFxuICBcIjQzMVwiOiBcIlJlcXVlc3QgSGVhZGVyIEZpZWxkcyBUb28gTGFyZ2VcIixcbiAgXCI0NTFcIjogXCJVbmF2YWlsYWJsZSBGb3IgTGVnYWwgUmVhc29uc1wiLFxuICBcIjUwMFwiOiBcIkludGVybmFsIFNlcnZlciBFcnJvclwiLFxuICBcIjUwMVwiOiBcIk5vdCBJbXBsZW1lbnRlZFwiLFxuICBcIjUwMlwiOiBcIkJhZCBHYXRld2F5XCIsXG4gIFwiNTAzXCI6IFwiU2VydmljZSBVbmF2YWlsYWJsZVwiLFxuICBcIjUwNFwiOiBcIkdhdGV3YXkgVGltZW91dFwiLFxuICBcIjUwNVwiOiBcIkhUVFAgVmVyc2lvbiBOb3QgU3VwcG9ydGVkXCIsXG4gIFwiNTA2XCI6IFwiVmFyaWFudCBBbHNvIE5lZ290aWF0ZXNcIixcbiAgXCI1MDdcIjogXCJJbnN1ZmZpY2llbnQgU3RvcmFnZVwiLFxuICBcIjUwOFwiOiBcIkxvb3AgRGV0ZWN0ZWRcIixcbiAgXCI1MDlcIjogXCJCYW5kd2lkdGggTGltaXQgRXhjZWVkZWRcIixcbiAgXCI1MTBcIjogXCJOb3QgRXh0ZW5kZWRcIixcbiAgXCI1MTFcIjogXCJOZXR3b3JrIEF1dGhlbnRpY2F0aW9uIFJlcXVpcmVkXCJcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/builtin-status-codes/browser.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/es/promise/index.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/es/promise/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("__webpack_require__(/*! ../../modules/es.object.to-string */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! ../../modules/es.string.iterator */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! ../../modules/es.promise */ \"./node_modules/core-js/modules/es.promise.js\");\n__webpack_require__(/*! ../../modules/es.promise.finally */ \"./node_modules/core-js/modules/es.promise.finally.js\");\nvar path = __webpack_require__(/*! ../../internals/path */ \"./node_modules/core-js/internals/path.js\");\n\nmodule.exports = path.Promise;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9lcy9wcm9taXNlL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9lcy9wcm9taXNlL2luZGV4LmpzPzM5ODAiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5vYmplY3QudG8tc3RyaW5nJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5pdGVyYXRvcicpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy93ZWIuZG9tLWNvbGxlY3Rpb25zLml0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnByb21pc2UnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMucHJvbWlzZS5maW5hbGx5Jyk7XG52YXIgcGF0aCA9IHJlcXVpcmUoJy4uLy4uL2ludGVybmFscy9wYXRoJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gcGF0aC5Qcm9taXNlO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/es/promise/index.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/es/string/index.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/es/string/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("__webpack_require__(/*! ../../modules/es.string.from-code-point */ \"./node_modules/core-js/modules/es.string.from-code-point.js\");\n__webpack_require__(/*! ../../modules/es.string.raw */ \"./node_modules/core-js/modules/es.string.raw.js\");\n__webpack_require__(/*! ../../modules/es.string.code-point-at */ \"./node_modules/core-js/modules/es.string.code-point-at.js\");\n__webpack_require__(/*! ../../modules/es.string.ends-with */ \"./node_modules/core-js/modules/es.string.ends-with.js\");\n__webpack_require__(/*! ../../modules/es.string.includes */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! ../../modules/es.string.match */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! ../../modules/es.string.match-all */ \"./node_modules/core-js/modules/es.string.match-all.js\");\n__webpack_require__(/*! ../../modules/es.string.pad-end */ \"./node_modules/core-js/modules/es.string.pad-end.js\");\n__webpack_require__(/*! ../../modules/es.string.pad-start */ \"./node_modules/core-js/modules/es.string.pad-start.js\");\n__webpack_require__(/*! ../../modules/es.string.repeat */ \"./node_modules/core-js/modules/es.string.repeat.js\");\n__webpack_require__(/*! ../../modules/es.string.replace */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! ../../modules/es.string.search */ \"./node_modules/core-js/modules/es.string.search.js\");\n__webpack_require__(/*! ../../modules/es.string.split */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! ../../modules/es.string.starts-with */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! ../../modules/es.string.trim */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! ../../modules/es.string.trim-start */ \"./node_modules/core-js/modules/es.string.trim-start.js\");\n__webpack_require__(/*! ../../modules/es.string.trim-end */ \"./node_modules/core-js/modules/es.string.trim-end.js\");\n__webpack_require__(/*! ../../modules/es.string.iterator */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! ../../modules/es.string.anchor */ \"./node_modules/core-js/modules/es.string.anchor.js\");\n__webpack_require__(/*! ../../modules/es.string.big */ \"./node_modules/core-js/modules/es.string.big.js\");\n__webpack_require__(/*! ../../modules/es.string.blink */ \"./node_modules/core-js/modules/es.string.blink.js\");\n__webpack_require__(/*! ../../modules/es.string.bold */ \"./node_modules/core-js/modules/es.string.bold.js\");\n__webpack_require__(/*! ../../modules/es.string.fixed */ \"./node_modules/core-js/modules/es.string.fixed.js\");\n__webpack_require__(/*! ../../modules/es.string.fontcolor */ \"./node_modules/core-js/modules/es.string.fontcolor.js\");\n__webpack_require__(/*! ../../modules/es.string.fontsize */ \"./node_modules/core-js/modules/es.string.fontsize.js\");\n__webpack_require__(/*! ../../modules/es.string.italics */ \"./node_modules/core-js/modules/es.string.italics.js\");\n__webpack_require__(/*! ../../modules/es.string.link */ \"./node_modules/core-js/modules/es.string.link.js\");\n__webpack_require__(/*! ../../modules/es.string.small */ \"./node_modules/core-js/modules/es.string.small.js\");\n__webpack_require__(/*! ../../modules/es.string.strike */ \"./node_modules/core-js/modules/es.string.strike.js\");\n__webpack_require__(/*! ../../modules/es.string.sub */ \"./node_modules/core-js/modules/es.string.sub.js\");\n__webpack_require__(/*! ../../modules/es.string.sup */ \"./node_modules/core-js/modules/es.string.sup.js\");\nvar path = __webpack_require__(/*! ../../internals/path */ \"./node_modules/core-js/internals/path.js\");\n\nmodule.exports = path.String;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9lcy9zdHJpbmcvaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2VzL3N0cmluZy9pbmRleC5qcz85ODI1Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLmZyb20tY29kZS1wb2ludCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcucmF3Jyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5jb2RlLXBvaW50LWF0Jyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5lbmRzLXdpdGgnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLmluY2x1ZGVzJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5tYXRjaCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcubWF0Y2gtYWxsJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5wYWQtZW5kJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5wYWQtc3RhcnQnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLnJlcGVhdCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcucmVwbGFjZScpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuc2VhcmNoJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5zcGxpdCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuc3RhcnRzLXdpdGgnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLnRyaW0nKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLnRyaW0tc3RhcnQnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLnRyaW0tZW5kJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5pdGVyYXRvcicpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuYW5jaG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5iaWcnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLmJsaW5rJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5ib2xkJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5maXhlZCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuZm9udGNvbG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5mb250c2l6ZScpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuaXRhbGljcycpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcubGluaycpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuc21hbGwnKTtcbnJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXMuc3RyaW5nLnN0cmlrZScpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lcy5zdHJpbmcuc3ViJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnN0cmluZy5zdXAnKTtcbnZhciBwYXRoID0gcmVxdWlyZSgnLi4vLi4vaW50ZXJuYWxzL3BhdGgnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBwYXRoLlN0cmluZztcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/es/string/index.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/a-function.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/a-function.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYS1mdW5jdGlvbi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2EtZnVuY3Rpb24uanM/MWMwYiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAodHlwZW9mIGl0ICE9ICdmdW5jdGlvbicpIHtcbiAgICB0aHJvdyBUeXBlRXJyb3IoU3RyaW5nKGl0KSArICcgaXMgbm90IGEgZnVuY3Rpb24nKTtcbiAgfSByZXR1cm4gaXQ7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/a-function.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/add-to-unscopables.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/internals/add-to-unscopables.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n hide(ArrayPrototype, UNSCOPABLES, create(null));\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYWRkLXRvLXVuc2NvcGFibGVzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYWRkLXRvLXVuc2NvcGFibGVzLmpzPzQ0ZDIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xudmFyIGNyZWF0ZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtY3JlYXRlJyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oaWRlJyk7XG5cbnZhciBVTlNDT1BBQkxFUyA9IHdlbGxLbm93blN5bWJvbCgndW5zY29wYWJsZXMnKTtcbnZhciBBcnJheVByb3RvdHlwZSA9IEFycmF5LnByb3RvdHlwZTtcblxuLy8gQXJyYXkucHJvdG90eXBlW0BAdW5zY29wYWJsZXNdXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1hcnJheS5wcm90b3R5cGUtQEB1bnNjb3BhYmxlc1xuaWYgKEFycmF5UHJvdG90eXBlW1VOU0NPUEFCTEVTXSA9PSB1bmRlZmluZWQpIHtcbiAgaGlkZShBcnJheVByb3RvdHlwZSwgVU5TQ09QQUJMRVMsIGNyZWF0ZShudWxsKSk7XG59XG5cbi8vIGFkZCBhIGtleSB0byBBcnJheS5wcm90b3R5cGVbQEB1bnNjb3BhYmxlc11cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGtleSkge1xuICBBcnJheVByb3RvdHlwZVtVTlNDT1BBQkxFU11ba2V5XSA9IHRydWU7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/add-to-unscopables.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/advance-string-index.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/advance-string-index.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar codePointAt = __webpack_require__(/*! ../internals/string-at */ \"./node_modules/core-js/internals/string-at.js\");\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? codePointAt(S, index, true).length : 1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYWR2YW5jZS1zdHJpbmctaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hZHZhbmNlLXN0cmluZy1pbmRleC5qcz84YWE1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBjb2RlUG9pbnRBdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zdHJpbmctYXQnKTtcblxuLy8gYEFkdmFuY2VTdHJpbmdJbmRleGAgYWJzdHJhY3Qgb3BlcmF0aW9uXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1hZHZhbmNlc3RyaW5naW5kZXhcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKFMsIGluZGV4LCB1bmljb2RlKSB7XG4gIHJldHVybiBpbmRleCArICh1bmljb2RlID8gY29kZVBvaW50QXQoUywgaW5kZXgsIHRydWUpLmxlbmd0aCA6IDEpO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/advance-string-index.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/an-instance.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/an-instance.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYW4taW5zdGFuY2UuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hbi1pbnN0YW5jZS5qcz8xOWFhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBDb25zdHJ1Y3RvciwgbmFtZSkge1xuICBpZiAoIShpdCBpbnN0YW5jZW9mIENvbnN0cnVjdG9yKSkge1xuICAgIHRocm93IFR5cGVFcnJvcignSW5jb3JyZWN0ICcgKyAobmFtZSA/IG5hbWUgKyAnICcgOiAnJykgKyAnaW52b2NhdGlvbicpO1xuICB9IHJldHVybiBpdDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/an-instance.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/an-object.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/an-object.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYW4tb2JqZWN0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYW4tb2JqZWN0LmpzPzgyNWEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLW9iamVjdCcpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAoIWlzT2JqZWN0KGl0KSkge1xuICAgIHRocm93IFR5cGVFcnJvcihTdHJpbmcoaXQpICsgJyBpcyBub3QgYW4gb2JqZWN0Jyk7XG4gIH0gcmV0dXJuIGl0O1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/an-object.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/array-includes.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/array-includes.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\n// false -> Array#indexOf\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n// true -> Array#includes\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYXJyYXktaW5jbHVkZXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hcnJheS1pbmNsdWRlcy5qcz80ZDY0Il0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0luZGV4ZWRPYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1sZW5ndGgnKTtcbnZhciB0b0Fic29sdXRlSW5kZXggPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvdG8tYWJzb2x1dGUtaW5kZXgnKTtcblxuLy8gYEFycmF5LnByb3RvdHlwZS57IGluZGV4T2YsIGluY2x1ZGVzIH1gIG1ldGhvZHMgaW1wbGVtZW50YXRpb25cbi8vIGZhbHNlIC0+IEFycmF5I2luZGV4T2Zcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWFycmF5LnByb3RvdHlwZS5pbmRleG9mXG4vLyB0cnVlICAtPiBBcnJheSNpbmNsdWRlc1xuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtYXJyYXkucHJvdG90eXBlLmluY2x1ZGVzXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChJU19JTkNMVURFUykge1xuICByZXR1cm4gZnVuY3Rpb24gKCR0aGlzLCBlbCwgZnJvbUluZGV4KSB7XG4gICAgdmFyIE8gPSB0b0luZGV4ZWRPYmplY3QoJHRoaXMpO1xuICAgIHZhciBsZW5ndGggPSB0b0xlbmd0aChPLmxlbmd0aCk7XG4gICAgdmFyIGluZGV4ID0gdG9BYnNvbHV0ZUluZGV4KGZyb21JbmRleCwgbGVuZ3RoKTtcbiAgICB2YXIgdmFsdWU7XG4gICAgLy8gQXJyYXkjaW5jbHVkZXMgdXNlcyBTYW1lVmFsdWVaZXJvIGVxdWFsaXR5IGFsZ29yaXRobVxuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1zZWxmLWNvbXBhcmVcbiAgICBpZiAoSVNfSU5DTFVERVMgJiYgZWwgIT0gZWwpIHdoaWxlIChsZW5ndGggPiBpbmRleCkge1xuICAgICAgdmFsdWUgPSBPW2luZGV4KytdO1xuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXNlbGYtY29tcGFyZVxuICAgICAgaWYgKHZhbHVlICE9IHZhbHVlKSByZXR1cm4gdHJ1ZTtcbiAgICAvLyBBcnJheSNpbmRleE9mIGlnbm9yZXMgaG9sZXMsIEFycmF5I2luY2x1ZGVzIC0gbm90XG4gICAgfSBlbHNlIGZvciAoO2xlbmd0aCA+IGluZGV4OyBpbmRleCsrKSBpZiAoSVNfSU5DTFVERVMgfHwgaW5kZXggaW4gTykge1xuICAgICAgaWYgKE9baW5kZXhdID09PSBlbCkgcmV0dXJuIElTX0lOQ0xVREVTIHx8IGluZGV4IHx8IDA7XG4gICAgfSByZXR1cm4gIUlTX0lOQ0xVREVTICYmIC0xO1xuICB9O1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/array-includes.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/bind-context.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/bind-context.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js/internals/a-function.js\");\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYmluZC1jb250ZXh0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYmluZC1jb250ZXh0LmpzP2Y4YzIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9hLWZ1bmN0aW9uJyk7XG5cbi8vIG9wdGlvbmFsIC8gc2ltcGxlIGNvbnRleHQgYmluZGluZ1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZm4sIHRoYXQsIGxlbmd0aCkge1xuICBhRnVuY3Rpb24oZm4pO1xuICBpZiAodGhhdCA9PT0gdW5kZWZpbmVkKSByZXR1cm4gZm47XG4gIHN3aXRjaCAobGVuZ3RoKSB7XG4gICAgY2FzZSAwOiByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCk7XG4gICAgfTtcbiAgICBjYXNlIDE6IHJldHVybiBmdW5jdGlvbiAoYSkge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCwgYSk7XG4gICAgfTtcbiAgICBjYXNlIDI6IHJldHVybiBmdW5jdGlvbiAoYSwgYikge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCwgYSwgYik7XG4gICAgfTtcbiAgICBjYXNlIDM6IHJldHVybiBmdW5jdGlvbiAoYSwgYiwgYykge1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhhdCwgYSwgYiwgYyk7XG4gICAgfTtcbiAgfVxuICByZXR1cm4gZnVuY3Rpb24gKC8qIC4uLmFyZ3MgKi8pIHtcbiAgICByZXR1cm4gZm4uYXBwbHkodGhhdCwgYXJndW1lbnRzKTtcbiAgfTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/bind-context.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js": +/*!****************************************************************************!*\ + !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY2FsbC13aXRoLXNhZmUtaXRlcmF0aW9uLWNsb3NpbmcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jYWxsLXdpdGgtc2FmZS1pdGVyYXRpb24tY2xvc2luZy5qcz85YmRkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9hbi1vYmplY3QnKTtcblxuLy8gY2FsbCBzb21ldGhpbmcgb24gaXRlcmF0b3Igc3RlcCB3aXRoIHNhZmUgY2xvc2luZyBvbiBlcnJvclxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXRlcmF0b3IsIGZuLCB2YWx1ZSwgRU5UUklFUykge1xuICB0cnkge1xuICAgIHJldHVybiBFTlRSSUVTID8gZm4oYW5PYmplY3QodmFsdWUpWzBdLCB2YWx1ZVsxXSkgOiBmbih2YWx1ZSk7XG4gIC8vIDcuNC42IEl0ZXJhdG9yQ2xvc2UoaXRlcmF0b3IsIGNvbXBsZXRpb24pXG4gIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgdmFyIHJldHVybk1ldGhvZCA9IGl0ZXJhdG9yWydyZXR1cm4nXTtcbiAgICBpZiAocmV0dXJuTWV0aG9kICE9PSB1bmRlZmluZWQpIGFuT2JqZWN0KHJldHVybk1ldGhvZC5jYWxsKGl0ZXJhdG9yKSk7XG4gICAgdGhyb3cgZXJyb3I7XG4gIH1cbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/call-with-safe-iteration-closing.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js": +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY2hlY2stY29ycmVjdG5lc3Mtb2YtaXRlcmF0aW9uLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY2hlY2stY29ycmVjdG5lc3Mtb2YtaXRlcmF0aW9uLmpzPzFjN2UiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xuXG52YXIgSVRFUkFUT1IgPSB3ZWxsS25vd25TeW1ib2woJ2l0ZXJhdG9yJyk7XG52YXIgU0FGRV9DTE9TSU5HID0gZmFsc2U7XG5cbnRyeSB7XG4gIHZhciBjYWxsZWQgPSAwO1xuICB2YXIgaXRlcmF0b3JXaXRoUmV0dXJuID0ge1xuICAgIG5leHQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgIHJldHVybiB7IGRvbmU6ICEhY2FsbGVkKysgfTtcbiAgICB9LFxuICAgICdyZXR1cm4nOiBmdW5jdGlvbiAoKSB7XG4gICAgICBTQUZFX0NMT1NJTkcgPSB0cnVlO1xuICAgIH1cbiAgfTtcbiAgaXRlcmF0b3JXaXRoUmV0dXJuW0lURVJBVE9SXSA9IGZ1bmN0aW9uICgpIHtcbiAgICByZXR1cm4gdGhpcztcbiAgfTtcbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXRocm93LWxpdGVyYWxcbiAgQXJyYXkuZnJvbShpdGVyYXRvcldpdGhSZXR1cm4sIGZ1bmN0aW9uICgpIHsgdGhyb3cgMjsgfSk7XG59IGNhdGNoIChlcnJvcikgeyAvKiBlbXB0eSAqLyB9XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGV4ZWMsIFNLSVBfQ0xPU0lORykge1xuICBpZiAoIVNLSVBfQ0xPU0lORyAmJiAhU0FGRV9DTE9TSU5HKSByZXR1cm4gZmFsc2U7XG4gIHZhciBJVEVSQVRJT05fU1VQUE9SVCA9IGZhbHNlO1xuICB0cnkge1xuICAgIHZhciBvYmplY3QgPSB7fTtcbiAgICBvYmplY3RbSVRFUkFUT1JdID0gZnVuY3Rpb24gKCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgbmV4dDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiB7IGRvbmU6IElURVJBVElPTl9TVVBQT1JUID0gdHJ1ZSB9O1xuICAgICAgICB9XG4gICAgICB9O1xuICAgIH07XG4gICAgZXhlYyhvYmplY3QpO1xuICB9IGNhdGNoIChlcnJvcikgeyAvKiBlbXB0eSAqLyB9XG4gIHJldHVybiBJVEVSQVRJT05fU1VQUE9SVDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/check-correctness-of-iteration.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/classof-raw.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/classof-raw.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY2xhc3NvZi1yYXcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jbGFzc29mLXJhdy5qcz9jNmI2Il0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gdG9TdHJpbmcuY2FsbChpdCkuc2xpY2UoOCwgLTEpO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/classof-raw.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/classof.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/classof.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY2xhc3NvZi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NsYXNzb2YuanM/ZjVkZiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY2xhc3NvZlJhdyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jbGFzc29mLXJhdycpO1xudmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xuXG52YXIgVE9fU1RSSU5HX1RBRyA9IHdlbGxLbm93blN5bWJvbCgndG9TdHJpbmdUYWcnKTtcbi8vIEVTMyB3cm9uZyBoZXJlXG52YXIgQ09SUkVDVF9BUkdVTUVOVFMgPSBjbGFzc29mUmF3KGZ1bmN0aW9uICgpIHsgcmV0dXJuIGFyZ3VtZW50czsgfSgpKSA9PSAnQXJndW1lbnRzJztcblxuLy8gZmFsbGJhY2sgZm9yIElFMTEgU2NyaXB0IEFjY2VzcyBEZW5pZWQgZXJyb3JcbnZhciB0cnlHZXQgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICB0cnkge1xuICAgIHJldHVybiBpdFtrZXldO1xuICB9IGNhdGNoIChlcnJvcikgeyAvKiBlbXB0eSAqLyB9XG59O1xuXG4vLyBnZXR0aW5nIHRhZyBmcm9tIEVTNisgYE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmdgXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICB2YXIgTywgdGFnLCByZXN1bHQ7XG4gIHJldHVybiBpdCA9PT0gdW5kZWZpbmVkID8gJ1VuZGVmaW5lZCcgOiBpdCA9PT0gbnVsbCA/ICdOdWxsJ1xuICAgIC8vIEBAdG9TdHJpbmdUYWcgY2FzZVxuICAgIDogdHlwZW9mICh0YWcgPSB0cnlHZXQoTyA9IE9iamVjdChpdCksIFRPX1NUUklOR19UQUcpKSA9PSAnc3RyaW5nJyA/IHRhZ1xuICAgIC8vIGJ1aWx0aW5UYWcgY2FzZVxuICAgIDogQ09SUkVDVF9BUkdVTUVOVFMgPyBjbGFzc29mUmF3KE8pXG4gICAgLy8gRVMzIGFyZ3VtZW50cyBmYWxsYmFja1xuICAgIDogKHJlc3VsdCA9IGNsYXNzb2ZSYXcoTykpID09ICdPYmplY3QnICYmIHR5cGVvZiBPLmNhbGxlZSA9PSAnZnVuY3Rpb24nID8gJ0FyZ3VtZW50cycgOiByZXN1bHQ7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/classof.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/copy-constructor-properties.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar ownKeys = __webpack_require__(/*! ../internals/own-keys */ \"./node_modules/core-js/internals/own-keys.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY29weS1jb25zdHJ1Y3Rvci1wcm9wZXJ0aWVzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY29weS1jb25zdHJ1Y3Rvci1wcm9wZXJ0aWVzLmpzP2U4OTMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGhhcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oYXMnKTtcbnZhciBvd25LZXlzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL293bi1rZXlzJyk7XG52YXIgZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yTW9kdWxlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL29iamVjdC1nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3InKTtcbnZhciBkZWZpbmVQcm9wZXJ0eU1vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnR5Jyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKHRhcmdldCwgc291cmNlKSB7XG4gIHZhciBrZXlzID0gb3duS2V5cyhzb3VyY2UpO1xuICB2YXIgZGVmaW5lUHJvcGVydHkgPSBkZWZpbmVQcm9wZXJ0eU1vZHVsZS5mO1xuICB2YXIgZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yTW9kdWxlLmY7XG4gIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xuICAgIHZhciBrZXkgPSBrZXlzW2ldO1xuICAgIGlmICghaGFzKHRhcmdldCwga2V5KSkgZGVmaW5lUHJvcGVydHkodGFyZ2V0LCBrZXksIGdldE93blByb3BlcnR5RGVzY3JpcHRvcihzb3VyY2UsIGtleSkpO1xuICB9XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/copy-constructor-properties.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/correct-is-regexp-logic.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY29ycmVjdC1pcy1yZWdleHAtbG9naWMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jb3JyZWN0LWlzLXJlZ2V4cC1sb2dpYy5qcz9hYjEzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcblxudmFyIE1BVENIID0gd2VsbEtub3duU3ltYm9sKCdtYXRjaCcpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChNRVRIT0RfTkFNRSkge1xuICB2YXIgcmVnZXhwID0gLy4vO1xuICB0cnkge1xuICAgICcvLi8nW01FVEhPRF9OQU1FXShyZWdleHApO1xuICB9IGNhdGNoIChlKSB7XG4gICAgdHJ5IHtcbiAgICAgIHJlZ2V4cFtNQVRDSF0gPSBmYWxzZTtcbiAgICAgIHJldHVybiAnLy4vJ1tNRVRIT0RfTkFNRV0ocmVnZXhwKTtcbiAgICB9IGNhdGNoIChmKSB7IC8qIGVtcHR5ICovIH1cbiAgfSByZXR1cm4gZmFsc2U7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/correct-is-regexp-logic.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/correct-prototype-getter.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY29ycmVjdC1wcm90b3R5cGUtZ2V0dGVyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY29ycmVjdC1wcm90b3R5cGUtZ2V0dGVyLmpzP2UxNzciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGZhaWxzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZhaWxzJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgZnVuY3Rpb24gRigpIHsgLyogZW1wdHkgKi8gfVxuICBGLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IG51bGw7XG4gIHJldHVybiBPYmplY3QuZ2V0UHJvdG90eXBlT2YobmV3IEYoKSkgIT09IEYucHJvdG90eXBlO1xufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/correct-prototype-getter.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/create-html.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/create-html.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nvar quot = /\"/g;\n\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\n// https://tc39.github.io/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n var S = String(requireObjectCoercible(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLWh0bWwuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jcmVhdGUtaHRtbC5qcz84NTdhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciByZXF1aXJlT2JqZWN0Q29lcmNpYmxlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3JlcXVpcmUtb2JqZWN0LWNvZXJjaWJsZScpO1xuXG52YXIgcXVvdCA9IC9cIi9nO1xuXG4vLyBCLjIuMy4yLjEgQ3JlYXRlSFRNTChzdHJpbmcsIHRhZywgYXR0cmlidXRlLCB2YWx1ZSlcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWNyZWF0ZWh0bWxcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKHN0cmluZywgdGFnLCBhdHRyaWJ1dGUsIHZhbHVlKSB7XG4gIHZhciBTID0gU3RyaW5nKHJlcXVpcmVPYmplY3RDb2VyY2libGUoc3RyaW5nKSk7XG4gIHZhciBwMSA9ICc8JyArIHRhZztcbiAgaWYgKGF0dHJpYnV0ZSAhPT0gJycpIHAxICs9ICcgJyArIGF0dHJpYnV0ZSArICc9XCInICsgU3RyaW5nKHZhbHVlKS5yZXBsYWNlKHF1b3QsICcmcXVvdDsnKSArICdcIic7XG4gIHJldHVybiBwMSArICc+JyArIFMgKyAnPC8nICsgdGFnICsgJz4nO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/create-html.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/create-iterator-constructor.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ \"./node_modules/core-js/internals/iterators-core.js\").IteratorPrototype;\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLWl0ZXJhdG9yLWNvbnN0cnVjdG9yLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLWl0ZXJhdG9yLWNvbnN0cnVjdG9yLmpzPzllZDMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIEl0ZXJhdG9yUHJvdG90eXBlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2l0ZXJhdG9ycy1jb3JlJykuSXRlcmF0b3JQcm90b3R5cGU7XG52YXIgY3JlYXRlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL29iamVjdC1jcmVhdGUnKTtcbnZhciBjcmVhdGVQcm9wZXJ0eURlc2NyaXB0b3IgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLXByb3BlcnR5LWRlc2NyaXB0b3InKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zZXQtdG8tc3RyaW5nLXRhZycpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pdGVyYXRvcnMnKTtcblxudmFyIHJldHVyblRoaXMgPSBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9O1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChJdGVyYXRvckNvbnN0cnVjdG9yLCBOQU1FLCBuZXh0KSB7XG4gIHZhciBUT19TVFJJTkdfVEFHID0gTkFNRSArICcgSXRlcmF0b3InO1xuICBJdGVyYXRvckNvbnN0cnVjdG9yLnByb3RvdHlwZSA9IGNyZWF0ZShJdGVyYXRvclByb3RvdHlwZSwgeyBuZXh0OiBjcmVhdGVQcm9wZXJ0eURlc2NyaXB0b3IoMSwgbmV4dCkgfSk7XG4gIHNldFRvU3RyaW5nVGFnKEl0ZXJhdG9yQ29uc3RydWN0b3IsIFRPX1NUUklOR19UQUcsIGZhbHNlLCB0cnVlKTtcbiAgSXRlcmF0b3JzW1RPX1NUUklOR19UQUddID0gcmV0dXJuVGhpcztcbiAgcmV0dXJuIEl0ZXJhdG9yQ29uc3RydWN0b3I7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/create-iterator-constructor.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/create-property-descriptor.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/internals/create-property-descriptor.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLXByb3BlcnR5LWRlc2NyaXB0b3IuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jcmVhdGUtcHJvcGVydHktZGVzY3JpcHRvci5qcz81YzZjIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGJpdG1hcCwgdmFsdWUpIHtcbiAgcmV0dXJuIHtcbiAgICBlbnVtZXJhYmxlOiAhKGJpdG1hcCAmIDEpLFxuICAgIGNvbmZpZ3VyYWJsZTogIShiaXRtYXAgJiAyKSxcbiAgICB3cml0YWJsZTogIShiaXRtYXAgJiA0KSxcbiAgICB2YWx1ZTogdmFsdWVcbiAgfTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/create-property-descriptor.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/define-iterator.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/define-iterator.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ \"./node_modules/core-js/internals/create-iterator-constructor.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js/internals/object-set-prototype-of.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ \"./node_modules/core-js/internals/iterators-core.js\");\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n hide(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n hide(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZGVmaW5lLWl0ZXJhdG9yLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZGVmaW5lLWl0ZXJhdG9yLmpzPzdkZDAiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgY3JlYXRlSXRlcmF0b3JDb25zdHJ1Y3RvciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jcmVhdGUtaXRlcmF0b3ItY29uc3RydWN0b3InKTtcbnZhciBnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZicpO1xudmFyIHNldFByb3RvdHlwZU9mID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL29iamVjdC1zZXQtcHJvdG90eXBlLW9mJyk7XG52YXIgc2V0VG9TdHJpbmdUYWcgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2V0LXRvLXN0cmluZy10YWcnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2hpZGUnKTtcbnZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZWRlZmluZScpO1xudmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xudmFyIElTX1BVUkUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtcHVyZScpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pdGVyYXRvcnMnKTtcbnZhciBJdGVyYXRvcnNDb3JlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2l0ZXJhdG9ycy1jb3JlJyk7XG5cbnZhciBJdGVyYXRvclByb3RvdHlwZSA9IEl0ZXJhdG9yc0NvcmUuSXRlcmF0b3JQcm90b3R5cGU7XG52YXIgQlVHR1lfU0FGQVJJX0lURVJBVE9SUyA9IEl0ZXJhdG9yc0NvcmUuQlVHR1lfU0FGQVJJX0lURVJBVE9SUztcbnZhciBJVEVSQVRPUiA9IHdlbGxLbm93blN5bWJvbCgnaXRlcmF0b3InKTtcbnZhciBLRVlTID0gJ2tleXMnO1xudmFyIFZBTFVFUyA9ICd2YWx1ZXMnO1xudmFyIEVOVFJJRVMgPSAnZW50cmllcyc7XG5cbnZhciByZXR1cm5UaGlzID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpczsgfTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoSXRlcmFibGUsIE5BTUUsIEl0ZXJhdG9yQ29uc3RydWN0b3IsIG5leHQsIERFRkFVTFQsIElTX1NFVCwgRk9SQ0VEKSB7XG4gIGNyZWF0ZUl0ZXJhdG9yQ29uc3RydWN0b3IoSXRlcmF0b3JDb25zdHJ1Y3RvciwgTkFNRSwgbmV4dCk7XG5cbiAgdmFyIGdldEl0ZXJhdGlvbk1ldGhvZCA9IGZ1bmN0aW9uIChLSU5EKSB7XG4gICAgaWYgKEtJTkQgPT09IERFRkFVTFQgJiYgZGVmYXVsdEl0ZXJhdG9yKSByZXR1cm4gZGVmYXVsdEl0ZXJhdG9yO1xuICAgIGlmICghQlVHR1lfU0FGQVJJX0lURVJBVE9SUyAmJiBLSU5EIGluIEl0ZXJhYmxlUHJvdG90eXBlKSByZXR1cm4gSXRlcmFibGVQcm90b3R5cGVbS0lORF07XG4gICAgc3dpdGNoIChLSU5EKSB7XG4gICAgICBjYXNlIEtFWVM6IHJldHVybiBmdW5jdGlvbiBrZXlzKCkgeyByZXR1cm4gbmV3IEl0ZXJhdG9yQ29uc3RydWN0b3IodGhpcywgS0lORCk7IH07XG4gICAgICBjYXNlIFZBTFVFUzogcmV0dXJuIGZ1bmN0aW9uIHZhbHVlcygpIHsgcmV0dXJuIG5ldyBJdGVyYXRvckNvbnN0cnVjdG9yKHRoaXMsIEtJTkQpOyB9O1xuICAgICAgY2FzZSBFTlRSSUVTOiByZXR1cm4gZnVuY3Rpb24gZW50cmllcygpIHsgcmV0dXJuIG5ldyBJdGVyYXRvckNvbnN0cnVjdG9yKHRoaXMsIEtJTkQpOyB9O1xuICAgIH0gcmV0dXJuIGZ1bmN0aW9uICgpIHsgcmV0dXJuIG5ldyBJdGVyYXRvckNvbnN0cnVjdG9yKHRoaXMpOyB9O1xuICB9O1xuXG4gIHZhciBUT19TVFJJTkdfVEFHID0gTkFNRSArICcgSXRlcmF0b3InO1xuICB2YXIgSU5DT1JSRUNUX1ZBTFVFU19OQU1FID0gZmFsc2U7XG4gIHZhciBJdGVyYWJsZVByb3RvdHlwZSA9IEl0ZXJhYmxlLnByb3RvdHlwZTtcbiAgdmFyIG5hdGl2ZUl0ZXJhdG9yID0gSXRlcmFibGVQcm90b3R5cGVbSVRFUkFUT1JdXG4gICAgfHwgSXRlcmFibGVQcm90b3R5cGVbJ0BAaXRlcmF0b3InXVxuICAgIHx8IERFRkFVTFQgJiYgSXRlcmFibGVQcm90b3R5cGVbREVGQVVMVF07XG4gIHZhciBkZWZhdWx0SXRlcmF0b3IgPSAhQlVHR1lfU0FGQVJJX0lURVJBVE9SUyAmJiBuYXRpdmVJdGVyYXRvciB8fCBnZXRJdGVyYXRpb25NZXRob2QoREVGQVVMVCk7XG4gIHZhciBhbnlOYXRpdmVJdGVyYXRvciA9IE5BTUUgPT0gJ0FycmF5JyA/IEl0ZXJhYmxlUHJvdG90eXBlLmVudHJpZXMgfHwgbmF0aXZlSXRlcmF0b3IgOiBuYXRpdmVJdGVyYXRvcjtcbiAgdmFyIEN1cnJlbnRJdGVyYXRvclByb3RvdHlwZSwgbWV0aG9kcywgS0VZO1xuXG4gIC8vIGZpeCBuYXRpdmVcbiAgaWYgKGFueU5hdGl2ZUl0ZXJhdG9yKSB7XG4gICAgQ3VycmVudEl0ZXJhdG9yUHJvdG90eXBlID0gZ2V0UHJvdG90eXBlT2YoYW55TmF0aXZlSXRlcmF0b3IuY2FsbChuZXcgSXRlcmFibGUoKSkpO1xuICAgIGlmIChJdGVyYXRvclByb3RvdHlwZSAhPT0gT2JqZWN0LnByb3RvdHlwZSAmJiBDdXJyZW50SXRlcmF0b3JQcm90b3R5cGUubmV4dCkge1xuICAgICAgaWYgKCFJU19QVVJFICYmIGdldFByb3RvdHlwZU9mKEN1cnJlbnRJdGVyYXRvclByb3RvdHlwZSkgIT09IEl0ZXJhdG9yUHJvdG90eXBlKSB7XG4gICAgICAgIGlmIChzZXRQcm90b3R5cGVPZikge1xuICAgICAgICAgIHNldFByb3RvdHlwZU9mKEN1cnJlbnRJdGVyYXRvclByb3RvdHlwZSwgSXRlcmF0b3JQcm90b3R5cGUpO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBDdXJyZW50SXRlcmF0b3JQcm90b3R5cGVbSVRFUkFUT1JdICE9ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICBoaWRlKEN1cnJlbnRJdGVyYXRvclByb3RvdHlwZSwgSVRFUkFUT1IsIHJldHVyblRoaXMpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAvLyBTZXQgQEB0b1N0cmluZ1RhZyB0byBuYXRpdmUgaXRlcmF0b3JzXG4gICAgICBzZXRUb1N0cmluZ1RhZyhDdXJyZW50SXRlcmF0b3JQcm90b3R5cGUsIFRPX1NUUklOR19UQUcsIHRydWUsIHRydWUpO1xuICAgICAgaWYgKElTX1BVUkUpIEl0ZXJhdG9yc1tUT19TVFJJTkdfVEFHXSA9IHJldHVyblRoaXM7XG4gICAgfVxuICB9XG5cbiAgLy8gZml4IEFycmF5I3t2YWx1ZXMsIEBAaXRlcmF0b3J9Lm5hbWUgaW4gVjggLyBGRlxuICBpZiAoREVGQVVMVCA9PSBWQUxVRVMgJiYgbmF0aXZlSXRlcmF0b3IgJiYgbmF0aXZlSXRlcmF0b3IubmFtZSAhPT0gVkFMVUVTKSB7XG4gICAgSU5DT1JSRUNUX1ZBTFVFU19OQU1FID0gdHJ1ZTtcbiAgICBkZWZhdWx0SXRlcmF0b3IgPSBmdW5jdGlvbiB2YWx1ZXMoKSB7IHJldHVybiBuYXRpdmVJdGVyYXRvci5jYWxsKHRoaXMpOyB9O1xuICB9XG5cbiAgLy8gZGVmaW5lIGl0ZXJhdG9yXG4gIGlmICgoIUlTX1BVUkUgfHwgRk9SQ0VEKSAmJiBJdGVyYWJsZVByb3RvdHlwZVtJVEVSQVRPUl0gIT09IGRlZmF1bHRJdGVyYXRvcikge1xuICAgIGhpZGUoSXRlcmFibGVQcm90b3R5cGUsIElURVJBVE9SLCBkZWZhdWx0SXRlcmF0b3IpO1xuICB9XG4gIEl0ZXJhdG9yc1tOQU1FXSA9IGRlZmF1bHRJdGVyYXRvcjtcblxuICAvLyBleHBvcnQgYWRkaXRpb25hbCBtZXRob2RzXG4gIGlmIChERUZBVUxUKSB7XG4gICAgbWV0aG9kcyA9IHtcbiAgICAgIHZhbHVlczogZ2V0SXRlcmF0aW9uTWV0aG9kKFZBTFVFUyksXG4gICAgICBrZXlzOiBJU19TRVQgPyBkZWZhdWx0SXRlcmF0b3IgOiBnZXRJdGVyYXRpb25NZXRob2QoS0VZUyksXG4gICAgICBlbnRyaWVzOiBnZXRJdGVyYXRpb25NZXRob2QoRU5UUklFUylcbiAgICB9O1xuICAgIGlmIChGT1JDRUQpIGZvciAoS0VZIGluIG1ldGhvZHMpIHtcbiAgICAgIGlmIChCVUdHWV9TQUZBUklfSVRFUkFUT1JTIHx8IElOQ09SUkVDVF9WQUxVRVNfTkFNRSB8fCAhKEtFWSBpbiBJdGVyYWJsZVByb3RvdHlwZSkpIHtcbiAgICAgICAgcmVkZWZpbmUoSXRlcmFibGVQcm90b3R5cGUsIEtFWSwgbWV0aG9kc1tLRVldKTtcbiAgICAgIH1cbiAgICB9IGVsc2UgJCh7IHRhcmdldDogTkFNRSwgcHJvdG86IHRydWUsIGZvcmNlZDogQlVHR1lfU0FGQVJJX0lURVJBVE9SUyB8fCBJTkNPUlJFQ1RfVkFMVUVTX05BTUUgfSwgbWV0aG9kcyk7XG4gIH1cblxuICByZXR1cm4gbWV0aG9kcztcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/define-iterator.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/descriptors.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/descriptors.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZGVzY3JpcHRvcnMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9kZXNjcmlwdG9ycy5qcz84M2FiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBmYWlscyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mYWlscycpO1xuXG4vLyBUaGFuaydzIElFOCBmb3IgaGlzIGZ1bm55IGRlZmluZVByb3BlcnR5XG5tb2R1bGUuZXhwb3J0cyA9ICFmYWlscyhmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkoe30sICdhJywgeyBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDc7IH0gfSkuYSAhPSA3O1xufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/descriptors.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/document-create-element.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/document-create-element.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar exist = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return exist ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZG9jdW1lbnQtY3JlYXRlLWVsZW1lbnQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9kb2N1bWVudC1jcmVhdGUtZWxlbWVudC5qcz9jYzEyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZ2xvYmFsJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtb2JqZWN0Jyk7XG5cbnZhciBkb2N1bWVudCA9IGdsb2JhbC5kb2N1bWVudDtcbi8vIHR5cGVvZiBkb2N1bWVudC5jcmVhdGVFbGVtZW50IGlzICdvYmplY3QnIGluIG9sZCBJRVxudmFyIGV4aXN0ID0gaXNPYmplY3QoZG9jdW1lbnQpICYmIGlzT2JqZWN0KGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gZXhpc3QgPyBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGl0KSA6IHt9O1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/document-create-element.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/dom-iterables.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/dom-iterables.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZG9tLWl0ZXJhYmxlcy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2RvbS1pdGVyYWJsZXMuanM/ZmRiYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBpdGVyYWJsZSBET00gY29sbGVjdGlvbnNcbi8vIGZsYWcgLSBgaXRlcmFibGVgIGludGVyZmFjZSAtICdlbnRyaWVzJywgJ2tleXMnLCAndmFsdWVzJywgJ2ZvckVhY2gnIG1ldGhvZHNcbm1vZHVsZS5leHBvcnRzID0ge1xuICBDU1NSdWxlTGlzdDogMCxcbiAgQ1NTU3R5bGVEZWNsYXJhdGlvbjogMCxcbiAgQ1NTVmFsdWVMaXN0OiAwLFxuICBDbGllbnRSZWN0TGlzdDogMCxcbiAgRE9NUmVjdExpc3Q6IDAsXG4gIERPTVN0cmluZ0xpc3Q6IDAsXG4gIERPTVRva2VuTGlzdDogMSxcbiAgRGF0YVRyYW5zZmVySXRlbUxpc3Q6IDAsXG4gIEZpbGVMaXN0OiAwLFxuICBIVE1MQWxsQ29sbGVjdGlvbjogMCxcbiAgSFRNTENvbGxlY3Rpb246IDAsXG4gIEhUTUxGb3JtRWxlbWVudDogMCxcbiAgSFRNTFNlbGVjdEVsZW1lbnQ6IDAsXG4gIE1lZGlhTGlzdDogMCxcbiAgTWltZVR5cGVBcnJheTogMCxcbiAgTmFtZWROb2RlTWFwOiAwLFxuICBOb2RlTGlzdDogMSxcbiAgUGFpbnRSZXF1ZXN0TGlzdDogMCxcbiAgUGx1Z2luOiAwLFxuICBQbHVnaW5BcnJheTogMCxcbiAgU1ZHTGVuZ3RoTGlzdDogMCxcbiAgU1ZHTnVtYmVyTGlzdDogMCxcbiAgU1ZHUGF0aFNlZ0xpc3Q6IDAsXG4gIFNWR1BvaW50TGlzdDogMCxcbiAgU1ZHU3RyaW5nTGlzdDogMCxcbiAgU1ZHVHJhbnNmb3JtTGlzdDogMCxcbiAgU291cmNlQnVmZmVyTGlzdDogMCxcbiAgU3R5bGVTaGVldExpc3Q6IDAsXG4gIFRleHRUcmFja0N1ZUxpc3Q6IDAsXG4gIFRleHRUcmFja0xpc3Q6IDAsXG4gIFRvdWNoTGlzdDogMFxufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/dom-iterables.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/enum-bug-keys.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/enum-bug-keys.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZW51bS1idWcta2V5cy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2VudW0tYnVnLWtleXMuanM/NzgzOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBJRTgtIGRvbid0IGVudW0gYnVnIGtleXNcbm1vZHVsZS5leHBvcnRzID0gW1xuICAnY29uc3RydWN0b3InLFxuICAnaGFzT3duUHJvcGVydHknLFxuICAnaXNQcm90b3R5cGVPZicsXG4gICdwcm9wZXJ0eUlzRW51bWVyYWJsZScsXG4gICd0b0xvY2FsZVN0cmluZycsXG4gICd0b1N0cmluZycsXG4gICd2YWx1ZU9mJ1xuXTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/enum-bug-keys.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/export.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/export.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\").f;\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar setGlobal = __webpack_require__(/*! ../internals/set-global */ \"./node_modules/core-js/internals/set-global.js\");\nvar copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ \"./node_modules/core-js/internals/copy-constructor-properties.js\");\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js/internals/is-forced.js\");\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n hide(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZXhwb3J0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZXhwb3J0LmpzPzIzZTciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcbnZhciBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvb2JqZWN0LWdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcicpLmY7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oaWRlJyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVkZWZpbmUnKTtcbnZhciBzZXRHbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2V0LWdsb2JhbCcpO1xudmFyIGNvcHlDb25zdHJ1Y3RvclByb3BlcnRpZXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY29weS1jb25zdHJ1Y3Rvci1wcm9wZXJ0aWVzJyk7XG52YXIgaXNGb3JjZWQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtZm9yY2VkJyk7XG5cbi8qXG4gIG9wdGlvbnMudGFyZ2V0ICAgICAgLSBuYW1lIG9mIHRoZSB0YXJnZXQgb2JqZWN0XG4gIG9wdGlvbnMuZ2xvYmFsICAgICAgLSB0YXJnZXQgaXMgdGhlIGdsb2JhbCBvYmplY3RcbiAgb3B0aW9ucy5zdGF0ICAgICAgICAtIGV4cG9ydCBhcyBzdGF0aWMgbWV0aG9kcyBvZiB0YXJnZXRcbiAgb3B0aW9ucy5wcm90byAgICAgICAtIGV4cG9ydCBhcyBwcm90b3R5cGUgbWV0aG9kcyBvZiB0YXJnZXRcbiAgb3B0aW9ucy5yZWFsICAgICAgICAtIHJlYWwgcHJvdG90eXBlIG1ldGhvZCBmb3IgdGhlIGBwdXJlYCB2ZXJzaW9uXG4gIG9wdGlvbnMuZm9yY2VkICAgICAgLSBleHBvcnQgZXZlbiBpZiB0aGUgbmF0aXZlIGZlYXR1cmUgaXMgYXZhaWxhYmxlXG4gIG9wdGlvbnMuYmluZCAgICAgICAgLSBiaW5kIG1ldGhvZHMgdG8gdGhlIHRhcmdldCwgcmVxdWlyZWQgZm9yIHRoZSBgcHVyZWAgdmVyc2lvblxuICBvcHRpb25zLndyYXAgICAgICAgIC0gd3JhcCBjb25zdHJ1Y3RvcnMgdG8gcHJldmVudGluZyBnbG9iYWwgcG9sbHV0aW9uLCByZXF1aXJlZCBmb3IgdGhlIGBwdXJlYCB2ZXJzaW9uXG4gIG9wdGlvbnMudW5zYWZlICAgICAgLSB1c2UgdGhlIHNpbXBsZSBhc3NpZ25tZW50IG9mIHByb3BlcnR5IGluc3RlYWQgb2YgZGVsZXRlICsgZGVmaW5lUHJvcGVydHlcbiAgb3B0aW9ucy5zaGFtICAgICAgICAtIGFkZCBhIGZsYWcgdG8gbm90IGNvbXBsZXRlbHkgZnVsbCBwb2x5ZmlsbHNcbiAgb3B0aW9ucy5lbnVtZXJhYmxlICAtIGV4cG9ydCBhcyBlbnVtZXJhYmxlIHByb3BlcnR5XG4gIG9wdGlvbnMubm9UYXJnZXRHZXQgLSBwcmV2ZW50IGNhbGxpbmcgYSBnZXR0ZXIgb24gdGFyZ2V0XG4qL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAob3B0aW9ucywgc291cmNlKSB7XG4gIHZhciBUQVJHRVQgPSBvcHRpb25zLnRhcmdldDtcbiAgdmFyIEdMT0JBTCA9IG9wdGlvbnMuZ2xvYmFsO1xuICB2YXIgU1RBVElDID0gb3B0aW9ucy5zdGF0O1xuICB2YXIgRk9SQ0VELCB0YXJnZXQsIGtleSwgdGFyZ2V0UHJvcGVydHksIHNvdXJjZVByb3BlcnR5LCBkZXNjcmlwdG9yO1xuICBpZiAoR0xPQkFMKSB7XG4gICAgdGFyZ2V0ID0gZ2xvYmFsO1xuICB9IGVsc2UgaWYgKFNUQVRJQykge1xuICAgIHRhcmdldCA9IGdsb2JhbFtUQVJHRVRdIHx8IHNldEdsb2JhbChUQVJHRVQsIHt9KTtcbiAgfSBlbHNlIHtcbiAgICB0YXJnZXQgPSAoZ2xvYmFsW1RBUkdFVF0gfHwge30pLnByb3RvdHlwZTtcbiAgfVxuICBpZiAodGFyZ2V0KSBmb3IgKGtleSBpbiBzb3VyY2UpIHtcbiAgICBzb3VyY2VQcm9wZXJ0eSA9IHNvdXJjZVtrZXldO1xuICAgIGlmIChvcHRpb25zLm5vVGFyZ2V0R2V0KSB7XG4gICAgICBkZXNjcmlwdG9yID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKHRhcmdldCwga2V5KTtcbiAgICAgIHRhcmdldFByb3BlcnR5ID0gZGVzY3JpcHRvciAmJiBkZXNjcmlwdG9yLnZhbHVlO1xuICAgIH0gZWxzZSB0YXJnZXRQcm9wZXJ0eSA9IHRhcmdldFtrZXldO1xuICAgIEZPUkNFRCA9IGlzRm9yY2VkKEdMT0JBTCA/IGtleSA6IFRBUkdFVCArIChTVEFUSUMgPyAnLicgOiAnIycpICsga2V5LCBvcHRpb25zLmZvcmNlZCk7XG4gICAgLy8gY29udGFpbmVkIGluIHRhcmdldFxuICAgIGlmICghRk9SQ0VEICYmIHRhcmdldFByb3BlcnR5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgIGlmICh0eXBlb2Ygc291cmNlUHJvcGVydHkgPT09IHR5cGVvZiB0YXJnZXRQcm9wZXJ0eSkgY29udGludWU7XG4gICAgICBjb3B5Q29uc3RydWN0b3JQcm9wZXJ0aWVzKHNvdXJjZVByb3BlcnR5LCB0YXJnZXRQcm9wZXJ0eSk7XG4gICAgfVxuICAgIC8vIGFkZCBhIGZsYWcgdG8gbm90IGNvbXBsZXRlbHkgZnVsbCBwb2x5ZmlsbHNcbiAgICBpZiAob3B0aW9ucy5zaGFtIHx8ICh0YXJnZXRQcm9wZXJ0eSAmJiB0YXJnZXRQcm9wZXJ0eS5zaGFtKSkge1xuICAgICAgaGlkZShzb3VyY2VQcm9wZXJ0eSwgJ3NoYW0nLCB0cnVlKTtcbiAgICB9XG4gICAgLy8gZXh0ZW5kIGdsb2JhbFxuICAgIHJlZGVmaW5lKHRhcmdldCwga2V5LCBzb3VyY2VQcm9wZXJ0eSwgb3B0aW9ucyk7XG4gIH1cbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/export.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/fails.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/internals/fails.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZmFpbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9mYWlscy5qcz9kMDM5Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGV4ZWMpIHtcbiAgdHJ5IHtcbiAgICByZXR1cm4gISFleGVjKCk7XG4gIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgcmV0dXJuIHRydWU7XG4gIH1cbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/fails.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js": +/*!******************************************************************************!*\ + !*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ \"./node_modules/core-js/internals/regexp-exec.js\");\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n re.exec = function () { execCalled = true; return null; };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZml4LXJlZ2V4cC13ZWxsLWtub3duLXN5bWJvbC1sb2dpYy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2ZpeC1yZWdleHAtd2VsbC1rbm93bi1zeW1ib2wtbG9naWMuanM/ZDc4NCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oaWRlJyk7XG52YXIgcmVkZWZpbmUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVkZWZpbmUnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mYWlscycpO1xudmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xudmFyIHJlZ2V4cEV4ZWMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVnZXhwLWV4ZWMnKTtcblxudmFyIFNQRUNJRVMgPSB3ZWxsS25vd25TeW1ib2woJ3NwZWNpZXMnKTtcblxudmFyIFJFUExBQ0VfU1VQUE9SVFNfTkFNRURfR1JPVVBTID0gIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgLy8gI3JlcGxhY2UgbmVlZHMgYnVpbHQtaW4gc3VwcG9ydCBmb3IgbmFtZWQgZ3JvdXBzLlxuICAvLyAjbWF0Y2ggd29ya3MgZmluZSBiZWNhdXNlIGl0IGp1c3QgcmV0dXJuIHRoZSBleGVjIHJlc3VsdHMsIGV2ZW4gaWYgaXQgaGFzXG4gIC8vIGEgXCJncm9wc1wiIHByb3BlcnR5LlxuICB2YXIgcmUgPSAvLi87XG4gIHJlLmV4ZWMgPSBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIHJlc3VsdCA9IFtdO1xuICAgIHJlc3VsdC5ncm91cHMgPSB7IGE6ICc3JyB9O1xuICAgIHJldHVybiByZXN1bHQ7XG4gIH07XG4gIHJldHVybiAnJy5yZXBsYWNlKHJlLCAnJDxhPicpICE9PSAnNyc7XG59KTtcblxuLy8gQ2hyb21lIDUxIGhhcyBhIGJ1Z2d5IFwic3BsaXRcIiBpbXBsZW1lbnRhdGlvbiB3aGVuIFJlZ0V4cCNleGVjICE9PSBuYXRpdmVFeGVjXG4vLyBXZWV4IEpTIGhhcyBmcm96ZW4gYnVpbHQtaW4gcHJvdG90eXBlcywgc28gdXNlIHRyeSAvIGNhdGNoIHdyYXBwZXJcbnZhciBTUExJVF9XT1JLU19XSVRIX09WRVJXUklUVEVOX0VYRUMgPSAhZmFpbHMoZnVuY3Rpb24gKCkge1xuICB2YXIgcmUgPSAvKD86KS87XG4gIHZhciBvcmlnaW5hbEV4ZWMgPSByZS5leGVjO1xuICByZS5leGVjID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gb3JpZ2luYWxFeGVjLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7IH07XG4gIHZhciByZXN1bHQgPSAnYWInLnNwbGl0KHJlKTtcbiAgcmV0dXJuIHJlc3VsdC5sZW5ndGggIT09IDIgfHwgcmVzdWx0WzBdICE9PSAnYScgfHwgcmVzdWx0WzFdICE9PSAnYic7XG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoS0VZLCBsZW5ndGgsIGV4ZWMsIHNoYW0pIHtcbiAgdmFyIFNZTUJPTCA9IHdlbGxLbm93blN5bWJvbChLRVkpO1xuXG4gIHZhciBERUxFR0FURVNfVE9fU1lNQk9MID0gIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgICAvLyBTdHJpbmcgbWV0aG9kcyBjYWxsIHN5bWJvbC1uYW1lZCBSZWdFcCBtZXRob2RzXG4gICAgdmFyIE8gPSB7fTtcbiAgICBPW1NZTUJPTF0gPSBmdW5jdGlvbiAoKSB7IHJldHVybiA3OyB9O1xuICAgIHJldHVybiAnJ1tLRVldKE8pICE9IDc7XG4gIH0pO1xuXG4gIHZhciBERUxFR0FURVNfVE9fRVhFQyA9IERFTEVHQVRFU19UT19TWU1CT0wgJiYgIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgICAvLyBTeW1ib2wtbmFtZWQgUmVnRXhwIG1ldGhvZHMgY2FsbCAuZXhlY1xuICAgIHZhciBleGVjQ2FsbGVkID0gZmFsc2U7XG4gICAgdmFyIHJlID0gL2EvO1xuICAgIHJlLmV4ZWMgPSBmdW5jdGlvbiAoKSB7IGV4ZWNDYWxsZWQgPSB0cnVlOyByZXR1cm4gbnVsbDsgfTtcblxuICAgIGlmIChLRVkgPT09ICdzcGxpdCcpIHtcbiAgICAgIC8vIFJlZ0V4cFtAQHNwbGl0XSBkb2Vzbid0IGNhbGwgdGhlIHJlZ2V4J3MgZXhlYyBtZXRob2QsIGJ1dCBmaXJzdCBjcmVhdGVzXG4gICAgICAvLyBhIG5ldyBvbmUuIFdlIG5lZWQgdG8gcmV0dXJuIHRoZSBwYXRjaGVkIHJlZ2V4IHdoZW4gY3JlYXRpbmcgdGhlIG5ldyBvbmUuXG4gICAgICByZS5jb25zdHJ1Y3RvciA9IHt9O1xuICAgICAgcmUuY29uc3RydWN0b3JbU1BFQ0lFU10gPSBmdW5jdGlvbiAoKSB7IHJldHVybiByZTsgfTtcbiAgICB9XG5cbiAgICByZVtTWU1CT0xdKCcnKTtcbiAgICByZXR1cm4gIWV4ZWNDYWxsZWQ7XG4gIH0pO1xuXG4gIGlmIChcbiAgICAhREVMRUdBVEVTX1RPX1NZTUJPTCB8fFxuICAgICFERUxFR0FURVNfVE9fRVhFQyB8fFxuICAgIChLRVkgPT09ICdyZXBsYWNlJyAmJiAhUkVQTEFDRV9TVVBQT1JUU19OQU1FRF9HUk9VUFMpIHx8XG4gICAgKEtFWSA9PT0gJ3NwbGl0JyAmJiAhU1BMSVRfV09SS1NfV0lUSF9PVkVSV1JJVFRFTl9FWEVDKVxuICApIHtcbiAgICB2YXIgbmF0aXZlUmVnRXhwTWV0aG9kID0gLy4vW1NZTUJPTF07XG4gICAgdmFyIG1ldGhvZHMgPSBleGVjKFNZTUJPTCwgJydbS0VZXSwgZnVuY3Rpb24gKG5hdGl2ZU1ldGhvZCwgcmVnZXhwLCBzdHIsIGFyZzIsIGZvcmNlU3RyaW5nTWV0aG9kKSB7XG4gICAgICBpZiAocmVnZXhwLmV4ZWMgPT09IHJlZ2V4cEV4ZWMpIHtcbiAgICAgICAgaWYgKERFTEVHQVRFU19UT19TWU1CT0wgJiYgIWZvcmNlU3RyaW5nTWV0aG9kKSB7XG4gICAgICAgICAgLy8gVGhlIG5hdGl2ZSBTdHJpbmcgbWV0aG9kIGFscmVhZHkgZGVsZWdhdGVzIHRvIEBAbWV0aG9kICh0aGlzXG4gICAgICAgICAgLy8gcG9seWZpbGxlZCBmdW5jdGlvbiksIGxlYXNpbmcgdG8gaW5maW5pdGUgcmVjdXJzaW9uLlxuICAgICAgICAgIC8vIFdlIGF2b2lkIGl0IGJ5IGRpcmVjdGx5IGNhbGxpbmcgdGhlIG5hdGl2ZSBAQG1ldGhvZCBtZXRob2QuXG4gICAgICAgICAgcmV0dXJuIHsgZG9uZTogdHJ1ZSwgdmFsdWU6IG5hdGl2ZVJlZ0V4cE1ldGhvZC5jYWxsKHJlZ2V4cCwgc3RyLCBhcmcyKSB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7IGRvbmU6IHRydWUsIHZhbHVlOiBuYXRpdmVNZXRob2QuY2FsbChzdHIsIHJlZ2V4cCwgYXJnMikgfTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7IGRvbmU6IGZhbHNlIH07XG4gICAgfSk7XG4gICAgdmFyIHN0cmluZ01ldGhvZCA9IG1ldGhvZHNbMF07XG4gICAgdmFyIHJlZ2V4TWV0aG9kID0gbWV0aG9kc1sxXTtcblxuICAgIHJlZGVmaW5lKFN0cmluZy5wcm90b3R5cGUsIEtFWSwgc3RyaW5nTWV0aG9kKTtcbiAgICByZWRlZmluZShSZWdFeHAucHJvdG90eXBlLCBTWU1CT0wsIGxlbmd0aCA9PSAyXG4gICAgICAvLyAyMS4yLjUuOCBSZWdFeHAucHJvdG90eXBlW0BAcmVwbGFjZV0oc3RyaW5nLCByZXBsYWNlVmFsdWUpXG4gICAgICAvLyAyMS4yLjUuMTEgUmVnRXhwLnByb3RvdHlwZVtAQHNwbGl0XShzdHJpbmcsIGxpbWl0KVxuICAgICAgPyBmdW5jdGlvbiAoc3RyaW5nLCBhcmcpIHsgcmV0dXJuIHJlZ2V4TWV0aG9kLmNhbGwoc3RyaW5nLCB0aGlzLCBhcmcpOyB9XG4gICAgICAvLyAyMS4yLjUuNiBSZWdFeHAucHJvdG90eXBlW0BAbWF0Y2hdKHN0cmluZylcbiAgICAgIC8vIDIxLjIuNS45IFJlZ0V4cC5wcm90b3R5cGVbQEBzZWFyY2hdKHN0cmluZylcbiAgICAgIDogZnVuY3Rpb24gKHN0cmluZykgeyByZXR1cm4gcmVnZXhNZXRob2QuY2FsbChzdHJpbmcsIHRoaXMpOyB9XG4gICAgKTtcbiAgICBpZiAoc2hhbSkgaGlkZShSZWdFeHAucHJvdG90eXBlW1NZTUJPTF0sICdzaGFtJywgdHJ1ZSk7XG4gIH1cbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/forced-string-html-method.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/forced-string-html-method.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// check the existence of a method, lowercase\n// of a tag and escaping quotes in arguments\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n var test = ''[METHOD_NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZm9yY2VkLXN0cmluZy1odG1sLW1ldGhvZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QuanM/ZWFlOSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZmFpbHMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZmFpbHMnKTtcblxuLy8gY2hlY2sgdGhlIGV4aXN0ZW5jZSBvZiBhIG1ldGhvZCwgbG93ZXJjYXNlXG4vLyBvZiBhIHRhZyBhbmQgZXNjYXBpbmcgcXVvdGVzIGluIGFyZ3VtZW50c1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoTUVUSE9EX05BTUUpIHtcbiAgcmV0dXJuIGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgdGVzdCA9ICcnW01FVEhPRF9OQU1FXSgnXCInKTtcbiAgICByZXR1cm4gdGVzdCAhPT0gdGVzdC50b0xvd2VyQ2FzZSgpIHx8IHRlc3Quc3BsaXQoJ1wiJykubGVuZ3RoID4gMztcbiAgfSk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/forced-string-html-method.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/forced-string-trim-method.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/forced-string-trim-method.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar whitespaces = __webpack_require__(/*! ../internals/whitespaces */ \"./node_modules/core-js/internals/whitespaces.js\");\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZm9yY2VkLXN0cmluZy10cmltLW1ldGhvZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctdHJpbS1tZXRob2QuanM/ZTA3MCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZmFpbHMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZmFpbHMnKTtcbnZhciB3aGl0ZXNwYWNlcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93aGl0ZXNwYWNlcycpO1xuXG52YXIgbm9uID0gJ1xcdTIwMEJcXHUwMDg1XFx1MTgwRSc7XG5cbi8vIGNoZWNrIHRoYXQgYSBtZXRob2Qgd29ya3Mgd2l0aCB0aGUgY29ycmVjdCBsaXN0XG4vLyBvZiB3aGl0ZXNwYWNlcyBhbmQgaGFzIGEgY29ycmVjdCBuYW1lXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChNRVRIT0RfTkFNRSkge1xuICByZXR1cm4gZmFpbHMoZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiAhIXdoaXRlc3BhY2VzW01FVEhPRF9OQU1FXSgpIHx8IG5vbltNRVRIT0RfTkFNRV0oKSAhPSBub24gfHwgd2hpdGVzcGFjZXNbTUVUSE9EX05BTUVdLm5hbWUgIT09IE1FVEhPRF9OQU1FO1xuICB9KTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/forced-string-trim-method.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/function-to-string.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/internals/function-to-string.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.js\");\n\nmodule.exports = shared('native-function-to-string', Function.toString);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZnVuY3Rpb24tdG8tc3RyaW5nLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZnVuY3Rpb24tdG8tc3RyaW5nLmpzPzllODEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHNoYXJlZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zaGFyZWQnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBzaGFyZWQoJ25hdGl2ZS1mdW5jdGlvbi10by1zdHJpbmcnLCBGdW5jdGlvbi50b1N0cmluZyk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/function-to-string.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/get-built-in.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/get-built-in.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var path = __webpack_require__(/*! ../internals/path */ \"./node_modules/core-js/internals/path.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2V0LWJ1aWx0LWluLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2V0LWJ1aWx0LWluLmpzP2QwNjYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHBhdGggPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcGF0aCcpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcblxudmFyIGFGdW5jdGlvbiA9IGZ1bmN0aW9uICh2YXJpYWJsZSkge1xuICByZXR1cm4gdHlwZW9mIHZhcmlhYmxlID09ICdmdW5jdGlvbicgPyB2YXJpYWJsZSA6IHVuZGVmaW5lZDtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG5hbWVzcGFjZSwgbWV0aG9kKSB7XG4gIHJldHVybiBhcmd1bWVudHMubGVuZ3RoIDwgMiA/IGFGdW5jdGlvbihwYXRoW25hbWVzcGFjZV0pIHx8IGFGdW5jdGlvbihnbG9iYWxbbmFtZXNwYWNlXSlcbiAgICA6IHBhdGhbbmFtZXNwYWNlXSAmJiBwYXRoW25hbWVzcGFjZV1bbWV0aG9kXSB8fCBnbG9iYWxbbmFtZXNwYWNlXSAmJiBnbG9iYWxbbmFtZXNwYWNlXVttZXRob2RdO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/get-built-in.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/get-iterator-method.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/get-iterator-method.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2V0LWl0ZXJhdG9yLW1ldGhvZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2dldC1pdGVyYXRvci1tZXRob2QuanM/MzVhMSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jbGFzc29mJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2l0ZXJhdG9ycycpO1xudmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xuXG52YXIgSVRFUkFUT1IgPSB3ZWxsS25vd25TeW1ib2woJ2l0ZXJhdG9yJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIGlmIChpdCAhPSB1bmRlZmluZWQpIHJldHVybiBpdFtJVEVSQVRPUl1cbiAgICB8fCBpdFsnQEBpdGVyYXRvciddXG4gICAgfHwgSXRlcmF0b3JzW2NsYXNzb2YoaXQpXTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/get-iterator-method.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/global.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/global.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global) {var O = 'object';\nvar check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == O && globalThis) ||\n check(typeof window == O && window) ||\n check(typeof self == O && self) ||\n check(typeof global == O && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2xvYmFsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2xvYmFsLmpzP2RhODQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIE8gPSAnb2JqZWN0JztcbnZhciBjaGVjayA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXQgJiYgaXQuTWF0aCA9PSBNYXRoICYmIGl0O1xufTtcblxuLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvaXNzdWVzLzg2I2lzc3VlY29tbWVudC0xMTU3NTkwMjhcbm1vZHVsZS5leHBvcnRzID1cbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVuZGVmXG4gIGNoZWNrKHR5cGVvZiBnbG9iYWxUaGlzID09IE8gJiYgZ2xvYmFsVGhpcykgfHxcbiAgY2hlY2sodHlwZW9mIHdpbmRvdyA9PSBPICYmIHdpbmRvdykgfHxcbiAgY2hlY2sodHlwZW9mIHNlbGYgPT0gTyAmJiBzZWxmKSB8fFxuICBjaGVjayh0eXBlb2YgZ2xvYmFsID09IE8gJiYgZ2xvYmFsKSB8fFxuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tbmV3LWZ1bmNcbiAgRnVuY3Rpb24oJ3JldHVybiB0aGlzJykoKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/global.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/has.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/internals/has.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGFzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGFzLmpzPzUxMzUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGhhc093blByb3BlcnR5ID0ge30uaGFzT3duUHJvcGVydHk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBrZXkpIHtcbiAgcmV0dXJuIGhhc093blByb3BlcnR5LmNhbGwoaXQsIGtleSk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/has.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/hidden-keys.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/hidden-keys.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGlkZGVuLWtleXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9oaWRkZW4ta2V5cy5qcz9kMDEyIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0ge307XG4iXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/hidden-keys.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/hide.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/hide.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGlkZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2hpZGUuanM/NWY2NSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgREVTQ1JJUFRPUlMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZGVzY3JpcHRvcnMnKTtcbnZhciBkZWZpbmVQcm9wZXJ0eU1vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnR5Jyk7XG52YXIgY3JlYXRlUHJvcGVydHlEZXNjcmlwdG9yID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NyZWF0ZS1wcm9wZXJ0eS1kZXNjcmlwdG9yJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gREVTQ1JJUFRPUlMgPyBmdW5jdGlvbiAob2JqZWN0LCBrZXksIHZhbHVlKSB7XG4gIHJldHVybiBkZWZpbmVQcm9wZXJ0eU1vZHVsZS5mKG9iamVjdCwga2V5LCBjcmVhdGVQcm9wZXJ0eURlc2NyaXB0b3IoMSwgdmFsdWUpKTtcbn0gOiBmdW5jdGlvbiAob2JqZWN0LCBrZXksIHZhbHVlKSB7XG4gIG9iamVjdFtrZXldID0gdmFsdWU7XG4gIHJldHVybiBvYmplY3Q7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/hide.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/host-report-errors.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/internals/host-report-errors.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaG9zdC1yZXBvcnQtZXJyb3JzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaG9zdC1yZXBvcnQtZXJyb3JzLmpzPzQ0ZGUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYSwgYikge1xuICB2YXIgY29uc29sZSA9IGdsb2JhbC5jb25zb2xlO1xuICBpZiAoY29uc29sZSAmJiBjb25zb2xlLmVycm9yKSB7XG4gICAgYXJndW1lbnRzLmxlbmd0aCA9PT0gMSA/IGNvbnNvbGUuZXJyb3IoYSkgOiBjb25zb2xlLmVycm9yKGEsIGIpO1xuICB9XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/host-report-errors.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/html.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/html.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar document = global.document;\n\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaHRtbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2h0bWwuanM/MWJlNCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dsb2JhbCcpO1xuXG52YXIgZG9jdW1lbnQgPSBnbG9iYWwuZG9jdW1lbnQ7XG5cbm1vZHVsZS5leHBvcnRzID0gZG9jdW1lbnQgJiYgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/html.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/ie8-dom-define.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaWU4LWRvbS1kZWZpbmUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pZTgtZG9tLWRlZmluZS5qcz8wY2ZiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBERVNDUklQVE9SUyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9kZXNjcmlwdG9ycycpO1xudmFyIGZhaWxzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZhaWxzJyk7XG52YXIgY3JlYXRlRWxlbWVudCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9kb2N1bWVudC1jcmVhdGUtZWxlbWVudCcpO1xuXG4vLyBUaGFuaydzIElFOCBmb3IgaGlzIGZ1bm55IGRlZmluZVByb3BlcnR5XG5tb2R1bGUuZXhwb3J0cyA9ICFERVNDUklQVE9SUyAmJiAhZmFpbHMoZnVuY3Rpb24gKCkge1xuICByZXR1cm4gT2JqZWN0LmRlZmluZVByb3BlcnR5KGNyZWF0ZUVsZW1lbnQoJ2RpdicpLCAnYScsIHtcbiAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIDc7IH1cbiAgfSkuYSAhPSA3O1xufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/ie8-dom-define.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/indexed-object.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/indexed-object.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\n\nvar split = ''.split;\n\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaW5kZXhlZC1vYmplY3QuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pbmRleGVkLW9iamVjdC5qcz80NGFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGZhbGxiYWNrIGZvciBub24tYXJyYXktbGlrZSBFUzMgYW5kIG5vbi1lbnVtZXJhYmxlIG9sZCBWOCBzdHJpbmdzXG52YXIgZmFpbHMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZmFpbHMnKTtcbnZhciBjbGFzc29mID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NsYXNzb2YtcmF3Jyk7XG5cbnZhciBzcGxpdCA9ICcnLnNwbGl0O1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgLy8gdGhyb3dzIGFuIGVycm9yIGluIHJoaW5vLCBzZWUgaHR0cHM6Ly9naXRodWIuY29tL21vemlsbGEvcmhpbm8vaXNzdWVzLzM0NlxuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tcHJvdG90eXBlLWJ1aWx0aW5zXG4gIHJldHVybiAhT2JqZWN0KCd6JykucHJvcGVydHlJc0VudW1lcmFibGUoMCk7XG59KSA/IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gY2xhc3NvZihpdCkgPT0gJ1N0cmluZycgPyBzcGxpdC5jYWxsKGl0LCAnJykgOiBPYmplY3QoaXQpO1xufSA6IE9iamVjdDtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/indexed-object.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/internal-state.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/internal-state.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ \"./node_modules/core-js/internals/native-weak-map.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar objectHas = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n hide(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaW50ZXJuYWwtc3RhdGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pbnRlcm5hbC1zdGF0ZS5qcz82OWYzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBOQVRJVkVfV0VBS19NQVAgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvbmF0aXZlLXdlYWstbWFwJyk7XG52YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dsb2JhbCcpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLW9iamVjdCcpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZScpO1xudmFyIG9iamVjdEhhcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oYXMnKTtcbnZhciBzaGFyZWRLZXkgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2hhcmVkLWtleScpO1xudmFyIGhpZGRlbktleXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZGVuLWtleXMnKTtcblxudmFyIFdlYWtNYXAgPSBnbG9iYWwuV2Vha01hcDtcbnZhciBzZXQsIGdldCwgaGFzO1xuXG52YXIgZW5mb3JjZSA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaGFzKGl0KSA/IGdldChpdCkgOiBzZXQoaXQsIHt9KTtcbn07XG5cbnZhciBnZXR0ZXJGb3IgPSBmdW5jdGlvbiAoVFlQRSkge1xuICByZXR1cm4gZnVuY3Rpb24gKGl0KSB7XG4gICAgdmFyIHN0YXRlO1xuICAgIGlmICghaXNPYmplY3QoaXQpIHx8IChzdGF0ZSA9IGdldChpdCkpLnR5cGUgIT09IFRZUEUpIHtcbiAgICAgIHRocm93IFR5cGVFcnJvcignSW5jb21wYXRpYmxlIHJlY2VpdmVyLCAnICsgVFlQRSArICcgcmVxdWlyZWQnKTtcbiAgICB9IHJldHVybiBzdGF0ZTtcbiAgfTtcbn07XG5cbmlmIChOQVRJVkVfV0VBS19NQVApIHtcbiAgdmFyIHN0b3JlID0gbmV3IFdlYWtNYXAoKTtcbiAgdmFyIHdtZ2V0ID0gc3RvcmUuZ2V0O1xuICB2YXIgd21oYXMgPSBzdG9yZS5oYXM7XG4gIHZhciB3bXNldCA9IHN0b3JlLnNldDtcbiAgc2V0ID0gZnVuY3Rpb24gKGl0LCBtZXRhZGF0YSkge1xuICAgIHdtc2V0LmNhbGwoc3RvcmUsIGl0LCBtZXRhZGF0YSk7XG4gICAgcmV0dXJuIG1ldGFkYXRhO1xuICB9O1xuICBnZXQgPSBmdW5jdGlvbiAoaXQpIHtcbiAgICByZXR1cm4gd21nZXQuY2FsbChzdG9yZSwgaXQpIHx8IHt9O1xuICB9O1xuICBoYXMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgICByZXR1cm4gd21oYXMuY2FsbChzdG9yZSwgaXQpO1xuICB9O1xufSBlbHNlIHtcbiAgdmFyIFNUQVRFID0gc2hhcmVkS2V5KCdzdGF0ZScpO1xuICBoaWRkZW5LZXlzW1NUQVRFXSA9IHRydWU7XG4gIHNldCA9IGZ1bmN0aW9uIChpdCwgbWV0YWRhdGEpIHtcbiAgICBoaWRlKGl0LCBTVEFURSwgbWV0YWRhdGEpO1xuICAgIHJldHVybiBtZXRhZGF0YTtcbiAgfTtcbiAgZ2V0ID0gZnVuY3Rpb24gKGl0KSB7XG4gICAgcmV0dXJuIG9iamVjdEhhcyhpdCwgU1RBVEUpID8gaXRbU1RBVEVdIDoge307XG4gIH07XG4gIGhhcyA9IGZ1bmN0aW9uIChpdCkge1xuICAgIHJldHVybiBvYmplY3RIYXMoaXQsIFNUQVRFKTtcbiAgfTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIHNldDogc2V0LFxuICBnZXQ6IGdldCxcbiAgaGFzOiBoYXMsXG4gIGVuZm9yY2U6IGVuZm9yY2UsXG4gIGdldHRlckZvcjogZ2V0dGVyRm9yXG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/internal-state.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/is-array-iterator-method.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtYXJyYXktaXRlcmF0b3ItbWV0aG9kLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtYXJyYXktaXRlcmF0b3ItbWV0aG9kLmpzP2U5NWEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pdGVyYXRvcnMnKTtcblxudmFyIElURVJBVE9SID0gd2VsbEtub3duU3ltYm9sKCdpdGVyYXRvcicpO1xudmFyIEFycmF5UHJvdG90eXBlID0gQXJyYXkucHJvdG90eXBlO1xuXG4vLyBjaGVjayBvbiBkZWZhdWx0IEFycmF5IGl0ZXJhdG9yXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXQgIT09IHVuZGVmaW5lZCAmJiAoSXRlcmF0b3JzLkFycmF5ID09PSBpdCB8fCBBcnJheVByb3RvdHlwZVtJVEVSQVRPUl0gPT09IGl0KTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/is-array-iterator-method.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/is-forced.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-forced.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtZm9yY2VkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtZm9yY2VkLmpzPzk0Y2EiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGZhaWxzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZhaWxzJyk7XG5cbnZhciByZXBsYWNlbWVudCA9IC8jfFxcLnByb3RvdHlwZVxcLi87XG5cbnZhciBpc0ZvcmNlZCA9IGZ1bmN0aW9uIChmZWF0dXJlLCBkZXRlY3Rpb24pIHtcbiAgdmFyIHZhbHVlID0gZGF0YVtub3JtYWxpemUoZmVhdHVyZSldO1xuICByZXR1cm4gdmFsdWUgPT0gUE9MWUZJTEwgPyB0cnVlXG4gICAgOiB2YWx1ZSA9PSBOQVRJVkUgPyBmYWxzZVxuICAgIDogdHlwZW9mIGRldGVjdGlvbiA9PSAnZnVuY3Rpb24nID8gZmFpbHMoZGV0ZWN0aW9uKVxuICAgIDogISFkZXRlY3Rpb247XG59O1xuXG52YXIgbm9ybWFsaXplID0gaXNGb3JjZWQubm9ybWFsaXplID0gZnVuY3Rpb24gKHN0cmluZykge1xuICByZXR1cm4gU3RyaW5nKHN0cmluZykucmVwbGFjZShyZXBsYWNlbWVudCwgJy4nKS50b0xvd2VyQ2FzZSgpO1xufTtcblxudmFyIGRhdGEgPSBpc0ZvcmNlZC5kYXRhID0ge307XG52YXIgTkFUSVZFID0gaXNGb3JjZWQuTkFUSVZFID0gJ04nO1xudmFyIFBPTFlGSUxMID0gaXNGb3JjZWQuUE9MWUZJTEwgPSAnUCc7XG5cbm1vZHVsZS5leHBvcnRzID0gaXNGb3JjZWQ7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/is-forced.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/is-object.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-object.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtb2JqZWN0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtb2JqZWN0LmpzPzg2MWQiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIHR5cGVvZiBpdCA9PT0gJ29iamVjdCcgPyBpdCAhPT0gbnVsbCA6IHR5cGVvZiBpdCA9PT0gJ2Z1bmN0aW9uJztcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/is-object.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/is-pure.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/is-pure.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = false;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtcHVyZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2lzLXB1cmUuanM/YzQzMCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZhbHNlO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/is-pure.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/is-regexp.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-regexp.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtcmVnZXhwLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtcmVnZXhwLmpzPzQ0ZTciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLW9iamVjdCcpO1xudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY2xhc3NvZi1yYXcnKTtcbnZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcblxudmFyIE1BVENIID0gd2VsbEtub3duU3ltYm9sKCdtYXRjaCcpO1xuXG4vLyBgSXNSZWdFeHBgIGFic3RyYWN0IG9wZXJhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtaXNyZWdleHBcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHZhciBpc1JlZ0V4cDtcbiAgcmV0dXJuIGlzT2JqZWN0KGl0KSAmJiAoKGlzUmVnRXhwID0gaXRbTUFUQ0hdKSAhPT0gdW5kZWZpbmVkID8gISFpc1JlZ0V4cCA6IGNsYXNzb2YoaXQpID09ICdSZWdFeHAnKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/is-regexp.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/iterate.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/iterate.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ \"./node_modules/core-js/internals/is-array-iterator-method.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar bind = __webpack_require__(/*! ../internals/bind-context */ \"./node_modules/core-js/internals/bind-context.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js/internals/get-iterator-method.js\");\nvar callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ \"./node_modules/core-js/internals/call-with-safe-iteration-closing.js\");\n\nvar BREAK = {};\n\nvar exports = module.exports = function (iterable, fn, that, ENTRIES, ITERATOR) {\n var boundFunction = bind(fn, that, ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, step;\n\n if (ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]);\n if (result === BREAK) return BREAK;\n } return;\n }\n iterator = iterFn.call(iterable);\n }\n\n while (!(step = iterator.next()).done) {\n if (callWithSafeIterationClosing(iterator, boundFunction, step.value, ENTRIES) === BREAK) return BREAK;\n }\n};\n\nexports.BREAK = BREAK;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXRlcmF0ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2l0ZXJhdGUuanM/MjI2NiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYW4tb2JqZWN0Jyk7XG52YXIgaXNBcnJheUl0ZXJhdG9yTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLWFycmF5LWl0ZXJhdG9yLW1ldGhvZCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWxlbmd0aCcpO1xudmFyIGJpbmQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYmluZC1jb250ZXh0Jyk7XG52YXIgZ2V0SXRlcmF0b3JNZXRob2QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZ2V0LWl0ZXJhdG9yLW1ldGhvZCcpO1xudmFyIGNhbGxXaXRoU2FmZUl0ZXJhdGlvbkNsb3NpbmcgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY2FsbC13aXRoLXNhZmUtaXRlcmF0aW9uLWNsb3NpbmcnKTtcblxudmFyIEJSRUFLID0ge307XG5cbnZhciBleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXRlcmFibGUsIGZuLCB0aGF0LCBFTlRSSUVTLCBJVEVSQVRPUikge1xuICB2YXIgYm91bmRGdW5jdGlvbiA9IGJpbmQoZm4sIHRoYXQsIEVOVFJJRVMgPyAyIDogMSk7XG4gIHZhciBpdGVyYXRvciwgaXRlckZuLCBpbmRleCwgbGVuZ3RoLCByZXN1bHQsIHN0ZXA7XG5cbiAgaWYgKElURVJBVE9SKSB7XG4gICAgaXRlcmF0b3IgPSBpdGVyYWJsZTtcbiAgfSBlbHNlIHtcbiAgICBpdGVyRm4gPSBnZXRJdGVyYXRvck1ldGhvZChpdGVyYWJsZSk7XG4gICAgaWYgKHR5cGVvZiBpdGVyRm4gIT0gJ2Z1bmN0aW9uJykgdGhyb3cgVHlwZUVycm9yKCdUYXJnZXQgaXMgbm90IGl0ZXJhYmxlJyk7XG4gICAgLy8gb3B0aW1pc2F0aW9uIGZvciBhcnJheSBpdGVyYXRvcnNcbiAgICBpZiAoaXNBcnJheUl0ZXJhdG9yTWV0aG9kKGl0ZXJGbikpIHtcbiAgICAgIGZvciAoaW5kZXggPSAwLCBsZW5ndGggPSB0b0xlbmd0aChpdGVyYWJsZS5sZW5ndGgpOyBsZW5ndGggPiBpbmRleDsgaW5kZXgrKykge1xuICAgICAgICByZXN1bHQgPSBFTlRSSUVTID8gYm91bmRGdW5jdGlvbihhbk9iamVjdChzdGVwID0gaXRlcmFibGVbaW5kZXhdKVswXSwgc3RlcFsxXSkgOiBib3VuZEZ1bmN0aW9uKGl0ZXJhYmxlW2luZGV4XSk7XG4gICAgICAgIGlmIChyZXN1bHQgPT09IEJSRUFLKSByZXR1cm4gQlJFQUs7XG4gICAgICB9IHJldHVybjtcbiAgICB9XG4gICAgaXRlcmF0b3IgPSBpdGVyRm4uY2FsbChpdGVyYWJsZSk7XG4gIH1cblxuICB3aGlsZSAoIShzdGVwID0gaXRlcmF0b3IubmV4dCgpKS5kb25lKSB7XG4gICAgaWYgKGNhbGxXaXRoU2FmZUl0ZXJhdGlvbkNsb3NpbmcoaXRlcmF0b3IsIGJvdW5kRnVuY3Rpb24sIHN0ZXAudmFsdWUsIEVOVFJJRVMpID09PSBCUkVBSykgcmV0dXJuIEJSRUFLO1xuICB9XG59O1xuXG5leHBvcnRzLkJSRUFLID0gQlJFQUs7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/iterate.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/iterators-core.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/iterators-core.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXRlcmF0b3JzLWNvcmUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pdGVyYXRvcnMtY29yZS5qcz9hZTkzIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBnZXRQcm90b3R5cGVPZiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZicpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZScpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oYXMnKTtcbnZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcbnZhciBJU19QVVJFID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLXB1cmUnKTtcblxudmFyIElURVJBVE9SID0gd2VsbEtub3duU3ltYm9sKCdpdGVyYXRvcicpO1xudmFyIEJVR0dZX1NBRkFSSV9JVEVSQVRPUlMgPSBmYWxzZTtcblxudmFyIHJldHVyblRoaXMgPSBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9O1xuXG4vLyBgJUl0ZXJhdG9yUHJvdG90eXBlJWAgb2JqZWN0XG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy0laXRlcmF0b3Jwcm90b3R5cGUlLW9iamVjdFxudmFyIEl0ZXJhdG9yUHJvdG90eXBlLCBQcm90b3R5cGVPZkFycmF5SXRlcmF0b3JQcm90b3R5cGUsIGFycmF5SXRlcmF0b3I7XG5cbmlmIChbXS5rZXlzKSB7XG4gIGFycmF5SXRlcmF0b3IgPSBbXS5rZXlzKCk7XG4gIC8vIFNhZmFyaSA4IGhhcyBidWdneSBpdGVyYXRvcnMgdy9vIGBuZXh0YFxuICBpZiAoISgnbmV4dCcgaW4gYXJyYXlJdGVyYXRvcikpIEJVR0dZX1NBRkFSSV9JVEVSQVRPUlMgPSB0cnVlO1xuICBlbHNlIHtcbiAgICBQcm90b3R5cGVPZkFycmF5SXRlcmF0b3JQcm90b3R5cGUgPSBnZXRQcm90b3R5cGVPZihnZXRQcm90b3R5cGVPZihhcnJheUl0ZXJhdG9yKSk7XG4gICAgaWYgKFByb3RvdHlwZU9mQXJyYXlJdGVyYXRvclByb3RvdHlwZSAhPT0gT2JqZWN0LnByb3RvdHlwZSkgSXRlcmF0b3JQcm90b3R5cGUgPSBQcm90b3R5cGVPZkFycmF5SXRlcmF0b3JQcm90b3R5cGU7XG4gIH1cbn1cblxuaWYgKEl0ZXJhdG9yUHJvdG90eXBlID09IHVuZGVmaW5lZCkgSXRlcmF0b3JQcm90b3R5cGUgPSB7fTtcblxuLy8gMjUuMS4yLjEuMSAlSXRlcmF0b3JQcm90b3R5cGUlW0BAaXRlcmF0b3JdKClcbmlmICghSVNfUFVSRSAmJiAhaGFzKEl0ZXJhdG9yUHJvdG90eXBlLCBJVEVSQVRPUikpIGhpZGUoSXRlcmF0b3JQcm90b3R5cGUsIElURVJBVE9SLCByZXR1cm5UaGlzKTtcblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIEl0ZXJhdG9yUHJvdG90eXBlOiBJdGVyYXRvclByb3RvdHlwZSxcbiAgQlVHR1lfU0FGQVJJX0lURVJBVE9SUzogQlVHR1lfU0FGQVJJX0lURVJBVE9SU1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/iterators-core.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/iterators.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/iterators.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXRlcmF0b3JzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXRlcmF0b3JzLmpzPzNmOGMiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7fTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/iterators.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/microtask.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/microtask.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\").f;\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar macrotask = __webpack_require__(/*! ../internals/task */ \"./node_modules/core-js/internals/task.js\").set;\nvar userAgent = __webpack_require__(/*! ../internals/user-agent */ \"./node_modules/core-js/internals/user-agent.js\");\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver && !/(iphone|ipod|ipad).*applewebkit/i.test(userAgent)) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbWljcm90YXNrLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbWljcm90YXNrLmpzP2I1NzUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcbnZhciBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvb2JqZWN0LWdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvcicpLmY7XG52YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jbGFzc29mLXJhdycpO1xudmFyIG1hY3JvdGFzayA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90YXNrJykuc2V0O1xudmFyIHVzZXJBZ2VudCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy91c2VyLWFnZW50Jyk7XG5cbnZhciBNdXRhdGlvbk9ic2VydmVyID0gZ2xvYmFsLk11dGF0aW9uT2JzZXJ2ZXIgfHwgZ2xvYmFsLldlYktpdE11dGF0aW9uT2JzZXJ2ZXI7XG52YXIgcHJvY2VzcyA9IGdsb2JhbC5wcm9jZXNzO1xudmFyIFByb21pc2UgPSBnbG9iYWwuUHJvbWlzZTtcbnZhciBJU19OT0RFID0gY2xhc3NvZihwcm9jZXNzKSA9PSAncHJvY2Vzcyc7XG4vLyBOb2RlLmpzIDExIHNob3dzIEV4cGVyaW1lbnRhbFdhcm5pbmcgb24gZ2V0dGluZyBgcXVldWVNaWNyb3Rhc2tgXG52YXIgcXVldWVNaWNyb3Rhc2tEZXNjcmlwdG9yID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKGdsb2JhbCwgJ3F1ZXVlTWljcm90YXNrJyk7XG52YXIgcXVldWVNaWNyb3Rhc2sgPSBxdWV1ZU1pY3JvdGFza0Rlc2NyaXB0b3IgJiYgcXVldWVNaWNyb3Rhc2tEZXNjcmlwdG9yLnZhbHVlO1xuXG52YXIgZmx1c2gsIGhlYWQsIGxhc3QsIG5vdGlmeSwgdG9nZ2xlLCBub2RlLCBwcm9taXNlO1xuXG4vLyBtb2Rlcm4gZW5naW5lcyBoYXZlIHF1ZXVlTWljcm90YXNrIG1ldGhvZFxuaWYgKCFxdWV1ZU1pY3JvdGFzaykge1xuICBmbHVzaCA9IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgcGFyZW50LCBmbjtcbiAgICBpZiAoSVNfTk9ERSAmJiAocGFyZW50ID0gcHJvY2Vzcy5kb21haW4pKSBwYXJlbnQuZXhpdCgpO1xuICAgIHdoaWxlIChoZWFkKSB7XG4gICAgICBmbiA9IGhlYWQuZm47XG4gICAgICBoZWFkID0gaGVhZC5uZXh0O1xuICAgICAgdHJ5IHtcbiAgICAgICAgZm4oKTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgIGlmIChoZWFkKSBub3RpZnkoKTtcbiAgICAgICAgZWxzZSBsYXN0ID0gdW5kZWZpbmVkO1xuICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgIH1cbiAgICB9IGxhc3QgPSB1bmRlZmluZWQ7XG4gICAgaWYgKHBhcmVudCkgcGFyZW50LmVudGVyKCk7XG4gIH07XG5cbiAgLy8gTm9kZS5qc1xuICBpZiAoSVNfTk9ERSkge1xuICAgIG5vdGlmeSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgIHByb2Nlc3MubmV4dFRpY2soZmx1c2gpO1xuICAgIH07XG4gIC8vIGJyb3dzZXJzIHdpdGggTXV0YXRpb25PYnNlcnZlciwgZXhjZXB0IGlPUyAtIGh0dHBzOi8vZ2l0aHViLmNvbS96bG9pcm9jay9jb3JlLWpzL2lzc3Vlcy8zMzlcbiAgfSBlbHNlIGlmIChNdXRhdGlvbk9ic2VydmVyICYmICEvKGlwaG9uZXxpcG9kfGlwYWQpLiphcHBsZXdlYmtpdC9pLnRlc3QodXNlckFnZW50KSkge1xuICAgIHRvZ2dsZSA9IHRydWU7XG4gICAgbm9kZSA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCcnKTtcbiAgICBuZXcgTXV0YXRpb25PYnNlcnZlcihmbHVzaCkub2JzZXJ2ZShub2RlLCB7IGNoYXJhY3RlckRhdGE6IHRydWUgfSk7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tbmV3XG4gICAgbm90aWZ5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgbm9kZS5kYXRhID0gdG9nZ2xlID0gIXRvZ2dsZTtcbiAgICB9O1xuICAvLyBlbnZpcm9ubWVudHMgd2l0aCBtYXliZSBub24tY29tcGxldGVseSBjb3JyZWN0LCBidXQgZXhpc3RlbnQgUHJvbWlzZVxuICB9IGVsc2UgaWYgKFByb21pc2UgJiYgUHJvbWlzZS5yZXNvbHZlKSB7XG4gICAgLy8gUHJvbWlzZS5yZXNvbHZlIHdpdGhvdXQgYW4gYXJndW1lbnQgdGhyb3dzIGFuIGVycm9yIGluIExHIFdlYk9TIDJcbiAgICBwcm9taXNlID0gUHJvbWlzZS5yZXNvbHZlKHVuZGVmaW5lZCk7XG4gICAgbm90aWZ5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgcHJvbWlzZS50aGVuKGZsdXNoKTtcbiAgICB9O1xuICAvLyBmb3Igb3RoZXIgZW52aXJvbm1lbnRzIC0gbWFjcm90YXNrIGJhc2VkIG9uOlxuICAvLyAtIHNldEltbWVkaWF0ZVxuICAvLyAtIE1lc3NhZ2VDaGFubmVsXG4gIC8vIC0gd2luZG93LnBvc3RNZXNzYWdcbiAgLy8gLSBvbnJlYWR5c3RhdGVjaGFuZ2VcbiAgLy8gLSBzZXRUaW1lb3V0XG4gIH0gZWxzZSB7XG4gICAgbm90aWZ5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgLy8gc3RyYW5nZSBJRSArIHdlYnBhY2sgZGV2IHNlcnZlciBidWcgLSB1c2UgLmNhbGwoZ2xvYmFsKVxuICAgICAgbWFjcm90YXNrLmNhbGwoZ2xvYmFsLCBmbHVzaCk7XG4gICAgfTtcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHF1ZXVlTWljcm90YXNrIHx8IGZ1bmN0aW9uIChmbikge1xuICB2YXIgdGFzayA9IHsgZm46IGZuLCBuZXh0OiB1bmRlZmluZWQgfTtcbiAgaWYgKGxhc3QpIGxhc3QubmV4dCA9IHRhc2s7XG4gIGlmICghaGVhZCkge1xuICAgIGhlYWQgPSB0YXNrO1xuICAgIG5vdGlmeSgpO1xuICB9IGxhc3QgPSB0YXNrO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/microtask.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/native-symbol.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/native-symbol.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbmF0aXZlLXN5bWJvbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL25hdGl2ZS1zeW1ib2wuanM/NDkzMCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZmFpbHMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZmFpbHMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSAhIU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgJiYgIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgLy8gQ2hyb21lIDM4IFN5bWJvbCBoYXMgaW5jb3JyZWN0IHRvU3RyaW5nIGNvbnZlcnNpb25cbiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVuZGVmXG4gIHJldHVybiAhU3RyaW5nKFN5bWJvbCgpKTtcbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/native-symbol.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/native-weak-map.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/native-weak-map.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar nativeFunctionToString = __webpack_require__(/*! ../internals/function-to-string */ \"./node_modules/core-js/internals/function-to-string.js\");\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbmF0aXZlLXdlYWstbWFwLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbmF0aXZlLXdlYWstbWFwLmpzPzdmOWEiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcbnZhciBuYXRpdmVGdW5jdGlvblRvU3RyaW5nID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2Z1bmN0aW9uLXRvLXN0cmluZycpO1xuXG52YXIgV2Vha01hcCA9IGdsb2JhbC5XZWFrTWFwO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHR5cGVvZiBXZWFrTWFwID09PSAnZnVuY3Rpb24nICYmIC9uYXRpdmUgY29kZS8udGVzdChuYXRpdmVGdW5jdGlvblRvU3RyaW5nLmNhbGwoV2Vha01hcCkpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/native-weak-map.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/new-promise-capability.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/new-promise-capability.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js/internals/a-function.js\");\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbmV3LXByb21pc2UtY2FwYWJpbGl0eS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL25ldy1wcm9taXNlLWNhcGFiaWxpdHkuanM/ZjA2OSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2EtZnVuY3Rpb24nKTtcblxudmFyIFByb21pc2VDYXBhYmlsaXR5ID0gZnVuY3Rpb24gKEMpIHtcbiAgdmFyIHJlc29sdmUsIHJlamVjdDtcbiAgdGhpcy5wcm9taXNlID0gbmV3IEMoZnVuY3Rpb24gKCQkcmVzb2x2ZSwgJCRyZWplY3QpIHtcbiAgICBpZiAocmVzb2x2ZSAhPT0gdW5kZWZpbmVkIHx8IHJlamVjdCAhPT0gdW5kZWZpbmVkKSB0aHJvdyBUeXBlRXJyb3IoJ0JhZCBQcm9taXNlIGNvbnN0cnVjdG9yJyk7XG4gICAgcmVzb2x2ZSA9ICQkcmVzb2x2ZTtcbiAgICByZWplY3QgPSAkJHJlamVjdDtcbiAgfSk7XG4gIHRoaXMucmVzb2x2ZSA9IGFGdW5jdGlvbihyZXNvbHZlKTtcbiAgdGhpcy5yZWplY3QgPSBhRnVuY3Rpb24ocmVqZWN0KTtcbn07XG5cbi8vIDI1LjQuMS41IE5ld1Byb21pc2VDYXBhYmlsaXR5KEMpXG5tb2R1bGUuZXhwb3J0cy5mID0gZnVuY3Rpb24gKEMpIHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlQ2FwYWJpbGl0eShDKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/new-promise-capability.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-create.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/object-create.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js/internals/object-define-properties.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar PROTOTYPE = 'prototype';\nvar Empty = function () { /* empty */ };\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var length = enumBugKeys.length;\n var lt = '<';\n var script = 'script';\n var gt = '>';\n var js = 'java' + script + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(js);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];\n return createDict();\n};\n\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\nhiddenKeys[IE_PROTO] = true;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWNyZWF0ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1jcmVhdGUuanM/N2M3MyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYW4tb2JqZWN0Jyk7XG52YXIgZGVmaW5lUHJvcGVydGllcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMnKTtcbnZhciBlbnVtQnVnS2V5cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9lbnVtLWJ1Zy1rZXlzJyk7XG52YXIgaGlkZGVuS2V5cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oaWRkZW4ta2V5cycpO1xudmFyIGh0bWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaHRtbCcpO1xudmFyIGRvY3VtZW50Q3JlYXRlRWxlbWVudCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9kb2N1bWVudC1jcmVhdGUtZWxlbWVudCcpO1xudmFyIHNoYXJlZEtleSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zaGFyZWQta2V5Jyk7XG52YXIgSUVfUFJPVE8gPSBzaGFyZWRLZXkoJ0lFX1BST1RPJyk7XG5cbnZhciBQUk9UT1RZUEUgPSAncHJvdG90eXBlJztcbnZhciBFbXB0eSA9IGZ1bmN0aW9uICgpIHsgLyogZW1wdHkgKi8gfTtcblxuLy8gQ3JlYXRlIG9iamVjdCB3aXRoIGZha2UgYG51bGxgIHByb3RvdHlwZTogdXNlIGlmcmFtZSBPYmplY3Qgd2l0aCBjbGVhcmVkIHByb3RvdHlwZVxudmFyIGNyZWF0ZURpY3QgPSBmdW5jdGlvbiAoKSB7XG4gIC8vIFRocmFzaCwgd2FzdGUgYW5kIHNvZG9teTogSUUgR0MgYnVnXG4gIHZhciBpZnJhbWUgPSBkb2N1bWVudENyZWF0ZUVsZW1lbnQoJ2lmcmFtZScpO1xuICB2YXIgbGVuZ3RoID0gZW51bUJ1Z0tleXMubGVuZ3RoO1xuICB2YXIgbHQgPSAnPCc7XG4gIHZhciBzY3JpcHQgPSAnc2NyaXB0JztcbiAgdmFyIGd0ID0gJz4nO1xuICB2YXIganMgPSAnamF2YScgKyBzY3JpcHQgKyAnOic7XG4gIHZhciBpZnJhbWVEb2N1bWVudDtcbiAgaWZyYW1lLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gIGh0bWwuYXBwZW5kQ2hpbGQoaWZyYW1lKTtcbiAgaWZyYW1lLnNyYyA9IFN0cmluZyhqcyk7XG4gIGlmcmFtZURvY3VtZW50ID0gaWZyYW1lLmNvbnRlbnRXaW5kb3cuZG9jdW1lbnQ7XG4gIGlmcmFtZURvY3VtZW50Lm9wZW4oKTtcbiAgaWZyYW1lRG9jdW1lbnQud3JpdGUobHQgKyBzY3JpcHQgKyBndCArICdkb2N1bWVudC5GPU9iamVjdCcgKyBsdCArICcvJyArIHNjcmlwdCArIGd0KTtcbiAgaWZyYW1lRG9jdW1lbnQuY2xvc2UoKTtcbiAgY3JlYXRlRGljdCA9IGlmcmFtZURvY3VtZW50LkY7XG4gIHdoaWxlIChsZW5ndGgtLSkgZGVsZXRlIGNyZWF0ZURpY3RbUFJPVE9UWVBFXVtlbnVtQnVnS2V5c1tsZW5ndGhdXTtcbiAgcmV0dXJuIGNyZWF0ZURpY3QoKTtcbn07XG5cbi8vIDE5LjEuMi4yIC8gMTUuMi4zLjUgT2JqZWN0LmNyZWF0ZShPIFssIFByb3BlcnRpZXNdKVxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuY3JlYXRlIHx8IGZ1bmN0aW9uIGNyZWF0ZShPLCBQcm9wZXJ0aWVzKSB7XG4gIHZhciByZXN1bHQ7XG4gIGlmIChPICE9PSBudWxsKSB7XG4gICAgRW1wdHlbUFJPVE9UWVBFXSA9IGFuT2JqZWN0KE8pO1xuICAgIHJlc3VsdCA9IG5ldyBFbXB0eSgpO1xuICAgIEVtcHR5W1BST1RPVFlQRV0gPSBudWxsO1xuICAgIC8vIGFkZCBcIl9fcHJvdG9fX1wiIGZvciBPYmplY3QuZ2V0UHJvdG90eXBlT2YgcG9seWZpbGxcbiAgICByZXN1bHRbSUVfUFJPVE9dID0gTztcbiAgfSBlbHNlIHJlc3VsdCA9IGNyZWF0ZURpY3QoKTtcbiAgcmV0dXJuIFByb3BlcnRpZXMgPT09IHVuZGVmaW5lZCA/IHJlc3VsdCA6IGRlZmluZVByb3BlcnRpZXMocmVzdWx0LCBQcm9wZXJ0aWVzKTtcbn07XG5cbmhpZGRlbktleXNbSUVfUFJPVE9dID0gdHJ1ZTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-create.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-define-properties.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/object-define-properties.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\n\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var i = 0;\n var key;\n while (length > i) definePropertyModule.f(O, key = keys[i++], Properties[key]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0aWVzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0aWVzLmpzPzM3ZTgiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIERFU0NSSVBUT1JTID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2Rlc2NyaXB0b3JzJyk7XG52YXIgZGVmaW5lUHJvcGVydHlNb2R1bGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0eScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xudmFyIG9iamVjdEtleXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvb2JqZWN0LWtleXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBERVNDUklQVE9SUyA/IE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzIDogZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyhPLCBQcm9wZXJ0aWVzKSB7XG4gIGFuT2JqZWN0KE8pO1xuICB2YXIga2V5cyA9IG9iamVjdEtleXMoUHJvcGVydGllcyk7XG4gIHZhciBsZW5ndGggPSBrZXlzLmxlbmd0aDtcbiAgdmFyIGkgPSAwO1xuICB2YXIga2V5O1xuICB3aGlsZSAobGVuZ3RoID4gaSkgZGVmaW5lUHJvcGVydHlNb2R1bGUuZihPLCBrZXkgPSBrZXlzW2krK10sIFByb3BlcnRpZXNba2V5XSk7XG4gIHJldHVybiBPO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-define-properties.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-define-property.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-define-property.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js/internals/to-primitive.js\");\n\nvar nativeDefineProperty = Object.defineProperty;\n\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0eS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1kZWZpbmUtcHJvcGVydHkuanM/OWJmMiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgREVTQ1JJUFRPUlMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZGVzY3JpcHRvcnMnKTtcbnZhciBJRThfRE9NX0RFRklORSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pZTgtZG9tLWRlZmluZScpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xudmFyIHRvUHJpbWl0aXZlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLXByaW1pdGl2ZScpO1xuXG52YXIgbmF0aXZlRGVmaW5lUHJvcGVydHkgPSBPYmplY3QuZGVmaW5lUHJvcGVydHk7XG5cbmV4cG9ydHMuZiA9IERFU0NSSVBUT1JTID8gbmF0aXZlRGVmaW5lUHJvcGVydHkgOiBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0eShPLCBQLCBBdHRyaWJ1dGVzKSB7XG4gIGFuT2JqZWN0KE8pO1xuICBQID0gdG9QcmltaXRpdmUoUCwgdHJ1ZSk7XG4gIGFuT2JqZWN0KEF0dHJpYnV0ZXMpO1xuICBpZiAoSUU4X0RPTV9ERUZJTkUpIHRyeSB7XG4gICAgcmV0dXJuIG5hdGl2ZURlZmluZVByb3BlcnR5KE8sIFAsIEF0dHJpYnV0ZXMpO1xuICB9IGNhdGNoIChlcnJvcikgeyAvKiBlbXB0eSAqLyB9XG4gIGlmICgnZ2V0JyBpbiBBdHRyaWJ1dGVzIHx8ICdzZXQnIGluIEF0dHJpYnV0ZXMpIHRocm93IFR5cGVFcnJvcignQWNjZXNzb3JzIG5vdCBzdXBwb3J0ZWQnKTtcbiAgaWYgKCd2YWx1ZScgaW4gQXR0cmlidXRlcykgT1tQXSA9IEF0dHJpYnV0ZXMudmFsdWU7XG4gIHJldHVybiBPO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-define-property.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js": +/*!******************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js/internals/to-primitive.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWdldC1vd24tcHJvcGVydHktZGVzY3JpcHRvci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1nZXQtb3duLXByb3BlcnR5LWRlc2NyaXB0b3IuanM/MDZjZiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgREVTQ1JJUFRPUlMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZGVzY3JpcHRvcnMnKTtcbnZhciBwcm9wZXJ0eUlzRW51bWVyYWJsZU1vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZScpO1xudmFyIGNyZWF0ZVByb3BlcnR5RGVzY3JpcHRvciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jcmVhdGUtcHJvcGVydHktZGVzY3JpcHRvcicpO1xudmFyIHRvSW5kZXhlZE9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1pbmRleGVkLW9iamVjdCcpO1xudmFyIHRvUHJpbWl0aXZlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLXByaW1pdGl2ZScpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oYXMnKTtcbnZhciBJRThfRE9NX0RFRklORSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pZTgtZG9tLWRlZmluZScpO1xuXG52YXIgbmF0aXZlR2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcjtcblxuZXhwb3J0cy5mID0gREVTQ1JJUFRPUlMgPyBuYXRpdmVHZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IgOiBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoTywgUCkge1xuICBPID0gdG9JbmRleGVkT2JqZWN0KE8pO1xuICBQID0gdG9QcmltaXRpdmUoUCwgdHJ1ZSk7XG4gIGlmIChJRThfRE9NX0RFRklORSkgdHJ5IHtcbiAgICByZXR1cm4gbmF0aXZlR2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE8sIFApO1xuICB9IGNhdGNoIChlcnJvcikgeyAvKiBlbXB0eSAqLyB9XG4gIGlmIChoYXMoTywgUCkpIHJldHVybiBjcmVhdGVQcm9wZXJ0eURlc2NyaXB0b3IoIXByb3BlcnR5SXNFbnVtZXJhYmxlTW9kdWxlLmYuY2FsbChPLCBQKSwgT1tQXSk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-get-own-property-descriptor.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-get-own-property-names.js": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWdldC1vd24tcHJvcGVydHktbmFtZXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LW93bi1wcm9wZXJ0eS1uYW1lcy5qcz8yNDFjIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDE5LjEuMi43IC8gMTUuMi4zLjQgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoTylcbnZhciBpbnRlcm5hbE9iamVjdEtleXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwnKTtcbnZhciBlbnVtQnVnS2V5cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9lbnVtLWJ1Zy1rZXlzJyk7XG5cbnZhciBoaWRkZW5LZXlzID0gZW51bUJ1Z0tleXMuY29uY2F0KCdsZW5ndGgnLCAncHJvdG90eXBlJyk7XG5cbmV4cG9ydHMuZiA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzIHx8IGZ1bmN0aW9uIGdldE93blByb3BlcnR5TmFtZXMoTykge1xuICByZXR1cm4gaW50ZXJuYWxPYmplY3RLZXlzKE8sIGhpZGRlbktleXMpO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-get-own-property-names.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js": +/*!***************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("exports.f = Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWdldC1vd24tcHJvcGVydHktc3ltYm9scy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1nZXQtb3duLXByb3BlcnR5LXN5bWJvbHMuanM/NzQxOCJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-get-own-property-symbols.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-get-prototype-of.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ \"./node_modules/core-js/internals/correct-prototype-getter.js\");\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWdldC1wcm90b3R5cGUtb2YuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZi5qcz9lMTYzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBoYXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGFzJyk7XG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvdG8tb2JqZWN0Jyk7XG52YXIgc2hhcmVkS2V5ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3NoYXJlZC1rZXknKTtcbnZhciBDT1JSRUNUX1BST1RPVFlQRV9HRVRURVIgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY29ycmVjdC1wcm90b3R5cGUtZ2V0dGVyJyk7XG5cbnZhciBJRV9QUk9UTyA9IHNoYXJlZEtleSgnSUVfUFJPVE8nKTtcbnZhciBPYmplY3RQcm90b3R5cGUgPSBPYmplY3QucHJvdG90eXBlO1xuXG4vLyAxOS4xLjIuOSAvIDE1LjIuMy4yIE9iamVjdC5nZXRQcm90b3R5cGVPZihPKVxubW9kdWxlLmV4cG9ydHMgPSBDT1JSRUNUX1BST1RPVFlQRV9HRVRURVIgPyBPYmplY3QuZ2V0UHJvdG90eXBlT2YgOiBmdW5jdGlvbiAoTykge1xuICBPID0gdG9PYmplY3QoTyk7XG4gIGlmIChoYXMoTywgSUVfUFJPVE8pKSByZXR1cm4gT1tJRV9QUk9UT107XG4gIGlmICh0eXBlb2YgTy5jb25zdHJ1Y3RvciA9PSAnZnVuY3Rpb24nICYmIE8gaW5zdGFuY2VvZiBPLmNvbnN0cnVjdG9yKSB7XG4gICAgcmV0dXJuIE8uY29uc3RydWN0b3IucHJvdG90eXBlO1xuICB9IHJldHVybiBPIGluc3RhbmNlb2YgT2JqZWN0ID8gT2JqZWN0UHJvdG90eXBlIDogbnVsbDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-get-prototype-of.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-keys-internal.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys-internal.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar arrayIncludes = __webpack_require__(/*! ../internals/array-includes */ \"./node_modules/core-js/internals/array-includes.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\n\nvar arrayIndexOf = arrayIncludes(false);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3Qta2V5cy1pbnRlcm5hbC5qcz9jYTg0Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBoYXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGFzJyk7XG52YXIgdG9JbmRleGVkT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWluZGV4ZWQtb2JqZWN0Jyk7XG52YXIgYXJyYXlJbmNsdWRlcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9hcnJheS1pbmNsdWRlcycpO1xudmFyIGhpZGRlbktleXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZGVuLWtleXMnKTtcblxudmFyIGFycmF5SW5kZXhPZiA9IGFycmF5SW5jbHVkZXMoZmFsc2UpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChvYmplY3QsIG5hbWVzKSB7XG4gIHZhciBPID0gdG9JbmRleGVkT2JqZWN0KG9iamVjdCk7XG4gIHZhciBpID0gMDtcbiAgdmFyIHJlc3VsdCA9IFtdO1xuICB2YXIga2V5O1xuICBmb3IgKGtleSBpbiBPKSAhaGFzKGhpZGRlbktleXMsIGtleSkgJiYgaGFzKE8sIGtleSkgJiYgcmVzdWx0LnB1c2goa2V5KTtcbiAgLy8gRG9uJ3QgZW51bSBidWcgJiBoaWRkZW4ga2V5c1xuICB3aGlsZSAobmFtZXMubGVuZ3RoID4gaSkgaWYgKGhhcyhPLCBrZXkgPSBuYW1lc1tpKytdKSkge1xuICAgIH5hcnJheUluZGV4T2YocmVzdWx0LCBrZXkpIHx8IHJlc3VsdC5wdXNoKGtleSk7XG4gIH1cbiAgcmV0dXJuIHJlc3VsdDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-keys-internal.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-keys.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\n// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3Qta2V5cy5qcz9kZjc1Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBpbnRlcm5hbE9iamVjdEtleXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwnKTtcbnZhciBlbnVtQnVnS2V5cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9lbnVtLWJ1Zy1rZXlzJyk7XG5cbi8vIDE5LjEuMi4xNCAvIDE1LjIuMy4xNCBPYmplY3Qua2V5cyhPKVxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3Qua2V5cyB8fCBmdW5jdGlvbiBrZXlzKE8pIHtcbiAgcmV0dXJuIGludGVybmFsT2JqZWN0S2V5cyhPLCBlbnVtQnVnS2V5cyk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-keys.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-property-is-enumerable.js": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LXByb3BlcnR5LWlzLWVudW1lcmFibGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZS5qcz9kMWU3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBuYXRpdmVQcm9wZXJ0eUlzRW51bWVyYWJsZSA9IHt9LnByb3BlcnR5SXNFbnVtZXJhYmxlO1xudmFyIGdldE93blByb3BlcnR5RGVzY3JpcHRvciA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG5cbi8vIE5hc2hvcm4gfiBKREs4IGJ1Z1xudmFyIE5BU0hPUk5fQlVHID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yICYmICFuYXRpdmVQcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKHsgMTogMiB9LCAxKTtcblxuZXhwb3J0cy5mID0gTkFTSE9STl9CVUcgPyBmdW5jdGlvbiBwcm9wZXJ0eUlzRW51bWVyYWJsZShWKSB7XG4gIHZhciBkZXNjcmlwdG9yID0gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKHRoaXMsIFYpO1xuICByZXR1cm4gISFkZXNjcmlwdG9yICYmIGRlc2NyaXB0b3IuZW51bWVyYWJsZTtcbn0gOiBuYXRpdmVQcm9wZXJ0eUlzRW51bWVyYWJsZTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-property-is-enumerable.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-set-prototype-of.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var validateSetPrototypeOfArguments = __webpack_require__(/*! ../internals/validate-set-prototype-of-arguments */ \"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js\");\n\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var correctSetter = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n correctSetter = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n validateSetPrototypeOfArguments(O, proto);\n if (correctSetter) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LXNldC1wcm90b3R5cGUtb2YuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3Qtc2V0LXByb3RvdHlwZS1vZi5qcz9kMmJiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB2YWxpZGF0ZVNldFByb3RvdHlwZU9mQXJndW1lbnRzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3ZhbGlkYXRlLXNldC1wcm90b3R5cGUtb2YtYXJndW1lbnRzJyk7XG5cbi8vIFdvcmtzIHdpdGggX19wcm90b19fIG9ubHkuIE9sZCB2OCBjYW4ndCB3b3JrIHdpdGggbnVsbCBwcm90byBvYmplY3RzLlxuLyogZXNsaW50LWRpc2FibGUgbm8tcHJvdG8gKi9cbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8ICgnX19wcm90b19fJyBpbiB7fSA/IGZ1bmN0aW9uICgpIHtcbiAgdmFyIGNvcnJlY3RTZXR0ZXIgPSBmYWxzZTtcbiAgdmFyIHRlc3QgPSB7fTtcbiAgdmFyIHNldHRlcjtcbiAgdHJ5IHtcbiAgICBzZXR0ZXIgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKE9iamVjdC5wcm90b3R5cGUsICdfX3Byb3RvX18nKS5zZXQ7XG4gICAgc2V0dGVyLmNhbGwodGVzdCwgW10pO1xuICAgIGNvcnJlY3RTZXR0ZXIgPSB0ZXN0IGluc3RhbmNlb2YgQXJyYXk7XG4gIH0gY2F0Y2ggKGVycm9yKSB7IC8qIGVtcHR5ICovIH1cbiAgcmV0dXJuIGZ1bmN0aW9uIHNldFByb3RvdHlwZU9mKE8sIHByb3RvKSB7XG4gICAgdmFsaWRhdGVTZXRQcm90b3R5cGVPZkFyZ3VtZW50cyhPLCBwcm90byk7XG4gICAgaWYgKGNvcnJlY3RTZXR0ZXIpIHNldHRlci5jYWxsKE8sIHByb3RvKTtcbiAgICBlbHNlIE8uX19wcm90b19fID0gcHJvdG87XG4gICAgcmV0dXJuIE87XG4gIH07XG59KCkgOiB1bmRlZmluZWQpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-set-prototype-of.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/object-to-string.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/internals/object-to-string.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\n// `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nmodule.exports = String(test) !== '[object z]' ? function toString() {\n return '[object ' + classof(this) + ']';\n} : test.toString;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LXRvLXN0cmluZy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC10by1zdHJpbmcuanM/YjA0MSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jbGFzc29mJyk7XG52YXIgd2VsbEtub3duU3ltYm9sID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3dlbGwta25vd24tc3ltYm9sJyk7XG5cbnZhciBUT19TVFJJTkdfVEFHID0gd2VsbEtub3duU3ltYm9sKCd0b1N0cmluZ1RhZycpO1xudmFyIHRlc3QgPSB7fTtcblxudGVzdFtUT19TVFJJTkdfVEFHXSA9ICd6JztcblxuLy8gYE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmdgIG1ldGhvZCBpbXBsZW1lbnRhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtb2JqZWN0LnByb3RvdHlwZS50b3N0cmluZ1xubW9kdWxlLmV4cG9ydHMgPSBTdHJpbmcodGVzdCkgIT09ICdbb2JqZWN0IHpdJyA/IGZ1bmN0aW9uIHRvU3RyaW5nKCkge1xuICByZXR1cm4gJ1tvYmplY3QgJyArIGNsYXNzb2YodGhpcykgKyAnXSc7XG59IDogdGVzdC50b1N0cmluZztcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/object-to-string.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/own-keys.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/own-keys.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ \"./node_modules/core-js/internals/object-get-own-property-names.js\");\nvar getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ \"./node_modules/core-js/internals/object-get-own-property-symbols.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\n\nvar Reflect = global.Reflect;\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb3duLWtleXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vd24ta2V5cy5qcz81NmVmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZ2xvYmFsJyk7XG52YXIgZ2V0T3duUHJvcGVydHlOYW1lc01vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZ2V0LW93bi1wcm9wZXJ0eS1uYW1lcycpO1xudmFyIGdldE93blByb3BlcnR5U3ltYm9sc01vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZ2V0LW93bi1wcm9wZXJ0eS1zeW1ib2xzJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYW4tb2JqZWN0Jyk7XG5cbnZhciBSZWZsZWN0ID0gZ2xvYmFsLlJlZmxlY3Q7XG5cbi8vIGFsbCBvYmplY3Qga2V5cywgaW5jbHVkZXMgbm9uLWVudW1lcmFibGUgYW5kIHN5bWJvbHNcbm1vZHVsZS5leHBvcnRzID0gUmVmbGVjdCAmJiBSZWZsZWN0Lm93bktleXMgfHwgZnVuY3Rpb24gb3duS2V5cyhpdCkge1xuICB2YXIga2V5cyA9IGdldE93blByb3BlcnR5TmFtZXNNb2R1bGUuZihhbk9iamVjdChpdCkpO1xuICB2YXIgZ2V0T3duUHJvcGVydHlTeW1ib2xzID0gZ2V0T3duUHJvcGVydHlTeW1ib2xzTW9kdWxlLmY7XG4gIHJldHVybiBnZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPyBrZXlzLmNvbmNhdChnZXRPd25Qcm9wZXJ0eVN5bWJvbHMoaXQpKSA6IGtleXM7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/own-keys.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/path.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/path.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcGF0aC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3BhdGguanM/NDI4ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/path.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/perform.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/perform.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcGVyZm9ybS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3BlcmZvcm0uanM/ZTY2NyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChleGVjKSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIHsgZXJyb3I6IGZhbHNlLCB2YWx1ZTogZXhlYygpIH07XG4gIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgcmV0dXJuIHsgZXJyb3I6IHRydWUsIHZhbHVlOiBlcnJvciB9O1xuICB9XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/perform.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/promise-resolve.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/promise-resolve.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js/internals/new-promise-capability.js\");\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcHJvbWlzZS1yZXNvbHZlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcHJvbWlzZS1yZXNvbHZlLmpzP2NkZjkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLW9iamVjdCcpO1xudmFyIG5ld1Byb21pc2VDYXBhYmlsaXR5ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL25ldy1wcm9taXNlLWNhcGFiaWxpdHknKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoQywgeCkge1xuICBhbk9iamVjdChDKTtcbiAgaWYgKGlzT2JqZWN0KHgpICYmIHguY29uc3RydWN0b3IgPT09IEMpIHJldHVybiB4O1xuICB2YXIgcHJvbWlzZUNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eS5mKEMpO1xuICB2YXIgcmVzb2x2ZSA9IHByb21pc2VDYXBhYmlsaXR5LnJlc29sdmU7XG4gIHJlc29sdmUoeCk7XG4gIHJldHVybiBwcm9taXNlQ2FwYWJpbGl0eS5wcm9taXNlO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/promise-resolve.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/redefine-all.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/redefine-all.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVkZWZpbmUtYWxsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVkZWZpbmUtYWxsLmpzP2UyY2MiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHJlZGVmaW5lID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3JlZGVmaW5lJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKHRhcmdldCwgc3JjLCBvcHRpb25zKSB7XG4gIGZvciAodmFyIGtleSBpbiBzcmMpIHJlZGVmaW5lKHRhcmdldCwga2V5LCBzcmNba2V5XSwgb3B0aW9ucyk7XG4gIHJldHVybiB0YXJnZXQ7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/redefine-all.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/redefine.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/redefine.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar setGlobal = __webpack_require__(/*! ../internals/set-global */ \"./node_modules/core-js/internals/set-global.js\");\nvar nativeFunctionToString = __webpack_require__(/*! ../internals/function-to-string */ \"./node_modules/core-js/internals/function-to-string.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(nativeFunctionToString).split('toString');\n\nshared('inspectSource', function (it) {\n return nativeFunctionToString.call(it);\n});\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else hide(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVkZWZpbmUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9yZWRlZmluZS5qcz82ZWViIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZ2xvYmFsJyk7XG52YXIgc2hhcmVkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3NoYXJlZCcpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZScpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9oYXMnKTtcbnZhciBzZXRHbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2V0LWdsb2JhbCcpO1xudmFyIG5hdGl2ZUZ1bmN0aW9uVG9TdHJpbmcgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZnVuY3Rpb24tdG8tc3RyaW5nJyk7XG52YXIgSW50ZXJuYWxTdGF0ZU1vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pbnRlcm5hbC1zdGF0ZScpO1xuXG52YXIgZ2V0SW50ZXJuYWxTdGF0ZSA9IEludGVybmFsU3RhdGVNb2R1bGUuZ2V0O1xudmFyIGVuZm9yY2VJbnRlcm5hbFN0YXRlID0gSW50ZXJuYWxTdGF0ZU1vZHVsZS5lbmZvcmNlO1xudmFyIFRFTVBMQVRFID0gU3RyaW5nKG5hdGl2ZUZ1bmN0aW9uVG9TdHJpbmcpLnNwbGl0KCd0b1N0cmluZycpO1xuXG5zaGFyZWQoJ2luc3BlY3RTb3VyY2UnLCBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIG5hdGl2ZUZ1bmN0aW9uVG9TdHJpbmcuY2FsbChpdCk7XG59KTtcblxuKG1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE8sIGtleSwgdmFsdWUsIG9wdGlvbnMpIHtcbiAgdmFyIHVuc2FmZSA9IG9wdGlvbnMgPyAhIW9wdGlvbnMudW5zYWZlIDogZmFsc2U7XG4gIHZhciBzaW1wbGUgPSBvcHRpb25zID8gISFvcHRpb25zLmVudW1lcmFibGUgOiBmYWxzZTtcbiAgdmFyIG5vVGFyZ2V0R2V0ID0gb3B0aW9ucyA/ICEhb3B0aW9ucy5ub1RhcmdldEdldCA6IGZhbHNlO1xuICBpZiAodHlwZW9mIHZhbHVlID09ICdmdW5jdGlvbicpIHtcbiAgICBpZiAodHlwZW9mIGtleSA9PSAnc3RyaW5nJyAmJiAhaGFzKHZhbHVlLCAnbmFtZScpKSBoaWRlKHZhbHVlLCAnbmFtZScsIGtleSk7XG4gICAgZW5mb3JjZUludGVybmFsU3RhdGUodmFsdWUpLnNvdXJjZSA9IFRFTVBMQVRFLmpvaW4odHlwZW9mIGtleSA9PSAnc3RyaW5nJyA/IGtleSA6ICcnKTtcbiAgfVxuICBpZiAoTyA9PT0gZ2xvYmFsKSB7XG4gICAgaWYgKHNpbXBsZSkgT1trZXldID0gdmFsdWU7XG4gICAgZWxzZSBzZXRHbG9iYWwoa2V5LCB2YWx1ZSk7XG4gICAgcmV0dXJuO1xuICB9IGVsc2UgaWYgKCF1bnNhZmUpIHtcbiAgICBkZWxldGUgT1trZXldO1xuICB9IGVsc2UgaWYgKCFub1RhcmdldEdldCAmJiBPW2tleV0pIHtcbiAgICBzaW1wbGUgPSB0cnVlO1xuICB9XG4gIGlmIChzaW1wbGUpIE9ba2V5XSA9IHZhbHVlO1xuICBlbHNlIGhpZGUoTywga2V5LCB2YWx1ZSk7XG4vLyBhZGQgZmFrZSBGdW5jdGlvbiN0b1N0cmluZyBmb3IgY29ycmVjdCB3b3JrIHdyYXBwZWQgbWV0aG9kcyAvIGNvbnN0cnVjdG9ycyB3aXRoIG1ldGhvZHMgbGlrZSBMb0Rhc2ggaXNOYXRpdmVcbn0pKEZ1bmN0aW9uLnByb3RvdHlwZSwgJ3RvU3RyaW5nJywgZnVuY3Rpb24gdG9TdHJpbmcoKSB7XG4gIHJldHVybiB0eXBlb2YgdGhpcyA9PSAnZnVuY3Rpb24nICYmIGdldEludGVybmFsU3RhdGUodGhpcykuc291cmNlIHx8IG5hdGl2ZUZ1bmN0aW9uVG9TdHJpbmcuY2FsbCh0aGlzKTtcbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/redefine.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/regexp-exec-abstract.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var classof = __webpack_require__(/*! ./classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar regexpExec = __webpack_require__(/*! ./regexp-exec */ \"./node_modules/core-js/internals/regexp-exec.js\");\n\n// `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVnZXhwLWV4ZWMtYWJzdHJhY3QuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9yZWdleHAtZXhlYy1hYnN0cmFjdC5qcz8xNGMzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjbGFzc29mID0gcmVxdWlyZSgnLi9jbGFzc29mLXJhdycpO1xudmFyIHJlZ2V4cEV4ZWMgPSByZXF1aXJlKCcuL3JlZ2V4cC1leGVjJyk7XG5cbi8vIGBSZWdFeHBFeGVjYCBhYnN0cmFjdCBvcGVyYXRpb25cbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXJlZ2V4cGV4ZWNcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKFIsIFMpIHtcbiAgdmFyIGV4ZWMgPSBSLmV4ZWM7XG4gIGlmICh0eXBlb2YgZXhlYyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIHZhciByZXN1bHQgPSBleGVjLmNhbGwoUiwgUyk7XG4gICAgaWYgKHR5cGVvZiByZXN1bHQgIT09ICdvYmplY3QnKSB7XG4gICAgICB0aHJvdyBUeXBlRXJyb3IoJ1JlZ0V4cCBleGVjIG1ldGhvZCByZXR1cm5lZCBzb21ldGhpbmcgb3RoZXIgdGhhbiBhbiBPYmplY3Qgb3IgbnVsbCcpO1xuICAgIH1cbiAgICByZXR1cm4gcmVzdWx0O1xuICB9XG5cbiAgaWYgKGNsYXNzb2YoUikgIT09ICdSZWdFeHAnKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKCdSZWdFeHAjZXhlYyBjYWxsZWQgb24gaW5jb21wYXRpYmxlIHJlY2VpdmVyJyk7XG4gIH1cblxuICByZXR1cm4gcmVnZXhwRXhlYy5jYWxsKFIsIFMpO1xufTtcblxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/regexp-exec-abstract.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/regexp-exec.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/regexp-exec.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar regexpFlags = __webpack_require__(/*! ./regexp-flags */ \"./node_modules/core-js/internals/regexp-flags.js\");\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', regexpFlags.call(re));\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVnZXhwLWV4ZWMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9yZWdleHAtZXhlYy5qcz85MjYzIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciByZWdleHBGbGFncyA9IHJlcXVpcmUoJy4vcmVnZXhwLWZsYWdzJyk7XG5cbnZhciBuYXRpdmVFeGVjID0gUmVnRXhwLnByb3RvdHlwZS5leGVjO1xuLy8gVGhpcyBhbHdheXMgcmVmZXJzIHRvIHRoZSBuYXRpdmUgaW1wbGVtZW50YXRpb24sIGJlY2F1c2UgdGhlXG4vLyBTdHJpbmcjcmVwbGFjZSBwb2x5ZmlsbCB1c2VzIC4vZml4LXJlZ2V4cC13ZWxsLWtub3duLXN5bWJvbC1sb2dpYy5qcyxcbi8vIHdoaWNoIGxvYWRzIHRoaXMgZmlsZSBiZWZvcmUgcGF0Y2hpbmcgdGhlIG1ldGhvZC5cbnZhciBuYXRpdmVSZXBsYWNlID0gU3RyaW5nLnByb3RvdHlwZS5yZXBsYWNlO1xuXG52YXIgcGF0Y2hlZEV4ZWMgPSBuYXRpdmVFeGVjO1xuXG52YXIgVVBEQVRFU19MQVNUX0lOREVYX1dST05HID0gKGZ1bmN0aW9uICgpIHtcbiAgdmFyIHJlMSA9IC9hLztcbiAgdmFyIHJlMiA9IC9iKi9nO1xuICBuYXRpdmVFeGVjLmNhbGwocmUxLCAnYScpO1xuICBuYXRpdmVFeGVjLmNhbGwocmUyLCAnYScpO1xuICByZXR1cm4gcmUxLmxhc3RJbmRleCAhPT0gMCB8fCByZTIubGFzdEluZGV4ICE9PSAwO1xufSkoKTtcblxuLy8gbm9ucGFydGljaXBhdGluZyBjYXB0dXJpbmcgZ3JvdXAsIGNvcGllZCBmcm9tIGVzNS1zaGltJ3MgU3RyaW5nI3NwbGl0IHBhdGNoLlxudmFyIE5QQ0dfSU5DTFVERUQgPSAvKCk/Py8uZXhlYygnJylbMV0gIT09IHVuZGVmaW5lZDtcblxudmFyIFBBVENIID0gVVBEQVRFU19MQVNUX0lOREVYX1dST05HIHx8IE5QQ0dfSU5DTFVERUQ7XG5cbmlmIChQQVRDSCkge1xuICBwYXRjaGVkRXhlYyA9IGZ1bmN0aW9uIGV4ZWMoc3RyKSB7XG4gICAgdmFyIHJlID0gdGhpcztcbiAgICB2YXIgbGFzdEluZGV4LCByZUNvcHksIG1hdGNoLCBpO1xuXG4gICAgaWYgKE5QQ0dfSU5DTFVERUQpIHtcbiAgICAgIHJlQ29weSA9IG5ldyBSZWdFeHAoJ14nICsgcmUuc291cmNlICsgJyQoPyFcXFxccyknLCByZWdleHBGbGFncy5jYWxsKHJlKSk7XG4gICAgfVxuICAgIGlmIChVUERBVEVTX0xBU1RfSU5ERVhfV1JPTkcpIGxhc3RJbmRleCA9IHJlLmxhc3RJbmRleDtcblxuICAgIG1hdGNoID0gbmF0aXZlRXhlYy5jYWxsKHJlLCBzdHIpO1xuXG4gICAgaWYgKFVQREFURVNfTEFTVF9JTkRFWF9XUk9ORyAmJiBtYXRjaCkge1xuICAgICAgcmUubGFzdEluZGV4ID0gcmUuZ2xvYmFsID8gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGggOiBsYXN0SW5kZXg7XG4gICAgfVxuICAgIGlmIChOUENHX0lOQ0xVREVEICYmIG1hdGNoICYmIG1hdGNoLmxlbmd0aCA+IDEpIHtcbiAgICAgIC8vIEZpeCBicm93c2VycyB3aG9zZSBgZXhlY2AgbWV0aG9kcyBkb24ndCBjb25zaXN0ZW50bHkgcmV0dXJuIGB1bmRlZmluZWRgXG4gICAgICAvLyBmb3IgTlBDRywgbGlrZSBJRTguIE5PVEU6IFRoaXMgZG9lc24nIHdvcmsgZm9yIC8oLj8pPy9cbiAgICAgIG5hdGl2ZVJlcGxhY2UuY2FsbChtYXRjaFswXSwgcmVDb3B5LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGZvciAoaSA9IDE7IGkgPCBhcmd1bWVudHMubGVuZ3RoIC0gMjsgaSsrKSB7XG4gICAgICAgICAgaWYgKGFyZ3VtZW50c1tpXSA9PT0gdW5kZWZpbmVkKSBtYXRjaFtpXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hdGNoO1xuICB9O1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHBhdGNoZWRFeGVjO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/regexp-exec.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/regexp-flags.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/regexp-flags.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVnZXhwLWZsYWdzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVnZXhwLWZsYWdzLmpzP2FkNmQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xuXG4vLyBgUmVnRXhwLnByb3RvdHlwZS5mbGFnc2AgZ2V0dGVyIGltcGxlbWVudGF0aW9uXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1nZXQtcmVnZXhwLnByb3RvdHlwZS5mbGFnc1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoKSB7XG4gIHZhciB0aGF0ID0gYW5PYmplY3QodGhpcyk7XG4gIHZhciByZXN1bHQgPSAnJztcbiAgaWYgKHRoYXQuZ2xvYmFsKSByZXN1bHQgKz0gJ2cnO1xuICBpZiAodGhhdC5pZ25vcmVDYXNlKSByZXN1bHQgKz0gJ2knO1xuICBpZiAodGhhdC5tdWx0aWxpbmUpIHJlc3VsdCArPSAnbSc7XG4gIGlmICh0aGF0LnVuaWNvZGUpIHJlc3VsdCArPSAndSc7XG4gIGlmICh0aGF0LnN0aWNreSkgcmVzdWx0ICs9ICd5JztcbiAgcmV0dXJuIHJlc3VsdDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/regexp-flags.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/require-object-coercible.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/require-object-coercible.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlLmpzPzFkODAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gYFJlcXVpcmVPYmplY3RDb2VyY2libGVgIGFic3RyYWN0IG9wZXJhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtcmVxdWlyZW9iamVjdGNvZXJjaWJsZVxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKGl0ID09IHVuZGVmaW5lZCkgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3QgY2FsbCBtZXRob2Qgb24gXCIgKyBpdCk7XG4gIHJldHVybiBpdDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/require-object-coercible.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/same-value.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/same-value.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// `SameValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2FtZS12YWx1ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NhbWUtdmFsdWUuanM/MTI5ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBgU2FtZVZhbHVlYCBhYnN0cmFjdCBvcGVyYXRpb25cbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXNhbWV2YWx1ZVxubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QuaXMgfHwgZnVuY3Rpb24gaXMoeCwgeSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tc2VsZi1jb21wYXJlXG4gIHJldHVybiB4ID09PSB5ID8geCAhPT0gMCB8fCAxIC8geCA9PT0gMSAvIHkgOiB4ICE9IHggJiYgeSAhPSB5O1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/same-value.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/set-global.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/set-global.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\n\nmodule.exports = function (key, value) {\n try {\n hide(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2V0LWdsb2JhbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NldC1nbG9iYWwuanM/Y2U0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dsb2JhbCcpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZScpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XG4gIHRyeSB7XG4gICAgaGlkZShnbG9iYWwsIGtleSwgdmFsdWUpO1xuICB9IGNhdGNoIChlcnJvcikge1xuICAgIGdsb2JhbFtrZXldID0gdmFsdWU7XG4gIH0gcmV0dXJuIHZhbHVlO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/set-global.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/set-species.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/set-species.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var C = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n if (DESCRIPTORS && C && !C[SPECIES]) defineProperty(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2V0LXNwZWNpZXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9zZXQtc3BlY2llcy5qcz8yNjI2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBnZXRCdWlsdEluID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dldC1idWlsdC1pbicpO1xudmFyIGRlZmluZVByb3BlcnR5TW9kdWxlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL29iamVjdC1kZWZpbmUtcHJvcGVydHknKTtcbnZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcbnZhciBERVNDUklQVE9SUyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9kZXNjcmlwdG9ycycpO1xuXG52YXIgU1BFQ0lFUyA9IHdlbGxLbm93blN5bWJvbCgnc3BlY2llcycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChDT05TVFJVQ1RPUl9OQU1FKSB7XG4gIHZhciBDID0gZ2V0QnVpbHRJbihDT05TVFJVQ1RPUl9OQU1FKTtcbiAgdmFyIGRlZmluZVByb3BlcnR5ID0gZGVmaW5lUHJvcGVydHlNb2R1bGUuZjtcbiAgaWYgKERFU0NSSVBUT1JTICYmIEMgJiYgIUNbU1BFQ0lFU10pIGRlZmluZVByb3BlcnR5KEMsIFNQRUNJRVMsIHtcbiAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9XG4gIH0pO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/set-species.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/set-to-string-tag.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/set-to-string-tag.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f;\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js/internals/has.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2V0LXRvLXN0cmluZy10YWcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9zZXQtdG8tc3RyaW5nLXRhZy5qcz9kNDRlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnR5JykuZjtcbnZhciBoYXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGFzJyk7XG52YXIgd2VsbEtub3duU3ltYm9sID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3dlbGwta25vd24tc3ltYm9sJyk7XG5cbnZhciBUT19TVFJJTkdfVEFHID0gd2VsbEtub3duU3ltYm9sKCd0b1N0cmluZ1RhZycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgVEFHLCBTVEFUSUMpIHtcbiAgaWYgKGl0ICYmICFoYXMoaXQgPSBTVEFUSUMgPyBpdCA6IGl0LnByb3RvdHlwZSwgVE9fU1RSSU5HX1RBRykpIHtcbiAgICBkZWZpbmVQcm9wZXJ0eShpdCwgVE9fU1RSSU5HX1RBRywgeyBjb25maWd1cmFibGU6IHRydWUsIHZhbHVlOiBUQUcgfSk7XG4gIH1cbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/set-to-string-tag.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/shared-key.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/shared-key.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.js\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js/internals/uid.js\");\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2hhcmVkLWtleS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC1rZXkuanM/Zjc3MiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgc2hhcmVkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3NoYXJlZCcpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy91aWQnKTtcblxudmFyIGtleXMgPSBzaGFyZWQoJ2tleXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiBrZXlzW2tleV0gfHwgKGtleXNba2V5XSA9IHVpZChrZXkpKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/shared-key.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/shared.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/shared.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar setGlobal = __webpack_require__(/*! ../internals/set-global */ \"./node_modules/core-js/internals/set-global.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.1.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2hhcmVkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc2hhcmVkLmpzPzU2OTIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcbnZhciBzZXRHbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2V0LWdsb2JhbCcpO1xudmFyIElTX1BVUkUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtcHVyZScpO1xuXG52YXIgU0hBUkVEID0gJ19fY29yZS1qc19zaGFyZWRfXyc7XG52YXIgc3RvcmUgPSBnbG9iYWxbU0hBUkVEXSB8fCBzZXRHbG9iYWwoU0hBUkVELCB7fSk7XG5cbihtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XG4gIHJldHVybiBzdG9yZVtrZXldIHx8IChzdG9yZVtrZXldID0gdmFsdWUgIT09IHVuZGVmaW5lZCA/IHZhbHVlIDoge30pO1xufSkoJ3ZlcnNpb25zJywgW10pLnB1c2goe1xuICB2ZXJzaW9uOiAnMy4xLjMnLFxuICBtb2RlOiBJU19QVVJFID8gJ3B1cmUnIDogJ2dsb2JhbCcsXG4gIGNvcHlyaWdodDogJ8KpIDIwMTkgRGVuaXMgUHVzaGthcmV2ICh6bG9pcm9jay5ydSknXG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/shared.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/species-constructor.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/species-constructor.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js/internals/a-function.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc3BlY2llcy1jb25zdHJ1Y3Rvci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NwZWNpZXMtY29uc3RydWN0b3IuanM/NDg0MCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYW4tb2JqZWN0Jyk7XG52YXIgYUZ1bmN0aW9uID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2EtZnVuY3Rpb24nKTtcbnZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcblxudmFyIFNQRUNJRVMgPSB3ZWxsS25vd25TeW1ib2woJ3NwZWNpZXMnKTtcblxuLy8gYFNwZWNpZXNDb25zdHJ1Y3RvcmAgYWJzdHJhY3Qgb3BlcmF0aW9uXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zcGVjaWVzY29uc3RydWN0b3Jcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE8sIGRlZmF1bHRDb25zdHJ1Y3Rvcikge1xuICB2YXIgQyA9IGFuT2JqZWN0KE8pLmNvbnN0cnVjdG9yO1xuICB2YXIgUztcbiAgcmV0dXJuIEMgPT09IHVuZGVmaW5lZCB8fCAoUyA9IGFuT2JqZWN0KEMpW1NQRUNJRVNdKSA9PSB1bmRlZmluZWQgPyBkZWZhdWx0Q29uc3RydWN0b3IgOiBhRnVuY3Rpb24oUyk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/species-constructor.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/string-at.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/string-at.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js/internals/to-integer.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\n// CONVERT_TO_STRING: true -> String#at\n// CONVERT_TO_STRING: false -> String#codePointAt\nmodule.exports = function (that, pos, CONVERT_TO_STRING) {\n var S = String(requireObjectCoercible(that));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc3RyaW5nLWF0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc3RyaW5nLWF0LmpzP2U1ZDUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1pbnRlZ2VyJyk7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUnKTtcblxuLy8gQ09OVkVSVF9UT19TVFJJTkc6IHRydWUgIC0+IFN0cmluZyNhdFxuLy8gQ09OVkVSVF9UT19TVFJJTkc6IGZhbHNlIC0+IFN0cmluZyNjb2RlUG9pbnRBdFxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgcG9zLCBDT05WRVJUX1RPX1NUUklORykge1xuICB2YXIgUyA9IFN0cmluZyhyZXF1aXJlT2JqZWN0Q29lcmNpYmxlKHRoYXQpKTtcbiAgdmFyIHBvc2l0aW9uID0gdG9JbnRlZ2VyKHBvcyk7XG4gIHZhciBzaXplID0gUy5sZW5ndGg7XG4gIHZhciBmaXJzdCwgc2Vjb25kO1xuICBpZiAocG9zaXRpb24gPCAwIHx8IHBvc2l0aW9uID49IHNpemUpIHJldHVybiBDT05WRVJUX1RPX1NUUklORyA/ICcnIDogdW5kZWZpbmVkO1xuICBmaXJzdCA9IFMuY2hhckNvZGVBdChwb3NpdGlvbik7XG4gIHJldHVybiBmaXJzdCA8IDB4RDgwMCB8fCBmaXJzdCA+IDB4REJGRiB8fCBwb3NpdGlvbiArIDEgPT09IHNpemVcbiAgICB8fCAoc2Vjb25kID0gUy5jaGFyQ29kZUF0KHBvc2l0aW9uICsgMSkpIDwgMHhEQzAwIHx8IHNlY29uZCA+IDB4REZGRlxuICAgICAgPyBDT05WRVJUX1RPX1NUUklORyA/IFMuY2hhckF0KHBvc2l0aW9uKSA6IGZpcnN0XG4gICAgICA6IENPTlZFUlRfVE9fU1RSSU5HID8gUy5zbGljZShwb3NpdGlvbiwgcG9zaXRpb24gKyAyKSA6IChmaXJzdCAtIDB4RDgwMCA8PCAxMCkgKyAoc2Vjb25kIC0gMHhEQzAwKSArIDB4MTAwMDA7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/string-at.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/string-pad.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/string-pad.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar repeat = __webpack_require__(/*! ../internals/string-repeat */ \"./node_modules/core-js/internals/string-repeat.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(requireObjectCoercible(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc3RyaW5nLXBhZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3N0cmluZy1wYWQuanM/MGNjYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9wcm9wb3NhbC1zdHJpbmctcGFkLXN0YXJ0LWVuZFxudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWxlbmd0aCcpO1xudmFyIHJlcGVhdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zdHJpbmctcmVwZWF0Jyk7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgbWF4TGVuZ3RoLCBmaWxsU3RyaW5nLCBsZWZ0KSB7XG4gIHZhciBTID0gU3RyaW5nKHJlcXVpcmVPYmplY3RDb2VyY2libGUodGhhdCkpO1xuICB2YXIgc3RyaW5nTGVuZ3RoID0gUy5sZW5ndGg7XG4gIHZhciBmaWxsU3RyID0gZmlsbFN0cmluZyA9PT0gdW5kZWZpbmVkID8gJyAnIDogU3RyaW5nKGZpbGxTdHJpbmcpO1xuICB2YXIgaW50TWF4TGVuZ3RoID0gdG9MZW5ndGgobWF4TGVuZ3RoKTtcbiAgdmFyIGZpbGxMZW4sIHN0cmluZ0ZpbGxlcjtcbiAgaWYgKGludE1heExlbmd0aCA8PSBzdHJpbmdMZW5ndGggfHwgZmlsbFN0ciA9PSAnJykgcmV0dXJuIFM7XG4gIGZpbGxMZW4gPSBpbnRNYXhMZW5ndGggLSBzdHJpbmdMZW5ndGg7XG4gIHN0cmluZ0ZpbGxlciA9IHJlcGVhdC5jYWxsKGZpbGxTdHIsIE1hdGguY2VpbChmaWxsTGVuIC8gZmlsbFN0ci5sZW5ndGgpKTtcbiAgaWYgKHN0cmluZ0ZpbGxlci5sZW5ndGggPiBmaWxsTGVuKSBzdHJpbmdGaWxsZXIgPSBzdHJpbmdGaWxsZXIuc2xpY2UoMCwgZmlsbExlbik7XG4gIHJldHVybiBsZWZ0ID8gc3RyaW5nRmlsbGVyICsgUyA6IFMgKyBzdHJpbmdGaWxsZXI7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/string-pad.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/string-repeat.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/string-repeat.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js/internals/to-integer.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\n// `String.prototype.repeat` method implementation\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\nmodule.exports = ''.repeat || function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc3RyaW5nLXJlcGVhdC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3N0cmluZy1yZXBlYXQuanM/MTE0OCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgdG9JbnRlZ2VyID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWludGVnZXInKTtcbnZhciByZXF1aXJlT2JqZWN0Q29lcmNpYmxlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3JlcXVpcmUtb2JqZWN0LWNvZXJjaWJsZScpO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5yZXBlYXRgIG1ldGhvZCBpbXBsZW1lbnRhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtc3RyaW5nLnByb3RvdHlwZS5yZXBlYXRcbm1vZHVsZS5leHBvcnRzID0gJycucmVwZWF0IHx8IGZ1bmN0aW9uIHJlcGVhdChjb3VudCkge1xuICB2YXIgc3RyID0gU3RyaW5nKHJlcXVpcmVPYmplY3RDb2VyY2libGUodGhpcykpO1xuICB2YXIgcmVzdWx0ID0gJyc7XG4gIHZhciBuID0gdG9JbnRlZ2VyKGNvdW50KTtcbiAgaWYgKG4gPCAwIHx8IG4gPT0gSW5maW5pdHkpIHRocm93IFJhbmdlRXJyb3IoJ1dyb25nIG51bWJlciBvZiByZXBldGl0aW9ucycpO1xuICBmb3IgKDtuID4gMDsgKG4gPj4+PSAxKSAmJiAoc3RyICs9IHN0cikpIGlmIChuICYgMSkgcmVzdWx0ICs9IHN0cjtcbiAgcmV0dXJuIHJlc3VsdDtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/string-repeat.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/string-trim.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/string-trim.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar whitespaces = __webpack_require__(/*! ../internals/whitespaces */ \"./node_modules/core-js/internals/whitespaces.js\");\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// 1 -> String#trimStart\n// 2 -> String#trimEnd\n// 3 -> String#trim\nmodule.exports = function (string, TYPE) {\n string = String(requireObjectCoercible(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvc3RyaW5nLXRyaW0uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9zdHJpbmctdHJpbS5qcz81OGE4Il0sInNvdXJjZXNDb250ZW50IjpbInZhciByZXF1aXJlT2JqZWN0Q29lcmNpYmxlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3JlcXVpcmUtb2JqZWN0LWNvZXJjaWJsZScpO1xudmFyIHdoaXRlc3BhY2VzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3doaXRlc3BhY2VzJyk7XG5cbnZhciB3aGl0ZXNwYWNlID0gJ1snICsgd2hpdGVzcGFjZXMgKyAnXSc7XG52YXIgbHRyaW0gPSBSZWdFeHAoJ14nICsgd2hpdGVzcGFjZSArIHdoaXRlc3BhY2UgKyAnKicpO1xudmFyIHJ0cmltID0gUmVnRXhwKHdoaXRlc3BhY2UgKyB3aGl0ZXNwYWNlICsgJyokJyk7XG5cbi8vIDEgLT4gU3RyaW5nI3RyaW1TdGFydFxuLy8gMiAtPiBTdHJpbmcjdHJpbUVuZFxuLy8gMyAtPiBTdHJpbmcjdHJpbVxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoc3RyaW5nLCBUWVBFKSB7XG4gIHN0cmluZyA9IFN0cmluZyhyZXF1aXJlT2JqZWN0Q29lcmNpYmxlKHN0cmluZykpO1xuICBpZiAoVFlQRSAmIDEpIHN0cmluZyA9IHN0cmluZy5yZXBsYWNlKGx0cmltLCAnJyk7XG4gIGlmIChUWVBFICYgMikgc3RyaW5nID0gc3RyaW5nLnJlcGxhY2UocnRyaW0sICcnKTtcbiAgcmV0dXJuIHN0cmluZztcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/string-trim.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/task.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/task.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar bind = __webpack_require__(/*! ../internals/bind-context */ \"./node_modules/core-js/internals/bind-context.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && !fails(post)) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdGFzay5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3Rhc2suanM/MmNmNCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dsb2JhbCcpO1xudmFyIGZhaWxzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZhaWxzJyk7XG52YXIgY2xhc3NvZiA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jbGFzc29mLXJhdycpO1xudmFyIGJpbmQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYmluZC1jb250ZXh0Jyk7XG52YXIgaHRtbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9odG1sJyk7XG52YXIgY3JlYXRlRWxlbWVudCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9kb2N1bWVudC1jcmVhdGUtZWxlbWVudCcpO1xuXG52YXIgbG9jYXRpb24gPSBnbG9iYWwubG9jYXRpb247XG52YXIgc2V0ID0gZ2xvYmFsLnNldEltbWVkaWF0ZTtcbnZhciBjbGVhciA9IGdsb2JhbC5jbGVhckltbWVkaWF0ZTtcbnZhciBwcm9jZXNzID0gZ2xvYmFsLnByb2Nlc3M7XG52YXIgTWVzc2FnZUNoYW5uZWwgPSBnbG9iYWwuTWVzc2FnZUNoYW5uZWw7XG52YXIgRGlzcGF0Y2ggPSBnbG9iYWwuRGlzcGF0Y2g7XG52YXIgY291bnRlciA9IDA7XG52YXIgcXVldWUgPSB7fTtcbnZhciBPTlJFQURZU1RBVEVDSEFOR0UgPSAnb25yZWFkeXN0YXRlY2hhbmdlJztcbnZhciBkZWZlciwgY2hhbm5lbCwgcG9ydDtcblxudmFyIHJ1biA9IGZ1bmN0aW9uIChpZCkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tcHJvdG90eXBlLWJ1aWx0aW5zXG4gIGlmIChxdWV1ZS5oYXNPd25Qcm9wZXJ0eShpZCkpIHtcbiAgICB2YXIgZm4gPSBxdWV1ZVtpZF07XG4gICAgZGVsZXRlIHF1ZXVlW2lkXTtcbiAgICBmbigpO1xuICB9XG59O1xuXG52YXIgcnVubmVyID0gZnVuY3Rpb24gKGlkKSB7XG4gIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgcnVuKGlkKTtcbiAgfTtcbn07XG5cbnZhciBsaXN0ZW5lciA9IGZ1bmN0aW9uIChldmVudCkge1xuICBydW4oZXZlbnQuZGF0YSk7XG59O1xuXG52YXIgcG9zdCA9IGZ1bmN0aW9uIChpZCkge1xuICAvLyBvbGQgZW5naW5lcyBoYXZlIG5vdCBsb2NhdGlvbi5vcmlnaW5cbiAgZ2xvYmFsLnBvc3RNZXNzYWdlKGlkICsgJycsIGxvY2F0aW9uLnByb3RvY29sICsgJy8vJyArIGxvY2F0aW9uLmhvc3QpO1xufTtcblxuLy8gTm9kZS5qcyAwLjkrICYgSUUxMCsgaGFzIHNldEltbWVkaWF0ZSwgb3RoZXJ3aXNlOlxuaWYgKCFzZXQgfHwgIWNsZWFyKSB7XG4gIHNldCA9IGZ1bmN0aW9uIHNldEltbWVkaWF0ZShmbikge1xuICAgIHZhciBhcmdzID0gW107XG4gICAgdmFyIGkgPSAxO1xuICAgIHdoaWxlIChhcmd1bWVudHMubGVuZ3RoID4gaSkgYXJncy5wdXNoKGFyZ3VtZW50c1tpKytdKTtcbiAgICBxdWV1ZVsrK2NvdW50ZXJdID0gZnVuY3Rpb24gKCkge1xuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLW5ldy1mdW5jXG4gICAgICAodHlwZW9mIGZuID09ICdmdW5jdGlvbicgPyBmbiA6IEZ1bmN0aW9uKGZuKSkuYXBwbHkodW5kZWZpbmVkLCBhcmdzKTtcbiAgICB9O1xuICAgIGRlZmVyKGNvdW50ZXIpO1xuICAgIHJldHVybiBjb3VudGVyO1xuICB9O1xuICBjbGVhciA9IGZ1bmN0aW9uIGNsZWFySW1tZWRpYXRlKGlkKSB7XG4gICAgZGVsZXRlIHF1ZXVlW2lkXTtcbiAgfTtcbiAgLy8gTm9kZS5qcyAwLjgtXG4gIGlmIChjbGFzc29mKHByb2Nlc3MpID09ICdwcm9jZXNzJykge1xuICAgIGRlZmVyID0gZnVuY3Rpb24gKGlkKSB7XG4gICAgICBwcm9jZXNzLm5leHRUaWNrKHJ1bm5lcihpZCkpO1xuICAgIH07XG4gIC8vIFNwaGVyZSAoSlMgZ2FtZSBlbmdpbmUpIERpc3BhdGNoIEFQSVxuICB9IGVsc2UgaWYgKERpc3BhdGNoICYmIERpc3BhdGNoLm5vdykge1xuICAgIGRlZmVyID0gZnVuY3Rpb24gKGlkKSB7XG4gICAgICBEaXNwYXRjaC5ub3cocnVubmVyKGlkKSk7XG4gICAgfTtcbiAgLy8gQnJvd3NlcnMgd2l0aCBNZXNzYWdlQ2hhbm5lbCwgaW5jbHVkZXMgV2ViV29ya2Vyc1xuICB9IGVsc2UgaWYgKE1lc3NhZ2VDaGFubmVsKSB7XG4gICAgY2hhbm5lbCA9IG5ldyBNZXNzYWdlQ2hhbm5lbCgpO1xuICAgIHBvcnQgPSBjaGFubmVsLnBvcnQyO1xuICAgIGNoYW5uZWwucG9ydDEub25tZXNzYWdlID0gbGlzdGVuZXI7XG4gICAgZGVmZXIgPSBiaW5kKHBvcnQucG9zdE1lc3NhZ2UsIHBvcnQsIDEpO1xuICAvLyBCcm93c2VycyB3aXRoIHBvc3RNZXNzYWdlLCBza2lwIFdlYldvcmtlcnNcbiAgLy8gSUU4IGhhcyBwb3N0TWVzc2FnZSwgYnV0IGl0J3Mgc3luYyAmIHR5cGVvZiBpdHMgcG9zdE1lc3NhZ2UgaXMgJ29iamVjdCdcbiAgfSBlbHNlIGlmIChnbG9iYWwuYWRkRXZlbnRMaXN0ZW5lciAmJiB0eXBlb2YgcG9zdE1lc3NhZ2UgPT0gJ2Z1bmN0aW9uJyAmJiAhZ2xvYmFsLmltcG9ydFNjcmlwdHMgJiYgIWZhaWxzKHBvc3QpKSB7XG4gICAgZGVmZXIgPSBwb3N0O1xuICAgIGdsb2JhbC5hZGRFdmVudExpc3RlbmVyKCdtZXNzYWdlJywgbGlzdGVuZXIsIGZhbHNlKTtcbiAgLy8gSUU4LVxuICB9IGVsc2UgaWYgKE9OUkVBRFlTVEFURUNIQU5HRSBpbiBjcmVhdGVFbGVtZW50KCdzY3JpcHQnKSkge1xuICAgIGRlZmVyID0gZnVuY3Rpb24gKGlkKSB7XG4gICAgICBodG1sLmFwcGVuZENoaWxkKGNyZWF0ZUVsZW1lbnQoJ3NjcmlwdCcpKVtPTlJFQURZU1RBVEVDSEFOR0VdID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBodG1sLnJlbW92ZUNoaWxkKHRoaXMpO1xuICAgICAgICBydW4oaWQpO1xuICAgICAgfTtcbiAgICB9O1xuICAvLyBSZXN0IG9sZCBicm93c2Vyc1xuICB9IGVsc2Uge1xuICAgIGRlZmVyID0gZnVuY3Rpb24gKGlkKSB7XG4gICAgICBzZXRUaW1lb3V0KHJ1bm5lcihpZCksIDApO1xuICAgIH07XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIHNldDogc2V0LFxuICBjbGVhcjogY2xlYXJcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/task.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/to-absolute-index.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-absolute-index.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js/internals/to-integer.js\");\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tYWJzb2x1dGUtaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy90by1hYnNvbHV0ZS1pbmRleC5qcz8yM2NiIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvdG8taW50ZWdlcicpO1xuXG52YXIgbWF4ID0gTWF0aC5tYXg7XG52YXIgbWluID0gTWF0aC5taW47XG5cbi8vIEhlbHBlciBmb3IgYSBwb3B1bGFyIHJlcGVhdGluZyBjYXNlIG9mIHRoZSBzcGVjOlxuLy8gTGV0IGludGVnZXIgYmUgPyBUb0ludGVnZXIoaW5kZXgpLlxuLy8gSWYgaW50ZWdlciA8IDAsIGxldCByZXN1bHQgYmUgbWF4KChsZW5ndGggKyBpbnRlZ2VyKSwgMCk7IGVsc2UgbGV0IHJlc3VsdCBiZSBtaW4obGVuZ3RoLCBsZW5ndGgpLlxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaW5kZXgsIGxlbmd0aCkge1xuICB2YXIgaW50ZWdlciA9IHRvSW50ZWdlcihpbmRleCk7XG4gIHJldHVybiBpbnRlZ2VyIDwgMCA/IG1heChpbnRlZ2VyICsgbGVuZ3RoLCAwKSA6IG1pbihpbnRlZ2VyLCBsZW5ndGgpO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/to-absolute-index.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/to-indexed-object.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-indexed-object.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ \"./node_modules/core-js/internals/indexed-object.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy90by1pbmRleGVkLW9iamVjdC5qcz9mYzZhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIHRvT2JqZWN0IHdpdGggZmFsbGJhY2sgZm9yIG5vbi1hcnJheS1saWtlIEVTMyBzdHJpbmdzXG52YXIgSW5kZXhlZE9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pbmRleGVkLW9iamVjdCcpO1xudmFyIHJlcXVpcmVPYmplY3RDb2VyY2libGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBJbmRleGVkT2JqZWN0KHJlcXVpcmVPYmplY3RDb2VyY2libGUoaXQpKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/to-indexed-object.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/to-integer.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/to-integer.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW50ZWdlci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3RvLWludGVnZXIuanM/YTY5MSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5cbi8vIGBUb0ludGVnZXJgIGFic3RyYWN0IG9wZXJhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtdG9pbnRlZ2VyXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChhcmd1bWVudCkge1xuICByZXR1cm4gaXNOYU4oYXJndW1lbnQgPSArYXJndW1lbnQpID8gMCA6IChhcmd1bWVudCA+IDAgPyBmbG9vciA6IGNlaWwpKGFyZ3VtZW50KTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/to-integer.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/to-length.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-length.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js/internals/to-integer.js\");\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tbGVuZ3RoLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tbGVuZ3RoLmpzPzUwYzQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1pbnRlZ2VyJyk7XG5cbnZhciBtaW4gPSBNYXRoLm1pbjtcblxuLy8gYFRvTGVuZ3RoYCBhYnN0cmFjdCBvcGVyYXRpb25cbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXRvbGVuZ3RoXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChhcmd1bWVudCkge1xuICByZXR1cm4gYXJndW1lbnQgPiAwID8gbWluKHRvSW50ZWdlcihhcmd1bWVudCksIDB4MUZGRkZGRkZGRkZGRkYpIDogMDsgLy8gMiAqKiA1MyAtIDEgPT0gOTAwNzE5OTI1NDc0MDk5MVxufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/to-length.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/to-object.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-object.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tb2JqZWN0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tb2JqZWN0LmpzPzdiMGIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHJlcXVpcmVPYmplY3RDb2VyY2libGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlJyk7XG5cbi8vIGBUb09iamVjdGAgYWJzdHJhY3Qgb3BlcmF0aW9uXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy10b29iamVjdFxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYXJndW1lbnQpIHtcbiAgcmV0dXJuIE9iamVjdChyZXF1aXJlT2JqZWN0Q29lcmNpYmxlKGFyZ3VtZW50KSk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/to-object.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/to-primitive.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/to-primitive.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\n// 7.1.1 ToPrimitive(input [, PreferredType])\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tcHJpbWl0aXZlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tcHJpbWl0aXZlLmpzP2MwNGUiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLW9iamVjdCcpO1xuXG4vLyA3LjEuMSBUb1ByaW1pdGl2ZShpbnB1dCBbLCBQcmVmZXJyZWRUeXBlXSlcbi8vIGluc3RlYWQgb2YgdGhlIEVTNiBzcGVjIHZlcnNpb24sIHdlIGRpZG4ndCBpbXBsZW1lbnQgQEB0b1ByaW1pdGl2ZSBjYXNlXG4vLyBhbmQgdGhlIHNlY29uZCBhcmd1bWVudCAtIGZsYWcgLSBwcmVmZXJyZWQgdHlwZSBpcyBhIHN0cmluZ1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQsIFMpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHJldHVybiBpdDtcbiAgdmFyIGZuLCB2YWw7XG4gIGlmIChTICYmIHR5cGVvZiAoZm4gPSBpdC50b1N0cmluZykgPT0gJ2Z1bmN0aW9uJyAmJiAhaXNPYmplY3QodmFsID0gZm4uY2FsbChpdCkpKSByZXR1cm4gdmFsO1xuICBpZiAodHlwZW9mIChmbiA9IGl0LnZhbHVlT2YpID09ICdmdW5jdGlvbicgJiYgIWlzT2JqZWN0KHZhbCA9IGZuLmNhbGwoaXQpKSkgcmV0dXJuIHZhbDtcbiAgaWYgKCFTICYmIHR5cGVvZiAoZm4gPSBpdC50b1N0cmluZykgPT0gJ2Z1bmN0aW9uJyAmJiAhaXNPYmplY3QodmFsID0gZm4uY2FsbChpdCkpKSByZXR1cm4gdmFsO1xuICB0aHJvdyBUeXBlRXJyb3IoXCJDYW4ndCBjb252ZXJ0IG9iamVjdCB0byBwcmltaXRpdmUgdmFsdWVcIik7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/to-primitive.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/uid.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/internals/uid.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdWlkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdWlkLmpzPzkwZTMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGlkID0gMDtcbnZhciBwb3N0Zml4ID0gTWF0aC5yYW5kb20oKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiAnU3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcG9zdGZpeCkudG9TdHJpbmcoMzYpKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/uid.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/user-agent.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/user-agent.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdXNlci1hZ2VudC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3VzZXItYWdlbnQuanM/YjM5YSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dsb2JhbCcpO1xuXG52YXIgbmF2aWdhdG9yID0gZ2xvYmFsLm5hdmlnYXRvcjtcblxubW9kdWxlLmV4cG9ydHMgPSBuYXZpZ2F0b3IgJiYgbmF2aWdhdG9yLnVzZXJBZ2VudCB8fCAnJztcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/user-agent.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/core-js/internals/validate-set-prototype-of-arguments.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\n\nmodule.exports = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) {\n throw TypeError(\"Can't set \" + String(proto) + ' as a prototype');\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdmFsaWRhdGUtc2V0LXByb3RvdHlwZS1vZi1hcmd1bWVudHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy92YWxpZGF0ZS1zZXQtcHJvdG90eXBlLW9mLWFyZ3VtZW50cy5qcz8yZTFhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pcy1vYmplY3QnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9hbi1vYmplY3QnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoTywgcHJvdG8pIHtcbiAgYW5PYmplY3QoTyk7XG4gIGlmICghaXNPYmplY3QocHJvdG8pICYmIHByb3RvICE9PSBudWxsKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3Qgc2V0IFwiICsgU3RyaW5nKHByb3RvKSArICcgYXMgYSBwcm90b3R5cGUnKTtcbiAgfVxufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/validate-set-prototype-of-arguments.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/validate-string-method-arguments.js": +/*!****************************************************************************!*\ + !*** ./node_modules/core-js/internals/validate-string-method-arguments.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = __webpack_require__(/*! ../internals/is-regexp */ \"./node_modules/core-js/internals/is-regexp.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) {\n throw TypeError('String.prototype.' + NAME + \" doesn't accept regex\");\n } return String(requireObjectCoercible(that));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdmFsaWRhdGUtc3RyaW5nLW1ldGhvZC1hcmd1bWVudHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy92YWxpZGF0ZS1zdHJpbmctbWV0aG9kLWFyZ3VtZW50cy5qcz8zNDBlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGhlbHBlciBmb3IgU3RyaW5nI3tzdGFydHNXaXRoLCBlbmRzV2l0aCwgaW5jbHVkZXN9XG52YXIgaXNSZWdFeHAgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtcmVnZXhwJyk7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAodGhhdCwgc2VhcmNoU3RyaW5nLCBOQU1FKSB7XG4gIGlmIChpc1JlZ0V4cChzZWFyY2hTdHJpbmcpKSB7XG4gICAgdGhyb3cgVHlwZUVycm9yKCdTdHJpbmcucHJvdG90eXBlLicgKyBOQU1FICsgXCIgZG9lc24ndCBhY2NlcHQgcmVnZXhcIik7XG4gIH0gcmV0dXJuIFN0cmluZyhyZXF1aXJlT2JqZWN0Q29lcmNpYmxlKHRoYXQpKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/validate-string-method-arguments.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/webkit-string-pad-bug.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/webkit-string-pad-bug.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// https://github.com/zloirock/core-js/issues/280\nvar userAgent = __webpack_require__(/*! ../internals/user-agent */ \"./node_modules/core-js/internals/user-agent.js\");\n\n// eslint-disable-next-line unicorn/no-unsafe-regex\nmodule.exports = /Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(userAgent);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2Via2l0LXN0cmluZy1wYWQtYnVnLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2Via2l0LXN0cmluZy1wYWQtYnVnLmpzPzY5OWMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvaXNzdWVzLzI4MFxudmFyIHVzZXJBZ2VudCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy91c2VyLWFnZW50Jyk7XG5cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSB1bmljb3JuL25vLXVuc2FmZS1yZWdleFxubW9kdWxlLmV4cG9ydHMgPSAvVmVyc2lvblxcLzEwXFwuXFxkKyhcXC5cXGQrKT8oIE1vYmlsZVxcL1xcdyspPyBTYWZhcmlcXC8vLnRlc3QodXNlckFnZW50KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/webkit-string-pad-bug.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/well-known-symbol.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/well-known-symbol.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.js\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js/internals/uid.js\");\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ \"./node_modules/core-js/internals/native-symbol.js\");\n\nvar Symbol = global.Symbol;\nvar store = shared('wks');\n\nmodule.exports = function (name) {\n return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]\n || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbC5qcz9iNjIyIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZ2xvYmFsJyk7XG52YXIgc2hhcmVkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3NoYXJlZCcpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy91aWQnKTtcbnZhciBOQVRJVkVfU1lNQk9MID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL25hdGl2ZS1zeW1ib2wnKTtcblxudmFyIFN5bWJvbCA9IGdsb2JhbC5TeW1ib2w7XG52YXIgc3RvcmUgPSBzaGFyZWQoJ3drcycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gIHJldHVybiBzdG9yZVtuYW1lXSB8fCAoc3RvcmVbbmFtZV0gPSBOQVRJVkVfU1lNQk9MICYmIFN5bWJvbFtuYW1lXVxuICAgIHx8IChOQVRJVkVfU1lNQk9MID8gU3ltYm9sIDogdWlkKSgnU3ltYm9sLicgKyBuYW1lKSk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/well-known-symbol.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/whitespaces.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/whitespaces.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2hpdGVzcGFjZXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy93aGl0ZXNwYWNlcy5qcz81ODk5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGEgc3RyaW5nIG9mIGFsbCB2YWxpZCB1bmljb2RlIHdoaXRlc3BhY2VzXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbWF4LWxlblxubW9kdWxlLmV4cG9ydHMgPSAnXFx1MDAwOVxcdTAwMEFcXHUwMDBCXFx1MDAwQ1xcdTAwMERcXHUwMDIwXFx1MDBBMFxcdTE2ODBcXHUyMDAwXFx1MjAwMVxcdTIwMDJcXHUyMDAzXFx1MjAwNFxcdTIwMDVcXHUyMDA2XFx1MjAwN1xcdTIwMDhcXHUyMDA5XFx1MjAwQVxcdTIwMkZcXHUyMDVGXFx1MzAwMFxcdTIwMjhcXHUyMDI5XFx1RkVGRic7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/internals/whitespaces.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.array.iterator.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.iterator.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js/internals/add-to-unscopables.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar defineIterator = __webpack_require__(/*! ../internals/define-iterator */ \"./node_modules/core-js/internals/define-iterator.js\");\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLmFycmF5Lml0ZXJhdG9yLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLmFycmF5Lml0ZXJhdG9yLmpzP2UyNjAiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIHRvSW5kZXhlZE9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1pbmRleGVkLW9iamVjdCcpO1xudmFyIGFkZFRvVW5zY29wYWJsZXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYWRkLXRvLXVuc2NvcGFibGVzJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2l0ZXJhdG9ycycpO1xudmFyIEludGVybmFsU3RhdGVNb2R1bGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaW50ZXJuYWwtc3RhdGUnKTtcbnZhciBkZWZpbmVJdGVyYXRvciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9kZWZpbmUtaXRlcmF0b3InKTtcblxudmFyIEFSUkFZX0lURVJBVE9SID0gJ0FycmF5IEl0ZXJhdG9yJztcbnZhciBzZXRJbnRlcm5hbFN0YXRlID0gSW50ZXJuYWxTdGF0ZU1vZHVsZS5zZXQ7XG52YXIgZ2V0SW50ZXJuYWxTdGF0ZSA9IEludGVybmFsU3RhdGVNb2R1bGUuZ2V0dGVyRm9yKEFSUkFZX0lURVJBVE9SKTtcblxuLy8gYEFycmF5LnByb3RvdHlwZS5lbnRyaWVzYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWFycmF5LnByb3RvdHlwZS5lbnRyaWVzXG4vLyBgQXJyYXkucHJvdG90eXBlLmtleXNgIG1ldGhvZFxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtYXJyYXkucHJvdG90eXBlLmtleXNcbi8vIGBBcnJheS5wcm90b3R5cGUudmFsdWVzYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWFycmF5LnByb3RvdHlwZS52YWx1ZXNcbi8vIGBBcnJheS5wcm90b3R5cGVbQEBpdGVyYXRvcl1gIG1ldGhvZFxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtYXJyYXkucHJvdG90eXBlLUBAaXRlcmF0b3Jcbi8vIGBDcmVhdGVBcnJheUl0ZXJhdG9yYCBpbnRlcm5hbCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWNyZWF0ZWFycmF5aXRlcmF0b3Jcbm1vZHVsZS5leHBvcnRzID0gZGVmaW5lSXRlcmF0b3IoQXJyYXksICdBcnJheScsIGZ1bmN0aW9uIChpdGVyYXRlZCwga2luZCkge1xuICBzZXRJbnRlcm5hbFN0YXRlKHRoaXMsIHtcbiAgICB0eXBlOiBBUlJBWV9JVEVSQVRPUixcbiAgICB0YXJnZXQ6IHRvSW5kZXhlZE9iamVjdChpdGVyYXRlZCksIC8vIHRhcmdldFxuICAgIGluZGV4OiAwLCAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbmV4dCBpbmRleFxuICAgIGtpbmQ6IGtpbmQgICAgICAgICAgICAgICAgICAgICAgICAgLy8ga2luZFxuICB9KTtcbi8vIGAlQXJyYXlJdGVyYXRvclByb3RvdHlwZSUubmV4dGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy0lYXJyYXlpdGVyYXRvcnByb3RvdHlwZSUubmV4dFxufSwgZnVuY3Rpb24gKCkge1xuICB2YXIgc3RhdGUgPSBnZXRJbnRlcm5hbFN0YXRlKHRoaXMpO1xuICB2YXIgdGFyZ2V0ID0gc3RhdGUudGFyZ2V0O1xuICB2YXIga2luZCA9IHN0YXRlLmtpbmQ7XG4gIHZhciBpbmRleCA9IHN0YXRlLmluZGV4Kys7XG4gIGlmICghdGFyZ2V0IHx8IGluZGV4ID49IHRhcmdldC5sZW5ndGgpIHtcbiAgICBzdGF0ZS50YXJnZXQgPSB1bmRlZmluZWQ7XG4gICAgcmV0dXJuIHsgdmFsdWU6IHVuZGVmaW5lZCwgZG9uZTogdHJ1ZSB9O1xuICB9XG4gIGlmIChraW5kID09ICdrZXlzJykgcmV0dXJuIHsgdmFsdWU6IGluZGV4LCBkb25lOiBmYWxzZSB9O1xuICBpZiAoa2luZCA9PSAndmFsdWVzJykgcmV0dXJuIHsgdmFsdWU6IHRhcmdldFtpbmRleF0sIGRvbmU6IGZhbHNlIH07XG4gIHJldHVybiB7IHZhbHVlOiBbaW5kZXgsIHRhcmdldFtpbmRleF1dLCBkb25lOiBmYWxzZSB9O1xufSwgJ3ZhbHVlcycpO1xuXG4vLyBhcmd1bWVudHNMaXN0W0BAaXRlcmF0b3JdIGlzICVBcnJheVByb3RvX3ZhbHVlcyVcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWNyZWF0ZXVubWFwcGVkYXJndW1lbnRzb2JqZWN0XG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1jcmVhdGVtYXBwZWRhcmd1bWVudHNvYmplY3Rcbkl0ZXJhdG9ycy5Bcmd1bWVudHMgPSBJdGVyYXRvcnMuQXJyYXk7XG5cbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWFycmF5LnByb3RvdHlwZS1AQHVuc2NvcGFibGVzXG5hZGRUb1Vuc2NvcGFibGVzKCdrZXlzJyk7XG5hZGRUb1Vuc2NvcGFibGVzKCd2YWx1ZXMnKTtcbmFkZFRvVW5zY29wYWJsZXMoJ2VudHJpZXMnKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.array.iterator.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.object.to-string.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.to-string.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar toString = __webpack_require__(/*! ../internals/object-to-string */ \"./node_modules/core-js/internals/object-to-string.js\");\n\nvar ObjectPrototype = Object.prototype;\n\n// `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nif (toString !== ObjectPrototype.toString) {\n redefine(ObjectPrototype, 'toString', toString, { unsafe: true });\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLm9iamVjdC50by1zdHJpbmcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMub2JqZWN0LnRvLXN0cmluZy5qcz9kM2I3Il0sInNvdXJjZXNDb250ZW50IjpbInZhciByZWRlZmluZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZWRlZmluZScpO1xudmFyIHRvU3RyaW5nID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL29iamVjdC10by1zdHJpbmcnKTtcblxudmFyIE9iamVjdFByb3RvdHlwZSA9IE9iamVjdC5wcm90b3R5cGU7XG5cbi8vIGBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLW9iamVjdC5wcm90b3R5cGUudG9zdHJpbmdcbmlmICh0b1N0cmluZyAhPT0gT2JqZWN0UHJvdG90eXBlLnRvU3RyaW5nKSB7XG4gIHJlZGVmaW5lKE9iamVjdFByb3RvdHlwZSwgJ3RvU3RyaW5nJywgdG9TdHJpbmcsIHsgdW5zYWZlOiB0cnVlIH0pO1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.object.to-string.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.promise.finally.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.promise.finally.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js/internals/promise-resolve.js\");\n\n// `Promise.prototype.finally` method\n// https://tc39.github.io/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnByb21pc2UuZmluYWxseS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5wcm9taXNlLmZpbmFsbHkuanM/YTc5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciBnZXRCdWlsdEluID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2dldC1idWlsdC1pbicpO1xudmFyIHNwZWNpZXNDb25zdHJ1Y3RvciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zcGVjaWVzLWNvbnN0cnVjdG9yJyk7XG52YXIgcHJvbWlzZVJlc29sdmUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcHJvbWlzZS1yZXNvbHZlJyk7XG5cbi8vIGBQcm9taXNlLnByb3RvdHlwZS5maW5hbGx5YCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXByb21pc2UucHJvdG90eXBlLmZpbmFsbHlcbiQoeyB0YXJnZXQ6ICdQcm9taXNlJywgcHJvdG86IHRydWUsIHJlYWw6IHRydWUgfSwge1xuICAnZmluYWxseSc6IGZ1bmN0aW9uIChvbkZpbmFsbHkpIHtcbiAgICB2YXIgQyA9IHNwZWNpZXNDb25zdHJ1Y3Rvcih0aGlzLCBnZXRCdWlsdEluKCdQcm9taXNlJykpO1xuICAgIHZhciBpc0Z1bmN0aW9uID0gdHlwZW9mIG9uRmluYWxseSA9PSAnZnVuY3Rpb24nO1xuICAgIHJldHVybiB0aGlzLnRoZW4oXG4gICAgICBpc0Z1bmN0aW9uID8gZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgcmV0dXJuIHByb21pc2VSZXNvbHZlKEMsIG9uRmluYWxseSgpKS50aGVuKGZ1bmN0aW9uICgpIHsgcmV0dXJuIHg7IH0pO1xuICAgICAgfSA6IG9uRmluYWxseSxcbiAgICAgIGlzRnVuY3Rpb24gPyBmdW5jdGlvbiAoZSkge1xuICAgICAgICByZXR1cm4gcHJvbWlzZVJlc29sdmUoQywgb25GaW5hbGx5KCkpLnRoZW4oZnVuY3Rpb24gKCkgeyB0aHJvdyBlOyB9KTtcbiAgICAgIH0gOiBvbkZpbmFsbHlcbiAgICApO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.promise.finally.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.promise.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/es.promise.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar path = __webpack_require__(/*! ../internals/path */ \"./node_modules/core-js/internals/path.js\");\nvar redefineAll = __webpack_require__(/*! ../internals/redefine-all */ \"./node_modules/core-js/internals/redefine-all.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar setSpecies = __webpack_require__(/*! ../internals/set-species */ \"./node_modules/core-js/internals/set-species.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js/internals/a-function.js\");\nvar anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js/internals/an-instance.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js/internals/iterate.js\");\nvar checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ \"./node_modules/core-js/internals/check-correctness-of-iteration.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar task = __webpack_require__(/*! ../internals/task */ \"./node_modules/core-js/internals/task.js\").set;\nvar microtask = __webpack_require__(/*! ../internals/microtask */ \"./node_modules/core-js/internals/microtask.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js/internals/promise-resolve.js\");\nvar hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ \"./node_modules/core-js/internals/host-report-errors.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js/internals/perform.js\");\nvar userAgent = __webpack_require__(/*! ../internals/user-agent */ \"./node_modules/core-js/internals/user-agent.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js/internals/is-forced.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = global[PROMISE];\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = global.fetch;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper;\n\nvar FORCED = isForced(PROMISE, function () {\n // correct subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var empty = function () { /* empty */ };\n var FakePromise = (promise.constructor = {})[SPECIES] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !((IS_NODE || typeof PromiseRejectionEvent == 'function')\n && (!IS_PURE || promise['finally'])\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n task.call(global, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n task.call(global, function () {\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n // wrap fetch result\n if (!IS_PURE && typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = path[PROMISE];\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnByb21pc2UuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMucHJvbWlzZS5qcz9lNmNmIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIElTX1BVUkUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtcHVyZScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9nbG9iYWwnKTtcbnZhciBwYXRoID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3BhdGgnKTtcbnZhciByZWRlZmluZUFsbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZWRlZmluZS1hbGwnKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zZXQtdG8tc3RyaW5nLXRhZycpO1xudmFyIHNldFNwZWNpZXMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2V0LXNwZWNpZXMnKTtcbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pcy1vYmplY3QnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYS1mdW5jdGlvbicpO1xudmFyIGFuSW5zdGFuY2UgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYW4taW5zdGFuY2UnKTtcbnZhciBjbGFzc29mID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NsYXNzb2YtcmF3Jyk7XG52YXIgaXRlcmF0ZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pdGVyYXRlJyk7XG52YXIgY2hlY2tDb3JyZWN0bmVzc09mSXRlcmF0aW9uID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NoZWNrLWNvcnJlY3RuZXNzLW9mLWl0ZXJhdGlvbicpO1xudmFyIHNwZWNpZXNDb25zdHJ1Y3RvciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zcGVjaWVzLWNvbnN0cnVjdG9yJyk7XG52YXIgdGFzayA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90YXNrJykuc2V0O1xudmFyIG1pY3JvdGFzayA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9taWNyb3Rhc2snKTtcbnZhciBwcm9taXNlUmVzb2x2ZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9wcm9taXNlLXJlc29sdmUnKTtcbnZhciBob3N0UmVwb3J0RXJyb3JzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2hvc3QtcmVwb3J0LWVycm9ycycpO1xudmFyIG5ld1Byb21pc2VDYXBhYmlsaXR5TW9kdWxlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL25ldy1wcm9taXNlLWNhcGFiaWxpdHknKTtcbnZhciBwZXJmb3JtID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3BlcmZvcm0nKTtcbnZhciB1c2VyQWdlbnQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvdXNlci1hZ2VudCcpO1xudmFyIEludGVybmFsU3RhdGVNb2R1bGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaW50ZXJuYWwtc3RhdGUnKTtcbnZhciBpc0ZvcmNlZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pcy1mb3JjZWQnKTtcbnZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcblxudmFyIFNQRUNJRVMgPSB3ZWxsS25vd25TeW1ib2woJ3NwZWNpZXMnKTtcbnZhciBQUk9NSVNFID0gJ1Byb21pc2UnO1xudmFyIGdldEludGVybmFsU3RhdGUgPSBJbnRlcm5hbFN0YXRlTW9kdWxlLmdldDtcbnZhciBzZXRJbnRlcm5hbFN0YXRlID0gSW50ZXJuYWxTdGF0ZU1vZHVsZS5zZXQ7XG52YXIgZ2V0SW50ZXJuYWxQcm9taXNlU3RhdGUgPSBJbnRlcm5hbFN0YXRlTW9kdWxlLmdldHRlckZvcihQUk9NSVNFKTtcbnZhciBQcm9taXNlQ29uc3RydWN0b3IgPSBnbG9iYWxbUFJPTUlTRV07XG52YXIgVHlwZUVycm9yID0gZ2xvYmFsLlR5cGVFcnJvcjtcbnZhciBkb2N1bWVudCA9IGdsb2JhbC5kb2N1bWVudDtcbnZhciBwcm9jZXNzID0gZ2xvYmFsLnByb2Nlc3M7XG52YXIgJGZldGNoID0gZ2xvYmFsLmZldGNoO1xudmFyIHZlcnNpb25zID0gcHJvY2VzcyAmJiBwcm9jZXNzLnZlcnNpb25zO1xudmFyIHY4ID0gdmVyc2lvbnMgJiYgdmVyc2lvbnMudjggfHwgJyc7XG52YXIgbmV3UHJvbWlzZUNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eU1vZHVsZS5mO1xudmFyIG5ld0dlbmVyaWNQcm9taXNlQ2FwYWJpbGl0eSA9IG5ld1Byb21pc2VDYXBhYmlsaXR5O1xudmFyIElTX05PREUgPSBjbGFzc29mKHByb2Nlc3MpID09ICdwcm9jZXNzJztcbnZhciBESVNQQVRDSF9FVkVOVCA9ICEhKGRvY3VtZW50ICYmIGRvY3VtZW50LmNyZWF0ZUV2ZW50ICYmIGdsb2JhbC5kaXNwYXRjaEV2ZW50KTtcbnZhciBVTkhBTkRMRURfUkVKRUNUSU9OID0gJ3VuaGFuZGxlZHJlamVjdGlvbic7XG52YXIgUkVKRUNUSU9OX0hBTkRMRUQgPSAncmVqZWN0aW9uaGFuZGxlZCc7XG52YXIgUEVORElORyA9IDA7XG52YXIgRlVMRklMTEVEID0gMTtcbnZhciBSRUpFQ1RFRCA9IDI7XG52YXIgSEFORExFRCA9IDE7XG52YXIgVU5IQU5ETEVEID0gMjtcbnZhciBJbnRlcm5hbCwgT3duUHJvbWlzZUNhcGFiaWxpdHksIFByb21pc2VXcmFwcGVyO1xuXG52YXIgRk9SQ0VEID0gaXNGb3JjZWQoUFJPTUlTRSwgZnVuY3Rpb24gKCkge1xuICAvLyBjb3JyZWN0IHN1YmNsYXNzaW5nIHdpdGggQEBzcGVjaWVzIHN1cHBvcnRcbiAgdmFyIHByb21pc2UgPSBQcm9taXNlQ29uc3RydWN0b3IucmVzb2x2ZSgxKTtcbiAgdmFyIGVtcHR5ID0gZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9O1xuICB2YXIgRmFrZVByb21pc2UgPSAocHJvbWlzZS5jb25zdHJ1Y3RvciA9IHt9KVtTUEVDSUVTXSA9IGZ1bmN0aW9uIChleGVjKSB7XG4gICAgZXhlYyhlbXB0eSwgZW1wdHkpO1xuICB9O1xuICAvLyB1bmhhbmRsZWQgcmVqZWN0aW9ucyB0cmFja2luZyBzdXBwb3J0LCBOb2RlSlMgUHJvbWlzZSB3aXRob3V0IGl0IGZhaWxzIEBAc3BlY2llcyB0ZXN0XG4gIHJldHVybiAhKChJU19OT0RFIHx8IHR5cGVvZiBQcm9taXNlUmVqZWN0aW9uRXZlbnQgPT0gJ2Z1bmN0aW9uJylcbiAgICAmJiAoIUlTX1BVUkUgfHwgcHJvbWlzZVsnZmluYWxseSddKVxuICAgICYmIHByb21pc2UudGhlbihlbXB0eSkgaW5zdGFuY2VvZiBGYWtlUHJvbWlzZVxuICAgIC8vIHY4IDYuNiAoTm9kZSAxMCBhbmQgQ2hyb21lIDY2KSBoYXZlIGEgYnVnIHdpdGggcmVzb2x2aW5nIGN1c3RvbSB0aGVuYWJsZXNcbiAgICAvLyBodHRwczovL2J1Z3MuY2hyb21pdW0ub3JnL3AvY2hyb21pdW0vaXNzdWVzL2RldGFpbD9pZD04MzA1NjVcbiAgICAvLyB3ZSBjYW4ndCBkZXRlY3QgaXQgc3luY2hyb25vdXNseSwgc28ganVzdCBjaGVjayB2ZXJzaW9uc1xuICAgICYmIHY4LmluZGV4T2YoJzYuNicpICE9PSAwXG4gICAgJiYgdXNlckFnZW50LmluZGV4T2YoJ0Nocm9tZS82NicpID09PSAtMSk7XG59KTtcblxudmFyIElOQ09SUkVDVF9JVEVSQVRJT04gPSBGT1JDRUQgfHwgIWNoZWNrQ29ycmVjdG5lc3NPZkl0ZXJhdGlvbihmdW5jdGlvbiAoaXRlcmFibGUpIHtcbiAgUHJvbWlzZUNvbnN0cnVjdG9yLmFsbChpdGVyYWJsZSlbJ2NhdGNoJ10oZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9KTtcbn0pO1xuXG4vLyBoZWxwZXJzXG52YXIgaXNUaGVuYWJsZSA9IGZ1bmN0aW9uIChpdCkge1xuICB2YXIgdGhlbjtcbiAgcmV0dXJuIGlzT2JqZWN0KGl0KSAmJiB0eXBlb2YgKHRoZW4gPSBpdC50aGVuKSA9PSAnZnVuY3Rpb24nID8gdGhlbiA6IGZhbHNlO1xufTtcblxudmFyIG5vdGlmeSA9IGZ1bmN0aW9uIChwcm9taXNlLCBzdGF0ZSwgaXNSZWplY3QpIHtcbiAgaWYgKHN0YXRlLm5vdGlmaWVkKSByZXR1cm47XG4gIHN0YXRlLm5vdGlmaWVkID0gdHJ1ZTtcbiAgdmFyIGNoYWluID0gc3RhdGUucmVhY3Rpb25zO1xuICBtaWNyb3Rhc2soZnVuY3Rpb24gKCkge1xuICAgIHZhciB2YWx1ZSA9IHN0YXRlLnZhbHVlO1xuICAgIHZhciBvayA9IHN0YXRlLnN0YXRlID09IEZVTEZJTExFRDtcbiAgICB2YXIgaSA9IDA7XG4gICAgdmFyIHJ1biA9IGZ1bmN0aW9uIChyZWFjdGlvbikge1xuICAgICAgdmFyIGhhbmRsZXIgPSBvayA/IHJlYWN0aW9uLm9rIDogcmVhY3Rpb24uZmFpbDtcbiAgICAgIHZhciByZXNvbHZlID0gcmVhY3Rpb24ucmVzb2x2ZTtcbiAgICAgIHZhciByZWplY3QgPSByZWFjdGlvbi5yZWplY3Q7XG4gICAgICB2YXIgZG9tYWluID0gcmVhY3Rpb24uZG9tYWluO1xuICAgICAgdmFyIHJlc3VsdCwgdGhlbiwgZXhpdGVkO1xuICAgICAgdHJ5IHtcbiAgICAgICAgaWYgKGhhbmRsZXIpIHtcbiAgICAgICAgICBpZiAoIW9rKSB7XG4gICAgICAgICAgICBpZiAoc3RhdGUucmVqZWN0aW9uID09PSBVTkhBTkRMRUQpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UsIHN0YXRlKTtcbiAgICAgICAgICAgIHN0YXRlLnJlamVjdGlvbiA9IEhBTkRMRUQ7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7IC8vIG1heSB0aHJvd1xuICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICAgICAgICBleGl0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVsc2UgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9IGVsc2UgcmVqZWN0KHZhbHVlKTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgIGlmIChkb21haW4gJiYgIWV4aXRlZCkgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgIH1cbiAgICB9O1xuICAgIHdoaWxlIChjaGFpbi5sZW5ndGggPiBpKSBydW4oY2hhaW5baSsrXSk7IC8vIHZhcmlhYmxlIGxlbmd0aCAtIGNhbid0IHVzZSBmb3JFYWNoXG4gICAgc3RhdGUucmVhY3Rpb25zID0gW107XG4gICAgc3RhdGUubm90aWZpZWQgPSBmYWxzZTtcbiAgICBpZiAoaXNSZWplY3QgJiYgIXN0YXRlLnJlamVjdGlvbikgb25VbmhhbmRsZWQocHJvbWlzZSwgc3RhdGUpO1xuICB9KTtcbn07XG5cbnZhciBkaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKG5hbWUsIHByb21pc2UsIHJlYXNvbikge1xuICB2YXIgZXZlbnQsIGhhbmRsZXI7XG4gIGlmIChESVNQQVRDSF9FVkVOVCkge1xuICAgIGV2ZW50ID0gZG9jdW1lbnQuY3JlYXRlRXZlbnQoJ0V2ZW50Jyk7XG4gICAgZXZlbnQucHJvbWlzZSA9IHByb21pc2U7XG4gICAgZXZlbnQucmVhc29uID0gcmVhc29uO1xuICAgIGV2ZW50LmluaXRFdmVudChuYW1lLCBmYWxzZSwgdHJ1ZSk7XG4gICAgZ2xvYmFsLmRpc3BhdGNoRXZlbnQoZXZlbnQpO1xuICB9IGVsc2UgZXZlbnQgPSB7IHByb21pc2U6IHByb21pc2UsIHJlYXNvbjogcmVhc29uIH07XG4gIGlmIChoYW5kbGVyID0gZ2xvYmFsWydvbicgKyBuYW1lXSkgaGFuZGxlcihldmVudCk7XG4gIGVsc2UgaWYgKG5hbWUgPT09IFVOSEFORExFRF9SRUpFQ1RJT04pIGhvc3RSZXBvcnRFcnJvcnMoJ1VuaGFuZGxlZCBwcm9taXNlIHJlamVjdGlvbicsIHJlYXNvbik7XG59O1xuXG52YXIgb25VbmhhbmRsZWQgPSBmdW5jdGlvbiAocHJvbWlzZSwgc3RhdGUpIHtcbiAgdGFzay5jYWxsKGdsb2JhbCwgZnVuY3Rpb24gKCkge1xuICAgIHZhciB2YWx1ZSA9IHN0YXRlLnZhbHVlO1xuICAgIHZhciBJU19VTkhBTkRMRUQgPSBpc1VuaGFuZGxlZChzdGF0ZSk7XG4gICAgdmFyIHJlc3VsdDtcbiAgICBpZiAoSVNfVU5IQU5ETEVEKSB7XG4gICAgICByZXN1bHQgPSBwZXJmb3JtKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKElTX05PREUpIHtcbiAgICAgICAgICBwcm9jZXNzLmVtaXQoJ3VuaGFuZGxlZFJlamVjdGlvbicsIHZhbHVlLCBwcm9taXNlKTtcbiAgICAgICAgfSBlbHNlIGRpc3BhdGNoRXZlbnQoVU5IQU5ETEVEX1JFSkVDVElPTiwgcHJvbWlzZSwgdmFsdWUpO1xuICAgICAgfSk7XG4gICAgICAvLyBCcm93c2VycyBzaG91bGQgbm90IHRyaWdnZXIgYHJlamVjdGlvbkhhbmRsZWRgIGV2ZW50IGlmIGl0IHdhcyBoYW5kbGVkIGhlcmUsIE5vZGVKUyAtIHNob3VsZFxuICAgICAgc3RhdGUucmVqZWN0aW9uID0gSVNfTk9ERSB8fCBpc1VuaGFuZGxlZChzdGF0ZSkgPyBVTkhBTkRMRUQgOiBIQU5ETEVEO1xuICAgICAgaWYgKHJlc3VsdC5lcnJvcikgdGhyb3cgcmVzdWx0LnZhbHVlO1xuICAgIH1cbiAgfSk7XG59O1xuXG52YXIgaXNVbmhhbmRsZWQgPSBmdW5jdGlvbiAoc3RhdGUpIHtcbiAgcmV0dXJuIHN0YXRlLnJlamVjdGlvbiAhPT0gSEFORExFRCAmJiAhc3RhdGUucGFyZW50O1xufTtcblxudmFyIG9uSGFuZGxlVW5oYW5kbGVkID0gZnVuY3Rpb24gKHByb21pc2UsIHN0YXRlKSB7XG4gIHRhc2suY2FsbChnbG9iYWwsIGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoSVNfTk9ERSkge1xuICAgICAgcHJvY2Vzcy5lbWl0KCdyZWplY3Rpb25IYW5kbGVkJywgcHJvbWlzZSk7XG4gICAgfSBlbHNlIGRpc3BhdGNoRXZlbnQoUkVKRUNUSU9OX0hBTkRMRUQsIHByb21pc2UsIHN0YXRlLnZhbHVlKTtcbiAgfSk7XG59O1xuXG52YXIgYmluZCA9IGZ1bmN0aW9uIChmbiwgcHJvbWlzZSwgc3RhdGUsIHVud3JhcCkge1xuICByZXR1cm4gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgZm4ocHJvbWlzZSwgc3RhdGUsIHZhbHVlLCB1bndyYXApO1xuICB9O1xufTtcblxudmFyIGludGVybmFsUmVqZWN0ID0gZnVuY3Rpb24gKHByb21pc2UsIHN0YXRlLCB2YWx1ZSwgdW53cmFwKSB7XG4gIGlmIChzdGF0ZS5kb25lKSByZXR1cm47XG4gIHN0YXRlLmRvbmUgPSB0cnVlO1xuICBpZiAodW53cmFwKSBzdGF0ZSA9IHVud3JhcDtcbiAgc3RhdGUudmFsdWUgPSB2YWx1ZTtcbiAgc3RhdGUuc3RhdGUgPSBSRUpFQ1RFRDtcbiAgbm90aWZ5KHByb21pc2UsIHN0YXRlLCB0cnVlKTtcbn07XG5cbnZhciBpbnRlcm5hbFJlc29sdmUgPSBmdW5jdGlvbiAocHJvbWlzZSwgc3RhdGUsIHZhbHVlLCB1bndyYXApIHtcbiAgaWYgKHN0YXRlLmRvbmUpIHJldHVybjtcbiAgc3RhdGUuZG9uZSA9IHRydWU7XG4gIGlmICh1bndyYXApIHN0YXRlID0gdW53cmFwO1xuICB0cnkge1xuICAgIGlmIChwcm9taXNlID09PSB2YWx1ZSkgdGhyb3cgVHlwZUVycm9yKFwiUHJvbWlzZSBjYW4ndCBiZSByZXNvbHZlZCBpdHNlbGZcIik7XG4gICAgdmFyIHRoZW4gPSBpc1RoZW5hYmxlKHZhbHVlKTtcbiAgICBpZiAodGhlbikge1xuICAgICAgbWljcm90YXNrKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIHdyYXBwZXIgPSB7IGRvbmU6IGZhbHNlIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgdGhlbi5jYWxsKHZhbHVlLFxuICAgICAgICAgICAgYmluZChpbnRlcm5hbFJlc29sdmUsIHByb21pc2UsIHdyYXBwZXIsIHN0YXRlKSxcbiAgICAgICAgICAgIGJpbmQoaW50ZXJuYWxSZWplY3QsIHByb21pc2UsIHdyYXBwZXIsIHN0YXRlKVxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaW50ZXJuYWxSZWplY3QocHJvbWlzZSwgd3JhcHBlciwgZXJyb3IsIHN0YXRlKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHN0YXRlLnZhbHVlID0gdmFsdWU7XG4gICAgICBzdGF0ZS5zdGF0ZSA9IEZVTEZJTExFRDtcbiAgICAgIG5vdGlmeShwcm9taXNlLCBzdGF0ZSwgZmFsc2UpO1xuICAgIH1cbiAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICBpbnRlcm5hbFJlamVjdChwcm9taXNlLCB7IGRvbmU6IGZhbHNlIH0sIGVycm9yLCBzdGF0ZSk7XG4gIH1cbn07XG5cbi8vIGNvbnN0cnVjdG9yIHBvbHlmaWxsXG5pZiAoRk9SQ0VEKSB7XG4gIC8vIDI1LjQuMy4xIFByb21pc2UoZXhlY3V0b3IpXG4gIFByb21pc2VDb25zdHJ1Y3RvciA9IGZ1bmN0aW9uIFByb21pc2UoZXhlY3V0b3IpIHtcbiAgICBhbkluc3RhbmNlKHRoaXMsIFByb21pc2VDb25zdHJ1Y3RvciwgUFJPTUlTRSk7XG4gICAgYUZ1bmN0aW9uKGV4ZWN1dG9yKTtcbiAgICBJbnRlcm5hbC5jYWxsKHRoaXMpO1xuICAgIHZhciBzdGF0ZSA9IGdldEludGVybmFsU3RhdGUodGhpcyk7XG4gICAgdHJ5IHtcbiAgICAgIGV4ZWN1dG9yKGJpbmQoaW50ZXJuYWxSZXNvbHZlLCB0aGlzLCBzdGF0ZSksIGJpbmQoaW50ZXJuYWxSZWplY3QsIHRoaXMsIHN0YXRlKSk7XG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgIGludGVybmFsUmVqZWN0KHRoaXMsIHN0YXRlLCBlcnJvcik7XG4gICAgfVxuICB9O1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdW51c2VkLXZhcnNcbiAgSW50ZXJuYWwgPSBmdW5jdGlvbiBQcm9taXNlKGV4ZWN1dG9yKSB7XG4gICAgc2V0SW50ZXJuYWxTdGF0ZSh0aGlzLCB7XG4gICAgICB0eXBlOiBQUk9NSVNFLFxuICAgICAgZG9uZTogZmFsc2UsXG4gICAgICBub3RpZmllZDogZmFsc2UsXG4gICAgICBwYXJlbnQ6IGZhbHNlLFxuICAgICAgcmVhY3Rpb25zOiBbXSxcbiAgICAgIHJlamVjdGlvbjogZmFsc2UsXG4gICAgICBzdGF0ZTogUEVORElORyxcbiAgICAgIHZhbHVlOiB1bmRlZmluZWRcbiAgICB9KTtcbiAgfTtcbiAgSW50ZXJuYWwucHJvdG90eXBlID0gcmVkZWZpbmVBbGwoUHJvbWlzZUNvbnN0cnVjdG9yLnByb3RvdHlwZSwge1xuICAgIC8vIGBQcm9taXNlLnByb3RvdHlwZS50aGVuYCBtZXRob2RcbiAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1wcm9taXNlLnByb3RvdHlwZS50aGVuXG4gICAgdGhlbjogZnVuY3Rpb24gdGhlbihvbkZ1bGZpbGxlZCwgb25SZWplY3RlZCkge1xuICAgICAgdmFyIHN0YXRlID0gZ2V0SW50ZXJuYWxQcm9taXNlU3RhdGUodGhpcyk7XG4gICAgICB2YXIgcmVhY3Rpb24gPSBuZXdQcm9taXNlQ2FwYWJpbGl0eShzcGVjaWVzQ29uc3RydWN0b3IodGhpcywgUHJvbWlzZUNvbnN0cnVjdG9yKSk7XG4gICAgICByZWFjdGlvbi5vayA9IHR5cGVvZiBvbkZ1bGZpbGxlZCA9PSAnZnVuY3Rpb24nID8gb25GdWxmaWxsZWQgOiB0cnVlO1xuICAgICAgcmVhY3Rpb24uZmFpbCA9IHR5cGVvZiBvblJlamVjdGVkID09ICdmdW5jdGlvbicgJiYgb25SZWplY3RlZDtcbiAgICAgIHJlYWN0aW9uLmRvbWFpbiA9IElTX05PREUgPyBwcm9jZXNzLmRvbWFpbiA6IHVuZGVmaW5lZDtcbiAgICAgIHN0YXRlLnBhcmVudCA9IHRydWU7XG4gICAgICBzdGF0ZS5yZWFjdGlvbnMucHVzaChyZWFjdGlvbik7XG4gICAgICBpZiAoc3RhdGUuc3RhdGUgIT0gUEVORElORykgbm90aWZ5KHRoaXMsIHN0YXRlLCBmYWxzZSk7XG4gICAgICByZXR1cm4gcmVhY3Rpb24ucHJvbWlzZTtcbiAgICB9LFxuICAgIC8vIGBQcm9taXNlLnByb3RvdHlwZS5jYXRjaGAgbWV0aG9kXG4gICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtcHJvbWlzZS5wcm90b3R5cGUuY2F0Y2hcbiAgICAnY2F0Y2gnOiBmdW5jdGlvbiAob25SZWplY3RlZCkge1xuICAgICAgcmV0dXJuIHRoaXMudGhlbih1bmRlZmluZWQsIG9uUmVqZWN0ZWQpO1xuICAgIH1cbiAgfSk7XG4gIE93blByb21pc2VDYXBhYmlsaXR5ID0gZnVuY3Rpb24gKCkge1xuICAgIHZhciBwcm9taXNlID0gbmV3IEludGVybmFsKCk7XG4gICAgdmFyIHN0YXRlID0gZ2V0SW50ZXJuYWxTdGF0ZShwcm9taXNlKTtcbiAgICB0aGlzLnByb21pc2UgPSBwcm9taXNlO1xuICAgIHRoaXMucmVzb2x2ZSA9IGJpbmQoaW50ZXJuYWxSZXNvbHZlLCBwcm9taXNlLCBzdGF0ZSk7XG4gICAgdGhpcy5yZWplY3QgPSBiaW5kKGludGVybmFsUmVqZWN0LCBwcm9taXNlLCBzdGF0ZSk7XG4gIH07XG4gIG5ld1Byb21pc2VDYXBhYmlsaXR5TW9kdWxlLmYgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eSA9IGZ1bmN0aW9uIChDKSB7XG4gICAgcmV0dXJuIEMgPT09IFByb21pc2VDb25zdHJ1Y3RvciB8fCBDID09PSBQcm9taXNlV3JhcHBlclxuICAgICAgPyBuZXcgT3duUHJvbWlzZUNhcGFiaWxpdHkoQylcbiAgICAgIDogbmV3R2VuZXJpY1Byb21pc2VDYXBhYmlsaXR5KEMpO1xuICB9O1xuXG4gIC8vIHdyYXAgZmV0Y2ggcmVzdWx0XG4gIGlmICghSVNfUFVSRSAmJiB0eXBlb2YgJGZldGNoID09ICdmdW5jdGlvbicpICQoeyBnbG9iYWw6IHRydWUsIGVudW1lcmFibGU6IHRydWUsIGZvcmNlZDogdHJ1ZSB9LCB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVudXNlZC12YXJzXG4gICAgZmV0Y2g6IGZ1bmN0aW9uIGZldGNoKGlucHV0KSB7XG4gICAgICByZXR1cm4gcHJvbWlzZVJlc29sdmUoUHJvbWlzZUNvbnN0cnVjdG9yLCAkZmV0Y2guYXBwbHkoZ2xvYmFsLCBhcmd1bWVudHMpKTtcbiAgICB9XG4gIH0pO1xufVxuXG4kKHsgZ2xvYmFsOiB0cnVlLCB3cmFwOiB0cnVlLCBmb3JjZWQ6IEZPUkNFRCB9LCB7XG4gIFByb21pc2U6IFByb21pc2VDb25zdHJ1Y3RvclxufSk7XG5cbnNldFRvU3RyaW5nVGFnKFByb21pc2VDb25zdHJ1Y3RvciwgUFJPTUlTRSwgZmFsc2UsIHRydWUpO1xuc2V0U3BlY2llcyhQUk9NSVNFKTtcblxuUHJvbWlzZVdyYXBwZXIgPSBwYXRoW1BST01JU0VdO1xuXG4vLyBzdGF0aWNzXG4kKHsgdGFyZ2V0OiBQUk9NSVNFLCBzdGF0OiB0cnVlLCBmb3JjZWQ6IEZPUkNFRCB9LCB7XG4gIC8vIGBQcm9taXNlLnJlamVjdGAgbWV0aG9kXG4gIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXByb21pc2UucmVqZWN0XG4gIHJlamVjdDogZnVuY3Rpb24gcmVqZWN0KHIpIHtcbiAgICB2YXIgY2FwYWJpbGl0eSA9IG5ld1Byb21pc2VDYXBhYmlsaXR5KHRoaXMpO1xuICAgIGNhcGFiaWxpdHkucmVqZWN0LmNhbGwodW5kZWZpbmVkLCByKTtcbiAgICByZXR1cm4gY2FwYWJpbGl0eS5wcm9taXNlO1xuICB9XG59KTtcblxuJCh7IHRhcmdldDogUFJPTUlTRSwgc3RhdDogdHJ1ZSwgZm9yY2VkOiBJU19QVVJFIHx8IEZPUkNFRCB9LCB7XG4gIC8vIGBQcm9taXNlLnJlc29sdmVgIG1ldGhvZFxuICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1wcm9taXNlLnJlc29sdmVcbiAgcmVzb2x2ZTogZnVuY3Rpb24gcmVzb2x2ZSh4KSB7XG4gICAgcmV0dXJuIHByb21pc2VSZXNvbHZlKElTX1BVUkUgJiYgdGhpcyA9PT0gUHJvbWlzZVdyYXBwZXIgPyBQcm9taXNlQ29uc3RydWN0b3IgOiB0aGlzLCB4KTtcbiAgfVxufSk7XG5cbiQoeyB0YXJnZXQ6IFBST01JU0UsIHN0YXQ6IHRydWUsIGZvcmNlZDogSU5DT1JSRUNUX0lURVJBVElPTiB9LCB7XG4gIC8vIGBQcm9taXNlLmFsbGAgbWV0aG9kXG4gIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXByb21pc2UuYWxsXG4gIGFsbDogZnVuY3Rpb24gYWxsKGl0ZXJhYmxlKSB7XG4gICAgdmFyIEMgPSB0aGlzO1xuICAgIHZhciBjYXBhYmlsaXR5ID0gbmV3UHJvbWlzZUNhcGFiaWxpdHkoQyk7XG4gICAgdmFyIHJlc29sdmUgPSBjYXBhYmlsaXR5LnJlc29sdmU7XG4gICAgdmFyIHJlamVjdCA9IGNhcGFiaWxpdHkucmVqZWN0O1xuICAgIHZhciByZXN1bHQgPSBwZXJmb3JtKGZ1bmN0aW9uICgpIHtcbiAgICAgIHZhciAkcHJvbWlzZVJlc29sdmUgPSBhRnVuY3Rpb24oQy5yZXNvbHZlKTtcbiAgICAgIHZhciB2YWx1ZXMgPSBbXTtcbiAgICAgIHZhciBjb3VudGVyID0gMDtcbiAgICAgIHZhciByZW1haW5pbmcgPSAxO1xuICAgICAgaXRlcmF0ZShpdGVyYWJsZSwgZnVuY3Rpb24gKHByb21pc2UpIHtcbiAgICAgICAgdmFyIGluZGV4ID0gY291bnRlcisrO1xuICAgICAgICB2YXIgYWxyZWFkeUNhbGxlZCA9IGZhbHNlO1xuICAgICAgICB2YWx1ZXMucHVzaCh1bmRlZmluZWQpO1xuICAgICAgICByZW1haW5pbmcrKztcbiAgICAgICAgJHByb21pc2VSZXNvbHZlLmNhbGwoQywgcHJvbWlzZSkudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICBpZiAoYWxyZWFkeUNhbGxlZCkgcmV0dXJuO1xuICAgICAgICAgIGFscmVhZHlDYWxsZWQgPSB0cnVlO1xuICAgICAgICAgIHZhbHVlc1tpbmRleF0gPSB2YWx1ZTtcbiAgICAgICAgICAtLXJlbWFpbmluZyB8fCByZXNvbHZlKHZhbHVlcyk7XG4gICAgICAgIH0sIHJlamVjdCk7XG4gICAgICB9KTtcbiAgICAgIC0tcmVtYWluaW5nIHx8IHJlc29sdmUodmFsdWVzKTtcbiAgICB9KTtcbiAgICBpZiAocmVzdWx0LmVycm9yKSByZWplY3QocmVzdWx0LnZhbHVlKTtcbiAgICByZXR1cm4gY2FwYWJpbGl0eS5wcm9taXNlO1xuICB9LFxuICAvLyBgUHJvbWlzZS5yYWNlYCBtZXRob2RcbiAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtcHJvbWlzZS5yYWNlXG4gIHJhY2U6IGZ1bmN0aW9uIHJhY2UoaXRlcmFibGUpIHtcbiAgICB2YXIgQyA9IHRoaXM7XG4gICAgdmFyIGNhcGFiaWxpdHkgPSBuZXdQcm9taXNlQ2FwYWJpbGl0eShDKTtcbiAgICB2YXIgcmVqZWN0ID0gY2FwYWJpbGl0eS5yZWplY3Q7XG4gICAgdmFyIHJlc3VsdCA9IHBlcmZvcm0oZnVuY3Rpb24gKCkge1xuICAgICAgdmFyICRwcm9taXNlUmVzb2x2ZSA9IGFGdW5jdGlvbihDLnJlc29sdmUpO1xuICAgICAgaXRlcmF0ZShpdGVyYWJsZSwgZnVuY3Rpb24gKHByb21pc2UpIHtcbiAgICAgICAgJHByb21pc2VSZXNvbHZlLmNhbGwoQywgcHJvbWlzZSkudGhlbihjYXBhYmlsaXR5LnJlc29sdmUsIHJlamVjdCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgICBpZiAocmVzdWx0LmVycm9yKSByZWplY3QocmVzdWx0LnZhbHVlKTtcbiAgICByZXR1cm4gY2FwYWJpbGl0eS5wcm9taXNlO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.promise.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.anchor.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.anchor.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.anchor` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.anchor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {\n anchor: function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5hbmNob3IuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLmFuY2hvci5qcz8xOGE1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUhUTUwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWh0bWwnKTtcbnZhciBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuYW5jaG9yYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuYW5jaG9yXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCgnYW5jaG9yJykgfSwge1xuICBhbmNob3I6IGZ1bmN0aW9uIGFuY2hvcihuYW1lKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2EnLCAnbmFtZScsIG5hbWUpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.anchor.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.big.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.big.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.big` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.big\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {\n big: function big() {\n return createHTML(this, 'big', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5iaWcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLmJpZy5qcz8xMzkzIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUhUTUwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWh0bWwnKTtcbnZhciBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuYmlnYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuYmlnXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCgnYmlnJykgfSwge1xuICBiaWc6IGZ1bmN0aW9uIGJpZygpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnYmlnJywgJycsICcnKTtcbiAgfVxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.big.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.blink.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.blink.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.blink` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.blink\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {\n blink: function blink() {\n return createHTML(this, 'blink', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5ibGluay5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuYmxpbmsuanM/MDRkMyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciBjcmVhdGVIVE1MID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NyZWF0ZS1odG1sJyk7XG52YXIgZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mb3JjZWQtc3RyaW5nLWh0bWwtbWV0aG9kJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLmJsaW5rYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuYmxpbmtcbiQoeyB0YXJnZXQ6ICdTdHJpbmcnLCBwcm90bzogdHJ1ZSwgZm9yY2VkOiBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kKCdibGluaycpIH0sIHtcbiAgYmxpbms6IGZ1bmN0aW9uIGJsaW5rKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdibGluaycsICcnLCAnJyk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.blink.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.bold.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.bold.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.bold` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.bold\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {\n bold: function bold() {\n return createHTML(this, 'b', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5ib2xkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5ib2xkLmpzP2NjNzEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgY3JlYXRlSFRNTCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jcmVhdGUtaHRtbCcpO1xudmFyIGZvcmNlZFN0cmluZ0hUTUxNZXRob2QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZm9yY2VkLXN0cmluZy1odG1sLW1ldGhvZCcpO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5ib2xkYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuYm9sZFxuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlLCBmb3JjZWQ6IGZvcmNlZFN0cmluZ0hUTUxNZXRob2QoJ2JvbGQnKSB9LCB7XG4gIGJvbGQ6IGZ1bmN0aW9uIGJvbGQoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2InLCAnJywgJycpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.bold.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.code-point-at.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.code-point-at.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar internalCodePointAt = __webpack_require__(/*! ../internals/string-at */ \"./node_modules/core-js/internals/string-at.js\");\n\n// `String.prototype.codePointAt` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n$({ target: 'String', proto: true }, {\n codePointAt: function codePointAt(pos) {\n return internalCodePointAt(this, pos);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5jb2RlLXBvaW50LWF0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5jb2RlLXBvaW50LWF0LmpzP2Y1YjIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgaW50ZXJuYWxDb2RlUG9pbnRBdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zdHJpbmctYXQnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuY29kZVBvaW50QXRgIG1ldGhvZFxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtc3RyaW5nLnByb3RvdHlwZS5jb2RlcG9pbnRhdFxuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlIH0sIHtcbiAgY29kZVBvaW50QXQ6IGZ1bmN0aW9uIGNvZGVQb2ludEF0KHBvcykge1xuICAgIHJldHVybiBpbnRlcm5hbENvZGVQb2ludEF0KHRoaXMsIHBvcyk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.code-point-at.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.ends-with.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.ends-with.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar validateArguments = __webpack_require__(/*! ../internals/validate-string-method-arguments */ \"./node_modules/core-js/internals/validate-string-method-arguments.js\");\nvar correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ \"./node_modules/core-js/internals/correct-is-regexp-logic.js\");\n\nvar ENDS_WITH = 'endsWith';\nvar nativeEndsWith = ''[ENDS_WITH];\nvar min = Math.min;\n\n// `String.prototype.endsWith` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic(ENDS_WITH) }, {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = validateArguments(this, searchString, ENDS_WITH);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n var search = String(searchString);\n return nativeEndsWith\n ? nativeEndsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5lbmRzLXdpdGguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLmVuZHMtd2l0aC5qcz84YTc5Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWxlbmd0aCcpO1xudmFyIHZhbGlkYXRlQXJndW1lbnRzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3ZhbGlkYXRlLXN0cmluZy1tZXRob2QtYXJndW1lbnRzJyk7XG52YXIgY29ycmVjdElzUmVnRXhwTG9naWMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY29ycmVjdC1pcy1yZWdleHAtbG9naWMnKTtcblxudmFyIEVORFNfV0lUSCA9ICdlbmRzV2l0aCc7XG52YXIgbmF0aXZlRW5kc1dpdGggPSAnJ1tFTkRTX1dJVEhdO1xudmFyIG1pbiA9IE1hdGgubWluO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5lbmRzV2l0aGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcucHJvdG90eXBlLmVuZHN3aXRoXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogIWNvcnJlY3RJc1JlZ0V4cExvZ2ljKEVORFNfV0lUSCkgfSwge1xuICBlbmRzV2l0aDogZnVuY3Rpb24gZW5kc1dpdGgoc2VhcmNoU3RyaW5nIC8qICwgZW5kUG9zaXRpb24gPSBAbGVuZ3RoICovKSB7XG4gICAgdmFyIHRoYXQgPSB2YWxpZGF0ZUFyZ3VtZW50cyh0aGlzLCBzZWFyY2hTdHJpbmcsIEVORFNfV0lUSCk7XG4gICAgdmFyIGVuZFBvc2l0aW9uID0gYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQ7XG4gICAgdmFyIGxlbiA9IHRvTGVuZ3RoKHRoYXQubGVuZ3RoKTtcbiAgICB2YXIgZW5kID0gZW5kUG9zaXRpb24gPT09IHVuZGVmaW5lZCA/IGxlbiA6IG1pbih0b0xlbmd0aChlbmRQb3NpdGlvbiksIGxlbik7XG4gICAgdmFyIHNlYXJjaCA9IFN0cmluZyhzZWFyY2hTdHJpbmcpO1xuICAgIHJldHVybiBuYXRpdmVFbmRzV2l0aFxuICAgICAgPyBuYXRpdmVFbmRzV2l0aC5jYWxsKHRoYXQsIHNlYXJjaCwgZW5kKVxuICAgICAgOiB0aGF0LnNsaWNlKGVuZCAtIHNlYXJjaC5sZW5ndGgsIGVuZCkgPT09IHNlYXJjaDtcbiAgfVxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.ends-with.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.fixed.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.fixed.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.fixed` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fixed\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {\n fixed: function fixed() {\n return createHTML(this, 'tt', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5maXhlZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuZml4ZWQuanM/YzdjZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciBjcmVhdGVIVE1MID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NyZWF0ZS1odG1sJyk7XG52YXIgZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mb3JjZWQtc3RyaW5nLWh0bWwtbWV0aG9kJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLmZpeGVkYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuZml4ZWRcbiQoeyB0YXJnZXQ6ICdTdHJpbmcnLCBwcm90bzogdHJ1ZSwgZm9yY2VkOiBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kKCdmaXhlZCcpIH0sIHtcbiAgZml4ZWQ6IGZ1bmN0aW9uIGZpeGVkKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICd0dCcsICcnLCAnJyk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.fixed.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.fontcolor.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.fontcolor.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.fontcolor` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {\n fontcolor: function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5mb250Y29sb3IuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLmZvbnRjb2xvci5qcz85NzY3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUhUTUwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWh0bWwnKTtcbnZhciBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuZm9udGNvbG9yYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuZm9udGNvbG9yXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCgnZm9udGNvbG9yJykgfSwge1xuICBmb250Y29sb3I6IGZ1bmN0aW9uIGZvbnRjb2xvcihjb2xvcikge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdmb250JywgJ2NvbG9yJywgY29sb3IpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.fontcolor.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.fontsize.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.fontsize.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.fontsize` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {\n fontsize: function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5mb250c2l6ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuZm9udHNpemUuanM/MTkxMyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciBjcmVhdGVIVE1MID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NyZWF0ZS1odG1sJyk7XG52YXIgZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mb3JjZWQtc3RyaW5nLWh0bWwtbWV0aG9kJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLmZvbnRzaXplYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuZm9udHNpemVcbiQoeyB0YXJnZXQ6ICdTdHJpbmcnLCBwcm90bzogdHJ1ZSwgZm9yY2VkOiBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kKCdmb250c2l6ZScpIH0sIHtcbiAgZm9udHNpemU6IGZ1bmN0aW9uIGZvbnRzaXplKHNpemUpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnZm9udCcsICdzaXplJywgc2l6ZSk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.fontsize.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.from-code-point.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.from-code-point.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\n\nvar fromCharCode = String.fromCharCode;\nvar nativeFromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\nvar INCORRECT_LENGTH = !!nativeFromCodePoint && nativeFromCodePoint.length != 1;\n\n// `String.fromCodePoint` method\n// https://tc39.github.io/ecma262/#sec-string.fromcodepoint\n$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var elements = [];\n var length = arguments.length;\n var i = 0;\n var code;\n while (length > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');\n elements.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)\n );\n } return elements.join('');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5mcm9tLWNvZGUtcG9pbnQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLmZyb20tY29kZS1wb2ludC5qcz9mNmQ2Il0sInNvdXJjZXNDb250ZW50IjpbInZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIHRvQWJzb2x1dGVJbmRleCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1hYnNvbHV0ZS1pbmRleCcpO1xuXG52YXIgZnJvbUNoYXJDb2RlID0gU3RyaW5nLmZyb21DaGFyQ29kZTtcbnZhciBuYXRpdmVGcm9tQ29kZVBvaW50ID0gU3RyaW5nLmZyb21Db2RlUG9pbnQ7XG5cbi8vIGxlbmd0aCBzaG91bGQgYmUgMSwgb2xkIEZGIHByb2JsZW1cbnZhciBJTkNPUlJFQ1RfTEVOR1RIID0gISFuYXRpdmVGcm9tQ29kZVBvaW50ICYmIG5hdGl2ZUZyb21Db2RlUG9pbnQubGVuZ3RoICE9IDE7XG5cbi8vIGBTdHJpbmcuZnJvbUNvZGVQb2ludGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcuZnJvbWNvZGVwb2ludFxuJCh7IHRhcmdldDogJ1N0cmluZycsIHN0YXQ6IHRydWUsIGZvcmNlZDogSU5DT1JSRUNUX0xFTkdUSCB9LCB7XG4gIGZyb21Db2RlUG9pbnQ6IGZ1bmN0aW9uIGZyb21Db2RlUG9pbnQoeCkgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzXG4gICAgdmFyIGVsZW1lbnRzID0gW107XG4gICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBjb2RlO1xuICAgIHdoaWxlIChsZW5ndGggPiBpKSB7XG4gICAgICBjb2RlID0gK2FyZ3VtZW50c1tpKytdO1xuICAgICAgaWYgKHRvQWJzb2x1dGVJbmRleChjb2RlLCAweDEwRkZGRikgIT09IGNvZGUpIHRocm93IFJhbmdlRXJyb3IoY29kZSArICcgaXMgbm90IGEgdmFsaWQgY29kZSBwb2ludCcpO1xuICAgICAgZWxlbWVudHMucHVzaChjb2RlIDwgMHgxMDAwMFxuICAgICAgICA/IGZyb21DaGFyQ29kZShjb2RlKVxuICAgICAgICA6IGZyb21DaGFyQ29kZSgoKGNvZGUgLT0gMHgxMDAwMCkgPj4gMTApICsgMHhEODAwLCBjb2RlICUgMHg0MDAgKyAweERDMDApXG4gICAgICApO1xuICAgIH0gcmV0dXJuIGVsZW1lbnRzLmpvaW4oJycpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.from-code-point.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.includes.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.includes.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar validateArguments = __webpack_require__(/*! ../internals/validate-string-method-arguments */ \"./node_modules/core-js/internals/validate-string-method-arguments.js\");\nvar correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ \"./node_modules/core-js/internals/correct-is-regexp-logic.js\");\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~validateArguments(this, searchString, 'includes')\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5pbmNsdWRlcy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuaW5jbHVkZXMuanM/MjUzMiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciB2YWxpZGF0ZUFyZ3VtZW50cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy92YWxpZGF0ZS1zdHJpbmctbWV0aG9kLWFyZ3VtZW50cycpO1xudmFyIGNvcnJlY3RJc1JlZ0V4cExvZ2ljID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NvcnJlY3QtaXMtcmVnZXhwLWxvZ2ljJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLmluY2x1ZGVzYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuaW5jbHVkZXNcbiQoeyB0YXJnZXQ6ICdTdHJpbmcnLCBwcm90bzogdHJ1ZSwgZm9yY2VkOiAhY29ycmVjdElzUmVnRXhwTG9naWMoJ2luY2x1ZGVzJykgfSwge1xuICBpbmNsdWRlczogZnVuY3Rpb24gaW5jbHVkZXMoc2VhcmNoU3RyaW5nIC8qICwgcG9zaXRpb24gPSAwICovKSB7XG4gICAgcmV0dXJuICEhfnZhbGlkYXRlQXJndW1lbnRzKHRoaXMsIHNlYXJjaFN0cmluZywgJ2luY2x1ZGVzJylcbiAgICAgIC5pbmRleE9mKHNlYXJjaFN0cmluZywgYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.includes.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.italics.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.italics.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.italics` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.italics\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {\n italics: function italics() {\n return createHTML(this, 'i', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5pdGFsaWNzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5pdGFsaWNzLmpzP2M1ZDAiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgY3JlYXRlSFRNTCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jcmVhdGUtaHRtbCcpO1xudmFyIGZvcmNlZFN0cmluZ0hUTUxNZXRob2QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZm9yY2VkLXN0cmluZy1odG1sLW1ldGhvZCcpO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5pdGFsaWNzYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuaXRhbGljc1xuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlLCBmb3JjZWQ6IGZvcmNlZFN0cmluZ0hUTUxNZXRob2QoJ2l0YWxpY3MnKSB9LCB7XG4gIGl0YWxpY3M6IGZ1bmN0aW9uIGl0YWxpY3MoKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2knLCAnJywgJycpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.italics.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.iterator.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.iterator.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar codePointAt = __webpack_require__(/*! ../internals/string-at */ \"./node_modules/core-js/internals/string-at.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar defineIterator = __webpack_require__(/*! ../internals/define-iterator */ \"./node_modules/core-js/internals/define-iterator.js\");\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = codePointAt(string, index, true);\n state.index += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5pdGVyYXRvci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuaXRlcmF0b3IuanM/M2NhMyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgY29kZVBvaW50QXQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc3RyaW5nLWF0Jyk7XG52YXIgSW50ZXJuYWxTdGF0ZU1vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pbnRlcm5hbC1zdGF0ZScpO1xudmFyIGRlZmluZUl0ZXJhdG9yID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2RlZmluZS1pdGVyYXRvcicpO1xuXG52YXIgU1RSSU5HX0lURVJBVE9SID0gJ1N0cmluZyBJdGVyYXRvcic7XG52YXIgc2V0SW50ZXJuYWxTdGF0ZSA9IEludGVybmFsU3RhdGVNb2R1bGUuc2V0O1xudmFyIGdldEludGVybmFsU3RhdGUgPSBJbnRlcm5hbFN0YXRlTW9kdWxlLmdldHRlckZvcihTVFJJTkdfSVRFUkFUT1IpO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZVtAQGl0ZXJhdG9yXWAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcucHJvdG90eXBlLUBAaXRlcmF0b3JcbmRlZmluZUl0ZXJhdG9yKFN0cmluZywgJ1N0cmluZycsIGZ1bmN0aW9uIChpdGVyYXRlZCkge1xuICBzZXRJbnRlcm5hbFN0YXRlKHRoaXMsIHtcbiAgICB0eXBlOiBTVFJJTkdfSVRFUkFUT1IsXG4gICAgc3RyaW5nOiBTdHJpbmcoaXRlcmF0ZWQpLFxuICAgIGluZGV4OiAwXG4gIH0pO1xuLy8gYCVTdHJpbmdJdGVyYXRvclByb3RvdHlwZSUubmV4dGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy0lc3RyaW5naXRlcmF0b3Jwcm90b3R5cGUlLm5leHRcbn0sIGZ1bmN0aW9uIG5leHQoKSB7XG4gIHZhciBzdGF0ZSA9IGdldEludGVybmFsU3RhdGUodGhpcyk7XG4gIHZhciBzdHJpbmcgPSBzdGF0ZS5zdHJpbmc7XG4gIHZhciBpbmRleCA9IHN0YXRlLmluZGV4O1xuICB2YXIgcG9pbnQ7XG4gIGlmIChpbmRleCA+PSBzdHJpbmcubGVuZ3RoKSByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIHBvaW50ID0gY29kZVBvaW50QXQoc3RyaW5nLCBpbmRleCwgdHJ1ZSk7XG4gIHN0YXRlLmluZGV4ICs9IHBvaW50Lmxlbmd0aDtcbiAgcmV0dXJuIHsgdmFsdWU6IHBvaW50LCBkb25lOiBmYWxzZSB9O1xufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.iterator.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.link.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.link.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.link` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.link\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {\n link: function link(url) {\n return createHTML(this, 'a', 'href', url);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5saW5rLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5saW5rLmpzPzk5MTEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgY3JlYXRlSFRNTCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9jcmVhdGUtaHRtbCcpO1xudmFyIGZvcmNlZFN0cmluZ0hUTUxNZXRob2QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZm9yY2VkLXN0cmluZy1odG1sLW1ldGhvZCcpO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5saW5rYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUubGlua1xuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlLCBmb3JjZWQ6IGZvcmNlZFN0cmluZ0hUTUxNZXRob2QoJ2xpbmsnKSB9LCB7XG4gIGxpbms6IGZ1bmN0aW9uIGxpbmsodXJsKSB7XG4gICAgcmV0dXJuIGNyZWF0ZUhUTUwodGhpcywgJ2EnLCAnaHJlZicsIHVybCk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.link.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.match-all.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.match-all.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ \"./node_modules/core-js/internals/create-iterator-constructor.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js/internals/a-function.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar getFlags = __webpack_require__(/*! ../internals/regexp-flags */ \"./node_modules/core-js/internals/regexp-flags.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ \"./node_modules/core-js/internals/advance-string-index.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar MATCH_ALL = wellKnownSymbol('matchAll');\nvar REGEXP_STRING = 'RegExp String';\nvar REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR);\nvar RegExpPrototype = RegExp.prototype;\nvar regExpBuiltinExec = RegExpPrototype.exec;\n\nvar regExpExec = function (R, S) {\n var exec = R.exec;\n var result;\n if (typeof exec == 'function') {\n result = exec.call(R, S);\n if (typeof result != 'object') throw TypeError('Incorrect exec result');\n return result;\n } return regExpBuiltinExec.call(R, S);\n};\n\n// eslint-disable-next-line max-len\nvar $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, global, fullUnicode) {\n setInternalState(this, {\n type: REGEXP_STRING_ITERATOR,\n regexp: regexp,\n string: string,\n global: global,\n unicode: fullUnicode,\n done: false\n });\n}, REGEXP_STRING, function next() {\n var state = getInternalState(this);\n if (state.done) return { value: undefined, done: true };\n var R = state.regexp;\n var S = state.string;\n var match = regExpExec(R, S);\n if (match === null) return { value: undefined, done: state.done = true };\n if (state.global) {\n if (String(match[0]) == '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode);\n return { value: match, done: false };\n }\n state.done = true;\n return { value: match, done: false };\n});\n\nvar $matchAll = function (string) {\n var R = anObject(this);\n var S = String(string);\n var C, flagsValue, flags, matcher, global, fullUnicode;\n C = speciesConstructor(R, RegExp);\n flagsValue = R.flags;\n if (flagsValue === undefined && R instanceof RegExp && !('flags' in RegExpPrototype)) {\n flagsValue = getFlags.call(R);\n }\n flags = flagsValue === undefined ? '' : String(flagsValue);\n matcher = new C(C === RegExp ? R.source : R, flags);\n global = !!~flags.indexOf('g');\n fullUnicode = !!~flags.indexOf('u');\n matcher.lastIndex = toLength(R.lastIndex);\n return new $RegExpStringIterator(matcher, S, global, fullUnicode);\n};\n\n// `String.prototype.matchAll` method\n// https://github.com/tc39/proposal-string-matchall\n$({ target: 'String', proto: true }, {\n matchAll: function matchAll(regexp) {\n var O = requireObjectCoercible(this);\n var S, matcher, rx;\n if (regexp != null) {\n matcher = regexp[MATCH_ALL];\n if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll;\n if (matcher != null) return aFunction(matcher).call(regexp, O);\n }\n S = String(O);\n rx = new RegExp(regexp, 'g');\n return IS_PURE ? $matchAll.call(rx, S) : rx[MATCH_ALL](S);\n }\n});\n\nIS_PURE || MATCH_ALL in RegExpPrototype || hide(RegExpPrototype, MATCH_ALL, $matchAll);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5tYXRjaC1hbGwuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLm1hdGNoLWFsbC5qcz9hMWYwIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUl0ZXJhdG9yQ29uc3RydWN0b3IgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWl0ZXJhdG9yLWNvbnN0cnVjdG9yJyk7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1sZW5ndGgnKTtcbnZhciBhRnVuY3Rpb24gPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYS1mdW5jdGlvbicpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xudmFyIGNsYXNzb2YgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY2xhc3NvZicpO1xudmFyIGdldEZsYWdzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3JlZ2V4cC1mbGFncycpO1xudmFyIGhpZGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaGlkZScpO1xudmFyIHdlbGxLbm93blN5bWJvbCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy93ZWxsLWtub3duLXN5bWJvbCcpO1xudmFyIHNwZWNpZXNDb25zdHJ1Y3RvciA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zcGVjaWVzLWNvbnN0cnVjdG9yJyk7XG52YXIgYWR2YW5jZVN0cmluZ0luZGV4ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FkdmFuY2Utc3RyaW5nLWluZGV4Jyk7XG52YXIgSW50ZXJuYWxTdGF0ZU1vZHVsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9pbnRlcm5hbC1zdGF0ZScpO1xudmFyIElTX1BVUkUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvaXMtcHVyZScpO1xuXG52YXIgTUFUQ0hfQUxMID0gd2VsbEtub3duU3ltYm9sKCdtYXRjaEFsbCcpO1xudmFyIFJFR0VYUF9TVFJJTkcgPSAnUmVnRXhwIFN0cmluZyc7XG52YXIgUkVHRVhQX1NUUklOR19JVEVSQVRPUiA9IFJFR0VYUF9TVFJJTkcgKyAnIEl0ZXJhdG9yJztcbnZhciBzZXRJbnRlcm5hbFN0YXRlID0gSW50ZXJuYWxTdGF0ZU1vZHVsZS5zZXQ7XG52YXIgZ2V0SW50ZXJuYWxTdGF0ZSA9IEludGVybmFsU3RhdGVNb2R1bGUuZ2V0dGVyRm9yKFJFR0VYUF9TVFJJTkdfSVRFUkFUT1IpO1xudmFyIFJlZ0V4cFByb3RvdHlwZSA9IFJlZ0V4cC5wcm90b3R5cGU7XG52YXIgcmVnRXhwQnVpbHRpbkV4ZWMgPSBSZWdFeHBQcm90b3R5cGUuZXhlYztcblxudmFyIHJlZ0V4cEV4ZWMgPSBmdW5jdGlvbiAoUiwgUykge1xuICB2YXIgZXhlYyA9IFIuZXhlYztcbiAgdmFyIHJlc3VsdDtcbiAgaWYgKHR5cGVvZiBleGVjID09ICdmdW5jdGlvbicpIHtcbiAgICByZXN1bHQgPSBleGVjLmNhbGwoUiwgUyk7XG4gICAgaWYgKHR5cGVvZiByZXN1bHQgIT0gJ29iamVjdCcpIHRocm93IFR5cGVFcnJvcignSW5jb3JyZWN0IGV4ZWMgcmVzdWx0Jyk7XG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfSByZXR1cm4gcmVnRXhwQnVpbHRpbkV4ZWMuY2FsbChSLCBTKTtcbn07XG5cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBtYXgtbGVuXG52YXIgJFJlZ0V4cFN0cmluZ0l0ZXJhdG9yID0gY3JlYXRlSXRlcmF0b3JDb25zdHJ1Y3RvcihmdW5jdGlvbiBSZWdFeHBTdHJpbmdJdGVyYXRvcihyZWdleHAsIHN0cmluZywgZ2xvYmFsLCBmdWxsVW5pY29kZSkge1xuICBzZXRJbnRlcm5hbFN0YXRlKHRoaXMsIHtcbiAgICB0eXBlOiBSRUdFWFBfU1RSSU5HX0lURVJBVE9SLFxuICAgIHJlZ2V4cDogcmVnZXhwLFxuICAgIHN0cmluZzogc3RyaW5nLFxuICAgIGdsb2JhbDogZ2xvYmFsLFxuICAgIHVuaWNvZGU6IGZ1bGxVbmljb2RlLFxuICAgIGRvbmU6IGZhbHNlXG4gIH0pO1xufSwgUkVHRVhQX1NUUklORywgZnVuY3Rpb24gbmV4dCgpIHtcbiAgdmFyIHN0YXRlID0gZ2V0SW50ZXJuYWxTdGF0ZSh0aGlzKTtcbiAgaWYgKHN0YXRlLmRvbmUpIHJldHVybiB7IHZhbHVlOiB1bmRlZmluZWQsIGRvbmU6IHRydWUgfTtcbiAgdmFyIFIgPSBzdGF0ZS5yZWdleHA7XG4gIHZhciBTID0gc3RhdGUuc3RyaW5nO1xuICB2YXIgbWF0Y2ggPSByZWdFeHBFeGVjKFIsIFMpO1xuICBpZiAobWF0Y2ggPT09IG51bGwpIHJldHVybiB7IHZhbHVlOiB1bmRlZmluZWQsIGRvbmU6IHN0YXRlLmRvbmUgPSB0cnVlIH07XG4gIGlmIChzdGF0ZS5nbG9iYWwpIHtcbiAgICBpZiAoU3RyaW5nKG1hdGNoWzBdKSA9PSAnJykgUi5sYXN0SW5kZXggPSBhZHZhbmNlU3RyaW5nSW5kZXgoUywgdG9MZW5ndGgoUi5sYXN0SW5kZXgpLCBzdGF0ZS51bmljb2RlKTtcbiAgICByZXR1cm4geyB2YWx1ZTogbWF0Y2gsIGRvbmU6IGZhbHNlIH07XG4gIH1cbiAgc3RhdGUuZG9uZSA9IHRydWU7XG4gIHJldHVybiB7IHZhbHVlOiBtYXRjaCwgZG9uZTogZmFsc2UgfTtcbn0pO1xuXG52YXIgJG1hdGNoQWxsID0gZnVuY3Rpb24gKHN0cmluZykge1xuICB2YXIgUiA9IGFuT2JqZWN0KHRoaXMpO1xuICB2YXIgUyA9IFN0cmluZyhzdHJpbmcpO1xuICB2YXIgQywgZmxhZ3NWYWx1ZSwgZmxhZ3MsIG1hdGNoZXIsIGdsb2JhbCwgZnVsbFVuaWNvZGU7XG4gIEMgPSBzcGVjaWVzQ29uc3RydWN0b3IoUiwgUmVnRXhwKTtcbiAgZmxhZ3NWYWx1ZSA9IFIuZmxhZ3M7XG4gIGlmIChmbGFnc1ZhbHVlID09PSB1bmRlZmluZWQgJiYgUiBpbnN0YW5jZW9mIFJlZ0V4cCAmJiAhKCdmbGFncycgaW4gUmVnRXhwUHJvdG90eXBlKSkge1xuICAgIGZsYWdzVmFsdWUgPSBnZXRGbGFncy5jYWxsKFIpO1xuICB9XG4gIGZsYWdzID0gZmxhZ3NWYWx1ZSA9PT0gdW5kZWZpbmVkID8gJycgOiBTdHJpbmcoZmxhZ3NWYWx1ZSk7XG4gIG1hdGNoZXIgPSBuZXcgQyhDID09PSBSZWdFeHAgPyBSLnNvdXJjZSA6IFIsIGZsYWdzKTtcbiAgZ2xvYmFsID0gISF+ZmxhZ3MuaW5kZXhPZignZycpO1xuICBmdWxsVW5pY29kZSA9ICEhfmZsYWdzLmluZGV4T2YoJ3UnKTtcbiAgbWF0Y2hlci5sYXN0SW5kZXggPSB0b0xlbmd0aChSLmxhc3RJbmRleCk7XG4gIHJldHVybiBuZXcgJFJlZ0V4cFN0cmluZ0l0ZXJhdG9yKG1hdGNoZXIsIFMsIGdsb2JhbCwgZnVsbFVuaWNvZGUpO1xufTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUubWF0Y2hBbGxgIG1ldGhvZFxuLy8gaHR0cHM6Ly9naXRodWIuY29tL3RjMzkvcHJvcG9zYWwtc3RyaW5nLW1hdGNoYWxsXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUgfSwge1xuICBtYXRjaEFsbDogZnVuY3Rpb24gbWF0Y2hBbGwocmVnZXhwKSB7XG4gICAgdmFyIE8gPSByZXF1aXJlT2JqZWN0Q29lcmNpYmxlKHRoaXMpO1xuICAgIHZhciBTLCBtYXRjaGVyLCByeDtcbiAgICBpZiAocmVnZXhwICE9IG51bGwpIHtcbiAgICAgIG1hdGNoZXIgPSByZWdleHBbTUFUQ0hfQUxMXTtcbiAgICAgIGlmIChtYXRjaGVyID09PSB1bmRlZmluZWQgJiYgSVNfUFVSRSAmJiBjbGFzc29mKHJlZ2V4cCkgPT0gJ1JlZ0V4cCcpIG1hdGNoZXIgPSAkbWF0Y2hBbGw7XG4gICAgICBpZiAobWF0Y2hlciAhPSBudWxsKSByZXR1cm4gYUZ1bmN0aW9uKG1hdGNoZXIpLmNhbGwocmVnZXhwLCBPKTtcbiAgICB9XG4gICAgUyA9IFN0cmluZyhPKTtcbiAgICByeCA9IG5ldyBSZWdFeHAocmVnZXhwLCAnZycpO1xuICAgIHJldHVybiBJU19QVVJFID8gJG1hdGNoQWxsLmNhbGwocngsIFMpIDogcnhbTUFUQ0hfQUxMXShTKTtcbiAgfVxufSk7XG5cbklTX1BVUkUgfHwgTUFUQ0hfQUxMIGluIFJlZ0V4cFByb3RvdHlwZSB8fCBoaWRlKFJlZ0V4cFByb3RvdHlwZSwgTUFUQ0hfQUxMLCAkbWF0Y2hBbGwpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.match-all.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.match.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.match.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ \"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ \"./node_modules/core-js/internals/advance-string-index.js\");\nvar regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ \"./node_modules/core-js/internals/regexp-exec-abstract.js\");\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5tYXRjaC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcubWF0Y2guanM/NDY2ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgZml4UmVnRXhwV2VsbEtub3duU3ltYm9sTG9naWMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZml4LXJlZ2V4cC13ZWxsLWtub3duLXN5bWJvbC1sb2dpYycpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWxlbmd0aCcpO1xudmFyIHJlcXVpcmVPYmplY3RDb2VyY2libGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlJyk7XG52YXIgYWR2YW5jZVN0cmluZ0luZGV4ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FkdmFuY2Utc3RyaW5nLWluZGV4Jyk7XG52YXIgcmVnRXhwRXhlYyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZWdleHAtZXhlYy1hYnN0cmFjdCcpO1xuXG4vLyBAQG1hdGNoIGxvZ2ljXG5maXhSZWdFeHBXZWxsS25vd25TeW1ib2xMb2dpYygnbWF0Y2gnLCAxLCBmdW5jdGlvbiAoTUFUQ0gsIG5hdGl2ZU1hdGNoLCBtYXliZUNhbGxOYXRpdmUpIHtcbiAgcmV0dXJuIFtcbiAgICAvLyBgU3RyaW5nLnByb3RvdHlwZS5tYXRjaGAgbWV0aG9kXG4gICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtc3RyaW5nLnByb3RvdHlwZS5tYXRjaFxuICAgIGZ1bmN0aW9uIG1hdGNoKHJlZ2V4cCkge1xuICAgICAgdmFyIE8gPSByZXF1aXJlT2JqZWN0Q29lcmNpYmxlKHRoaXMpO1xuICAgICAgdmFyIG1hdGNoZXIgPSByZWdleHAgPT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogcmVnZXhwW01BVENIXTtcbiAgICAgIHJldHVybiBtYXRjaGVyICE9PSB1bmRlZmluZWQgPyBtYXRjaGVyLmNhbGwocmVnZXhwLCBPKSA6IG5ldyBSZWdFeHAocmVnZXhwKVtNQVRDSF0oU3RyaW5nKE8pKTtcbiAgICB9LFxuICAgIC8vIGBSZWdFeHAucHJvdG90eXBlW0BAbWF0Y2hdYCBtZXRob2RcbiAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1yZWdleHAucHJvdG90eXBlLUBAbWF0Y2hcbiAgICBmdW5jdGlvbiAocmVnZXhwKSB7XG4gICAgICB2YXIgcmVzID0gbWF5YmVDYWxsTmF0aXZlKG5hdGl2ZU1hdGNoLCByZWdleHAsIHRoaXMpO1xuICAgICAgaWYgKHJlcy5kb25lKSByZXR1cm4gcmVzLnZhbHVlO1xuXG4gICAgICB2YXIgcnggPSBhbk9iamVjdChyZWdleHApO1xuICAgICAgdmFyIFMgPSBTdHJpbmcodGhpcyk7XG5cbiAgICAgIGlmICghcnguZ2xvYmFsKSByZXR1cm4gcmVnRXhwRXhlYyhyeCwgUyk7XG5cbiAgICAgIHZhciBmdWxsVW5pY29kZSA9IHJ4LnVuaWNvZGU7XG4gICAgICByeC5sYXN0SW5kZXggPSAwO1xuICAgICAgdmFyIEEgPSBbXTtcbiAgICAgIHZhciBuID0gMDtcbiAgICAgIHZhciByZXN1bHQ7XG4gICAgICB3aGlsZSAoKHJlc3VsdCA9IHJlZ0V4cEV4ZWMocngsIFMpKSAhPT0gbnVsbCkge1xuICAgICAgICB2YXIgbWF0Y2hTdHIgPSBTdHJpbmcocmVzdWx0WzBdKTtcbiAgICAgICAgQVtuXSA9IG1hdGNoU3RyO1xuICAgICAgICBpZiAobWF0Y2hTdHIgPT09ICcnKSByeC5sYXN0SW5kZXggPSBhZHZhbmNlU3RyaW5nSW5kZXgoUywgdG9MZW5ndGgocngubGFzdEluZGV4KSwgZnVsbFVuaWNvZGUpO1xuICAgICAgICBuKys7XG4gICAgICB9XG4gICAgICByZXR1cm4gbiA9PT0gMCA/IG51bGwgOiBBO1xuICAgIH1cbiAgXTtcbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.match.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.pad-end.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.pad-end.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar internalStringPad = __webpack_require__(/*! ../internals/string-pad */ \"./node_modules/core-js/internals/string-pad.js\");\nvar WEBKIT_BUG = __webpack_require__(/*! ../internals/webkit-string-pad-bug */ \"./node_modules/core-js/internals/webkit-string-pad-bug.js\");\n\n// `String.prototype.padEnd` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.padend\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return internalStringPad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5wYWQtZW5kLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5wYWQtZW5kLmpzPzg0M2MiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgaW50ZXJuYWxTdHJpbmdQYWQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc3RyaW5nLXBhZCcpO1xudmFyIFdFQktJVF9CVUcgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2Via2l0LXN0cmluZy1wYWQtYnVnJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLnBhZEVuZGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcucHJvdG90eXBlLnBhZGVuZFxuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlLCBmb3JjZWQ6IFdFQktJVF9CVUcgfSwge1xuICBwYWRFbmQ6IGZ1bmN0aW9uIHBhZEVuZChtYXhMZW5ndGggLyogLCBmaWxsU3RyaW5nID0gJyAnICovKSB7XG4gICAgcmV0dXJuIGludGVybmFsU3RyaW5nUGFkKHRoaXMsIG1heExlbmd0aCwgYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQsIGZhbHNlKTtcbiAgfVxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.pad-end.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.pad-start.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.pad-start.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar internalStringPad = __webpack_require__(/*! ../internals/string-pad */ \"./node_modules/core-js/internals/string-pad.js\");\nvar WEBKIT_BUG = __webpack_require__(/*! ../internals/webkit-string-pad-bug */ \"./node_modules/core-js/internals/webkit-string-pad-bug.js\");\n\n// `String.prototype.padStart` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return internalStringPad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5wYWQtc3RhcnQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnBhZC1zdGFydC5qcz80ZDkwIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGludGVybmFsU3RyaW5nUGFkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3N0cmluZy1wYWQnKTtcbnZhciBXRUJLSVRfQlVHID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3dlYmtpdC1zdHJpbmctcGFkLWJ1ZycpO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5wYWRTdGFydGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcucHJvdG90eXBlLnBhZHN0YXJ0XG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogV0VCS0lUX0JVRyB9LCB7XG4gIHBhZFN0YXJ0OiBmdW5jdGlvbiBwYWRTdGFydChtYXhMZW5ndGggLyogLCBmaWxsU3RyaW5nID0gJyAnICovKSB7XG4gICAgcmV0dXJuIGludGVybmFsU3RyaW5nUGFkKHRoaXMsIG1heExlbmd0aCwgYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQsIHRydWUpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.pad-start.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.raw.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.raw.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\n\n// `String.raw` method\n// https://tc39.github.io/ecma262/#sec-string.raw\n$({ target: 'String', stat: true }, {\n raw: function raw(template) {\n var rawTemplate = toIndexedObject(template.raw);\n var literalSegments = toLength(rawTemplate.length);\n var argumentsLength = arguments.length;\n var elements = [];\n var i = 0;\n while (literalSegments > i) {\n elements.push(String(rawTemplate[i++]));\n if (i < argumentsLength) elements.push(String(arguments[i]));\n } return elements.join('');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5yYXcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnJhdy5qcz9kODBmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIHRvSW5kZXhlZE9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1pbmRleGVkLW9iamVjdCcpO1xudmFyIHRvTGVuZ3RoID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3RvLWxlbmd0aCcpO1xuXG4vLyBgU3RyaW5nLnJhd2AgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcucmF3XG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgc3RhdDogdHJ1ZSB9LCB7XG4gIHJhdzogZnVuY3Rpb24gcmF3KHRlbXBsYXRlKSB7XG4gICAgdmFyIHJhd1RlbXBsYXRlID0gdG9JbmRleGVkT2JqZWN0KHRlbXBsYXRlLnJhdyk7XG4gICAgdmFyIGxpdGVyYWxTZWdtZW50cyA9IHRvTGVuZ3RoKHJhd1RlbXBsYXRlLmxlbmd0aCk7XG4gICAgdmFyIGFyZ3VtZW50c0xlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgdmFyIGVsZW1lbnRzID0gW107XG4gICAgdmFyIGkgPSAwO1xuICAgIHdoaWxlIChsaXRlcmFsU2VnbWVudHMgPiBpKSB7XG4gICAgICBlbGVtZW50cy5wdXNoKFN0cmluZyhyYXdUZW1wbGF0ZVtpKytdKSk7XG4gICAgICBpZiAoaSA8IGFyZ3VtZW50c0xlbmd0aCkgZWxlbWVudHMucHVzaChTdHJpbmcoYXJndW1lbnRzW2ldKSk7XG4gICAgfSByZXR1cm4gZWxlbWVudHMuam9pbignJyk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.raw.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.repeat.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.repeat.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar repeat = __webpack_require__(/*! ../internals/string-repeat */ \"./node_modules/core-js/internals/string-repeat.js\");\n\n// `String.prototype.repeat` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\n$({ target: 'String', proto: true }, {\n repeat: repeat\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5yZXBlYXQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnJlcGVhdC5qcz8zOGNmIl0sInNvdXJjZXNDb250ZW50IjpbInZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIHJlcGVhdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9zdHJpbmctcmVwZWF0Jyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLnJlcGVhdGAgbWV0aG9kXG4vLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1zdHJpbmcucHJvdG90eXBlLnJlcGVhdFxuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlIH0sIHtcbiAgcmVwZWF0OiByZXBlYXRcbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.repeat.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.replace.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.replace.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ \"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js/internals/to-integer.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ \"./node_modules/core-js/internals/advance-string-index.js\");\nvar regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ \"./node_modules/core-js/internals/regexp-exec-abstract.js\");\n\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return nativeReplace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5yZXBsYWNlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5yZXBsYWNlLmpzPzUzMTkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGZpeFJlZ0V4cFdlbGxLbm93blN5bWJvbExvZ2ljID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZpeC1yZWdleHAtd2VsbC1rbm93bi1zeW1ib2wtbG9naWMnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9hbi1vYmplY3QnKTtcbnZhciB0b09iamVjdCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1vYmplY3QnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1sZW5ndGgnKTtcbnZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvdG8taW50ZWdlcicpO1xudmFyIHJlcXVpcmVPYmplY3RDb2VyY2libGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlJyk7XG52YXIgYWR2YW5jZVN0cmluZ0luZGV4ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FkdmFuY2Utc3RyaW5nLWluZGV4Jyk7XG52YXIgcmVnRXhwRXhlYyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZWdleHAtZXhlYy1hYnN0cmFjdCcpO1xuXG52YXIgbWF4ID0gTWF0aC5tYXg7XG52YXIgbWluID0gTWF0aC5taW47XG52YXIgZmxvb3IgPSBNYXRoLmZsb29yO1xudmFyIFNVQlNUSVRVVElPTl9TWU1CT0xTID0gL1xcJChbJCYnYF18XFxkXFxkP3w8W14+XSo+KS9nO1xudmFyIFNVQlNUSVRVVElPTl9TWU1CT0xTX05PX05BTUVEID0gL1xcJChbJCYnYF18XFxkXFxkPykvZztcblxudmFyIG1heWJlVG9TdHJpbmcgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIGl0ID09PSB1bmRlZmluZWQgPyBpdCA6IFN0cmluZyhpdCk7XG59O1xuXG4vLyBAQHJlcGxhY2UgbG9naWNcbmZpeFJlZ0V4cFdlbGxLbm93blN5bWJvbExvZ2ljKCdyZXBsYWNlJywgMiwgZnVuY3Rpb24gKFJFUExBQ0UsIG5hdGl2ZVJlcGxhY2UsIG1heWJlQ2FsbE5hdGl2ZSkge1xuICByZXR1cm4gW1xuICAgIC8vIGBTdHJpbmcucHJvdG90eXBlLnJlcGxhY2VgIG1ldGhvZFxuICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUucmVwbGFjZVxuICAgIGZ1bmN0aW9uIHJlcGxhY2Uoc2VhcmNoVmFsdWUsIHJlcGxhY2VWYWx1ZSkge1xuICAgICAgdmFyIE8gPSByZXF1aXJlT2JqZWN0Q29lcmNpYmxlKHRoaXMpO1xuICAgICAgdmFyIHJlcGxhY2VyID0gc2VhcmNoVmFsdWUgPT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogc2VhcmNoVmFsdWVbUkVQTEFDRV07XG4gICAgICByZXR1cm4gcmVwbGFjZXIgIT09IHVuZGVmaW5lZFxuICAgICAgICA/IHJlcGxhY2VyLmNhbGwoc2VhcmNoVmFsdWUsIE8sIHJlcGxhY2VWYWx1ZSlcbiAgICAgICAgOiBuYXRpdmVSZXBsYWNlLmNhbGwoU3RyaW5nKE8pLCBzZWFyY2hWYWx1ZSwgcmVwbGFjZVZhbHVlKTtcbiAgICB9LFxuICAgIC8vIGBSZWdFeHAucHJvdG90eXBlW0BAcmVwbGFjZV1gIG1ldGhvZFxuICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXJlZ2V4cC5wcm90b3R5cGUtQEByZXBsYWNlXG4gICAgZnVuY3Rpb24gKHJlZ2V4cCwgcmVwbGFjZVZhbHVlKSB7XG4gICAgICB2YXIgcmVzID0gbWF5YmVDYWxsTmF0aXZlKG5hdGl2ZVJlcGxhY2UsIHJlZ2V4cCwgdGhpcywgcmVwbGFjZVZhbHVlKTtcbiAgICAgIGlmIChyZXMuZG9uZSkgcmV0dXJuIHJlcy52YWx1ZTtcblxuICAgICAgdmFyIHJ4ID0gYW5PYmplY3QocmVnZXhwKTtcbiAgICAgIHZhciBTID0gU3RyaW5nKHRoaXMpO1xuXG4gICAgICB2YXIgZnVuY3Rpb25hbFJlcGxhY2UgPSB0eXBlb2YgcmVwbGFjZVZhbHVlID09PSAnZnVuY3Rpb24nO1xuICAgICAgaWYgKCFmdW5jdGlvbmFsUmVwbGFjZSkgcmVwbGFjZVZhbHVlID0gU3RyaW5nKHJlcGxhY2VWYWx1ZSk7XG5cbiAgICAgIHZhciBnbG9iYWwgPSByeC5nbG9iYWw7XG4gICAgICBpZiAoZ2xvYmFsKSB7XG4gICAgICAgIHZhciBmdWxsVW5pY29kZSA9IHJ4LnVuaWNvZGU7XG4gICAgICAgIHJ4Lmxhc3RJbmRleCA9IDA7XG4gICAgICB9XG4gICAgICB2YXIgcmVzdWx0cyA9IFtdO1xuICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgdmFyIHJlc3VsdCA9IHJlZ0V4cEV4ZWMocngsIFMpO1xuICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKSBicmVhaztcblxuICAgICAgICByZXN1bHRzLnB1c2gocmVzdWx0KTtcbiAgICAgICAgaWYgKCFnbG9iYWwpIGJyZWFrO1xuXG4gICAgICAgIHZhciBtYXRjaFN0ciA9IFN0cmluZyhyZXN1bHRbMF0pO1xuICAgICAgICBpZiAobWF0Y2hTdHIgPT09ICcnKSByeC5sYXN0SW5kZXggPSBhZHZhbmNlU3RyaW5nSW5kZXgoUywgdG9MZW5ndGgocngubGFzdEluZGV4KSwgZnVsbFVuaWNvZGUpO1xuICAgICAgfVxuXG4gICAgICB2YXIgYWNjdW11bGF0ZWRSZXN1bHQgPSAnJztcbiAgICAgIHZhciBuZXh0U291cmNlUG9zaXRpb24gPSAwO1xuICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCByZXN1bHRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHJlc3VsdCA9IHJlc3VsdHNbaV07XG5cbiAgICAgICAgdmFyIG1hdGNoZWQgPSBTdHJpbmcocmVzdWx0WzBdKTtcbiAgICAgICAgdmFyIHBvc2l0aW9uID0gbWF4KG1pbih0b0ludGVnZXIocmVzdWx0LmluZGV4KSwgUy5sZW5ndGgpLCAwKTtcbiAgICAgICAgdmFyIGNhcHR1cmVzID0gW107XG4gICAgICAgIC8vIE5PVEU6IFRoaXMgaXMgZXF1aXZhbGVudCB0b1xuICAgICAgICAvLyAgIGNhcHR1cmVzID0gcmVzdWx0LnNsaWNlKDEpLm1hcChtYXliZVRvU3RyaW5nKVxuICAgICAgICAvLyBidXQgZm9yIHNvbWUgcmVhc29uIGBuYXRpdmVTbGljZS5jYWxsKHJlc3VsdCwgMSwgcmVzdWx0Lmxlbmd0aClgIChjYWxsZWQgaW5cbiAgICAgICAgLy8gdGhlIHNsaWNlIHBvbHlmaWxsIHdoZW4gc2xpY2luZyBuYXRpdmUgYXJyYXlzKSBcImRvZXNuJ3Qgd29ya1wiIGluIHNhZmFyaSA5IGFuZFxuICAgICAgICAvLyBjYXVzZXMgYSBjcmFzaCAoaHR0cHM6Ly9wYXN0ZWJpbi5jb20vTjIxUXplUUEpIHdoZW4gdHJ5aW5nIHRvIGRlYnVnIGl0LlxuICAgICAgICBmb3IgKHZhciBqID0gMTsgaiA8IHJlc3VsdC5sZW5ndGg7IGorKykgY2FwdHVyZXMucHVzaChtYXliZVRvU3RyaW5nKHJlc3VsdFtqXSkpO1xuICAgICAgICB2YXIgbmFtZWRDYXB0dXJlcyA9IHJlc3VsdC5ncm91cHM7XG4gICAgICAgIGlmIChmdW5jdGlvbmFsUmVwbGFjZSkge1xuICAgICAgICAgIHZhciByZXBsYWNlckFyZ3MgPSBbbWF0Y2hlZF0uY29uY2F0KGNhcHR1cmVzLCBwb3NpdGlvbiwgUyk7XG4gICAgICAgICAgaWYgKG5hbWVkQ2FwdHVyZXMgIT09IHVuZGVmaW5lZCkgcmVwbGFjZXJBcmdzLnB1c2gobmFtZWRDYXB0dXJlcyk7XG4gICAgICAgICAgdmFyIHJlcGxhY2VtZW50ID0gU3RyaW5nKHJlcGxhY2VWYWx1ZS5hcHBseSh1bmRlZmluZWQsIHJlcGxhY2VyQXJncykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlcGxhY2VtZW50ID0gZ2V0U3Vic3RpdHV0aW9uKG1hdGNoZWQsIFMsIHBvc2l0aW9uLCBjYXB0dXJlcywgbmFtZWRDYXB0dXJlcywgcmVwbGFjZVZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocG9zaXRpb24gPj0gbmV4dFNvdXJjZVBvc2l0aW9uKSB7XG4gICAgICAgICAgYWNjdW11bGF0ZWRSZXN1bHQgKz0gUy5zbGljZShuZXh0U291cmNlUG9zaXRpb24sIHBvc2l0aW9uKSArIHJlcGxhY2VtZW50O1xuICAgICAgICAgIG5leHRTb3VyY2VQb3NpdGlvbiA9IHBvc2l0aW9uICsgbWF0Y2hlZC5sZW5ndGg7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBhY2N1bXVsYXRlZFJlc3VsdCArIFMuc2xpY2UobmV4dFNvdXJjZVBvc2l0aW9uKTtcbiAgICB9XG4gIF07XG5cbiAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtZ2V0c3Vic3RpdHV0aW9uXG4gIGZ1bmN0aW9uIGdldFN1YnN0aXR1dGlvbihtYXRjaGVkLCBzdHIsIHBvc2l0aW9uLCBjYXB0dXJlcywgbmFtZWRDYXB0dXJlcywgcmVwbGFjZW1lbnQpIHtcbiAgICB2YXIgdGFpbFBvcyA9IHBvc2l0aW9uICsgbWF0Y2hlZC5sZW5ndGg7XG4gICAgdmFyIG0gPSBjYXB0dXJlcy5sZW5ndGg7XG4gICAgdmFyIHN5bWJvbHMgPSBTVUJTVElUVVRJT05fU1lNQk9MU19OT19OQU1FRDtcbiAgICBpZiAobmFtZWRDYXB0dXJlcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICBuYW1lZENhcHR1cmVzID0gdG9PYmplY3QobmFtZWRDYXB0dXJlcyk7XG4gICAgICBzeW1ib2xzID0gU1VCU1RJVFVUSU9OX1NZTUJPTFM7XG4gICAgfVxuICAgIHJldHVybiBuYXRpdmVSZXBsYWNlLmNhbGwocmVwbGFjZW1lbnQsIHN5bWJvbHMsIGZ1bmN0aW9uIChtYXRjaCwgY2gpIHtcbiAgICAgIHZhciBjYXB0dXJlO1xuICAgICAgc3dpdGNoIChjaC5jaGFyQXQoMCkpIHtcbiAgICAgICAgY2FzZSAnJCc6IHJldHVybiAnJCc7XG4gICAgICAgIGNhc2UgJyYnOiByZXR1cm4gbWF0Y2hlZDtcbiAgICAgICAgY2FzZSAnYCc6IHJldHVybiBzdHIuc2xpY2UoMCwgcG9zaXRpb24pO1xuICAgICAgICBjYXNlIFwiJ1wiOiByZXR1cm4gc3RyLnNsaWNlKHRhaWxQb3MpO1xuICAgICAgICBjYXNlICc8JzpcbiAgICAgICAgICBjYXB0dXJlID0gbmFtZWRDYXB0dXJlc1tjaC5zbGljZSgxLCAtMSldO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OiAvLyBcXGRcXGQ/XG4gICAgICAgICAgdmFyIG4gPSArY2g7XG4gICAgICAgICAgaWYgKG4gPT09IDApIHJldHVybiBtYXRjaDtcbiAgICAgICAgICBpZiAobiA+IG0pIHtcbiAgICAgICAgICAgIHZhciBmID0gZmxvb3IobiAvIDEwKTtcbiAgICAgICAgICAgIGlmIChmID09PSAwKSByZXR1cm4gbWF0Y2g7XG4gICAgICAgICAgICBpZiAoZiA8PSBtKSByZXR1cm4gY2FwdHVyZXNbZiAtIDFdID09PSB1bmRlZmluZWQgPyBjaC5jaGFyQXQoMSkgOiBjYXB0dXJlc1tmIC0gMV0gKyBjaC5jaGFyQXQoMSk7XG4gICAgICAgICAgICByZXR1cm4gbWF0Y2g7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNhcHR1cmUgPSBjYXB0dXJlc1tuIC0gMV07XG4gICAgICB9XG4gICAgICByZXR1cm4gY2FwdHVyZSA9PT0gdW5kZWZpbmVkID8gJycgOiBjYXB0dXJlO1xuICAgIH0pO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.replace.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.search.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.search.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ \"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar sameValue = __webpack_require__(/*! ../internals/same-value */ \"./node_modules/core-js/internals/same-value.js\");\nvar regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ \"./node_modules/core-js/internals/regexp-exec-abstract.js\");\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zZWFyY2guanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnNlYXJjaC5qcz84NDFjIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciBmaXhSZWdFeHBXZWxsS25vd25TeW1ib2xMb2dpYyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9maXgtcmVnZXhwLXdlbGwta25vd24tc3ltYm9sLWxvZ2ljJyk7XG52YXIgYW5PYmplY3QgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYW4tb2JqZWN0Jyk7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUnKTtcbnZhciBzYW1lVmFsdWUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc2FtZS12YWx1ZScpO1xudmFyIHJlZ0V4cEV4ZWMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVnZXhwLWV4ZWMtYWJzdHJhY3QnKTtcblxuLy8gQEBzZWFyY2ggbG9naWNcbmZpeFJlZ0V4cFdlbGxLbm93blN5bWJvbExvZ2ljKCdzZWFyY2gnLCAxLCBmdW5jdGlvbiAoU0VBUkNILCBuYXRpdmVTZWFyY2gsIG1heWJlQ2FsbE5hdGl2ZSkge1xuICByZXR1cm4gW1xuICAgIC8vIGBTdHJpbmcucHJvdG90eXBlLnNlYXJjaGAgbWV0aG9kXG4gICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtc3RyaW5nLnByb3RvdHlwZS5zZWFyY2hcbiAgICBmdW5jdGlvbiBzZWFyY2gocmVnZXhwKSB7XG4gICAgICB2YXIgTyA9IHJlcXVpcmVPYmplY3RDb2VyY2libGUodGhpcyk7XG4gICAgICB2YXIgc2VhcmNoZXIgPSByZWdleHAgPT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogcmVnZXhwW1NFQVJDSF07XG4gICAgICByZXR1cm4gc2VhcmNoZXIgIT09IHVuZGVmaW5lZCA/IHNlYXJjaGVyLmNhbGwocmVnZXhwLCBPKSA6IG5ldyBSZWdFeHAocmVnZXhwKVtTRUFSQ0hdKFN0cmluZyhPKSk7XG4gICAgfSxcbiAgICAvLyBgUmVnRXhwLnByb3RvdHlwZVtAQHNlYXJjaF1gIG1ldGhvZFxuICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXJlZ2V4cC5wcm90b3R5cGUtQEBzZWFyY2hcbiAgICBmdW5jdGlvbiAocmVnZXhwKSB7XG4gICAgICB2YXIgcmVzID0gbWF5YmVDYWxsTmF0aXZlKG5hdGl2ZVNlYXJjaCwgcmVnZXhwLCB0aGlzKTtcbiAgICAgIGlmIChyZXMuZG9uZSkgcmV0dXJuIHJlcy52YWx1ZTtcblxuICAgICAgdmFyIHJ4ID0gYW5PYmplY3QocmVnZXhwKTtcbiAgICAgIHZhciBTID0gU3RyaW5nKHRoaXMpO1xuXG4gICAgICB2YXIgcHJldmlvdXNMYXN0SW5kZXggPSByeC5sYXN0SW5kZXg7XG4gICAgICBpZiAoIXNhbWVWYWx1ZShwcmV2aW91c0xhc3RJbmRleCwgMCkpIHJ4Lmxhc3RJbmRleCA9IDA7XG4gICAgICB2YXIgcmVzdWx0ID0gcmVnRXhwRXhlYyhyeCwgUyk7XG4gICAgICBpZiAoIXNhbWVWYWx1ZShyeC5sYXN0SW5kZXgsIHByZXZpb3VzTGFzdEluZGV4KSkgcngubGFzdEluZGV4ID0gcHJldmlvdXNMYXN0SW5kZXg7XG4gICAgICByZXR1cm4gcmVzdWx0ID09PSBudWxsID8gLTEgOiByZXN1bHQuaW5kZXg7XG4gICAgfVxuICBdO1xufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.search.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.small.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.small.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.small` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.small\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {\n small: function small() {\n return createHTML(this, 'small', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zbWFsbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuc21hbGwuanM/Yzk2YSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciBjcmVhdGVIVE1MID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NyZWF0ZS1odG1sJyk7XG52YXIgZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mb3JjZWQtc3RyaW5nLWh0bWwtbWV0aG9kJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLnNtYWxsYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuc21hbGxcbiQoeyB0YXJnZXQ6ICdTdHJpbmcnLCBwcm90bzogdHJ1ZSwgZm9yY2VkOiBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kKCdzbWFsbCcpIH0sIHtcbiAgc21hbGw6IGZ1bmN0aW9uIHNtYWxsKCkge1xuICAgIHJldHVybiBjcmVhdGVIVE1MKHRoaXMsICdzbWFsbCcsICcnLCAnJyk7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.small.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.split.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.split.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ \"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js\");\nvar isRegExp = __webpack_require__(/*! ../internals/is-regexp */ \"./node_modules/core-js/internals/is-regexp.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ \"./node_modules/core-js/internals/advance-string-index.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ \"./node_modules/core-js/internals/regexp-exec-abstract.js\");\nvar regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ \"./node_modules/core-js/internals/regexp-exec.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SUPPORTS_Y);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zcGxpdC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuc3BsaXQuanM/MTI3NiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgZml4UmVnRXhwV2VsbEtub3duU3ltYm9sTG9naWMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZml4LXJlZ2V4cC13ZWxsLWtub3duLXN5bWJvbC1sb2dpYycpO1xudmFyIGlzUmVnRXhwID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2lzLXJlZ2V4cCcpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2FuLW9iamVjdCcpO1xudmFyIHJlcXVpcmVPYmplY3RDb2VyY2libGUgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlJyk7XG52YXIgc3BlY2llc0NvbnN0cnVjdG9yID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3NwZWNpZXMtY29uc3RydWN0b3InKTtcbnZhciBhZHZhbmNlU3RyaW5nSW5kZXggPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvYWR2YW5jZS1zdHJpbmctaW5kZXgnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1sZW5ndGgnKTtcbnZhciBjYWxsUmVnRXhwRXhlYyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9yZWdleHAtZXhlYy1hYnN0cmFjdCcpO1xudmFyIHJlZ2V4cEV4ZWMgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvcmVnZXhwLWV4ZWMnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mYWlscycpO1xuXG52YXIgYXJyYXlQdXNoID0gW10ucHVzaDtcbnZhciBtaW4gPSBNYXRoLm1pbjtcbnZhciBNQVhfVUlOVDMyID0gMHhGRkZGRkZGRjtcblxuLy8gYmFiZWwtbWluaWZ5IHRyYW5zcGlsZXMgUmVnRXhwKCd4JywgJ3knKSAtPiAveC95IGFuZCBpdCBjYXVzZXMgU3ludGF4RXJyb3JcbnZhciBTVVBQT1JUU19ZID0gIWZhaWxzKGZ1bmN0aW9uICgpIHsgcmV0dXJuICFSZWdFeHAoTUFYX1VJTlQzMiwgJ3knKTsgfSk7XG5cbi8vIEBAc3BsaXQgbG9naWNcbmZpeFJlZ0V4cFdlbGxLbm93blN5bWJvbExvZ2ljKCdzcGxpdCcsIDIsIGZ1bmN0aW9uIChTUExJVCwgbmF0aXZlU3BsaXQsIG1heWJlQ2FsbE5hdGl2ZSkge1xuICB2YXIgaW50ZXJuYWxTcGxpdDtcbiAgaWYgKFxuICAgICdhYmJjJy5zcGxpdCgvKGIpKi8pWzFdID09ICdjJyB8fFxuICAgICd0ZXN0Jy5zcGxpdCgvKD86KS8sIC0xKS5sZW5ndGggIT0gNCB8fFxuICAgICdhYicuc3BsaXQoLyg/OmFiKSovKS5sZW5ndGggIT0gMiB8fFxuICAgICcuJy5zcGxpdCgvKC4/KSguPykvKS5sZW5ndGggIT0gNCB8fFxuICAgICcuJy5zcGxpdCgvKCkoKS8pLmxlbmd0aCA+IDEgfHxcbiAgICAnJy5zcGxpdCgvLj8vKS5sZW5ndGhcbiAgKSB7XG4gICAgLy8gYmFzZWQgb24gZXM1LXNoaW0gaW1wbGVtZW50YXRpb24sIG5lZWQgdG8gcmV3b3JrIGl0XG4gICAgaW50ZXJuYWxTcGxpdCA9IGZ1bmN0aW9uIChzZXBhcmF0b3IsIGxpbWl0KSB7XG4gICAgICB2YXIgc3RyaW5nID0gU3RyaW5nKHJlcXVpcmVPYmplY3RDb2VyY2libGUodGhpcykpO1xuICAgICAgdmFyIGxpbSA9IGxpbWl0ID09PSB1bmRlZmluZWQgPyBNQVhfVUlOVDMyIDogbGltaXQgPj4+IDA7XG4gICAgICBpZiAobGltID09PSAwKSByZXR1cm4gW107XG4gICAgICBpZiAoc2VwYXJhdG9yID09PSB1bmRlZmluZWQpIHJldHVybiBbc3RyaW5nXTtcbiAgICAgIC8vIElmIGBzZXBhcmF0b3JgIGlzIG5vdCBhIHJlZ2V4LCB1c2UgbmF0aXZlIHNwbGl0XG4gICAgICBpZiAoIWlzUmVnRXhwKHNlcGFyYXRvcikpIHtcbiAgICAgICAgcmV0dXJuIG5hdGl2ZVNwbGl0LmNhbGwoc3RyaW5nLCBzZXBhcmF0b3IsIGxpbSk7XG4gICAgICB9XG4gICAgICB2YXIgb3V0cHV0ID0gW107XG4gICAgICB2YXIgZmxhZ3MgPSAoc2VwYXJhdG9yLmlnbm9yZUNhc2UgPyAnaScgOiAnJykgK1xuICAgICAgICAgICAgICAgICAgKHNlcGFyYXRvci5tdWx0aWxpbmUgPyAnbScgOiAnJykgK1xuICAgICAgICAgICAgICAgICAgKHNlcGFyYXRvci51bmljb2RlID8gJ3UnIDogJycpICtcbiAgICAgICAgICAgICAgICAgIChzZXBhcmF0b3Iuc3RpY2t5ID8gJ3knIDogJycpO1xuICAgICAgdmFyIGxhc3RMYXN0SW5kZXggPSAwO1xuICAgICAgLy8gTWFrZSBgZ2xvYmFsYCBhbmQgYXZvaWQgYGxhc3RJbmRleGAgaXNzdWVzIGJ5IHdvcmtpbmcgd2l0aCBhIGNvcHlcbiAgICAgIHZhciBzZXBhcmF0b3JDb3B5ID0gbmV3IFJlZ0V4cChzZXBhcmF0b3Iuc291cmNlLCBmbGFncyArICdnJyk7XG4gICAgICB2YXIgbWF0Y2gsIGxhc3RJbmRleCwgbGFzdExlbmd0aDtcbiAgICAgIHdoaWxlIChtYXRjaCA9IHJlZ2V4cEV4ZWMuY2FsbChzZXBhcmF0b3JDb3B5LCBzdHJpbmcpKSB7XG4gICAgICAgIGxhc3RJbmRleCA9IHNlcGFyYXRvckNvcHkubGFzdEluZGV4O1xuICAgICAgICBpZiAobGFzdEluZGV4ID4gbGFzdExhc3RJbmRleCkge1xuICAgICAgICAgIG91dHB1dC5wdXNoKHN0cmluZy5zbGljZShsYXN0TGFzdEluZGV4LCBtYXRjaC5pbmRleCkpO1xuICAgICAgICAgIGlmIChtYXRjaC5sZW5ndGggPiAxICYmIG1hdGNoLmluZGV4IDwgc3RyaW5nLmxlbmd0aCkgYXJyYXlQdXNoLmFwcGx5KG91dHB1dCwgbWF0Y2guc2xpY2UoMSkpO1xuICAgICAgICAgIGxhc3RMZW5ndGggPSBtYXRjaFswXS5sZW5ndGg7XG4gICAgICAgICAgbGFzdExhc3RJbmRleCA9IGxhc3RJbmRleDtcbiAgICAgICAgICBpZiAob3V0cHV0Lmxlbmd0aCA+PSBsaW0pIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZXBhcmF0b3JDb3B5Lmxhc3RJbmRleCA9PT0gbWF0Y2guaW5kZXgpIHNlcGFyYXRvckNvcHkubGFzdEluZGV4Kys7IC8vIEF2b2lkIGFuIGluZmluaXRlIGxvb3BcbiAgICAgIH1cbiAgICAgIGlmIChsYXN0TGFzdEluZGV4ID09PSBzdHJpbmcubGVuZ3RoKSB7XG4gICAgICAgIGlmIChsYXN0TGVuZ3RoIHx8ICFzZXBhcmF0b3JDb3B5LnRlc3QoJycpKSBvdXRwdXQucHVzaCgnJyk7XG4gICAgICB9IGVsc2Ugb3V0cHV0LnB1c2goc3RyaW5nLnNsaWNlKGxhc3RMYXN0SW5kZXgpKTtcbiAgICAgIHJldHVybiBvdXRwdXQubGVuZ3RoID4gbGltID8gb3V0cHV0LnNsaWNlKDAsIGxpbSkgOiBvdXRwdXQ7XG4gICAgfTtcbiAgLy8gQ2hha3JhLCBWOFxuICB9IGVsc2UgaWYgKCcwJy5zcGxpdCh1bmRlZmluZWQsIDApLmxlbmd0aCkge1xuICAgIGludGVybmFsU3BsaXQgPSBmdW5jdGlvbiAoc2VwYXJhdG9yLCBsaW1pdCkge1xuICAgICAgcmV0dXJuIHNlcGFyYXRvciA9PT0gdW5kZWZpbmVkICYmIGxpbWl0ID09PSAwID8gW10gOiBuYXRpdmVTcGxpdC5jYWxsKHRoaXMsIHNlcGFyYXRvciwgbGltaXQpO1xuICAgIH07XG4gIH0gZWxzZSBpbnRlcm5hbFNwbGl0ID0gbmF0aXZlU3BsaXQ7XG5cbiAgcmV0dXJuIFtcbiAgICAvLyBgU3RyaW5nLnByb3RvdHlwZS5zcGxpdGAgbWV0aG9kXG4gICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtc3RyaW5nLnByb3RvdHlwZS5zcGxpdFxuICAgIGZ1bmN0aW9uIHNwbGl0KHNlcGFyYXRvciwgbGltaXQpIHtcbiAgICAgIHZhciBPID0gcmVxdWlyZU9iamVjdENvZXJjaWJsZSh0aGlzKTtcbiAgICAgIHZhciBzcGxpdHRlciA9IHNlcGFyYXRvciA9PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiBzZXBhcmF0b3JbU1BMSVRdO1xuICAgICAgcmV0dXJuIHNwbGl0dGVyICE9PSB1bmRlZmluZWRcbiAgICAgICAgPyBzcGxpdHRlci5jYWxsKHNlcGFyYXRvciwgTywgbGltaXQpXG4gICAgICAgIDogaW50ZXJuYWxTcGxpdC5jYWxsKFN0cmluZyhPKSwgc2VwYXJhdG9yLCBsaW1pdCk7XG4gICAgfSxcbiAgICAvLyBgUmVnRXhwLnByb3RvdHlwZVtAQHNwbGl0XWAgbWV0aG9kXG4gICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtcmVnZXhwLnByb3RvdHlwZS1AQHNwbGl0XG4gICAgLy9cbiAgICAvLyBOT1RFOiBUaGlzIGNhbm5vdCBiZSBwcm9wZXJseSBwb2x5ZmlsbGVkIGluIGVuZ2luZXMgdGhhdCBkb24ndCBzdXBwb3J0XG4gICAgLy8gdGhlICd5JyBmbGFnLlxuICAgIGZ1bmN0aW9uIChyZWdleHAsIGxpbWl0KSB7XG4gICAgICB2YXIgcmVzID0gbWF5YmVDYWxsTmF0aXZlKGludGVybmFsU3BsaXQsIHJlZ2V4cCwgdGhpcywgbGltaXQsIGludGVybmFsU3BsaXQgIT09IG5hdGl2ZVNwbGl0KTtcbiAgICAgIGlmIChyZXMuZG9uZSkgcmV0dXJuIHJlcy52YWx1ZTtcblxuICAgICAgdmFyIHJ4ID0gYW5PYmplY3QocmVnZXhwKTtcbiAgICAgIHZhciBTID0gU3RyaW5nKHRoaXMpO1xuICAgICAgdmFyIEMgPSBzcGVjaWVzQ29uc3RydWN0b3IocngsIFJlZ0V4cCk7XG5cbiAgICAgIHZhciB1bmljb2RlTWF0Y2hpbmcgPSByeC51bmljb2RlO1xuICAgICAgdmFyIGZsYWdzID0gKHJ4Lmlnbm9yZUNhc2UgPyAnaScgOiAnJykgK1xuICAgICAgICAgICAgICAgICAgKHJ4Lm11bHRpbGluZSA/ICdtJyA6ICcnKSArXG4gICAgICAgICAgICAgICAgICAocngudW5pY29kZSA/ICd1JyA6ICcnKSArXG4gICAgICAgICAgICAgICAgICAoU1VQUE9SVFNfWSA/ICd5JyA6ICdnJyk7XG5cbiAgICAgIC8vIF4oPyArIHJ4ICsgKSBpcyBuZWVkZWQsIGluIGNvbWJpbmF0aW9uIHdpdGggc29tZSBTIHNsaWNpbmcsIHRvXG4gICAgICAvLyBzaW11bGF0ZSB0aGUgJ3knIGZsYWcuXG4gICAgICB2YXIgc3BsaXR0ZXIgPSBuZXcgQyhTVVBQT1JUU19ZID8gcnggOiAnXig/OicgKyByeC5zb3VyY2UgKyAnKScsIGZsYWdzKTtcbiAgICAgIHZhciBsaW0gPSBsaW1pdCA9PT0gdW5kZWZpbmVkID8gTUFYX1VJTlQzMiA6IGxpbWl0ID4+PiAwO1xuICAgICAgaWYgKGxpbSA9PT0gMCkgcmV0dXJuIFtdO1xuICAgICAgaWYgKFMubGVuZ3RoID09PSAwKSByZXR1cm4gY2FsbFJlZ0V4cEV4ZWMoc3BsaXR0ZXIsIFMpID09PSBudWxsID8gW1NdIDogW107XG4gICAgICB2YXIgcCA9IDA7XG4gICAgICB2YXIgcSA9IDA7XG4gICAgICB2YXIgQSA9IFtdO1xuICAgICAgd2hpbGUgKHEgPCBTLmxlbmd0aCkge1xuICAgICAgICBzcGxpdHRlci5sYXN0SW5kZXggPSBTVVBQT1JUU19ZID8gcSA6IDA7XG4gICAgICAgIHZhciB6ID0gY2FsbFJlZ0V4cEV4ZWMoc3BsaXR0ZXIsIFNVUFBPUlRTX1kgPyBTIDogUy5zbGljZShxKSk7XG4gICAgICAgIHZhciBlO1xuICAgICAgICBpZiAoXG4gICAgICAgICAgeiA9PT0gbnVsbCB8fFxuICAgICAgICAgIChlID0gbWluKHRvTGVuZ3RoKHNwbGl0dGVyLmxhc3RJbmRleCArIChTVVBQT1JUU19ZID8gMCA6IHEpKSwgUy5sZW5ndGgpKSA9PT0gcFxuICAgICAgICApIHtcbiAgICAgICAgICBxID0gYWR2YW5jZVN0cmluZ0luZGV4KFMsIHEsIHVuaWNvZGVNYXRjaGluZyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgQS5wdXNoKFMuc2xpY2UocCwgcSkpO1xuICAgICAgICAgIGlmIChBLmxlbmd0aCA9PT0gbGltKSByZXR1cm4gQTtcbiAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8PSB6Lmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgICAgICAgQS5wdXNoKHpbaV0pO1xuICAgICAgICAgICAgaWYgKEEubGVuZ3RoID09PSBsaW0pIHJldHVybiBBO1xuICAgICAgICAgIH1cbiAgICAgICAgICBxID0gcCA9IGU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIEEucHVzaChTLnNsaWNlKHApKTtcbiAgICAgIHJldHVybiBBO1xuICAgIH1cbiAgXTtcbn0sICFTVVBQT1JUU19ZKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.split.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.starts-with.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.starts-with.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar validateArguments = __webpack_require__(/*! ../internals/validate-string-method-arguments */ \"./node_modules/core-js/internals/validate-string-method-arguments.js\");\nvar correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ \"./node_modules/core-js/internals/correct-is-regexp-logic.js\");\n\nvar STARTS_WITH = 'startsWith';\nvar nativeStartsWith = ''[STARTS_WITH];\n\n// `String.prototype.startsWith` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic(STARTS_WITH) }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = validateArguments(this, searchString, STARTS_WITH);\n var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return nativeStartsWith\n ? nativeStartsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zdGFydHMtd2l0aC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuc3RhcnRzLXdpdGguanM/MmNhMCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciB0b0xlbmd0aCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy90by1sZW5ndGgnKTtcbnZhciB2YWxpZGF0ZUFyZ3VtZW50cyA9IHJlcXVpcmUoJy4uL2ludGVybmFscy92YWxpZGF0ZS1zdHJpbmctbWV0aG9kLWFyZ3VtZW50cycpO1xudmFyIGNvcnJlY3RJc1JlZ0V4cExvZ2ljID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2NvcnJlY3QtaXMtcmVnZXhwLWxvZ2ljJyk7XG5cbnZhciBTVEFSVFNfV0lUSCA9ICdzdGFydHNXaXRoJztcbnZhciBuYXRpdmVTdGFydHNXaXRoID0gJydbU1RBUlRTX1dJVEhdO1xuXG4vLyBgU3RyaW5nLnByb3RvdHlwZS5zdGFydHNXaXRoYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuc3RhcnRzd2l0aFxuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlLCBmb3JjZWQ6ICFjb3JyZWN0SXNSZWdFeHBMb2dpYyhTVEFSVFNfV0lUSCkgfSwge1xuICBzdGFydHNXaXRoOiBmdW5jdGlvbiBzdGFydHNXaXRoKHNlYXJjaFN0cmluZyAvKiAsIHBvc2l0aW9uID0gMCAqLykge1xuICAgIHZhciB0aGF0ID0gdmFsaWRhdGVBcmd1bWVudHModGhpcywgc2VhcmNoU3RyaW5nLCBTVEFSVFNfV0lUSCk7XG4gICAgdmFyIGluZGV4ID0gdG9MZW5ndGgoTWF0aC5taW4oYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHNbMV0gOiB1bmRlZmluZWQsIHRoYXQubGVuZ3RoKSk7XG4gICAgdmFyIHNlYXJjaCA9IFN0cmluZyhzZWFyY2hTdHJpbmcpO1xuICAgIHJldHVybiBuYXRpdmVTdGFydHNXaXRoXG4gICAgICA/IG5hdGl2ZVN0YXJ0c1dpdGguY2FsbCh0aGF0LCBzZWFyY2gsIGluZGV4KVxuICAgICAgOiB0aGF0LnNsaWNlKGluZGV4LCBpbmRleCArIHNlYXJjaC5sZW5ndGgpID09PSBzZWFyY2g7XG4gIH1cbn0pO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.starts-with.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.strike.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.strike.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.strike` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.strike\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {\n strike: function strike() {\n return createHTML(this, 'strike', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zdHJpa2UuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnN0cmlrZS5qcz8yMzE1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUhUTUwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWh0bWwnKTtcbnZhciBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuc3RyaWtlYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuc3RyaWtlXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCgnc3RyaWtlJykgfSwge1xuICBzdHJpa2U6IGZ1bmN0aW9uIHN0cmlrZSgpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnc3RyaWtlJywgJycsICcnKTtcbiAgfVxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.strike.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.sub.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.sub.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.sub` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.sub\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {\n sub: function sub() {\n return createHTML(this, 'sub', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zdWIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnN1Yi5qcz80YzUzIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUhUTUwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWh0bWwnKTtcbnZhciBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuc3ViYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuc3ViXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCgnc3ViJykgfSwge1xuICBzdWI6IGZ1bmN0aW9uIHN1YigpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnc3ViJywgJycsICcnKTtcbiAgfVxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.sub.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.sup.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.sup.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar createHTML = __webpack_require__(/*! ../internals/create-html */ \"./node_modules/core-js/internals/create-html.js\");\nvar forcedStringHTMLMethod = __webpack_require__(/*! ../internals/forced-string-html-method */ \"./node_modules/core-js/internals/forced-string-html-method.js\");\n\n// `String.prototype.sup` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.sup\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {\n sup: function sup() {\n return createHTML(this, 'sup', '', '');\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy5zdXAuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvZXMuc3RyaW5nLnN1cC5qcz82NjRmIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xudmFyIGNyZWF0ZUhUTUwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvY3JlYXRlLWh0bWwnKTtcbnZhciBmb3JjZWRTdHJpbmdIVE1MTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctaHRtbC1tZXRob2QnKTtcblxuLy8gYFN0cmluZy5wcm90b3R5cGUuc3VwYCBtZXRob2Rcbi8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXN0cmluZy5wcm90b3R5cGUuc3VwXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogZm9yY2VkU3RyaW5nSFRNTE1ldGhvZCgnc3VwJykgfSwge1xuICBzdXA6IGZ1bmN0aW9uIHN1cCgpIHtcbiAgICByZXR1cm4gY3JlYXRlSFRNTCh0aGlzLCAnc3VwJywgJycsICcnKTtcbiAgfVxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.sup.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.trim-end.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.trim-end.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar internalStringTrim = __webpack_require__(/*! ../internals/string-trim */ \"./node_modules/core-js/internals/string-trim.js\");\nvar forcedStringTrimMethod = __webpack_require__(/*! ../internals/forced-string-trim-method */ \"./node_modules/core-js/internals/forced-string-trim-method.js\");\n\nvar FORCED = forcedStringTrimMethod('trimEnd');\n\nvar trimEnd = FORCED ? function trimEnd() {\n return internalStringTrim(this, 2);\n} : ''.trimEnd;\n\n// `String.prototype.{ trimEnd, trimRight }` methods\n// https://github.com/tc39/ecmascript-string-left-right-trim\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimEnd: trimEnd,\n trimRight: trimEnd\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy50cmltLWVuZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcudHJpbS1lbmQuanM/MWUyNSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgJCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9leHBvcnQnKTtcbnZhciBpbnRlcm5hbFN0cmluZ1RyaW0gPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvc3RyaW5nLXRyaW0nKTtcbnZhciBmb3JjZWRTdHJpbmdUcmltTWV0aG9kID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2ZvcmNlZC1zdHJpbmctdHJpbS1tZXRob2QnKTtcblxudmFyIEZPUkNFRCA9IGZvcmNlZFN0cmluZ1RyaW1NZXRob2QoJ3RyaW1FbmQnKTtcblxudmFyIHRyaW1FbmQgPSBGT1JDRUQgPyBmdW5jdGlvbiB0cmltRW5kKCkge1xuICByZXR1cm4gaW50ZXJuYWxTdHJpbmdUcmltKHRoaXMsIDIpO1xufSA6ICcnLnRyaW1FbmQ7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLnsgdHJpbUVuZCwgdHJpbVJpZ2h0IH1gIG1ldGhvZHNcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L2VjbWFzY3JpcHQtc3RyaW5nLWxlZnQtcmlnaHQtdHJpbVxuJCh7IHRhcmdldDogJ1N0cmluZycsIHByb3RvOiB0cnVlLCBmb3JjZWQ6IEZPUkNFRCB9LCB7XG4gIHRyaW1FbmQ6IHRyaW1FbmQsXG4gIHRyaW1SaWdodDogdHJpbUVuZFxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.trim-end.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.trim-start.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.trim-start.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar internalStringTrim = __webpack_require__(/*! ../internals/string-trim */ \"./node_modules/core-js/internals/string-trim.js\");\nvar forcedStringTrimMethod = __webpack_require__(/*! ../internals/forced-string-trim-method */ \"./node_modules/core-js/internals/forced-string-trim-method.js\");\n\nvar FORCED = forcedStringTrimMethod('trimStart');\n\nvar trimStart = FORCED ? function trimStart() {\n return internalStringTrim(this, 1);\n} : ''.trimStart;\n\n// `String.prototype.{ trimStart, trimLeft }` methods\n// https://github.com/tc39/ecmascript-string-left-right-trim\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimStart: trimStart,\n trimLeft: trimStart\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy50cmltLXN0YXJ0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy50cmltLXN0YXJ0LmpzP2VlZTciXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgaW50ZXJuYWxTdHJpbmdUcmltID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3N0cmluZy10cmltJyk7XG52YXIgZm9yY2VkU3RyaW5nVHJpbU1ldGhvZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mb3JjZWQtc3RyaW5nLXRyaW0tbWV0aG9kJyk7XG5cbnZhciBGT1JDRUQgPSBmb3JjZWRTdHJpbmdUcmltTWV0aG9kKCd0cmltU3RhcnQnKTtcblxudmFyIHRyaW1TdGFydCA9IEZPUkNFRCA/IGZ1bmN0aW9uIHRyaW1TdGFydCgpIHtcbiAgcmV0dXJuIGludGVybmFsU3RyaW5nVHJpbSh0aGlzLCAxKTtcbn0gOiAnJy50cmltU3RhcnQ7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLnsgdHJpbVN0YXJ0LCB0cmltTGVmdCB9YCBtZXRob2RzXG4vLyBodHRwczovL2dpdGh1Yi5jb20vdGMzOS9lY21hc2NyaXB0LXN0cmluZy1sZWZ0LXJpZ2h0LXRyaW1cbiQoeyB0YXJnZXQ6ICdTdHJpbmcnLCBwcm90bzogdHJ1ZSwgZm9yY2VkOiBGT1JDRUQgfSwge1xuICB0cmltU3RhcnQ6IHRyaW1TdGFydCxcbiAgdHJpbUxlZnQ6IHRyaW1TdGFydFxufSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.trim-start.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.string.trim.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.trim.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar internalStringTrim = __webpack_require__(/*! ../internals/string-trim */ \"./node_modules/core-js/internals/string-trim.js\");\nvar forcedStringTrimMethod = __webpack_require__(/*! ../internals/forced-string-trim-method */ \"./node_modules/core-js/internals/forced-string-trim-method.js\");\n\nvar FORCED = forcedStringTrimMethod('trim');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: FORCED }, {\n trim: function trim() {\n return internalStringTrim(this, 3);\n }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy50cmltLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL2VzLnN0cmluZy50cmltLmpzPzQ5OGEiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyICQgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZXhwb3J0Jyk7XG52YXIgaW50ZXJuYWxTdHJpbmdUcmltID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL3N0cmluZy10cmltJyk7XG52YXIgZm9yY2VkU3RyaW5nVHJpbU1ldGhvZCA9IHJlcXVpcmUoJy4uL2ludGVybmFscy9mb3JjZWQtc3RyaW5nLXRyaW0tbWV0aG9kJyk7XG5cbnZhciBGT1JDRUQgPSBmb3JjZWRTdHJpbmdUcmltTWV0aG9kKCd0cmltJyk7XG5cbi8vIGBTdHJpbmcucHJvdG90eXBlLnRyaW1gIG1ldGhvZFxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtc3RyaW5nLnByb3RvdHlwZS50cmltXG4kKHsgdGFyZ2V0OiAnU3RyaW5nJywgcHJvdG86IHRydWUsIGZvcmNlZDogRk9SQ0VEIH0sIHtcbiAgdHJpbTogZnVuY3Rpb24gdHJpbSgpIHtcbiAgICByZXR1cm4gaW50ZXJuYWxTdHJpbmdUcmltKHRoaXMsIDMpO1xuICB9XG59KTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/es.string.trim.js\n"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js/internals/dom-iterables.js\");\nvar ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js/modules/es.array.iterator.js\");\nvar hide = __webpack_require__(/*! ../internals/hide */ \"./node_modules/core-js/internals/hide.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n hide(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) hide(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n hide(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9tb2R1bGVzL3dlYi5kb20tY29sbGVjdGlvbnMuaXRlcmF0b3IuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9KUy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL21vZHVsZXMvd2ViLmRvbS1jb2xsZWN0aW9ucy5pdGVyYXRvci5qcz9kZGIwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBnbG9iYWwgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvZ2xvYmFsJyk7XG52YXIgRE9NSXRlcmFibGVzID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2RvbS1pdGVyYWJsZXMnKTtcbnZhciBBcnJheUl0ZXJhdG9yTWV0aG9kcyA9IHJlcXVpcmUoJy4uL21vZHVsZXMvZXMuYXJyYXkuaXRlcmF0b3InKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2hpZGUnKTtcbnZhciB3ZWxsS25vd25TeW1ib2wgPSByZXF1aXJlKCcuLi9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wnKTtcblxudmFyIElURVJBVE9SID0gd2VsbEtub3duU3ltYm9sKCdpdGVyYXRvcicpO1xudmFyIFRPX1NUUklOR19UQUcgPSB3ZWxsS25vd25TeW1ib2woJ3RvU3RyaW5nVGFnJyk7XG52YXIgQXJyYXlWYWx1ZXMgPSBBcnJheUl0ZXJhdG9yTWV0aG9kcy52YWx1ZXM7XG5cbmZvciAodmFyIENPTExFQ1RJT05fTkFNRSBpbiBET01JdGVyYWJsZXMpIHtcbiAgdmFyIENvbGxlY3Rpb24gPSBnbG9iYWxbQ09MTEVDVElPTl9OQU1FXTtcbiAgdmFyIENvbGxlY3Rpb25Qcm90b3R5cGUgPSBDb2xsZWN0aW9uICYmIENvbGxlY3Rpb24ucHJvdG90eXBlO1xuICBpZiAoQ29sbGVjdGlvblByb3RvdHlwZSkge1xuICAgIC8vIHNvbWUgQ2hyb21lIHZlcnNpb25zIGhhdmUgbm9uLWNvbmZpZ3VyYWJsZSBtZXRob2RzIG9uIERPTVRva2VuTGlzdFxuICAgIGlmIChDb2xsZWN0aW9uUHJvdG90eXBlW0lURVJBVE9SXSAhPT0gQXJyYXlWYWx1ZXMpIHRyeSB7XG4gICAgICBoaWRlKENvbGxlY3Rpb25Qcm90b3R5cGUsIElURVJBVE9SLCBBcnJheVZhbHVlcyk7XG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgIENvbGxlY3Rpb25Qcm90b3R5cGVbSVRFUkFUT1JdID0gQXJyYXlWYWx1ZXM7XG4gICAgfVxuICAgIGlmICghQ29sbGVjdGlvblByb3RvdHlwZVtUT19TVFJJTkdfVEFHXSkgaGlkZShDb2xsZWN0aW9uUHJvdG90eXBlLCBUT19TVFJJTkdfVEFHLCBDT0xMRUNUSU9OX05BTUUpO1xuICAgIGlmIChET01JdGVyYWJsZXNbQ09MTEVDVElPTl9OQU1FXSkgZm9yICh2YXIgTUVUSE9EX05BTUUgaW4gQXJyYXlJdGVyYXRvck1ldGhvZHMpIHtcbiAgICAgIC8vIHNvbWUgQ2hyb21lIHZlcnNpb25zIGhhdmUgbm9uLWNvbmZpZ3VyYWJsZSBtZXRob2RzIG9uIERPTVRva2VuTGlzdFxuICAgICAgaWYgKENvbGxlY3Rpb25Qcm90b3R5cGVbTUVUSE9EX05BTUVdICE9PSBBcnJheUl0ZXJhdG9yTWV0aG9kc1tNRVRIT0RfTkFNRV0pIHRyeSB7XG4gICAgICAgIGhpZGUoQ29sbGVjdGlvblByb3RvdHlwZSwgTUVUSE9EX05BTUUsIEFycmF5SXRlcmF0b3JNZXRob2RzW01FVEhPRF9OQU1FXSk7XG4gICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICBDb2xsZWN0aW9uUHJvdG90eXBlW01FVEhPRF9OQU1FXSA9IEFycmF5SXRlcmF0b3JNZXRob2RzW01FVEhPRF9OQU1FXTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-js/modules/web.dom-collections.iterator.js\n"); + +/***/ }), + +/***/ "./node_modules/core-util-is/lib/util.js": +/*!***********************************************!*\ + !*** ./node_modules/core-util-is/lib/util.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY29yZS11dGlsLWlzL2xpYi91dGlsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vSlMvLi9ub2RlX21vZHVsZXMvY29yZS11dGlsLWlzL2xpYi91dGlsLmpzPzNhN2MiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEpveWVudCwgSW5jLiBhbmQgb3RoZXIgTm9kZSBjb250cmlidXRvcnMuXG4vL1xuLy8gUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGFcbi8vIGNvcHkgb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGVcbi8vIFwiU29mdHdhcmVcIiksIHRvIGRlYWwgaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZ1xuLy8gd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHMgdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLFxuLy8gZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwgY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdFxuLy8gcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcyBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlXG4vLyBmb2xsb3dpbmcgY29uZGl0aW9uczpcbi8vXG4vLyBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZFxuLy8gaW4gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuXG4vL1xuLy8gVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEIFwiQVMgSVNcIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTU1xuLy8gT1IgSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRlxuLy8gTUVSQ0hBTlRBQklMSVRZLCBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTlxuLy8gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sXG4vLyBEQU1BR0VTIE9SIE9USEVSIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIFRPUlQgT1Jcbi8vIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLCBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEVcbi8vIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUgU09GVFdBUkUuXG5cbi8vIE5PVEU6IFRoZXNlIHR5cGUgY2hlY2tpbmcgZnVuY3Rpb25zIGludGVudGlvbmFsbHkgZG9uJ3QgdXNlIGBpbnN0YW5jZW9mYFxuLy8gYmVjYXVzZSBpdCBpcyBmcmFnaWxlIGFuZCBjYW4gYmUgZWFzaWx5IGZha2VkIHdpdGggYE9iamVjdC5jcmVhdGUoKWAuXG5cbmZ1bmN0aW9uIGlzQXJyYXkoYXJnKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KSB7XG4gICAgcmV0dXJuIEFycmF5LmlzQXJyYXkoYXJnKTtcbiAgfVxuICByZXR1cm4gb2JqZWN0VG9TdHJpbmcoYXJnKSA9PT0gJ1tvYmplY3QgQXJyYXldJztcbn1cbmV4cG9ydHMuaXNBcnJheSA9IGlzQXJyYXk7XG5cbmZ1bmN0aW9uIGlzQm9vbGVhbihhcmcpIHtcbiAgcmV0dXJuIHR5cGVvZiBhcmcgPT09ICdib29sZWFuJztcbn1cbmV4cG9ydHMuaXNCb29sZWFuID0gaXNCb29sZWFuO1xuXG5mdW5jdGlvbiBpc051bGwoYXJnKSB7XG4gIHJldHVybiBhcmcgPT09IG51bGw7XG59XG5leHBvcnRzLmlzTnVsbCA9IGlzTnVsbDtcblxuZnVuY3Rpb24gaXNOdWxsT3JVbmRlZmluZWQoYXJnKSB7XG4gIHJldHVybiBhcmcgPT0gbnVsbDtcbn1cbmV4cG9ydHMuaXNOdWxsT3JVbmRlZmluZWQgPSBpc051bGxPclVuZGVmaW5lZDtcblxuZnVuY3Rpb24gaXNOdW1iZXIoYXJnKSB7XG4gIHJldHVybiB0eXBlb2YgYXJnID09PSAnbnVtYmVyJztcbn1cbmV4cG9ydHMuaXNOdW1iZXIgPSBpc051bWJlcjtcblxuZnVuY3Rpb24gaXNTdHJpbmcoYXJnKSB7XG4gIHJldHVybiB0eXBlb2YgYXJnID09PSAnc3RyaW5nJztcbn1cbmV4cG9ydHMuaXNTdHJpbmcgPSBpc1N0cmluZztcblxuZnVuY3Rpb24gaXNTeW1ib2woYXJnKSB7XG4gIHJldHVybiB0eXBlb2YgYXJnID09PSAnc3ltYm9sJztcbn1cbmV4cG9ydHMuaXNTeW1ib2wgPSBpc1N5bWJvbDtcblxuZnVuY3Rpb24gaXNVbmRlZmluZWQoYXJnKSB7XG4gIHJldHVybiBhcmcgPT09IHZvaWQgMDtcbn1cbmV4cG9ydHMuaXNVbmRlZmluZWQgPSBpc1VuZGVmaW5lZDtcblxuZnVuY3Rpb24gaXNSZWdFeHAocmUpIHtcbiAgcmV0dXJuIG9iamVjdFRvU3RyaW5nKHJlKSA9PT0gJ1tvYmplY3QgUmVnRXhwXSc7XG59XG5leHBvcnRzLmlzUmVnRXhwID0gaXNSZWdFeHA7XG5cbmZ1bmN0aW9uIGlzT2JqZWN0KGFyZykge1xuICByZXR1cm4gdHlwZW9mIGFyZyA9PT0gJ29iamVjdCcgJiYgYXJnICE9PSBudWxsO1xufVxuZXhwb3J0cy5pc09iamVjdCA9IGlzT2JqZWN0O1xuXG5mdW5jdGlvbiBpc0RhdGUoZCkge1xuICByZXR1cm4gb2JqZWN0VG9TdHJpbmcoZCkgPT09ICdbb2JqZWN0IERhdGVdJztcbn1cbmV4cG9ydHMuaXNEYXRlID0gaXNEYXRlO1xuXG5mdW5jdGlvbiBpc0Vycm9yKGUpIHtcbiAgcmV0dXJuIChvYmplY3RUb1N0cmluZyhlKSA9PT0gJ1tvYmplY3QgRXJyb3JdJyB8fCBlIGluc3RhbmNlb2YgRXJyb3IpO1xufVxuZXhwb3J0cy5pc0Vycm9yID0gaXNFcnJvcjtcblxuZnVuY3Rpb24gaXNGdW5jdGlvbihhcmcpIHtcbiAgcmV0dXJuIHR5cGVvZiBhcmcgPT09ICdmdW5jdGlvbic7XG59XG5leHBvcnRzLmlzRnVuY3Rpb24gPSBpc0Z1bmN0aW9uO1xuXG5mdW5jdGlvbiBpc1ByaW1pdGl2ZShhcmcpIHtcbiAgcmV0dXJuIGFyZyA9PT0gbnVsbCB8fFxuICAgICAgICAgdHlwZW9mIGFyZyA9PT0gJ2Jvb2xlYW4nIHx8XG4gICAgICAgICB0eXBlb2YgYXJnID09PSAnbnVtYmVyJyB8fFxuICAgICAgICAgdHlwZW9mIGFyZyA9PT0gJ3N0cmluZycgfHxcbiAgICAgICAgIHR5cGVvZiBhcmcgPT09ICdzeW1ib2wnIHx8ICAvLyBFUzYgc3ltYm9sXG4gICAgICAgICB0eXBlb2YgYXJnID09PSAndW5kZWZpbmVkJztcbn1cbmV4cG9ydHMuaXNQcmltaXRpdmUgPSBpc1ByaW1pdGl2ZTtcblxuZXhwb3J0cy5pc0J1ZmZlciA9IEJ1ZmZlci5pc0J1ZmZlcjtcblxuZnVuY3Rpb24gb2JqZWN0VG9TdHJpbmcobykge1xuICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKG8pO1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/core-util-is/lib/util.js\n"); + +/***/ }), + +/***/ "./node_modules/events/events.js": +/*!***************************************!*\ + !*** ./node_modules/events/events.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = $getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n ReflectApply(this.listener, this.target, args);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZXZlbnRzL2V2ZW50cy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2V2ZW50cy9ldmVudHMuanM/ZmFhMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgSm95ZW50LCBJbmMuIGFuZCBvdGhlciBOb2RlIGNvbnRyaWJ1dG9ycy5cbi8vXG4vLyBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYVxuLy8gY29weSBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZVxuLy8gXCJTb2Z0d2FyZVwiKSwgdG8gZGVhbCBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nXG4vLyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0cyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsXG4vLyBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbCBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0XG4vLyBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGVcbi8vIGZvbGxvd2luZyBjb25kaXRpb25zOlxuLy9cbi8vIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlIGluY2x1ZGVkXG4vLyBpbiBhbGwgY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS5cbi8vXG4vLyBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTXG4vLyBPUiBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GXG4vLyBNRVJDSEFOVEFCSUxJVFksIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuIElOXG4vLyBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSxcbi8vIERBTUFHRVMgT1IgT1RIRVIgTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUlxuLy8gT1RIRVJXSVNFLCBBUklTSU5HIEZST00sIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRVxuLy8gVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRSBTT0ZUV0FSRS5cblxuJ3VzZSBzdHJpY3QnO1xuXG52YXIgUiA9IHR5cGVvZiBSZWZsZWN0ID09PSAnb2JqZWN0JyA/IFJlZmxlY3QgOiBudWxsXG52YXIgUmVmbGVjdEFwcGx5ID0gUiAmJiB0eXBlb2YgUi5hcHBseSA9PT0gJ2Z1bmN0aW9uJ1xuICA/IFIuYXBwbHlcbiAgOiBmdW5jdGlvbiBSZWZsZWN0QXBwbHkodGFyZ2V0LCByZWNlaXZlciwgYXJncykge1xuICAgIHJldHVybiBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkuY2FsbCh0YXJnZXQsIHJlY2VpdmVyLCBhcmdzKTtcbiAgfVxuXG52YXIgUmVmbGVjdE93bktleXNcbmlmIChSICYmIHR5cGVvZiBSLm93bktleXMgPT09ICdmdW5jdGlvbicpIHtcbiAgUmVmbGVjdE93bktleXMgPSBSLm93bktleXNcbn0gZWxzZSBpZiAoT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scykge1xuICBSZWZsZWN0T3duS2V5cyA9IGZ1bmN0aW9uIFJlZmxlY3RPd25LZXlzKHRhcmdldCkge1xuICAgIHJldHVybiBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyh0YXJnZXQpXG4gICAgICAuY29uY2F0KE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHModGFyZ2V0KSk7XG4gIH07XG59IGVsc2Uge1xuICBSZWZsZWN0T3duS2V5cyA9IGZ1bmN0aW9uIFJlZmxlY3RPd25LZXlzKHRhcmdldCkge1xuICAgIHJldHVybiBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyh0YXJnZXQpO1xuICB9O1xufVxuXG5mdW5jdGlvbiBQcm9jZXNzRW1pdFdhcm5pbmcod2FybmluZykge1xuICBpZiAoY29uc29sZSAmJiBjb25zb2xlLndhcm4pIGNvbnNvbGUud2Fybih3YXJuaW5nKTtcbn1cblxudmFyIE51bWJlcklzTmFOID0gTnVtYmVyLmlzTmFOIHx8IGZ1bmN0aW9uIE51bWJlcklzTmFOKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZSAhPT0gdmFsdWU7XG59XG5cbmZ1bmN0aW9uIEV2ZW50RW1pdHRlcigpIHtcbiAgRXZlbnRFbWl0dGVyLmluaXQuY2FsbCh0aGlzKTtcbn1cbm1vZHVsZS5leHBvcnRzID0gRXZlbnRFbWl0dGVyO1xuXG4vLyBCYWNrd2FyZHMtY29tcGF0IHdpdGggbm9kZSAwLjEwLnhcbkV2ZW50RW1pdHRlci5FdmVudEVtaXR0ZXIgPSBFdmVudEVtaXR0ZXI7XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUuX2V2ZW50cyA9IHVuZGVmaW5lZDtcbkV2ZW50RW1pdHRlci5wcm90b3R5cGUuX2V2ZW50c0NvdW50ID0gMDtcbkV2ZW50RW1pdHRlci5wcm90b3R5cGUuX21heExpc3RlbmVycyA9IHVuZGVmaW5lZDtcblxuLy8gQnkgZGVmYXVsdCBFdmVudEVtaXR0ZXJzIHdpbGwgcHJpbnQgYSB3YXJuaW5nIGlmIG1vcmUgdGhhbiAxMCBsaXN0ZW5lcnMgYXJlXG4vLyBhZGRlZCB0byBpdC4gVGhpcyBpcyBhIHVzZWZ1bCBkZWZhdWx0IHdoaWNoIGhlbHBzIGZpbmRpbmcgbWVtb3J5IGxlYWtzLlxudmFyIGRlZmF1bHRNYXhMaXN0ZW5lcnMgPSAxMDtcblxuT2JqZWN0LmRlZmluZVByb3BlcnR5KEV2ZW50RW1pdHRlciwgJ2RlZmF1bHRNYXhMaXN0ZW5lcnMnLCB7XG4gIGVudW1lcmFibGU6IHRydWUsXG4gIGdldDogZnVuY3Rpb24oKSB7XG4gICAgcmV0dXJuIGRlZmF1bHRNYXhMaXN0ZW5lcnM7XG4gIH0sXG4gIHNldDogZnVuY3Rpb24oYXJnKSB7XG4gICAgaWYgKHR5cGVvZiBhcmcgIT09ICdudW1iZXInIHx8IGFyZyA8IDAgfHwgTnVtYmVySXNOYU4oYXJnKSkge1xuICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ1RoZSB2YWx1ZSBvZiBcImRlZmF1bHRNYXhMaXN0ZW5lcnNcIiBpcyBvdXQgb2YgcmFuZ2UuIEl0IG11c3QgYmUgYSBub24tbmVnYXRpdmUgbnVtYmVyLiBSZWNlaXZlZCAnICsgYXJnICsgJy4nKTtcbiAgICB9XG4gICAgZGVmYXVsdE1heExpc3RlbmVycyA9IGFyZztcbiAgfVxufSk7XG5cbkV2ZW50RW1pdHRlci5pbml0ID0gZnVuY3Rpb24oKSB7XG5cbiAgaWYgKHRoaXMuX2V2ZW50cyA9PT0gdW5kZWZpbmVkIHx8XG4gICAgICB0aGlzLl9ldmVudHMgPT09IE9iamVjdC5nZXRQcm90b3R5cGVPZih0aGlzKS5fZXZlbnRzKSB7XG4gICAgdGhpcy5fZXZlbnRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICB0aGlzLl9ldmVudHNDb3VudCA9IDA7XG4gIH1cblxuICB0aGlzLl9tYXhMaXN0ZW5lcnMgPSB0aGlzLl9tYXhMaXN0ZW5lcnMgfHwgdW5kZWZpbmVkO1xufTtcblxuLy8gT2J2aW91c2x5IG5vdCBhbGwgRW1pdHRlcnMgc2hvdWxkIGJlIGxpbWl0ZWQgdG8gMTAuIFRoaXMgZnVuY3Rpb24gYWxsb3dzXG4vLyB0aGF0IHRvIGJlIGluY3JlYXNlZC4gU2V0IHRvIHplcm8gZm9yIHVubGltaXRlZC5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUuc2V0TWF4TGlzdGVuZXJzID0gZnVuY3Rpb24gc2V0TWF4TGlzdGVuZXJzKG4pIHtcbiAgaWYgKHR5cGVvZiBuICE9PSAnbnVtYmVyJyB8fCBuIDwgMCB8fCBOdW1iZXJJc05hTihuKSkge1xuICAgIHRocm93IG5ldyBSYW5nZUVycm9yKCdUaGUgdmFsdWUgb2YgXCJuXCIgaXMgb3V0IG9mIHJhbmdlLiBJdCBtdXN0IGJlIGEgbm9uLW5lZ2F0aXZlIG51bWJlci4gUmVjZWl2ZWQgJyArIG4gKyAnLicpO1xuICB9XG4gIHRoaXMuX21heExpc3RlbmVycyA9IG47XG4gIHJldHVybiB0aGlzO1xufTtcblxuZnVuY3Rpb24gJGdldE1heExpc3RlbmVycyh0aGF0KSB7XG4gIGlmICh0aGF0Ll9tYXhMaXN0ZW5lcnMgPT09IHVuZGVmaW5lZClcbiAgICByZXR1cm4gRXZlbnRFbWl0dGVyLmRlZmF1bHRNYXhMaXN0ZW5lcnM7XG4gIHJldHVybiB0aGF0Ll9tYXhMaXN0ZW5lcnM7XG59XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUuZ2V0TWF4TGlzdGVuZXJzID0gZnVuY3Rpb24gZ2V0TWF4TGlzdGVuZXJzKCkge1xuICByZXR1cm4gJGdldE1heExpc3RlbmVycyh0aGlzKTtcbn07XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUuZW1pdCA9IGZ1bmN0aW9uIGVtaXQodHlwZSkge1xuICB2YXIgYXJncyA9IFtdO1xuICBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykgYXJncy5wdXNoKGFyZ3VtZW50c1tpXSk7XG4gIHZhciBkb0Vycm9yID0gKHR5cGUgPT09ICdlcnJvcicpO1xuXG4gIHZhciBldmVudHMgPSB0aGlzLl9ldmVudHM7XG4gIGlmIChldmVudHMgIT09IHVuZGVmaW5lZClcbiAgICBkb0Vycm9yID0gKGRvRXJyb3IgJiYgZXZlbnRzLmVycm9yID09PSB1bmRlZmluZWQpO1xuICBlbHNlIGlmICghZG9FcnJvcilcbiAgICByZXR1cm4gZmFsc2U7XG5cbiAgLy8gSWYgdGhlcmUgaXMgbm8gJ2Vycm9yJyBldmVudCBsaXN0ZW5lciB0aGVuIHRocm93LlxuICBpZiAoZG9FcnJvcikge1xuICAgIHZhciBlcjtcbiAgICBpZiAoYXJncy5sZW5ndGggPiAwKVxuICAgICAgZXIgPSBhcmdzWzBdO1xuICAgIGlmIChlciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAvLyBOb3RlOiBUaGUgY29tbWVudHMgb24gdGhlIGB0aHJvd2AgbGluZXMgYXJlIGludGVudGlvbmFsLCB0aGV5IHNob3dcbiAgICAgIC8vIHVwIGluIE5vZGUncyBvdXRwdXQgaWYgdGhpcyByZXN1bHRzIGluIGFuIHVuaGFuZGxlZCBleGNlcHRpb24uXG4gICAgICB0aHJvdyBlcjsgLy8gVW5oYW5kbGVkICdlcnJvcicgZXZlbnRcbiAgICB9XG4gICAgLy8gQXQgbGVhc3QgZ2l2ZSBzb21lIGtpbmQgb2YgY29udGV4dCB0byB0aGUgdXNlclxuICAgIHZhciBlcnIgPSBuZXcgRXJyb3IoJ1VuaGFuZGxlZCBlcnJvci4nICsgKGVyID8gJyAoJyArIGVyLm1lc3NhZ2UgKyAnKScgOiAnJykpO1xuICAgIGVyci5jb250ZXh0ID0gZXI7XG4gICAgdGhyb3cgZXJyOyAvLyBVbmhhbmRsZWQgJ2Vycm9yJyBldmVudFxuICB9XG5cbiAgdmFyIGhhbmRsZXIgPSBldmVudHNbdHlwZV07XG5cbiAgaWYgKGhhbmRsZXIgPT09IHVuZGVmaW5lZClcbiAgICByZXR1cm4gZmFsc2U7XG5cbiAgaWYgKHR5cGVvZiBoYW5kbGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgUmVmbGVjdEFwcGx5KGhhbmRsZXIsIHRoaXMsIGFyZ3MpO1xuICB9IGVsc2Uge1xuICAgIHZhciBsZW4gPSBoYW5kbGVyLmxlbmd0aDtcbiAgICB2YXIgbGlzdGVuZXJzID0gYXJyYXlDbG9uZShoYW5kbGVyLCBsZW4pO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyArK2kpXG4gICAgICBSZWZsZWN0QXBwbHkobGlzdGVuZXJzW2ldLCB0aGlzLCBhcmdzKTtcbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufTtcblxuZnVuY3Rpb24gX2FkZExpc3RlbmVyKHRhcmdldCwgdHlwZSwgbGlzdGVuZXIsIHByZXBlbmQpIHtcbiAgdmFyIG07XG4gIHZhciBldmVudHM7XG4gIHZhciBleGlzdGluZztcblxuICBpZiAodHlwZW9mIGxpc3RlbmVyICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignVGhlIFwibGlzdGVuZXJcIiBhcmd1bWVudCBtdXN0IGJlIG9mIHR5cGUgRnVuY3Rpb24uIFJlY2VpdmVkIHR5cGUgJyArIHR5cGVvZiBsaXN0ZW5lcik7XG4gIH1cblxuICBldmVudHMgPSB0YXJnZXQuX2V2ZW50cztcbiAgaWYgKGV2ZW50cyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgZXZlbnRzID0gdGFyZ2V0Ll9ldmVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgIHRhcmdldC5fZXZlbnRzQ291bnQgPSAwO1xuICB9IGVsc2Uge1xuICAgIC8vIFRvIGF2b2lkIHJlY3Vyc2lvbiBpbiB0aGUgY2FzZSB0aGF0IHR5cGUgPT09IFwibmV3TGlzdGVuZXJcIiEgQmVmb3JlXG4gICAgLy8gYWRkaW5nIGl0IHRvIHRoZSBsaXN0ZW5lcnMsIGZpcnN0IGVtaXQgXCJuZXdMaXN0ZW5lclwiLlxuICAgIGlmIChldmVudHMubmV3TGlzdGVuZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgdGFyZ2V0LmVtaXQoJ25ld0xpc3RlbmVyJywgdHlwZSxcbiAgICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpc3RlbmVyID8gbGlzdGVuZXIubGlzdGVuZXIgOiBsaXN0ZW5lcik7XG5cbiAgICAgIC8vIFJlLWFzc2lnbiBgZXZlbnRzYCBiZWNhdXNlIGEgbmV3TGlzdGVuZXIgaGFuZGxlciBjb3VsZCBoYXZlIGNhdXNlZCB0aGVcbiAgICAgIC8vIHRoaXMuX2V2ZW50cyB0byBiZSBhc3NpZ25lZCB0byBhIG5ldyBvYmplY3RcbiAgICAgIGV2ZW50cyA9IHRhcmdldC5fZXZlbnRzO1xuICAgIH1cbiAgICBleGlzdGluZyA9IGV2ZW50c1t0eXBlXTtcbiAgfVxuXG4gIGlmIChleGlzdGluZyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgLy8gT3B0aW1pemUgdGhlIGNhc2Ugb2Ygb25lIGxpc3RlbmVyLiBEb24ndCBuZWVkIHRoZSBleHRyYSBhcnJheSBvYmplY3QuXG4gICAgZXhpc3RpbmcgPSBldmVudHNbdHlwZV0gPSBsaXN0ZW5lcjtcbiAgICArK3RhcmdldC5fZXZlbnRzQ291bnQ7XG4gIH0gZWxzZSB7XG4gICAgaWYgKHR5cGVvZiBleGlzdGluZyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgLy8gQWRkaW5nIHRoZSBzZWNvbmQgZWxlbWVudCwgbmVlZCB0byBjaGFuZ2UgdG8gYXJyYXkuXG4gICAgICBleGlzdGluZyA9IGV2ZW50c1t0eXBlXSA9XG4gICAgICAgIHByZXBlbmQgPyBbbGlzdGVuZXIsIGV4aXN0aW5nXSA6IFtleGlzdGluZywgbGlzdGVuZXJdO1xuICAgICAgLy8gSWYgd2UndmUgYWxyZWFkeSBnb3QgYW4gYXJyYXksIGp1c3QgYXBwZW5kLlxuICAgIH0gZWxzZSBpZiAocHJlcGVuZCkge1xuICAgICAgZXhpc3RpbmcudW5zaGlmdChsaXN0ZW5lcik7XG4gICAgfSBlbHNlIHtcbiAgICAgIGV4aXN0aW5nLnB1c2gobGlzdGVuZXIpO1xuICAgIH1cblxuICAgIC8vIENoZWNrIGZvciBsaXN0ZW5lciBsZWFrXG4gICAgbSA9ICRnZXRNYXhMaXN0ZW5lcnModGFyZ2V0KTtcbiAgICBpZiAobSA+IDAgJiYgZXhpc3RpbmcubGVuZ3RoID4gbSAmJiAhZXhpc3Rpbmcud2FybmVkKSB7XG4gICAgICBleGlzdGluZy53YXJuZWQgPSB0cnVlO1xuICAgICAgLy8gTm8gZXJyb3IgY29kZSBmb3IgdGhpcyBzaW5jZSBpdCBpcyBhIFdhcm5pbmdcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1yZXN0cmljdGVkLXN5bnRheFxuICAgICAgdmFyIHcgPSBuZXcgRXJyb3IoJ1Bvc3NpYmxlIEV2ZW50RW1pdHRlciBtZW1vcnkgbGVhayBkZXRlY3RlZC4gJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nLmxlbmd0aCArICcgJyArIFN0cmluZyh0eXBlKSArICcgbGlzdGVuZXJzICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAnYWRkZWQuIFVzZSBlbWl0dGVyLnNldE1heExpc3RlbmVycygpIHRvICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAnaW5jcmVhc2UgbGltaXQnKTtcbiAgICAgIHcubmFtZSA9ICdNYXhMaXN0ZW5lcnNFeGNlZWRlZFdhcm5pbmcnO1xuICAgICAgdy5lbWl0dGVyID0gdGFyZ2V0O1xuICAgICAgdy50eXBlID0gdHlwZTtcbiAgICAgIHcuY291bnQgPSBleGlzdGluZy5sZW5ndGg7XG4gICAgICBQcm9jZXNzRW1pdFdhcm5pbmcodyk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHRhcmdldDtcbn1cblxuRXZlbnRFbWl0dGVyLnByb3RvdHlwZS5hZGRMaXN0ZW5lciA9IGZ1bmN0aW9uIGFkZExpc3RlbmVyKHR5cGUsIGxpc3RlbmVyKSB7XG4gIHJldHVybiBfYWRkTGlzdGVuZXIodGhpcywgdHlwZSwgbGlzdGVuZXIsIGZhbHNlKTtcbn07XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUub24gPSBFdmVudEVtaXR0ZXIucHJvdG90eXBlLmFkZExpc3RlbmVyO1xuXG5FdmVudEVtaXR0ZXIucHJvdG90eXBlLnByZXBlbmRMaXN0ZW5lciA9XG4gICAgZnVuY3Rpb24gcHJlcGVuZExpc3RlbmVyKHR5cGUsIGxpc3RlbmVyKSB7XG4gICAgICByZXR1cm4gX2FkZExpc3RlbmVyKHRoaXMsIHR5cGUsIGxpc3RlbmVyLCB0cnVlKTtcbiAgICB9O1xuXG5mdW5jdGlvbiBvbmNlV3JhcHBlcigpIHtcbiAgdmFyIGFyZ3MgPSBbXTtcbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoOyBpKyspIGFyZ3MucHVzaChhcmd1bWVudHNbaV0pO1xuICBpZiAoIXRoaXMuZmlyZWQpIHtcbiAgICB0aGlzLnRhcmdldC5yZW1vdmVMaXN0ZW5lcih0aGlzLnR5cGUsIHRoaXMud3JhcEZuKTtcbiAgICB0aGlzLmZpcmVkID0gdHJ1ZTtcbiAgICBSZWZsZWN0QXBwbHkodGhpcy5saXN0ZW5lciwgdGhpcy50YXJnZXQsIGFyZ3MpO1xuICB9XG59XG5cbmZ1bmN0aW9uIF9vbmNlV3JhcCh0YXJnZXQsIHR5cGUsIGxpc3RlbmVyKSB7XG4gIHZhciBzdGF0ZSA9IHsgZmlyZWQ6IGZhbHNlLCB3cmFwRm46IHVuZGVmaW5lZCwgdGFyZ2V0OiB0YXJnZXQsIHR5cGU6IHR5cGUsIGxpc3RlbmVyOiBsaXN0ZW5lciB9O1xuICB2YXIgd3JhcHBlZCA9IG9uY2VXcmFwcGVyLmJpbmQoc3RhdGUpO1xuICB3cmFwcGVkLmxpc3RlbmVyID0gbGlzdGVuZXI7XG4gIHN0YXRlLndyYXBGbiA9IHdyYXBwZWQ7XG4gIHJldHVybiB3cmFwcGVkO1xufVxuXG5FdmVudEVtaXR0ZXIucHJvdG90eXBlLm9uY2UgPSBmdW5jdGlvbiBvbmNlKHR5cGUsIGxpc3RlbmVyKSB7XG4gIGlmICh0eXBlb2YgbGlzdGVuZXIgIT09ICdmdW5jdGlvbicpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdUaGUgXCJsaXN0ZW5lclwiIGFyZ3VtZW50IG11c3QgYmUgb2YgdHlwZSBGdW5jdGlvbi4gUmVjZWl2ZWQgdHlwZSAnICsgdHlwZW9mIGxpc3RlbmVyKTtcbiAgfVxuICB0aGlzLm9uKHR5cGUsIF9vbmNlV3JhcCh0aGlzLCB0eXBlLCBsaXN0ZW5lcikpO1xuICByZXR1cm4gdGhpcztcbn07XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUucHJlcGVuZE9uY2VMaXN0ZW5lciA9XG4gICAgZnVuY3Rpb24gcHJlcGVuZE9uY2VMaXN0ZW5lcih0eXBlLCBsaXN0ZW5lcikge1xuICAgICAgaWYgKHR5cGVvZiBsaXN0ZW5lciAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdUaGUgXCJsaXN0ZW5lclwiIGFyZ3VtZW50IG11c3QgYmUgb2YgdHlwZSBGdW5jdGlvbi4gUmVjZWl2ZWQgdHlwZSAnICsgdHlwZW9mIGxpc3RlbmVyKTtcbiAgICAgIH1cbiAgICAgIHRoaXMucHJlcGVuZExpc3RlbmVyKHR5cGUsIF9vbmNlV3JhcCh0aGlzLCB0eXBlLCBsaXN0ZW5lcikpO1xuICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcblxuLy8gRW1pdHMgYSAncmVtb3ZlTGlzdGVuZXInIGV2ZW50IGlmIGFuZCBvbmx5IGlmIHRoZSBsaXN0ZW5lciB3YXMgcmVtb3ZlZC5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUucmVtb3ZlTGlzdGVuZXIgPVxuICAgIGZ1bmN0aW9uIHJlbW92ZUxpc3RlbmVyKHR5cGUsIGxpc3RlbmVyKSB7XG4gICAgICB2YXIgbGlzdCwgZXZlbnRzLCBwb3NpdGlvbiwgaSwgb3JpZ2luYWxMaXN0ZW5lcjtcblxuICAgICAgaWYgKHR5cGVvZiBsaXN0ZW5lciAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdUaGUgXCJsaXN0ZW5lclwiIGFyZ3VtZW50IG11c3QgYmUgb2YgdHlwZSBGdW5jdGlvbi4gUmVjZWl2ZWQgdHlwZSAnICsgdHlwZW9mIGxpc3RlbmVyKTtcbiAgICAgIH1cblxuICAgICAgZXZlbnRzID0gdGhpcy5fZXZlbnRzO1xuICAgICAgaWYgKGV2ZW50cyA9PT0gdW5kZWZpbmVkKVxuICAgICAgICByZXR1cm4gdGhpcztcblxuICAgICAgbGlzdCA9IGV2ZW50c1t0eXBlXTtcbiAgICAgIGlmIChsaXN0ID09PSB1bmRlZmluZWQpXG4gICAgICAgIHJldHVybiB0aGlzO1xuXG4gICAgICBpZiAobGlzdCA9PT0gbGlzdGVuZXIgfHwgbGlzdC5saXN0ZW5lciA9PT0gbGlzdGVuZXIpIHtcbiAgICAgICAgaWYgKC0tdGhpcy5fZXZlbnRzQ291bnQgPT09IDApXG4gICAgICAgICAgdGhpcy5fZXZlbnRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgZGVsZXRlIGV2ZW50c1t0eXBlXTtcbiAgICAgICAgICBpZiAoZXZlbnRzLnJlbW92ZUxpc3RlbmVyKVxuICAgICAgICAgICAgdGhpcy5lbWl0KCdyZW1vdmVMaXN0ZW5lcicsIHR5cGUsIGxpc3QubGlzdGVuZXIgfHwgbGlzdGVuZXIpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHR5cGVvZiBsaXN0ICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgIHBvc2l0aW9uID0gLTE7XG5cbiAgICAgICAgZm9yIChpID0gbGlzdC5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgIGlmIChsaXN0W2ldID09PSBsaXN0ZW5lciB8fCBsaXN0W2ldLmxpc3RlbmVyID09PSBsaXN0ZW5lcikge1xuICAgICAgICAgICAgb3JpZ2luYWxMaXN0ZW5lciA9IGxpc3RbaV0ubGlzdGVuZXI7XG4gICAgICAgICAgICBwb3NpdGlvbiA9IGk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocG9zaXRpb24gPCAwKVxuICAgICAgICAgIHJldHVybiB0aGlzO1xuXG4gICAgICAgIGlmIChwb3NpdGlvbiA9PT0gMClcbiAgICAgICAgICBsaXN0LnNoaWZ0KCk7XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIHNwbGljZU9uZShsaXN0LCBwb3NpdGlvbik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobGlzdC5sZW5ndGggPT09IDEpXG4gICAgICAgICAgZXZlbnRzW3R5cGVdID0gbGlzdFswXTtcblxuICAgICAgICBpZiAoZXZlbnRzLnJlbW92ZUxpc3RlbmVyICE9PSB1bmRlZmluZWQpXG4gICAgICAgICAgdGhpcy5lbWl0KCdyZW1vdmVMaXN0ZW5lcicsIHR5cGUsIG9yaWdpbmFsTGlzdGVuZXIgfHwgbGlzdGVuZXIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuXG5FdmVudEVtaXR0ZXIucHJvdG90eXBlLm9mZiA9IEV2ZW50RW1pdHRlci5wcm90b3R5cGUucmVtb3ZlTGlzdGVuZXI7XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUucmVtb3ZlQWxsTGlzdGVuZXJzID1cbiAgICBmdW5jdGlvbiByZW1vdmVBbGxMaXN0ZW5lcnModHlwZSkge1xuICAgICAgdmFyIGxpc3RlbmVycywgZXZlbnRzLCBpO1xuXG4gICAgICBldmVudHMgPSB0aGlzLl9ldmVudHM7XG4gICAgICBpZiAoZXZlbnRzID09PSB1bmRlZmluZWQpXG4gICAgICAgIHJldHVybiB0aGlzO1xuXG4gICAgICAvLyBub3QgbGlzdGVuaW5nIGZvciByZW1vdmVMaXN0ZW5lciwgbm8gbmVlZCB0byBlbWl0XG4gICAgICBpZiAoZXZlbnRzLnJlbW92ZUxpc3RlbmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICB0aGlzLl9ldmVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgICAgIHRoaXMuX2V2ZW50c0NvdW50ID0gMDtcbiAgICAgICAgfSBlbHNlIGlmIChldmVudHNbdHlwZV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmICgtLXRoaXMuX2V2ZW50c0NvdW50ID09PSAwKVxuICAgICAgICAgICAgdGhpcy5fZXZlbnRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgICAgICBlbHNlXG4gICAgICAgICAgICBkZWxldGUgZXZlbnRzW3R5cGVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuXG4gICAgICAvLyBlbWl0IHJlbW92ZUxpc3RlbmVyIGZvciBhbGwgbGlzdGVuZXJzIG9uIGFsbCBldmVudHNcbiAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoZXZlbnRzKTtcbiAgICAgICAgdmFyIGtleTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGtleXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICBrZXkgPSBrZXlzW2ldO1xuICAgICAgICAgIGlmIChrZXkgPT09ICdyZW1vdmVMaXN0ZW5lcicpIGNvbnRpbnVlO1xuICAgICAgICAgIHRoaXMucmVtb3ZlQWxsTGlzdGVuZXJzKGtleSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5yZW1vdmVBbGxMaXN0ZW5lcnMoJ3JlbW92ZUxpc3RlbmVyJyk7XG4gICAgICAgIHRoaXMuX2V2ZW50cyA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gICAgICAgIHRoaXMuX2V2ZW50c0NvdW50ID0gMDtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9XG5cbiAgICAgIGxpc3RlbmVycyA9IGV2ZW50c1t0eXBlXTtcblxuICAgICAgaWYgKHR5cGVvZiBsaXN0ZW5lcnMgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgdGhpcy5yZW1vdmVMaXN0ZW5lcih0eXBlLCBsaXN0ZW5lcnMpO1xuICAgICAgfSBlbHNlIGlmIChsaXN0ZW5lcnMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAvLyBMSUZPIG9yZGVyXG4gICAgICAgIGZvciAoaSA9IGxpc3RlbmVycy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgIHRoaXMucmVtb3ZlTGlzdGVuZXIodHlwZSwgbGlzdGVuZXJzW2ldKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuXG5mdW5jdGlvbiBfbGlzdGVuZXJzKHRhcmdldCwgdHlwZSwgdW53cmFwKSB7XG4gIHZhciBldmVudHMgPSB0YXJnZXQuX2V2ZW50cztcblxuICBpZiAoZXZlbnRzID09PSB1bmRlZmluZWQpXG4gICAgcmV0dXJuIFtdO1xuXG4gIHZhciBldmxpc3RlbmVyID0gZXZlbnRzW3R5cGVdO1xuICBpZiAoZXZsaXN0ZW5lciA9PT0gdW5kZWZpbmVkKVxuICAgIHJldHVybiBbXTtcblxuICBpZiAodHlwZW9mIGV2bGlzdGVuZXIgPT09ICdmdW5jdGlvbicpXG4gICAgcmV0dXJuIHVud3JhcCA/IFtldmxpc3RlbmVyLmxpc3RlbmVyIHx8IGV2bGlzdGVuZXJdIDogW2V2bGlzdGVuZXJdO1xuXG4gIHJldHVybiB1bndyYXAgP1xuICAgIHVud3JhcExpc3RlbmVycyhldmxpc3RlbmVyKSA6IGFycmF5Q2xvbmUoZXZsaXN0ZW5lciwgZXZsaXN0ZW5lci5sZW5ndGgpO1xufVxuXG5FdmVudEVtaXR0ZXIucHJvdG90eXBlLmxpc3RlbmVycyA9IGZ1bmN0aW9uIGxpc3RlbmVycyh0eXBlKSB7XG4gIHJldHVybiBfbGlzdGVuZXJzKHRoaXMsIHR5cGUsIHRydWUpO1xufTtcblxuRXZlbnRFbWl0dGVyLnByb3RvdHlwZS5yYXdMaXN0ZW5lcnMgPSBmdW5jdGlvbiByYXdMaXN0ZW5lcnModHlwZSkge1xuICByZXR1cm4gX2xpc3RlbmVycyh0aGlzLCB0eXBlLCBmYWxzZSk7XG59O1xuXG5FdmVudEVtaXR0ZXIubGlzdGVuZXJDb3VudCA9IGZ1bmN0aW9uKGVtaXR0ZXIsIHR5cGUpIHtcbiAgaWYgKHR5cGVvZiBlbWl0dGVyLmxpc3RlbmVyQ291bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gZW1pdHRlci5saXN0ZW5lckNvdW50KHR5cGUpO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBsaXN0ZW5lckNvdW50LmNhbGwoZW1pdHRlciwgdHlwZSk7XG4gIH1cbn07XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUubGlzdGVuZXJDb3VudCA9IGxpc3RlbmVyQ291bnQ7XG5mdW5jdGlvbiBsaXN0ZW5lckNvdW50KHR5cGUpIHtcbiAgdmFyIGV2ZW50cyA9IHRoaXMuX2V2ZW50cztcblxuICBpZiAoZXZlbnRzICE9PSB1bmRlZmluZWQpIHtcbiAgICB2YXIgZXZsaXN0ZW5lciA9IGV2ZW50c1t0eXBlXTtcblxuICAgIGlmICh0eXBlb2YgZXZsaXN0ZW5lciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgcmV0dXJuIDE7XG4gICAgfSBlbHNlIGlmIChldmxpc3RlbmVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgIHJldHVybiBldmxpc3RlbmVyLmxlbmd0aDtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gMDtcbn1cblxuRXZlbnRFbWl0dGVyLnByb3RvdHlwZS5ldmVudE5hbWVzID0gZnVuY3Rpb24gZXZlbnROYW1lcygpIHtcbiAgcmV0dXJuIHRoaXMuX2V2ZW50c0NvdW50ID4gMCA/IFJlZmxlY3RPd25LZXlzKHRoaXMuX2V2ZW50cykgOiBbXTtcbn07XG5cbmZ1bmN0aW9uIGFycmF5Q2xvbmUoYXJyLCBuKSB7XG4gIHZhciBjb3B5ID0gbmV3IEFycmF5KG4pO1xuICBmb3IgKHZhciBpID0gMDsgaSA8IG47ICsraSlcbiAgICBjb3B5W2ldID0gYXJyW2ldO1xuICByZXR1cm4gY29weTtcbn1cblxuZnVuY3Rpb24gc3BsaWNlT25lKGxpc3QsIGluZGV4KSB7XG4gIGZvciAoOyBpbmRleCArIDEgPCBsaXN0Lmxlbmd0aDsgaW5kZXgrKylcbiAgICBsaXN0W2luZGV4XSA9IGxpc3RbaW5kZXggKyAxXTtcbiAgbGlzdC5wb3AoKTtcbn1cblxuZnVuY3Rpb24gdW53cmFwTGlzdGVuZXJzKGFycikge1xuICB2YXIgcmV0ID0gbmV3IEFycmF5KGFyci5sZW5ndGgpO1xuICBmb3IgKHZhciBpID0gMDsgaSA8IHJldC5sZW5ndGg7ICsraSkge1xuICAgIHJldFtpXSA9IGFycltpXS5saXN0ZW5lciB8fCBhcnJbaV07XG4gIH1cbiAgcmV0dXJuIHJldDtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/events/events.js\n"); + +/***/ }), + +/***/ "./node_modules/https-browserify/index.js": +/*!************************************************!*\ + !*** ./node_modules/https-browserify/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var http = __webpack_require__(/*! http */ \"./node_modules/stream-http/index.js\")\nvar url = __webpack_require__(/*! url */ \"./node_modules/url/url.js\")\n\nvar https = module.exports\n\nfor (var key in http) {\n if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n params = validateParams(params)\n return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n params = validateParams(params)\n return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params.protocol) {\n params.protocol = 'https:'\n }\n if (params.protocol !== 'https:') {\n throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n }\n return params\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvaHR0cHMtYnJvd3NlcmlmeS9pbmRleC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2h0dHBzLWJyb3dzZXJpZnkvaW5kZXguanM/MjRmOCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaHR0cCA9IHJlcXVpcmUoJ2h0dHAnKVxudmFyIHVybCA9IHJlcXVpcmUoJ3VybCcpXG5cbnZhciBodHRwcyA9IG1vZHVsZS5leHBvcnRzXG5cbmZvciAodmFyIGtleSBpbiBodHRwKSB7XG4gIGlmIChodHRwLmhhc093blByb3BlcnR5KGtleSkpIGh0dHBzW2tleV0gPSBodHRwW2tleV1cbn1cblxuaHR0cHMucmVxdWVzdCA9IGZ1bmN0aW9uIChwYXJhbXMsIGNiKSB7XG4gIHBhcmFtcyA9IHZhbGlkYXRlUGFyYW1zKHBhcmFtcylcbiAgcmV0dXJuIGh0dHAucmVxdWVzdC5jYWxsKHRoaXMsIHBhcmFtcywgY2IpXG59XG5cbmh0dHBzLmdldCA9IGZ1bmN0aW9uIChwYXJhbXMsIGNiKSB7XG4gIHBhcmFtcyA9IHZhbGlkYXRlUGFyYW1zKHBhcmFtcylcbiAgcmV0dXJuIGh0dHAuZ2V0LmNhbGwodGhpcywgcGFyYW1zLCBjYilcbn1cblxuZnVuY3Rpb24gdmFsaWRhdGVQYXJhbXMgKHBhcmFtcykge1xuICBpZiAodHlwZW9mIHBhcmFtcyA9PT0gJ3N0cmluZycpIHtcbiAgICBwYXJhbXMgPSB1cmwucGFyc2UocGFyYW1zKVxuICB9XG4gIGlmICghcGFyYW1zLnByb3RvY29sKSB7XG4gICAgcGFyYW1zLnByb3RvY29sID0gJ2h0dHBzOidcbiAgfVxuICBpZiAocGFyYW1zLnByb3RvY29sICE9PSAnaHR0cHM6Jykge1xuICAgIHRocm93IG5ldyBFcnJvcignUHJvdG9jb2wgXCInICsgcGFyYW1zLnByb3RvY29sICsgJ1wiIG5vdCBzdXBwb3J0ZWQuIEV4cGVjdGVkIFwiaHR0cHM6XCInKVxuICB9XG4gIHJldHVybiBwYXJhbXNcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/https-browserify/index.js\n"); + +/***/ }), + +/***/ "./node_modules/ieee754/index.js": +/*!***************************************!*\ + !*** ./node_modules/ieee754/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvaWVlZTc1NC9pbmRleC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2llZWU3NTQvaW5kZXguanM/OTE1MiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLnJlYWQgPSBmdW5jdGlvbiAoYnVmZmVyLCBvZmZzZXQsIGlzTEUsIG1MZW4sIG5CeXRlcykge1xuICB2YXIgZSwgbVxuICB2YXIgZUxlbiA9IChuQnl0ZXMgKiA4KSAtIG1MZW4gLSAxXG4gIHZhciBlTWF4ID0gKDEgPDwgZUxlbikgLSAxXG4gIHZhciBlQmlhcyA9IGVNYXggPj4gMVxuICB2YXIgbkJpdHMgPSAtN1xuICB2YXIgaSA9IGlzTEUgPyAobkJ5dGVzIC0gMSkgOiAwXG4gIHZhciBkID0gaXNMRSA/IC0xIDogMVxuICB2YXIgcyA9IGJ1ZmZlcltvZmZzZXQgKyBpXVxuXG4gIGkgKz0gZFxuXG4gIGUgPSBzICYgKCgxIDw8ICgtbkJpdHMpKSAtIDEpXG4gIHMgPj49ICgtbkJpdHMpXG4gIG5CaXRzICs9IGVMZW5cbiAgZm9yICg7IG5CaXRzID4gMDsgZSA9IChlICogMjU2KSArIGJ1ZmZlcltvZmZzZXQgKyBpXSwgaSArPSBkLCBuQml0cyAtPSA4KSB7fVxuXG4gIG0gPSBlICYgKCgxIDw8ICgtbkJpdHMpKSAtIDEpXG4gIGUgPj49ICgtbkJpdHMpXG4gIG5CaXRzICs9IG1MZW5cbiAgZm9yICg7IG5CaXRzID4gMDsgbSA9IChtICogMjU2KSArIGJ1ZmZlcltvZmZzZXQgKyBpXSwgaSArPSBkLCBuQml0cyAtPSA4KSB7fVxuXG4gIGlmIChlID09PSAwKSB7XG4gICAgZSA9IDEgLSBlQmlhc1xuICB9IGVsc2UgaWYgKGUgPT09IGVNYXgpIHtcbiAgICByZXR1cm4gbSA/IE5hTiA6ICgocyA/IC0xIDogMSkgKiBJbmZpbml0eSlcbiAgfSBlbHNlIHtcbiAgICBtID0gbSArIE1hdGgucG93KDIsIG1MZW4pXG4gICAgZSA9IGUgLSBlQmlhc1xuICB9XG4gIHJldHVybiAocyA/IC0xIDogMSkgKiBtICogTWF0aC5wb3coMiwgZSAtIG1MZW4pXG59XG5cbmV4cG9ydHMud3JpdGUgPSBmdW5jdGlvbiAoYnVmZmVyLCB2YWx1ZSwgb2Zmc2V0LCBpc0xFLCBtTGVuLCBuQnl0ZXMpIHtcbiAgdmFyIGUsIG0sIGNcbiAgdmFyIGVMZW4gPSAobkJ5dGVzICogOCkgLSBtTGVuIC0gMVxuICB2YXIgZU1heCA9ICgxIDw8IGVMZW4pIC0gMVxuICB2YXIgZUJpYXMgPSBlTWF4ID4+IDFcbiAgdmFyIHJ0ID0gKG1MZW4gPT09IDIzID8gTWF0aC5wb3coMiwgLTI0KSAtIE1hdGgucG93KDIsIC03NykgOiAwKVxuICB2YXIgaSA9IGlzTEUgPyAwIDogKG5CeXRlcyAtIDEpXG4gIHZhciBkID0gaXNMRSA/IDEgOiAtMVxuICB2YXIgcyA9IHZhbHVlIDwgMCB8fCAodmFsdWUgPT09IDAgJiYgMSAvIHZhbHVlIDwgMCkgPyAxIDogMFxuXG4gIHZhbHVlID0gTWF0aC5hYnModmFsdWUpXG5cbiAgaWYgKGlzTmFOKHZhbHVlKSB8fCB2YWx1ZSA9PT0gSW5maW5pdHkpIHtcbiAgICBtID0gaXNOYU4odmFsdWUpID8gMSA6IDBcbiAgICBlID0gZU1heFxuICB9IGVsc2Uge1xuICAgIGUgPSBNYXRoLmZsb29yKE1hdGgubG9nKHZhbHVlKSAvIE1hdGguTE4yKVxuICAgIGlmICh2YWx1ZSAqIChjID0gTWF0aC5wb3coMiwgLWUpKSA8IDEpIHtcbiAgICAgIGUtLVxuICAgICAgYyAqPSAyXG4gICAgfVxuICAgIGlmIChlICsgZUJpYXMgPj0gMSkge1xuICAgICAgdmFsdWUgKz0gcnQgLyBjXG4gICAgfSBlbHNlIHtcbiAgICAgIHZhbHVlICs9IHJ0ICogTWF0aC5wb3coMiwgMSAtIGVCaWFzKVxuICAgIH1cbiAgICBpZiAodmFsdWUgKiBjID49IDIpIHtcbiAgICAgIGUrK1xuICAgICAgYyAvPSAyXG4gICAgfVxuXG4gICAgaWYgKGUgKyBlQmlhcyA+PSBlTWF4KSB7XG4gICAgICBtID0gMFxuICAgICAgZSA9IGVNYXhcbiAgICB9IGVsc2UgaWYgKGUgKyBlQmlhcyA+PSAxKSB7XG4gICAgICBtID0gKCh2YWx1ZSAqIGMpIC0gMSkgKiBNYXRoLnBvdygyLCBtTGVuKVxuICAgICAgZSA9IGUgKyBlQmlhc1xuICAgIH0gZWxzZSB7XG4gICAgICBtID0gdmFsdWUgKiBNYXRoLnBvdygyLCBlQmlhcyAtIDEpICogTWF0aC5wb3coMiwgbUxlbilcbiAgICAgIGUgPSAwXG4gICAgfVxuICB9XG5cbiAgZm9yICg7IG1MZW4gPj0gODsgYnVmZmVyW29mZnNldCArIGldID0gbSAmIDB4ZmYsIGkgKz0gZCwgbSAvPSAyNTYsIG1MZW4gLT0gOCkge31cblxuICBlID0gKGUgPDwgbUxlbikgfCBtXG4gIGVMZW4gKz0gbUxlblxuICBmb3IgKDsgZUxlbiA+IDA7IGJ1ZmZlcltvZmZzZXQgKyBpXSA9IGUgJiAweGZmLCBpICs9IGQsIGUgLz0gMjU2LCBlTGVuIC09IDgpIHt9XG5cbiAgYnVmZmVyW29mZnNldCArIGkgLSBkXSB8PSBzICogMTI4XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/ieee754/index.js\n"); + +/***/ }), + +/***/ "./node_modules/inherits/inherits_browser.js": +/*!***************************************************!*\ + !*** ./node_modules/inherits/inherits_browser.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvaW5oZXJpdHMvaW5oZXJpdHNfYnJvd3Nlci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2luaGVyaXRzL2luaGVyaXRzX2Jyb3dzZXIuanM/M2ZiNSJdLCJzb3VyY2VzQ29udGVudCI6WyJpZiAodHlwZW9mIE9iamVjdC5jcmVhdGUgPT09ICdmdW5jdGlvbicpIHtcbiAgLy8gaW1wbGVtZW50YXRpb24gZnJvbSBzdGFuZGFyZCBub2RlLmpzICd1dGlsJyBtb2R1bGVcbiAgbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBpbmhlcml0cyhjdG9yLCBzdXBlckN0b3IpIHtcbiAgICBjdG9yLnN1cGVyXyA9IHN1cGVyQ3RvclxuICAgIGN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShzdXBlckN0b3IucHJvdG90eXBlLCB7XG4gICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICB2YWx1ZTogY3RvcixcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgIH1cbiAgICB9KTtcbiAgfTtcbn0gZWxzZSB7XG4gIC8vIG9sZCBzY2hvb2wgc2hpbSBmb3Igb2xkIGJyb3dzZXJzXG4gIG1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gaW5oZXJpdHMoY3Rvciwgc3VwZXJDdG9yKSB7XG4gICAgY3Rvci5zdXBlcl8gPSBzdXBlckN0b3JcbiAgICB2YXIgVGVtcEN0b3IgPSBmdW5jdGlvbiAoKSB7fVxuICAgIFRlbXBDdG9yLnByb3RvdHlwZSA9IHN1cGVyQ3Rvci5wcm90b3R5cGVcbiAgICBjdG9yLnByb3RvdHlwZSA9IG5ldyBUZW1wQ3RvcigpXG4gICAgY3Rvci5wcm90b3R5cGUuY29uc3RydWN0b3IgPSBjdG9yXG4gIH1cbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/inherits/inherits_browser.js\n"); + +/***/ }), + +/***/ "./node_modules/isarray/index.js": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvaXNhcnJheS9pbmRleC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0pTLy4vbm9kZV9tb2R1bGVzL2lzYXJyYXkvaW5kZXguanM/ZTNkYiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9TdHJpbmcgPSB7fS50b1N0cmluZztcblxubW9kdWxlLmV4cG9ydHMgPSBBcnJheS5pc0FycmF5IHx8IGZ1bmN0aW9uIChhcnIpIHtcbiAgcmV0dXJuIHRvU3RyaW5nLmNhbGwoYXJyKSA9PSAnW29iamVjdCBBcnJheV0nO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/isarray/index.js\n"); + +/***/ }), + +/***/ "./node_modules/jquery/dist/jquery.js": +/*!********************************************!*\ + !*** ./node_modules/jquery/dist/jquery.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery JavaScript Library v3.4.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2019-05-01T21:04Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( true && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns \"function\" for HTML elements\n // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n // We don't want to classify *any* DOM node as a function.\n return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\n };\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.4.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android <=4.0 only\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code, options ) {\n\t\tDOMEval( code, { nonce: options && options.nonce } );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android <=4.0 only\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.4\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2019-04-08\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t(nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\") ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 && rdescend.test( selector ) ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = \"#\" + nid + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement(\"fieldset\");\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem.namespaceURI,\n\t\tdocElem = (elem.ownerDocument || elem).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( preferredDoc !== document &&\n\t\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( el ) {\n\t\tel.appendChild( document.createComment(\"\") );\n\t\treturn !el.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( (elem = elems[i++]) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( el ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( el ) {\n\t\t\tel.innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll(\":enabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll(\":disabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( el ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn (sel + \"\").replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( (oldCache = uniqueCache[ key ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( el ) {\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement(\"fieldset\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( el ) {\n\tel.innerHTML = \"\";\n\treturn el.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( el ) {\n\tel.innerHTML = \"\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( el ) {\n\treturn el.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n};\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( typeof elem.contentDocument !== \"undefined\" ) {\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (#9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE <=9 only\n\toption: [ 1, \"\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting or other required elements.\n\tthead: [ 1, \"\", \"
            \" ],\n\tcol: [ 2, \"\", \"
            \" ],\n\ttr: [ 2, \"\", \"
            \" ],\n\ttd: [ 3, \"\", \"
            \" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE <=9 only\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tvar event = jQuery.event.fix( nativeEvent );\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t/* eslint-disable max-len */\n\n\t// See https://github.com/eslint/eslint/issues/3229\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,\n\n\t/* eslint-enable */\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, #12537)\n\t// .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trcustomProp = /^--/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t// This happens for inline elements with no explicit setting (gh-3571)\n\t// Support: Android <=4.1 - 4.3 only\n\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t// Support: IE 9-11 only\n\t// Also use offsetWidth/offsetHeight for when box sizing is unreliable\n\t// We use getClientRects() to check for hidden/disconnected.\n\t// In those cases, the computed value can be trusted to be border-box\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\t\tval === \"auto\" ||\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = Date.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce++ ) + uncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url, options ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \" +Redirecting + + +

            Redirecting

            +

            Redirecting...
            +

            Click here

            + + diff --git a/src/hamcorebuilder/CMakeLists.txt b/src/hamcorebuilder/CMakeLists.txt index a4fb02d5..3e8d7b3d 100644 --- a/src/hamcorebuilder/CMakeLists.txt +++ b/src/hamcorebuilder/CMakeLists.txt @@ -2,9 +2,16 @@ add_executable(hamcorebuilder hamcorebuilder.c) set_target_properties(hamcorebuilder PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp" + ARCHIVE_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp" + LIBRARY_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp" + RUNTIME_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp" ) +if(WIN32) + set_target_properties(hamcorebuilder + PROPERTIES + PDB_OUTPUT_DIRECTORY "${TOP_DIRECTORY}/tmp" + ) +endif() + target_link_libraries(hamcorebuilder cedar mayaqua) diff --git a/src/hamcorebuilder/hamcorebuilder.c b/src/hamcorebuilder/hamcorebuilder.c index c11546c6..a9a498d9 100644 --- a/src/hamcorebuilder/hamcorebuilder.c +++ b/src/hamcorebuilder/hamcorebuilder.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // hamcorebuilder.c @@ -136,8 +30,12 @@ int main(int argc, char *argv[]) { MayaquaMinimalMode(); -#ifdef DEBUG - InitMayaqua(true, true, argc, argv); + +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, argc, argv); #else InitMayaqua(false, false, argc, argv); #endif @@ -160,7 +58,11 @@ int main(int argc, char *argv[]) Print("\nProcessing...\n"); +#ifdef WIN32 + BuildHamcore(dst_filename, src_dir, false); +#else BuildHamcore(dst_filename, src_dir, true); +#endif Print("\nDone.\n"); } diff --git a/src/vpn16/Vpn16.rc b/src/vpn16/Vpn16.rc index 1a8208e7..eac2248f 100644 --- a/src/vpn16/Vpn16.rc +++ b/src/vpn16/Vpn16.rc @@ -31,7 +31,7 @@ END 2 TEXTINCLUDE DISCARDABLE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpn16/vpn16.c b/src/vpn16/vpn16.c index d5bd0fbb..5957db08 100644 --- a/src/vpn16/vpn16.c +++ b/src/vpn16/vpn16.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // 16-bit Driver Install Utility for Windows 9x -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpn16.c diff --git a/src/vpn16/vpn16.h b/src/vpn16/vpn16.h index 736b1bf5..7a2bb97d 100644 --- a/src/vpn16/vpn16.h +++ b/src/vpn16/vpn16.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // 16-bit Driver Install Utility for Windows 9x -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpn16.h diff --git a/src/vpnbridge/CMakeLists.txt b/src/vpnbridge/CMakeLists.txt index 7629bbf1..fb076876 100644 --- a/src/vpnbridge/CMakeLists.txt +++ b/src/vpnbridge/CMakeLists.txt @@ -1,10 +1,51 @@ +set(COMPONENT_NAME "Bridge") +set(COMPONENT_INTERNAL_NAME "vpnbridge") + add_executable(vpnbridge vpnbridge.c) set_target_properties(vpnbridge PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnbridge" - LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnbridge" - RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnbridge" + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" ) +if(WIN32) + set_target_properties(vpnbridge + PROPERTIES + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) + + get_filename_component(COMPONENT_FILE_NAME vpnbridge NAME) + set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + + configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnbridge.rc") + target_sources(vpnbridge PRIVATE vpnbridge.rc "${CMAKE_BINARY_DIR}/VerScript/vpnbridge.rc") +endif() + target_link_libraries(vpnbridge cedar mayaqua) + +if(UNIX) + # Copy binary and "hamcore.se2" to /usr/lib(exec)/softether/, install launch script and systemd service + install(TARGETS vpnbridge + COMPONENT "vpnbridge" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnbridge" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + + install(FILES "${BUILD_DIRECTORY}/hamcore.se2" + COMPONENT "vpnbridge" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnbridge" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + + install_wrapper_script("vpnbridge" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge") + if(EXISTS "/lib/systemd/system") + configure_file(${TOP_DIRECTORY}/systemd/softether-vpnbridge.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service) + install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnbridge.service + COMPONENT "vpnbridge" + DESTINATION "/lib/systemd/system" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + endif() +endif() diff --git a/src/vpnbridge/vpnbridge.c b/src/vpnbridge/vpnbridge.c index 2ac09612..135644d3 100644 --- a/src/vpnbridge/vpnbridge.c +++ b/src/vpnbridge/vpnbridge.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpnbridge.c diff --git a/src/vpnbridge/vpnbridge.rc b/src/vpnbridge/vpnbridge.rc index 06e6da7a..0cdb5263 100644 --- a/src/vpnbridge/vpnbridge.rc +++ b/src/vpnbridge/vpnbridge.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpnclient/CMakeLists.txt b/src/vpnclient/CMakeLists.txt index f7c619f7..9df369ec 100644 --- a/src/vpnclient/CMakeLists.txt +++ b/src/vpnclient/CMakeLists.txt @@ -1,10 +1,51 @@ -add_executable(vpnclient vpncsvc.c) +set(COMPONENT_NAME "Client") +set(COMPONENT_INTERNAL_NAME "vpnclient") + +add_executable(vpnclient vpncsvc.c vpncsvc.h) set_target_properties(vpnclient PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnclient" - LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnclient" - RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnclient" + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" ) +if(WIN32) + set_target_properties(vpnclient + PROPERTIES + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) + + get_filename_component(COMPONENT_FILE_NAME vpnclient NAME) + set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + + configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnclient.rc") + target_sources(vpnclient PRIVATE vpnclient.rc "${CMAKE_BINARY_DIR}/VerScript/vpnclient.rc") +endif() + target_link_libraries(vpnclient cedar mayaqua) + +if(UNIX) + # Copy binary and "hamcore.se2" to /usr/lib(exec)/softether/, install launch script and systemd service + install(TARGETS vpnclient + COMPONENT "vpnclient" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnclient" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + + install(FILES "${BUILD_DIRECTORY}/hamcore.se2" + COMPONENT "vpnclient" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnclient" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + + install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient") + if(EXISTS "/lib/systemd/system") + configure_file(${TOP_DIRECTORY}/systemd/softether-vpnclient.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service) + install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnclient.service + COMPONENT "vpnclient" + DESTINATION "/lib/systemd/system" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + endif() +endif() diff --git a/src/vpnclient/vpnclient.rc b/src/vpnclient/vpnclient.rc index 8493f080..478fef16 100644 --- a/src/vpnclient/vpnclient.rc +++ b/src/vpnclient/vpnclient.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpnclient/vpncsvc.c b/src/vpnclient/vpncsvc.c index fae9ad12..c08055cf 100644 --- a/src/vpnclient/vpncsvc.c +++ b/src/vpnclient/vpncsvc.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncsvc.c diff --git a/src/vpnclient/vpncsvc.h b/src/vpnclient/vpncsvc.h index c57a6883..675b77ee 100644 --- a/src/vpnclient/vpncsvc.h +++ b/src/vpnclient/vpncsvc.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncsvc.h diff --git a/src/vpncmd/CMakeLists.txt b/src/vpncmd/CMakeLists.txt index 04775e29..5999d3e9 100644 --- a/src/vpncmd/CMakeLists.txt +++ b/src/vpncmd/CMakeLists.txt @@ -1,10 +1,43 @@ +set(COMPONENT_NAME "Command Line Management Utility") +set(COMPONENT_INTERNAL_NAME "vpncmd") + add_executable(vpncmd vpncmd.c) set_target_properties(vpncmd PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpncmd" - LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpncmd" - RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpncmd" + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" ) +if(WIN32) + set_target_properties(vpncmd + PROPERTIES + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) + + get_filename_component(COMPONENT_FILE_NAME vpncmd NAME) + set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + + configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpncmd.rc") + target_sources(vpncmd PRIVATE vpncmd.rc "${CMAKE_BINARY_DIR}/VerScript/vpncmd.rc") +endif() + target_link_libraries(vpncmd cedar mayaqua) + +if(UNIX) + # Copy binary and "hamcore.se2" to /usr/lib(exec)/softether/, install launch script + install(TARGETS vpncmd + COMPONENT "vpncmd" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpncmd" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + + install(FILES "${BUILD_DIRECTORY}/hamcore.se2" + COMPONENT "vpncmd" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpncmd" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + + install_wrapper_script("vpncmd" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpncmd/vpncmd") +endif() diff --git a/src/vpncmd/vpncmd.c b/src/vpncmd/vpncmd.c index 96d751d1..17fa3b1f 100644 --- a/src/vpncmd/vpncmd.c +++ b/src/vpncmd/vpncmd.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncmd.c @@ -141,10 +35,16 @@ int main(int argc, char *argv[]) #ifdef OS_WIN32 SetConsoleTitleA(CEDAR_PRODUCT_STR " VPN Command Line Utility"); +#else + // For *nix, disable output buffering to allow for interactive use + setbuf(stdout,NULL); #endif // OS_WIN32 -#ifdef DEBUG - InitMayaqua(true, true, argc, argv); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, argc, argv); #else InitMayaqua(false, false, argc, argv); #endif diff --git a/src/vpncmd/vpncmd.rc b/src/vpncmd/vpncmd.rc index a06de98d..0873228a 100644 --- a/src/vpncmd/vpncmd.rc +++ b/src/vpncmd/vpncmd.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpncmdsys/vpncmdsys.c b/src/vpncmdsys/vpncmdsys.c index 1ec2991c..59630c24 100644 --- a/src/vpncmdsys/vpncmdsys.c +++ b/src/vpncmdsys/vpncmdsys.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncmdsys.c diff --git a/src/vpncmdsys/vpncmdsys.h b/src/vpncmdsys/vpncmdsys.h index 07721b78..1e162322 100644 --- a/src/vpncmdsys/vpncmdsys.h +++ b/src/vpncmdsys/vpncmdsys.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncmdsys.h diff --git a/src/vpncmdsys/vpncmdsys.rc b/src/vpncmdsys/vpncmdsys.rc index c40298f7..d66ea179 100644 --- a/src/vpncmdsys/vpncmdsys.rc +++ b/src/vpncmdsys/vpncmdsys.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpncmgr/CMakeLists.txt b/src/vpncmgr/CMakeLists.txt new file mode 100644 index 00000000..9cfa73ae --- /dev/null +++ b/src/vpncmgr/CMakeLists.txt @@ -0,0 +1,30 @@ +if(NOT WIN32) + message(FATAL_ERROR "VPN Client Manager is available only for Windows.") +endif() + +set(COMPONENT_NAME "Client Manager") +set(COMPONENT_INTERNAL_NAME "vpncmgr") + +add_executable(vpncmgr WIN32 vpncmgr.c vpncmgr.rc) + +get_filename_component(COMPONENT_FILE_NAME vpncmgr NAME) +set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + +configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpncmgr.rc") +target_sources(vpncmgr PRIVATE "${CMAKE_BINARY_DIR}/VerScript/vpncmgr.rc") + +if(${COMPILER_ARCHITECTURE} STREQUAL "x64") + target_sources(vpncmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest") +else() + target_sources(vpncmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest") +endif() + +set_target_properties(vpncmgr + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" +) + +target_link_libraries(vpncmgr cedar mayaqua) diff --git a/src/vpncmgr/VPN.ico b/src/vpncmgr/VPN.ico index b366131e..cd155d63 100644 Binary files a/src/vpncmgr/VPN.ico and b/src/vpncmgr/VPN.ico differ diff --git a/src/vpncmgr/vpncmgr.c b/src/vpncmgr/vpncmgr.c index 584b191e..4f8b24f8 100644 --- a/src/vpncmgr/vpncmgr.c +++ b/src/vpncmgr/vpncmgr.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncmgr.c @@ -136,8 +30,11 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { InitProcessCallOnce(); -#ifdef DEBUG - InitMayaqua(true, true, 0, NULL); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, 0, NULL); #else InitMayaqua(false, false, 0, NULL); #endif diff --git a/src/vpncmgr/vpncmgr.rc b/src/vpncmgr/vpncmgr.rc index e7e8933f..e142d8d5 100644 --- a/src/vpncmgr/vpncmgr.rc +++ b/src/vpncmgr/vpncmgr.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpndrvinst/vpndrvinst.c b/src/vpndrvinst/vpndrvinst.c index 0411e8e7..b18421a5 100644 --- a/src/vpndrvinst/vpndrvinst.c +++ b/src/vpndrvinst/vpndrvinst.c @@ -1,116 +1,7 @@ // SoftEther VPN Source Code - Developer Edition Master Branch -// Hamster Test Code -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. +// VPN Driver Installer -// Ham.c -// Hamster Test Program - #include #define HAM_C @@ -355,8 +246,11 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { InitProcessCallOnce(); -#ifdef DEBUG - InitMayaqua(true, true, 0, NULL); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, 0, NULL); #else InitMayaqua(false, false, 0, NULL); #endif diff --git a/src/vpndrvinst/vpndrvinst.h b/src/vpndrvinst/vpndrvinst.h index a4775016..a0de9345 100644 --- a/src/vpndrvinst/vpndrvinst.h +++ b/src/vpndrvinst/vpndrvinst.h @@ -1,116 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch -// Hamster Test Code -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. - - -// Ham.h -// Header file of Ham.c - +// VPN Driver Installer // List of test functions typedef void (TEST_PROC)(UINT num, char **arg); diff --git a/src/vpndrvinst/vpndrvinst.rc b/src/vpndrvinst/vpndrvinst.rc index deedb19b..b9b417f9 100644 --- a/src/vpndrvinst/vpndrvinst.rc +++ b/src/vpndrvinst/vpndrvinst.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpninstall/vpninstall.c b/src/vpninstall/vpninstall.c index 0164a2b7..ac843ff2 100644 --- a/src/vpninstall/vpninstall.c +++ b/src/vpninstall/vpninstall.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpninstall.c @@ -1635,13 +1529,16 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { INSTANCE *instance; InitProcessCallOnce(); -#ifdef DEBUG +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". is_debug = true; #else is_debug = false; #endif MayaquaMinimalMode(); - InitMayaqua(is_debug, is_debug, 0, NULL); + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, is_debug, 0, NULL); InitCedar(); ViSetSkip(); ViLoadStringTables(); diff --git a/src/vpninstall/vpninstall.h b/src/vpninstall/vpninstall.h index 3099cc2a..b822b106 100644 --- a/src/vpninstall/vpninstall.h +++ b/src/vpninstall/vpninstall.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpninstall.h diff --git a/src/vpninstall/vpninstall.rc b/src/vpninstall/vpninstall.rc index b24478a0..0bb9ecf0 100644 --- a/src/vpninstall/vpninstall.rc +++ b/src/vpninstall/vpninstall.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpnserver/CMakeLists.txt b/src/vpnserver/CMakeLists.txt index 35b5532c..26142ee4 100644 --- a/src/vpnserver/CMakeLists.txt +++ b/src/vpnserver/CMakeLists.txt @@ -1,10 +1,51 @@ +set(COMPONENT_NAME "Server") +set(COMPONENT_INTERNAL_NAME "vpnserver") + add_executable(vpnserver vpnserver.c) set_target_properties(vpnserver PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnserver" - LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnserver" - RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}/vpnserver" + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" ) +if(WIN32) + set_target_properties(vpnserver + PROPERTIES + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) + + get_filename_component(COMPONENT_FILE_NAME vpnserver NAME) + set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + + configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnserver.rc") + target_sources(vpnserver PRIVATE vpnserver.rc "${CMAKE_BINARY_DIR}/VerScript/vpnserver.rc") +endif() + target_link_libraries(vpnserver cedar mayaqua) + +if(UNIX) + # Copy binary and "hamcore.se2" to /usr/lib(exec)/softether/, install launch script and systemd service + install(TARGETS vpnserver + COMPONENT "vpnserver" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnserver" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + + install(FILES "${BUILD_DIRECTORY}/hamcore.se2" + COMPONENT "vpnserver" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether/vpnserver" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + + install_wrapper_script("vpnserver" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver") + if(EXISTS "/lib/systemd/system") + configure_file(${TOP_DIRECTORY}/systemd/softether-vpnserver.service ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service) + install(FILES ${CMAKE_BINARY_DIR}/systemd/softether-vpnserver.service + COMPONENT "vpnserver" + DESTINATION "/lib/systemd/system" + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + endif() +endif() diff --git a/src/vpnserver/vpnserver.c b/src/vpnserver/vpnserver.c index 0cb4d5f9..6a39ab65 100644 --- a/src/vpnserver/vpnserver.c +++ b/src/vpnserver/vpnserver.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpnserver.c diff --git a/src/vpnserver/vpnserver.rc b/src/vpnserver/vpnserver.rc index 03b7af53..819753d9 100644 --- a/src/vpnserver/vpnserver.rc +++ b/src/vpnserver/vpnserver.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpnsetup/vpnsetup.c b/src/vpnsetup/vpnsetup.c index cccb2920..fc401cf9 100644 --- a/src/vpnsetup/vpnsetup.c +++ b/src/vpnsetup/vpnsetup.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. #include diff --git a/src/vpnsetup/vpnsetup.rc b/src/vpnsetup/vpnsetup.rc index be68c92f..363d597d 100644 --- a/src/vpnsetup/vpnsetup.rc +++ b/src/vpnsetup/vpnsetup.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpnsmgr/CMakeLists.txt b/src/vpnsmgr/CMakeLists.txt new file mode 100644 index 00000000..1b8df278 --- /dev/null +++ b/src/vpnsmgr/CMakeLists.txt @@ -0,0 +1,30 @@ +if(NOT WIN32) + message(FATAL_ERROR "VPN Server Manager is available only for Windows.") +endif() + +set(COMPONENT_NAME "Server Manager") +set(COMPONENT_INTERNAL_NAME "vpnsmgr") + +add_executable(vpnsmgr WIN32 vpnsmgr.c vpnsmgr.rc) + +get_filename_component(COMPONENT_FILE_NAME vpnsmgr NAME) +set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + +configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpnsmgr.rc") +target_sources(vpnsmgr PRIVATE "${CMAKE_BINARY_DIR}/VerScript/vpnsmgr.rc") + +if(${COMPILER_ARCHITECTURE} STREQUAL "x64") + target_sources(vpnsmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest") +else() + target_sources(vpnsmgr PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest") +endif() + +set_target_properties(vpnsmgr + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" +) + +target_link_libraries(vpnsmgr cedar mayaqua) diff --git a/src/vpnsmgr/VPNSvr.ico b/src/vpnsmgr/VPNSvr.ico index 9585574a..40a1bf9f 100644 Binary files a/src/vpnsmgr/VPNSvr.ico and b/src/vpnsmgr/VPNSvr.ico differ diff --git a/src/vpnsmgr/vpnsmgr.c b/src/vpnsmgr/vpnsmgr.c index e6406861..d341dc00 100644 --- a/src/vpnsmgr/vpnsmgr.c +++ b/src/vpnsmgr/vpnsmgr.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpncmgr.c @@ -134,8 +28,11 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { InitProcessCallOnce(); -#ifdef DEBUG - InitMayaqua(true, true, 0, NULL); +#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". + // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. + // For normal debug we set memcheck = false. + // Please set memcheck = true if you want to test the cause of memory leaks. + InitMayaqua(false, true, 0, NULL); #else InitMayaqua(false, false, 0, NULL); #endif diff --git a/src/vpnsmgr/vpnsmgr.rc b/src/vpnsmgr/vpnsmgr.rc index 5fd26d16..444131ab 100644 --- a/src/vpnsmgr/vpnsmgr.rc +++ b/src/vpnsmgr/vpnsmgr.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -34,7 +34,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/src/vpntest/CMakeLists.txt b/src/vpntest/CMakeLists.txt new file mode 100644 index 00000000..8aeaa97f --- /dev/null +++ b/src/vpntest/CMakeLists.txt @@ -0,0 +1,32 @@ +set(COMPONENT_NAME "Testing Utility") +set(COMPONENT_INTERNAL_NAME "vpntest") + +add_executable(vpntest vpntest.c vpntest.h) + +set_target_properties(vpntest + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" +) + +if(WIN32) + set_target_properties(vpntest + PROPERTIES + PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}" + ) + + get_filename_component(COMPONENT_FILE_NAME vpntest NAME) + set(COMPONENT_FILE_NAME "${COMPONENT_FILE_NAME}.exe") + + configure_file("${TOP_DIRECTORY}/src/BuildFiles/VerScript/ver.rc" "${CMAKE_BINARY_DIR}/VerScript/vpntest.rc") + target_sources(vpntest PRIVATE vpntest.rc "${CMAKE_BINARY_DIR}/VerScript/vpntest.rc") + + if(${COMPILER_ARCHITECTURE} STREQUAL "x64") + target_sources(vpntest PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x64_user.manifest") + else() + target_sources(vpntest PRIVATE "${TOP_DIRECTORY}/src/BuildFiles/Manifests/x86_user.manifest") + endif() +endif() + +target_link_libraries(vpntest cedar mayaqua) diff --git a/src/vpntest/resource.h b/src/vpntest/resource.h new file mode 100644 index 00000000..2f5bec73 --- /dev/null +++ b/src/vpntest/resource.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Ham.rc +// +#define IDR_TEST1 101 +#define IDI_ICON1 102 +#define IDI_CERT 102 +#define IDI_ICON2 103 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 104 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/src/vpntest/vpntest.c b/src/vpntest/vpntest.c new file mode 100644 index 00000000..bfc52350 --- /dev/null +++ b/src/vpntest/vpntest.c @@ -0,0 +1,265 @@ +// vpntest.c +// VPN Server / VPN Client / VPN Bridge test program + +#include +#define VPN_EXE + +#include +#include +#include +#include +#include +#include +#include +#include +#include "vpntest.h" + +void server_manager_test(UINT num, char **arg) +{ +#ifdef OS_WIN32 + SMExec(); +#else // OS_WIN32 + Print("This command is supported only on Win32."); +#endif // OS_WIN32 +} + +void client_manager_test(UINT num, char **arg) +{ +#ifdef OS_WIN32 + CMExec(); +#else // OS_WIN32 + Print("This command is supported only on Win32."); +#endif // OS_WIN32 +} + +void client_test(UINT num, char **arg) +{ + Print("VPN Client Test. Press Enter key to stop the VPN Client .\n"); + CtStartClient(); + GetLine(NULL, 0); + CtStopClient(); +} + +void server_test(UINT num, char **arg) +{ + Print("VPN Server Test. Press Enter key to stop the VPN Server .\n"); + + StInit(); + + StStartServer(false); + + GetLine(NULL, 0); + + StStopServer(); + + StFree(); +} + +void bridge_test(UINT num, char **arg) +{ + Print("VPN Bridge Test. Press Enter key to stop the VPN Bridge .\n"); + + StInit(); + + StStartServer(true); + + GetLine(NULL, 0); + + StStopServer(); + + StFree(); +} + +void memory_leak_test(UINT num, char **arg) +{ + char *a = Malloc(1); + + Print("Hello, I am the great dictator of this kingdom!\n"); + Print("Just now I called Malloc(1) and never free! Ha ha ha !!\n"); +} + + +// The list of test functions +// Test function definition list +typedef void (TEST_PROC)(UINT num, char **arg); + +typedef struct TEST_LIST +{ + char *command_str; + TEST_PROC *proc; + char *help; +} TEST_LIST; + +TEST_LIST test_list[] = +{ + {"c", client_test, "VPN Client in Test Mode, enter key to graceful stop."}, + {"s", server_test, "VPN Server in Test Mode, enter key to graceful stop."}, + {"b", bridge_test, "VPN Bridge in Test Mode, enter key to graceful stop."}, + {"sm", server_manager_test, "VPN Server Manager UI in Test Mode (Win32 only)"}, + {"cm", client_manager_test, "VPN Client Manager UI in Test Mode (Win32 only)"}, + {"memory_leak", memory_leak_test, "Memory leak test: Try to leak one byte by malloc()."}, +}; + +// Test function +int TestMain(char *cmd) +{ + char tmp[MAX_SIZE]; + bool first = true; + bool exit_now = false; + int status = 0; + + Print("SoftEther VPN Project\n"); + Print("vpntest: VPN Server / VPN Client / VPN Bridge test program\n"); + Print("Usage: vpntest [/memcheck] [command]\n\n"); + Print("Enter '?' or 'help' to show the command list.\n"); + Print("Enter 'q' or 'exit' to exit the process.\n\n"); + Print(" - In Jurassic Park: \"It's a UNIX system! I know this!\"\n\n"); + +#ifdef OS_WIN32 + MsSetEnableMinidump(true); +#endif // OS_WIN32 + + while (true) + { + Print("TEST>"); + if (first && StrLen(cmd) != 0 && g_memcheck == false) + { + first = false; + StrCpy(tmp, sizeof(tmp), cmd); + exit_now = true; + Print("%s\n", cmd); + } + else + { + GetLine(tmp, sizeof(tmp)); + } + Trim(tmp); + if (StrLen(tmp) != 0) + { + UINT i, num; + bool b = false; + TOKEN_LIST *token = ParseCmdLine(tmp); + char *cmd = token->Token[0]; + if (!StrCmpi(cmd, "exit") || !StrCmpi(cmd, "quit") || !StrCmpi(cmd, "q")) + { + FreeToken(token); + break; + } + else if (StrCmpi(cmd, "?") == 0 || StrCmpi(cmd, "help") == 0) + { + UINT max_len = 0; + Print("Available commands:\n\n"); + num = sizeof(test_list) / sizeof(TEST_LIST); + for (i = 0;i < num;i++) + { + TEST_LIST *t = &test_list[i]; + max_len = MAX(max_len, StrLen(t->command_str)); + } + for (i = 0;i < num;i++) + { + TEST_LIST *t = &test_list[i]; + UINT len = StrLen(t->command_str); + char *pad = NULL; + if (len < max_len) + { + UINT padlen = max_len - len; + pad = MakeCharArray(' ', padlen); + } + Print(" '%s'%s : %s\n", t->command_str, pad == NULL ? "" : pad, t->help); + if (pad != NULL) + { + Free(pad); + } + } + Print("\n"); + } + else if (StartWith(tmp, "vpncmd")) + { + wchar_t *s = CopyStrToUni(tmp); + CommandMain(s); + Free(s); + } + else + { + num = sizeof(test_list) / sizeof(TEST_LIST); + for (i = 0;i < num;i++) + { + if (!StrCmpi(test_list[i].command_str, cmd)) + { + char **arg = Malloc(sizeof(char *) * (token->NumTokens - 1)); + UINT j; + for (j = 0;j < token->NumTokens - 1;j++) + { + arg[j] = CopyStr(token->Token[j + 1]); + } + test_list[i].proc(token->NumTokens - 1, arg); + for (j = 0;j < token->NumTokens - 1;j++) + { + Free(arg[j]); + } + Free(arg); + b = true; + Print("\n"); + break; + } + } + if (b == false) + { + status = 2; + Print("Invalid Command: %s\n\n", cmd); + } + } + FreeToken(token); + + if (exit_now) + { + break; + } + } + } + Print("Exiting...\n\n"); + return status; +} + +// Main function +int main(int argc, char *argv[]) +{ + bool memchk = false; + UINT i; + char cmd[MAX_SIZE]; + char *s; + int status = 0; + + InitProcessCallOnce(); + + cmd[0] = 0; + if (argc >= 2) + { + for (i = 1;i < (UINT)argc;i++) + { + s = argv[i]; + if (s[0] == '/') + { + if (!StrCmpi(s, "/memcheck")) + { + memchk = true; + } + } + else + { + StrCpy(cmd, sizeof(cmd), &s[0]); + } + } + } + + InitMayaqua(memchk, true, argc, argv); + EnableProbe(true); + InitCedar(); + SetHamMode(); + status = TestMain(cmdline); + FreeCedar(); + FreeMayaqua(); + + return status; +} + diff --git a/src/vpntest/vpntest.h b/src/vpntest/vpntest.h new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/src/vpntest/vpntest.h @@ -0,0 +1 @@ + diff --git a/src/vpntest/vpntest.ico b/src/vpntest/vpntest.ico new file mode 100644 index 00000000..0310b265 Binary files /dev/null and b/src/vpntest/vpntest.ico differ diff --git a/src/vpntest/vpntest.rc b/src/vpntest/vpntest.rc new file mode 100644 index 00000000..86a3b0d6 --- /dev/null +++ b/src/vpntest/vpntest.rc @@ -0,0 +1,72 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Japanese resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) +#ifdef _WIN32 +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT +#pragma code_page(932) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON2 ICON "vpntest.ico" +#endif // Japanese resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/vpntest/vpntest.vcproj b/src/vpntest/vpntest.vcproj new file mode 100644 index 00000000..e8533dc5 --- /dev/null +++ b/src/vpntest/vpntest.vcproj @@ -0,0 +1,451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/vpnweb/vpnweb.h b/src/vpnweb/vpnweb.h deleted file mode 100644 index e23a4a1a..00000000 --- a/src/vpnweb/vpnweb.h +++ /dev/null @@ -1,380 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 7.00.0500 */ -/* at Wed Oct 18 16:31:00 2017 - */ -/* Compiler settings for .\vpnweb.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 440 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCNDR_H_VERSION__ - -#ifndef COM_NO_WINDOWS_H -#include "windows.h" -#include "ole2.h" -#endif /*COM_NO_WINDOWS_H*/ - -#ifndef __vpnweb_h__ -#define __vpnweb_h__ - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -#pragma once -#endif - -/* Forward Declarations */ - -#ifndef __IVpnWebControl_FWD_DEFINED__ -#define __IVpnWebControl_FWD_DEFINED__ -typedef interface IVpnWebControl IVpnWebControl; -#endif /* __IVpnWebControl_FWD_DEFINED__ */ - - -#ifndef __VpnWebControl_FWD_DEFINED__ -#define __VpnWebControl_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class VpnWebControl VpnWebControl; -#else -typedef struct VpnWebControl VpnWebControl; -#endif /* __cplusplus */ - -#endif /* __VpnWebControl_FWD_DEFINED__ */ - - -/* header files for imported files */ -#include "oaidl.h" -#include "ocidl.h" - -#ifdef __cplusplus -extern "C"{ -#endif - - -#ifndef __IVpnWebControl_INTERFACE_DEFINED__ -#define __IVpnWebControl_INTERFACE_DEFINED__ - -/* interface IVpnWebControl */ -/* [unique][helpstring][nonextensible][dual][uuid][object] */ - - -EXTERN_C const IID IID_IVpnWebControl; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("BEAC96A9-05ED-46B3-975C-4462E83878F5") - IVpnWebControl : public IDispatch - { - public: - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InstallerExeUrl( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InstallerExeUrl( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InstallerInfUrl( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InstallerInfUrl( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SettingUrl( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SettingUrl( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VpnServerManagerMode( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VpnServerManagerMode( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VpnServerHostname( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VpnServerHostname( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VpnServerHubName( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VpnServerHubName( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_VpnServerPassword( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_VpnServerPassword( - /* [in] */ BSTR newVal) = 0; - - virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_LanguageID( - /* [retval][out] */ BSTR *pVal) = 0; - - virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_LanguageID( - /* [in] */ BSTR newVal) = 0; - - }; - -#else /* C style interface */ - - typedef struct IVpnWebControlVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IVpnWebControl * This, - /* [in] */ REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IVpnWebControl * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IVpnWebControl * This); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( - IVpnWebControl * This, - /* [out] */ UINT *pctinfo); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( - IVpnWebControl * This, - /* [in] */ UINT iTInfo, - /* [in] */ LCID lcid, - /* [out] */ ITypeInfo **ppTInfo); - - HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( - IVpnWebControl * This, - /* [in] */ REFIID riid, - /* [size_is][in] */ LPOLESTR *rgszNames, - /* [range][in] */ UINT cNames, - /* [in] */ LCID lcid, - /* [size_is][out] */ DISPID *rgDispId); - - /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( - IVpnWebControl * This, - /* [in] */ DISPID dispIdMember, - /* [in] */ REFIID riid, - /* [in] */ LCID lcid, - /* [in] */ WORD wFlags, - /* [out][in] */ DISPPARAMS *pDispParams, - /* [out] */ VARIANT *pVarResult, - /* [out] */ EXCEPINFO *pExcepInfo, - /* [out] */ UINT *puArgErr); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InstallerExeUrl )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InstallerExeUrl )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InstallerInfUrl )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InstallerInfUrl )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SettingUrl )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SettingUrl )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VpnServerManagerMode )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_VpnServerManagerMode )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VpnServerHostname )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_VpnServerHostname )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VpnServerHubName )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_VpnServerHubName )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VpnServerPassword )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_VpnServerPassword )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LanguageID )( - IVpnWebControl * This, - /* [retval][out] */ BSTR *pVal); - - /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LanguageID )( - IVpnWebControl * This, - /* [in] */ BSTR newVal); - - END_INTERFACE - } IVpnWebControlVtbl; - - interface IVpnWebControl - { - CONST_VTBL struct IVpnWebControlVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IVpnWebControl_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IVpnWebControl_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IVpnWebControl_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IVpnWebControl_GetTypeInfoCount(This,pctinfo) \ - ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) - -#define IVpnWebControl_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ - ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) - -#define IVpnWebControl_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ - ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) - -#define IVpnWebControl_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ - ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) - - -#define IVpnWebControl_get_InstallerExeUrl(This,pVal) \ - ( (This)->lpVtbl -> get_InstallerExeUrl(This,pVal) ) - -#define IVpnWebControl_put_InstallerExeUrl(This,newVal) \ - ( (This)->lpVtbl -> put_InstallerExeUrl(This,newVal) ) - -#define IVpnWebControl_get_InstallerInfUrl(This,pVal) \ - ( (This)->lpVtbl -> get_InstallerInfUrl(This,pVal) ) - -#define IVpnWebControl_put_InstallerInfUrl(This,newVal) \ - ( (This)->lpVtbl -> put_InstallerInfUrl(This,newVal) ) - -#define IVpnWebControl_get_SettingUrl(This,pVal) \ - ( (This)->lpVtbl -> get_SettingUrl(This,pVal) ) - -#define IVpnWebControl_put_SettingUrl(This,newVal) \ - ( (This)->lpVtbl -> put_SettingUrl(This,newVal) ) - -#define IVpnWebControl_get_VpnServerManagerMode(This,pVal) \ - ( (This)->lpVtbl -> get_VpnServerManagerMode(This,pVal) ) - -#define IVpnWebControl_put_VpnServerManagerMode(This,newVal) \ - ( (This)->lpVtbl -> put_VpnServerManagerMode(This,newVal) ) - -#define IVpnWebControl_get_VpnServerHostname(This,pVal) \ - ( (This)->lpVtbl -> get_VpnServerHostname(This,pVal) ) - -#define IVpnWebControl_put_VpnServerHostname(This,newVal) \ - ( (This)->lpVtbl -> put_VpnServerHostname(This,newVal) ) - -#define IVpnWebControl_get_VpnServerHubName(This,pVal) \ - ( (This)->lpVtbl -> get_VpnServerHubName(This,pVal) ) - -#define IVpnWebControl_put_VpnServerHubName(This,newVal) \ - ( (This)->lpVtbl -> put_VpnServerHubName(This,newVal) ) - -#define IVpnWebControl_get_VpnServerPassword(This,pVal) \ - ( (This)->lpVtbl -> get_VpnServerPassword(This,pVal) ) - -#define IVpnWebControl_put_VpnServerPassword(This,newVal) \ - ( (This)->lpVtbl -> put_VpnServerPassword(This,newVal) ) - -#define IVpnWebControl_get_LanguageID(This,pVal) \ - ( (This)->lpVtbl -> get_LanguageID(This,pVal) ) - -#define IVpnWebControl_put_LanguageID(This,newVal) \ - ( (This)->lpVtbl -> put_LanguageID(This,newVal) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IVpnWebControl_INTERFACE_DEFINED__ */ - - - -#ifndef __vpnwebLib_LIBRARY_DEFINED__ -#define __vpnwebLib_LIBRARY_DEFINED__ - -/* library vpnwebLib */ -/* [helpstring][version][uuid] */ - - -EXTERN_C const IID LIBID_vpnwebLib; - -EXTERN_C const CLSID CLSID_VpnWebControl; - -#ifdef __cplusplus - -class DECLSPEC_UUID("64F1A16B-C3EE-484C-B551-35338A9BB6D2") -VpnWebControl; -#endif -#endif /* __vpnwebLib_LIBRARY_DEFINED__ */ - -/* Additional Prototypes for ALL interfaces */ - -unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); -unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); -unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); -void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/src/vpnweb/vpnweb_i.c b/src/vpnweb/vpnweb_i.c deleted file mode 100644 index 84df263d..00000000 --- a/src/vpnweb/vpnweb_i.c +++ /dev/null @@ -1,85 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ - -/* link this file in with the server and any clients */ - - - /* File created by MIDL compiler version 7.00.0500 */ -/* at Wed Oct 18 16:31:00 2017 - */ -/* Compiler settings for .\vpnweb.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -#ifdef __cplusplus -extern "C"{ -#endif - - -#include -#include - -#ifdef _MIDL_USE_GUIDDEF_ - -#ifndef INITGUID -#define INITGUID -#include -#undef INITGUID -#else -#include -#endif - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) - -#else // !_MIDL_USE_GUIDDEF_ - -#ifndef __IID_DEFINED__ -#define __IID_DEFINED__ - -typedef struct _IID -{ - unsigned long x; - unsigned short s1; - unsigned short s2; - unsigned char c[8]; -} IID; - -#endif // __IID_DEFINED__ - -#ifndef CLSID_DEFINED -#define CLSID_DEFINED -typedef IID CLSID; -#endif // CLSID_DEFINED - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} - -#endif !_MIDL_USE_GUIDDEF_ - -MIDL_DEFINE_GUID(IID, IID_IVpnWebControl,0x2C954023,0x34FF,0x490B,0x86,0x1F,0x71,0xB0,0xCE,0xBC,0x03,0xB7); - - -MIDL_DEFINE_GUID(IID, LIBID_vpnwebLib,0x17F2E666,0x4CC2,0x49AC,0x81,0x08,0xFA,0x82,0x9F,0x3C,0xAC,0xFD); - - -MIDL_DEFINE_GUID(CLSID, CLSID_VpnWebControl,0x7CF3E7C4,0x6112,0x4D72,0xA0,0xCD,0xD0,0xAD,0x7E,0xEB,0x54,0x67); - -#undef MIDL_DEFINE_GUID - -#ifdef __cplusplus -} -#endif - - - diff --git a/src/vpnweb/vpnweb_p.c b/src/vpnweb/vpnweb_p.c deleted file mode 100644 index 9376da04..00000000 --- a/src/vpnweb/vpnweb_p.c +++ /dev/null @@ -1,783 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the proxy stub code */ - - - /* File created by MIDL compiler version 7.00.0500 */ -/* at Wed Oct 18 16:31:00 2017 - */ -/* Compiler settings for .\vpnweb.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#if !defined(_M_IA64) && !defined(_M_AMD64) - - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ -#if _MSC_VER >= 1200 -#pragma warning(push) -#endif - -#pragma warning( disable: 4211 ) /* redefine extern to static */ -#pragma warning( disable: 4232 ) /* dllimport identity*/ -#pragma warning( disable: 4024 ) /* array to pointer mapping*/ -#pragma warning( disable: 4152 ) /* function/data pointer conversion in expression */ -#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ - -#pragma optimize("", off ) - -#define USE_STUBLESS_PROXY - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REDQ_RPCPROXY_H_VERSION__ -#define __REQUIRED_RPCPROXY_H_VERSION__ 440 -#endif - - -#include "rpcproxy.h" -#ifndef __RPCPROXY_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCPROXY_H_VERSION__ - - -#include "vpnweb.h" - -#define TYPE_FORMAT_STRING_SIZE 55 -#define PROC_FORMAT_STRING_SIZE 449 -#define EXPR_FORMAT_STRING_SIZE 1 -#define TRANSMIT_AS_TABLE_SIZE 0 -#define WIRE_MARSHAL_TABLE_SIZE 1 - -typedef struct _vpnweb_MIDL_TYPE_FORMAT_STRING - { - short Pad; - unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; - } vpnweb_MIDL_TYPE_FORMAT_STRING; - -typedef struct _vpnweb_MIDL_PROC_FORMAT_STRING - { - short Pad; - unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; - } vpnweb_MIDL_PROC_FORMAT_STRING; - -typedef struct _vpnweb_MIDL_EXPR_FORMAT_STRING - { - long Pad; - unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; - } vpnweb_MIDL_EXPR_FORMAT_STRING; - - -static RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = -{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; - - -extern const vpnweb_MIDL_TYPE_FORMAT_STRING vpnweb__MIDL_TypeFormatString; -extern const vpnweb_MIDL_PROC_FORMAT_STRING vpnweb__MIDL_ProcFormatString; -extern const vpnweb_MIDL_EXPR_FORMAT_STRING vpnweb__MIDL_ExprFormatString; - - -extern const MIDL_STUB_DESC Object_StubDesc; - - -extern const MIDL_SERVER_INFO IVpnWebControl_ServerInfo; -extern const MIDL_STUBLESS_PROXY_INFO IVpnWebControl_ProxyInfo; - - -extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ]; - -#if !defined(__RPC_WIN32__) -#error Invalid build platform for this stub. -#endif - -#if !(TARGET_IS_NT40_OR_LATER) -#error You need a Windows NT 4.0 or later to run this stub because it uses these features: -#error -Oif or -Oicf, [wire_marshal] or [user_marshal] attribute. -#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. -#error This app will fail with the RPC_X_WRONG_STUB_VERSION error. -#endif - - -static const vpnweb_MIDL_PROC_FORMAT_STRING vpnweb__MIDL_ProcFormatString = - { - 0, - { - - /* Procedure get_InstallerExeUrl */ - - 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 2 */ NdrFcLong( 0x0 ), /* 0 */ -/* 6 */ NdrFcShort( 0x7 ), /* 7 */ -/* 8 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 10 */ NdrFcShort( 0x0 ), /* 0 */ -/* 12 */ NdrFcShort( 0x8 ), /* 8 */ -/* 14 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 16 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 18 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 20 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 22 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 24 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 26 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_InstallerExeUrl */ - -/* 28 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 30 */ NdrFcLong( 0x0 ), /* 0 */ -/* 34 */ NdrFcShort( 0x8 ), /* 8 */ -/* 36 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 38 */ NdrFcShort( 0x0 ), /* 0 */ -/* 40 */ NdrFcShort( 0x8 ), /* 8 */ -/* 42 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 44 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 46 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 48 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 50 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 52 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 54 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_InstallerInfUrl */ - -/* 56 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 58 */ NdrFcLong( 0x0 ), /* 0 */ -/* 62 */ NdrFcShort( 0x9 ), /* 9 */ -/* 64 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 66 */ NdrFcShort( 0x0 ), /* 0 */ -/* 68 */ NdrFcShort( 0x8 ), /* 8 */ -/* 70 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 72 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 74 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 76 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 78 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 80 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 82 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_InstallerInfUrl */ - -/* 84 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 86 */ NdrFcLong( 0x0 ), /* 0 */ -/* 90 */ NdrFcShort( 0xa ), /* 10 */ -/* 92 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 94 */ NdrFcShort( 0x0 ), /* 0 */ -/* 96 */ NdrFcShort( 0x8 ), /* 8 */ -/* 98 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 100 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 102 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 104 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 106 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 108 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 110 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_SettingUrl */ - -/* 112 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 114 */ NdrFcLong( 0x0 ), /* 0 */ -/* 118 */ NdrFcShort( 0xb ), /* 11 */ -/* 120 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 122 */ NdrFcShort( 0x0 ), /* 0 */ -/* 124 */ NdrFcShort( 0x8 ), /* 8 */ -/* 126 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 128 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 130 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 132 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 134 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 136 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 138 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_SettingUrl */ - -/* 140 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 142 */ NdrFcLong( 0x0 ), /* 0 */ -/* 146 */ NdrFcShort( 0xc ), /* 12 */ -/* 148 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 150 */ NdrFcShort( 0x0 ), /* 0 */ -/* 152 */ NdrFcShort( 0x8 ), /* 8 */ -/* 154 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 156 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 158 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 160 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 162 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 164 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 166 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_VpnServerManagerMode */ - -/* 168 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 170 */ NdrFcLong( 0x0 ), /* 0 */ -/* 174 */ NdrFcShort( 0xd ), /* 13 */ -/* 176 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 178 */ NdrFcShort( 0x0 ), /* 0 */ -/* 180 */ NdrFcShort( 0x8 ), /* 8 */ -/* 182 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 184 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 186 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 188 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 190 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 192 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 194 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_VpnServerManagerMode */ - -/* 196 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 198 */ NdrFcLong( 0x0 ), /* 0 */ -/* 202 */ NdrFcShort( 0xe ), /* 14 */ -/* 204 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 206 */ NdrFcShort( 0x0 ), /* 0 */ -/* 208 */ NdrFcShort( 0x8 ), /* 8 */ -/* 210 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 212 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 214 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 216 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 218 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 220 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 222 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_VpnServerHostname */ - -/* 224 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 226 */ NdrFcLong( 0x0 ), /* 0 */ -/* 230 */ NdrFcShort( 0xf ), /* 15 */ -/* 232 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 234 */ NdrFcShort( 0x0 ), /* 0 */ -/* 236 */ NdrFcShort( 0x8 ), /* 8 */ -/* 238 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 240 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 242 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 244 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 246 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 248 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 250 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_VpnServerHostname */ - -/* 252 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 254 */ NdrFcLong( 0x0 ), /* 0 */ -/* 258 */ NdrFcShort( 0x10 ), /* 16 */ -/* 260 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 262 */ NdrFcShort( 0x0 ), /* 0 */ -/* 264 */ NdrFcShort( 0x8 ), /* 8 */ -/* 266 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 268 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 270 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 272 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 274 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 276 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 278 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_VpnServerHubName */ - -/* 280 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 282 */ NdrFcLong( 0x0 ), /* 0 */ -/* 286 */ NdrFcShort( 0x11 ), /* 17 */ -/* 288 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 290 */ NdrFcShort( 0x0 ), /* 0 */ -/* 292 */ NdrFcShort( 0x8 ), /* 8 */ -/* 294 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 296 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 298 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 300 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 302 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 304 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 306 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_VpnServerHubName */ - -/* 308 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 310 */ NdrFcLong( 0x0 ), /* 0 */ -/* 314 */ NdrFcShort( 0x12 ), /* 18 */ -/* 316 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 318 */ NdrFcShort( 0x0 ), /* 0 */ -/* 320 */ NdrFcShort( 0x8 ), /* 8 */ -/* 322 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 324 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 326 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 328 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 330 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 332 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 334 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_VpnServerPassword */ - -/* 336 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 338 */ NdrFcLong( 0x0 ), /* 0 */ -/* 342 */ NdrFcShort( 0x13 ), /* 19 */ -/* 344 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 346 */ NdrFcShort( 0x0 ), /* 0 */ -/* 348 */ NdrFcShort( 0x8 ), /* 8 */ -/* 350 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 352 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 354 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 356 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 358 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 360 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 362 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_VpnServerPassword */ - -/* 364 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 366 */ NdrFcLong( 0x0 ), /* 0 */ -/* 370 */ NdrFcShort( 0x14 ), /* 20 */ -/* 372 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 374 */ NdrFcShort( 0x0 ), /* 0 */ -/* 376 */ NdrFcShort( 0x8 ), /* 8 */ -/* 378 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 380 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 382 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 384 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 386 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 388 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 390 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_LanguageID */ - -/* 392 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 394 */ NdrFcLong( 0x0 ), /* 0 */ -/* 398 */ NdrFcShort( 0x15 ), /* 21 */ -/* 400 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 402 */ NdrFcShort( 0x0 ), /* 0 */ -/* 404 */ NdrFcShort( 0x8 ), /* 8 */ -/* 406 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter pVal */ - -/* 408 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 410 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 412 */ NdrFcShort( 0x1e ), /* Type Offset=30 */ - - /* Return value */ - -/* 414 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 416 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 418 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_LanguageID */ - -/* 420 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 422 */ NdrFcLong( 0x0 ), /* 0 */ -/* 426 */ NdrFcShort( 0x16 ), /* 22 */ -/* 428 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 430 */ NdrFcShort( 0x0 ), /* 0 */ -/* 432 */ NdrFcShort( 0x8 ), /* 8 */ -/* 434 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x2, /* 2 */ - - /* Parameter newVal */ - -/* 436 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 438 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 440 */ NdrFcShort( 0x2c ), /* Type Offset=44 */ - - /* Return value */ - -/* 442 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 444 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 446 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - 0x0 - } - }; - -static const vpnweb_MIDL_TYPE_FORMAT_STRING vpnweb__MIDL_TypeFormatString = - { - 0, - { - NdrFcShort( 0x0 ), /* 0 */ -/* 2 */ - 0x11, 0x4, /* FC_RP [alloced_on_stack] */ -/* 4 */ NdrFcShort( 0x1a ), /* Offset= 26 (30) */ -/* 6 */ - 0x13, 0x0, /* FC_OP */ -/* 8 */ NdrFcShort( 0xc ), /* Offset= 12 (20) */ -/* 10 */ - 0x1b, /* FC_CARRAY */ - 0x1, /* 1 */ -/* 12 */ NdrFcShort( 0x2 ), /* 2 */ -/* 14 */ 0x9, /* Corr desc: FC_ULONG */ - 0x0, /* */ -/* 16 */ NdrFcShort( 0xfffc ), /* -4 */ -/* 18 */ 0x6, /* FC_SHORT */ - 0x5b, /* FC_END */ -/* 20 */ - 0x17, /* FC_CSTRUCT */ - 0x3, /* 3 */ -/* 22 */ NdrFcShort( 0x8 ), /* 8 */ -/* 24 */ NdrFcShort( 0xfff2 ), /* Offset= -14 (10) */ -/* 26 */ 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ -/* 28 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -/* 30 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 32 */ NdrFcShort( 0x0 ), /* 0 */ -/* 34 */ NdrFcShort( 0x4 ), /* 4 */ -/* 36 */ NdrFcShort( 0x0 ), /* 0 */ -/* 38 */ NdrFcShort( 0xffe0 ), /* Offset= -32 (6) */ -/* 40 */ - 0x12, 0x0, /* FC_UP */ -/* 42 */ NdrFcShort( 0xffea ), /* Offset= -22 (20) */ -/* 44 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 46 */ NdrFcShort( 0x0 ), /* 0 */ -/* 48 */ NdrFcShort( 0x4 ), /* 4 */ -/* 50 */ NdrFcShort( 0x0 ), /* 0 */ -/* 52 */ NdrFcShort( 0xfff4 ), /* Offset= -12 (40) */ - - 0x0 - } - }; - -static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ] = - { - - { - BSTR_UserSize - ,BSTR_UserMarshal - ,BSTR_UserUnmarshal - ,BSTR_UserFree - } - - }; - - - -/* Object interface: IUnknown, ver. 0.0, - GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: IDispatch, ver. 0.0, - GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: IVpnWebControl, ver. 0.0, - GUID={0x2C954023,0x34FF,0x490B,{0x86,0x1F,0x71,0xB0,0xCE,0xBC,0x03,0xB7}} */ - -#pragma code_seg(".orpc") -static const unsigned short IVpnWebControl_FormatStringOffsetTable[] = - { - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - 0, - 28, - 56, - 84, - 112, - 140, - 168, - 196, - 224, - 252, - 280, - 308, - 336, - 364, - 392, - 420 - }; - -static const MIDL_STUBLESS_PROXY_INFO IVpnWebControl_ProxyInfo = - { - &Object_StubDesc, - vpnweb__MIDL_ProcFormatString.Format, - &IVpnWebControl_FormatStringOffsetTable[-3], - 0, - 0, - 0 - }; - - -static const MIDL_SERVER_INFO IVpnWebControl_ServerInfo = - { - &Object_StubDesc, - 0, - vpnweb__MIDL_ProcFormatString.Format, - &IVpnWebControl_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; -CINTERFACE_PROXY_VTABLE(23) _IVpnWebControlProxyVtbl = -{ - &IVpnWebControl_ProxyInfo, - &IID_IVpnWebControl, - IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfoCount */ , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfo */ , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetIDsOfNames */ , - 0 /* IDispatch_Invoke_Proxy */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_InstallerExeUrl */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_InstallerExeUrl */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_InstallerInfUrl */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_InstallerInfUrl */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_SettingUrl */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_SettingUrl */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_VpnServerManagerMode */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_VpnServerManagerMode */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_VpnServerHostname */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_VpnServerHostname */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_VpnServerHubName */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_VpnServerHubName */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_VpnServerPassword */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_VpnServerPassword */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::get_LanguageID */ , - (void *) (INT_PTR) -1 /* IVpnWebControl::put_LanguageID */ -}; - - -static const PRPC_STUB_FUNCTION IVpnWebControl_table[] = -{ - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2 -}; - -CInterfaceStubVtbl _IVpnWebControlStubVtbl = -{ - &IID_IVpnWebControl, - &IVpnWebControl_ServerInfo, - 23, - &IVpnWebControl_table[-3], - CStdStubBuffer_DELEGATING_METHODS -}; - -static const MIDL_STUB_DESC Object_StubDesc = - { - 0, - NdrOleAllocate, - NdrOleFree, - 0, - 0, - 0, - 0, - 0, - vpnweb__MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x20000, /* Ndr library version */ - 0, - 0x70001f4, /* MIDL Version 7.0.500 */ - 0, - UserMarshalRoutines, - 0, /* notify & notify_flag routine table */ - 0x1, /* MIDL flag */ - 0, /* cs routines */ - 0, /* proxy/server info */ - 0 - }; - -const CInterfaceProxyVtbl * _vpnweb_ProxyVtblList[] = -{ - ( CInterfaceProxyVtbl *) &_IVpnWebControlProxyVtbl, - 0 -}; - -const CInterfaceStubVtbl * _vpnweb_StubVtblList[] = -{ - ( CInterfaceStubVtbl *) &_IVpnWebControlStubVtbl, - 0 -}; - -PCInterfaceName const _vpnweb_InterfaceNamesList[] = -{ - "IVpnWebControl", - 0 -}; - -const IID * _vpnweb_BaseIIDList[] = -{ - &IID_IDispatch, - 0 -}; - - -#define _vpnweb_CHECK_IID(n) IID_GENERIC_CHECK_IID( _vpnweb, pIID, n) - -int __stdcall _vpnweb_IID_Lookup( const IID * pIID, int * pIndex ) -{ - - if(!_vpnweb_CHECK_IID(0)) - { - *pIndex = 0; - return 1; - } - - return 0; -} - -const ExtendedProxyFileInfo vpnweb_ProxyFileInfo = -{ - (PCInterfaceProxyVtblList *) & _vpnweb_ProxyVtblList, - (PCInterfaceStubVtblList *) & _vpnweb_StubVtblList, - (const PCInterfaceName * ) & _vpnweb_InterfaceNamesList, - (const IID ** ) & _vpnweb_BaseIIDList, - & _vpnweb_IID_Lookup, - 1, - 2, - 0, /* table of [async_uuid] interfaces */ - 0, /* Filler1 */ - 0, /* Filler2 */ - 0 /* Filler3 */ -}; -#pragma optimize("", on ) -#if _MSC_VER >= 1200 -#pragma warning(pop) -#endif - - -#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/ - diff --git a/src/vpnweb/vpnwebdlg.c b/src/vpnweb/vpnwebdlg.c index 62477c19..0f2bcc9a 100644 --- a/src/vpnweb/vpnwebdlg.c +++ b/src/vpnweb/vpnwebdlg.c @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpnwebdlg.c diff --git a/src/vpnweb/vpnwebdlg.h b/src/vpnweb/vpnwebdlg.h index f68af3a2..a6e7d9fb 100644 --- a/src/vpnweb/vpnwebdlg.h +++ b/src/vpnweb/vpnwebdlg.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpnwebdlg.h diff --git a/src/vpnweb/vpnwebdlg_inner.h b/src/vpnweb/vpnwebdlg_inner.h index 5bc0c5c4..8f46aae4 100644 --- a/src/vpnweb/vpnwebdlg_inner.h +++ b/src/vpnweb/vpnwebdlg_inner.h @@ -1,111 +1,5 @@ // SoftEther VPN Source Code - Developer Edition Master Branch // Cedar Communication Module -// -// SoftEther VPN Server, Client and Bridge are free software under GPLv2. -// -// Copyright (c) Daiyuu Nobori. -// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan. -// Copyright (c) SoftEther Corporation. -// -// All Rights Reserved. -// -// http://www.softether.org/ -// -// Author: Daiyuu Nobori, Ph.D. -// Comments: Tetsuo Sugiyama, Ph.D. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License version 2 -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE -// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE. -// -// -// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, -// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, -// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS -// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS -// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER -// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL -// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, -// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR -// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND -// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO -// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, -// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION -// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN -// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE. -// -// USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS -// YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY -// CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS -// SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE -// SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO -// COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING -// PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR -// CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE -// NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR -// INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ -// COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE -// WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY -// COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE -// COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE -// SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR -// COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO -// RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL -// RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT -// JUST A STATEMENT FOR WARNING AND DISCLAIMER. -// -// -// SOURCE CODE CONTRIBUTION -// ------------------------ -// -// Your contribution to SoftEther VPN Project is much appreciated. -// Please send patches to us through GitHub. -// Read the SoftEther VPN Patch Acceptance Policy in advance: -// http://www.softether.org/5-download/src/9.patch -// -// -// DEAR SECURITY EXPERTS -// --------------------- -// -// If you find a bug or a security vulnerability please kindly inform us -// about the problem immediately so that we can fix the security problem -// to protect a lot of users around the world as soon as possible. -// -// Our e-mail address for security reports is: -// softether-vpn-security [at] softether.org -// -// Please note that the above e-mail address is not a technical support -// inquiry address. If you need technical assistance, please visit -// http://www.softether.org/ and ask your question on the users forum. -// -// Thank you for your cooperation. -// -// -// NO MEMORY OR RESOURCE LEAKS -// --------------------------- -// -// The memory-leaks and resource-leaks verification under the stress -// test has been passed before release this source code. // vpnwebdlg.h diff --git a/systemd/softether-vpnbridge.service b/systemd/softether-vpnbridge.service index 8797d8cb..c9fa2b73 100644 --- a/systemd/softether-vpnbridge.service +++ b/systemd/softether-vpnbridge.service @@ -1,13 +1,13 @@ [Unit] Description=SoftEther VPN Bridge After=network.target auditd.service -ConditionPathExists=![DIRECTORY]/do_not_run +ConditionPathExists=!${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnbridge/do_not_run [Service] Type=forking -EnvironmentFile=-[DIRECTORY] -ExecStart=[BINARY] start -ExecStop=[BINARY] stop +EnvironmentFile=-${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnbridge +ExecStart=${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnbridge/vpnbridge start +ExecStop=${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnbridge/vpnbridge stop KillMode=process Restart=on-failure @@ -16,8 +16,8 @@ PrivateTmp=yes ProtectHome=yes ProtectSystem=full ReadOnlyDirectories=/ -ReadWriteDirectories=-[DIRECTORY] -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID +ReadWriteDirectories=-${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnbridge +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYSLOG CAP_SETUID [Install] WantedBy=multi-user.target diff --git a/systemd/softether-vpnclient.service b/systemd/softether-vpnclient.service index 780475d1..ff47b2a4 100644 --- a/systemd/softether-vpnclient.service +++ b/systemd/softether-vpnclient.service @@ -1,13 +1,13 @@ [Unit] Description=SoftEther VPN Client After=network.target auditd.service -ConditionPathExists=![DIRECTORY]/do_not_run +ConditionPathExists=!${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnclient/do_not_run [Service] Type=forking -EnvironmentFile=-[DIRECTORY] -ExecStart=[BINARY] start -ExecStop=[BINARY] stop +EnvironmentFile=-${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnclient +ExecStart=${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnclient/vpnclient start +ExecStop=${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnclient/vpnclient stop KillMode=process Restart=on-failure @@ -16,8 +16,8 @@ PrivateTmp=yes ProtectHome=yes ProtectSystem=full ReadOnlyDirectories=/ -ReadWriteDirectories=-[DIRECTORY] -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID +ReadWriteDirectories=-${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnclient +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYSLOG CAP_SETUID [Install] WantedBy=multi-user.target diff --git a/systemd/softether-vpnserver.service b/systemd/softether-vpnserver.service index c35e02bd..c22ca58e 100644 --- a/systemd/softether-vpnserver.service +++ b/systemd/softether-vpnserver.service @@ -1,13 +1,14 @@ [Unit] Description=SoftEther VPN Server After=network.target auditd.service -ConditionPathExists=![DIRECTORY]/do_not_run +ConditionPathExists=!${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnserver/do_not_run [Service] Type=forking -EnvironmentFile=-[DIRECTORY] -ExecStart=[BINARY] start -ExecStop=[BINARY] stop +TasksMax=16777216 +EnvironmentFile=-${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnserver +ExecStart=${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnserver/vpnserver start +ExecStop=${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnserver/vpnserver stop KillMode=process Restart=on-failure @@ -16,8 +17,8 @@ PrivateTmp=yes ProtectHome=yes ProtectSystem=full ReadOnlyDirectories=/ -ReadWriteDirectories=-[DIRECTORY] -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID +ReadWriteDirectories=-${CPACK_PACKAGING_INSTALL_PREFIX}/libexec/softether/vpnserver +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYSLOG CAP_SETUID [Install] WantedBy=multi-user.target